teach manpages about largefile's demise
[unleashed.git] / share / man / man3c / aio_cancel.3c
blob4b495a12ffc7afa41ddbbe30646ed68f0ca0c5b0
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
45 .\" Copyright (c) 2008 Sun Microsystems, Inc.  All Rights Reserved.
46 .\"
47 .TH AIO_CANCEL 3C "Feb 5, 2008"
48 .SH NAME
49 aio_cancel \- cancel asynchronous I/O request
50 .SH SYNOPSIS
51 .LP
52 .nf
53 #include <aio.h>
55 \fBint\fR \fBaio_cancel\fR(\fBint\fR \fIfildes\fR, \fBstruct aiocb *\fR\fIaiocbp\fR);
56 .fi
58 .SH DESCRIPTION
59 .sp
60 .LP
61 The \fBaio_cancel()\fR function attempts to cancel one or more asynchronous I/O
62 requests currently outstanding against file descriptor \fIfildes\fR. The
63 \fIaiocbp\fR argument points to the asynchronous I/O control block for a
64 particular request to be canceled. If \fIaiocbp\fR is \fINULL\fR, then all
65 outstanding cancelable asynchronous I/O requests against \fIfildes\fR are
66 canceled.
67 .sp
68 .LP
69 Normal asynchronous notification occurs for asynchronous I/O operations that
70 are successfully canceled. If there are requests that cannot be canceled, then
71 the normal asynchronous completion process takes place for those requests when
72 they are completed.
73 .sp
74 .LP
75 For requested operations that are successfully canceled, the associated error
76 status is set to \fBECANCELED\fR and the return status is \fB\(mi1\fR\&. For
77 requested operations that are not successfully canceled, the \fIaiocbp\fR is
78 not modified by \fBaio_cancel()\fR.
79 .sp
80 .LP
81 If \fIaiocbp\fR is not \fINULL\fR, then if \fIfildes\fR does not have the same
82 value as the file descriptor with which the asynchronous operation was
83 initiated, unspecified results occur.
84 .SH RETURN VALUES
85 .sp
86 .LP
87 The \fBaio_cancel()\fR function returns the value \fBAIO_CANCELED\fR to the
88 calling process if the requested operation(s) were canceled. The value
89 \fBAIO_NOTCANCELED\fR is returned if at least one of the requested operation(s)
90 cannot be canceled because it is in progress. In this case, the state of the
91 other operations, if any, referenced in the call to \fBaio_cancel()\fR is not
92 indicated by the return value of \fBaio_cancel()\fR. The application may
93 determine the state of affairs for these operations by using
94 \fBaio_error\fR(3C). The value \fBAIO_ALLDONE\fR is returned if all of the
95 operations have already completed. Otherwise, the function returns \fB\(mi1\fR
96 and sets \fBerrno\fR to indicate the error.
97 .SH ERRORS
98 .sp
99 .LP
100 The \fBaio_cancel()\fR function will fail if:
102 .ne 2
104 \fB\fBEBADF\fR\fR
106 .RS 10n
107 The \fIfildes\fR argument is not a valid file descriptor.
111 .ne 2
113 \fB\fBENOSYS\fR\fR
115 .RS 10n
116 The \fBaio_cancel()\fR function is not supported.
119 .SH ATTRIBUTES
122 See \fBattributes\fR(5) for descriptions of the following attributes:
127 box;
128 c | c
129 l | l .
130 ATTRIBUTE TYPE  ATTRIBUTE VALUE
132 Interface Stability     Committed
134 MT-Level        MT-Safe
136 Standard        See \fBstandards\fR(5).
139 .SH SEE ALSO
142 \fBaio.h\fR(3HEAD), \fBsignal.h\fR(3HEAD), \fBaio_read\fR(3C),
143 \fBaio_return\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
144 .SH NOTES
147 Solaris 2.6 was the first release to support the Asynchronous Input and Output
148 option. Prior to this release, this function always returned \fB\(mi1\fR and
149 set \fBerrno\fR to \fBENOSYS\fR.