diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-10-15 17:31:17 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-10-15 17:31:17 -0600 |
commit | 11a8f2bc38c7ed69f27afa9f1051eb9fc0f6bf2c (patch) | |
tree | 56fceb0dc1b807790fa355602af36609473a1117 /src | |
parent | f303986495386cf00a37ee7ae69809387e099a1a (diff) | |
download | liburing-11a8f2bc38c7ed69f27afa9f1051eb9fc0f6bf2c.tar.gz liburing-11a8f2bc38c7ed69f27afa9f1051eb9fc0f6bf2c.tar.bz2 |
Make io_uring_prep_timeout() take timeout flags
Not in a released version yet, plan for using the flags since we
already have the IORING_TIMEOUT_ABS flag.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/liburing.h | 3 | ||||
-rw-r--r-- | src/queue.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h index 9ff17db..6d7c423 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -257,9 +257,10 @@ static inline void io_uring_prep_nop(struct io_uring_sqe *sqe) static inline void io_uring_prep_timeout(struct io_uring_sqe *sqe, struct __kernel_timespec *ts, - unsigned count) + unsigned count, unsigned flags) { io_uring_prep_rw(IORING_OP_TIMEOUT, sqe, 0, ts, 1, count); + sqe->timeout_flags = flags; } static inline unsigned io_uring_sq_space_left(struct io_uring *ring) diff --git a/src/queue.c b/src/queue.c index 766aeac..1c8896e 100644 --- a/src/queue.c +++ b/src/queue.c @@ -123,7 +123,7 @@ int io_uring_wait_cqes(struct io_uring *ring, struct io_uring_cqe **cqe_ptr, return ret; sqe = io_uring_get_sqe(ring); } - io_uring_prep_timeout(sqe, ts, wait_nr); + io_uring_prep_timeout(sqe, ts, wait_nr, 0); sqe->user_data = LIBURING_UDATA_TIMEOUT; } |