diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-01-08 15:14:07 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-01-08 15:38:01 -0700 |
commit | 6a44c6e0f7eb1d7692c96b2512974b858cfc95f0 (patch) | |
tree | 6b0bb6677f297c6d3205744eda9e0bc5139373a1 /src/liburing.h | |
parent | f93c84e1b07474a7d776403b3516feeff4f3c933 (diff) |
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 <axboe@kernel.dk>
Diffstat (limited to 'src/liburing.h')
-rw-r--r-- | src/liburing.h | 2 |
1 files changed, 2 insertions, 0 deletions
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); |