Fix libcxxrt / libc++ build with the clang in head.
Pointy hat to: theraven
This commit is contained in:
parent
26c538bc0b
commit
f795bc7ccc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245327
@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
#if __has_feature(cxx_atomic)
|
#if __has_feature(cxx_atomic)
|
||||||
#define ATOMIC_SWAP(addr, val)\
|
#define ATOMIC_SWAP(addr, val)\
|
||||||
__atomic_exchange(addr, val, __ATOMIC_ACQ_REL)
|
__c11_atomic_exchange((_Atomic(__typeof__(val))*)addr, val, __ATOMIC_ACQ_REL)
|
||||||
#elif __has_builtin(__sync_swap)
|
#elif __has_builtin(__sync_swap)
|
||||||
#define ATOMIC_SWAP(addr, val)\
|
#define ATOMIC_SWAP(addr, val)\
|
||||||
__sync_swap(addr, val)
|
__sync_swap(addr, val)
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#if __has_feature(cxx_atomic)
|
#if __has_feature(cxx_atomic)
|
||||||
#define ATOMIC_LOAD(addr)\
|
#define ATOMIC_LOAD(addr)\
|
||||||
__atomic_load(addr, __ATOMIC_ACQUIRE)
|
__c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE)
|
||||||
#else
|
#else
|
||||||
#define ATOMIC_LOAD(addr)\
|
#define ATOMIC_LOAD(addr)\
|
||||||
(__sync_synchronize(), *addr)
|
(__sync_synchronize(), *addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user