Subj : Re: Memory visibility and MS Interlocked instructions To : comp.programming.threads From : Peter Dimov Date : Fri Aug 26 2005 03:48 am Alexander Terekhov wrote: > Joe Seigh wrote: > [...] > > So what's the point other than a control dependent barrier is slower > > then a plain load/load and is no more functional? > > It's no slower. The speed and effects of the dumbest implementation of > op(msync::cchlb{_path}) is the same as op(msync::acq). It can be done > better. But to be done better, it requires a _very_ smart compiler, right? if( load(&v, ccacq_true) == 0 ) { // #1 } else { // #2 } load r1, v cmp r1, 0 bne @2 @1: isync #1 b @3 @2: #2 @3: .