@@ -407,7 +407,7 @@ bool ObjectMonitor::enter(JavaThread* current) {
407
407
add_to_contentions (-1 );
408
408
DEBUG_ONLY (int state = java_lang_VirtualThread::state (current->vthread ()));
409
409
assert ((owner () == current && current->is_preemption_cancelled () && state == java_lang_VirtualThread::RUNNING) ||
410
- (owner () != current && !current->is_preemption_cancelled () && (state == java_lang_VirtualThread::PARKING || state == java_lang_VirtualThread::YIELDING)), " invariant" );
410
+ (owner () != current && !current->is_preemption_cancelled () && (state == java_lang_VirtualThread::BLOCKING || state == java_lang_VirtualThread::YIELDING)), " invariant" );
411
411
return true ;
412
412
}
413
413
}
@@ -992,7 +992,7 @@ bool ObjectMonitor::HandlePreemptedVThread(JavaThread* current, ContinuationEntr
992
992
993
993
oop vthread = current->vthread ();
994
994
assert (java_lang_VirtualThread::state (vthread) == java_lang_VirtualThread::RUNNING, " wrong state for vthread" );
995
- java_lang_VirtualThread::set_state (vthread, java_lang_VirtualThread::PARKING );
995
+ java_lang_VirtualThread::set_state (vthread, java_lang_VirtualThread::BLOCKING );
996
996
997
997
ObjectWaiter* node = new ObjectWaiter (vthread);
998
998
node->_prev = (ObjectWaiter*) 0xBAD ;
@@ -1036,7 +1036,7 @@ bool ObjectMonitor::HandlePreemptedVThread(JavaThread* current, ContinuationEntr
1036
1036
// having that check happening before we added the node to _cxq and the release
1037
1037
// of the monitor happening after the last TryLock attempt we need to do something
1038
1038
// to avoid stranding. We set the _Responsible field which platform threads results
1039
- // in a timed-wait. For vthreads we will set the state to YIELDING instead of PARKING
1039
+ // in a timed-wait. For vthreads we will set the state to YIELDING instead of BLOCKING
1040
1040
// so that the vthread is just added again into the scheduler queue.
1041
1041
Atomic::replace_if_null (&_Responsible, (JavaThread*)java_lang_Thread::thread_id (vthread));
1042
1042
java_lang_VirtualThread::set_state (vthread, java_lang_VirtualThread::YIELDING);
@@ -1153,7 +1153,7 @@ void ObjectMonitor::redo_enter(JavaThread* current) {
1153
1153
1154
1154
assert (java_lang_VirtualThread::state (vthread) == java_lang_VirtualThread::RUNNING, " wrong state for vthread" );
1155
1155
bool should_yield = _Responsible == (JavaThread*)java_lang_Thread::thread_id (vthread);
1156
- java_lang_VirtualThread::set_state (vthread, should_yield ? java_lang_VirtualThread::YIELDING : java_lang_VirtualThread::PARKING );
1156
+ java_lang_VirtualThread::set_state (vthread, should_yield ? java_lang_VirtualThread::YIELDING : java_lang_VirtualThread::BLOCKING );
1157
1157
}
1158
1158
1159
1159
void ObjectMonitor::VThreadEpilog (JavaThread* current) {
0 commit comments