Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Atomic operations. This wrapper exists because on non-C11 compilers we use another implementation. More...
#include <atomic_ops.h>
Static Public Member Functions | |
Memory fence | |
static void | fence_acquire () |
Acquire memory barrier. More... | |
static void | fence_release () |
Release memory barrier. More... | |
static void | fence_seq_cst () |
Full memory barrier. More... | |
Load | |
template<class T > | |
static T | load_relaxed (const T &var) |
Atomic load (no barrier). More... | |
template<class T > | |
static T | load_acquire (const T &var) |
Atomic load (acquire barrier). More... | |
template<class T > | |
static T | load_seq_cst (const T &var) |
Atomic load (full barrier). More... | |
Store | |
template<class T1 , class T2 > | |
static void | store_relaxed (T1 &var, T2 val) |
Atomic store (no barrier). More... | |
template<class T1 , class T2 > | |
static void | store_release (T1 &var, T2 val) |
Atomic store (release barrier). More... | |
template<class T1 , class T2 > | |
static void | store_seq_cst (T1 &var, T2 val) |
Atomic store (full barrier). More... | |
Exchange | |
template<class T1 , class T2 > | |
static T1 | exchange_relaxed (T1 &var, T2 val) |
Atomic exchange (no barrier). More... | |
template<class T1 , class T2 > | |
static T1 | exchange_acquire (T1 &var, T2 val) |
Atomic exchange (acquire barrier). More... | |
template<class T1 , class T2 > | |
static T1 | exchange_release (T1 &var, T2 val) |
Atomic exchange (release barrier). More... | |
template<class T1 , class T2 > | |
static T1 | exchange_acq_rel (T1 &var, T2 val) |
Atomic exchange (acquire-release barrier). More... | |
template<class T1 , class T2 > | |
static T1 | exchange_seq_cst (T1 &var, T2 val) |
Atomic exchange (full barrier). More... | |
CAS | |
template<class T1 , class T2 > | |
static bool | compare_exchange_relaxed (T1 &var, T1 &exp, T2 des) |
Atomic compare-and-swap (no barrier). More... | |
template<class T1 , class T2 > | |
static bool | compare_exchange_acquire (T1 &var, T1 &exp, T2 des) |
Atomic compare-and-swap (acquire barrier). More... | |
template<class T1 , class T2 > | |
static bool | compare_exchange_release (T1 &var, T1 &exp, T2 des) |
Atomic compare-and-swap (release barrier). More... | |
template<class T1 , class T2 > | |
static bool | compare_exchange_acq_rel (T1 &var, T1 &exp, T2 des) |
Atomic compare-and-swap (acquire-release barrier). More... | |
template<class T1 , class T2 > | |
static bool | compare_exchange_seq_cst (T1 &var, T1 &exp, T2 des) |
Atomic compare-and-swap (full barrier). More... | |
Addition | |
template<class T1 , class T2 > | |
static T1 | fetch_add_relaxed (T1 &var, T2 val) |
Atomic fetch-add (no barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_add_acquire (T1 &var, T2 val) |
Atomic add-and-fetch (acquire barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_add_release (T1 &var, T2 val) |
Atomic add-and-fetch (release barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_add_seq_cst (T1 &var, T2 val) |
Atomic add-and-fetch (full barrier). More... | |
Subtraction | |
template<class T1 , class T2 > | |
static T1 | fetch_sub_relaxed (T1 &var, T2 val) |
Atomic fetch-sub (no barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_sub_acquire (T1 &var, T2 val) |
Atomic sub-and-fetch (acquire barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_sub_release (T1 &var, T2 val) |
Atomic sub-and-fetch (release barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_sub_seq_cst (T1 &var, T2 val) |
Atomic sub-and-fetch (full barrier). More... | |
Bitwise AND | |
template<class T1 , class T2 > | |
static T1 | fetch_and_relaxed (T1 &var, T2 val) |
Atomic fetch-and (no barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_and_acquire (T1 &var, T2 val) |
Atomic fetch-and (acquire barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_and_release (T1 &var, T2 val) |
Atomic fetch-and (release barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_and_seq_cst (T1 &var, T2 val) |
Atomic fetch-and (full barrier). More... | |
Bitwise OR | |
template<class T1 , class T2 > | |
static T1 | fetch_or_relaxed (T1 &var, T2 val) |
Atomic fetch-or (no barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_or_acquire (T1 &var, T2 val) |
Atomic fetch-or (acquire barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_or_release (T1 &var, T2 val) |
Atomic fetch-or (release barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_or_seq_cst (T1 &var, T2 val) |
Atomic fetch-or (full barrier). More... | |
Bitwise XOR | |
template<class T1 , class T2 > | |
static T1 | fetch_xor_relaxed (T1 &var, T2 val) |
Atomic fetch-xor (no barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_xor_acquire (T1 &var, T2 val) |
Atomic fetch-xor (acquire barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_xor_release (T1 &var, T2 val) |
Atomic fetch-xor (release barrier). More... | |
template<class T1 , class T2 > | |
static T1 | fetch_xor_seq_cst (T1 &var, T2 val) |
Atomic fetch-xor (full barrier). More... | |
Atomic operations. This wrapper exists because on non-C11 compilers we use another implementation.
Atomic operations.
Definition at line 20 of file atomic_ops.h.
|
inlinestatic |
Atomic compare-and-swap (acquire-release barrier).
Definition at line 138 of file atomic_ops.h.
|
inlinestatic |
Atomic compare-and-swap (acquire barrier).
Definition at line 124 of file atomic_ops.h.
|
inlinestatic |
Atomic compare-and-swap (no barrier).
Definition at line 117 of file atomic_ops.h.
|
inlinestatic |
Atomic compare-and-swap (release barrier).
Definition at line 131 of file atomic_ops.h.
|
inlinestatic |
Atomic compare-and-swap (full barrier).
Definition at line 145 of file atomic_ops.h.
|
inlinestatic |
Atomic exchange (acquire-release barrier).
Definition at line 101 of file atomic_ops.h.
|
inlinestatic |
Atomic exchange (acquire barrier).
Definition at line 91 of file atomic_ops.h.
|
inlinestatic |
Atomic exchange (no barrier).
Definition at line 86 of file atomic_ops.h.
|
inlinestatic |
Atomic exchange (release barrier).
Definition at line 96 of file atomic_ops.h.
|
inlinestatic |
Atomic exchange (full barrier).
Definition at line 106 of file atomic_ops.h.
|
inlinestatic |
Acquire memory barrier.
Definition at line 26 of file atomic_ops.h.
|
inlinestatic |
Release memory barrier.
Definition at line 31 of file atomic_ops.h.
|
inlinestatic |
Full memory barrier.
Definition at line 36 of file atomic_ops.h.
|
inlinestatic |
Atomic add-and-fetch (acquire barrier).
Definition at line 161 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-add (no barrier).
Definition at line 156 of file atomic_ops.h.
|
inlinestatic |
Atomic add-and-fetch (release barrier).
Definition at line 166 of file atomic_ops.h.
|
inlinestatic |
Atomic add-and-fetch (full barrier).
Definition at line 171 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-and (acquire barrier).
Definition at line 211 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-and (no barrier).
Definition at line 206 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-and (release barrier).
Definition at line 216 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-and (full barrier).
Definition at line 221 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-or (acquire barrier).
Definition at line 236 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-or (no barrier).
Definition at line 231 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-or (release barrier).
Definition at line 241 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-or (full barrier).
Definition at line 246 of file atomic_ops.h.
|
inlinestatic |
Atomic sub-and-fetch (acquire barrier).
Definition at line 186 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-sub (no barrier).
Definition at line 181 of file atomic_ops.h.
|
inlinestatic |
Atomic sub-and-fetch (release barrier).
Definition at line 191 of file atomic_ops.h.
|
inlinestatic |
Atomic sub-and-fetch (full barrier).
Definition at line 196 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-xor (acquire barrier).
Definition at line 261 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-xor (no barrier).
Definition at line 256 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-xor (release barrier).
Definition at line 266 of file atomic_ops.h.
|
inlinestatic |
Atomic fetch-xor (full barrier).
Definition at line 271 of file atomic_ops.h.
|
inlinestatic |
Atomic load (acquire barrier).
Definition at line 51 of file atomic_ops.h.
|
inlinestatic |
Atomic load (no barrier).
Definition at line 46 of file atomic_ops.h.
|
inlinestatic |
Atomic load (full barrier).
Definition at line 56 of file atomic_ops.h.
|
inlinestatic |
Atomic store (no barrier).
Definition at line 66 of file atomic_ops.h.
|
inlinestatic |
Atomic store (release barrier).
Definition at line 71 of file atomic_ops.h.
|
inlinestatic |
Atomic store (full barrier).
Definition at line 76 of file atomic_ops.h.