1IO_CANCEL(2) Linux Programmer's Manual IO_CANCEL(2)
2
3
4
6 io_cancel - Cancel an outstanding asynchronous I/O operation
7
9 #include <libaio.>
10
11
12 int io_cancel (aio_context_t ctx_id, struct iocb *iocb,
13 struct io_event *result);
14
15
17 io_cancel() attempts to cancel an asynchronous I/O operation previously
18 submitted with the io_submit system call. ctx_id is the AIO context ID
19 of the operation to be cancelled. If the AIO context is found, the
20 event will be cancelled and then copied into the memory pointed to by
21 result without being placed into the completion queue.
22
23
25 io_cancel() returns 0 on success; otherwise, it returns one of the er‐
26 rors listed in the "Errors" section.
27
28
30 EINVAL The AIO context specified by ctx_id is invalid.
31
32
33 EFAULT One of the data structures points to invalid data.
34
35
36 EAGAIN The iocb specified was not cancelled.
37
38
39 ENOSYS io_cancel() is not implemented on this architecture.
40
41
43 The asynchronous I/O system calls first appeared in Linux 2.5, August
44 2002.
45
46
48 io_cancel() is Linux specific and should not be used in programs that
49 are intended to be portable.
50
51
53 io_setup(2), io_destroy(2), io_getevents(2), io_submit(2).
54
55
57 The asynchronous I/O system calls were written by Benjamin LaHaise.
58
59
61 Kent Yoder.
62
63
64
65Linux 2.4 2003-02-21 IO_CANCEL(2)