mount_setattr.2: ffix
[man-pages.git] / man3 / aio_return.3
blobf92a665c5f77c4c7f5e5ebb478d7709cb0622d3a
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
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
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .TH AIO_RETURN 3 2021-03-22  "" "Linux Programmer's Manual"
25 .SH NAME
26 aio_return \- get return status of asynchronous I/O operation
27 .SH SYNOPSIS
28 .nf
29 .B "#include <aio.h>"
30 .PP
31 .BI "ssize_t aio_return(struct aiocb *" aiocbp );
32 .PP
33 Link with \fI\-lrt\fP.
34 .fi
35 .SH DESCRIPTION
36 The
37 .BR aio_return ()
38 function returns the final return status for the asynchronous I/O request
39 with control block pointed to by
40 .IR aiocbp .
41 (See
42 .BR aio (7)
43 for a description of the
44 .I aiocb
45 structure.)
46 .PP
47 This function should be called only once for any given request, after
48 .BR aio_error (3)
49 returns something other than
50 .BR EINPROGRESS .
51 .SH RETURN VALUE
52 If the asynchronous I/O operation has completed, this function returns
53 the value that would have been returned in case of a synchronous
54 .BR read (2),
55 .BR write (2),
56 .BR fsync (2),
58 .BR fdatasync (2),
59 call.
60 On error, \-1 is returned, and \fIerrno\fP is set to indicate the error.
61 .PP
62 If the asynchronous I/O operation has not yet completed,
63 the return value and effect of
64 .BR aio_return ()
65 are undefined.
66 .SH ERRORS
67 .TP
68 .B EINVAL
69 .I aiocbp
70 does not point at a control block for an asynchronous I/O request
71 of which the return status has not been retrieved yet.
72 .TP
73 .B ENOSYS
74 .BR aio_return ()
75 is not implemented.
76 .SH VERSIONS
77 The
78 .BR aio_return ()
79 function is available since glibc 2.1.
80 .SH ATTRIBUTES
81 For an explanation of the terms used in this section, see
82 .BR attributes (7).
83 .ad l
84 .nh
85 .TS
86 allbox;
87 lbx lb lb
88 l l l.
89 Interface       Attribute       Value
91 .BR aio_return ()
92 T}      Thread safety   MT-Safe
93 .TE
94 .hy
95 .ad
96 .sp 1
97 .SH CONFORMING TO
98 POSIX.1-2001, POSIX.1-2008.
99 .SH EXAMPLES
101 .BR aio (7).
102 .SH SEE ALSO
103 .BR aio_cancel (3),
104 .BR aio_error (3),
105 .BR aio_fsync (3),
106 .BR aio_read (3),
107 .BR aio_suspend (3),
108 .BR aio_write (3),
109 .BR lio_listio (3),
110 .BR aio (7)