< prev index next >

src/hotspot/share/classfile/javaClasses.cpp

Print this page
@@ -1984,28 +1984,32 @@
    return vthread->int_field_acquire(_state_offset);
  }
  
  JavaThreadStatus java_lang_VirtualThread::map_state_to_thread_status(int state) {
    JavaThreadStatus status = JavaThreadStatus::NEW;
-   switch (state) {
-     case NEW :
+   switch (state & ~SUSPENDED) {
+     case NEW:
        status = JavaThreadStatus::NEW;
        break;
-     case STARTED :
-     case RUNNABLE :
-     case RUNNABLE_SUSPENDED :
-     case RUNNING :
-     case PARKING :
-     case YIELDING :
+     case STARTED:
+     case RUNNING:
+     case PARKING:
+     case TIMED_PARKING:
+     case UNPARKED:
+     case YIELDING:
+     case YIELDED:
        status = JavaThreadStatus::RUNNABLE;
        break;
-     case PARKED :
-     case PARKED_SUSPENDED :
-     case PINNED :
+     case PARKED:
+     case PINNED:
        status = JavaThreadStatus::PARKED;
        break;
-     case TERMINATED :
+     case TIMED_PARKED:
+     case TIMED_PINNED:
+       status = JavaThreadStatus::PARKED_TIMED;
+       break;
+     case TERMINATED:
        status = JavaThreadStatus::TERMINATED;
        break;
      default:
        ShouldNotReachHere();
    }
< prev index next >