summaryrefslogtreecommitdiff
path: root/src/include/liburing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/liburing.h')
-rw-r--r--src/include/liburing.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h
index c4189b1..0b631ac 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -10,6 +10,7 @@ extern "C" {
#include <signal.h>
#include <string.h>
#include <inttypes.h>
+#include <time.h>
#include "liburing/compat.h"
#include "liburing/io_uring.h"
#include "liburing/barrier.h"
@@ -234,6 +235,12 @@ static inline void io_uring_prep_nop(struct io_uring_sqe *sqe)
sqe->opcode = IORING_OP_NOP;
}
+static inline void io_uring_prep_timeout(struct io_uring_sqe *sqe,
+ struct timespec *ts, unsigned count)
+{
+ io_uring_prep_rw(IORING_OP_TIMEOUT, sqe, 0, ts, 1, count);
+}
+
#ifdef __cplusplus
}
#endif