final class sun.nio.ch.KQueuePort extends sun.nio.ch.Port
  minor version: 0
  major version: 59
  flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
  this_class: sun.nio.ch.KQueuePort
  super_class: sun.nio.ch.Port
{
  private static final int MAX_KEVENTS_TO_POLL;
    descriptor: I
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: 512

  private final int kqfd;
    descriptor: I
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private boolean closed;
    descriptor: Z
    flags: (0x0002) ACC_PRIVATE

  private final int[] sp;
    descriptor: [I
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.util.concurrent.atomic.AtomicInteger wakeupCount;
    descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final long address;
    descriptor: J
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final java.util.concurrent.ArrayBlockingQueue<sun.nio.ch.KQueuePort$Event> queue;
    descriptor: Ljava/util/concurrent/ArrayBlockingQueue;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    Signature: Ljava/util/concurrent/ArrayBlockingQueue<Lsun/nio/ch/KQueuePort$Event;>;

  private final sun.nio.ch.KQueuePort$Event NEED_TO_POLL;
    descriptor: Lsun/nio/ch/KQueuePort$Event;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  private final sun.nio.ch.KQueuePort$Event EXECUTE_TASK_OR_SHUTDOWN;
    descriptor: Lsun/nio/ch/KQueuePort$Event;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=0, locals=0, args_size=0
         0: .line 329
            invokestatic sun.nio.ch.IOUtil.load:()V
         1: .line 330
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  void <init>(java.nio.channels.spi.AsynchronousChannelProvider, sun.nio.ch.ThreadPool);
    descriptor: (Ljava/nio/channels/spi/AsynchronousChannelProvider;Lsun/nio/ch/ThreadPool;)V
    flags: (0x0000) 
    Code:
      stack=5, locals=5, args_size=3
        start local 0 // sun.nio.ch.KQueuePort this
        start local 1 // java.nio.channels.spi.AsynchronousChannelProvider provider
        start local 2 // sun.nio.ch.ThreadPool pool
         0: .line 83
            aload 0 /* this */
            aload 1 /* provider */
            aload 2 /* pool */
            invokespecial sun.nio.ch.Port.<init>:(Ljava/nio/channels/spi/AsynchronousChannelProvider;Lsun/nio/ch/ThreadPool;)V
         1: .line 55
            aload 0 /* this */
            new java.util.concurrent.atomic.AtomicInteger
            dup
            invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
            putfield sun.nio.ch.KQueuePort.wakeupCount:Ljava/util/concurrent/atomic/AtomicInteger;
         2: .line 77
            aload 0 /* this */
            new sun.nio.ch.KQueuePort$Event
            dup
            aconst_null
            iconst_0
            invokespecial sun.nio.ch.KQueuePort$Event.<init>:(Lsun/nio/ch/Port$PollableChannel;I)V
            putfield sun.nio.ch.KQueuePort.NEED_TO_POLL:Lsun/nio/ch/KQueuePort$Event;
         3: .line 78
            aload 0 /* this */
            new sun.nio.ch.KQueuePort$Event
            dup
            aconst_null
            iconst_0
            invokespecial sun.nio.ch.KQueuePort$Event.<init>:(Lsun/nio/ch/Port$PollableChannel;I)V
            putfield sun.nio.ch.KQueuePort.EXECUTE_TASK_OR_SHUTDOWN:Lsun/nio/ch/KQueuePort$Event;
         4: .line 86
            aload 0 /* this */
            invokestatic sun.nio.ch.KQueue.kqueue:()I
            putfield sun.nio.ch.KQueuePort.kqfd:I
         5: .line 89
            iconst_2
            newarray 10
            astore 3 /* sv */
        start local 3 // int[] sv
         6: .line 91
            aload 3 /* sv */
            invokestatic sun.nio.ch.KQueuePort.socketpair:([I)V
         7: .line 94
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.kqfd:I
            aload 3 /* sv */
            iconst_0
            iaload
            iconst_m1
            iconst_1
            invokestatic sun.nio.ch.KQueue.keventRegister:(IIII)I
            pop
         8: .line 95
            goto 12
      StackMap locals: sun.nio.ch.KQueuePort java.nio.channels.spi.AsynchronousChannelProvider sun.nio.ch.ThreadPool int[]
      StackMap stack: java.io.IOException
         9: astore 4 /* x */
        start local 4 // java.io.IOException x
        10: .line 96
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.kqfd:I
            invokestatic sun.nio.ch.KQueuePort.close0:(I)V
        11: .line 97
            aload 4 /* x */
            athrow
        end local 4 // java.io.IOException x
        12: .line 99
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            aload 3 /* sv */
            putfield sun.nio.ch.KQueuePort.sp:[I
        13: .line 102
            aload 0 /* this */
            sipush 512
            invokestatic sun.nio.ch.KQueue.allocatePollArray:(I)J
            putfield sun.nio.ch.KQueuePort.address:J
        14: .line 106
            aload 0 /* this */
            new java.util.concurrent.ArrayBlockingQueue
            dup
            sipush 512
            invokespecial java.util.concurrent.ArrayBlockingQueue.<init>:(I)V
            putfield sun.nio.ch.KQueuePort.queue:Ljava/util/concurrent/ArrayBlockingQueue;
        15: .line 107
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.queue:Ljava/util/concurrent/ArrayBlockingQueue;
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.NEED_TO_POLL:Lsun/nio/ch/KQueuePort$Event;
            invokevirtual java.util.concurrent.ArrayBlockingQueue.offer:(Ljava/lang/Object;)Z
            pop
        16: .line 108
            return
        end local 3 // int[] sv
        end local 2 // sun.nio.ch.ThreadPool pool
        end local 1 // java.nio.channels.spi.AsynchronousChannelProvider provider
        end local 0 // sun.nio.ch.KQueuePort this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   17     0      this  Lsun/nio/ch/KQueuePort;
            0   17     1  provider  Ljava/nio/channels/spi/AsynchronousChannelProvider;
            0   17     2      pool  Lsun/nio/ch/ThreadPool;
            6   17     3        sv  [I
           10   12     4         x  Ljava/io/IOException;
      Exception table:
        from    to  target  type
           6     8       9  Class java.io.IOException
    Exceptions:
      throws java.io.IOException
    MethodParameters:
          Name  Flags
      provider  
      pool      

  sun.nio.ch.KQueuePort start();
    descriptor: ()Lsun/nio/ch/KQueuePort;
    flags: (0x0000) 
    Code:
      stack=4, locals=1, args_size=1
        start local 0 // sun.nio.ch.KQueuePort this
         0: .line 111
            aload 0 /* this */
            new sun.nio.ch.KQueuePort$EventHandlerTask
            dup
            aload 0 /* this */
            invokespecial sun.nio.ch.KQueuePort$EventHandlerTask.<init>:(Lsun/nio/ch/KQueuePort;)V
            invokevirtual sun.nio.ch.KQueuePort.startThreads:(Ljava/lang/Runnable;)V
         1: .line 112
            aload 0 /* this */
            areturn
        end local 0 // sun.nio.ch.KQueuePort this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Lsun/nio/ch/KQueuePort;

  private void implClose();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=2, locals=2, args_size=1
        start local 0 // sun.nio.ch.KQueuePort this
         0: .line 119
            aload 0 /* this */
            dup
            astore 1
            monitorenter
         1: .line 120
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.closed:Z
            ifeq 4
         2: .line 121
            aload 1
            monitorexit
         3: return
         4: .line 122
      StackMap locals: sun.nio.ch.KQueuePort
      StackMap stack:
            aload 0 /* this */
            iconst_1
            putfield sun.nio.ch.KQueuePort.closed:Z
         5: .line 119
            aload 1
            monitorexit
         6: goto 9
      StackMap locals:
      StackMap stack: java.lang.Throwable
         7: aload 1
            monitorexit
         8: athrow
         9: .line 124
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.address:J
            invokestatic sun.nio.ch.KQueue.freePollArray:(J)V
        10: .line 125
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.sp:[I
            iconst_0
            iaload
            invokestatic sun.nio.ch.KQueuePort.close0:(I)V
        11: .line 126
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.sp:[I
            iconst_1
            iaload
            invokestatic sun.nio.ch.KQueuePort.close0:(I)V
        12: .line 127
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.kqfd:I
            invokestatic sun.nio.ch.KQueuePort.close0:(I)V
        13: .line 128
            return
        end local 0 // sun.nio.ch.KQueuePort this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   14     0  this  Lsun/nio/ch/KQueuePort;
      Exception table:
        from    to  target  type
           1     3       7  any
           4     6       7  any
           7     8       7  any

  private void wakeup();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=3, locals=2, args_size=1
        start local 0 // sun.nio.ch.KQueuePort this
         0: .line 131
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.wakeupCount:Ljava/util/concurrent/atomic/AtomicInteger;
            invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
            iconst_1
            if_icmpne 5
         1: .line 134
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.sp:[I
            iconst_1
            iaload
            invokestatic sun.nio.ch.KQueuePort.interrupt:(I)V
         2: .line 135
            goto 5
      StackMap locals:
      StackMap stack: java.io.IOException
         3: astore 1 /* x */
        start local 1 // java.io.IOException x
         4: .line 136
            new java.lang.AssertionError
            dup
            aload 1 /* x */
            invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
            athrow
        end local 1 // java.io.IOException x
         5: .line 139
      StackMap locals:
      StackMap stack:
            return
        end local 0 // sun.nio.ch.KQueuePort this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    6     0  this  Lsun/nio/ch/KQueuePort;
            4    5     1     x  Ljava/io/IOException;
      Exception table:
        from    to  target  type
           1     2       3  Class java.io.IOException

  void executeOnHandlerTask(java.lang.Runnable);
    descriptor: (Ljava/lang/Runnable;)V
    flags: (0x0000) 
    Code:
      stack=2, locals=3, args_size=2
        start local 0 // sun.nio.ch.KQueuePort this
        start local 1 // java.lang.Runnable task
         0: .line 143
            aload 0 /* this */
            dup
            astore 2
            monitorenter
         1: .line 144
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.closed:Z
            ifeq 3
         2: .line 145
            new java.util.concurrent.RejectedExecutionException
            dup
            invokespecial java.util.concurrent.RejectedExecutionException.<init>:()V
            athrow
         3: .line 146
      StackMap locals: sun.nio.ch.KQueuePort
      StackMap stack:
            aload 0 /* this */
            aload 1 /* task */
            invokevirtual sun.nio.ch.KQueuePort.offerTask:(Ljava/lang/Runnable;)V
         4: .line 147
            aload 0 /* this */
            invokevirtual sun.nio.ch.KQueuePort.wakeup:()V
         5: .line 143
            aload 2
            monitorexit
         6: goto 9
      StackMap locals:
      StackMap stack: java.lang.Throwable
         7: aload 2
            monitorexit
         8: athrow
         9: .line 149
      StackMap locals:
      StackMap stack:
            return
        end local 1 // java.lang.Runnable task
        end local 0 // sun.nio.ch.KQueuePort this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0   10     0  this  Lsun/nio/ch/KQueuePort;
            0   10     1  task  Ljava/lang/Runnable;
      Exception table:
        from    to  target  type
           1     6       7  any
           7     8       7  any
    MethodParameters:
      Name  Flags
      task  

  void shutdownHandlerTasks();
    descriptor: ()V
    flags: (0x0000) 
    Code:
      stack=1, locals=2, args_size=1
        start local 0 // sun.nio.ch.KQueuePort this
         0: .line 157
            aload 0 /* this */
            invokevirtual sun.nio.ch.KQueuePort.threadCount:()I
            istore 1 /* nThreads */
        start local 1 // int nThreads
         1: .line 158
            iload 1 /* nThreads */
            ifne 5
         2: .line 159
            aload 0 /* this */
            invokevirtual sun.nio.ch.KQueuePort.implClose:()V
         3: .line 160
            goto 6
         4: .line 163
      StackMap locals: int
      StackMap stack:
            aload 0 /* this */
            invokevirtual sun.nio.ch.KQueuePort.wakeup:()V
         5: .line 162
      StackMap locals:
      StackMap stack:
            iload 1 /* nThreads */
            iinc 1 /* nThreads */ -1
            ifgt 4
         6: .line 166
      StackMap locals:
      StackMap stack:
            return
        end local 1 // int nThreads
        end local 0 // sun.nio.ch.KQueuePort this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0    7     0      this  Lsun/nio/ch/KQueuePort;
            1    7     1  nThreads  I

  void startPoll(int, int);
    descriptor: (II)V
    flags: (0x0000) 
    Code:
      stack=5, locals=5, args_size=3
        start local 0 // sun.nio.ch.KQueuePort this
        start local 1 // int fd
        start local 2 // int events
         0: .line 173
            iconst_0
            istore 3 /* err */
        start local 3 // int err
         1: .line 174
            bipush 17
            istore 4 /* flags */
        start local 4 // int flags
         2: .line 175
            iload 2 /* events */
            getstatic sun.nio.ch.Net.POLLIN:S
            iand
            ifle 4
         3: .line 176
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.kqfd:I
            iload 1 /* fd */
            iconst_m1
            iload 4 /* flags */
            invokestatic sun.nio.ch.KQueue.keventRegister:(IIII)I
            istore 3 /* err */
         4: .line 177
      StackMap locals: int int
      StackMap stack:
            iload 3 /* err */
            ifne 6
            iload 2 /* events */
            getstatic sun.nio.ch.Net.POLLOUT:S
            iand
            ifle 6
         5: .line 178
            aload 0 /* this */
            getfield sun.nio.ch.KQueuePort.kqfd:I
            iload 1 /* fd */
            bipush -2
            iload 4 /* flags */
            invokestatic sun.nio.ch.KQueue.keventRegister:(IIII)I
            istore 3 /* err */
         6: .line 179
      StackMap locals:
      StackMap stack:
            iload 3 /* err */
            ifeq 8
         7: .line 180
            new java.lang.InternalError
            dup
            new java.lang.StringBuilder
            dup
            ldc "kevent failed: "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            iload 3 /* err */
            invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokespecial java.lang.InternalError.<init>:(Ljava/lang/String;)V
            athrow
         8: .line 181
      StackMap locals:
      StackMap stack:
            return
        end local 4 // int flags
        end local 3 // int err
        end local 2 // int events
        end local 1 // int fd
        end local 0 // sun.nio.ch.KQueuePort this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    9     0    this  Lsun/nio/ch/KQueuePort;
            0    9     1      fd  I
            0    9     2  events  I
            1    9     3     err  I
            2    9     4   flags  I
    MethodParameters:
        Name  Flags
      fd      
      events  

  private static native void socketpair(int[]);
    descriptor: ([I)V
    flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      sv    

  private static native void interrupt(int);
    descriptor: (I)V
    flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      fd    

  private static native void drain1(int);
    descriptor: (I)V
    flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
    Exceptions:
      throws java.io.IOException
    MethodParameters:
      Name  Flags
      fd    

  private static native void close0(int);
    descriptor: (I)V
    flags: (0x010a) ACC_PRIVATE, ACC_STATIC, ACC_NATIVE
    MethodParameters:
      Name  Flags
      fd    
}
SourceFile: "KQueuePort.java"
NestMembers:
  sun.nio.ch.KQueuePort$Event  sun.nio.ch.KQueuePort$EventHandlerTask
InnerClasses:
  Event = sun.nio.ch.KQueuePort$Event of sun.nio.ch.KQueuePort
  private EventHandlerTask = sun.nio.ch.KQueuePort$EventHandlerTask of sun.nio.ch.KQueuePort
  abstract PollableChannel = sun.nio.ch.Port$PollableChannel of sun.nio.ch.Port