Developer Guide and Reference

Contents

aio_cancel

Cancels outstanding asynchronous I/O requests for the file descriptor
fd
.

Syntax

int aio_cancel(HANDLE fd, struct aiocb *aiocbp);
Arguments
fd
File descriptor
*aiocbp
Pointer to control block from where asynchronous I/O request is generated
Description
The
aio_cancel()
function cancels outstanding asynchronous I/O requests for the file descriptor
fd
. If
aiocbp
is NULL, all outstanding asynchronous I/O requests are cancelled. If
aiocbp
is not NULL, only the requests described by the control block pointed to by
aiocbp
are cancelled.
Normal asynchronous notification occurs for cancelled requests. The request return status is set to -1, and the request error status is set to ECANCELED. The control block of requests that cannot be cancelled is not changed.
Unspecified results occur if
aiocbp
is not NULL and the
fd
differs from the file descriptor with which the asynchronous operation was initiated.
Returns
AIO_CANCELLED
: When all specified requests are cancellled successfully.
AIO_NOTCANCELLED
: When at least one of the specified requests is still in process of being cancelled; check the status of request using
aio_error
.
AIO_ALLDONE
: When all specified requests were completed before cancel call was placed.
-1
: When some error occurs. To get the correct error code, use
errno
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804