xref: /freebsd/lib/libsys/aio_error.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 2, 2021
26*8269e767SBrooks Davis.Dt AIO_ERROR 2
27*8269e767SBrooks Davis.Os
28*8269e767SBrooks Davis.Sh NAME
29*8269e767SBrooks Davis.Nm aio_error
30*8269e767SBrooks Davis.Nd retrieve error status of 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_error "const struct aiocb *iocb"
37*8269e767SBrooks Davis.Sh DESCRIPTION
38*8269e767SBrooks DavisThe
39*8269e767SBrooks Davis.Fn aio_error
40*8269e767SBrooks Davissystem call returns the error status of the asynchronous I/O request
41*8269e767SBrooks Davisassociated with the structure pointed to by
42*8269e767SBrooks Davis.Fa iocb .
43*8269e767SBrooks Davis.Sh RETURN VALUES
44*8269e767SBrooks DavisIf the asynchronous I/O request has completed successfully,
45*8269e767SBrooks Davis.Fn aio_error
46*8269e767SBrooks Davisreturns 0.
47*8269e767SBrooks DavisIf the request has not yet completed,
48*8269e767SBrooks Davis.Er EINPROGRESS
49*8269e767SBrooks Davisis returned.
50*8269e767SBrooks DavisIf the request has completed unsuccessfully the error
51*8269e767SBrooks Davisstatus is returned as described in
52*8269e767SBrooks Davis.Xr read 2 ,
53*8269e767SBrooks Davis.Xr readv 2 ,
54*8269e767SBrooks Davis.Xr write 2 ,
55*8269e767SBrooks Davis.Xr writev 2 ,
56*8269e767SBrooks Davisor
57*8269e767SBrooks Davis.Xr fsync 2 .
58*8269e767SBrooks DavisOn failure,
59*8269e767SBrooks Davis.Fn aio_error
60*8269e767SBrooks Davisreturns
61*8269e767SBrooks Davis.Dv -1
62*8269e767SBrooks Davisand sets
63*8269e767SBrooks Davis.Dv errno
64*8269e767SBrooks Davisto indicate the error condition.
65*8269e767SBrooks Davis.Sh ERRORS
66*8269e767SBrooks DavisThe
67*8269e767SBrooks Davis.Fn aio_error
68*8269e767SBrooks Davissystem call will fail if:
69*8269e767SBrooks Davis.Bl -tag -width Er
70*8269e767SBrooks Davis.It Bq Er EINVAL
71*8269e767SBrooks DavisThe
72*8269e767SBrooks Davis.Fa iocb
73*8269e767SBrooks Davisargument
74*8269e767SBrooks Davisdoes not reference an outstanding asynchronous I/O request.
75*8269e767SBrooks Davis.El
76*8269e767SBrooks Davis.Sh SEE ALSO
77*8269e767SBrooks Davis.Xr aio_cancel 2 ,
78*8269e767SBrooks Davis.Xr aio_read 2 ,
79*8269e767SBrooks Davis.Xr aio_readv 2 ,
80*8269e767SBrooks Davis.Xr aio_return 2 ,
81*8269e767SBrooks Davis.Xr aio_suspend 2 ,
82*8269e767SBrooks Davis.Xr aio_write 2 ,
83*8269e767SBrooks Davis.Xr aio_writev 2 ,
84*8269e767SBrooks Davis.Xr fsync 2 ,
85*8269e767SBrooks Davis.Xr read 2 ,
86*8269e767SBrooks Davis.Xr write 2 ,
87*8269e767SBrooks Davis.Xr aio 4
88*8269e767SBrooks Davis.Sh STANDARDS
89*8269e767SBrooks DavisThe
90*8269e767SBrooks Davis.Fn aio_error
91*8269e767SBrooks Davissystem call
92*8269e767SBrooks Davisis expected to conform to the
93*8269e767SBrooks Davis.St -p1003.1
94*8269e767SBrooks Davisstandard.
95*8269e767SBrooks Davis.Sh HISTORY
96*8269e767SBrooks DavisThe
97*8269e767SBrooks Davis.Fn aio_error
98*8269e767SBrooks Davissystem call first appeared in
99*8269e767SBrooks Davis.Fx 3.0 .
100*8269e767SBrooks Davis.Sh AUTHORS
101*8269e767SBrooks DavisThis
102*8269e767SBrooks Davismanual page was written by
103*8269e767SBrooks Davis.An Wes Peters Aq Mt wes@softweyr.com .
104