diff options
Diffstat (limited to 'src/vnet/mfib')
-rw-r--r-- | src/vnet/mfib/mfib_forward.c | 4 | ||||
-rw-r--r-- | src/vnet/mfib/mfib_signal.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/mfib/mfib_forward.c b/src/vnet/mfib/mfib_forward.c index 3d0e0d47996..4b121324fb6 100644 --- a/src/vnet/mfib/mfib_forward.c +++ b/src/vnet/mfib/mfib_forward.c @@ -300,8 +300,8 @@ mfib_forward_itf_signal (vlib_main_t *vm, { mfib_itf_flags_t old_flags; - old_flags = __sync_fetch_and_or(&mfi->mfi_flags, - MFIB_ITF_FLAG_SIGNAL_PRESENT); + old_flags = clib_atomic_fetch_or(&mfi->mfi_flags, + MFIB_ITF_FLAG_SIGNAL_PRESENT); if (!(old_flags & MFIB_ITF_FLAG_SIGNAL_PRESENT)) { diff --git a/src/vnet/mfib/mfib_signal.c b/src/vnet/mfib/mfib_signal.c index ce9a664c548..176e8ec9114 100644 --- a/src/vnet/mfib/mfib_signal.c +++ b/src/vnet/mfib/mfib_signal.c @@ -71,14 +71,14 @@ mfib_signal_module_init (void) static inline void mfib_signal_lock_aquire (void) { - while (__sync_lock_test_and_set (&mfib_signal_pending.mip_lock, 1)) + while (clib_atomic_test_and_set (&mfib_signal_pending.mip_lock)) ; } static inline void mfib_signal_lock_release (void) { - mfib_signal_pending.mip_lock = 0; + clib_atomic_release(&mfib_signal_pending.mip_lock); } #define MFIB_SIGNAL_CRITICAL_SECTION(_body) \ @@ -117,8 +117,8 @@ mfib_signal_send_one (struct vl_api_registration_ *reg, mfs = pool_elt_at_index(mfib_signal_pool, si); mfi = mfib_itf_get(mfs->mfs_itf); mfi->mfi_si = INDEX_INVALID; - __sync_fetch_and_and(&mfi->mfi_flags, - ~MFIB_ITF_FLAG_SIGNAL_PRESENT); + clib_atomic_fetch_and(&mfi->mfi_flags, + ~MFIB_ITF_FLAG_SIGNAL_PRESENT); vl_mfib_signal_send_one(reg, context, mfs); |