equal
deleted
inserted
replaced
53 |
53 |
54 template<size_t byte_size> |
54 template<size_t byte_size> |
55 struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE> |
55 struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE> |
56 { |
56 { |
57 template <typename T> |
57 template <typename T> |
58 T operator()(const volatile T* p) const { T data; __atomic_load(p, &data, __ATOMIC_ACQUIRE); return data; } |
58 T operator()(const volatile T* p) const { T data; __atomic_load(const_cast<T*>(p), &data, __ATOMIC_ACQUIRE); return data; } |
59 }; |
59 }; |
60 |
60 |
61 template<size_t byte_size> |
61 template<size_t byte_size> |
62 struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X> |
62 struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X> |
63 { |
63 { |
64 template <typename T> |
64 template <typename T> |
65 void operator()(T v, volatile T* p) const { __atomic_store(p, &v, __ATOMIC_RELEASE); } |
65 void operator()(T v, volatile T* p) const { __atomic_store(const_cast<T*>(p), &v, __ATOMIC_RELEASE); } |
66 }; |
66 }; |
67 |
67 |
68 template<size_t byte_size> |
68 template<size_t byte_size> |
69 struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X_FENCE> |
69 struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X_FENCE> |
70 { |
70 { |