source: trunk/packages/xen-3.1/xen-3.1/tools/libaio/man/io_cancel.3 @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 1.7 KB
Line 
1.TH io_cancel 2 2002-09-03 "Linux 2.4" "Linux AIO"
2.SH NAME
3io_cancel \- Cancel io requests
4.SH SYNOPSIS
5.nf
6.B #include <errno.h>
7.sp
8.br
9.B #include <libaio.h>
10.sp
11.br
12.BI "int io_cancel(io_context_t ctx, struct iocb *iocb)"
13.br
14.sp
15struct iocb {
16        void            *data; /* Return in the io completion event */
17        unsigned        key;    /* For use in identifying io requests */
18        short           aio_lio_opcode;
19        short           aio_reqprio;    /* Not used */
20        int             aio_fildes;
21};
22.fi
23.SH DESCRIPTION
24Attempts to cancel an iocb previously passed to io_submit.  If
25the operation is successfully cancelled, the resulting event is
26copied into the memory pointed to by result without being placed
27into the completion queue.
28.PP
29When one or more requests are asynchronously processed, it might be
30useful in some situations to cancel a selected operation, e.g., if it
31becomes obvious that the written data is no longer accurate and would
32have to be overwritten soon.  As an example, assume an application, which
33writes data in files in a situation where new incoming data would have
34to be written in a file which will be updated by an enqueued request.
35.SH "RETURN VALUES"
360 is returned on success , otherwise returns Errno.
37.SH ERRORS
38.TP
39.B EFAULT
40If any of the data structures pointed to are invalid.
41.TP
42.B EINVAL
43If aio_context specified by ctx_id is
44invalid. 
45.TP
46.B EAGAIN
47If the iocb specified was not
48cancelled. 
49.TP
50.B ENOSYS
51if not implemented.
52.SH "SEE ALSO"
53.BR io(3),
54.BR io_fsync(3),
55.BR io_getevents(3),
56.BR io_prep_fsync(3),
57.BR io_prep_pread(3),
58.BR io_prep_pwrite(3),
59.BR io_queue_init(3),
60.BR io_queue_release(3),
61.BR io_queue_run(3),
62.BR io_queue_wait(3),
63.BR io_set_callback(3),
64.BR io_submit(3),
65.BR errno(3)
Note: See TracBrowser for help on using the repository browser.