equal
deleted
inserted
replaced
44 } |
44 } |
45 }; |
45 }; |
46 |
46 |
47 template<size_t byte_size> |
47 template<size_t byte_size> |
48 template<typename T> |
48 template<typename T> |
49 inline T Atomic::PlatformXchg<byte_size>::operator()(T exchange_value, |
49 inline T Atomic::PlatformXchg<byte_size>::operator()(T volatile* dest, |
50 T volatile* dest, |
50 T exchange_value, |
51 atomic_memory_order order) const { |
51 atomic_memory_order order) const { |
52 STATIC_ASSERT(byte_size == sizeof(T)); |
52 STATIC_ASSERT(byte_size == sizeof(T)); |
53 T res = __atomic_exchange_n(dest, exchange_value, __ATOMIC_RELEASE); |
53 T res = __atomic_exchange_n(dest, exchange_value, __ATOMIC_RELEASE); |
54 FULL_MEM_BARRIER; |
54 FULL_MEM_BARRIER; |
55 return res; |
55 return res; |