Re: Atomic operations
Re: Atomic operations
- Subject: Re: Atomic operations
- From: kelly jacklin <email@hidden>
- Date: Thu, 10 Jul 2003 06:43:03 -0700
People considering adopting the approach of using atomic operations
would be well-advised to use the OS-provided primitives for these
things, rather than coding the assembler out of this page.
CoreServices (a low-level framework included by both Carbon and Cocoa)
includes a CompareAndSwap call, which is essentially identical to
AtomicLockSwap. Including the code yourself makes you vulnerable to
subtle changes in PowerPC architecture that effect the instruction
sequence needed to properly code synchronization primitives; it has
happened in the past (when 604 was introduced, for example), and it
will undoubtedly happen again...
kelly
On Thursday, July 10, 2003, at 12:52 AM, Alberto Ricci wrote:
Just wanted to suggest a well-written article on atomic operations and
locks, which might be of use...
http://www.cocoadev.com/index.pl?AtomicThreadSafety
_______________________________________________
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.