• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sound Manager & MIDI callbacks, interrupts and threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sound Manager & MIDI callbacks, interrupts and threads


  • Subject: Re: Sound Manager & MIDI callbacks, interrupts and threads
  • From: "AUDIOSYNTH.COM" <email@hidden>
  • Date: Sat, 16 Feb 2002 12:33:46 -0600 (CST)

On Sat, 16 Feb 2002, Andy Robinson wrote:

> Both these callbacks communicate with the main app code via queues, so
> there are brief moments of queue-manipulation when it would be fatal for
> one to interrupt the other and access the queue.
>
> On classic Mac (AFAI understand it) these callbacks were called at
> "interrupt time" so there was never any danger of the main app
> interrupting the callback. To prevent the callback interrupting the main
> app I would briefly disable interrupts using InterruptDisableLib.c as
> provided by Apple. This uses assembly code which doesn't work on Mach-O.
>
> I'm not at all clear what the situation is now. Is the callback running
> in some pre-emptive thread? Do I need to worry about the main app

The situation now is that Apple sells dual processor machines, so
even with one processor interrupted the other could be mucking with your queue.

If you have two threads that need to write or read to another thread then
you need two fifos. Else you're not safe. You should not acquire a lock in
a callback.

--- james mccartney
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Sound Manager & MIDI callbacks, interrupts and threads (From: Andy Robinson <email@hidden>)

  • Prev by Date: Sound Manager & MIDI callbacks, interrupts and threads
  • Next by Date: Re: Sound Manager & MIDI callbacks, interrupts and threads
  • Previous by thread: Sound Manager & MIDI callbacks, interrupts and threads
  • Next by thread: Re: Sound Manager & MIDI callbacks, interrupts and threads
  • Index(es):
    • Date
    • Thread