summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/liburing.h8
-rw-r--r--src/include/liburing/io_uring.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index e8b6adb..b110b11 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -285,6 +285,14 @@ static inline void io_uring_prep_cancel(struct io_uring_sqe *sqe, void *user_dat
sqe->cancel_flags = flags;
}
+static inline void io_uring_prep_link_timeout(struct io_uring_sqe *sqe,
+ struct __kernel_timespec *ts,
+ unsigned flags)
+{
+ io_uring_prep_rw(IORING_OP_LINK_TIMEOUT, sqe, 0, ts, 1, 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 6877cf8..f1a118b 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -72,6 +72,7 @@ struct io_uring_sqe {
#define IORING_OP_TIMEOUT_REMOVE 12
#define IORING_OP_ACCEPT 13
#define IORING_OP_ASYNC_CANCEL 14
+#define IORING_OP_LINK_TIMEOUT 15
/*
* sqe->fsync_flags