Merge pull request #34 from normanmaurer/iosqe_async
Use IOSQE_ASYNC flag when submitting
This commit is contained in:
commit
c6db51ba1f
@ -381,6 +381,10 @@ static jint netty_io_uring_ioringOpConnect(JNIEnv* env, jclass clazz) {
|
||||
return IORING_OP_CONNECT;
|
||||
}
|
||||
|
||||
static jint netty_io_uring_iosqeAsync(JNIEnv* env, jclass clazz) {
|
||||
return IOSQE_ASYNC;
|
||||
}
|
||||
|
||||
// JNI Method Registration Table Begin
|
||||
static const JNINativeMethod statically_referenced_fixed_method_table[] = {
|
||||
{ "sockNonblock", "()I", (void *) netty_io_uring_sockNonblock },
|
||||
@ -395,7 +399,8 @@ static const JNINativeMethod statically_referenced_fixed_method_table[] = {
|
||||
{ "ioringOpAccept", "()I", (void *) netty_io_uring_ioringOpAccept },
|
||||
{ "ioringOpRead", "()I", (void *) netty_io_uring_ioringOpRead },
|
||||
{ "ioringOpWrite", "()I", (void *) netty_io_uring_ioringOpWrite },
|
||||
{ "ioringOpConnect", "()I", (void *) netty_io_uring_ioringOpConnect }
|
||||
{ "ioringOpConnect", "()I", (void *) netty_io_uring_ioringOpConnect },
|
||||
{ "iosqeAsync", "()I", (void *) netty_io_uring_iosqeAsync }
|
||||
};
|
||||
static const jint statically_referenced_fixed_method_table_size = sizeof(statically_referenced_fixed_method_table) / sizeof(statically_referenced_fixed_method_table[0]);
|
||||
|
||||
|
@ -136,9 +136,8 @@ final class IOUringSubmissionQueue {
|
||||
}
|
||||
}
|
||||
|
||||
PlatformDependent.putByte(sqe + SQE_FLAGS_FIELD, (byte) 0);
|
||||
|
||||
|
||||
// TODO: Make it configurable if we should use this flag or not.
|
||||
PlatformDependent.putByte(sqe + SQE_FLAGS_FIELD, (byte) Native.IOSQE_ASYNC);
|
||||
|
||||
// pad field array -> all fields should be zero
|
||||
long offsetIndex = 0;
|
||||
|
@ -77,6 +77,7 @@ final class Native {
|
||||
static final int IORING_OP_POLL_REMOVE = NativeStaticallyReferencedJniMethods.ioringOpPollRemove();
|
||||
static final int IORING_OP_CONNECT = NativeStaticallyReferencedJniMethods.ioringOpConnect();
|
||||
static final int IORING_OP_WRITEV = NativeStaticallyReferencedJniMethods.ioringOpWritev();
|
||||
static final int IOSQE_ASYNC = NativeStaticallyReferencedJniMethods.iosqeAsync();
|
||||
|
||||
public static RingBuffer createRingBuffer(int ringSize) {
|
||||
//Todo throw Exception if it's null
|
||||
|
@ -44,4 +44,5 @@ final class NativeStaticallyReferencedJniMethods {
|
||||
static native int ioringOpRead();
|
||||
static native int ioringOpWrite();
|
||||
static native int ioringOpConnect();
|
||||
static native int iosqeAsync();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user