1999-07-01 19:58:12 +00:00
|
|
|
.\" Copyright (c) 1999 Softweyr LLC.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY Softweyr LLC AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL Softweyr LLC OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1999-07-01 19:58:12 +00:00
|
|
|
.\"
|
2021-01-10 03:23:05 +00:00
|
|
|
.Dd January 11, 2021
|
1999-07-01 19:58:12 +00:00
|
|
|
.Dt AIO_RETURN 2
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm aio_return
|
1999-07-01 21:09:57 +00:00
|
|
|
.Nd retrieve return status of asynchronous I/O operation (REALTIME)
|
2000-04-21 09:42:15 +00:00
|
|
|
.Sh LIBRARY
|
|
|
|
.Lb libc
|
1999-07-01 19:58:12 +00:00
|
|
|
.Sh SYNOPSIS
|
2001-10-01 16:09:29 +00:00
|
|
|
.In aio.h
|
2016-03-21 21:37:33 +00:00
|
|
|
.Ft ssize_t
|
1999-07-01 19:58:12 +00:00
|
|
|
.Fn aio_return "struct aiocb *iocb"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Fn aio_return
|
2002-12-18 09:22:32 +00:00
|
|
|
system call returns the final status of the asynchronous I/O request
|
1999-07-01 19:58:12 +00:00
|
|
|
associated with the structure pointed to by
|
2000-06-23 05:05:44 +00:00
|
|
|
.Fa iocb .
|
1999-07-01 19:58:12 +00:00
|
|
|
.Pp
|
2002-12-18 09:22:32 +00:00
|
|
|
The
|
1999-07-01 19:58:12 +00:00
|
|
|
.Fn aio_return
|
2002-12-18 09:22:32 +00:00
|
|
|
system call
|
1999-07-01 19:58:12 +00:00
|
|
|
should only be called once, to obtain the final status of an asynchronous
|
2006-10-07 10:49:20 +00:00
|
|
|
I/O operation once it has completed
|
|
|
|
.Xr ( aio_error 2
|
|
|
|
returns something other than
|
|
|
|
.Er EINPROGRESS ) .
|
1999-07-01 19:58:12 +00:00
|
|
|
.Sh RETURN VALUES
|
|
|
|
If the asynchronous I/O request has completed, the status is returned
|
|
|
|
as described in
|
|
|
|
.Xr read 2 ,
|
2021-01-02 23:34:20 +00:00
|
|
|
.Xr readv 2 ,
|
1999-07-01 19:58:12 +00:00
|
|
|
.Xr write 2 ,
|
2021-01-02 23:34:20 +00:00
|
|
|
.Xr writev 2 ,
|
1999-07-01 19:58:12 +00:00
|
|
|
or
|
|
|
|
.Xr fsync 2 .
|
2006-10-07 10:49:20 +00:00
|
|
|
Otherwise,
|
1999-07-01 19:58:12 +00:00
|
|
|
.Fn aio_return
|
2006-10-07 10:49:20 +00:00
|
|
|
returns \-1 and sets
|
|
|
|
.Va errno
|
1999-07-01 19:58:12 +00:00
|
|
|
to indicate the error condition.
|
|
|
|
.Sh ERRORS
|
|
|
|
The
|
|
|
|
.Fn aio_return
|
2002-12-18 09:22:32 +00:00
|
|
|
system call will fail if:
|
1999-07-01 19:58:12 +00:00
|
|
|
.Bl -tag -width Er
|
|
|
|
.It Bq Er EINVAL
|
2002-12-19 09:40:28 +00:00
|
|
|
The
|
2000-06-23 05:05:44 +00:00
|
|
|
.Fa iocb
|
2002-12-19 09:40:28 +00:00
|
|
|
argument
|
2006-10-07 10:49:20 +00:00
|
|
|
does not reference a completed asynchronous I/O request.
|
2021-01-10 03:23:05 +00:00
|
|
|
.It Bq Er EINVAL
|
|
|
|
The I/O operation was submitted with
|
|
|
|
.Fn lio_listio ,
|
|
|
|
and the value of the
|
|
|
|
.Fa aio_lio_opcode
|
|
|
|
is invalid.
|
1999-07-01 19:58:12 +00:00
|
|
|
.El
|
2002-10-22 16:12:27 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr aio_cancel 2 ,
|
|
|
|
.Xr aio_error 2 ,
|
|
|
|
.Xr aio_suspend 2 ,
|
|
|
|
.Xr aio_waitcomplete 2 ,
|
|
|
|
.Xr aio_write 2 ,
|
|
|
|
.Xr fsync 2 ,
|
|
|
|
.Xr read 2 ,
|
|
|
|
.Xr write 2 ,
|
2002-10-24 12:57:05 +00:00
|
|
|
.Xr aio 4
|
1999-07-01 19:58:12 +00:00
|
|
|
.Sh STANDARDS
|
2002-12-18 09:22:32 +00:00
|
|
|
The
|
1999-07-01 19:58:12 +00:00
|
|
|
.Fn aio_return
|
2002-12-18 09:22:32 +00:00
|
|
|
system call
|
1999-07-01 19:58:12 +00:00
|
|
|
is expected to conform to the
|
2003-01-13 10:37:11 +00:00
|
|
|
.St -p1003.1
|
1999-07-01 19:58:12 +00:00
|
|
|
standard.
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
2002-12-18 09:22:32 +00:00
|
|
|
.Fn aio_return
|
|
|
|
system call first appeared in
|
1999-07-01 19:58:12 +00:00
|
|
|
.Fx 3.0 .
|
1999-08-15 09:51:25 +00:00
|
|
|
.Sh AUTHORS
|
1999-07-01 19:58:12 +00:00
|
|
|
This
|
|
|
|
manual page was written by
|
2014-06-23 08:25:03 +00:00
|
|
|
.An Wes Peters Aq Mt wes@softweyr.com .
|