]>
Commit | Line | Data |
---|---|---|
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 | .\" |
fe0fefbf | 24 | .TH AIO_RETURN 3 2015-03-02 "" "Linux Programmer's Manual" |
fea681da MK |
25 | .SH NAME |
26 | aio_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 | 32 | Link with \fI\-lrt\fP. |
fea681da MK |
33 | .SH DESCRIPTION |
34 | The | |
e511ffb6 | 35 | .BR aio_return () |
fea681da MK |
36 | function returns the final return status for the asynchronous I/O request |
37 | with control block pointed to by | |
38 | .IR aiocbp . | |
2b014d76 MK |
39 | (See |
40 | .BR aio (7) | |
41 | for a description of the | |
42 | .I aiocb | |
43 | structure.) | |
fea681da MK |
44 | .LP |
45 | This function should be called only once for any given request, after | |
a2ef1094 | 46 | .BR aio_error (3) |
2f0af33b MK |
47 | returns something other than |
48 | .BR EINPROGRESS . | |
47297adb | 49 | .SH RETURN VALUE |
fea681da MK |
50 | If the asynchronous I/O operation has completed, this function returns |
51 | the 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 | 55 | or |
898d27b4 MK |
56 | .BR fdatasync (2), |
57 | call. | |
e914e480 | 58 | On error, \-1 is returned, and \fIerrno\fP is set appropriately. |
847e0d88 | 59 | .PP |
898d27b4 MK |
60 | If the asynchronous I/O operation has not yet completed, |
61 | the return value and effect of | |
62 | .BR aio_return () | |
63 | are undefined. | |
fea681da MK |
64 | .SH ERRORS |
65 | .TP | |
66 | .B EINVAL | |
67 | .I aiocbp | |
68 | does not point at a control block for an asynchronous I/O request | |
69 | of which the return status has not been retrieved yet. | |
aea038d6 MK |
70 | .TP |
71 | .B ENOSYS | |
72 | .BR aio_return () | |
73 | is not implemented. | |
793514ae MK |
74 | .SH VERSIONS |
75 | The | |
76 | .BR aio_return () | |
77 | function is available since glibc 2.1. | |
0b0a32b8 | 78 | .SH ATTRIBUTES |
4bdf6cc9 MK |
79 | For an explanation of the terms used in this section, see |
80 | .BR attributes (7). | |
81 | .TS | |
82 | allbox; | |
83 | lb lb lb | |
84 | l l l. | |
85 | Interface Attribute Value | |
86 | T{ | |
0b0a32b8 | 87 | .BR aio_return () |
4bdf6cc9 MK |
88 | T} Thread safety MT-Safe |
89 | .TE | |
47297adb | 90 | .SH CONFORMING TO |
793514ae | 91 | POSIX.1-2001, POSIX.1-2008. |
b44bee16 MK |
92 | .SH EXAMPLE |
93 | See | |
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) |