1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\" and Copyright (C) 2010 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, see
22 .\" <http://www.gnu.org/licenses/>.
25 .TH AIO_SUSPEND 3 2021-03-22 "" "Linux Programmer's Manual"
27 aio_suspend \- wait for asynchronous I/O operation or timeout
33 .BI "int aio_suspend(const struct aiocb *const " aiocb_list "[], int " nitems ,
34 .BI " const struct timespec *restrict " timeout );
36 Link with \fI\-lrt\fP.
41 function suspends the calling thread until one of the following occurs:
43 One or more of the asynchronous I/O requests in the list
47 A signal is delivered.
50 is not NULL and the specified time interval has passed.
58 argument specifies the number of items in
60 Each item in the list pointed to by
62 must be either NULL (and then is ignored),
63 or a pointer to a control block on which I/O was initiated using
70 for a description of the
76 is supported, this clock is used to measure
77 the timeout interval (see
78 .BR clock_gettime (2)).
80 If this function returns after completion of one of the I/O
84 Otherwise, \-1 is returned, and
86 is set to indicate the error.
90 The call timed out before any of the indicated operations
94 The call was ended by signal
95 (possibly the completion signal of one of the operations we were
105 function is available since glibc 2.1.
107 For an explanation of the terms used in this section, see
115 Interface Attribute Value
118 T} Thread safety MT-Safe
124 POSIX.1-2001, POSIX.1-2008.
126 POSIX doesn't specify the parameters to be
128 that is specific to glibc.
130 One can achieve polling by using a non-NULL
132 that specifies a zero time interval.
134 If one or more of the asynchronous I/O operations specified in
136 has already completed at the time of the call to
138 then the call returns immediately.
140 To determine which I/O operations have completed
141 after a successful return from
147 structures pointed to by
150 The glibc implementation of
152 is not async-signal-safe,
153 .\" FIXME . https://sourceware.org/bugzilla/show_bug.cgi?id=13172
154 in violation of the requirements of POSIX.1.