< prev index next >

src/os_cpu/solaris_x86/vm/atomic_solaris_x86.hpp

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

*** 66,76 **** inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) { return _Atomic_xchg(exchange_value, dest); } ! // Not using cmpxchg_using_stub here, because some configurations of // Solaris compiler don't deal well with passing a "defined in .il" // function as an argument. We *should* switch to using gcc-style // inline assembly, but attempting to do so with Studio 12.4 ran into // segfaults. --- 66,76 ---- inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) { return _Atomic_xchg(exchange_value, dest); } ! // Not using cmpxchg_using_helper here, because some configurations of // Solaris compiler don't deal well with passing a "defined in .il" // function as an argument. We *should* switch to using gcc-style // inline assembly, but attempting to do so with Studio 12.4 ran into // segfaults.
*** 78,87 **** --- 78,88 ---- template<typename T> inline T Atomic::PlatformCmpxchg<1>::operator()(T exchange_value, T volatile* dest, T compare_value, cmpxchg_memory_order order) const { + STATIC_ASSERT(1 == sizeof(T)); return IntegerTypes::cast<T>( _Atomic_cmpxchg_byte(IntegerTypes::cast<jbyte>(exchange_value), reinterpret_cast<jbyte volatile*>(dest), IntegerTypes::cast<jbyte>(compare_value))); }
*** 90,99 **** --- 91,101 ---- template<typename T> inline T Atomic::PlatformCmpxchg<4>::operator()(T exchange_value, T volatile* dest, T compare_value, cmpxchg_memory_order order) const { + STATIC_ASSERT(4 == sizeof(T)); return IntegerTypes::cast<T>( _Atomic_cmpxchg(IntegerTypes::cast<jint>(exchange_value), reinterpret_cast<jint volatile*>(dest), IntegerTypes::cast<jint>(compare_value))); }
*** 102,111 **** --- 104,114 ---- template<typename T> inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value, T volatile* dest, T compare_value, cmpxchg_memory_order order) const { + STATIC_ASSERT(8 == sizeof(T)); return IntegerTypes::cast<T>( _Atomic_cmpxchg_long(IntegerTypes::cast<jlong>(exchange_value), reinterpret_cast<jlong volatile*>(dest), IntegerTypes::cast<jlong>(compare_value))); }
< prev index next >