summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-10-16 09:14:11 -0600
committerJens Axboe <axboe@kernel.dk>2019-10-16 09:14:11 -0600
commit80d8217c2fcfff2cfd6d82fb5ffe31796cc8dd5c (patch)
tree7d948e9aaec2e74a27227368e85fefad026d3b65 /src
parentb75b52e2d4373fa75c756b9f64c2f046ec5bd58b (diff)
downloadliburing-80d8217c2fcfff2cfd6d82fb5ffe31796cc8dd5c.tar.gz
liburing-80d8217c2fcfff2cfd6d82fb5ffe31796cc8dd5c.tar.bz2
Add IORING_OP_TIMEOUT_REMOVE
Add the command opcode, and add two test cases for it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src')
-rw-r--r--src/include/liburing.h7
-rw-r--r--src/include/liburing/io_uring.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 6d7c423..d7a2bc2 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -263,6 +263,13 @@ static inline void io_uring_prep_timeout(struct io_uring_sqe *sqe,
sqe->timeout_flags = flags;
}
+static inline void io_uring_prep_timeout_remove(struct io_uring_sqe *sqe,
+ __u64 user_data, unsigned flags)
+{
+ io_uring_prep_rw(IORING_OP_TIMEOUT_REMOVE, sqe, 0, (void *)user_data, 0, 0);
+ sqe->timeout_flags = flags;
+}
+
static inline unsigned io_uring_sq_space_left(struct io_uring *ring)
{
return *ring->sq.kring_entries - (ring->sq.sqe_tail - ring->sq.sqe_head);
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index b402dfe..6dc5ced 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -64,6 +64,7 @@ struct io_uring_sqe {
#define IORING_OP_SENDMSG 9
#define IORING_OP_RECVMSG 10
#define IORING_OP_TIMEOUT 11
+#define IORING_OP_TIMEOUT_REMOVE 12
/*
* sqe->fsync_flags