OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man3 / aio_suspend.3
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
25 aio_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 );
34 .sp
35 Link with \fI\-lrt\fP.
36 .fi
37 .SH DESCRIPTION
38 The
39 .BR aio_suspend ()
40 function suspends the calling process until at least one of the
41 asynchronous I/O requests in the list
42 .I cblist
43 of length
44 .I n
45 have completed, a signal is delivered, or
46 .I timeout
47 is not NULL and the time interval it indicates has passed.
48 .LP
49 Each item in the list must either be NULL (and then is ignored),
50 or a pointer to a control block on which I/O was initiated using
51 .BR aio_read (3),
52 .BR aio_write (3),
53 or
54 .BR lio_listio (3).
55 .LP
56 If
57 .B CLOCK_MONOTONIC
58 is supported, this clock is used to measure
59 the timeout interval.
60 .SH "RETURN VALUE"
61 If this function returns after completion of one of the indicated
62 requests, it returns 0.
63 Otherwise it returns \-1 and sets
64 .I errno
65 appropriately.
66 .SH ERRORS
67 .TP
68 .B EAGAIN
69 The call was ended by timeout, before any of the indicated operations
70 had completed.
71 .TP
72 .B EINTR
73 The call was ended by signal; see
74 .BR signal (7).
75 (Possibly the completion signal of one of the operations we were
76 waiting for.)
77 .SH "CONFORMING TO"
78 POSIX.1-2001.
79 .SH NOTES
80 One can achieve polling by using a non-NULL
81 .I timeout
82 that specifies a zero time interval.
83 .SH "SEE ALSO"
84 .BR aio_cancel (3),
85 .BR aio_error (3),
86 .BR aio_fsync (3),
87 .BR aio_read (3),
88 .BR aio_return (3),
89 .BR aio_write (3),
90 .BR time (7)