xref: /freebsd/lib/libsys/aio_cancel.2 (revision 8269e7673cf033aba67dab8264fe719920c70f87)
1*8269e767SBrooks Davis.\" Copyright (c) 1999 Softweyr LLC.
2*8269e767SBrooks Davis.\" All rights reserved.
3*8269e767SBrooks Davis.\"
4*8269e767SBrooks Davis.\" Redistribution and use in source and binary forms, with or without
5*8269e767SBrooks Davis.\" modification, are permitted provided that the following conditions
6*8269e767SBrooks Davis.\" are met:
7*8269e767SBrooks Davis.\" 1. Redistributions of source code must retain the above copyright
8*8269e767SBrooks Davis.\"    notice, this list of conditions and the following disclaimer.
9*8269e767SBrooks Davis.\" 2. Redistributions in binary form must reproduce the above copyright
10*8269e767SBrooks Davis.\"    notice, this list of conditions and the following disclaimer in the
11*8269e767SBrooks Davis.\"    documentation and/or other materials provided with the distribution.
12*8269e767SBrooks Davis.\"
13*8269e767SBrooks Davis.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``AS IS'' AND
14*8269e767SBrooks Davis.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*8269e767SBrooks Davis.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*8269e767SBrooks Davis.\" ARE DISCLAIMED.  IN NO EVENT SHALL Softweyr LLC OR CONTRIBUTORS BE LIABLE
17*8269e767SBrooks Davis.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*8269e767SBrooks Davis.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*8269e767SBrooks Davis.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*8269e767SBrooks Davis.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*8269e767SBrooks Davis.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*8269e767SBrooks Davis.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*8269e767SBrooks Davis.\" SUCH DAMAGE.
24*8269e767SBrooks Davis.\"
25*8269e767SBrooks Davis.Dd January 19, 2000
26*8269e767SBrooks Davis.Dt AIO_CANCEL 2
27*8269e767SBrooks Davis.Os
28*8269e767SBrooks Davis.Sh NAME
29*8269e767SBrooks Davis.Nm aio_cancel
30*8269e767SBrooks Davis.Nd cancel an outstanding asynchronous I/O operation (REALTIME)
31*8269e767SBrooks Davis.Sh LIBRARY
32*8269e767SBrooks Davis.Lb libc
33*8269e767SBrooks Davis.Sh SYNOPSIS
34*8269e767SBrooks Davis.In aio.h
35*8269e767SBrooks Davis.Ft int
36*8269e767SBrooks Davis.Fn aio_cancel "int fildes" "struct aiocb *iocb"
37*8269e767SBrooks Davis.Sh DESCRIPTION
38*8269e767SBrooks DavisThe
39*8269e767SBrooks Davis.Fn aio_cancel
40*8269e767SBrooks Davissystem call cancels the outstanding asynchronous
41*8269e767SBrooks DavisI/O request for the file descriptor specified in
42*8269e767SBrooks Davis.Fa fildes .
43*8269e767SBrooks DavisIf
44*8269e767SBrooks Davis.Fa iocb
45*8269e767SBrooks Davisis specified, only that specific asynchronous I/O request is cancelled.
46*8269e767SBrooks Davis.Pp
47*8269e767SBrooks DavisNormal asynchronous notification occurs for cancelled requests.
48*8269e767SBrooks DavisRequests complete with an error result of
49*8269e767SBrooks Davis.Er ECANCELED .
50*8269e767SBrooks Davis.Sh RESTRICTIONS
51*8269e767SBrooks DavisThe
52*8269e767SBrooks Davis.Fn aio_cancel
53*8269e767SBrooks Davissystem call does not cancel asynchronous I/O requests for raw disk devices.
54*8269e767SBrooks DavisThe
55*8269e767SBrooks Davis.Fn aio_cancel
56*8269e767SBrooks Davissystem call will always return
57*8269e767SBrooks Davis.Dv AIO_NOTCANCELED
58*8269e767SBrooks Davisfor file descriptors associated with raw disk devices.
59*8269e767SBrooks Davis.Sh RETURN VALUES
60*8269e767SBrooks DavisThe
61*8269e767SBrooks Davis.Fn aio_cancel
62*8269e767SBrooks Davissystem call returns -1 to indicate an error, or one of the following:
63*8269e767SBrooks Davis.Bl -tag -width Dv
64*8269e767SBrooks Davis.It Bq Dv AIO_CANCELED
65*8269e767SBrooks DavisAll outstanding requests meeting the criteria specified were cancelled.
66*8269e767SBrooks Davis.It Bq Dv AIO_NOTCANCELED
67*8269e767SBrooks DavisSome requests were not cancelled, status for the requests should be
68*8269e767SBrooks Davischecked with
69*8269e767SBrooks Davis.Xr aio_error 2 .
70*8269e767SBrooks Davis.It Bq Dv AIO_ALLDONE
71*8269e767SBrooks DavisAll of the requests meeting the criteria have finished.
72*8269e767SBrooks Davis.El
73*8269e767SBrooks Davis.Sh ERRORS
74*8269e767SBrooks DavisAn error return from
75*8269e767SBrooks Davis.Fn aio_cancel
76*8269e767SBrooks Davisindicates:
77*8269e767SBrooks Davis.Bl -tag -width Er
78*8269e767SBrooks Davis.It Bq Er EBADF
79*8269e767SBrooks DavisThe
80*8269e767SBrooks Davis.Fa fildes
81*8269e767SBrooks Davisargument
82*8269e767SBrooks Davisis an invalid file descriptor.
83*8269e767SBrooks Davis.El
84*8269e767SBrooks Davis.Sh SEE ALSO
85*8269e767SBrooks Davis.Xr aio_error 2 ,
86*8269e767SBrooks Davis.Xr aio_read 2 ,
87*8269e767SBrooks Davis.Xr aio_return 2 ,
88*8269e767SBrooks Davis.Xr aio_suspend 2 ,
89*8269e767SBrooks Davis.Xr aio_write 2 ,
90*8269e767SBrooks Davis.Xr aio 4
91*8269e767SBrooks Davis.Sh STANDARDS
92*8269e767SBrooks DavisThe
93*8269e767SBrooks Davis.Fn aio_cancel
94*8269e767SBrooks Davissystem call is expected to conform to the
95*8269e767SBrooks Davis.St -p1003.1
96*8269e767SBrooks Davisstandard.
97*8269e767SBrooks Davis.Sh HISTORY
98*8269e767SBrooks DavisThe
99*8269e767SBrooks Davis.Fn aio_cancel
100*8269e767SBrooks Davissystem call first appeared in
101*8269e767SBrooks Davis.Fx 3.0 .
102*8269e767SBrooks DavisThe first functional implementation of
103*8269e767SBrooks Davis.Fn aio_cancel
104*8269e767SBrooks Davisappeared in
105*8269e767SBrooks Davis.Fx 4.0 .
106*8269e767SBrooks Davis.Sh AUTHORS
107*8269e767SBrooks Davis.An -nosplit
108*8269e767SBrooks DavisThis
109*8269e767SBrooks Davismanual page was originally written by
110*8269e767SBrooks Davis.An Wes Peters Aq Mt wes@softweyr.com .
111*8269e767SBrooks Davis.An Christopher M Sedore Aq Mt cmsedore@maxwell.syr.edu
112*8269e767SBrooks Davisupdated it when
113*8269e767SBrooks Davis.Fn aio_cancel
114*8269e767SBrooks Daviswas implemented for
115*8269e767SBrooks Davis.Fx 4.0 .
116