freebsd-dev/lib/libcompiler_rt/__sync_fetch_and_or_4.c
Ed Schouten 0315980bb8 Unbreak <stdatomic.h> on ARM + Clang.
Clang only supports atomic operations for ARMv6. For non-ARMv6, we still
need to emit these functions.

Clang's prototype for these functions slightly differs, as it is truly
based on GCC's documentation. It requires the use of signed types, but
also requires varargs. Still, we are not allowed to simply implement
this function directly. Cleverly work around this by implementing it
under a different name and using __strong_reference().
2013-04-27 04:56:02 +00:00

8 lines
172 B
C

/* $FreeBSD$ */
#define NAME __sync_fetch_and_or_4
#define TYPE int32_t
#define CMPSET atomic_cmpset_32
#define EXPRESSION t | value
#include "__sync_fetch_and_op_n.h"