Subj : Re: Memory visibility and MS Interlocked instructions To : comp.programming.threads From : Peter Dimov Date : Thu Sep 01 2005 11:47 am Sean Kelly wrote: > Alexander Terekhov wrote: > > Sean Kelly wrote: > > [...] > > > msync.acq > > > and msync.rel operations (to use atomic<> semantics) would both need > > > the LOCK prefix. Is this correct? > > > > No. > > > > > I'll admit that until this I was > > > beginning to think that only msync.acq stores needed a LOCK. > > > > That's not true either. > > Help me out here :) It's been established that loads can be migrated > above preceding stores if no membars are present, so LOCK must be used > in some cases to prevent this, correct? The unusual load with msync_rel would need a LOCK or an MFENCE, true, as would a store with msync_acq. But the common load.acq and store.rel operations map to MOV, no LOCK or MFENCE. A load.acq is allowed to migrate above a store.rel. .