summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/atomic/gcc_builtins.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/atomic/gcc_builtins.h b/include/atomic/gcc_builtins.h
index fb6a537d204..6e807b3c51c 100644
--- a/include/atomic/gcc_builtins.h
+++ b/include/atomic/gcc_builtins.h
@@ -31,6 +31,12 @@
#define make_atomic_store_body(S) *a= v
#define MY_ATOMIC_MODE "gcc-builtins-up"
+#elif defined(__ATOMIC_SEQ_CST)
+#define MY_ATOMIC_MODE "gcc-builtins-smp"
+#define make_atomic_load_body(S) \
+ ret= __atomic_load_n(a, __ATOMIC_SEQ_CST)
+#define make_atomic_store_body(S) \
+ __atomic_store_n(a, v, __ATOMIC_SEQ_CST)
#else
#define MY_ATOMIC_MODE "gcc-builtins-smp"
#define make_atomic_load_body(S) \