1AIO_SUSPEND(3) Linux Programmer's Manual AIO_SUSPEND(3)
2
3
4
6 aio_suspend - wait for asynchronous I/O operation or timeout
7
9 #include <aio.h>
10
11 int aio_suspend(const struct aiocb * const cblist[],
12 int n, const struct timespec *timeout);
13
14
16 The aio_suspend() function suspends the calling process until at least
17 one of the asynchronous I/O requests in the list cblist of length n
18 have completed, a signal is delivered, or timeout is not NULL and the
19 time interval it indicates has passed.
20
21 Each item in the list must either be NULL (and then is ignored), or a
22 pointer to a control block on which I/O was initiated using
23 aio_read(3), aio_write(3), or lio_listio(3).
24
25 If CLOCK_MONOTONIC is supported, this clock is used to measure the
26 timeout interval.
27
29 If this function returns after completion of one of the indicated
30 requests, it returns 0. Otherwise it returns -1 and sets errno appro‐
31 priately.
32
34 EAGAIN The call was ended by timeout, before any of the indicated oper‐
35 ations had completed.
36
37 EINTR The call was ended by signal. (Possibly the completion signal
38 of one of the operations we were waiting for.)
39
41 One can achieve polling by using a non-NULL timeout that specifies a
42 zero time interval.
43
45 POSIX.1-2001
46
48 aio_cancel(3), aio_error(3), aio_fsync(3), aio_read(3), aio_return(3),
49 aio_write(3)
50
51
52
53 2003-11-14 AIO_SUSPEND(3)