Skip to content

Commit b9ca2d3

Browse files
authored
Remove legacy __sync builtins
The legacy gcc builtin "__sync_fetch_and_add" was replaced with "__atomic_fetch_add (__ATOMIC_SEQ_CST)" to ensure total ordering with all other __ATOMIC_SEQ_CST operations. Signed-off-by: Chun-Hung Tseng <[email protected]>
1 parent eb25a45 commit b9ca2d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qsbr/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define unlikely(x) __builtin_expect((x) != 0, 0)
66

77
#ifndef atomic_fetch_add
8-
#define atomic_fetch_add(x, a) __sync_fetch_and_add(x, a)
8+
#define atomic_fetch_add(x, a) __atomic_fetch_add(x, a, __ATOMIC_SEQ_CST)
99
#endif
1010

1111
#ifndef atomic_thread_fence

0 commit comments

Comments
 (0)