< prev index next >
src/java.base/macosx/classes/sun/nio/ch/KQueue.java
Print this page
rev 49271 : [mq]: selector-cleanup
*** 82,102 ****
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 --
--- 82,102 ----
static long getEvent(long address, int i) {
return address + (SIZEOF_KQUEUEEVENT*i);
}
/**
! * 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 short getFilter(long address) {
return unsafe.getShort(address + OFFSET_FILTER);
}
! static short getFlags(long address) {
return unsafe.getShort(address + OFFSET_FLAGS);
}
// -- Native methods --
*** 106,120 ****
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;
static {
IOUtil.load();
}
--- 106,120 ----
private static native int filterOffset();
private static native int flagsOffset();
! static native int create() throws IOException;
! static native int register(int kqfd, int fd, int filter, int flags);
! static native int poll(int kqfd, long pollAddress, int nevents, long timeout)
throws IOException;
static {
IOUtil.load();
}
< prev index next >