Merge commit 'b31320a79e2054c6739b5229259dbf98f3afc547' into merges
[unleashed.git] / share / man / man3c / aio_return.3c
blob5217a57e263b5fc294d12d9f8c17a637a1a9ab5c
1 '\" te
2 .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved
3 .\" Copyright 1989 AT&T
4 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
6 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
8 .\"  This notice shall appear on any product containing this material.
9 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
10 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
11 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
12 .TH AIO_RETURN 3C "Feb 5, 2008"
13 .SH NAME
14 aio_return \- retrieve return status of an asynchronous I/O operation
15 .SH SYNOPSIS
16 .LP
17 .nf
18 #include <aio.h>
20 \fBssize_t\fR \fBaio_return\fR(\fBstruct aiocb *\fR\fIaiocbp\fR);
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 The \fBaio_return()\fR function returns the return status associated with the
27 \fBaiocb\fR structure referenced by the \fIaiocbp\fR argument. The return
28 status for an asynchronous I/O operation is the value that would be returned by
29 the corresponding \fBread\fR(2), \fBwrite\fR(2), or \fBfsync\fR(3C) function
30 call. If the error status for the operation is equal to \fBEINPROGRESS\fR, then
31 the return status for the operation is undefined. The \fBaio_return()\fR
32 function may be called exactly once to retrieve the return status of a given
33 asynchronous operation; thereafter, if the same \fBaiocb\fR structure is used
34 in a call to \fBaio_return()\fR or \fBaio_error\fR(3C), an error may be
35 returned. When the \fBaiocb\fR structure referred to by \fIaiocbp\fR is used to
36 submit another asynchronous operation, then \fBaio_return()\fR may be
37 successfully used to retrieve the return status of that operation.
38 .SH RETURN VALUES
39 .sp
40 .LP
41 If the asynchronous I/O operation has completed, then the return status, as
42 described for \fBread\fR(2), \fBwrite\fR(2), and \fBfsync\fR(3C), is returned.
43 If the asynchronous I/O operation has not yet completed, the results of
44 \fBaio_return()\fR are undefined.
45 .SH ERRORS
46 .sp
47 .LP
48 The \fBaio_return()\fR function will fail if:
49 .sp
50 .ne 2
51 .na
52 \fB\fBEINVAL\fR\fR
53 .ad
54 .RS 10n
55 The \fIaiocbp\fR argument does not refer to an asynchronous operation whose
56 return status has not yet been retrieved.
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fBENOSYS\fR\fR
63 .ad
64 .RS 10n
65 The \fBaio_return()\fR function is not supported by the system.
66 .RE
68 .SH USAGE
69 .sp
70 .LP
71 The \fBaio_return()\fR function has a transitional interface for 64-bit file
72 offsets.  See \fBlf64\fR(5).
73 .SH ATTRIBUTES
74 .sp
75 .LP
76 See \fBattributes\fR(5) for descriptions of the following attributes:
77 .sp
79 .sp
80 .TS
81 box;
82 c | c
83 l | l .
84 ATTRIBUTE TYPE  ATTRIBUTE VALUE
86 Interface Stability     Committed
88 MT-Level        Async-Signal-Safe
90 Standard        See \fBstandards\fR(5).
91 .TE
93 .SH SEE ALSO
94 .sp
95 .LP
96 \fBclose\fR(2), \fBexec\fR(2), \fBexit\fR(2), \fBfork\fR(2), \fBlseek\fR(2),
97 \fBread\fR(2), \fBwrite\fR(2), \fBfsync\fR(3C), \fBaio.h\fR(3HEAD),
98 \fBsignal.h\fR(3HEAD), \fBaio_cancel\fR(3C), \fBaio_fsync\fR(3C),
99 \fBaio_read\fR(3C), \fBlio_listio\fR(3C), \fBattributes\fR(5), \fBlf64\fR(5),
100 \fBstandards\fR(5)
101 .SH NOTES
104 Solaris 2.6 was the first release to support the Asynchronous Input and Output
105 option. Prior to this release, this function always returned \fB\(mi1\fR and
106 set \fBerrno\fR to \fBENOSYS\fR.