jdk/src/java.base/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java
changeset 37593 824750ada3d6
parent 36966 4209c9e19c45
child 37781 71ed5645f17c
equal deleted inserted replaced
37592:c80f098887f4 37593:824750ada3d6
    30  */
    30  */
    31 
    31 
    32 package sun.nio.ch;
    32 package sun.nio.ch;
    33 
    33 
    34 import java.io.IOException;
    34 import java.io.IOException;
    35 import java.io.FileDescriptor;
       
    36 import java.util.Iterator;
    35 import java.util.Iterator;
    37 import java.util.LinkedList;
    36 import java.util.LinkedList;
       
    37 import sun.security.action.GetPropertyAction;
    38 
    38 
    39 /*
    39 /*
    40  * struct kevent {           // 32-bit    64-bit
    40  * struct kevent {           // 32-bit    64-bit
    41  *     uintptr_t ident;      //   4         8
    41  *     uintptr_t ident;      //   4         8
    42  *     short     filter;     //   2         2
    42  *     short     filter;     //   2         2
    82     private int incomingInterruptFD;
    82     private int incomingInterruptFD;
    83 
    83 
    84     static {
    84     static {
    85         IOUtil.load();
    85         IOUtil.load();
    86         initStructSizes();
    86         initStructSizes();
    87         String datamodel = java.security.AccessController.doPrivileged(
    87         String datamodel = GetPropertyAction.getProperty("sun.arch.data.model");
    88             new sun.security.action.GetPropertyAction("sun.arch.data.model")
    88         is64bit = "64".equals(datamodel);
    89         );
       
    90         is64bit = datamodel.equals("64");
       
    91     }
    89     }
    92 
    90 
    93     KQueueArrayWrapper() {
    91     KQueueArrayWrapper() {
    94         int allocationSize = SIZEOF_KEVENT * NUM_KEVENTS;
    92         int allocationSize = SIZEOF_KEVENT * NUM_KEVENTS;
    95         keventArray = new AllocatedNativeObject(allocationSize, true);
    93         keventArray = new AllocatedNativeObject(allocationSize, true);