|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Get the error status for an asynchronous I/O operation
#include <aio.h> int aio_error( const struct aiocb * aiocbptr );
- A pointer to an asynchronous I/O control block of type aiocb that you want the error status for.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The aio_error() function returns the error status associated with the aiocb structure referenced by the aiocbptr argument. The error status for an asynchronous I/O operation is the errno value that's set by the corresponding read(), write(), or fsync() operation. If the operation hasn't yet been completed, the error status is EINPROGRESS.
- 0 if the operation was completed successfully
- the error status set by read(), write(), or fsync() if the operation wasn't completed successfully
- EINPROGRESS if the operation hasn't yet been completed
- The aiocbptr argument doesn't refer to an asynchronous operation whose return status hasn't yet been retrieved.
The first time you call an aio_* function, a thread pool is created, making your process multithreaded if it isn't already. The thread pool isn't destroyed until your process ends.