< prev index next >

src/java.base/share/classes/java/lang/Thread.java

Print this page
rev 51958 : 8211122: Reduce the number of internal classes made accessible to jdk.unsupported
Reviewed-by: alanb, dfuchs, kvn


 212     /*
 213      * Java thread status for tools, default indicates thread 'not yet started'
 214      */
 215     private volatile int threadStatus;
 216 
 217     /**
 218      * The argument supplied to the current call to
 219      * java.util.concurrent.locks.LockSupport.park.
 220      * Set by (private) java.util.concurrent.locks.LockSupport.setBlocker
 221      * Accessed using java.util.concurrent.locks.LockSupport.getBlocker
 222      */
 223     volatile Object parkBlocker;
 224 
 225     /* The object in which this thread is blocked in an interruptible I/O
 226      * operation, if any.  The blocker's interrupt method should be invoked
 227      * after setting this thread's interrupt status.
 228      */
 229     private volatile Interruptible blocker;
 230     private final Object blockerLock = new Object();
 231 
 232     /* Set the blocker field; invoked via jdk.internal.misc.SharedSecrets
 233      * from java.nio code
 234      */
 235     static void blockedOn(Interruptible b) {
 236         Thread me = Thread.currentThread();
 237         synchronized (me.blockerLock) {
 238             me.blocker = b;
 239         }
 240     }
 241 
 242     /**
 243      * The minimum priority that a thread can have.
 244      */
 245     public static final int MIN_PRIORITY = 1;
 246 
 247    /**
 248      * The default priority that is assigned to a thread.
 249      */
 250     public static final int NORM_PRIORITY = 5;
 251 
 252     /**




 212     /*
 213      * Java thread status for tools, default indicates thread 'not yet started'
 214      */
 215     private volatile int threadStatus;
 216 
 217     /**
 218      * The argument supplied to the current call to
 219      * java.util.concurrent.locks.LockSupport.park.
 220      * Set by (private) java.util.concurrent.locks.LockSupport.setBlocker
 221      * Accessed using java.util.concurrent.locks.LockSupport.getBlocker
 222      */
 223     volatile Object parkBlocker;
 224 
 225     /* The object in which this thread is blocked in an interruptible I/O
 226      * operation, if any.  The blocker's interrupt method should be invoked
 227      * after setting this thread's interrupt status.
 228      */
 229     private volatile Interruptible blocker;
 230     private final Object blockerLock = new Object();
 231 
 232     /* Set the blocker field; invoked via jdk.internal.access.SharedSecrets
 233      * from java.nio code
 234      */
 235     static void blockedOn(Interruptible b) {
 236         Thread me = Thread.currentThread();
 237         synchronized (me.blockerLock) {
 238             me.blocker = b;
 239         }
 240     }
 241 
 242     /**
 243      * The minimum priority that a thread can have.
 244      */
 245     public static final int MIN_PRIORITY = 1;
 246 
 247    /**
 248      * The default priority that is assigned to a thread.
 249      */
 250     public static final int NORM_PRIORITY = 5;
 251 
 252     /**


< prev index next >