diff options
author | dim <dim@FreeBSD.org> | 2014-12-30 20:01:06 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-12-30 20:01:06 +0000 |
commit | 82d90d488027b4090723abca792814eb3ede87a4 (patch) | |
tree | f7082c2eee697d11362cdbb5491f757462e35ad8 /contrib/libcxxrt/atomic.h | |
parent | a1a2c6c54c310e3c91fc3b88eb17631255825698 (diff) | |
download | FreeBSD-src-82d90d488027b4090723abca792814eb3ede87a4.zip FreeBSD-src-82d90d488027b4090723abca792814eb3ede87a4.tar.gz |
Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604.
Interesting fixes:
76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms
30d2ae5 Implement __cxa_throw_bad_array_new_length
Reviewed by: bapt
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D1390
Diffstat (limited to 'contrib/libcxxrt/atomic.h')
-rw-r--r-- | contrib/libcxxrt/atomic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libcxxrt/atomic.h b/contrib/libcxxrt/atomic.h index cfaff3f..131ca9f 100644 --- a/contrib/libcxxrt/atomic.h +++ b/contrib/libcxxrt/atomic.h @@ -11,7 +11,7 @@ */ #if __has_builtin(__c11_atomic_exchange) #define ATOMIC_SWAP(addr, val)\ - __c11_atomic_exchange((_Atomic(__typeof__(val))*)addr, val, __ATOMIC_ACQ_REL) + __c11_atomic_exchange(reinterpret_cast<_Atomic(__typeof__(val))*>(addr), val, __ATOMIC_ACQ_REL) #elif __has_builtin(__sync_swap) #define ATOMIC_SWAP(addr, val)\ __sync_swap(addr, val) @@ -22,7 +22,7 @@ #if __has_builtin(__c11_atomic_load) #define ATOMIC_LOAD(addr)\ - __c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE) + __c11_atomic_load(reinterpret_cast<_Atomic(__typeof__(*addr))*>(addr), __ATOMIC_ACQUIRE) #else #define ATOMIC_LOAD(addr)\ (__sync_synchronize(), *addr) |