@@ -94,15 +94,15 @@ private static final class TidLock {
94
94
*/
95
95
private volatile boolean deadInterrupt ;
96
96
/*[ENDIF] JAVA_SPEC_VERSION >= 14 */
97
- private volatile boolean started ; // If !isAlive(), tells if Thread died already or hasn't even started
98
- private String name ; // The Thread's name
99
- private int priority = NORM_PRIORITY ; // The Thread's current priority
97
+ private volatile boolean started ; // If !isAlive(), tells if Thread died already or hasn't even started
98
+ private String name ; // The Thread's name
99
+ private int priority = NORM_PRIORITY ; // The Thread's current priority
100
100
private boolean isDaemon ; // Tells if the Thread is a daemon thread or not.
101
101
private volatile int threadStatus ; // The Thread's state.
102
102
103
- ThreadGroup group ; // A Thread belongs to exactly one ThreadGroup
103
+ ThreadGroup group ; // A Thread belongs to exactly one ThreadGroup
104
104
private Runnable runnable ; // Target (optional) runnable object
105
- private boolean stopCalled = false ; // Used by the VM
105
+ private boolean stopCalled = false ; // Used by the VM
106
106
/*[PR 1FENTZW]*/
107
107
private ClassLoader contextClassLoader ; // Used to find classes and resources in this Thread
108
108
ThreadLocal .ThreadLocalMap threadLocals ;
@@ -1492,32 +1492,33 @@ public static enum State {
1492
1492
/**
1493
1493
* Returns the translation from a J9VMThread state to a Thread::State.
1494
1494
*
1495
+ * @param status thread status value set by VM.
1495
1496
* @return this thread's state.
1496
1497
*
1497
1498
* @see State
1498
1499
*/
1499
1500
private State translateJ9VMThreadStateToThreadState (int status ) {
1500
1501
switch (status ) {
1501
- case 1 : // J9VMTHREAD_STATE_RUNNING
1502
- return State .RUNNABLE ;
1503
- case 2 : // J9VMTHREAD_STATE_BLOCKED
1504
- return State .BLOCKED ;
1505
- case 4 : // J9VMTHREAD_STATE_WAITING
1506
- case 0x80 : // J9VMTHREAD_STATE_PARKED
1507
- return State .WAITING ;
1508
- case 8 : // J9VMTHREAD_STATE_SLEEPING
1509
- case 64 : // J9VMTHREAD_STATE_WAITING_TIMED
1510
- case 0x100 : // J9VMTHREAD_STATE_PARKED_TIMED
1511
- return State .TIMED_WAITING ;
1512
- case 32 : // J9VMTHREAD_STATE_DEAD
1513
- return State .TERMINATED ;
1514
- default :
1515
- synchronized (lock ) {
1516
- if (threadRef == NO_REF ) {
1517
- return State .TERMINATED ;
1518
- }
1519
- return State .values ()[getStateImpl (threadRef )];
1502
+ case 1 : // J9VMTHREAD_STATE_RUNNING
1503
+ return State .RUNNABLE ;
1504
+ case 2 : // J9VMTHREAD_STATE_BLOCKED
1505
+ return State .BLOCKED ;
1506
+ case 4 : // J9VMTHREAD_STATE_WAITING
1507
+ case 0x80 : // J9VMTHREAD_STATE_PARKED
1508
+ return State .WAITING ;
1509
+ case 8 : // J9VMTHREAD_STATE_SLEEPING
1510
+ case 64 : // J9VMTHREAD_STATE_WAITING_TIMED
1511
+ case 0x100 : // J9VMTHREAD_STATE_PARKED_TIMED
1512
+ return State .TIMED_WAITING ;
1513
+ case 32 : // J9VMTHREAD_STATE_DEAD
1514
+ return State .TERMINATED ;
1515
+ default :
1516
+ synchronized (lock ) {
1517
+ if (threadRef == NO_REF ) {
1518
+ return State .TERMINATED ;
1520
1519
}
1520
+ return State .values ()[getStateImpl (threadRef )];
1521
+ }
1521
1522
}
1522
1523
}
1523
1524
0 commit comments