src/java.base/unix/classes/sun/nio/ch/NativeThread.java
branchunixdomainchannels
changeset 58856 b2f0339a4cad
parent 58848 c3df0f8b6d93
equal deleted inserted replaced
58848:c3df0f8b6d93 58856:b2f0339a4cad
    35 // that can be used to release a native thread from a blocking I/O operation.
    35 // that can be used to release a native thread from a blocking I/O operation.
    36 // On systems that do not require this type of signalling, the current() method
    36 // On systems that do not require this type of signalling, the current() method
    37 // always returns -1 and the signal(long) method has no effect.
    37 // always returns -1 and the signal(long) method has no effect.
    38 
    38 
    39 
    39 
    40 class NativeThread {
    40 public class NativeThread {
    41 
    41 
    42     // Returns an opaque token representing the native thread underlying the
    42     // Returns an opaque token representing the native thread underlying the
    43     // invoking Java thread.  On systems that do not require signalling, this
    43     // invoking Java thread.  On systems that do not require signalling, this
    44     // method always returns -1.
    44     // method always returns -1.
    45     //
    45     //
    46     static native long current();
    46     public static native long current();
    47 
    47 
    48     // Signals the given native thread so as to release it from a blocking I/O
    48     // Signals the given native thread so as to release it from a blocking I/O
    49     // operation.  On systems that do not require signalling, this method has
    49     // operation.  On systems that do not require signalling, this method has
    50     // no effect.
    50     // no effect.
    51     //
    51     //
    52     static native void signal(long nt);
    52     public static native void signal(long nt);
    53 
    53 
    54     private static native void init();
    54     private static native void init();
    55 
    55 
    56     static {
    56     static {
    57         IOUtil.load();
    57         IOUtil.load();