summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-10-15 17:31:17 -0600
committerJens Axboe <axboe@kernel.dk>2019-10-15 17:31:17 -0600
commit11a8f2bc38c7ed69f27afa9f1051eb9fc0f6bf2c (patch)
tree56fceb0dc1b807790fa355602af36609473a1117 /src
parentf303986495386cf00a37ee7ae69809387e099a1a (diff)
downloadliburing-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.h3
-rw-r--r--src/queue.c2
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;
}