summaryrefslogtreecommitdiffhomepage
path: root/compat/macros1.h
diff options
context:
space:
mode:
Diffstat (limited to 'compat/macros1.h')
-rw-r--r--compat/macros1.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/compat/macros1.h b/compat/macros1.h
index fd2d4585..56f8e978 100644
--- a/compat/macros1.h
+++ b/compat/macros1.h
@@ -39,3 +39,12 @@
# define PP_EXPAND__2(x) PP_EXPAND__3(x) x
# define PP_EXPAND__3(x) x
#endif
+
+#ifdef _MSC_VER
+//# include <windows.h>
+//# define FULL_BARRIER MemoryBarrier()
+# define COMPILER_BARRIER() _ReadWriteBarrier()
+#else
+//# define FULL_BARRIER() __sync_synchronize()
+# define COMPILER_BARRIER() asm volatile("" ::: "memory")
+#endif