diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-05-24 12:45:38 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-07-24 18:39:11 -0600 |
commit | de23077eda61f549dbdadc4b6aa95f6e7b251552 (patch) | |
tree | 173b65d0a0dc8e21c44727ca433d495f20d1e318 /io_uring/io_uring.h | |
parent | e27f928ee1cb068ac6c18ea244351a4c90a61139 (diff) | |
download | lwn-de23077eda61f549dbdadc4b6aa95f6e7b251552.tar.gz lwn-de23077eda61f549dbdadc4b6aa95f6e7b251552.zip |
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.h | 13 |
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 |