From d5f5c2351b31794de1138deb8f790bdb3c16eeba Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 12 Dec 2009 18:50:59 -0700 Subject: [PATCH] use _ReadWriteBarrier intrinsic for MSVC build --- src/x86.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/x86.h b/src/x86.h index f9d3c4f559..f5861de2d1 100644 --- a/src/x86.h +++ b/src/x86.h @@ -16,6 +16,9 @@ #ifdef _MSC_VER # include "windows.h" +# pragma push_macro("assert") +# include "intrin.h" +# pragma pop_macro("assert") # undef interface #endif @@ -159,7 +162,7 @@ inline void programOrderMemoryBarrier() { #ifdef _MSC_VER - MemoryBarrier(); + _ReadWriteBarrier(); #else __asm__ __volatile__("": : :"memory"); #endif