[PATCH v2] nptl: optimize cancelstate and canceltype changing

Richard Henderson rth@twiddle.net
Mon Jun 16 14:52:00 GMT 2014


On 06/15/2014 11:56 PM, Alexander Fyodorov wrote:
> If CAS is atomic, then "a" will equal 2. But if CAS is implemented via spinlock, the write from CPU0 could happen in between the load and the store that comprise CAS, and "a" will equal 1 which is wrong.

Ah, I mis-read the original patch, wherein I thought you were declaring a local
lock for the write.  Sorry for the noise.


r~



More information about the Libc-alpha mailing list