Subj : Re: CMPXCHG timing To : comp.programming.threads From : Joe Seigh Date : Fri Apr 01 2005 09:29 am On Fri, 01 Apr 2005 15:17:15 +0200, Alexander Terekhov wrote: > > 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 > Still morning here. -- Joe Seigh .