92 return false; 93 } 94 } 95 return true; 96 } 97 98 99 // return number of threads contending for this monitor 100 inline intptr_t ObjectMonitor::contentions() const { 101 return _count; 102 } 103 104 // Do NOT set _count = 0. There is a race such that _count could 105 // be set while inflating prior to setting _owner 106 // Just use Atomic::inc/dec and assert 0 when monitor put on free list 107 inline void ObjectMonitor::set_owner(void* owner) { 108 _owner = owner; 109 _recursions = 0; 110 } 111 112 113 #endif // SHARE_VM_RUNTIME_OBJECTMONITOR_INLINE_HPP | 92 return false; 93 } 94 } 95 return true; 96 } 97 98 99 // return number of threads contending for this monitor 100 inline intptr_t ObjectMonitor::contentions() const { 101 return _count; 102 } 103 104 // Do NOT set _count = 0. There is a race such that _count could 105 // be set while inflating prior to setting _owner 106 // Just use Atomic::inc/dec and assert 0 when monitor put on free list 107 inline void ObjectMonitor::set_owner(void* owner) { 108 _owner = owner; 109 _recursions = 0; 110 } 111 112 inline void ObjectMonitor::enter(TRAPS) { 113 enter(0, THREAD); 114 } 115 116 inline void ObjectMonitor::exit(bool not_suspended, TRAPS) { 117 exit(NULL, 0, THREAD); 118 } 119 120 #endif // SHARE_VM_RUNTIME_OBJECTMONITOR_INLINE_HPP |