2 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
3 .\" and Copyright (C) 2010 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: GPL-2.0-or-later
7 .TH aio_suspend 3 (date) "Linux man-pages (unreleased)"
9 aio_suspend \- wait for asynchronous I/O operation or timeout
12 .RI ( librt ", " \-lrt )
18 .BI "int aio_suspend(const struct aiocb *const " aiocb_list "[], int " nitems ,
19 .BI " const struct timespec *restrict " timeout );
24 function suspends the calling thread until one of the following occurs:
26 One or more of the asynchronous I/O requests in the list
30 A signal is delivered.
33 is not NULL and the specified time interval has passed.
41 argument specifies the number of items in
43 Each item in the list pointed to by
45 must be either NULL (and then is ignored),
46 or a pointer to a control block on which I/O was initiated using
53 for a description of the
59 is supported, this clock is used to measure
60 the timeout interval (see
61 .BR clock_gettime (2)).
63 If this function returns after completion of one of the I/O
67 Otherwise, \-1 is returned, and
69 is set to indicate the error.
73 The call timed out before any of the indicated operations
77 The call was ended by signal
78 (possibly the completion signal of one of the operations we were
88 function is available since glibc 2.1.
90 For an explanation of the terms used in this section, see
98 Interface Attribute Value
101 T} Thread safety MT-Safe
107 POSIX.1-2001, POSIX.1-2008.
109 POSIX doesn't specify the parameters to be
111 that is specific to glibc.
113 One can achieve polling by using a non-NULL
115 that specifies a zero time interval.
117 If one or more of the asynchronous I/O operations specified in
119 has already completed at the time of the call to
121 then the call returns immediately.
123 To determine which I/O operations have completed
124 after a successful return from
130 structures pointed to by
133 The glibc implementation of
135 is not async-signal-safe,
136 .\" FIXME . https://sourceware.org/bugzilla/show_bug.cgi?id=13172
137 in violation of the requirements of POSIX.1.