summaryrefslogtreecommitdiff
path: root/src/include/liburing/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-09-20 17:48:27 -0600
committerJens Axboe <axboe@kernel.dk>2019-09-20 19:49:30 -0600
commit3ad9074b7962e1ce97f744534650fbf14d32f465 (patch)
tree91cdaf29669158cddc0e03f257287cde93107de8 /src/include/liburing/io_uring.h
parent5109ed3ec733968cc1aa6457020d8cc1389135bb (diff)
downloadliburing-3ad9074b7962e1ce97f744534650fbf14d32f465.tar.gz
liburing-3ad9074b7962e1ce97f744534650fbf14d32f465.tar.bz2
Add TIMEOUT support
Add support for the current TIMEOUT variant. This allows passing in a timeout and event count, first of which will trigger the completion of the timeout command. If the timeout is hit, the command completes with cqe->res == -ETIME. If the asked number of events complete first, the command completes with cqe->res == 0. test/timeout.c tests a variety of timeout conditions. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src/include/liburing/io_uring.h')
-rw-r--r--src/include/liburing/io_uring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index 96ee9d9..cf3101d 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -61,6 +61,7 @@ struct io_uring_sqe {
#define IORING_OP_SYNC_FILE_RANGE 8
#define IORING_OP_SENDMSG 9
#define IORING_OP_RECVMSG 10
+#define IORING_OP_TIMEOUT 11
/*
* sqe->fsync_flags