aiowait(3scl)aiowait(3scl)NAMEaiowait - wait for completion of an asynchronous I/O operation
LIBRARY
SCL Miscellaneous Library (libsolmisc.so, libsolmisc.a)
SYNOPSIS
#include <sys/asynch.h>
aio_result_t *aiowait(const struct timeval *timeout);
PARAMETERS
Specifies the duration to wait for completion of an asynchronous I/O
operation
DESCRIPTION
The aiowait() function causes the process/thread to suspend until an
outstanding asynchronous I/O operation completes. The function
"dequeues" the request and thus releases the associated result struc‐
ture for re-use.
If the parameter timeout is a NULL pointer, the process is suspended
indefinately. Otherwise, the timeout pointer references a timeval
structure comprising the members tv_sec and tv_usec which specify the
timeout value in seconds and microseconds.
If both of the timeval structure members are 0, this effects a poll
operation whereby the wait completes immediately with a return value
reflecting whether an I/O operation has completed.
SCL IMPLEMENTATION NOTES
The SCL implementation of aiowait() function will not be interrupted by
a signal. Therefore, unlike Solaris, the EINTR return value will not be
returned in errno. However, it is possible for the result structure
aio_return field to be set to -1 and EINTR returned in the aio_errno
field if an I/O operation is interrupted.
RETURN VALUES
The aiowait() function returns a pointer to a result structure when an
I/O request has completed. If the wait times out, or if a poll opera‐
tion does not find a completed request, the function returns 0. A value
of -1 is returned if there is an error, with errno set to specify the
cause.
The SCL implementation of this function may cause errors to occur that
could not occur on Solaris. Such errors are written to the SCL error‐
log. In this case the errno reflecting the actual error is mapped to an
errno that is valid and expected on Solaris. This means that applica‐
tions testing for a specific set of errors will continue to work as
expected.
ERRORS
An internal implementation error occurred. Refer to the SCL errorlog
for additional information There are no outstanding asynchronous I/O
requests.
RELATED INFORMATION
Functions: aiocancel(3scl), aioread(3scl), aiowrite(3scl)
File: scl_error_log(4scl)
Manual: Solaris Compatibility Library User's Guide
aiowait(3scl)