1IO_CANCEL(2)               Linux Programmer's Manual              IO_CANCEL(2)
2
3
4

NAME

6       io_cancel - cancel an outstanding asynchronous I/O operation
7

SYNOPSIS

9       #include <libaio.h>
10
11       int io_cancel(aio_context_t ctx_id, struct iocb *iocb,
12                     struct io_event *result);
13
14       Link with -laio.
15

DESCRIPTION

17       io_cancel() attempts to cancel an asynchronous I/O operation previously
18       submitted with io_submit(2).  ctx_id is the AIO context ID of the oper‐
19       ation  to  be canceled.  If the AIO context is found, the event will be
20       canceled and then copied into the memory pointed to by  result  without
21       being placed into the completion queue.
22

RETURN VALUE

24       On success, io_cancel() returns 0.  For the failure return, see NOTES.
25

ERRORS

27       EAGAIN The iocb specified was not canceled.
28
29       EFAULT One of the data structures points to invalid data.
30
31       EINVAL The AIO context specified by ctx_id is invalid.
32
33       ENOSYS io_cancel() is not implemented on this architecture.
34

VERSIONS

36       The  asynchronous  I/O system calls first appeared in Linux 2.5, August
37       2002.
38

CONFORMING TO

40       io_cancel() is Linux-specific and should not be used in  programs  that
41       are intended to be portable.
42

NOTES

44       Glibc does not provide a wrapper function for this system call.
45
46       The  wrapper  provided  in  libaio  for io_cancel() does not follow the
47       usual C library conventions for indicating error: on error it returns a
48       negated  error  number  (the  negative  of  one of the values listed in
49       ERRORS).  If the system call is invoked via syscall(2), then the return
50       value  follows  the usual conventions for indicating an error: -1, with
51       errno set to a (positive) value that indicates the error.
52

SEE ALSO

54       io_destroy(2), io_getevents(2), io_setup(2), io_submit(2)
55

COLOPHON

57       This page is part of release 3.25 of the Linux  man-pages  project.   A
58       description  of  the project, and information about reporting bugs, can
59       be found at http://www.kernel.org/doc/man-pages/.
60
61
62
63Linux                             2008-06-18                      IO_CANCEL(2)
Impressum