Subj : Re: Memory visibility and MS Interlocked instructions To : comp.programming.threads From : David Schwartz Date : Thu Aug 25 2005 11:35 am "Scott Meyers" wrote in message news:11grv57io8qgt3b@corp.supernews.com... > David Schwartz wrote: > > The MS Interlocked instructions can only work on platforms where the > > compiler puts in any necessary memory barriers on all accesses to > > 'volatile' variables. This happens to be very easy to do on x86. > But this would require that MS insert membars on all volatile accesses, > because there is, in general, no way to know whether another part of the > program uses an interlocked instruction. Do MS and MS-compatible > compilers > really do that? On x86, it's not needed. I'm not sure about other platforms. DS .