1AIO_SUSPEND(3)             Linux Programmer's Manual            AIO_SUSPEND(3)
2
3
4

NAME

6       aio_suspend - wait for asynchronous I/O operation or timeout
7

SYNOPSIS

9       #include <aio.h>
10
11       int aio_suspend(const struct aiocb * const aiocb_list[],
12                       int nitems, const struct timespec *timeout);
13
14       Link with -lrt.
15

DESCRIPTION

17       The aio_suspend() function suspends the calling thread until one of the
18       following occurs:
19
20       *  One or more of the asynchronous I/O requests in the list  aiocb_list
21          has completed.
22
23       *  A signal is delivered.
24
25       *  timeout  is  not  NULL  and  the specified time interval has passed.
26          (For details of the timespec structure, see nanosleep(2).)
27
28       The nitems argument specifies the number of items in aiocb_list.   Each
29       item in the list pointed to by aiocb_list must be either NULL (and then
30       is ignored), or a pointer to a control block on which I/O was initiated
31       using  aio_read(3),  aio_write(3), or lio_listio(3).  (See aio(7) for a
32       description of the aiocb structure.)
33
34       If CLOCK_MONOTONIC is supported, this clock  is  used  to  measure  the
35       timeout interval (see clock_gettime(3)).
36

RETURN VALUE

38       If  this  function  returns after completion of one of the I/O requests
39       specified in aiocb_list, 0 is returned.  Otherwise, -1 is returned, and
40       errno is set to indicate the error.
41

ERRORS

43       EAGAIN The  call  timed  out before any of the indicated operations had
44              completed.
45
46       EINTR  The call was ended by signal (possibly the completion signal  of
47              one of the operations we were waiting for); see signal(7).
48
49       ENOSYS aio_suspend() is not implemented.
50

VERSIONS

52       The aio_suspend() function is available since glibc 2.1.
53

CONFORMING TO

55       POSIX.1-2001, POSIX.1-2008.
56

NOTES

58       One  can  achieve  polling by using a non-NULL timeout that specifies a
59       zero time interval.
60
61       If one  or  more  of  the  asynchronous  I/O  operations  specified  in
62       aiocb_list  has  already  completed at the time of the call to aio_sus‐
63       pend(), then the call returns immediately.
64
65       To determine which I/O operations have  completed  after  a  successful
66       return  from  aio_suspend(), use aio_error(3) to scan the list of aiocb
67       structures pointed to by aiocb_list.
68

SEE ALSO

70       aio_cancel(3), aio_error(3), aio_fsync(3), aio_read(3),  aio_return(3),
71       aio_write(3), lio_listio(3), aio(7), time(7)
72

COLOPHON

74       This  page  is  part of release 3.53 of the Linux man-pages project.  A
75       description of the project, and information about reporting  bugs,  can
76       be found at http://www.kernel.org/doc/man-pages/.
77
78
79
80                                  2012-05-08                    AIO_SUSPEND(3)
Impressum