Debian Codegraph @

upstream/debian-trixie/man3/aio_return.3

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