use _ReadWriteBarrier intrinsic for MSVC build

This commit is contained in:
Joel Dice 2009-12-12 18:50:59 -07:00
parent 875a1a45a3
commit d5f5c2351b

View File

@ -16,6 +16,9 @@
#ifdef _MSC_VER #ifdef _MSC_VER
# include "windows.h" # include "windows.h"
# pragma push_macro("assert")
# include "intrin.h"
# pragma pop_macro("assert")
# undef interface # undef interface
#endif #endif
@ -159,7 +162,7 @@ inline void
programOrderMemoryBarrier() programOrderMemoryBarrier()
{ {
#ifdef _MSC_VER #ifdef _MSC_VER
MemoryBarrier(); _ReadWriteBarrier();
#else #else
__asm__ __volatile__("": : :"memory"); __asm__ __volatile__("": : :"memory");
#endif #endif