Subj : Re: Memory Barriers, Compiler Optimizations, etc. To : comp.programming.threads From : SenderX Date : Thu Feb 03 2005 05:20 pm One more "important" thing... > Just to clarify and answer your question directly: > > > loads are usually associated with "consumer side" memory barriers. > hoist-load-xxx, acquire, ect... loads: the consumer-side barrier is usually executed "AFTER" the load. movl %(eax), %ecx ; consumer-side barrier > > stores are usually associated with "producer side" memory barriers. > sink-store-xxx, release, ect... stores: the producer-side barrier is usually executed "BEFORE" the store. ; consumer-side barrier movl %ecx, %(eax) This setup allows for the producer/consumer relationship to work very well with weakly-ordered multi-CPU shared memory environments. .