]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/aio_return.3
splice.2: EAGAIN can occur when called on nonblocking file descriptors
[thirdparty/man-pages.git] / man3 / aio_return.3
CommitLineData
fea681da
MK
1.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2.\"
1dd72f9c 3.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
fea681da
MK
4.\" This is free documentation; you can redistribute it and/or
5.\" modify it under the terms of the GNU General Public License as
6.\" published by the Free Software Foundation; either version 2 of
7.\" the License, or (at your option) any later version.
8.\"
9.\" The GNU General Public License's references to "object code"
10.\" and "executables" are to be interpreted as the output of any
11.\" document formatting or typesetting system, including
12.\" intermediate and printed output.
13.\"
14.\" This manual is distributed in the hope that it will be useful,
15.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17.\" GNU General Public License for more details.
18.\"
19.\" You should have received a copy of the GNU General Public
c715f741
MK
20.\" License along with this manual; if not, see
21.\" <http://www.gnu.org/licenses/>.
6a8d8745 22.\" %%%LICENSE_END
fea681da 23.\"
4b8c67d9 24.TH AIO_RETURN 3 2017-09-15 "" "Linux Programmer's Manual"
fea681da
MK
25.SH NAME
26aio_return \- get return status of asynchronous I/O operation
27.SH SYNOPSIS
fea681da 28.B "#include <aio.h>"
68e4db0a 29.PP
fea681da 30.BI "ssize_t aio_return(struct aiocb *" aiocbp );
68e4db0a 31.PP
0ad25472 32Link with \fI\-lrt\fP.
fea681da
MK
33.SH DESCRIPTION
34The
e511ffb6 35.BR aio_return ()
fea681da
MK
36function returns the final return status for the asynchronous I/O request
37with control block pointed to by
38.IR aiocbp .
2b014d76
MK
39(See
40.BR aio (7)
41for a description of the
42.I aiocb
43structure.)
dd3568a1 44.PP
fea681da 45This function should be called only once for any given request, after
a2ef1094 46.BR aio_error (3)
2f0af33b
MK
47returns something other than
48.BR EINPROGRESS .
47297adb 49.SH RETURN VALUE
fea681da
MK
50If the asynchronous I/O operation has completed, this function returns
51the value that would have been returned in case of a synchronous
898d27b4
MK
52.BR read (2),
53.BR write (2),
54.BR fsync (2)
fea681da 55or
898d27b4
MK
56.BR fdatasync (2),
57call.
e914e480 58On error, \-1 is returned, and \fIerrno\fP is set appropriately.
847e0d88 59.PP
898d27b4
MK
60If the asynchronous I/O operation has not yet completed,
61the return value and effect of
62.BR aio_return ()
63are undefined.
fea681da
MK
64.SH ERRORS
65.TP
66.B EINVAL
67.I aiocbp
68does not point at a control block for an asynchronous I/O request
69of which the return status has not been retrieved yet.
aea038d6
MK
70.TP
71.B ENOSYS
72.BR aio_return ()
73is not implemented.
793514ae
MK
74.SH VERSIONS
75The
76.BR aio_return ()
77function is available since glibc 2.1.
0b0a32b8 78.SH ATTRIBUTES
4bdf6cc9
MK
79For an explanation of the terms used in this section, see
80.BR attributes (7).
81.TS
82allbox;
83lb lb lb
84l l l.
85Interface Attribute Value
86T{
0b0a32b8 87.BR aio_return ()
4bdf6cc9
MK
88T} Thread safety MT-Safe
89.TE
47297adb 90.SH CONFORMING TO
793514ae 91POSIX.1-2001, POSIX.1-2008.
b44bee16
MK
92.SH EXAMPLE
93See
94.BR aio (7).
47297adb 95.SH SEE ALSO
fea681da
MK
96.BR aio_cancel (3),
97.BR aio_error (3),
98.BR aio_fsync (3),
99.BR aio_read (3),
100.BR aio_suspend (3),
25fa6c3d 101.BR aio_write (3),
cd587df6 102.BR lio_listio (3),
25fa6c3d 103.BR aio (7)