Skip to content

Commit

Permalink
review: add some useful comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sspitsyn committed Jan 16, 2025
1 parent 6d37bc6 commit b1912ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/hotspot/share/runtime/objectMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,7 @@ void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
return;
}
}
// The jtiows does nothing for non-interruptible.
JavaThreadInObjectWaitState jtiows(current, millis != 0, interruptible);

// create a node to be put into the queue
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/services/threadService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ class JavaThreadInObjectWaitState : public JavaThreadStatusChanger {
JavaThreadStatusChanger(java_thread,
interruptible ? (timed ? JavaThreadStatus::IN_OBJECT_WAIT_TIMED : JavaThreadStatus::IN_OBJECT_WAIT)
: java_lang_Thread::get_thread_status(java_thread->threadObj())) {
if (is_alive() && interruptible) {
if (is_alive() && interruptible) { // non-interruptible is not active
_stat = java_thread->get_thread_stat();
_active = ThreadService::is_thread_monitoring_contention();
_stat->monitor_wait();
Expand Down

0 comments on commit b1912ef

Please sign in to comment.