1AIO_SUSPEND(3P)            POSIX Programmer's Manual           AIO_SUSPEND(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       aio_suspend — wait for an asynchronous I/O request
13

SYNOPSIS

15       #include <aio.h>
16
17       int aio_suspend(const struct aiocb *const list[], int nent,
18           const struct timespec *timeout);
19

DESCRIPTION

21       The aio_suspend() function shall suspend the calling  thread  until  at
22       least  one  of  the  asynchronous I/O operations referenced by the list
23       argument has completed, until a signal interrupts the function, or,  if
24       timeout  is  not NULL, until the time interval specified by timeout has
25       passed. If any of the aiocb structures in the list correspond  to  com‐
26       pleted  asynchronous  I/O operations (that is, the error status for the
27       operation is not equal to [EINPROGRESS]) at the time of the  call,  the
28       function  shall  return without suspending the calling thread. The list
29       argument is an array of pointers to asynchronous  I/O  control  blocks.
30       The  nent  argument indicates the number of elements in the array. Each
31       aiocb structure pointed to has been used in initiating an  asynchronous
32       I/O  request  via aio_read(), aio_write(), or lio_listio().  This array
33       may contain null pointers, which are ignored. If  this  array  contains
34       pointers that refer to aiocb structures that have not been used in sub‐
35       mitting asynchronous I/O, the effect is undefined.
36
37       If the time interval indicated in the timespec structure pointed to  by
38       timeout  passes before any of the I/O operations referenced by list are
39       completed, then aio_suspend() shall return with an error.  If the Mono‐
40       tonic  Clock  option is supported, the clock that shall be used to mea‐
41       sure this time interval shall be the CLOCK_MONOTONIC clock.
42

RETURN VALUE

44       If the aio_suspend() function returns after one  or  more  asynchronous
45       I/O  operations  have completed, the function shall return zero. Other‐
46       wise, the function shall return a value of -1 and set errno to indicate
47       the error.
48
49       The application may determine which asynchronous I/O completed by scan‐
50       ning the associated error  and  return  status  using  aio_error()  and
51       aio_return(), respectively.
52

ERRORS

54       The aio_suspend() function shall fail if:
55
56       EAGAIN No  asynchronous  I/O  indicated  in the list referenced by list
57              completed in the time interval indicated by timeout.
58
59       EINTR  A signal interrupted  the  aio_suspend()  function.  Note  that,
60              since  each  asynchronous  I/O  operation may possibly provoke a
61              signal when it completes, this error return may be caused by the
62              completion  of  one  (or  more) of the very I/O operations being
63              awaited.
64
65       The following sections are informative.
66

EXAMPLES

68       None.
69

APPLICATION USAGE

71       None.
72

RATIONALE

74       None.
75

FUTURE DIRECTIONS

77       None.
78

SEE ALSO

80       aio_read(), aio_write(), lio_listio()
81
82       The Base Definitions volume of POSIX.1‐2017, <aio.h>
83
85       Portions of this text are reprinted and reproduced in  electronic  form
86       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
87       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
88       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
89       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
90       event of any discrepancy between this version and the original IEEE and
91       The Open Group Standard, the original IEEE and The Open Group  Standard
92       is  the  referee document. The original Standard can be obtained online
93       at http://www.opengroup.org/unix/online.html .
94
95       Any typographical or formatting errors that appear  in  this  page  are
96       most likely to have been introduced during the conversion of the source
97       files to man page format. To report such errors,  see  https://www.ker
98       nel.org/doc/man-pages/reporting_bugs.html .
99
100
101
102IEEE/The Open Group                  2017                      AIO_SUSPEND(3P)
Impressum