< prev index next >

src/os_cpu/bsd_zero/vm/atomic_bsd_zero.hpp

Print this page
rev 13452 : [mq]: coleen_review1
rev 13458 : imported patch cmpxchg_using_helper

*** 275,289 **** template<typename T> inline T Atomic::PlatformCmpxchg<4>::operator()(T exchange_value, T volatile* dest, T compare_value, cmpxchg_memory_order order) { #ifdef ARM ! return cmpxchg_using_stub<int>(arm_compare_and_swap, exchange_value, dest, compare_value); #else #ifdef M68K ! return cmpxchg_using_stub<int>(m68k_compare_and_swap, exchange_value, dest, compare_value); #else return __sync_val_compare_and_swap(dest, compare_value, exchange_value); #endif // M68K #endif // ARM } --- 275,290 ---- template<typename T> inline T Atomic::PlatformCmpxchg<4>::operator()(T exchange_value, T volatile* dest, T compare_value, cmpxchg_memory_order order) { + STATIC_CAST(4 == sizeof(T)); #ifdef ARM ! return cmpxchg_using_helper<int>(arm_compare_and_swap, exchange_value, dest, compare_value); #else #ifdef M68K ! return cmpxchg_using_helper<int>(m68k_compare_and_swap, exchange_value, dest, compare_value); #else return __sync_val_compare_and_swap(dest, compare_value, exchange_value); #endif // M68K #endif // ARM }
*** 292,301 **** --- 293,303 ---- template<typename T> inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value, T volatile* dest, T compare_value, cmpxchg_memory_order order) { + STATIC_CAST(8 == sizeof(T)); return __sync_val_compare_and_swap(dest, compare_value, exchange_value); } inline jlong Atomic::load(const volatile jlong* src) { volatile jlong dest;
< prev index next >