src/hotspot/share/runtime/objectMonitor.inline.hpp
changeset 55345 492b644bb9c2
parent 54609 04857e2cd509
child 57734 18f4d3d46d54
equal deleted inserted replaced
55344:0c20dbc3d547 55345:492b644bb9c2
    93 // return number of threads contending for this monitor
    93 // return number of threads contending for this monitor
    94 inline jint ObjectMonitor::contentions() const {
    94 inline jint ObjectMonitor::contentions() const {
    95   return _contentions;
    95   return _contentions;
    96 }
    96 }
    97 
    97 
    98 // Do NOT set _contentions = 0. There is a race such that _contentions could
       
    99 // be set while inflating prior to setting _owner
       
   100 // Just use Atomic::inc/dec and assert 0 when monitor put on free list
       
   101 inline void ObjectMonitor::set_owner(void* owner) {
    98 inline void ObjectMonitor::set_owner(void* owner) {
   102   _owner = owner;
    99   _owner = owner;
   103   _recursions = 0;
       
   104 }
   100 }
   105 
   101 
   106 #endif // SHARE_RUNTIME_OBJECTMONITOR_INLINE_HPP
   102 #endif // SHARE_RUNTIME_OBJECTMONITOR_INLINE_HPP