Ejemplo n.º 1
0
 static int select(int[] read, int[] write, int[] except, long timeout) throws IOException {
   /* not implemented correctly for files and pipes */
   return VMAccessorGnuJavaNet.socketSelectVMPlainSocketImpl(
       read,
       write,
       except,
       timeout > 0L ? (timeout < (long) (-1 >>> 1) ? (int) timeout : -1 >>> 1) : -1);
 }
Ejemplo n.º 2
0
 private static void initialize() {
   if (!initialized) {
     VMAccessorGnuJavaNet.socketsInitVMPlainSocketImpl();
     if (getHostNeedsSync0() != 0) {
       Object obj = new Object();
       if (getHostLock == null) getHostLock = obj;
     }
     initialized = true;
   }
 }