Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/aio_cancel.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/aio_cancel.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/aio_cancel.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/aio_cancel.html on line 8

aio_cancel()

Cancel an asynchronous I/O operation

Synopsis:

#include <aio.h>

int aio_cancel( int fd, 
                struct aiocb * aiocbptr );

Arguments:

fd
The file descriptor for which you want to cancel asynchronous I/O requests.
aiocbptr
A pointer to an asynchronous I/O control block of type aiocb for the request you want to cancel, or NULL if you want to cancel all requests against the file descriptor.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The aio_cancel() function attempts to cancel one or more asynchronous I/O requests currently outstanding against a file descriptor.

Normal asynchronous notification occurs for asynchronous I/O operations that are successfully canceled. If there are requests that can't be canceled, then the normal asynchronous completion process takes place for those requests when they're completed.

The error status that's associated with requested operations that are successfully canceled is set to ECANCELED, and the return status is -1. The aio_cancel() function doesn't modify the aiocb structures for requested operations that aren't successfully canceled.

Returns:

AIO_CANCELED
The requested operation(s) were canceled.
AIO_NOTCANCELED
At least one of the requested operations couldn't be canceled because it was in progress.

Note: A return value of AIO_NOTCANCELED doesn't indicate the state of any other operations referenced in the call to aio_cancel(). To determine their status, use aio_error().

AIO_ALLDONE
All of the operations have already been completed.
-1
An error occurred; errno is set.

Errors:

EBADF
The filedes argument isn't a valid file descriptor.

Classification:

POSIX 1003.1 AIO

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

Caveats:

The first time you call an aio_* function, a thread pool is created, making your process multithreaded if it isn't already. The thread pool isn't destroyed until your process ends.

See also:

aio_error(), aio_fsync(), aio_read(), aio_return(), aio_suspend(), aio_write(), aiocb


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/a/aio_cancel.html on line 198

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/a/aio_cancel.html on line 198