From 6a44c6e0f7eb1d7692c96b2512974b858cfc95f0 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 8 Jan 2019 15:14:07 -0700 Subject: Add option for getting a completion without waiting This now exposes two helpers: io_uring_get_completion() Return a completion, if we have one (or more) available in the ring io_uring_wait_completion() Return a completion, waiting for it if necessary Signed-off-by: Jens Axboe --- src/liburing.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/liburing.h') diff --git a/src/liburing.h b/src/liburing.h index 454591a..8c81978 100644 --- a/src/liburing.h +++ b/src/liburing.h @@ -51,6 +51,8 @@ extern void io_uring_queue_exit(int fd, struct io_uring_sq *sq, struct io_uring_cq *cq); extern int io_uring_get_completion(int fd, struct io_uring_cq *cq, struct io_uring_event **ev_ptr); +extern int io_uring_wait_completion(int fd, struct io_uring_cq *cq, + struct io_uring_event **ev_ptr); extern int io_uring_submit(int fd, struct io_uring_sq *sq); extern struct io_uring_iocb *io_uring_get_iocb(struct io_uring_sq *sq); -- cgit