From 21aed5cc995148047e80a48f436d12bca7b0073a Mon Sep 17 00:00:00 2001 From: Sirshak Das Date: Tue, 28 May 2019 08:46:27 -0500 Subject: Switch atomic release API from __sync to __atomic builtin. __sync_lock_release switched to __atomic_store for code consitency, although both generate same instructions with current compilers. Change-Id: I37d320509e43a4c2b8a49af6346dc4a43ca2f535 Signed-off-by: Sirshak Das Reviewed-by: Lijian Zhang Reviewed-by: Honnappa Nagarahalli --- src/vppinfra/atomics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vppinfra/atomics.h b/src/vppinfra/atomics.h index 1d480af407b..df8e534b683 100644 --- a/src/vppinfra/atomics.h +++ b/src/vppinfra/atomics.h @@ -38,7 +38,7 @@ #define clib_atomic_bool_cmp_and_swap(addr,old,new) __sync_bool_compare_and_swap(addr, old, new) #define clib_atomic_test_and_set(a) __atomic_exchange_n(a, 1, __ATOMIC_ACQUIRE) -#define clib_atomic_release(a) __sync_lock_release(a) +#define clib_atomic_release(a) __atomic_store_n(a, 0, __ATOMIC_RELEASE) #define clib_atomic_fence_rel() __atomic_thread_fence(__ATOMIC_RELEASE); -- cgit 1.2.3-korg