Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ aio_cancel(3P4) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

aio_read(3P4)

aio_write(3P4)

aio_fsync(3P4)

aio_error(3P4)

aio_return(3P4)

aio_suspend(3P4)

lio_listio(3P4)

aio_cancel(3P4)

NAME

aio_cancel − cancel asynchronous I/O request

SYNOPSIS

#include <aio.h>

int aio_cancel(fildes, aiocbp)

int fildes;

struct aiocb ∗aiocbp;

DESCRIPTION

The aio_cancel() function attempts to cancel one or more asynchronous I/O requests currently outstanding against file descriptor fildes.  An asynchronous I/O request is still cancelable if the request hasn’t been submitted to the device.  The aiocbp argument points to the asynchronous I/O control block for a particular request to be canceled. If aiocbp is NULL, then all outstanding cancelable asynchronous I/O requests against fildes are canceled. 

Normal signal delivery shall occur for asynchronous I/O operations that are successfully canceled. If there are requests which cannot be canceled, then the normal asynchronous completion process shall take place for those requests when they are completed. 

For requested operations that are successfully canceled, the associated error status is set to [ECANCELED], and the return status is -1. For requested operations that are not successfully canceled, the aiocbp is not modified by aio_cancel(). 

RETURN VALUE

The aio_cancel() function returns the value AIO_CANCELED to the calling process if the requested operations were canceled. 

The value AIO_NOTCANCELED is returned if at least one of the requested operations cannot be canceled because it is in progress. In this case, the status of any other operations referenced in the call to aio_cancel() can be determined by using aio_error(3P4). 

The value AIO_ALLDONE is returned if all the operations have already completed. 

If any of the following conditions occur, the aio_cancel() function returns a -1 and sets errno to the corresponding value:

[EBADF] The fildes argument is not a valid file descriptor. 

[EFAULT] The system is unable to access the aiocb structure that the aiocbp argument points to. 

[EINVAL] The fildes argument does not match the file descriptor on the control block specified by the aiocbp argument. 

FILES

/usr/lib/libposix4.a

SEE ALSO

aio_read(3P4), aio_write(3P4), aio_fsync(3P4), aio_error(3P4), aio_return(3P4), aio_suspend(3P4), lio_listio(3P4), "CX/UX Programmer’s Guide"

WARNING

The interface to aio_cancel() is based on IEEE Draft Standard P1003.4/D12.  This is an unapproved draft, subject to change.  Use of information contained in this unapproved draft is at your own risk.  This interface will change to reflect any changes made by future drafts of POSIX 1003.4. 
 

CX/UX Programmer’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026