]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
fea681da MK |
2 | .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) |
3 | .\" | |
e4a74ca8 | 4 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da | 5 | .\" |
4c1c5274 | 6 | .TH aio_return 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
7 | .SH NAME |
8 | aio_return \- get return status of asynchronous I/O operation | |
a42212d0 AC |
9 | .SH LIBRARY |
10 | Real-time library | |
8fc3b2cf | 11 | .RI ( librt ", " \-lrt ) |
fea681da | 12 | .SH SYNOPSIS |
c7db92b9 | 13 | .nf |
fea681da | 14 | .B "#include <aio.h>" |
68e4db0a | 15 | .PP |
fea681da | 16 | .BI "ssize_t aio_return(struct aiocb *" aiocbp ); |
c7db92b9 | 17 | .fi |
fea681da MK |
18 | .SH DESCRIPTION |
19 | The | |
e511ffb6 | 20 | .BR aio_return () |
fea681da MK |
21 | function returns the final return status for the asynchronous I/O request |
22 | with control block pointed to by | |
23 | .IR aiocbp . | |
2b014d76 MK |
24 | (See |
25 | .BR aio (7) | |
26 | for a description of the | |
27 | .I aiocb | |
28 | structure.) | |
dd3568a1 | 29 | .PP |
fea681da | 30 | This function should be called only once for any given request, after |
a2ef1094 | 31 | .BR aio_error (3) |
2f0af33b MK |
32 | returns something other than |
33 | .BR EINPROGRESS . | |
47297adb | 34 | .SH RETURN VALUE |
fea681da MK |
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 | |
898d27b4 MK |
37 | .BR read (2), |
38 | .BR write (2), | |
aa0da2b9 | 39 | .BR fsync (2), |
fea681da | 40 | or |
898d27b4 MK |
41 | .BR fdatasync (2), |
42 | call. | |
f6a4078b | 43 | On error, \-1 is returned, and \fIerrno\fP is set to indicate the error. |
847e0d88 | 44 | .PP |
898d27b4 MK |
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. | |
fea681da MK |
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. | |
aea038d6 MK |
55 | .TP |
56 | .B ENOSYS | |
57 | .BR aio_return () | |
58 | is not implemented. | |
0b0a32b8 | 59 | .SH ATTRIBUTES |
4bdf6cc9 MK |
60 | For an explanation of the terms used in this section, see |
61 | .BR attributes (7). | |
62 | .TS | |
63 | allbox; | |
c466875e | 64 | lbx lb lb |
4bdf6cc9 MK |
65 | l l l. |
66 | Interface Attribute Value | |
67 | T{ | |
9e54434e BR |
68 | .na |
69 | .nh | |
0b0a32b8 | 70 | .BR aio_return () |
4bdf6cc9 MK |
71 | T} Thread safety MT-Safe |
72 | .TE | |
c466875e | 73 | .sp 1 |
3113c7f3 | 74 | .SH STANDARDS |
4131356c AC |
75 | POSIX.1-2008. |
76 | .SH HISTORY | |
77 | glibc 2.1. | |
78 | POSIX.1-2001. | |
a14af333 | 79 | .SH EXAMPLES |
b44bee16 MK |
80 | See |
81 | .BR aio (7). | |
47297adb | 82 | .SH SEE ALSO |
fea681da MK |
83 | .BR aio_cancel (3), |
84 | .BR aio_error (3), | |
85 | .BR aio_fsync (3), | |
86 | .BR aio_read (3), | |
87 | .BR aio_suspend (3), | |
25fa6c3d | 88 | .BR aio_write (3), |
cd587df6 | 89 | .BR lio_listio (3), |
25fa6c3d | 90 | .BR aio (7) |