aio_suspend(3) — Subroutines
Digital
NAME
aio_suspend − suspend the calling process until at least one of the specified asynchronous I/O requests has completed (P1003.4/D10)
SYNOPSIS
#include <aio.h>
int aio_suspend (
int cnt ,
struct aiocb ∗aiocbp[]) ;
PARAMETERS
cnt The number of elements in the array in aiocbp. This number specifies the number of asynchronous I/O operations.
aiocbp An array of pointers to aiocb control blocks. When aiocbp is NULL, the argument is ignored.
DESCRIPTION
The aio_suspend function suspends the calling process until at least one asynchronous I/O operation has completed or until a signal or event interrupts the function. At the time of the call, if any of the asynchronous I/O operations specified in the aiocbp array correspond to completed asynchronous I/O operations, the function returns without suspending the calling process.
The cnt argument indicates the number of elements in the array. Each element in the array is a pointer to an individual aiocb data structure. 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.
RETURN VALUES
If the aio_suspend function returns due to an asynchronous I/O completion, a value of 0 is returned. If the aio_suspend function returns due to an asynchronous I/O completion, the application may determine which asynchronous I/O operations finished by examining the associated status fields. Use the aio_error and aio_return functions to retrieve error and status information.
On an unsuccessful call, a value of −1 is returned and errno is set to indicate that an error occurred.
ERRORS
The aio_suspend function fails under the following conditions:
[EINTR] A signal or event interrupted the aio_suspend function.