0315980bb8
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().
8 lines
173 B
C
8 lines
173 B
C
/* $FreeBSD$ */
|
|
#define NAME __sync_fetch_and_and_4
|
|
#define TYPE int32_t
|
|
#define CMPSET atomic_cmpset_32
|
|
#define EXPRESSION t & value
|
|
|
|
#include "__sync_fetch_and_op_n.h"
|