summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2013-07-09 08:31:26 +0000
committerHeikki Linnakangas2013-07-09 08:34:18 +0000
commite5592c61adb0766eaee53ec07d2f05783d1c6548 (patch)
tree1c5f1dd86a6bc1655f61ffe8e3ce2f784d94bf1b
parent6052bceba5b4cb3d4ae814185d5035307ecabb65 (diff)
Fix memory barrier support on icc on ia64, 2nd attempt.
Itanium doesn't have the mfence instruction - that's a 386 thing. Use the "mf" instruction instead. This reverts the previous commit to add "#include <emmintrinsic.h>"; the problem was not with a missing #include.
-rw-r--r--src/include/storage/barrier.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/storage/barrier.h b/src/include/storage/barrier.h
index a54a74c1a3e..5df3ab1a841 100644
--- a/src/include/storage/barrier.h
+++ b/src/include/storage/barrier.h
@@ -53,8 +53,12 @@ extern slock_t dummy_spinlock;
/*
* icc defines __GNUC__, but doesn't support gcc's inline asm syntax
*/
-#include <emmintrin.h>
+#if defined(__ia64__) || defined(__ia64)
+#define pg_memory_barrier() __mf()
+#else if defined(__i386__) || defined(__x86_64__)
#define pg_memory_barrier() _mm_mfence()
+#endif
+
#define pg_compiler_barrier() __memory_barrier()
#elif defined(__GNUC__)