ACANCEL(2-SVR3) RISC/os Reference Manual ACANCEL(2-SVR3)
NAME
acancel - cancel asynchronous I/O request
SYNOPSIS
#include <sys/aio.h>
int acancel(int fildes, aiohandlet handle);
DESCRIPTION
acancel cancels one or more asynchronous I/O requests
currently outstanding against file descriptor fildes. The
handle argument specifies the particular request to be can-
celed. If handle is NULL, then all outstanding asynchronous
I/O requests against fildes are canceled.
A signal is not delivered when an asynchronous I/O operation
is successfully canceled. If there are requests which can-
not be canceled, then the normal asynchronous completion
process takes place for those requests when they are com-
pleted.
For requests operation that are successfully canceled, the
associated aio_errno in the completion block is set to ECAN-
CELLED and aio_nbytes is set to the actual number of bytes
transferred.
RETURNS
acancel returns the value AIO_CANCELLED to the calling pro-
cess if the requested operation(s) were canceled. The value
of AIO_NOTCANCELLED is returned if at least one of the
requested operation(s) cannot be canceled because it is in
progress. The value AIO_ALLDONE is returned if all of the
operations are not queued and are not in progress. Other-
wise, the function returns -1, and sets errno to indicate
the error.
ERRORS
If any of the following conditions occur, the acancel
returns -1 and sets errno to the corresponding value:
[EBADF] The fildes argument is not a valid file
descriptor.
[EINVAL] The handle argument is not a valid asynchro-
nous I/O handle.
SEE ALSO
aread(2), areadv(2), astatus(2), await(2), awrite(2), awri-
tev(2), listio(2), aio(5).
Printed 11/19/92 Page 1