authorgravatar for 38702187+CPestka@users.noreply.github.comConstantin Pestka <38702187+CPestka@users.noreply.github.com> 2024-01-30 03:26:52+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-01-29 21:26:52-05:00
loge460ba66a57f0a4e0ee07f32cef17c7f2bf290b4
tree89d4360b7c3d32c5af7ee54641a791ea5d0a25d6
parentd8981dc493aca64edc3a5c0130a722d86d55b6d9
signaturebadge-check Signed by PGP key B5690EEEBB952194

std: add docs about return value of submit() (#18721)

being misleading if used alongside with IORING_SETUP_SQPOLL

1 files changed, 4 insertions(+), 1 deletions(-)

lib/std/os/linux/io_uring.zig+4-1
......@@ -144,7 +144,10 @@ pub const IO_Uring = struct {
144144
145145 /// Submits the SQEs acquired via get_sqe() to the kernel. You can call this once after you have
146146 /// called get_sqe() multiple times to setup multiple I/O requests.
147 /// Returns the number of SQEs submitted.
147 /// Returns the number of SQEs submitted, if not used alongside IORING_SETUP_SQPOLL.
148 /// If the io_uring instance is uses IORING_SETUP_SQPOLL, the value returned on success is not
149 /// guaranteed to match the amount of actually submitted sqes during this call. A value higher
150 /// or lower, including 0, may be returned.
148151 /// Matches the implementation of io_uring_submit() in liburing.
149152 pub fn submit(self: *IO_Uring) !u32 {
150153 return self.submit_and_wait(0);