aio_suspend - Suspend the calling process until at least one of the specified asynchronous I/O requests has completed, until a signal interrupts the function, or until a timeout interval, if specified, has passed (P1003.1b)
int aio_suspend (
const struct aiocb *list,
const struct timespec *timeout);
The aio_suspend function suspends the calling process until at least one asynchronous I/O operation has completed, until a signal interrupts the function, or until a timeout interval, if specified, has passed. At the time of the call, if an asynchronous I/O operation specified in the aiocbp array corresponds to completed asynchronous I/O operations, the function returns without suspending the calling process.
The list argument is an array of pointers to aiocb data structures. The nent argument indicates the number of elements in the array. Each aiocbp structure must have been used in initiating an asynchronous I/O request by a call to the aio_read, aio_write, or lio_listio functions.
If the aio_suspend function returns due to an asynchronous I/O completion, a value of 0 is returned. The application may determine which asynchronous I/O operations finished by calling the aio_error and aio_return functions.
On an unsuccessful call, a value of -1 is returned and errno is set to indicate that an error occurred.
The aio_suspend function fails under the following conditions:
Functions: aio_group_completion_np(3), aio_read(3), aio_results_np(3), aio_write(3), lio_listio(3). delim off