summaryrefslogtreecommitdiff
path: root/test
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 /test
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 'test')
-rw-r--r--test/timeout.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/timeout.c b/test/timeout.c
index 66056ae..80b1a31 100644
--- a/test/timeout.c
+++ b/test/timeout.c
@@ -61,7 +61,7 @@ static int test_single_timeout_many(struct io_uring *ring)
ts.tv_sec = TIMEOUT_MSEC / 1000;
ts.tv_nsec = 0;
- io_uring_prep_timeout(sqe, &ts, 0);
+ io_uring_prep_timeout(sqe, &ts, 0, 0);
ret = io_uring_submit(ring);
if (ret <= 0) {
@@ -117,7 +117,7 @@ static int test_single_timeout_nr(struct io_uring *ring)
ts.tv_sec = TIMEOUT_MSEC / 1000;
ts.tv_nsec = 0;
- io_uring_prep_timeout(sqe, &ts, 2);
+ io_uring_prep_timeout(sqe, &ts, 2, 0);
sqe = io_uring_get_sqe(ring);
io_uring_prep_nop(sqe);
@@ -242,7 +242,7 @@ static int test_single_timeout(struct io_uring *ring)
ts.tv_sec = TIMEOUT_MSEC / 1000;
ts.tv_nsec = 0;
- io_uring_prep_timeout(sqe, &ts, 0);
+ io_uring_prep_timeout(sqe, &ts, 0, 0);
ret = io_uring_submit(ring);
if (ret <= 0) {
@@ -296,8 +296,7 @@ static int test_single_timeout_abs(struct io_uring *ring)
clock_gettime(CLOCK_MONOTONIC, &abs_ts);
ts.tv_sec = abs_ts.tv_sec + 1;
ts.tv_nsec = abs_ts.tv_nsec;
- io_uring_prep_timeout(sqe, &ts, 0);
- sqe->timeout_flags |= IORING_TIMEOUT_ABS;
+ io_uring_prep_timeout(sqe, &ts, 0, IORING_TIMEOUT_ABS);
ret = io_uring_submit(ring);
if (ret <= 0) {
@@ -346,7 +345,7 @@ static int test_single_timeout_exit(struct io_uring *ring)
ts.tv_sec = 30;
ts.tv_nsec = 0;
- io_uring_prep_timeout(sqe, &ts, 0);
+ io_uring_prep_timeout(sqe, &ts, 0, 0);
ret = io_uring_submit(ring);
if (ret <= 0) {