8999 SMBIOS: cleanup 32-bit specific code
[unleashed.git] / usr / src / man / man3c / aio_cancel.3c
blobbb7a30f097229df2ce70b0f5458a49b035624861
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_CANCEL 3C "Feb 5, 2008"
13 .SH NAME
14 aio_cancel \- cancel asynchronous I/O request
15 .SH SYNOPSIS
16 .LP
17 .nf
18 #include <aio.h>
20 \fBint\fR \fBaio_cancel\fR(\fBint\fR \fIfildes\fR, \fBstruct aiocb *\fR\fIaiocbp\fR);
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 The \fBaio_cancel()\fR function attempts to cancel one or more asynchronous I/O
27 requests currently outstanding against file descriptor \fIfildes\fR. The
28 \fIaiocbp\fR argument points to the asynchronous I/O control block for a
29 particular request to be canceled. If \fIaiocbp\fR is \fINULL\fR, then all
30 outstanding cancelable asynchronous I/O requests against \fIfildes\fR are
31 canceled.
32 .sp
33 .LP
34 Normal asynchronous notification occurs for asynchronous I/O operations that
35 are successfully canceled. If there are requests that cannot be canceled, then
36 the normal asynchronous completion process takes place for those requests when
37 they are completed.
38 .sp
39 .LP
40 For requested operations that are successfully canceled, the associated error
41 status is set to \fBECANCELED\fR and the return status is \fB\(mi1\fR\&. For
42 requested operations that are not successfully canceled, the \fIaiocbp\fR is
43 not modified by \fBaio_cancel()\fR.
44 .sp
45 .LP
46 If \fIaiocbp\fR is not \fINULL\fR, then if \fIfildes\fR does not have the same
47 value as the file descriptor with which the asynchronous operation was
48 initiated, unspecified results occur.
49 .SH RETURN VALUES
50 .sp
51 .LP
52 The \fBaio_cancel()\fR function returns the value \fBAIO_CANCELED\fR to the
53 calling process if the requested operation(s) were canceled. The value
54 \fBAIO_NOTCANCELED\fR is returned if at least one of the requested operation(s)
55 cannot be canceled because it is in progress. In this case, the state of the
56 other operations, if any, referenced in the call to \fBaio_cancel()\fR is not
57 indicated by the return value of \fBaio_cancel()\fR. The application may
58 determine the state of affairs for these operations by using
59 \fBaio_error\fR(3C). The value \fBAIO_ALLDONE\fR is returned if all of the
60 operations have already completed. Otherwise, the function returns \fB\(mi1\fR
61 and sets \fBerrno\fR to indicate the error.
62 .SH ERRORS
63 .sp
64 .LP
65 The \fBaio_cancel()\fR function will fail if:
66 .sp
67 .ne 2
68 .na
69 \fB\fBEBADF\fR\fR
70 .ad
71 .RS 10n
72 The \fIfildes\fR argument is not a valid file descriptor.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fBENOSYS\fR\fR
79 .ad
80 .RS 10n
81 The \fBaio_cancel()\fR function is not supported.
82 .RE
84 .SH USAGE
85 .sp
86 .LP
87 The \fBaio_cancel()\fR function has a transitional interface for 64-bit file
88 offsets.  See \fBlf64\fR(5).
89 .SH ATTRIBUTES
90 .sp
91 .LP
92 See \fBattributes\fR(5) for descriptions of the following attributes:
93 .sp
95 .sp
96 .TS
97 box;
98 c | c
99 l | l .
100 ATTRIBUTE TYPE  ATTRIBUTE VALUE
102 Interface Stability     Committed
104 MT-Level        MT-Safe
106 Standard        See \fBstandards\fR(5).
109 .SH SEE ALSO
112 \fBaio.h\fR(3HEAD), \fBsignal.h\fR(3HEAD), \fBaio_read\fR(3C),
113 \fBaio_return\fR(3C), \fBattributes\fR(5), \fBlf64\fR(5), \fBstandards\fR(5)
114 .SH NOTES
117 Solaris 2.6 was the first release to support the Asynchronous Input and Output
118 option. Prior to this release, this function always returned \fB\(mi1\fR and
119 set \fBerrno\fR to \fBENOSYS\fR.