< prev index next >

src/hotspot/os_cpu/linux_zero/atomic_linux_zero.hpp

Print this page

        

*** 57,68 **** return __sync_add_and_fetch(dest, add_value); } template<> template<typename T> ! inline T Atomic::PlatformXchg<4>::operator()(T exchange_value, ! T volatile* dest, atomic_memory_order order) const { STATIC_ASSERT(4 == sizeof(T)); // __sync_lock_test_and_set is a bizarrely named atomic exchange // operation. Note that some platforms only support this with the // limitation that the only valid value to store is the immediate --- 57,68 ---- return __sync_add_and_fetch(dest, add_value); } template<> template<typename T> ! inline T Atomic::PlatformXchg<4>::operator()(T volatile* dest, ! T exchange_value, atomic_memory_order order) const { STATIC_ASSERT(4 == sizeof(T)); // __sync_lock_test_and_set is a bizarrely named atomic exchange // operation. Note that some platforms only support this with the // limitation that the only valid value to store is the immediate
*** 76,87 **** return result; } template<> template<typename T> ! inline T Atomic::PlatformXchg<8>::operator()(T exchange_value, ! T volatile* dest, atomic_memory_order order) const { STATIC_ASSERT(8 == sizeof(T)); T result = __sync_lock_test_and_set (dest, exchange_value); __sync_synchronize(); return result; --- 76,87 ---- return result; } template<> template<typename T> ! inline T Atomic::PlatformXchg<8>::operator()(T volatile* dest, ! T exchange_value, atomic_memory_order order) const { STATIC_ASSERT(8 == sizeof(T)); T result = __sync_lock_test_and_set (dest, exchange_value); __sync_synchronize(); return result;
< prev index next >