DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

aio_return(3aio)


aio_return, aio_return64 -- retrieve return status of asynchronous I/O operation

Synopsis

   

cc [options] -Kthread file

#include <aio.h>

int aio_return(struct aiocb *aiocbp);

int aio_return64(struct aiocb64 *aiocbp);

Description

aio_return returns the return status associated with the aiocb structure referenced by the aiocbp argument. The return status for an asynchronous I/O operation is the value that would be returned by the corresponding read, write, or fsync function call. If the error status (see aio_error(3aio)) for the operation is equal to EINPROGRESS, the return status for the operation is undefined. ENOMEM is returned if there were no internal kernal aio control blocks available to service the request (number of kernel aio control blocks is tunable via the NUMAIO kernel parameter; see ``Miscellaneous parameters'' in Monitoring and tuning the system).

The aio_return function may be called exactly once to retrieve the return status of a given asynchronous operation; thereafter, if the same aiocb referenced structure is used in a call to aio_return or aio_error, an error may be returned. When the aiocb structure referred to by aiocbp is used to submit another asynchronous operation, aio_return may be successfully used to retrieve the return status for that operation.

Return values

The corresponding read, write, or fsync status is returned. If the asynchronous I/O is not yet complete, EINPROGRESS is returned.

References

aio_cancel(3aio), aiocb(5), aio_error(3aio), aio_read(3aio), aio_write(3aio), fsync(2), intro(2), read(2), write(2)

Notices

Considerations for large file support

aio_return64 supports large files, but is otherwise identical to aio_return. For details on programming for large file capable applications, see ``Large File Support'' on intro(2).
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004