summaryrefslogtreecommitdiffstats
path: root/src/plugins/lb/lb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lb/lb.c')
-rw-r--r--src/plugins/lb/lb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lb/lb.c b/src/plugins/lb/lb.c
index 1936c1983ee..76bbfa0ac81 100644
--- a/src/plugins/lb/lb.c
+++ b/src/plugins/lb/lb.c
@@ -27,8 +27,8 @@
lb_main_t lb_main;
-#define lb_get_writer_lock() do {} while(__sync_lock_test_and_set (lb_main.writer_lock, 1))
-#define lb_put_writer_lock() lb_main.writer_lock[0] = 0
+#define lb_get_writer_lock() do {} while(clib_atomic_test_and_set (lb_main.writer_lock))
+#define lb_put_writer_lock() clib_atomic_release (lb_main.writer_lock)
static void lb_as_stack (lb_as_t *as);