< prev index next >

src/hotspot/share/runtime/objectMonitor.inline.hpp

Print this page
rev 59856 : 8247280: more fencing needed in async deflation for non-TSO machines
Reviewed-by: dholmes

*** 189,212 **** p2i(prev), p2i(new_value)); } return prev; } inline void ObjectMonitor::set_allocation_state(ObjectMonitor::AllocationState s) { _allocation_state = s; } inline ObjectMonitor::AllocationState ObjectMonitor::allocation_state() const { return _allocation_state; } inline bool ObjectMonitor::is_free() const { return _allocation_state == Free; } inline bool ObjectMonitor::is_old() const { ! return _allocation_state == Old; } inline bool ObjectMonitor::is_new() const { return _allocation_state == New; } --- 189,220 ---- p2i(prev), p2i(new_value)); } return prev; } + inline void ObjectMonitor::release_set_allocation_state(ObjectMonitor::AllocationState s) { + Atomic::release_store((int*)&_allocation_state, (int)s); + } + inline void ObjectMonitor::set_allocation_state(ObjectMonitor::AllocationState s) { _allocation_state = s; } inline ObjectMonitor::AllocationState ObjectMonitor::allocation_state() const { return _allocation_state; } + inline ObjectMonitor::AllocationState ObjectMonitor::allocation_state_acquire() const { + return (AllocationState)Atomic::load_acquire((int*)&_allocation_state); + } + inline bool ObjectMonitor::is_free() const { return _allocation_state == Free; } inline bool ObjectMonitor::is_old() const { ! return allocation_state_acquire() == Old; } inline bool ObjectMonitor::is_new() const { return _allocation_state == New; }
< prev index next >