equal
deleted
inserted
replaced
206 // |
206 // |
207 // The return value is the (unchanged) value from memory as it was when the |
207 // The return value is the (unchanged) value from memory as it was when the |
208 // replacement succeeded. |
208 // replacement succeeded. |
209 template<> |
209 template<> |
210 template<typename T> |
210 template<typename T> |
211 inline T Atomic::PlatformXchg<4>::operator()(T exchange_value, |
211 inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest, |
212 T volatile* dest, |
212 T exchange_value, |
213 atomic_memory_order unused) const { |
213 atomic_memory_order unused) const { |
214 STATIC_ASSERT(4 == sizeof(T)); |
214 STATIC_ASSERT(4 == sizeof(T)); |
215 T old; |
215 T old; |
216 |
216 |
217 __asm__ __volatile__ ( |
217 __asm__ __volatile__ ( |
230 return old; |
230 return old; |
231 } |
231 } |
232 |
232 |
233 template<> |
233 template<> |
234 template<typename T> |
234 template<typename T> |
235 inline T Atomic::PlatformXchg<8>::operator()(T exchange_value, |
235 inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest, |
236 T volatile* dest, |
236 T exchange_value, |
237 atomic_memory_order unused) const { |
237 atomic_memory_order unused) const { |
238 STATIC_ASSERT(8 == sizeof(T)); |
238 STATIC_ASSERT(8 == sizeof(T)); |
239 T old; |
239 T old; |
240 |
240 |
241 __asm__ __volatile__ ( |
241 __asm__ __volatile__ ( |