xref: /netbsd-src/lib/librt/aio_cancel.3 (revision f15acd14df22f37af99ea7d715548761c37ba52b)
1.\" $NetBSD: aio_cancel.3,v 1.5 2010/09/15 07:28:46 yamt Exp $
2.\"
3.\" Copyright (c) 1999 Softweyr LLC.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL Softweyr LLC OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/sys/aio_cancel.2,v 1.22 2003/01/13 10:37:11 tjr Exp $
28.\"
29.Dd May 17, 2010
30.Dt AIO_CANCEL 3
31.Os
32.Sh NAME
33.Nm aio_cancel
34.Nd cancel an outstanding asynchronous I/O operation (REALTIME)
35.Sh LIBRARY
36.Lb librt
37.Sh SYNOPSIS
38.In aio.h
39.Ft int
40.Fn aio_cancel "int fildes" "struct aiocb * aiocbp"
41.Sh DESCRIPTION
42The
43.Fn aio_cancel
44system call cancels the outstanding asynchronous
45I/O request for the file descriptor specified in
46.Fa fildes .
47If
48.Fa aiocbp
49is specified, only that specific asynchronous I/O request is cancelled.
50.Pp
51Normal asynchronous notification occurs for cancelled requests.
52Requests complete with an error result of
53.Er ECANCELED .
54.Sh RETURN VALUES
55The
56.Fn aio_cancel
57system call returns \-1 to indicate an error, or one of the following:
58.Bl -tag -width Er
59.It Bq Dv AIO_CANCELED
60All outstanding requests meeting the criteria specified were cancelled.
61.It Bq Dv AIO_NOTCANCELED
62Some requests were not cancelled, status for the requests should be
63checked with
64.Xr aio_error 3 .
65.It Bq Dv AIO_ALLDONE
66All of the requests meeting the criteria have finished.
67.El
68.Sh ERRORS
69An error return from
70.Fn aio_cancel
71indicates:
72.Bl -tag -width Er
73.It Bq Er EBADF
74The
75.Fa fildes
76argument is an invalid file descriptor.
77.El
78.Sh SEE ALSO
79.Xr aio 3
80.Sh STANDARDS
81The
82.Fn aio_cancel
83system call is expected to conform to the
84.St -p1003.1-2001
85standard.
86.Sh HISTORY
87The
88.Fn aio_cancel
89system call first appeared in
90.Nx 5.0 .
91