[LAD] Atomic Operations

Clemens Ladisch clemens at ladisch.de
Tue Dec 15 09:14:25 UTC 2009


Paul Davis wrote:
> On Mon, Dec 14, 2009 at 2:45 PM, Stephen Sinclair <radarsat1 at gmail.com> wrote:
> > As far as I understand
> > this doesn't happen as long as you stick to the word size of the
> > architecture.  (Anyone please correct me if I'm wrong about that.)
> 
> unbelievably, perhaps, this was not true on SPARC. atomicity was only
> guaranteed for 24 bits of a 32 bit value.

On SPARC, 32-bit reads and writes were atomic, but unlike most other
processors, it was not able to lock the bus for atomic read-modify-write
operations, so 8 bits were used to implement a lock; see
<http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/sparc/include/asm/atomic_32.h>.


Best regards,
Clemens



More information about the Linux-audio-dev mailing list