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().
7 lines
162 B
C
7 lines
162 B
C
/* $FreeBSD$ */
|
|
#define NAME __sync_fetch_and_sub_8
|
|
#define TYPE int64_t
|
|
#define FETCHADD(x, y) atomic_fetchadd_64(x, -(y))
|
|
|
|
#include "__sync_fetch_and_op_n.h"
|