summaryrefslogtreecommitdiffstats
path: root/lib/libcompiler_rt/__sync_fetch_and_sub_4.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcompiler_rt/__sync_fetch_and_sub_4.c')
-rw-r--r--lib/libcompiler_rt/__sync_fetch_and_sub_4.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libcompiler_rt/__sync_fetch_and_sub_4.c b/lib/libcompiler_rt/__sync_fetch_and_sub_4.c
new file mode 100644
index 0000000..a251add
--- /dev/null
+++ b/lib/libcompiler_rt/__sync_fetch_and_sub_4.c
@@ -0,0 +1,6 @@
+/* $FreeBSD$ */
+#define NAME __sync_fetch_and_sub_4
+#define TYPE uint32_t
+#define FETCHADD(x, y) atomic_fetchadd_32(x, -(y))
+
+#include "__sync_fetch_and_op_n.h"
OpenPOWER on IntegriCloud