diff options
author | Casey Marshall <csm@gnu.org> | 2006-09-27 21:19:31 +0000 |
---|---|---|
committer | Casey Marshall <csm@gnu.org> | 2006-09-27 21:19:31 +0000 |
commit | c145bf0ba7bbcf5a7430ab9381e6bae5e20ee434 (patch) | |
tree | 7b9a2d296d1e879a643410762383e08ff7085511 /include | |
parent | f43d2df6dab7bc73ce6c70cc142ab703a1482bc9 (diff) | |
download | classpath-c145bf0ba7bbcf5a7430ab9381e6bae5e20ee434.tar.gz |
2006-09-27 Casey Marshall <csm@gnu.org>
* gnu/java/nio/KqueueSelectionKeyImpl.java: extend
AbstractSelectionKey.
(nstate, valid, readEverEnabled, writeEverEnabled): removed.
(activeOps, fd): new fields.
(cancel): removed.
(interestOps): just call `selector.setInterestOps.'
(isValid): removed.
(toString): include native fd in output.
(hashCode, equals, isReadActive, isReadInterested, isWriteActive,
isWriteInterested, needCommitRead, needCommitWrite): new methods.
* gnu/java/nio/KqueueSelectorImpl.java (MAX_DOUBLING_CAPACITY,
CAP_INCREMENT, INITIAL_CAPACITY): new constants.
(cancelled): removed.
(events): new field.
(OP_ACCEPT, OP_CONNECT, OP_READ, OP_WRITE): new constants.
(toString, equals): new methods.
(doSelect): get cancelled keys from superclass; fix synchronization;
initialize events that need to be added/deleted only when selecting;
ignore keys attached to closed channels.
(register): fix key initialization; synchronize adding keys.
(setInterestOps): new method.
(updateOps, updateOps): removed.
(reallocateBuffer): new method.
(doCancel): removed.
(kevent_set): add index, active ops parameters; remove delete
parameter.
(kevent): add output space size parameter.
* include/gnu_java_nio_KqueueSelectorImpl.h: regenerated.
* native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c
(Java_gnu_java_nio_KqueueSelectorImpl_kevent_1set): only fill in
one filter, at the given index.
(Java_gnu_java_nio_KqueueSelectorImpl_kevent): separate incoming
event count and outgoing event count.
Diffstat (limited to 'include')
-rw-r--r-- | include/gnu_java_nio_KqueueSelectorImpl.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/gnu_java_nio_KqueueSelectorImpl.h b/include/gnu_java_nio_KqueueSelectorImpl.h index 1accd710f..f9716f38c 100644 --- a/include/gnu_java_nio_KqueueSelectorImpl.h +++ b/include/gnu_java_nio_KqueueSelectorImpl.h @@ -7,6 +7,18 @@ #ifdef __cplusplus extern "C" { #endif +#undef gnu_java_nio_KqueueSelectorImpl_MAX_DOUBLING_CAPACITY +#define gnu_java_nio_KqueueSelectorImpl_MAX_DOUBLING_CAPACITY 16384L +#undef gnu_java_nio_KqueueSelectorImpl_CAP_INCREMENT +#define gnu_java_nio_KqueueSelectorImpl_CAP_INCREMENT 1024L +#undef gnu_java_nio_KqueueSelectorImpl_OP_ACCEPT +#define gnu_java_nio_KqueueSelectorImpl_OP_ACCEPT 16L +#undef gnu_java_nio_KqueueSelectorImpl_OP_CONNECT +#define gnu_java_nio_KqueueSelectorImpl_OP_CONNECT 8L +#undef gnu_java_nio_KqueueSelectorImpl_OP_READ +#define gnu_java_nio_KqueueSelectorImpl_OP_READ 1L +#undef gnu_java_nio_KqueueSelectorImpl_OP_WRITE +#define gnu_java_nio_KqueueSelectorImpl_OP_WRITE 4L /* * Class: gnu_java_nio_KqueueSelectorImpl * Method: kqueue_supported @@ -42,18 +54,18 @@ JNIEXPORT void JNICALL Java_gnu_java_nio_KqueueSelectorImpl_implClose /* * Class: gnu_java_nio_KqueueSelectorImpl * Method: kevent_set - * Signature: (Ljava/nio/ByteBuffer;IIIZ)V + * Signature: (Ljava/nio/ByteBuffer;IIIII)V */ JNIEXPORT void JNICALL Java_gnu_java_nio_KqueueSelectorImpl_kevent_1set - (JNIEnv *, jclass, jobject, jint, jint, jint, jboolean); + (JNIEnv *, jclass, jobject, jint, jint, jint, jint, jint); /* * Class: gnu_java_nio_KqueueSelectorImpl * Method: kevent - * Signature: (ILjava/nio/ByteBuffer;IJ)I + * Signature: (ILjava/nio/ByteBuffer;IIJ)I */ JNIEXPORT jint JNICALL Java_gnu_java_nio_KqueueSelectorImpl_kevent - (JNIEnv *, jclass, jint, jobject, jint, jlong); + (JNIEnv *, jclass, jint, jobject, jint, jint, jlong); /* * Class: gnu_java_nio_KqueueSelectorImpl |