3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>pth_get_pool</title>
9 <h1 align=center>pth_get_pool</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>
18 <!-- Creator : groff version 1.17.2 -->
19 <!-- CreationDate: Fri Aug 30 16:16:36 2002 -->
22 <table width="100%" border=0 rules="none" frame="void"
23 cols="2" cellspacing="0" cellpadding="0">
24 <tr valign="top" align="left">
25 <td width="10%"></td><td width="90%">
26 pth_get_pool, pth_get_name, pth_get_thread_num, pth_get_run, pth_get_data, pth_get_language, pth_get_tz, pth_get_stack, pth_get_stack_size, pth_get_PC, pth_get_SP, pth_set_name, pth_set_language, pth_set_tz - get and set status of pseudothreads</td></table>
27 <a name="SYNOPSIS"></a>
30 <table width="100%" border=0 rules="none" frame="void"
31 cols="2" cellspacing="0" cellpadding="0">
32 <tr valign="top" align="left">
33 <td width="10%"></td><td width="90%">
34 <pre><b>#include <pthr_pseudothread.h>
36 pool pth_get_pool (pseudothread pth);
37 const char *pth_get_name (pseudothread pth);
38 int pth_get_thread_num (pseudothread pth);
39 void (*pth_get_run (pseudothread pth)) (void *);
40 void *pth_get_data (pseudothread pth);
41 const char *pth_get_language (pseudothread pth);
42 const char *pth_get_tz (pseudothread pth);
43 void *pth_get_stack (pseudothread pth);
44 int pth_get_stack_size (pseudothread pth);
45 unsigned long pth_get_PC (pseudothread pth);
46 unsigned long pth_get_SP (pseudothread pth);
47 void pth_set_name (pseudothread pth, const char *name);
48 void pth_set_language (pseudothread, const char *lang);
49 void pth_set_tz (pseudothread, const char *tz);
50 </b></pre></td></table>
51 <a name="DESCRIPTION"></a>
54 <table width="100%" border=0 rules="none" frame="void"
55 cols="2" cellspacing="0" cellpadding="0">
56 <tr valign="top" align="left">
57 <td width="10%"></td><td width="90%">
58 <b>pth_get_pool</b> returns the pool associated with this
59 thread. The thread should use this pool for all allocations,
60 ensuring that they are cleaned up correctly when the thread
61 is deleted. See <b>new_pool(3)</b>.</td></table>
63 <table width="100%" border=0 rules="none" frame="void"
64 cols="2" cellspacing="0" cellpadding="0">
65 <tr valign="top" align="left">
66 <td width="10%"></td><td width="90%">
67 <b>pth_get_name</b> returns the name of the thread. Note
68 that this string is normally stored in thread's local pool,
69 and therefore the string memory may be unexpected
70 deallocated if the thread exits. Callers should take a copy
71 of the string in their own pool if they are likely to need
72 the string for a long period of time.</td></table>
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 <b>pth_get_thread_num</b> returns the thread number (roughly
79 the equivalent of a process ID).</td></table>
81 <table width="100%" border=0 rules="none" frame="void"
82 cols="2" cellspacing="0" cellpadding="0">
83 <tr valign="top" align="left">
84 <td width="10%"></td><td width="90%">
85 <b>pth_get_run</b> and <b>pth_get_data</b> return the
86 original entry point information of the thread.</td></table>
88 <table width="100%" border=0 rules="none" frame="void"
89 cols="2" cellspacing="0" cellpadding="0">
90 <tr valign="top" align="left">
91 <td width="10%"></td><td width="90%">
92 <b>pth_get_language</b> returns the value of the
93 <b>LANGUAGE</b> environment variable for this thread. See
94 the discussion of <b>pth_set_language</b>
97 <table width="100%" border=0 rules="none" frame="void"
98 cols="2" cellspacing="0" cellpadding="0">
99 <tr valign="top" align="left">
100 <td width="10%"></td><td width="90%">
101 <b>pth_get_language</b> returns the value of the <b>TZ</b>
102 environment variable for this thread. See the discussion of
103 <b>pth_set_tz</b> below.</td></table>
105 <table width="100%" border=0 rules="none" frame="void"
106 cols="2" cellspacing="0" cellpadding="0">
107 <tr valign="top" align="left">
108 <td width="10%"></td><td width="90%">
109 <b>pth_get_stack</b> returns the top of the stack for this
112 <table width="100%" border=0 rules="none" frame="void"
113 cols="2" cellspacing="0" cellpadding="0">
114 <tr valign="top" align="left">
115 <td width="10%"></td><td width="90%">
116 <b>pth_get_stack_size</b> returns the maximum size of the
117 stack for this thread.</td></table>
119 <table width="100%" border=0 rules="none" frame="void"
120 cols="2" cellspacing="0" cellpadding="0">
121 <tr valign="top" align="left">
122 <td width="10%"></td><td width="90%">
123 <b>pth_get_PC</b> returns the current program counter (PC)
124 for this thread. Obviously it only makes sense to call this
125 from another thread.</td></table>
127 <table width="100%" border=0 rules="none" frame="void"
128 cols="2" cellspacing="0" cellpadding="0">
129 <tr valign="top" align="left">
130 <td width="10%"></td><td width="90%">
131 <b>pth_get_SP</b> returns the current stack pointer (SP) for
132 this thread. Obviously it only makes sense to call this from
133 another thread.</td></table>
135 <table width="100%" border=0 rules="none" frame="void"
136 cols="2" cellspacing="0" cellpadding="0">
137 <tr valign="top" align="left">
138 <td width="10%"></td><td width="90%">
139 <b>pth_set_name</b> changes the name of the thread. The
140 string <b>name</b> argument passed must be either statically
141 allocated, or allocated in the thread's own pool (the normal
142 case), or else allocated in another pool with a longer life
143 than the current thread.</td></table>
145 <table width="100%" border=0 rules="none" frame="void"
146 cols="2" cellspacing="0" cellpadding="0">
147 <tr valign="top" align="left">
148 <td width="10%"></td><td width="90%">
149 <b>pth_set_language</b> changes the per-thread
150 <b>LANGUAGE</b> environment variable. This is useful when
151 serving clients from multiple locales, and using GNU gettext
152 for translation.</td></table>
154 <table width="100%" border=0 rules="none" frame="void"
155 cols="2" cellspacing="0" cellpadding="0">
156 <tr valign="top" align="left">
157 <td width="10%"></td><td width="90%">
158 <b>pth_set_tz</b> changes the per-thread <b>TZ</b>
159 environment variable. This is useful when serving clients
160 from multiple timezones, and using <b>localtime</b> and
161 related functions.</td></table>
162 <a name="AUTHOR"></a>
165 <table width="100%" border=0 rules="none" frame="void"
166 cols="2" cellspacing="0" cellpadding="0">
167 <tr valign="top" align="left">
168 <td width="10%"></td><td width="90%">
169 Richard Jones <rich@annexia.org></td></table>
170 <a name="LICENSE"></a>
173 <table width="100%" border=0 rules="none" frame="void"
174 cols="2" cellspacing="0" cellpadding="0">
175 <tr valign="top" align="left">
176 <td width="10%"></td><td width="90%">
177 GNU LGPL (see http://www.gnu.org/)</td></table>
178 <a name="VERSION"></a>
181 <table width="100%" border=0 rules="none" frame="void"
182 cols="2" cellspacing="0" cellpadding="0">
183 <tr valign="top" align="left">
184 <td width="10%"></td><td width="90%">
185 pthrlib-3.0.3</td></table>