DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

aio_return(AIO)


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(AIO)) 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(AIO), aiocb(M), aio_error(AIO), aio_read(AIO), aio_write(AIO), fsync(S), intro(S), read(S), write(S)

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(S).
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005