aio_return(3) — Subroutines
Digital
NAME
aio_return − return the status of an asynchronous I/O operation (P1003.4/D10)
SYNOPSIS
#include <aio.h>
int aio_return (
aio_handle_t handle) ;
PARAMETERS
handle The handle used to identify the asynchronous operation in status queries.
DESCRIPTION
The aio_return function retreives the return status associated with the handle passed in. The return status for an asynchronous I/O operation is the value that would be returned by the corresponding read, or write function call. The aio_error function returns the error status for an asynchronous I/O operation.
The handle is a unique identifier, that is set when the asynchronous I/O operation is first submitted. Each separate asynchronous I/O operation, whether submitted as an aio_read, aio_write, or as a single item in a list using the lio_listio function, has a unique handle associated with the I/O request. When you call an asynchronous I/O function, the handle field in the aiocb structure is set. The type, aio_handle_t, is defined in <aio.h>.
RETURN VALUES
If the asynchronous I/O operation has completed, then the return status as described for read or write is returned. Upon successful completion, the number of bytes read to or written from during the asynchronous I/O operation. On an unsuccessful call, the value of −1 is returned.
RELATED INFORMATION
aio_cancel(3), aio_error(3), aio_read(3), aio_write(3), lio_listio(3)