diff options
author | Florin Coras <fcoras@cisco.com> | 2019-03-21 21:17:43 -0700 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-03-22 17:30:17 +0000 |
commit | 881d13ede7336e5b16601033e5dd9aeb94c795e3 (patch) | |
tree | 7450066ca6d1bbbbd4d98dff3639da1d4482e170 /src/svm | |
parent | b757d1a7f5800b303ea930c6b1ae6224f463de3a (diff) |
svm/atomics: add clib_atomic_swap_rel_n
Change-Id: Iea2c173000570043beafef58ca923463ce76d872
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm')
-rw-r--r-- | src/svm/svm_fifo.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h index 6c3940dfad5..59d7ee01c8e 100644 --- a/src/svm/svm_fifo.h +++ b/src/svm/svm_fifo.h @@ -173,7 +173,7 @@ svm_fifo_set_event (svm_fifo_t * f) { /* return __sync_lock_test_and_set (&f->has_event, 1) == 0; return __sync_bool_compare_and_swap (&f->has_event, 0, 1); */ - return !__atomic_exchange_n (&f->has_event, 1, __ATOMIC_RELEASE); + return !clib_atomic_swap_rel_n (&f->has_event, 1); } /** @@ -184,7 +184,7 @@ svm_fifo_set_event (svm_fifo_t * f) always_inline void svm_fifo_unset_event (svm_fifo_t * f) { - __atomic_exchange_n (&f->has_event, 0, __ATOMIC_ACQUIRE); + clib_atomic_swap_acq_n (&f->has_event, 0); } svm_fifo_t *svm_fifo_create (u32 data_size_in_bytes); |