summaryrefslogtreecommitdiff
path: root/io_uring/io_uring.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-05-24 12:45:38 -0600
committerJens Axboe <axboe@kernel.dk>2022-07-24 18:39:11 -0600
commitde23077eda61f549dbdadc4b6aa95f6e7b251552 (patch)
tree173b65d0a0dc8e21c44727ca433d495f20d1e318 /io_uring/io_uring.h
parente27f928ee1cb068ac6c18ea244351a4c90a61139 (diff)
io_uring: set completion results upfront
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r--io_uring/io_uring.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
new file mode 100644
index 000000000000..522e65219757
--- /dev/null
+++ b/io_uring/io_uring.h
@@ -0,0 +1,13 @@
+#ifndef IOU_CORE_H
+#define IOU_CORE_H
+
+#include <linux/errno.h>
+#include "io_uring_types.h"
+
+static inline void io_req_set_res(struct io_kiocb *req, s32 res, u32 cflags)
+{
+ req->cqe.res = res;
+ req->cqe.flags = cflags;
+}
+
+#endif