mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-21 07:05:34 -04:00
liburing.h: add io_uring_prep_cancel_fd()
This sets up the cancelation request to be fd based. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -510,6 +510,13 @@ static inline void io_uring_prep_cancel(struct io_uring_sqe *sqe,
|
||||
sqe->cancel_flags = (__u32) flags;
|
||||
}
|
||||
|
||||
static inline void io_uring_prep_cancel_fd(struct io_uring_sqe *sqe, int fd,
|
||||
unsigned int flags)
|
||||
{
|
||||
io_uring_prep_rw(IORING_OP_ASYNC_CANCEL, sqe, fd, NULL, 0, 0);
|
||||
sqe->cancel_flags = (__u32) flags | IORING_ASYNC_CANCEL_FD;
|
||||
}
|
||||
|
||||
static inline void io_uring_prep_link_timeout(struct io_uring_sqe *sqe,
|
||||
struct __kernel_timespec *ts,
|
||||
unsigned flags)
|
||||
|
||||
Reference in New Issue
Block a user