Add to git.
[pthrlib.git] / doc / pth_poll.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>pth_poll</title>
6 </head>
7 <body>
8
9 <h1 align=center>pth_poll</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#AUTHOR">AUTHOR</a><br>
14 <a href="#LICENSE">LICENSE</a><br>
15 <a href="#VERSION">VERSION</a><br>
16 <a href="#SEE ALSO">SEE ALSO</a><br>
17
18 <hr>
19 <!-- Creator     : groff version 1.17.2 -->
20 <!-- CreationDate: Fri Aug 30 16:16:37 2002 -->
21 <a name="NAME"></a>
22 <h2>NAME</h2>
23 <table width="100%" border=0 rules="none" frame="void"
24        cols="2" cellspacing="0" cellpadding="0">
25 <tr valign="top" align="left">
26 <td width="10%"></td><td width="90%">
27 pth_poll, pth_select - pseudothread poll and select system calls</td></table>
28 <a name="SYNOPSIS"></a>
29 <h2>SYNOPSIS</h2>
30
31 <table width="100%" border=0 rules="none" frame="void"
32        cols="2" cellspacing="0" cellpadding="0">
33 <tr valign="top" align="left">
34 <td width="10%"></td><td width="90%">
35 <pre><b>#include &lt;pthr_pseudothread.h&gt;
36
37 int pth_poll (pseudothread, struct pollfd *fds, unsigned int n, int timeout);
38 int pth_select (pseudothread, int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
39 </b></pre></td></table>
40 <a name="DESCRIPTION"></a>
41 <h2>DESCRIPTION</h2>
42
43 <table width="100%" border=0 rules="none" frame="void"
44        cols="2" cellspacing="0" cellpadding="0">
45 <tr valign="top" align="left">
46 <td width="10%"></td><td width="90%">
47 <b>pth_poll</b> behaves like the <b>poll(2)</b> system call.
48 It specifies an array <b>n</b> of <b>fds</b> file descriptor
49 structures each of which is checked for an I/O event. If
50 <b>timeout</b> is greater than or equal to zero, then the
51 call will return after this many milliseconds if no I/O
52 events are detected. If <b>timeout</b> is negative, then the
53 timeout is infinite.</td></table>
54
55 <table width="100%" border=0 rules="none" frame="void"
56        cols="2" cellspacing="0" cellpadding="0">
57 <tr valign="top" align="left">
58 <td width="10%"></td><td width="90%">
59 <b>pth_select</b> behaves like the <b>select(2)</b> system
60 call.</td></table>
61
62 <table width="100%" border=0 rules="none" frame="void"
63        cols="2" cellspacing="0" cellpadding="0">
64 <tr valign="top" align="left">
65 <td width="10%"></td><td width="90%">
66 Note that <b>pth_select</b> is implemented as a library on
67 top of <b>pth_poll</b>, and is considerably less efficient
68 than <b>pth_poll</b>. It is recommended that you rewrite any
69 code which uses <b>pth_select</b>/<b>select</b> to use
70 <b>pth_poll</b>/<b>poll</b> instead.</td></table>
71 <a name="AUTHOR"></a>
72 <h2>AUTHOR</h2>
73
74 <table width="100%" border=0 rules="none" frame="void"
75        cols="2" cellspacing="0" cellpadding="0">
76 <tr valign="top" align="left">
77 <td width="10%"></td><td width="90%">
78 Richard Jones &lt;rich@annexia.org&gt;</td></table>
79 <a name="LICENSE"></a>
80 <h2>LICENSE</h2>
81
82 <table width="100%" border=0 rules="none" frame="void"
83        cols="2" cellspacing="0" cellpadding="0">
84 <tr valign="top" align="left">
85 <td width="10%"></td><td width="90%">
86 GNU LGPL (see http://www.gnu.org/)</td></table>
87 <a name="VERSION"></a>
88 <h2>VERSION</h2>
89
90 <table width="100%" border=0 rules="none" frame="void"
91        cols="2" cellspacing="0" cellpadding="0">
92 <tr valign="top" align="left">
93 <td width="10%"></td><td width="90%">
94 pthrlib-3.0.3</td></table>
95 <a name="SEE ALSO"></a>
96 <h2>SEE ALSO</h2>
97
98 <table width="100%" border=0 rules="none" frame="void"
99        cols="2" cellspacing="0" cellpadding="0">
100 <tr valign="top" align="left">
101 <td width="10%"></td><td width="90%">
102 <b>pth_timeout(3)</b>.</td></table>
103 <hr>
104 </body>
105 </html>