12 #ifndef ROC_CORE_ATOMIC_H_
13 #define ROC_CORE_ATOMIC_H_
15 #include "roc_core/atomic_ops.h"
16 #include "roc_core/cpu_traits.h"
29 int f :
sizeof(T) == 8 ||
sizeof(T) == 16 ||
sizeof(T) == 32 ? 1 : -1;
64 inline operator T()
const {
154 inline operator T*()
const {
static T1 exchange_seq_cst(T1 &var, T2 val)
Atomic exchange (full barrier).
static T1 fetch_sub_seq_cst(T1 &var, T2 val)
Atomic sub-and-fetch (full barrier).
static void store_seq_cst(T1 &var, T2 val)
Atomic store (full barrier).
static T1 fetch_or_seq_cst(T1 &var, T2 val)
Atomic fetch-or (full barrier).
static bool compare_exchange_seq_cst(T1 &var, T1 &exp, T2 des)
Atomic compare-and-swap (full barrier).
static T1 fetch_and_seq_cst(T1 &var, T2 val)
Atomic fetch-and (full barrier).
static T1 fetch_add_seq_cst(T1 &var, T2 val)
Atomic add-and-fetch (full barrier).
static T1 fetch_xor_seq_cst(T1 &var, T2 val)
Atomic fetch-xor (full barrier).
static T load_seq_cst(const T &var)
Atomic load (full barrier).
T * operator--()
Atomic decrement (prefix).
T * operator++(int)
Atomic increment (postfix).
T * operator+=(ptrdiff_t val)
Atomic addition.
Atomic(T *val=NULL)
Initialize with given value.
bool compare_exchange(T *exp, T *des)
Atomic compare-and-swap.
T * operator++()
Atomic increment (prefix).
T * operator-=(ptrdiff_t val)
Atomic subtraction.
T & operator*() const
Atomic load.
T * operator=(T *val)
Atomic store.
T * operator->() const
Atomic load.
T * operator--(int)
Atomic decrement (postfix).
T * exchange(T *val)
Atomic exchange.
Atomic integer. Provides sequential consistency. For a fine-grained memory order control,...
T exchange(T val)
Atomic exchange.
T operator++()
Atomic increment (prefix).
bool compare_exchange(T exp, T des)
Atomic compare-and-swap.
T operator+=(T val)
Atomic addition.
T operator^=(T val)
Atomic bitwise xor.
T operator-=(T val)
Atomic subtraction.
T fetch_xor(T val)
Atomic fetch-xor.
T operator--(int)
Atomic decrement (postfix).
T fetch_or(T val)
Atomic fetch-or.
T fetch_and(T val)
Atomic fetch-and.
Atomic(T val=0)
Initialize with given value.
T operator=(T val)
Atomic store.
T operator|=(T val)
Atomic bitwise or.
T operator&=(T val)
Atomic bitwise and.
T operator--()
Atomic decrement (prefix).
T operator++(int)
Atomic increment (postfix).
Base class for non-copyable objects.
Commonly used types and functions.