aboutsummaryrefslogtreecommitdiff
path: root/src/include/port/atomics/generic-msvc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/port/atomics/generic-msvc.h')
-rw-r--r--src/include/port/atomics/generic-msvc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/port/atomics/generic-msvc.h b/src/include/port/atomics/generic-msvc.h
index 747daa0a760..419cbc38956 100644
--- a/src/include/port/atomics/generic-msvc.h
+++ b/src/include/port/atomics/generic-msvc.h
@@ -32,6 +32,8 @@
#define pg_memory_barrier_impl() MemoryBarrier()
#endif
+#if defined(HAVE_ATOMICS)
+
#define PG_HAVE_ATOMIC_U32_SUPPORT
typedef struct pg_atomic_uint32
{
@@ -44,9 +46,13 @@ typedef struct pg_atomic_uint64
volatile uint64 value;
} pg_atomic_uint64;
+#endif /* defined(HAVE_ATOMICS) */
+
#if defined(PG_USE_INLINE) || defined(ATOMICS_INCLUDE_DEFINITIONS)
+#if defined(HAVE_ATOMICS)
+
#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32
static inline bool
pg_atomic_compare_exchange_u32_impl(volatile pg_atomic_uint32 *ptr,
@@ -100,4 +106,6 @@ pg_atomic_fetch_add_u64_impl(volatile pg_atomic_uint64 *ptr, int64 add_)
}
#endif /* _WIN64 */
+#endif /* HAVE_ATOMICS */
+
#endif /* defined(PG_USE_INLINE) || defined(ATOMICS_INCLUDE_DEFINITIONS) */