summaryrefslogtreecommitdiff
path: root/src/stdatomic/atomic_exchange.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-04-21 19:11:41 -0400
committerJakob Kaivo <jkk@ung.org>2022-04-21 19:11:41 -0400
commit1ae71a66576028eddf532c574c77e12c193eeebc (patch)
treeeb1e580a8528c3179f3e41a964807875717a4a10 /src/stdatomic/atomic_exchange.c
parent5a2f0c03d2a9cf1a463abe81ac26455e243dc6f3 (diff)
add prototypes for stdatomic
Diffstat (limited to 'src/stdatomic/atomic_exchange.c')
-rw-r--r--src/stdatomic/atomic_exchange.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stdatomic/atomic_exchange.c b/src/stdatomic/atomic_exchange.c
new file mode 100644
index 00000000..f5124d18
--- /dev/null
+++ b/src/stdatomic/atomic_exchange.c
@@ -0,0 +1,6 @@
+#include <stdatomic.h>
+
+__BASE atomic_exchange(volatile __TYPE *object, __BASE desired)
+{
+ return *object = desired;
+}