From dd4eefef3ea9585263ffa32244a1879eea9e0cc6 Mon Sep 17 00:00:00 2001 From: microcai Date: Tue, 19 Nov 2024 08:11:44 +0800 Subject: [PATCH] use -1 as correct offset for io_uring_prep_write_fixed/io_uring_prep_read_fixed --- asio/include/asio/detail/io_uring_descriptor_read_op.hpp | 2 +- asio/include/asio/detail/io_uring_descriptor_write_op.hpp | 2 +- asio/include/asio/detail/io_uring_socket_recv_op.hpp | 2 +- asio/include/asio/detail/io_uring_socket_send_op.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asio/include/asio/detail/io_uring_descriptor_read_op.hpp b/asio/include/asio/detail/io_uring_descriptor_read_op.hpp index 9f8cf70bca..c1f521dde2 100644 --- a/asio/include/asio/detail/io_uring_descriptor_read_op.hpp +++ b/asio/include/asio/detail/io_uring_descriptor_read_op.hpp @@ -63,7 +63,7 @@ class io_uring_descriptor_read_op_base : public io_uring_operation { ::io_uring_prep_read_fixed(sqe, o->descriptor_, o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len, - 0, o->bufs_.registered_id().native_handle()); + -1, o->bufs_.registered_id().native_handle()); } else { diff --git a/asio/include/asio/detail/io_uring_descriptor_write_op.hpp b/asio/include/asio/detail/io_uring_descriptor_write_op.hpp index 090d644c7c..85c5bc523b 100644 --- a/asio/include/asio/detail/io_uring_descriptor_write_op.hpp +++ b/asio/include/asio/detail/io_uring_descriptor_write_op.hpp @@ -63,7 +63,7 @@ class io_uring_descriptor_write_op_base : public io_uring_operation { ::io_uring_prep_write_fixed(sqe, o->descriptor_, o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len, - 0, o->bufs_.registered_id().native_handle()); + -1, o->bufs_.registered_id().native_handle()); } else { diff --git a/asio/include/asio/detail/io_uring_socket_recv_op.hpp b/asio/include/asio/detail/io_uring_socket_recv_op.hpp index b1936c1ab9..2c5099a5e3 100644 --- a/asio/include/asio/detail/io_uring_socket_recv_op.hpp +++ b/asio/include/asio/detail/io_uring_socket_recv_op.hpp @@ -70,7 +70,7 @@ class io_uring_socket_recv_op_base : public io_uring_operation { ::io_uring_prep_read_fixed(sqe, o->socket_, o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len, - 0, o->bufs_.registered_id().native_handle()); + -1, o->bufs_.registered_id().native_handle()); } else { diff --git a/asio/include/asio/detail/io_uring_socket_send_op.hpp b/asio/include/asio/detail/io_uring_socket_send_op.hpp index 2f57dae920..75debd6846 100644 --- a/asio/include/asio/detail/io_uring_socket_send_op.hpp +++ b/asio/include/asio/detail/io_uring_socket_send_op.hpp @@ -69,7 +69,7 @@ class io_uring_socket_send_op_base : public io_uring_operation { ::io_uring_prep_write_fixed(sqe, o->socket_, o->bufs_.buffers()->iov_base, o->bufs_.buffers()->iov_len, - 0, o->bufs_.registered_id().native_handle()); + -1, o->bufs_.registered_id().native_handle()); } else {