OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / 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 2013-07-04  "" "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 .sp
30 .BI "ssize_t aio_return(struct aiocb *" aiocbp );
31 .sp
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 .LP
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
59 If the asynchronous I/O operation has not yet completed,
60 the return value and effect of
61 .BR aio_return ()
62 are undefined.
63 .SH ERRORS
64 .TP
65 .B EINVAL
66 .I aiocbp
67 does not point at a control block for an asynchronous I/O request
68 of which the return status has not been retrieved yet.
69 .TP
70 .B ENOSYS
71 .BR aio_return ()
72 is not implemented.
73 .SH VERSIONS
74 The
75 .BR aio_return ()
76 function is available since glibc 2.1.
77 .SH ATTRIBUTES
78 .SS Multithreading (see pthreads(7))
79 The
80 .BR aio_return ()
81 function is thread-safe.
82 .SH CONFORMING TO
83 POSIX.1-2001, POSIX.1-2008.
84 .SH EXAMPLE
85 See
86 .BR aio (7).
87 .SH SEE ALSO
88 .BR aio_cancel (3),
89 .BR aio_error (3),
90 .BR aio_fsync (3),
91 .BR aio_read (3),
92 .BR aio_suspend (3),
93 .BR aio_write (3),
94 .BR lio_listio (3),
95 .BR aio (7)
96 .SH COLOPHON
97 This page is part of release 3.68 of the Linux
98 .I man-pages
99 project.
100 A description of the project,
101 information about reporting bugs,
102 and the latest version of this page,
103 can be found at
104 \%http://www.kernel.org/doc/man\-pages/.