< prev index next >
src/share/vm/runtime/objectMonitor.cpp
Print this page
@@ -305,10 +305,12 @@
EventJavaMonitorEnter event;
{ // Change java thread status to indicate blocked on monitor enter.
JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this);
+ Self->set_current_pending_monitor(this);
+
DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt);
if (JvmtiExport::should_post_monitor_contended_enter()) {
JvmtiExport::post_monitor_contended_enter(jt, this);
// The current thread does not yet own the monitor and does not
@@ -319,12 +321,10 @@
}
OSThreadContendState osts(Self->osthread());
ThreadBlockInVM tbivm(jt);
- Self->set_current_pending_monitor(this);
-
// TODO-FIXME: change the following for(;;) loop to straight-line code.
for (;;) {
jt->set_suspend_equivalent();
// cleared by handle_special_suspend_equivalent_condition()
// or java_suspend_self()
< prev index next >