Function io_cancel
pub unsafe fn io_cancel(
ctx_id: usize,
iocb: &iocb_t,
result: &mut io_event_t,
) -> Result<(), i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Attempts to cancel an iocb previously passed to io_submit
.
If the operation is successfully cancelled, the resulting event is
copied into the memory pointed to by result
without being placed
into the completion queue and 0 is returned.
§Errors
- May fail with
-EFAULT
if any of the data structures pointed to are invalid. - May fail with
-EINVAL
ifaio_context
specified byctx_id
is invalid. - May fail with
-EAGAIN
if the iocb specified was not cancelled. - Will fail with
-ENOSYS
if not implemented.