]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/aio_suspend.3
ffix
[thirdparty/man-pages.git] / man3 / aio_suspend.3
CommitLineData
fea681da
MK
1.\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2.\"
3.\" This is free documentation; you can redistribute it and/or
4.\" modify it under the terms of the GNU General Public License as
5.\" published by the Free Software Foundation; either version 2 of
6.\" the License, or (at your option) any later version.
7.\"
8.\" The GNU General Public License's references to "object code"
9.\" and "executables" are to be interpreted as the output of any
10.\" document formatting or typesetting system, including
11.\" intermediate and printed output.
12.\"
13.\" This manual is distributed in the hope that it will be useful,
14.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.\" GNU General Public License for more details.
17.\"
18.\" You should have received a copy of the GNU General Public
19.\" License along with this manual; if not, write to the Free
20.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
21.\" USA.
22.\"
23.TH AIO_SUSPEND 3 2003-11-14 "" "Linux Programmer's Manual"
24.SH NAME
25aio_suspend \- wait for asynchronous I/O operation or timeout
26.SH SYNOPSIS
27.nf
28.sp
29.B "#include <aio.h>"
30.sp
31.BI "int aio_suspend(const struct aiocb * const " cblist [],
32.br
33.BI " int " n ", const struct timespec *" timeout );
fea681da
MK
34.fi
35.SH DESCRIPTION
36The
e511ffb6 37.BR aio_suspend ()
fea681da
MK
38function suspends the calling process until at least one of the
39asynchronous I/O requests in the list
40.I cblist
41of length
42.I n
43have completed, a signal is delivered, or
44.I timeout
45is not NULL and the time interval it indicates has passed.
46.LP
47Each item in the list must either be NULL (and then is ignored),
48or a pointer to a control block on which I/O was initiated using
49.BR aio_read (3),
50.BR aio_write (3),
51or
52.BR lio_listio (3).
53.LP
54If CLOCK_MONOTONIC is supported, this clock is used to measure
55the timeout interval.
56.SH "RETURN VALUE"
57If this function returns after completion of one of the indicated
677f4766
MK
58requests, it returns 0.
59Otherwise it returns \-1 and sets
fea681da
MK
60.I errno
61appropriately.
62.SH ERRORS
63.TP
64.B EAGAIN
65The call was ended by timeout, before any of the indicated operations
66had completed.
67.TP
68.B EINTR
69The call was ended by signal.
70(Possibly the completion signal of one of the operations we were waiting for.)
2b2581ee
MK
71.SH "CONFORMING TO"
72POSIX.1-2001
19c98696 73.SH NOTES
fea681da
MK
74One can achieve polling by using a non-NULL
75.I timeout
76that specifies a zero time interval.
fea681da
MK
77.SH "SEE ALSO"
78.BR aio_cancel (3),
79.BR aio_error (3),
80.BR aio_fsync (3),
81.BR aio_read (3),
82.BR aio_return (3),
83.BR aio_write (3)