]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) |
2 | .\" | |
e4a74ca8 | 3 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da | 4 | .\" |
1ae6b2c7 | 5 | .TH AIO_RETURN 3 2021-03-22 GNU "Linux Programmer's Manual" |
fea681da MK |
6 | .SH NAME |
7 | aio_return \- get return status of asynchronous I/O operation | |
a42212d0 AC |
8 | .SH LIBRARY |
9 | Real-time library | |
8fc3b2cf | 10 | .RI ( librt ", " \-lrt ) |
fea681da | 11 | .SH SYNOPSIS |
c7db92b9 | 12 | .nf |
fea681da | 13 | .B "#include <aio.h>" |
68e4db0a | 14 | .PP |
fea681da | 15 | .BI "ssize_t aio_return(struct aiocb *" aiocbp ); |
c7db92b9 | 16 | .fi |
fea681da MK |
17 | .SH DESCRIPTION |
18 | The | |
e511ffb6 | 19 | .BR aio_return () |
fea681da MK |
20 | function returns the final return status for the asynchronous I/O request |
21 | with control block pointed to by | |
22 | .IR aiocbp . | |
2b014d76 MK |
23 | (See |
24 | .BR aio (7) | |
25 | for a description of the | |
26 | .I aiocb | |
27 | structure.) | |
dd3568a1 | 28 | .PP |
fea681da | 29 | This function should be called only once for any given request, after |
a2ef1094 | 30 | .BR aio_error (3) |
2f0af33b MK |
31 | returns something other than |
32 | .BR EINPROGRESS . | |
47297adb | 33 | .SH RETURN VALUE |
fea681da MK |
34 | If the asynchronous I/O operation has completed, this function returns |
35 | the value that would have been returned in case of a synchronous | |
898d27b4 MK |
36 | .BR read (2), |
37 | .BR write (2), | |
aa0da2b9 | 38 | .BR fsync (2), |
fea681da | 39 | or |
898d27b4 MK |
40 | .BR fdatasync (2), |
41 | call. | |
f6a4078b | 42 | On error, \-1 is returned, and \fIerrno\fP is set to indicate the error. |
847e0d88 | 43 | .PP |
898d27b4 MK |
44 | If the asynchronous I/O operation has not yet completed, |
45 | the return value and effect of | |
46 | .BR aio_return () | |
47 | are undefined. | |
fea681da MK |
48 | .SH ERRORS |
49 | .TP | |
50 | .B EINVAL | |
51 | .I aiocbp | |
52 | does not point at a control block for an asynchronous I/O request | |
53 | of which the return status has not been retrieved yet. | |
aea038d6 MK |
54 | .TP |
55 | .B ENOSYS | |
56 | .BR aio_return () | |
57 | is not implemented. | |
793514ae MK |
58 | .SH VERSIONS |
59 | The | |
60 | .BR aio_return () | |
61 | function is available since glibc 2.1. | |
0b0a32b8 | 62 | .SH ATTRIBUTES |
4bdf6cc9 MK |
63 | For an explanation of the terms used in this section, see |
64 | .BR attributes (7). | |
c466875e MK |
65 | .ad l |
66 | .nh | |
4bdf6cc9 MK |
67 | .TS |
68 | allbox; | |
c466875e | 69 | lbx lb lb |
4bdf6cc9 MK |
70 | l l l. |
71 | Interface Attribute Value | |
72 | T{ | |
0b0a32b8 | 73 | .BR aio_return () |
4bdf6cc9 MK |
74 | T} Thread safety MT-Safe |
75 | .TE | |
c466875e MK |
76 | .hy |
77 | .ad | |
78 | .sp 1 | |
47297adb | 79 | .SH CONFORMING TO |
793514ae | 80 | POSIX.1-2001, POSIX.1-2008. |
a14af333 | 81 | .SH EXAMPLES |
b44bee16 MK |
82 | See |
83 | .BR aio (7). | |
47297adb | 84 | .SH SEE ALSO |
fea681da MK |
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), | |
25fa6c3d | 90 | .BR aio_write (3), |
cd587df6 | 91 | .BR lio_listio (3), |
25fa6c3d | 92 | .BR aio (7) |