aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib/mfib_signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/mfib/mfib_signal.c')
-rw-r--r--src/vnet/mfib/mfib_signal.c8
1 files changed, 4 insertions, 4 deletions
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);