1/*-------------------------------------------------------------------------
4 * Fallback for platforms without 64 bit atomics support. Slower
5 * than native atomics support, but not unusably slow.
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/port/atomics/fallback.h
12 *-------------------------------------------------------------------------
15/* intentionally no include guards, should only be included by atomics.h */
16#ifndef INSIDE_ATOMICS_H
17# error "should be included via atomics.h"
21#if !defined(PG_HAVE_ATOMIC_U64_SUPPORT)
23 #define PG_HAVE_ATOMIC_U64_SIMULATION
25 #define PG_HAVE_ATOMIC_U64_SUPPORT
32 #define PG_HAVE_ATOMIC_INIT_U64
35 #define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U64
39 #define PG_HAVE_ATOMIC_FETCH_ADD_U64
42#endif /* PG_HAVE_ATOMIC_U64_SUPPORT */
uint64 pg_atomic_fetch_add_u64_impl(volatile pg_atomic_uint64 *ptr, int64 add_)
void pg_atomic_init_u64_impl(volatile pg_atomic_uint64 *ptr, uint64 val_)
struct pg_atomic_uint64 pg_atomic_uint64
bool pg_atomic_compare_exchange_u64_impl(volatile pg_atomic_uint64 *ptr, uint64 *expected, uint64 newval)