Skip to content

Commit

Permalink
man: add man page for io_uring_peek_batch_cqe()
Browse files Browse the repository at this point in the history
Link: #1263
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Oct 10, 2024
1 parent 5b46a7e commit 5f6617e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions man/io_uring_peek_batch_cqe.3
21 changes: 20 additions & 1 deletion man/io_uring_peek_cqe.3
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ io_uring_peek_cqe \- check if an io_uring completion event is available
.PP
.BI "int io_uring_peek_cqe(struct io_uring *" ring ","
.BI " struct io_uring_cqe **" cqe_ptr ");"
.PP
.BI "int io_uring_peek_batch_cqe(struct io_uring *" ring ","
.BI " struct io_uring_cqe **" cqe_ptrs ","
.BI " unsigned count ");"
.fi
.SH DESCRIPTION
.PP
Expand All @@ -25,12 +29,27 @@ param is filled with a valid CQE entry.
This function does not enter the kernel to wait for an event, an event
is only returned if it's already available in the CQ ring.

The
.BR io_uring_peek_batch_cqe (3)
function returns up to
.I count
request completions in
.I cqe_ptrs
belonging to the
.I ring
param, if they are readily available. It will not enter the kernel, unless the
CQ ring is in an overflow condition. Upon succesful return,
.I cqe_ptrs
are filled with the number of events indicated by the return value.

.SH RETURN VALUE
On success
.BR io_uring_peek_cqe (3)
returns
.B 0
and the cqe_ptr parameter is filled in. On failure it returns
and the cqe_ptr parameter is filled in. On success
.BR io_uring_peek_batch_cqe (3)
returns the number of completions filled in. On failure, they may return
.BR -EAGAIN .
.SH SEE ALSO
.BR io_uring_submit (3),
Expand Down

0 comments on commit 5f6617e

Please sign in to comment.