From ea23765211db8aa1cc8b4808483dc4573ae29943 Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Fri, 11 Jun 2021 21:20:13 +0800 Subject: [PATCH] Remove legacy __sync_fetch_and_add with __atomic_fetch_add (__ATOMIC_SEQ_CST was picked to enforce total ordering with all other __ATOMIC_SEQ_CST operations.) Signed-off-by: Chun-Hung Tseng --- qsbr/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qsbr/main.c b/qsbr/main.c index 63a0551..55484a7 100644 --- a/qsbr/main.c +++ b/qsbr/main.c @@ -5,7 +5,7 @@ #define unlikely(x) __builtin_expect((x) != 0, 0) #ifndef atomic_fetch_add -#define atomic_fetch_add(x, a) __sync_fetch_and_add(x, a) +#define atomic_fetch_add(x, a) __atomic_fetch_add(x, a, __ATOMIC_SEQ_CST) #endif #ifndef atomic_thread_fence