aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/atomics.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra/atomics.h')
-rw-r--r--src/vppinfra/atomics.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vppinfra/atomics.h b/src/vppinfra/atomics.h
index 8ddf13801df..420ae837fc0 100644
--- a/src/vppinfra/atomics.h
+++ b/src/vppinfra/atomics.h
@@ -37,9 +37,10 @@
#define clib_atomic_cmp_and_swap(addr,old,new) __sync_val_compare_and_swap(addr, old, new)
#define clib_atomic_bool_cmp_and_swap(addr,old,new) __sync_bool_compare_and_swap(addr, old, new)
-/*Accquire Barrier*/
#define clib_atomic_test_and_set(a) __sync_lock_test_and_set(a, 1)
-/*Release Barrier*/
#define clib_atomic_release(a) __sync_lock_release(a)
+#define clib_atomic_store_rel_n(a, b) __atomic_store_n ((a), (b), __ATOMIC_RELEASE)
+#define clib_atomic_swap_acq_n(a, b) __atomic_exchange_n ((a), (b), __ATOMIC_ACQUIRE)
+
#endif /* included_clib_atomics_h */