< prev index next >

src/hotspot/share/prims/jvmtiRawMonitor.cpp

Print this page

        

*** 119,129 **** // // ------------------------------------------------------------------------- void JvmtiRawMonitor::simple_enter(Thread* self) { for (;;) { ! if (Atomic::replace_if_null(self, &_owner)) { return; } QNode node(self); self->_ParkEvent->reset(); // strictly optional --- 119,129 ---- // // ------------------------------------------------------------------------- void JvmtiRawMonitor::simple_enter(Thread* self) { for (;;) { ! if (Atomic::replace_if_null(&_owner, self)) { return; } QNode node(self); self->_ParkEvent->reset(); // strictly optional
*** 131,141 **** RawMonitor_lock->lock_without_safepoint_check(); node._next = _entry_list; _entry_list = &node; OrderAccess::fence(); ! if (_owner == NULL && Atomic::replace_if_null(self, &_owner)) { _entry_list = node._next; RawMonitor_lock->unlock(); return; } RawMonitor_lock->unlock(); --- 131,141 ---- RawMonitor_lock->lock_without_safepoint_check(); node._next = _entry_list; _entry_list = &node; OrderAccess::fence(); ! if (_owner == NULL && Atomic::replace_if_null(&_owner, self)) { _entry_list = node._next; RawMonitor_lock->unlock(); return; } RawMonitor_lock->unlock();
*** 320,333 **** jt->SR_lock()->unlock(); jt->java_suspend_self(); jt->SR_lock()->lock_without_safepoint_check(); } // guarded by SR_lock to avoid racing with new external suspend requests. ! contended = Atomic::cmpxchg(jt, &_owner, (Thread*)NULL); jt->SR_lock()->unlock(); } else { ! contended = Atomic::cmpxchg(self, &_owner, (Thread*)NULL); } if (contended == self) { _recursions++; return; --- 320,333 ---- jt->SR_lock()->unlock(); jt->java_suspend_self(); jt->SR_lock()->lock_without_safepoint_check(); } // guarded by SR_lock to avoid racing with new external suspend requests. ! contended = Atomic::cmpxchg(&_owner, (Thread*)NULL, jt); jt->SR_lock()->unlock(); } else { ! contended = Atomic::cmpxchg(&_owner, (Thread*)NULL, self); } if (contended == self) { _recursions++; return;
< prev index next >