Debian Codegraph @

upstream/debian-unstable/man3/aio_return.3

raw
1 '\" t
2 .\" Copyright 2003, Andries E. Brouwer <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .\"
7 .TH aio_return 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 aio_return \- get return status of asynchronous I/O operation
10 .SH LIBRARY
11 Real-time library
12 .RI ( librt ,\~ \-lrt )
13 .SH SYNOPSIS
14 .nf
15 .B "#include <aio.h>"
16 .P
17 .BI "ssize_t aio_return(struct aiocb *" aiocbp );
18 .fi
19 .SH DESCRIPTION
20 The
21 .BR aio_return ()
22 function returns the final return status for the asynchronous I/O request
23 with control block pointed to by
24 .IR aiocbp .
25 (See
26 .BR aio (7)
27 for a description of the
28 .I aiocb
29 structure.)
30 .P
31 This function should be called only once for any given request, after
32 .BR aio_error (3)
33 returns something other than
34 .BR EINPROGRESS .
35 .SH RETURN VALUE
36 If the asynchronous I/O operation has completed, this function returns
37 the value that would have been returned in case of a synchronous
38 .BR read (2),
39 .BR write (2),
40 .BR fsync (2),
41 or
42 .BR fdatasync (2),
43 call.
44 On error, \-1 is returned, and
45 .I errno
46 is set to indicate the error.
47 .P
48 If the asynchronous I/O operation has not yet completed,
49 the return value and effect of
50 .BR aio_return ()
51 are undefined.
52 .SH ERRORS
53 .TP
54 .B EINVAL
55 .I aiocbp
56 does not point at a control block for an asynchronous I/O request
57 of which the return status has not been retrieved yet.
58 .TP
59 .B ENOSYS
60 .BR aio_return ()
61 is not implemented.
62 .SH ATTRIBUTES
63 For an explanation of the terms used in this section, see
64 .BR attributes (7).
65 .TS
66 allbox;
67 lbx lb lb
68 l l l.
69 Interface Attribute Value
70 T{
71 .na
72 .nh
73 .BR aio_return ()
74 T} Thread safety MT-Safe
75 .TE
76 .SH STANDARDS
77 POSIX.1-2008.
78 .SH HISTORY
79 glibc 2.1.
80 POSIX.1-2001.
81 .SH EXAMPLES
82 See
83 .BR aio (7).
84 .SH SEE ALSO
85 .BR aio_cancel (3),
86 .BR aio_error (3),
87 .BR aio_fsync (3),
88 .BR aio_read (3),
89 .BR aio_suspend (3),
90 .BR aio_write (3),
91 .BR lio_listio (3),
92 .BR aio (7)