Subj : Re: CMPXCHG timing To : comp.programming.threads From : Alexander Terekhov Date : Fri Apr 01 2005 03:17 pm Joe Seigh wrote: > > On 31 Mar 2005 17:38:46 -0800, Michael Pryhodko wrote: > > > Well, I have decided to show my child :) It somewhat raw but readable: > > > (snip) > > > > > unlock() > > { > > // sanity check > > ASSERT(A == P); > > > You need the sfence here for release semantics. Strictly speaking > it has to be mfence (store/store + store/load) > > > // mark flag 'free' > > A = 0; You need vacation, Joe. ;-) http://groups.google.de/groups?selm=3EBFDC37.DDDE3230%40web.de http://groups.google.de/groups?selm=42235BEC.C06F939B%40web.de regards, alexander. .