< prev index next >

src/hotspot/share/classfile/javaClasses.cpp

Print this page
*** 1984,28 ***
    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 :
        status = JavaThreadStatus::NEW;
        break;
!     case STARTED :
!     case RUNNABLE :
!     case RUNNABLE_SUSPENDED :
!     case RUNNING :
!     case PARKING :
!     case YIELDING :
        status = JavaThreadStatus::RUNNABLE;
        break;
!     case PARKED :
!     case PARKED_SUSPENDED :
-     case PINNED :
        status = JavaThreadStatus::PARKED;
        break;
!     case TERMINATED :
        status = JavaThreadStatus::TERMINATED;
        break;
      default:
        ShouldNotReachHere();
    }
--- 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 & ~SUSPENDED) {
!     case NEW:
        status = JavaThreadStatus::NEW;
        break;
!     case STARTED:
!     case RUNNING:
!     case PARKING:
!     case TIMED_PARKING:
!     case UNPARKED:
!     case YIELDING:
+     case YIELDED:
        status = JavaThreadStatus::RUNNABLE;
        break;
!     case PARKED:
!     case PINNED:
        status = JavaThreadStatus::PARKED;
        break;
!     case TIMED_PARKED:
+     case TIMED_PINNED:
+       status = JavaThreadStatus::PARKED_TIMED;
+       break;
+     case TERMINATED:
        status = JavaThreadStatus::TERMINATED;
        break;
      default:
        ShouldNotReachHere();
    }
< prev index next >