< prev index next >
src/java.base/macosx/classes/sun/nio/ch/KQueue.java
Print this page
rev 49271 : [mq]: selector-cleanup
@@ -82,21 +82,21 @@
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)
+ * Returns the file descriptor from a kevent (assuming it is in the ident field)
*/
static int getDescriptor(long address) {
return unsafe.getInt(address + OFFSET_IDENT);
}
- static int getFilter(long address) {
+ static short getFilter(long address) {
return unsafe.getShort(address + OFFSET_FILTER);
}
- static int getFlags(long address) {
+ static short getFlags(long address) {
return unsafe.getShort(address + OFFSET_FLAGS);
}
// -- Native methods --
@@ -106,15 +106,15 @@
private static native int filterOffset();
private static native int flagsOffset();
- static native int kqueue() throws IOException;
+ static native int create() throws IOException;
- static native int keventRegister(int kqpfd, int fd, int filter, int flags);
+ static native int register(int kqfd, int fd, int filter, int flags);
- static native int keventPoll(int kqpfd, long pollAddress, int nevents)
+ static native int poll(int kqfd, long pollAddress, int nevents, long timeout)
throws IOException;
static {
IOUtil.load();
}
< prev index next >