1AIO_CANCEL(P)              POSIX Programmer's Manual             AIO_CANCEL(P)
2
3
4

NAME

6       aio_cancel - cancel an asynchronous I/O request (REALTIME)
7

SYNOPSIS

9       #include <aio.h>
10
11       int aio_cancel(int fildes, struct aiocb *aiocbp);
12
13

DESCRIPTION

15       The aio_cancel() function shall attempt to cancel one or more asynchro‐
16       nous I/O requests currently outstanding against file descriptor fildes.
17       The  aiocbp argument points to the asynchronous I/O control block for a
18       particular request to be canceled. If aiocbp is  NULL,  then  all  out‐
19       standing  cancelable  asynchronous I/O requests against fildes shall be
20       canceled.
21
22       Normal asynchronous notification shall occur for asynchronous I/O oper‐
23       ations  that are successfully canceled. If there are requests that can‐
24       not be canceled, then the normal asynchronous completion process  shall
25       take place for those requests when they are completed.
26
27       For requested operations that are successfully canceled, the associated
28       error status shall be set to [ECANCELED] and the return status shall be
29       -1.  For  requested  operations that are not successfully canceled, the
30       aiocbp shall not be modified by aio_cancel().
31
32       If aiocbp is not NULL, then if fildes does not have the same  value  as
33       the  file  descriptor  with which the asynchronous operation was initi‐
34       ated, unspecified results occur.
35
36       Which operations are cancelable is implementation-defined.
37

RETURN VALUE

39       The aio_cancel() function shall return the value  AIO_CANCELED  to  the
40       calling  process if the requested operation(s) were canceled. The value
41       AIO_NOTCANCELED shall be returned if at  least  one  of  the  requested
42       operation(s)  cannot  be  canceled  because  it is in progress. In this
43       case, the state of the other operations, if any, referenced in the call
44       to  aio_cancel()  is not indicated by the return value of aio_cancel().
45       The application may determine the state of affairs for these operations
46       by  using  aio_error(). The value AIO_ALLDONE is returned if all of the
47       operations have already completed. Otherwise, the function shall return
48       -1 and set errno to indicate the error.
49

ERRORS

51       The aio_cancel() function shall fail if:
52
53       EBADF  The fildes argument is not a valid file descriptor.
54
55
56       The following sections are informative.
57

EXAMPLES

59       None.
60

APPLICATION USAGE

62       The  aio_cancel() function is part of the Asynchronous Input and Output
63       option and need not be available on all implementations.
64

RATIONALE

66       None.
67

FUTURE DIRECTIONS

69       None.
70

SEE ALSO

72       aio_read()  ,  aio_write()   ,   the   Base   Definitions   volume   of
73       IEEE Std 1003.1-2001, <aio.h>
74
76       Portions  of  this text are reprinted and reproduced in electronic form
77       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
78       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
79       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
80       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
81       event of any discrepancy between this version and the original IEEE and
82       The  Open Group Standard, the original IEEE and The Open Group Standard
83       is the referee document. The original Standard can be  obtained  online
84       at http://www.opengroup.org/unix/online.html .
85
86
87
88IEEE/The Open Group                  2003                        AIO_CANCEL(P)
Impressum