From: Kyle McMartin <[EMAIL PROTECTED]> Date: Sun, 27 May 2007 23:11:14 -0400
> Yeah, David Howells wanted to use cmpxchg in his work struct patch, but > had to not because not everyone implements it. > > >From what I can tell, very few arches actually have CAS, and others > emulate it with LL/SC type implementations. That's fine, as a LL/SC implementation of cmpxchg() is fully atomic and would work in concert with a userspace cmpxchg() implemented with LL/SC. It's the platforms that lack CAS _and_ some kind of LL/SC which are problematic. Sparc32 SMP cpus (sparcv8 sun4m and later) have a 'swap' instruction but that does not have an inifinite consensus number like CAS and LL/SC, so it can't be used to implement cmpxchg() (and also the non-SMP sparc32 chips lack the instruction). -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]