equal
deleted
inserted
replaced
69 |
69 |
70 // Special value to indicate that an update should be ignored |
70 // Special value to indicate that an update should be ignored |
71 static final byte CANCELLED = (byte)-1; |
71 static final byte CANCELLED = (byte)-1; |
72 |
72 |
73 // Maximum number of open file descriptors |
73 // Maximum number of open file descriptors |
74 static final int OPEN_MAX = fdLimit(); |
74 static final int OPEN_MAX = IOUtil.fdLimit(); |
75 |
75 |
76 // Number of pollfd structures to create. |
76 // Number of pollfd structures to create. |
77 // dpwrite/ioctl(DP_POLL) allows up to OPEN_MAX-1 |
77 // dpwrite/ioctl(DP_POLL) allows up to OPEN_MAX-1 |
78 static final int NUM_POLLFDS = Math.min(OPEN_MAX-1, 8192); |
78 static final int NUM_POLLFDS = Math.min(OPEN_MAX-1, 8192); |
79 |
79 |
306 private native void registerMultiple(int wfd, long address, int len) |
306 private native void registerMultiple(int wfd, long address, int len) |
307 throws IOException; |
307 throws IOException; |
308 private native int poll0(long pollAddress, int numfds, long timeout, |
308 private native int poll0(long pollAddress, int numfds, long timeout, |
309 int wfd); |
309 int wfd); |
310 private static native void interrupt(int fd); |
310 private static native void interrupt(int fd); |
311 private static native int fdLimit(); |
|
312 } |
311 } |