On Wednesday, January 23, 2008, at 12:24PM, "Christiaan Hofman" <[EMAIL 
PROTECTED]> wrote:
>Is it safe to use the value as the first argument in  
>OSAtomicCompareAndSwap32, as in OSAtomicCompareAndSwap32(value, 0,  
>&value) ? And/or should there be a preceding OSMemoryBarrier() ?

It might be safe, but I think it's more clear just to pass in the expected 
value (since we always ignore the return value, it doesn't much matter anyway). 
 I think it's better to use OSAtomicCompareAndSwap32Barrier() in all cases, 
though.




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-develop mailing list
Bibdesk-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-develop

Reply via email to