Skip to content

Commit

Permalink
man: update explanation for sigmask passing
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Jan 12, 2024
1 parent cc7dac4 commit 0de6020
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
18 changes: 15 additions & 3 deletions man/io_uring_submit_and_wait_timeout.3
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,23 @@ completion events, or until the timeout
.I ts
expires. The completion events are stored in the
.I cqe_ptr
array. The
array.
.PP
The
.I sigmask
specifies the set of signals to block. The prevailing signal mask is restored
before returning.
specifies the set of signals to block. If set, it is equivalent to atomically
executing the following calls:
.PP
.in +4n
.EX
sigset_t origmask;
pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
ret = io_uring_submit_and_wait_timeout(ring, cqe, wait_nr, ts, NULL);
pthread_sigmask(SIG_SETMASK, &origmask, NULL);
.EE
.in
.PP
After the caller retrieves a submission queue entry (SQE) with
.BR io_uring_get_sqe (3)
and prepares the SQE, it can be submitted with
Expand Down
18 changes: 15 additions & 3 deletions man/io_uring_wait_cqes.3
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,23 @@ IO completions from the queue belonging to the
.I ring
param, waiting for them if necessary or until the timeout
.I ts
expires. The
expires.
.PP
The
.I sigmask
specifies the set of signals to block. The prevailing signal mask is restored
before returning.
specifies the set of signals to block. If set, it is equivalent to atomically
executing the following calls:
.PP
.in +4n
.EX
sigset_t origmask;
pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
ret = io_uring_wait_cqes(ring, cqe, wait_nr, ts, NULL);
pthread_sigmask(SIG_SETMASK, &origmask, NULL);
.EE
.in
.PP
The
.I cqe_ptr
param is filled in on success with the first CQE. Callers of this function
Expand Down

0 comments on commit 0de6020

Please sign in to comment.