From: Ammar Faizi <[email protected]>
To: Jens Axboe <[email protected]>
Cc: Ammar Faizi <[email protected]>,
Caleb Sander <[email protected]>,
Muhammad Rizki <[email protected]>,
Kanna Scarlet <[email protected]>,
io-uring Mailing List <[email protected]>,
Linux Kernel Mailing List <[email protected]>,
GNU/Weeb Mailing List <[email protected]>
Subject: [RFC PATCH liburing v1 2/4] man: Clarify "man 2" entry for io_uring syscalls
Date: Mon, 29 Aug 2022 10:07:37 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
From: Ammar Faizi <[email protected]>
io_uring_enter(), io_uring_register(), io_uring_setup() are not
declared in `<linux/io_uring.h>` and never were. Plus, these
functions don't intentionally set the `errno` variable. Reflect this
fact in the manpage.
Side note: On architectures other than x86, x86-64, and aarch64, those
functions _do_ set the `errno`, this is because the syscall is done via
libc as we don't yet have nolibc support for the mentioned archs. Users
should not rely on this behavior.
Cc: Caleb Sander <[email protected]>
Signed-off-by: Ammar Faizi <[email protected]>
---
man/io_uring_enter.2 | 9 ++++-----
man/io_uring_register.2 | 9 ++++-----
man/io_uring_setup.2 | 8 +++-----
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 6bfe9c9..05f9f72 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -8,7 +8,7 @@
io_uring_enter \- initiate and/or complete asynchronous I/O
.SH SYNOPSIS
.nf
-.BR "#include <linux/io_uring.h>"
+.BR "#include <liburing.h>"
.PP
.BI "int io_uring_enter(unsigned int " fd ", unsigned int " to_submit ,
.BI " unsigned int " min_complete ", unsigned int " flags ,
@@ -1299,11 +1299,10 @@ completion queue entry (see section
rather than through the system call itself.
Errors that occur not on behalf of a submission queue entry are returned via the
-system call directly. On such an error,
-.B -1
-is returned and
+system call directly. On such an error, a negative error code is returned. The
+caller should not rely on
.I errno
-is set appropriately.
+variable.
.PP
.SH ERRORS
These are the errors returned by
diff --git a/man/io_uring_register.2 b/man/io_uring_register.2
index 6c440b9..6791375 100644
--- a/man/io_uring_register.2
+++ b/man/io_uring_register.2
@@ -8,7 +8,7 @@
io_uring_register \- register files or user buffers for asynchronous I/O
.SH SYNOPSIS
.nf
-.BR "#include <linux/io_uring.h>"
+.BR "#include <liburing.h>"
.PP
.BI "int io_uring_register(unsigned int " fd ", unsigned int " opcode ,
.BI " void *" arg ", unsigned int " nr_args );
@@ -583,11 +583,10 @@ Available since 5.18.
On success,
.BR io_uring_register ()
-returns 0. On error,
-.B -1
-is returned, and
+returns 0. On error, a negative error code is returned. The caller should not
+rely on
.I errno
-is set accordingly.
+variable.
.SH ERRORS
.TP
diff --git a/man/io_uring_setup.2 b/man/io_uring_setup.2
index 0a5fa92..32a9e2e 100644
--- a/man/io_uring_setup.2
+++ b/man/io_uring_setup.2
@@ -9,7 +9,7 @@
io_uring_setup \- setup a context for performing asynchronous I/O
.SH SYNOPSIS
.nf
-.BR "#include <linux/io_uring.h>"
+.BR "#include <liburing.h>"
.PP
.BI "int io_uring_setup(u32 " entries ", struct io_uring_params *" p );
.fi
@@ -566,11 +566,9 @@ or
.BR io_uring_enter (2)
system calls.
-On error,
-.B -1
-is returned and
+On error, a negative error code is returned. The caller should not rely on
.I errno
-is set appropriately.
+variable.
.PP
.SH ERRORS
.TP
--
Ammar Faizi
next prev parent reply other threads:[~2022-08-29 3:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 3:07 [RFC PATCH liburing v1 0/4] Export io_uring syscall functions Ammar Faizi
2022-08-29 3:07 ` [RFC PATCH liburing v1 1/4] syscall: Add " Ammar Faizi
2022-08-29 19:46 ` Caleb Sander
2022-08-29 19:53 ` Caleb Sander
2022-08-29 3:07 ` Ammar Faizi [this message]
2022-08-29 3:07 ` [RFC PATCH liburing v1 3/4] man: Alias `io_uring_enter2()` to `io_uring_enter()` Ammar Faizi
2022-08-29 19:56 ` Caleb Sander
2022-08-29 3:07 ` [RFC PATCH liburing v1 4/4] test/io_uring_{enter,setup,register}: Use the exported syscall functions Ammar Faizi
2022-08-29 19:58 ` Caleb Sander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox