Remove unused files from sun.nio.ch package

ojluni/src/main/java/sun/nio/ch/EPollArrayWrapper.java
ojluni/src/main/java/sun/nio/ch/EPollSelectorImpl.java
ojluni/src/main/java/sun/nio/ch/EPollSelectorProvider.java
ojluni/src/main/java/sun/nio/ch/KQueue.java
ojluni/src/main/java/sun/nio/ch/KQueuePort.java
ojluni/src/main/java/sun/nio/ch/Reflect.java

Test: make successful
Change-Id: Ib350167f24c302ec027c15e68616bebe1e3e52a6
diff --git a/ojluni/src/main/java/sun/nio/ch/EPollArrayWrapper.java b/ojluni/src/main/java/sun/nio/ch/EPollArrayWrapper.java
deleted file mode 100644
index 5146ad8..0000000
--- a/ojluni/src/main/java/sun/nio/ch/EPollArrayWrapper.java
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.security.AccessController;
-import java.util.BitSet;
-import java.util.HashMap;
-import java.util.Map;
-import sun.security.action.GetIntegerAction;
-
-/**
- * Manipulates a native array of epoll_event structs on Linux:
- *
- * typedef union epoll_data {
- *     void *ptr;
- *     int fd;
- *     __uint32_t u32;
- *     __uint64_t u64;
- *  } epoll_data_t;
- *
- * struct epoll_event {
- *     __uint32_t events;
- *     epoll_data_t data;
- * };
- *
- * The system call to wait for I/O events is epoll_wait(2). It populates an
- * array of epoll_event structures that are passed to the call. The data
- * member of the epoll_event structure contains the same data as was set
- * when the file descriptor was registered to epoll via epoll_ctl(2). In
- * this implementation we set data.fd to be the file descriptor that we
- * register. That way, we have the file descriptor available when we
- * process the events.
- */
-
-class EPollArrayWrapper {
-    // EPOLL_EVENTS
-    private static final int EPOLLIN      = 0x001;
-
-    // opcodes
-    private static final int EPOLL_CTL_ADD      = 1;
-    private static final int EPOLL_CTL_DEL      = 2;
-    private static final int EPOLL_CTL_MOD      = 3;
-
-    // Miscellaneous constants
-    private static final int SIZE_EPOLLEVENT  = sizeofEPollEvent();
-    private static final int EVENT_OFFSET     = 0;
-    private static final int DATA_OFFSET      = offsetofData();
-    private static final int FD_OFFSET        = DATA_OFFSET;
-    private static final int OPEN_MAX         = IOUtil.fdLimit();
-    private static final int NUM_EPOLLEVENTS  = Math.min(OPEN_MAX, 8192);
-
-    // Special value to indicate that an update should be ignored
-    private static final byte  KILLED = (byte)-1;
-
-    // Initial size of arrays for fd registration changes
-    private static final int INITIAL_PENDING_UPDATE_SIZE = 64;
-
-    // maximum size of updatesLow
-    private static final int MAX_UPDATE_ARRAY_SIZE = AccessController.doPrivileged(
-        new GetIntegerAction("sun.nio.ch.maxUpdateArraySize", Math.min(OPEN_MAX, 64*1024)));
-
-    // The fd of the epoll driver
-    private final int epfd;
-
-     // The epoll_event array for results from epoll_wait
-    private final AllocatedNativeObject pollArray;
-
-    // Base address of the epoll_event array
-    private final long pollArrayAddress;
-
-    // The fd of the interrupt line going out
-    private int outgoingInterruptFD;
-
-    // The fd of the interrupt line coming in
-    private int incomingInterruptFD;
-
-    // The index of the interrupt FD
-    private int interruptedIndex;
-
-    // Number of updated pollfd entries
-    int updated;
-
-    // object to synchronize fd registration changes
-    private final Object updateLock = new Object();
-
-    // number of file descriptors with registration changes pending
-    private int updateCount;
-
-    // file descriptors with registration changes pending
-    private int[] updateDescriptors = new int[INITIAL_PENDING_UPDATE_SIZE];
-
-    // events for file descriptors with registration changes pending, indexed
-    // by file descriptor and stored as bytes for efficiency reasons. For
-    // file descriptors higher than MAX_UPDATE_ARRAY_SIZE (unlimited case at
-    // least) then the update is stored in a map.
-    private final byte[] eventsLow = new byte[MAX_UPDATE_ARRAY_SIZE];
-    private Map<Integer,Byte> eventsHigh;
-
-    // Used by release and updateRegistrations to track whether a file
-    // descriptor is registered with epoll.
-    private final BitSet registered = new BitSet();
-
-
-    EPollArrayWrapper() throws IOException {
-        // creates the epoll file descriptor
-        epfd = epollCreate();
-
-        // the epoll_event array passed to epoll_wait
-        int allocationSize = NUM_EPOLLEVENTS * SIZE_EPOLLEVENT;
-        pollArray = new AllocatedNativeObject(allocationSize, true);
-        pollArrayAddress = pollArray.address();
-
-        // eventHigh needed when using file descriptors > 64k
-        if (OPEN_MAX > MAX_UPDATE_ARRAY_SIZE)
-            eventsHigh = new HashMap<>();
-    }
-
-    void initInterrupt(int fd0, int fd1) {
-        outgoingInterruptFD = fd1;
-        incomingInterruptFD = fd0;
-        epollCtl(epfd, EPOLL_CTL_ADD, fd0, EPOLLIN);
-    }
-
-    void putEventOps(int i, int event) {
-        int offset = SIZE_EPOLLEVENT * i + EVENT_OFFSET;
-        pollArray.putInt(offset, event);
-    }
-
-    void putDescriptor(int i, int fd) {
-        int offset = SIZE_EPOLLEVENT * i + FD_OFFSET;
-        pollArray.putInt(offset, fd);
-    }
-
-    int getEventOps(int i) {
-        int offset = SIZE_EPOLLEVENT * i + EVENT_OFFSET;
-        return pollArray.getInt(offset);
-    }
-
-    int getDescriptor(int i) {
-        int offset = SIZE_EPOLLEVENT * i + FD_OFFSET;
-        return pollArray.getInt(offset);
-    }
-
-    /**
-     * Returns {@code true} if updates for the given key (file
-     * descriptor) are killed.
-     */
-    private boolean isEventsHighKilled(Integer key) {
-        assert key >= MAX_UPDATE_ARRAY_SIZE;
-        Byte value = eventsHigh.get(key);
-        return (value != null && value == KILLED);
-    }
-
-    /**
-     * Sets the pending update events for the given file descriptor. This
-     * method has no effect if the update events is already set to KILLED,
-     * unless {@code force} is {@code true}.
-     */
-    private void setUpdateEvents(int fd, byte events, boolean force) {
-        if (fd < MAX_UPDATE_ARRAY_SIZE) {
-            if ((eventsLow[fd] != KILLED) || force) {
-                eventsLow[fd] = events;
-            }
-        } else {
-            Integer key = Integer.valueOf(fd);
-            if (!isEventsHighKilled(key) || force) {
-                eventsHigh.put(key, Byte.valueOf(events));
-            }
-        }
-    }
-
-    /**
-     * Returns the pending update events for the given file descriptor.
-     */
-    private byte getUpdateEvents(int fd) {
-        if (fd < MAX_UPDATE_ARRAY_SIZE) {
-            return eventsLow[fd];
-        } else {
-            Byte result = eventsHigh.get(Integer.valueOf(fd));
-            // result should never be null
-            return result.byteValue();
-        }
-    }
-
-    /**
-     * Update the events for a given file descriptor
-     */
-    void setInterest(int fd, int mask) {
-        synchronized (updateLock) {
-            // record the file descriptor and events
-            int oldCapacity = updateDescriptors.length;
-            if (updateCount == oldCapacity) {
-                int newCapacity = oldCapacity + INITIAL_PENDING_UPDATE_SIZE;
-                int[] newDescriptors = new int[newCapacity];
-                System.arraycopy(updateDescriptors, 0, newDescriptors, 0, oldCapacity);
-                updateDescriptors = newDescriptors;
-            }
-            updateDescriptors[updateCount++] = fd;
-
-            // events are stored as bytes for efficiency reasons
-            byte b = (byte)mask;
-            assert (b == mask) && (b != KILLED);
-            setUpdateEvents(fd, b, false);
-        }
-    }
-
-    /**
-     * Add a file descriptor
-     */
-    void add(int fd) {
-        // force the initial update events to 0 as it may be KILLED by a
-        // previous registration.
-        synchronized (updateLock) {
-            assert !registered.get(fd);
-            setUpdateEvents(fd, (byte)0, true);
-        }
-    }
-
-    /**
-     * Remove a file descriptor
-     */
-    void remove(int fd) {
-        synchronized (updateLock) {
-            // kill pending and future update for this file descriptor
-            setUpdateEvents(fd, KILLED, false);
-
-            // remove from epoll
-            if (registered.get(fd)) {
-                epollCtl(epfd, EPOLL_CTL_DEL, fd, 0);
-                registered.clear(fd);
-            }
-        }
-    }
-
-    /**
-     * Close epoll file descriptor and free poll array
-     */
-    void closeEPollFD() throws IOException {
-        FileDispatcherImpl.closeIntFD(epfd);
-        pollArray.free();
-    }
-
-    int poll(long timeout) throws IOException {
-        updateRegistrations();
-        updated = epollWait(pollArrayAddress, NUM_EPOLLEVENTS, timeout, epfd);
-        for (int i=0; i<updated; i++) {
-            if (getDescriptor(i) == incomingInterruptFD) {
-                interruptedIndex = i;
-                interrupted = true;
-                break;
-            }
-        }
-        return updated;
-    }
-
-    /**
-     * Update the pending registrations.
-     */
-    private void updateRegistrations() {
-        synchronized (updateLock) {
-            int j = 0;
-            while (j < updateCount) {
-                int fd = updateDescriptors[j];
-                short events = getUpdateEvents(fd);
-                boolean isRegistered = registered.get(fd);
-                int opcode = 0;
-
-                if (events != KILLED) {
-                    if (isRegistered) {
-                        opcode = (events != 0) ? EPOLL_CTL_MOD : EPOLL_CTL_DEL;
-                    } else {
-                        opcode = (events != 0) ? EPOLL_CTL_ADD : 0;
-                    }
-                    if (opcode != 0) {
-                        epollCtl(epfd, opcode, fd, events);
-                        if (opcode == EPOLL_CTL_ADD) {
-                            registered.set(fd);
-                        } else if (opcode == EPOLL_CTL_DEL) {
-                            registered.clear(fd);
-                        }
-                    }
-                }
-                j++;
-            }
-            updateCount = 0;
-        }
-    }
-
-    // interrupt support
-    private boolean interrupted = false;
-
-    public void interrupt() {
-        interrupt(outgoingInterruptFD);
-    }
-
-    public int interruptedIndex() {
-        return interruptedIndex;
-    }
-
-    boolean interrupted() {
-        return interrupted;
-    }
-
-    void clearInterrupted() {
-        interrupted = false;
-    }
-
-    private native int epollCreate();
-    private native void epollCtl(int epfd, int opcode, int fd, int events);
-    private native int epollWait(long pollAddress, int numfds, long timeout,
-                                 int epfd) throws IOException;
-    private static native int sizeofEPollEvent();
-    private static native int offsetofData();
-    private static native void interrupt(int fd);
-}
diff --git a/ojluni/src/main/java/sun/nio/ch/EPollSelectorImpl.java b/ojluni/src/main/java/sun/nio/ch/EPollSelectorImpl.java
deleted file mode 100644
index b306dc3..0000000
--- a/ojluni/src/main/java/sun/nio/ch/EPollSelectorImpl.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-import java.util.*;
-import sun.misc.*;
-
-/**
- * An implementation of Selector for Linux 2.6+ kernels that uses
- * the epoll event notification facility.
- */
-class EPollSelectorImpl
-    extends SelectorImpl
-{
-
-    // File descriptors used for interrupt
-    protected int fd0;
-    protected int fd1;
-
-    // The poll object
-    EPollArrayWrapper pollWrapper;
-
-    // Maps from file descriptors to keys
-    private Map<Integer,SelectionKeyImpl> fdToKey;
-
-    // True if this Selector has been closed
-    private volatile boolean closed = false;
-
-    // Lock for interrupt triggering and clearing
-    private final Object interruptLock = new Object();
-    private boolean interruptTriggered = false;
-
-    /**
-     * Package private constructor called by factory method in
-     * the abstract superclass Selector.
-     */
-    EPollSelectorImpl(SelectorProvider sp) throws IOException {
-        super(sp);
-        long pipeFds = IOUtil.makePipe(false);
-        fd0 = (int) (pipeFds >>> 32);
-        fd1 = (int) pipeFds;
-        pollWrapper = new EPollArrayWrapper();
-        pollWrapper.initInterrupt(fd0, fd1);
-        fdToKey = new HashMap<>();
-    }
-
-    protected int doSelect(long timeout) throws IOException {
-        if (closed)
-            throw new ClosedSelectorException();
-        processDeregisterQueue();
-        try {
-            begin();
-            pollWrapper.poll(timeout);
-        } finally {
-            end();
-        }
-        processDeregisterQueue();
-        int numKeysUpdated = updateSelectedKeys();
-        if (pollWrapper.interrupted()) {
-            // Clear the wakeup pipe
-            pollWrapper.putEventOps(pollWrapper.interruptedIndex(), 0);
-            synchronized (interruptLock) {
-                pollWrapper.clearInterrupted();
-                IOUtil.drain(fd0);
-                interruptTriggered = false;
-            }
-        }
-        return numKeysUpdated;
-    }
-
-    /**
-     * Update the keys whose fd's have been selected by the epoll.
-     * Add the ready keys to the ready queue.
-     */
-    private int updateSelectedKeys() {
-        int entries = pollWrapper.updated;
-        int numKeysUpdated = 0;
-        for (int i=0; i<entries; i++) {
-            int nextFD = pollWrapper.getDescriptor(i);
-            SelectionKeyImpl ski = fdToKey.get(Integer.valueOf(nextFD));
-            // ski is null in the case of an interrupt
-            if (ski != null) {
-                int rOps = pollWrapper.getEventOps(i);
-                if (selectedKeys.contains(ski)) {
-                    if (ski.channel.translateAndSetReadyOps(rOps, ski)) {
-                        numKeysUpdated++;
-                    }
-                } else {
-                    ski.channel.translateAndSetReadyOps(rOps, ski);
-                    if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
-                        selectedKeys.add(ski);
-                        numKeysUpdated++;
-                    }
-                }
-            }
-        }
-        return numKeysUpdated;
-    }
-
-    protected void implClose() throws IOException {
-        if (closed)
-            return;
-        closed = true;
-
-        // prevent further wakeup
-        synchronized (interruptLock) {
-            interruptTriggered = true;
-        }
-
-        FileDispatcherImpl.closeIntFD(fd0);
-        FileDispatcherImpl.closeIntFD(fd1);
-
-        pollWrapper.closeEPollFD();
-        // it is possible
-        selectedKeys = null;
-
-        // Deregister channels
-        Iterator<SelectionKey> i = keys.iterator();
-        while (i.hasNext()) {
-            SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
-            deregister(ski);
-            SelectableChannel selch = ski.channel();
-            if (!selch.isOpen() && !selch.isRegistered())
-                ((SelChImpl)selch).kill();
-            i.remove();
-        }
-
-        fd0 = -1;
-        fd1 = -1;
-    }
-
-    protected void implRegister(SelectionKeyImpl ski) {
-        if (closed)
-            throw new ClosedSelectorException();
-        SelChImpl ch = ski.channel;
-        Integer fd = Integer.valueOf(ch.getFDVal());
-        fdToKey.put(fd, ski);
-        pollWrapper.add(fd);
-        keys.add(ski);
-    }
-
-    protected void implDereg(SelectionKeyImpl ski) throws IOException {
-        assert (ski.getIndex() >= 0);
-        SelChImpl ch = ski.channel;
-        int fd = ch.getFDVal();
-        fdToKey.remove(Integer.valueOf(fd));
-        pollWrapper.remove(fd);
-        ski.setIndex(-1);
-        keys.remove(ski);
-        selectedKeys.remove(ski);
-        deregister((AbstractSelectionKey)ski);
-        SelectableChannel selch = ski.channel();
-        if (!selch.isOpen() && !selch.isRegistered())
-            ((SelChImpl)selch).kill();
-    }
-
-    public void putEventOps(SelectionKeyImpl ski, int ops) {
-        if (closed)
-            throw new ClosedSelectorException();
-        SelChImpl ch = ski.channel;
-        pollWrapper.setInterest(ch.getFDVal(), ops);
-    }
-
-    public Selector wakeup() {
-        synchronized (interruptLock) {
-            if (!interruptTriggered) {
-                pollWrapper.interrupt();
-                interruptTriggered = true;
-            }
-        }
-        return this;
-    }
-}
diff --git a/ojluni/src/main/java/sun/nio/ch/EPollSelectorProvider.java b/ojluni/src/main/java/sun/nio/ch/EPollSelectorProvider.java
deleted file mode 100644
index 060819c..0000000
--- a/ojluni/src/main/java/sun/nio/ch/EPollSelectorProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-
-public class EPollSelectorProvider
-    extends SelectorProviderImpl
-{
-    public AbstractSelector openSelector() throws IOException {
-        return new EPollSelectorImpl(this);
-    }
-
-    // Android-changed: Android never has stdin/stdout connected to a socket.
-    // public Channel inheritedChannel() throws IOException {
-    //     return InheritedChannel.getChannel();
-    // }
-}
diff --git a/ojluni/src/main/java/sun/nio/ch/KQueue.java b/ojluni/src/main/java/sun/nio/ch/KQueue.java
deleted file mode 100644
index 859e88d..0000000
--- a/ojluni/src/main/java/sun/nio/ch/KQueue.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import sun.misc.Unsafe;
-
-/**
- * Provides access to the BSD kqueue facility.
- */
-
-class KQueue {
-    private KQueue() { }
-
-    private static final Unsafe unsafe = Unsafe.getUnsafe();
-
-    /**
-     * struct kevent {
-     *        uintptr_t       ident;          // identifier for this event, usually the fd
-     *        int16_t         filter;         // filter for event
-     *        uint16_t        flags;          // general flags
-     *        uint32_t        fflags;         // filter-specific flags
-     *        intptr_t        data;           // filter-specific data
-     *        void            *udata;         // opaque user data identifier
-     * };
-     */
-    private static final int SIZEOF_KQUEUEEVENT    = keventSize();
-    private static final int OFFSET_IDENT          = identOffset();
-    private static final int OFFSET_FILTER         = filterOffset();
-    private static final int OFFSET_FLAGS          = flagsOffset();
-
-    // filters
-    static final int EVFILT_READ  = -1;
-    static final int EVFILT_WRITE = -2;
-
-    // flags
-    static final int EV_ADD     = 0x0001;
-    static final int EV_ONESHOT = 0x0010;
-    static final int EV_CLEAR   = 0x0020;
-
-    /**
-     * Allocates a poll array to handle up to {@code count} events.
-     */
-    static long allocatePollArray(int count) {
-        return unsafe.allocateMemory(count * SIZEOF_KQUEUEEVENT);
-    }
-
-    /**
-     * Free a poll array
-     */
-    static void freePollArray(long address) {
-        unsafe.freeMemory(address);
-    }
-
-    /**
-     * Returns kevent[i].
-     */
-    static long getEvent(long address, int i) {
-        return address + (SIZEOF_KQUEUEEVENT*i);
-    }
-
-    /**
-     * Returns the file descriptor from a kevent (assuming to be in ident field)
-     */
-    static int getDescriptor(long address) {
-        return unsafe.getInt(address + OFFSET_IDENT);
-    }
-
-    static int getFilter(long address) {
-        return unsafe.getShort(address + OFFSET_FILTER);
-    }
-
-    static int getFlags(long address) {
-        return unsafe.getShort(address + OFFSET_FLAGS);
-    }
-
-    // -- Native methods --
-
-    private static native int keventSize();
-
-    private static native int identOffset();
-
-    private static native int filterOffset();
-
-    private static native int flagsOffset();
-
-    static native int kqueue() throws IOException;
-
-    static native int keventRegister(int kqpfd, int fd, int filter, int flags);
-
-    static native int keventPoll(int kqpfd, long pollAddress, int nevents)
-        throws IOException;
-}
diff --git a/ojluni/src/main/java/sun/nio/ch/KQueuePort.java b/ojluni/src/main/java/sun/nio/ch/KQueuePort.java
deleted file mode 100644
index fce67b3..0000000
--- a/ojluni/src/main/java/sun/nio/ch/KQueuePort.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.nio.channels.spi.AsynchronousChannelProvider;
-import java.io.IOException;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.atomic.AtomicInteger;
-import static sun.nio.ch.KQueue.*;
-
-/**
- * AsynchronousChannelGroup implementation based on the BSD kqueue facility.
- */
-
-final class KQueuePort
-    extends Port
-{
-    // maximum number of events to poll at a time
-    private static final int MAX_KEVENTS_TO_POLL = 512;
-
-    // kqueue file descriptor
-    private final int kqfd;
-
-    // true if kqueue closed
-    private boolean closed;
-
-    // socket pair used for wakeup
-    private final int sp[];
-
-    // number of wakeups pending
-    private final AtomicInteger wakeupCount = new AtomicInteger();
-
-    // address of the poll array passed to kqueue_wait
-    private final long address;
-
-    // encapsulates an event for a channel
-    static class Event {
-        final PollableChannel channel;
-        final int events;
-
-        Event(PollableChannel channel, int events) {
-            this.channel = channel;
-            this.events = events;
-        }
-
-        PollableChannel channel()   { return channel; }
-        int events()                { return events; }
-    }
-
-    // queue of events for cases that a polling thread dequeues more than one
-    // event
-    private final ArrayBlockingQueue<Event> queue;
-    private final Event NEED_TO_POLL = new Event(null, 0);
-    private final Event EXECUTE_TASK_OR_SHUTDOWN = new Event(null, 0);
-
-    KQueuePort(AsynchronousChannelProvider provider, ThreadPool pool)
-        throws IOException
-    {
-        super(provider, pool);
-
-        // open kqueue
-        this.kqfd = kqueue();
-
-        // create socket pair for wakeup mechanism
-        int[] sv = new int[2];
-        try {
-            socketpair(sv);
-
-            // register one end with kqueue
-            keventRegister(kqfd, sv[0], EVFILT_READ, EV_ADD);
-        } catch (IOException x) {
-            close0(kqfd);
-            throw x;
-        }
-        this.sp = sv;
-
-        // allocate the poll array
-        this.address = allocatePollArray(MAX_KEVENTS_TO_POLL);
-
-        // create the queue and offer the special event to ensure that the first
-        // threads polls
-        this.queue = new ArrayBlockingQueue<Event>(MAX_KEVENTS_TO_POLL);
-        this.queue.offer(NEED_TO_POLL);
-    }
-
-    KQueuePort start() {
-        startThreads(new EventHandlerTask());
-        return this;
-    }
-
-    /**
-     * Release all resources
-     */
-    private void implClose() {
-        synchronized (this) {
-            if (closed)
-                return;
-            closed = true;
-        }
-        freePollArray(address);
-        close0(sp[0]);
-        close0(sp[1]);
-        close0(kqfd);
-    }
-
-    private void wakeup() {
-        if (wakeupCount.incrementAndGet() == 1) {
-            // write byte to socketpair to force wakeup
-            try {
-                interrupt(sp[1]);
-            } catch (IOException x) {
-                throw new AssertionError(x);
-            }
-        }
-    }
-
-    @Override
-    void executeOnHandlerTask(Runnable task) {
-        synchronized (this) {
-            if (closed)
-                throw new RejectedExecutionException();
-            offerTask(task);
-            wakeup();
-        }
-    }
-
-    @Override
-    void shutdownHandlerTasks() {
-        /*
-         * If no tasks are running then just release resources; otherwise
-         * write to the one end of the socketpair to wakeup any polling threads.
-         */
-        int nThreads = threadCount();
-        if (nThreads == 0) {
-            implClose();
-        } else {
-            // send interrupt to each thread
-            while (nThreads-- > 0) {
-                wakeup();
-            }
-        }
-    }
-
-    // invoked by clients to register a file descriptor
-    @Override
-    void startPoll(int fd, int events) {
-        // We use a separate filter for read and write events.
-        // TBD: Measure cost of EV_ONESHOT vs. EV_CLEAR, either will do here.
-        int err = 0;
-        int flags = (EV_ADD|EV_ONESHOT);
-        if ((events & Net.POLLIN) > 0)
-            err = keventRegister(kqfd, fd, EVFILT_READ, flags);
-        if (err == 0 && (events & Net.POLLOUT) > 0)
-            err = keventRegister(kqfd, fd, EVFILT_WRITE, flags);
-        if (err != 0)
-            throw new InternalError("kevent failed: " + err);  // should not happen
-    }
-
-    /*
-     * Task to process events from kqueue and dispatch to the channel's
-     * onEvent handler.
-     *
-     * Events are retreived from kqueue in batch and offered to a BlockingQueue
-     * where they are consumed by handler threads. A special "NEED_TO_POLL"
-     * event is used to signal one consumer to re-poll when all events have
-     * been consumed.
-     */
-    private class EventHandlerTask implements Runnable {
-        private Event poll() throws IOException {
-            try {
-                for (;;) {
-                    int n = keventPoll(kqfd, address, MAX_KEVENTS_TO_POLL);
-                    /*
-                     * 'n' events have been read. Here we map them to their
-                     * corresponding channel in batch and queue n-1 so that
-                     * they can be handled by other handler threads. The last
-                     * event is handled by this thread (and so is not queued).
-                     */
-                    fdToChannelLock.readLock().lock();
-                    try {
-                        while (n-- > 0) {
-                            long keventAddress = getEvent(address, n);
-                            int fd = getDescriptor(keventAddress);
-
-                            // wakeup
-                            if (fd == sp[0]) {
-                                if (wakeupCount.decrementAndGet() == 0) {
-                                    // no more wakeups so drain pipe
-                                    drain1(sp[0]);
-                                }
-
-                                // queue special event if there are more events
-                                // to handle.
-                                if (n > 0) {
-                                    queue.offer(EXECUTE_TASK_OR_SHUTDOWN);
-                                    continue;
-                                }
-                                return EXECUTE_TASK_OR_SHUTDOWN;
-                            }
-
-                            PollableChannel channel = fdToChannel.get(fd);
-                            if (channel != null) {
-                                int filter = getFilter(keventAddress);
-                                int events = 0;
-                                if (filter == EVFILT_READ)
-                                    events = Net.POLLIN;
-                                else if (filter == EVFILT_WRITE)
-                                    events = Net.POLLOUT;
-
-                                Event ev = new Event(channel, events);
-
-                                // n-1 events are queued; This thread handles
-                                // the last one except for the wakeup
-                                if (n > 0) {
-                                    queue.offer(ev);
-                                } else {
-                                    return ev;
-                                }
-                            }
-                        }
-                    } finally {
-                        fdToChannelLock.readLock().unlock();
-                    }
-                }
-            } finally {
-                // to ensure that some thread will poll when all events have
-                // been consumed
-                queue.offer(NEED_TO_POLL);
-            }
-        }
-
-        public void run() {
-            Invoker.GroupAndInvokeCount myGroupAndInvokeCount =
-                Invoker.getGroupAndInvokeCount();
-            final boolean isPooledThread = (myGroupAndInvokeCount != null);
-            boolean replaceMe = false;
-            Event ev;
-            try {
-                for (;;) {
-                    // reset invoke count
-                    if (isPooledThread)
-                        myGroupAndInvokeCount.resetInvokeCount();
-
-                    try {
-                        replaceMe = false;
-                        ev = queue.take();
-
-                        // no events and this thread has been "selected" to
-                        // poll for more.
-                        if (ev == NEED_TO_POLL) {
-                            try {
-                                ev = poll();
-                            } catch (IOException x) {
-                                x.printStackTrace();
-                                return;
-                            }
-                        }
-                    } catch (InterruptedException x) {
-                        continue;
-                    }
-
-                    // handle wakeup to execute task or shutdown
-                    if (ev == EXECUTE_TASK_OR_SHUTDOWN) {
-                        Runnable task = pollTask();
-                        if (task == null) {
-                            // shutdown request
-                            return;
-                        }
-                        // run task (may throw error/exception)
-                        replaceMe = true;
-                        task.run();
-                        continue;
-                    }
-
-                    // process event
-                    try {
-                        ev.channel().onEvent(ev.events(), isPooledThread);
-                    } catch (Error x) {
-                        replaceMe = true; throw x;
-                    } catch (RuntimeException x) {
-                        replaceMe = true; throw x;
-                    }
-                }
-            } finally {
-                // last handler to exit when shutdown releases resources
-                int remaining = threadExit(this, replaceMe);
-                if (remaining == 0 && isShutdown()) {
-                    implClose();
-                }
-            }
-        }
-    }
-
-    // -- Native methods --
-
-    private static native void socketpair(int[] sv) throws IOException;
-
-    private static native void interrupt(int fd) throws IOException;
-
-    private static native void drain1(int fd) throws IOException;
-
-    private static native void close0(int fd);
-}
diff --git a/ojluni/src/main/java/sun/nio/ch/Reflect.java b/ojluni/src/main/java/sun/nio/ch/Reflect.java
deleted file mode 100644
index 3ef3d93..0000000
--- a/ojluni/src/main/java/sun/nio/ch/Reflect.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-
-class Reflect {                                 // package-private
-
-    private Reflect() { }
-
-    private static class ReflectionError extends Error {
-        private static final long serialVersionUID = -8659519328078164097L;
-        ReflectionError(Throwable x) {
-            super(x);
-        }
-    }
-
-    private static void setAccessible(final AccessibleObject ao) {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                public Void run() {
-                    ao.setAccessible(true);
-                    return null;
-                }});
-    }
-
-    static Constructor<?> lookupConstructor(String className,
-                                            Class<?>[] paramTypes)
-    {
-        try {
-            Class<?> cl = Class.forName(className);
-            Constructor<?> c = cl.getDeclaredConstructor(paramTypes);
-            setAccessible(c);
-            return c;
-        } catch (ClassNotFoundException | NoSuchMethodException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static Object invoke(Constructor<?> c, Object[] args) {
-        try {
-            return c.newInstance(args);
-        } catch (InstantiationException |
-                 IllegalAccessException |
-                 InvocationTargetException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static Method lookupMethod(String className,
-                               String methodName,
-                               Class... paramTypes)
-    {
-        try {
-            Class<?> cl = Class.forName(className);
-            Method m = cl.getDeclaredMethod(methodName, paramTypes);
-            setAccessible(m);
-            return m;
-        } catch (ClassNotFoundException | NoSuchMethodException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static Object invoke(Method m, Object ob, Object[] args) {
-        try {
-            return m.invoke(ob, args);
-        } catch (IllegalAccessException | InvocationTargetException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static Object invokeIO(Method m, Object ob, Object[] args)
-        throws IOException
-    {
-        try {
-            return m.invoke(ob, args);
-        } catch (IllegalAccessException x) {
-            throw new ReflectionError(x);
-        } catch (InvocationTargetException x) {
-            if (IOException.class.isInstance(x.getCause()))
-                throw (IOException)x.getCause();
-            throw new ReflectionError(x);
-        }
-    }
-
-    static Field lookupField(String className, String fieldName) {
-        try {
-            Class<?> cl = Class.forName(className);
-            Field f = cl.getDeclaredField(fieldName);
-            setAccessible(f);
-            return f;
-        } catch (ClassNotFoundException | NoSuchFieldException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static Object get(Object ob, Field f) {
-        try {
-            return f.get(ob);
-        } catch (IllegalAccessException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static Object get(Field f) {
-        return get(null, f);
-    }
-
-    static void set(Object ob, Field f, Object val) {
-        try {
-            f.set(ob, val);
-        } catch (IllegalAccessException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static void setInt(Object ob, Field f, int val) {
-        try {
-            f.setInt(ob, val);
-        } catch (IllegalAccessException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-    static void setBoolean(Object ob, Field f, boolean val) {
-        try {
-            f.setBoolean(ob, val);
-        } catch (IllegalAccessException x) {
-            throw new ReflectionError(x);
-        }
-    }
-
-}
diff --git a/ojluni/src/main/native/EPollArrayWrapper.c b/ojluni/src/main/native/EPollArrayWrapper.c
deleted file mode 100644
index a96fb43..0000000
--- a/ojluni/src/main/native/EPollArrayWrapper.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "jni.h"
-#include "jni_util.h"
-#include "jvm.h"
-#include "jlong.h"
-
-
-#include <unistd.h>
-#include <sys/time.h>
-#include <sys/epoll.h>
-
-#define RESTARTABLE(_cmd, _result) do { \
-  do { \
-    (_result) = _cmd; \
-  } while(((_result) == -1) && (errno == EINTR)); \
-} while(0)
-
-
-#include "JNIHelp.h"
-
-#define NATIVE_METHOD(className, functionName, signature) \
-{ #functionName, signature, (void*)(Java_sun_nio_ch_ ## className ## _ ## functionName) }
-
-static int
-iepoll(int epfd, struct epoll_event *events, int numfds, jlong timeout)
-{
-    jlong start, now;
-    int remaining = timeout;
-    struct timeval t;
-    int diff;
-
-    gettimeofday(&t, NULL);
-    start = t.tv_sec * 1000 + t.tv_usec / 1000;
-
-    for (;;) {
-        int res = epoll_wait(epfd, events, numfds, timeout);
-        if (res < 0 && errno == EINTR) {
-            if (remaining >= 0) {
-                gettimeofday(&t, NULL);
-                now = t.tv_sec * 1000 + t.tv_usec / 1000;
-                diff = now - start;
-                remaining -= diff;
-                if (diff < 0 || remaining <= 0) {
-                    return 0;
-                }
-                start = now;
-            }
-        } else {
-            return res;
-        }
-    }
-}
-
-JNIEXPORT jint JNICALL
-Java_sun_nio_ch_EPollArrayWrapper_epollCreate(JNIEnv *env, jobject this)
-{
-    /*
-     * epoll_create expects a size as a hint to the kernel about how to
-     * dimension internal structures. We can't predict the size in advance.
-     */
-    int epfd = epoll_create(256);
-    if (epfd < 0) {
-       JNU_ThrowIOExceptionWithLastError(env, "epoll_create failed");
-    }
-    return epfd;
-}
-
-JNIEXPORT jint JNICALL
-Java_sun_nio_ch_EPollArrayWrapper_sizeofEPollEvent(JNIEnv* env, jclass this)
-{
-    return sizeof(struct epoll_event);
-}
-
-JNIEXPORT jint JNICALL
-Java_sun_nio_ch_EPollArrayWrapper_offsetofData(JNIEnv* env, jclass this)
-{
-    return offsetof(struct epoll_event, data);
-}
-
-JNIEXPORT void JNICALL
-Java_sun_nio_ch_EPollArrayWrapper_epollCtl(JNIEnv *env, jobject this, jint epfd,
-                                           jint opcode, jint fd, jint events)
-{
-    struct epoll_event event;
-    int res;
-
-    event.events = events;
-    event.data.fd = fd;
-
-    RESTARTABLE(epoll_ctl(epfd, (int)opcode, (int)fd, &event), res);
-
-    /*
-     * A channel may be registered with several Selectors. When each Selector
-     * is polled a EPOLL_CTL_DEL op will be inserted into its pending update
-     * list to remove the file descriptor from epoll. The "last" Selector will
-     * close the file descriptor which automatically unregisters it from each
-     * epoll descriptor. To avoid costly synchronization between Selectors we
-     * allow pending updates to be processed, ignoring errors. The errors are
-     * harmless as the last update for the file descriptor is guaranteed to
-     * be EPOLL_CTL_DEL.
-     */
-    if (res < 0 && errno != EBADF && errno != ENOENT && errno != EPERM) {
-        JNU_ThrowIOExceptionWithLastError(env, "epoll_ctl failed");
-    }
-}
-
-JNIEXPORT jint JNICALL
-Java_sun_nio_ch_EPollArrayWrapper_epollWait(JNIEnv *env, jobject this,
-                                            jlong address, jint numfds,
-                                            jlong timeout, jint epfd)
-{
-    struct epoll_event *events = jlong_to_ptr(address);
-    int res;
-
-    if (timeout <= 0) {           /* Indefinite or no wait */
-        RESTARTABLE(epoll_wait(epfd, events, numfds, timeout), res);
-    } else {                      /* Bounded wait; bounded restarts */
-        res = iepoll(epfd, events, numfds, timeout);
-    }
-
-    if (res < 0) {
-        JNU_ThrowIOExceptionWithLastError(env, "epoll_wait failed");
-    }
-    return res;
-}
-
-JNIEXPORT void JNICALL
-Java_sun_nio_ch_EPollArrayWrapper_interrupt(JNIEnv *env, jobject this, jint fd)
-{
-    int fakebuf[1];
-    fakebuf[0] = 1;
-    if (write(fd, fakebuf, 1) < 0) {
-        JNU_ThrowIOExceptionWithLastError(env,"write to interrupt fd failed");
-    }
-}
-
-static JNINativeMethod gMethods[] = {
-  NATIVE_METHOD(EPollArrayWrapper, epollCreate, "()I"),
-  NATIVE_METHOD(EPollArrayWrapper, epollCtl, "(IIII)V"),
-  NATIVE_METHOD(EPollArrayWrapper, epollWait, "(JIJI)I"),
-  NATIVE_METHOD(EPollArrayWrapper, sizeofEPollEvent, "()I"),
-  NATIVE_METHOD(EPollArrayWrapper, offsetofData, "()I"),
-  NATIVE_METHOD(EPollArrayWrapper, interrupt, "(I)V"),
-};
-
-void register_sun_nio_ch_EPollArrayWrapper(JNIEnv* env) {
-  jniRegisterNativeMethods(env, "sun/nio/ch/EPollArrayWrapper", gMethods, NELEM(gMethods));
-}
diff --git a/ojluni/src/main/native/Register.cpp b/ojluni/src/main/native/Register.cpp
index 42b1a62..40c034c 100644
--- a/ojluni/src/main/native/Register.cpp
+++ b/ojluni/src/main/native/Register.cpp
@@ -77,7 +77,6 @@
 extern void register_sun_nio_ch_Net(JNIEnv*);
 extern void register_sun_nio_ch_ServerSocketChannelImpl(JNIEnv*);
 extern void register_sun_nio_ch_SocketChannelImpl(JNIEnv* env);
-extern void register_sun_nio_ch_EPollArrayWrapper(JNIEnv* env);
 
 extern jint net_JNI_OnLoad(JavaVM*, void*);
 
@@ -136,7 +135,6 @@
     register_sun_nio_ch_Net(env);
     register_sun_nio_ch_DatagramChannelImpl(env);
     register_sun_nio_ch_DatagramDispatcher(env);
-    register_sun_nio_ch_EPollArrayWrapper(env);
     register_java_nio_MappedByteBuffer(env);
     net_JNI_OnLoad(vm, NULL);
     return JNI_VERSION_1_6;
diff --git a/ojluni/src/main/native/openjdksub.mk b/ojluni/src/main/native/openjdksub.mk
index a083a6b..9e7dc07 100644
--- a/ojluni/src/main/native/openjdksub.mk
+++ b/ojluni/src/main/native/openjdksub.mk
@@ -20,7 +20,6 @@
     DatagramDispatcher.c \
     Console_md.c \
     IOUtil.c \
-    EPollArrayWrapper.c \
     PollArrayWrapper.c \
     SocketChannelImpl.c \
     FileChannelImpl.c \
diff --git a/openjdk_java_files.mk b/openjdk_java_files.mk
index 26e5842..6907dde 100644
--- a/openjdk_java_files.mk
+++ b/openjdk_java_files.mk
@@ -1463,11 +1463,8 @@
     ojluni/src/main/java/sun/nio/ch/DefaultAsynchronousChannelProvider.java \
     ojluni/src/main/java/sun/nio/ch/DefaultSelectorProvider.java \
     ojluni/src/main/java/sun/nio/ch/DirectBuffer.java \
-    ojluni/src/main/java/sun/nio/ch/EPollArrayWrapper.java \
     ojluni/src/main/java/sun/nio/ch/EPoll.java \
     ojluni/src/main/java/sun/nio/ch/EPollPort.java \
-    ojluni/src/main/java/sun/nio/ch/EPollSelectorImpl.java \
-    ojluni/src/main/java/sun/nio/ch/EPollSelectorProvider.java \
     ojluni/src/main/java/sun/nio/ch/ExtendedSocketOption.java \
     ojluni/src/main/java/sun/nio/ch/FileChannelImpl.java \
     ojluni/src/main/java/sun/nio/ch/FileDescriptorHolderSocketImpl.java \
@@ -1482,8 +1479,6 @@
     ojluni/src/main/java/sun/nio/ch/IOStatus.java \
     ojluni/src/main/java/sun/nio/ch/IOUtil.java \
     ojluni/src/main/java/sun/nio/ch/IOVecWrapper.java \
-    ojluni/src/main/java/sun/nio/ch/KQueue.java \
-    ojluni/src/main/java/sun/nio/ch/KQueuePort.java \
     ojluni/src/main/java/sun/nio/ch/LinuxAsynchronousChannelProvider.java \
     ojluni/src/main/java/sun/nio/ch/MembershipKeyImpl.java \
     ojluni/src/main/java/sun/nio/ch/MembershipRegistry.java \
@@ -1499,7 +1494,6 @@
     ojluni/src/main/java/sun/nio/ch/PollSelectorImpl.java \
     ojluni/src/main/java/sun/nio/ch/PollSelectorProvider.java \
     ojluni/src/main/java/sun/nio/ch/Port.java \
-    ojluni/src/main/java/sun/nio/ch/Reflect.java \
     ojluni/src/main/java/sun/nio/ch/SelChImpl.java \
     ojluni/src/main/java/sun/nio/ch/SelectionKeyImpl.java \
     ojluni/src/main/java/sun/nio/ch/SelectorImpl.java \