Re: Problem on dual-processor Macs
Re: Problem on dual-processor Macs
- Subject: Re: Problem on dual-processor Macs
- From: Dan Sugalski <email@hidden>
- Date: Thu, 25 Sep 2003 10:38:10 -0400 (EDT)
On Thu, 25 Sep 2003, Tim Hewett wrote:
>
These indexes are C 'int' data types, so are signed 32-bit
>
integers at the CPU instruction level. I would expect that
>
incrementing a 32-bit integer to be an atomic operation,
>
similarly setting one to 0 being atomic too.
The only thing you can count on is that reading or writing a naturally
aligned integer is atomic. Past that... nope. Just writing a 0 to 32-bit
integer isn't atomic if the integer isn't properly aligned. (That, though,
is really rare given how much modern CPUs hate unaligned stuff)
Dan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.