summaryrefslogtreecommitdiff
path: root/src/stdatomic/atomic_exchange_explicit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdatomic/atomic_exchange_explicit.c')
-rw-r--r--src/stdatomic/atomic_exchange_explicit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/stdatomic/atomic_exchange_explicit.c b/src/stdatomic/atomic_exchange_explicit.c
new file mode 100644
index 00000000..392f5ee9
--- /dev/null
+++ b/src/stdatomic/atomic_exchange_explicit.c
@@ -0,0 +1,11 @@
+#include <stdatomic.h>
+
+__BASE atomic_exchange_explicit(volatile __TYPE *object, __BASE desired, memory_order order)
+{
+ switch (order) {
+ default:
+ break;
+ }
+
+ return *object = desired;
+}