34#if defined(__GNUC__) || defined(__INTEL_COMPILER)
36#define pg_memory_barrier_impl() \
37 __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory", "cc")
38#elif defined(__x86_64__)
39#define pg_memory_barrier_impl() \
40 __asm__ __volatile__ ("lock; addl $0,0(%%rsp)" : : : "memory", "cc")
44#define pg_read_barrier_impl() pg_compiler_barrier_impl()
45#define pg_write_barrier_impl() pg_compiler_barrier_impl()
52#if defined(__GNUC__) || defined(__INTEL_COMPILER)
54#define PG_HAVE_ATOMIC_FLAG_SUPPORT
60#define PG_HAVE_ATOMIC_U32_SUPPORT
71#define PG_HAVE_ATOMIC_U64_SUPPORT
79#define PG_HAVE_ATOMIC_TEST_SET_FLAG
94#define PG_HAVE_ATOMIC_CLEAR_FLAG
106#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32
127#define PG_HAVE_ATOMIC_FETCH_ADD_U32
135:
"=q"(res),
"=m"(ptr->
value)
143#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U64
166#define PG_HAVE_ATOMIC_FETCH_ADD_U64
174:
"=q"(res),
"=m"(ptr->
value)
187#if defined(__x86_64__)
188#define PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY
static bool pg_atomic_compare_exchange_u32_impl(volatile pg_atomic_uint32 *ptr, uint32 *expected, uint32 newval)
static uint32 pg_atomic_fetch_add_u32_impl(volatile pg_atomic_uint32 *ptr, int32 add_)
uint64 pg_atomic_fetch_add_u64_impl(volatile pg_atomic_uint64 *ptr, int64 add_)
bool pg_atomic_compare_exchange_u64_impl(volatile pg_atomic_uint64 *ptr, uint64 *expected, uint64 newval)
#define AssertPointerAlignment(ptr, bndr)