The aiowait() function suspends the calling process until one of its outstanding asynchronous I/O operations completes, providing a synchronous method of notification.
If timeout is a non-zero pointer, it specifies a maximum interval to wait for the completion of an asynchronous I/O operation. If timeout is a zero pointer, aiowait() blocks indefinitely. To effect a poll, the timeout parameter should be non-zero, pointing to a zero-valued timeval structure.
The timeval structure is defined in <sys/time.h> and contains the following members:
|
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
|
|