DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

aio_return(S-osr5)


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

Syntax

cc . . . -lsuds
#include <aio.h>

ssize_t aio_return(struct aiocb *aiocbp);

Description

The aio_return(S-osr5) 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 returned by the corresponding read(S-osr5), write(S-osr5), or fsync(S-osr5) function call. The aio_return function may be called exactly once to retrieve the return status of a given asynchronous operation; thereafter, if the same aiocb structure is used in a call to aio_return or aio_error(S-osr5), an error may be returned. When the aiocb structure referred to by aiocbp is used to submit another asynchronous operation, then aio_return may be successfully used to retrieve the return status of that operation.

Return values

If the asynchronous I/O operation has completed, then the return status, as described for read, write, and fsync is returned.

Diagnostics

If the following condition occurs, the aio_return function returns -1 and sets errno to the corresponding value:

[EINVAL]
The aiocbp argument does not refer to an asynchronous operation whose return status has not yet been retrieved.

See also

aio(FP), aio_mkcbs(S-osr5), aio_read(S-osr5), aio_error(S-osr5), aio_write(S-osr5), close(S-osr5), _exit(S-osr5), exec(S-osr5), fork(S-osr5), lio_listio(S-osr5), lseek(S-osr5), read(S-osr5)

Standards conformance

Text reprinted and/or adapted from IEEE Std 1003.1b-1993, IEEE Standard for Information Technology, POSIX Part 1: System Application Program Interface (API) Amendment 1: Realtime Extensions [C Language], copyright © 1993 by the Institute of Electrical and Electronics Engineers, Inc. The IEEE takes no responsibility for and will assume no liability for damages resulting from the reader's misinterpretation of said information resulting from the placement and context in this publication. Information is reproduced with the permission of the IEEE.
© 2005 System Services (S-osr5)
SCO OpenServer Release 6.0.0 -- 02 June 2005