equal
deleted
inserted
replaced
117 } |
117 } |
118 |
118 |
119 |
119 |
120 template<> |
120 template<> |
121 template<typename T> |
121 template<typename T> |
122 inline T Atomic::PlatformCmpxchg<4>::operator()(T exchange_value, |
122 inline T Atomic::PlatformCmpxchg<4>::operator()(T volatile* dest, |
123 T volatile* dest, |
|
124 T compare_value, |
123 T compare_value, |
|
124 T exchange_value, |
125 atomic_memory_order order) const { |
125 atomic_memory_order order) const { |
126 STATIC_ASSERT(4 == sizeof(T)); |
126 STATIC_ASSERT(4 == sizeof(T)); |
127 return cmpxchg_using_helper<int32_t>(reorder_cmpxchg_func, exchange_value, dest, compare_value); |
127 return cmpxchg_using_helper<int32_t>(reorder_cmpxchg_func, dest, compare_value, exchange_value); |
128 } |
128 } |
129 |
129 |
130 template<> |
130 template<> |
131 template<typename T> |
131 template<typename T> |
132 inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value, |
132 inline T Atomic::PlatformCmpxchg<8>::operator()(T volatile* dest, |
133 T volatile* dest, |
|
134 T compare_value, |
133 T compare_value, |
|
134 T exchange_value, |
135 atomic_memory_order order) const { |
135 atomic_memory_order order) const { |
136 STATIC_ASSERT(8 == sizeof(T)); |
136 STATIC_ASSERT(8 == sizeof(T)); |
137 return cmpxchg_using_helper<int64_t>(reorder_cmpxchg_long_func, exchange_value, dest, compare_value); |
137 return cmpxchg_using_helper<int64_t>(reorder_cmpxchg_long_func, dest, compare_value, exchange_value); |
138 } |
138 } |
139 |
139 |
140 #endif // OS_CPU_LINUX_ARM_ATOMIC_LINUX_ARM_HPP |
140 #endif // OS_CPU_LINUX_ARM_ATOMIC_LINUX_ARM_HPP |