1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\" and Copyright (C) 2010 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .TH AIO_SUSPEND 3 2021-03-22 GNU "Linux Programmer's Manual"
8 aio_suspend \- wait for asynchronous I/O operation or timeout
11 .RI ( librt ", " \-lrt )
17 .BI "int aio_suspend(const struct aiocb *const " aiocb_list "[], int " nitems ,
18 .BI " const struct timespec *restrict " timeout );
23 function suspends the calling thread until one of the following occurs:
25 One or more of the asynchronous I/O requests in the list
29 A signal is delivered.
32 is not NULL and the specified time interval has passed.
40 argument specifies the number of items in
42 Each item in the list pointed to by
44 must be either NULL (and then is ignored),
45 or a pointer to a control block on which I/O was initiated using
52 for a description of the
58 is supported, this clock is used to measure
59 the timeout interval (see
60 .BR clock_gettime (2)).
62 If this function returns after completion of one of the I/O
66 Otherwise, \-1 is returned, and
68 is set to indicate the error.
72 The call timed out before any of the indicated operations
76 The call was ended by signal
77 (possibly the completion signal of one of the operations we were
87 function is available since glibc 2.1.
89 For an explanation of the terms used in this section, see
97 Interface Attribute Value
100 T} Thread safety MT-Safe
106 POSIX.1-2001, POSIX.1-2008.
108 POSIX doesn't specify the parameters to be
110 that is specific to glibc.
112 One can achieve polling by using a non-NULL
114 that specifies a zero time interval.
116 If one or more of the asynchronous I/O operations specified in
118 has already completed at the time of the call to
120 then the call returns immediately.
122 To determine which I/O operations have completed
123 after a successful return from
129 structures pointed to by
132 The glibc implementation of
134 is not async-signal-safe,
135 .\" FIXME . https://sourceware.org/bugzilla/show_bug.cgi?id=13172
136 in violation of the requirements of POSIX.1.