summaryrefslogtreecommitdiff
path: root/meson-cc-tests/atomic-ops-cxx11.c
diff options
context:
space:
mode:
Diffstat (limited to 'meson-cc-tests/atomic-ops-cxx11.c')
-rw-r--r--meson-cc-tests/atomic-ops-cxx11.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/meson-cc-tests/atomic-ops-cxx11.c b/meson-cc-tests/atomic-ops-cxx11.c
new file mode 100644
index 000000000..aeef0d849
--- /dev/null
+++ b/meson-cc-tests/atomic-ops-cxx11.c
@@ -0,0 +1,3 @@
+int atomic_add(int i) { return __atomic_fetch_add(&i, 1, __ATOMIC_SEQ_CST); }
+int atomic_cmpxchg(int i, int j, int k) { return __atomic_compare_exchange_n(&i, &j, k, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
+int main(void) { return 0; }