From 3a6b798cf463540e23c61ecb50b78560ff906bce Mon Sep 17 00:00:00 2001 From: Anton Artemov Date: Mon, 27 Oct 2025 11:18:15 +0100 Subject: [PATCH] 8366659: Fixed new lines. --- src/hotspot/share/runtime/objectMonitor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/runtime/objectMonitor.cpp b/src/hotspot/share/runtime/objectMonitor.cpp index ef114b6f12e..dd43a4c1318 100644 --- a/src/hotspot/share/runtime/objectMonitor.cpp +++ b/src/hotspot/share/runtime/objectMonitor.cpp @@ -1856,7 +1856,9 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { { // State transition wrappers OSThread* osthread = current->osthread(); OSThreadWaitState osts(osthread, true); + assert(current->thread_state() == _thread_in_vm, "invariant"); + { ThreadBlockInVM tbivm(current, false /* allow_suspend */); if (interrupted || HAS_PENDING_EXCEPTION) { @@ -1910,8 +1912,6 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { // although the raw address of the object may have changed. // (Don't cache naked oops over safepoints, of course). - - OrderAccess::fence(); assert(!has_owner(current), "invariant"); @@ -1970,6 +1970,7 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { current->_ParkEvent->unpark(); } } + if (wait_event.should_commit()) { post_monitor_wait_event(&wait_event, this, node._notifier_tid, millis, ret == OS_TIMEOUT); }