// Gcc on x86
inline void MemoryBarrier() {
// See http://gcc.gnu.org/ml/gcc/2003-04/msg01180.html for a discussion on
// this idiom. Also see http://en.wikipedia.org/wiki/Memory_ordering.
__asm__ __volatile__("" : : : "memory");
}
‘asm volatile("" : : : "memory")’ can only resolve compile-time memory ordering, I cann't understand how to resolve runtime memory ordering.