]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/aio_return.3
getent.1, intro.1, time.1, _exit.2, alloc_hugepages.2, arch_prctl.2, clock_getres...
[thirdparty/man-pages.git] / man3 / aio_return.3
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 2015-03-02 "" "Linux Programmer's Manual"
25 .SH NAME
26 aio_return \- get return status of asynchronous I/O operation
27 .SH SYNOPSIS
28 .B "#include <aio.h>"
29 .PP
30 .BI "ssize_t aio_return(struct aiocb *" aiocbp );
31 .PP
32 Link with \fI\-lrt\fP.
33 .SH DESCRIPTION
34 The
35 .BR aio_return ()
36 function returns the final return status for the asynchronous I/O request
37 with control block pointed to by
38 .IR aiocbp .
39 (See
40 .BR aio (7)
41 for a description of the
42 .I aiocb
43 structure.)
44 .PP
45 This function should be called only once for any given request, after
46 .BR aio_error (3)
47 returns something other than
48 .BR EINPROGRESS .
49 .SH RETURN VALUE
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
52 .BR read (2),
53 .BR write (2),
54 .BR fsync (2)
55 or
56 .BR fdatasync (2),
57 call.
58 On error, \-1 is returned, and \fIerrno\fP is set appropriately.
59 .PP
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.
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.
70 .TP
71 .B ENOSYS
72 .BR aio_return ()
73 is not implemented.
74 .SH VERSIONS
75 The
76 .BR aio_return ()
77 function is available since glibc 2.1.
78 .SH ATTRIBUTES
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{
87 .BR aio_return ()
88 T} Thread safety MT-Safe
89 .TE
90 .SH CONFORMING TO
91 POSIX.1-2001, POSIX.1-2008.
92 .SH EXAMPLE
93 See
94 .BR aio (7).
95 .SH SEE ALSO
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),
101 .BR aio_write (3),
102 .BR lio_listio (3),
103 .BR aio (7)