summaryrefslogtreecommitdiff
path: root/meson-cc-tests/intel-atomic-primitives-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'meson-cc-tests/intel-atomic-primitives-test.c')
-rw-r--r--meson-cc-tests/intel-atomic-primitives-test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson-cc-tests/intel-atomic-primitives-test.c b/meson-cc-tests/intel-atomic-primitives-test.c
new file mode 100644
index 0000000..a5c8040
--- /dev/null
+++ b/meson-cc-tests/intel-atomic-primitives-test.c
@@ -0,0 +1,6 @@
+void memory_barrier (void) { __sync_synchronize (); }
+int atomic_add (int *i) { return __sync_fetch_and_add (i, 1); }
+int mutex_trylock (int *m) { return __sync_lock_test_and_set (m, 1); }
+void mutex_unlock (int *m) { __sync_lock_release (m); }
+
+int main(void) { return 0;}