|
ClearCore Library
|
Loading...
Searching...
No Matches
29#ifndef __ATOMIC_UTILS_H_
30#define __ATOMIC_UTILS_H_
32#define atomic_store_n(ptr, val) __atomic_store_n(ptr, val, __ATOMIC_RELEASE)
34#define atomic_or_fetch(ptr, val) \
35 __atomic_or_fetch(ptr, val, __ATOMIC_ACQ_REL)
36#define atomic_fetch_or(ptr, val) \
37 __atomic_fetch_or(ptr, val, __ATOMIC_ACQ_REL)
39#define atomic_xor_fetch(ptr, val) \
40 __atomic_xor_fetch(ptr, val, __ATOMIC_ACQ_REL)
42#define atomic_fetch_and(ptr, val) \
43 __atomic_fetch_and(ptr, val, __ATOMIC_ACQ_REL)
44#define atomic_and_fetch(ptr, val) \
45 __atomic_and_fetch(ptr, val, __ATOMIC_ACQ_REL)
47#define atomic_fetch_add(ptr, val) \
48 __atomic_fetch_add(ptr, val, __ATOMIC_ACQ_REL)
49#define atomic_add_fetch(ptr, val) \
50 __atomic_add_fetch(ptr, val, __ATOMIC_ACQ_REL)
52#define atomic_load(ptr, ret) \
53 __atomic_load(ptr, ret, __ATOMIC_CONSUME)
55#define atomic_load_n(ptr) __atomic_load_n(ptr, __ATOMIC_CONSUME)
56#define atomic_load_n_relaxed(ptr) __atomic_load_n(ptr, __ATOMIC_RELAXED)
58#define atomic_exchange(ptr, val, ret) \
59 __atomic_exchange(ptr, val, ret, __ATOMIC_ACQ_REL)
60#define atomic_exchange_n(ptr, val) \
61 __atomic_exchange_n(ptr, val, __ATOMIC_ACQ_REL)
63#define atomic_test_and_set(ptr) __atomic_test_and_set(ptr, __ATOMIC_ACQUIRE)
65#define atomic_clear(ptr) __atomic_clear(ptr, __ATOMIC_RELEASE)
67#define atomic_test_and_set_acqrel(ptr) __atomic_test_and_set(ptr, __ATOMIC_ACQ_REL)
69#define atomic_clear_seqcst(ptr) __atomic_clear(ptr, __ATOMIC_SEQ_CST)