|
|
HP-UX Reference > Aaio_suspend(2)HP-UX 11i Version 2: December 2007 Update |
|
NAMEaio_suspend() — wait for an asynchronous I/O operation to complete SYNOPSIS#include <aio.h> int aio_suspend(const struct aiocb * const list[], int nent, const struct timespec *timeout); DESCRIPTIONThe aio_suspend() function suspends the calling process or thread until at least one of the asynchronous I/O operations initiated with one of the nent aiocb pointers contained in list has completed, or a signal interrupts the function, or timeout is not NULL and the time interval specified by timeout has passed. Multiple threads may issue simultaneous calls to aio_suspend(), referencing one or more aiocbs in common. To use this function, link in the realtime library by specifying -lrt on the compiler or linker command line. RETURN VALUEaio_suspend() returns the following values:
If any of the indicated asynchronous I/O operations has already completed at the time of the call to aio_suspend(), then aio_suspend() returns immediately. If nent is 0 (zero), the aio_suspend() immediately returns success. Any NULL aiocb in list is silently ignored. If all of the aiocbs in list are NULL, the aio_suspend() immediately returns success. ERRORSIf aio_suspend() detects one of the following error conditions, errno is set to the indicated value:
SEE ALSOaio_cancel(2), aio_error(2), aio_fsync(2), aio_read(2), aio_return(2), aio_write(2), lio_listio(2), pause(2), aio(5). |
|