OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / aio_error.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_ERROR 3 2013-07-04  "" "Linux Programmer's Manual"
25 .SH NAME
26 aio_error \- get error status of asynchronous I/O operation
27 .SH SYNOPSIS
28 .B "#include <aio.h>"
29 .sp
30 .BI "int aio_error(const struct aiocb *" aiocbp );
31 .sp
32 Link with \fI\-lrt\fP.
33 .SH DESCRIPTION
34 The
35 .BR aio_error ()
36 function returns the error 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 .SH RETURN VALUE
45 This function returns one of the following:
46 .IP * 3
47 .BR EINPROGRESS ,
48 if the request has not been
49 completed yet.
50 .IP *
51 .BR ECANCELED ,
52 if the request was canceled.
53 .IP *
54 0, if the request completed successfully.
55 .IP *
56 A positive error number, if the asynchronous I/O operation failed.
57 This is the same value that would have been stored in the
58 .I errno
59 variable in the case of a synchronous
60 .BR read (2),
61 .BR write (2),
62 .BR fsync (2),
63 or
64 .BR fdatasync (2)
65 call.
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 (see
72 .BR aio_return (3))
73 has not been retrieved yet.
74 .TP
75 .B ENOSYS
76 .BR aio_error ()
77 is not implemented.
78 .SH VERSIONS
79 The
80 .BR aio_error ()
81 function is available since glibc 2.1.
82 .SH ATTRIBUTES
83 .SS Multithreading (see pthreads(7))
84 The
85 .BR aio_error ()
86 function is thread-safe.
87 .SH CONFORMING TO
88 POSIX.1-2001, POSIX.1-2008.
89 .SH EXAMPLE
90 See
91 .BR aio (7).
92 .SH SEE ALSO
93 .BR aio_cancel (3),
94 .BR aio_fsync (3),
95 .BR aio_read (3),
96 .BR aio_return (3),
97 .BR aio_suspend (3),
98 .BR aio_write (3),
99 .BR lio_listio (3),
100 .BR aio (7)
101 .SH COLOPHON
102 This page is part of release 3.79 of the Linux
103 .I man-pages
104 project.
105 A description of the project,
106 information about reporting bugs,
107 and the latest version of this page,
108 can be found at
109 \%http://www.kernel.org/doc/man\-pages/.