summaryrefslogtreecommitdiffstats
path: root/contrib/libcxxrt/atomic.h
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2013-01-12 10:06:59 +0000
committertheraven <theraven@FreeBSD.org>2013-01-12 10:06:59 +0000
commit769d01b2aaace1c0cc0cc61d265b67384795638f (patch)
treeafce88ed7938003abc8797fcbf8d90595448e1ad /contrib/libcxxrt/atomic.h
parent2a61b082bf60afb1c45cb4c10fef641623e29664 (diff)
downloadFreeBSD-src-769d01b2aaace1c0cc0cc61d265b67384795638f.zip
FreeBSD-src-769d01b2aaace1c0cc0cc61d265b67384795638f.tar.gz
Fix libcxxrt / libc++ build with the clang in head.
Pointy hat to: theraven
Diffstat (limited to 'contrib/libcxxrt/atomic.h')
-rw-r--r--contrib/libcxxrt/atomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libcxxrt/atomic.h b/contrib/libcxxrt/atomic.h
index bcd8a47..53aa26f 100644
--- a/contrib/libcxxrt/atomic.h
+++ b/contrib/libcxxrt/atomic.h
@@ -11,7 +11,7 @@
*/
#if __has_feature(cxx_atomic)
#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)
#define ATOMIC_SWAP(addr, val)\
__sync_swap(addr, val)
@@ -22,7 +22,7 @@
#if __has_feature(cxx_atomic)
#define ATOMIC_LOAD(addr)\
- __atomic_load(addr, __ATOMIC_ACQUIRE)
+ __c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE)
#else
#define ATOMIC_LOAD(addr)\
(__sync_synchronize(), *addr)
OpenPOWER on IntegriCloud