On Sun, Feb 3, 2013 at 11:47 AM, David Brown <[email protected]> wrote: > > Anyway, the simplest memory barrier in gcc is : > > asm volatile("" ::: "memory");
That is a compilation level memory barrier, but it clearly does
nothing at the machine level.
To get a machine level (and compilation level) memory barrier using
current GCC, use
__atomic_thread_fence (__ATOMIC_SEQ_CST);
Ian
