diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-10-29 08:46:31 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-10-29 08:46:31 -0600 |
commit | aa3c760ed21abb26777f5c438911de21b2d16ab5 (patch) | |
tree | 7b41b60802d4bd5a6c66692b56a4daa0ed6a20b2 /src/include/liburing.h | |
parent | 6cfaab20bf2991df8223f1fd8161ecda26fc408d (diff) | |
download | liburing-aa3c760ed21abb26777f5c438911de21b2d16ab5.tar.gz liburing-aa3c760ed21abb26777f5c438911de21b2d16ab5.tar.bz2 |
Add IORING_OP_ASYNC_CANCEL and prep helper
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'src/include/liburing.h')
-rw-r--r-- | src/include/liburing.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/liburing.h b/src/include/liburing.h index 4e89a8a..e8b6adb 100644 --- a/src/include/liburing.h +++ b/src/include/liburing.h @@ -278,6 +278,13 @@ static inline void io_uring_prep_accept(struct io_uring_sqe *sqe, int fd, sqe->accept_flags = flags; } +static inline void io_uring_prep_cancel(struct io_uring_sqe *sqe, void *user_data, + int flags) +{ + io_uring_prep_rw(IORING_OP_ASYNC_CANCEL, sqe, 0, user_data, 0, 0); + sqe->cancel_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); |