• 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: Threading question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Threading question


  • Subject: Re: Threading question
  • From: Robert Chin <email@hidden>
  • Date: Wed, 08 Feb 2012 09:49:16 -0800

Sorry, not to chime in too late, but OSAtomicEnqueue and
OSAtomicDequeue are not the functions you want for a FIFO queue. Those
queues are LIFO (and you can see some example of their usage in the
CoreAudio sample code). The FIFO calls you want are
OSAtomicFifoEnqueue and OSAtomicFifoDequeue, new in 10.7. Currently
they appear not to be documented in the man page, but you can read
about their use in libkern/OSAtomic.h.

As far as whether they "block" or not, that is kind of a complicated
question. Do you consider the equivalent of sitting in a while(1) loop
waiting for something else to complete blocking? Either that or
locking must happen. I don't think there's any sort of implied
constant time guarantee for the function returning specifically, but
it's likely to be quite short.

Robert
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: RE: AU Plugin automation problem
  • Next by Date: AudioObjectPropertiesChanged notification not received
  • Previous by thread: Re: Threading Question
  • Next by thread: USB audio driver and HAL overload notification
  • Index(es):
    • Date
    • Thread