diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/port/atomics.h | 10 | ||||
| -rw-r--r-- | src/include/port/atomics/generic.h | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/include/port/atomics.h b/src/include/port/atomics.h index 96f1858da97..830ea5c7c52 100644 --- a/src/include/port/atomics.h +++ b/src/include/port/atomics.h @@ -489,6 +489,16 @@ pg_atomic_write_u64(volatile pg_atomic_uint64 *ptr, uint64 val) } static inline void +pg_atomic_unlocked_write_u64(volatile pg_atomic_uint64 *ptr, uint64 val) +{ +#ifndef PG_HAVE_ATOMIC_U64_SIMULATION + AssertPointerAlignment(ptr, 8); +#endif + + pg_atomic_unlocked_write_u64_impl(ptr, val); +} + +static inline void pg_atomic_write_membarrier_u64(volatile pg_atomic_uint64 *ptr, uint64 val) { #ifndef PG_HAVE_ATOMIC_U64_SIMULATION diff --git a/src/include/port/atomics/generic.h b/src/include/port/atomics/generic.h index 6b61a7b5416..00aa152f908 100644 --- a/src/include/port/atomics/generic.h +++ b/src/include/port/atomics/generic.h @@ -297,6 +297,15 @@ pg_atomic_write_u64_impl(volatile pg_atomic_uint64 *ptr, uint64 val) #endif /* PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY && !PG_HAVE_ATOMIC_U64_SIMULATION */ #endif /* PG_HAVE_ATOMIC_WRITE_U64 */ +#ifndef PG_HAVE_ATOMIC_UNLOCKED_WRITE_U64 +#define PG_HAVE_ATOMIC_UNLOCKED_WRITE_U64 +static inline void +pg_atomic_unlocked_write_u64_impl(volatile pg_atomic_uint64 *ptr, uint64 val) +{ + ptr->value = val; +} +#endif + #ifndef PG_HAVE_ATOMIC_READ_U64 #define PG_HAVE_ATOMIC_READ_U64 |
