summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJeff Moyer <jmoyer@redhat.com>2019-02-08 13:32:21 -0500
committerJens Axboe <axboe@kernel.dk>2019-02-08 11:33:28 -0700
commit3ceb15c1327e6bb6105a0dec97421308e5567f02 (patch)
treea09828caf907465542d8cce7e0b95d743b66c2f0 /man
parent9f3bec5b0917e94be2f8020cff937a585b5d4ddd (diff)
downloadliburing-3ceb15c1327e6bb6105a0dec97421308e5567f02.tar.gz
liburing-3ceb15c1327e6bb6105a0dec97421308e5567f02.tar.bz2
Add sigmask parameter to io_uring_enter
Update liburing and io_uring_enter.2 to match the kernel. Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'man')
-rw-r--r--man/io_uring_enter.245
1 files changed, 44 insertions, 1 deletions
diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index eeabced..d0d12ad 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -13,7 +13,8 @@ io_uring_enter \- initiate and/or complete asynchronous I/O
.BR "#include <linux/io_uring.h>"
.PP
.BI "int io_uring_enter(unsigned int " fd ", unsigned int " to_submit ,
-.BI " unsigned int " min_complete ", unsigned int " flags)
+.BI " unsigned int " min_complete ", unsigned int " flags ,
+.BI " sigset_t *" sig ", size_t " sigsz)
.fi
.PP
.SH DESCRIPTION
@@ -52,6 +53,48 @@ flag in
as for IRQ driven I/O, the application can just check the completion
queue without entering the kernel.
+.I sig
+is a pointer to a signal mask (see
+.BR sigprocmask (2));
+.I sigsz
+is the size of the
+.I sig
+argument. If
+.I sig
+is not NULL,
+.BR io_uring_enter ()
+first replaces the current signal mask by the one pointed to by
+.I sig,
+then waits for events to become available in the completion queue, and
+then restores the original signal mask. The following
+.BI io_uring_enter ()
+call:
+.PP
+.in +4n
+.EX
+ret = io_uring_enter(fd, 0, 1,
+ IORING_ENTER_GETEVENTS, &sig, sigsz);
+.EE
+.in
+.PP
+is equivalent to
+.I atomically
+executing the following calls:
+.PP
+.in +4n
+.EX
+pthread_sigmask(SIG_SETMASK, &sig, &orig);
+ret = io_uring_enter(fd, 0, 1, IORING_ENTER_GETEVENTS, NULL, 0);
+pthread_sigmask(SIG_SETMASK, &orig, NULL);
+.EE
+.in
+.PP
+See the description of
+.BR pselect (2)
+for an explanation of why the
+.I sig
+parameter is necessary.
+
Submission queue entries are represented using the following data
structure:
.PP