aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/ssvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm/ssvm.h')
-rw-r--r--src/svm/ssvm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svm/ssvm.h b/src/svm/ssvm.h
index 8677f5680be..5b2bf0d202d 100644
--- a/src/svm/ssvm.h
+++ b/src/svm/ssvm.h
@@ -103,7 +103,7 @@ ssvm_lock (ssvm_shared_header_t * h, u32 my_pid, u32 tag)
return;
}
- while (__sync_lock_test_and_set (&h->lock, 1))
+ while (clib_atomic_test_and_set (&h->lock))
;
h->owner_pid = my_pid;
@@ -114,7 +114,7 @@ ssvm_lock (ssvm_shared_header_t * h, u32 my_pid, u32 tag)
always_inline void
ssvm_lock_non_recursive (ssvm_shared_header_t * h, u32 tag)
{
- while (__sync_lock_test_and_set (&h->lock, 1))
+ while (clib_atomic_test_and_set (&h->lock))
;
h->tag = tag;