aio_return() — Retrieve status for an asynchronous I/O operation

Standards

Standards / Extensions C or C++ Dependencies

Single UNIX Specification, Version 2
Single UNIX Specification, Version 3

both

OS/390 V2R7

Format

#define _XOPEN_SOURCE 500
#include <aio.h>

int aio_return(const struct aiocb *aiocbp);

General description

The aio_return() function 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 set by the corresponding read() or write() operation. While the operation is proceeding, the error status retrieved by aio_error() is EINPROGRESS; the return status retrieved by aio_return() however is unpredictable. The aio_return() function may be called to retrieve the return status of a given asynchronous operation; once aio_error() has returned with 0.

Returned value

If the asynchronous I/O operation has completed successfully, aio_return() returns the status as described for read() or write().

If the asynchronous I/O operation has not yet completed, then the return status is unpredictable.

aio_return() does not set errno.

Related information