1aio_suspend(3C)          Standard C Library Functions          aio_suspend(3C)
2
3
4

NAME

6       aio_suspend - wait for asynchronous I/O request
7

SYNOPSIS

9       #include <aio.h>
10
11       int aio_suspend(const struct aiocb * const list[], int nent,
12            const struct timespec *timeout);
13
14

DESCRIPTION

16       The  aio_suspend() function suspends the calling thread  until at least
17       one of the asynchronous I/O operations referenced by the list  argument
18       has  completed,  until a signal interrupts the function, or, if timeout
19       is not NULL, until the time interval specified by timeout  has  passed.
20       If  any  of  the  aiocb  structures in the list correspond to completed
21       asynchronous I/O operations (that is, the error status for  the  opera‐
22       tion is not equal to EINPROGRESS) at the time of the call, the function
23       returns without suspending the calling thread. The list argument is  an
24       array of pointers to asynchronous I/O control blocks. The nent argument
25       indicates the number of  elements  in  the  array  and  is  limited  to
26       _AIO_LISTIO_MAX  = 4096. Each aiocb structure pointed to will have been
27       used in  initiating  an  asynchronous  I/O  request  via  aio_read(3C),
28       aio_write(3C), or lio_listio(3C). This array may contain null pointers,
29       which are ignored. If this array contains pointers that refer to  aiocb
30       structures  that have not been used in submitting asynchronous I/O, the
31       effect is undefined.
32
33
34       If the time interval indicated in the timespec structure pointed to  by
35       timeout  passes before any of the I/O operations referenced by list are
36       completed, then aio_suspend() returns with an error.
37

RETURN VALUES

39       If aio_suspend() returns after one or more asynchronous I/O  operations
40       have  completed, it returns 0. Otherwise, it returns −1, and sets errno
41       to indicate the error.
42
43
44       The application may determine which asynchronous I/O completed by scan‐
45       ning  the  associated  error  and return status using aio_error(3C) and
46       aio_return(3C), respectively.
47

ERRORS

49       The aio_suspend() function will fail if:
50
51       EAGAIN     No asynchronous I/O indicated in the list referenced by list
52                  completed in the time interval indicated by timeout.
53
54
55       EINTR      A  signal interrupted the aio_suspend() function. Since each
56                  asynchronous I/O operation might provoke a  signal  when  it
57                  completes, this error return can be caused by the completion
58                  of one or more of the very I/O operations being awaited.
59
60
61       EINVAL     The nent argument is less than or equal to 0 or greater than
62                  _AIO_LISTIO_MAX,  or  the  timespec  structure pointed to by
63                  timeout is not properly set because tv_sec is less than 0 or
64                  tv_nsec is either less than 0 or greater than 10^9.
65
66
67       ENOMEM     There is currently not enough available memory; the applica‐
68                  tion can try again later.
69
70
71       ENOSYS     The aio_suspend() function is not supported by the system.
72
73

USAGE

75       The aio_suspend() function has a transitional interface for 64-bit file
76       offsets.  See lf64(5).
77

ATTRIBUTES

79       See attributes(5) for descriptions of the following attributes:
80
81
82
83
84       ┌─────────────────────────────┬─────────────────────────────┐
85       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
86       ├─────────────────────────────┼─────────────────────────────┤
87       │Interface Stability          │Committed                    │
88       ├─────────────────────────────┼─────────────────────────────┤
89       │MT-Level                     │Async-Signal-Safe            │
90       ├─────────────────────────────┼─────────────────────────────┤
91       │Standard                     │See standards(5).            │
92       └─────────────────────────────┴─────────────────────────────┘
93

SEE ALSO

95       aio.h(3HEAD),      aio_fsync(3C),     aio_read(3C),     aio_return(3C),
96       aio_write(3C), lio_listio(3C), signal.h(3HEAD), attributes(5), lf64(5),
97       standards(5)
98

NOTES

100       Solaris 2.6 was the first release to support the Asynchronous Input and
101       Output option. Prior to this release, this function always returned  −1
102       and set errno to ENOSYS.
103
104
105
106SunOS 5.11                        18 Dec 2008                  aio_suspend(3C)
Impressum