summaryrefslogtreecommitdiff
path: root/src/include/liburing.h
diff options
context:
space:
mode:
authorJames Rouzier <rouzier@gmail.com>2019-09-25 15:35:06 -0400
committerJames Rouzier <rouzier@gmail.com>2019-09-25 20:11:50 -0400
commit0b88d72b1a4bbf0a90da2067f489fbb788dc1e92 (patch)
treed877b5fe9c8093771105d23e0b042de8b632338a /src/include/liburing.h
parent46850c3a617e361c133c4da3d6e3069807ebe2b7 (diff)
downloadliburing-0b88d72b1a4bbf0a90da2067f489fbb788dc1e92.tar.gz
liburing-0b88d72b1a4bbf0a90da2067f489fbb788dc1e92.tar.bz2
Add io_uring_peek_batch_cqe()
io_uring_peek_batch_cqe(), get multiple cqe from the queue at once. Returns the number of cqe gotten. test/cq-peek-batch.c: tests io_uring_peek_batch_cqe() Signed-off-by: James Rouzier <rouzier@gmail.com>
Diffstat (limited to 'src/include/liburing.h')
-rw-r--r--src/include/liburing.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 5de8aab..6367307 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -72,6 +72,8 @@ extern int io_uring_queue_mmap(int fd, struct io_uring_params *p,
extern void io_uring_queue_exit(struct io_uring *ring);
extern int io_uring_peek_cqe(struct io_uring *ring,
struct io_uring_cqe **cqe_ptr);
+unsigned io_uring_peek_batch_cqe(struct io_uring *ring,
+ struct io_uring_cqe **cqes, unsigned count);
extern int io_uring_wait_cqe(struct io_uring *ring,
struct io_uring_cqe **cqe_ptr);
extern int io_uring_wait_cqes_timeout(struct io_uring *ring,