aboutsummaryrefslogtreecommitdiff
path: root/src/include/port/atomics/generic-acc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/port/atomics/generic-acc.h')
-rw-r--r--src/include/port/atomics/generic-acc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/port/atomics/generic-acc.h b/src/include/port/atomics/generic-acc.h
index 627e2dfcb5e..8983b1cda4b 100644
--- a/src/include/port/atomics/generic-acc.h
+++ b/src/include/port/atomics/generic-acc.h
@@ -25,6 +25,10 @@
#include <machine/sys/inline.h>
+#define pg_compiler_barrier_impl() _Asm_sched_fence()
+
+#if defined(HAVE_ATOMICS)
+
/* IA64 always has 32/64 bit atomics */
#define PG_HAVE_ATOMIC_U32_SUPPORT
@@ -39,10 +43,13 @@ typedef struct pg_atomic_uint64
volatile uint64 value;
} pg_atomic_uint64;
-#define pg_compiler_barrier_impl() _Asm_sched_fence()
+#endif /* defined(HAVE_ATOMICS) */
+
#if defined(PG_USE_INLINE) || defined(ATOMICS_INCLUDE_DEFINITIONS)
+#if defined(HAVE_ATOMICS)
+
#define MINOR_FENCE (_Asm_fence) (_UP_CALL_FENCE | _UP_SYS_FENCE | \
_DOWN_CALL_FENCE | _DOWN_SYS_FENCE )
@@ -96,4 +103,6 @@ pg_atomic_compare_exchange_u64_impl(volatile pg_atomic_uint64 *ptr,
#undef MINOR_FENCE
+#endif /* defined(HAVE_ATOMICS) */
+
#endif /* defined(PG_USE_INLINE) || defined(ATOMICS_INCLUDE_DEFINITIONS) */