Re: Threading Question
Re: Threading Question
- Subject: Re: Threading Question
- From: Robert Bielik <email@hidden>
- Date: Wed, 01 Feb 2012 09:12:13 +0100
Hi Mark,
Mark Pauley skrev 2012-02-01 01:50:
This is exactly what I'm talking about when I speak of the functions available for you in<libkern/OSAtomic.h>
Using OSMemoryBarrier() from <libkern/OSAtomic.h> as Michael pointed out is quite sufficient, and IMHO possibly better, reason why given below.
For example: OSAtomicEnqueue and OSAtomicDequeue actually provide the non-blocking FIFO behavior described by previous responses.
Are they really non-blocking ? Atomic yes, but non-blocking ? I'm not acquainted with those queue functions, but as I see it from the example you provided, there HAS to be some memory allocation/deallocation going on "under the hood", and that's not permitted in a non-blocking FIFO implementation AFAIK. Am I missing something ?
All the best,
/Rob
_______________________________________________
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