OSDN Git Service

f9696e7abfc8f5224a0dd6d8048dd88dbf0fc7ac
[linuxjm/LDP_man-pages.git] / po4a / pthread / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-07-15 16:08+0900\n"
10 "PO-Revision-Date: 2013-07-15 16:37+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/getcontext.3:25
20 #, no-wrap
21 msgid "GETCONTEXT"
22 msgstr "GETCONTEXT"
23
24 #. type: TH
25 #: build/C/man3/getcontext.3:25
26 #, no-wrap
27 msgid "2009-03-15"
28 msgstr "2009-03-15"
29
30 #. type: TH
31 #: build/C/man3/getcontext.3:25 build/C/man3/pthread_attr_init.3:26
32 #: build/C/man3/pthread_attr_setaffinity_np.3:26
33 #: build/C/man3/pthread_attr_setdetachstate.3:26
34 #: build/C/man3/pthread_attr_setguardsize.3:26
35 #: build/C/man3/pthread_attr_setinheritsched.3:26
36 #: build/C/man3/pthread_attr_setschedparam.3:26
37 #: build/C/man3/pthread_attr_setschedpolicy.3:26
38 #: build/C/man3/pthread_attr_setscope.3:26
39 #: build/C/man3/pthread_attr_setstack.3:26
40 #: build/C/man3/pthread_attr_setstackaddr.3:26
41 #: build/C/man3/pthread_attr_setstacksize.3:26
42 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
43 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
44 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
45 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
46 #: build/C/man3/pthread_getattr_np.3:26
47 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
48 #: build/C/man3/pthread_kill.3:26
49 #: build/C/man3/pthread_kill_other_threads_np.3:26
50 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
51 #: build/C/man3/pthread_setcancelstate.3:26
52 #: build/C/man3/pthread_setconcurrency.3:25
53 #: build/C/man3/pthread_setname_np.3:26
54 #: build/C/man3/pthread_setschedparam.3:26
55 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
56 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
57 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
58 #: build/C/man7/pthreads.7:26
59 #, no-wrap
60 msgid "Linux"
61 msgstr "Linux"
62
63 #. type: TH
64 #: build/C/man3/getcontext.3:25 build/C/man3/makecontext.3:28
65 #: build/C/man3/pthread_attr_init.3:26
66 #: build/C/man3/pthread_attr_setaffinity_np.3:26
67 #: build/C/man3/pthread_attr_setdetachstate.3:26
68 #: build/C/man3/pthread_attr_setguardsize.3:26
69 #: build/C/man3/pthread_attr_setinheritsched.3:26
70 #: build/C/man3/pthread_attr_setschedparam.3:26
71 #: build/C/man3/pthread_attr_setschedpolicy.3:26
72 #: build/C/man3/pthread_attr_setscope.3:26
73 #: build/C/man3/pthread_attr_setstack.3:26
74 #: build/C/man3/pthread_attr_setstackaddr.3:26
75 #: build/C/man3/pthread_attr_setstacksize.3:26
76 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
77 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
78 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
79 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
80 #: build/C/man3/pthread_getattr_np.3:26
81 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
82 #: build/C/man3/pthread_kill.3:26
83 #: build/C/man3/pthread_kill_other_threads_np.3:26
84 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
85 #: build/C/man3/pthread_setcancelstate.3:26
86 #: build/C/man3/pthread_setconcurrency.3:25
87 #: build/C/man3/pthread_setname_np.3:26
88 #: build/C/man3/pthread_setschedparam.3:26
89 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
90 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
91 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
92 #: build/C/man7/pthreads.7:26
93 #, no-wrap
94 msgid "Linux Programmer's Manual"
95 msgstr "Linux Programmer's Manual"
96
97 #. type: SH
98 #: build/C/man3/getcontext.3:26 build/C/man3/makecontext.3:29
99 #: build/C/man3/pthread_attr_init.3:27
100 #: build/C/man3/pthread_attr_setaffinity_np.3:27
101 #: build/C/man3/pthread_attr_setdetachstate.3:27
102 #: build/C/man3/pthread_attr_setguardsize.3:27
103 #: build/C/man3/pthread_attr_setinheritsched.3:27
104 #: build/C/man3/pthread_attr_setschedparam.3:27
105 #: build/C/man3/pthread_attr_setschedpolicy.3:27
106 #: build/C/man3/pthread_attr_setscope.3:27
107 #: build/C/man3/pthread_attr_setstack.3:27
108 #: build/C/man3/pthread_attr_setstackaddr.3:27
109 #: build/C/man3/pthread_attr_setstacksize.3:27
110 #: build/C/man3/pthread_cancel.3:27 build/C/man3/pthread_cleanup_push.3:27
111 #: build/C/man3/pthread_cleanup_push_defer_np.3:27
112 #: build/C/man3/pthread_create.3:27 build/C/man3/pthread_detach.3:27
113 #: build/C/man3/pthread_equal.3:27 build/C/man3/pthread_exit.3:27
114 #: build/C/man3/pthread_getattr_np.3:27
115 #: build/C/man3/pthread_getcpuclockid.3:27 build/C/man3/pthread_join.3:27
116 #: build/C/man3/pthread_kill.3:27
117 #: build/C/man3/pthread_kill_other_threads_np.3:27
118 #: build/C/man3/pthread_self.3:27 build/C/man3/pthread_setaffinity_np.3:27
119 #: build/C/man3/pthread_setcancelstate.3:27
120 #: build/C/man3/pthread_setconcurrency.3:26
121 #: build/C/man3/pthread_setname_np.3:27
122 #: build/C/man3/pthread_setschedparam.3:27
123 #: build/C/man3/pthread_setschedprio.3:27 build/C/man3/pthread_sigmask.3:27
124 #: build/C/man3/pthread_sigqueue.3:26 build/C/man3/pthread_testcancel.3:27
125 #: build/C/man3/pthread_tryjoin_np.3:27 build/C/man3/pthread_yield.3:26
126 #: build/C/man7/pthreads.7:27
127 #, no-wrap
128 msgid "NAME"
129 msgstr "名前"
130
131 #. type: Plain text
132 #: build/C/man3/getcontext.3:28
133 msgid "getcontext, setcontext - get or set the user context"
134 msgstr "getcontext, setcontext - ユーザコンテキストを取得/設定する"
135
136 #. type: SH
137 #: build/C/man3/getcontext.3:28 build/C/man3/makecontext.3:31
138 #: build/C/man3/pthread_attr_init.3:30
139 #: build/C/man3/pthread_attr_setaffinity_np.3:30
140 #: build/C/man3/pthread_attr_setdetachstate.3:30
141 #: build/C/man3/pthread_attr_setguardsize.3:30
142 #: build/C/man3/pthread_attr_setinheritsched.3:30
143 #: build/C/man3/pthread_attr_setschedparam.3:30
144 #: build/C/man3/pthread_attr_setschedpolicy.3:30
145 #: build/C/man3/pthread_attr_setscope.3:30
146 #: build/C/man3/pthread_attr_setstack.3:30
147 #: build/C/man3/pthread_attr_setstackaddr.3:30
148 #: build/C/man3/pthread_attr_setstacksize.3:30
149 #: build/C/man3/pthread_cancel.3:29 build/C/man3/pthread_cleanup_push.3:30
150 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
151 #: build/C/man3/pthread_create.3:29 build/C/man3/pthread_detach.3:29
152 #: build/C/man3/pthread_equal.3:29 build/C/man3/pthread_exit.3:29
153 #: build/C/man3/pthread_getattr_np.3:29
154 #: build/C/man3/pthread_getcpuclockid.3:29 build/C/man3/pthread_join.3:29
155 #: build/C/man3/pthread_kill.3:29
156 #: build/C/man3/pthread_kill_other_threads_np.3:29
157 #: build/C/man3/pthread_self.3:29 build/C/man3/pthread_setaffinity_np.3:30
158 #: build/C/man3/pthread_setcancelstate.3:30
159 #: build/C/man3/pthread_setconcurrency.3:29
160 #: build/C/man3/pthread_setname_np.3:29
161 #: build/C/man3/pthread_setschedparam.3:30
162 #: build/C/man3/pthread_setschedprio.3:29 build/C/man3/pthread_sigmask.3:29
163 #: build/C/man3/pthread_sigqueue.3:28 build/C/man3/pthread_testcancel.3:29
164 #: build/C/man3/pthread_tryjoin_np.3:30 build/C/man3/pthread_yield.3:28
165 #, no-wrap
166 msgid "SYNOPSIS"
167 msgstr "書式"
168
169 #. type: Plain text
170 #: build/C/man3/getcontext.3:30 build/C/man3/makecontext.3:33
171 msgid "B<#include E<lt>ucontext.hE<gt>>"
172 msgstr "B<#include E<lt>ucontext.hE<gt>>"
173
174 #. type: Plain text
175 #: build/C/man3/getcontext.3:32
176 msgid "B<int getcontext(ucontext_t *>I<ucp>B<);>"
177 msgstr "B<int getcontext(ucontext_t *>I<ucp>B<);>"
178
179 #. type: Plain text
180 #: build/C/man3/getcontext.3:34
181 msgid "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
182 msgstr "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
183
184 #. type: SH
185 #: build/C/man3/getcontext.3:34 build/C/man3/makecontext.3:38
186 #: build/C/man3/pthread_attr_init.3:39
187 #: build/C/man3/pthread_attr_setaffinity_np.3:42
188 #: build/C/man3/pthread_attr_setdetachstate.3:41
189 #: build/C/man3/pthread_attr_setguardsize.3:41
190 #: build/C/man3/pthread_attr_setinheritsched.3:41
191 #: build/C/man3/pthread_attr_setschedparam.3:41
192 #: build/C/man3/pthread_attr_setschedpolicy.3:41
193 #: build/C/man3/pthread_attr_setscope.3:41
194 #: build/C/man3/pthread_attr_setstack.3:54
195 #: build/C/man3/pthread_attr_setstackaddr.3:41
196 #: build/C/man3/pthread_attr_setstacksize.3:41
197 #: build/C/man3/pthread_cancel.3:37 build/C/man3/pthread_cleanup_push.3:40
198 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
199 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
200 #: build/C/man3/pthread_equal.3:37 build/C/man3/pthread_exit.3:37
201 #: build/C/man3/pthread_getattr_np.3:38
202 #: build/C/man3/pthread_getcpuclockid.3:38 build/C/man3/pthread_join.3:37
203 #: build/C/man3/pthread_kill.3:37
204 #: build/C/man3/pthread_kill_other_threads_np.3:35
205 #: build/C/man3/pthread_self.3:37 build/C/man3/pthread_setaffinity_np.3:42
206 #: build/C/man3/pthread_setcancelstate.3:39
207 #: build/C/man3/pthread_setconcurrency.3:38
208 #: build/C/man3/pthread_setname_np.3:39
209 #: build/C/man3/pthread_setschedparam.3:41
210 #: build/C/man3/pthread_setschedprio.3:37 build/C/man3/pthread_sigmask.3:38
211 #: build/C/man3/pthread_sigqueue.3:45 build/C/man3/pthread_testcancel.3:37
212 #: build/C/man3/pthread_tryjoin_np.3:42 build/C/man3/pthread_yield.3:37
213 #: build/C/man7/pthreads.7:29
214 #, no-wrap
215 msgid "DESCRIPTION"
216 msgstr "説明"
217
218 #. type: Plain text
219 #: build/C/man3/getcontext.3:49
220 msgid ""
221 "In a System V-like environment, one has the two types I<mcontext_t> and "
222 "I<ucontext_t> defined in I<E<lt>ucontext.hE<gt>> and the four functions "
223 "B<getcontext>(), B<setcontext>(), B<makecontext>(3)  and B<swapcontext>(3)  "
224 "that allow user-level context switching between multiple threads of control "
225 "within a process."
226 msgstr ""
227 "System V 的な環境では、 I<mcontext_t> および I<ucontext_t> という 2 つの型"
228 "と、 B<getcontext>(), B<setcontext>(), B<makecontext>(3), B<swapcontext>(3)  "
229 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
230 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
231 "ようになっている。"
232
233 #. type: Plain text
234 #: build/C/man3/getcontext.3:57
235 msgid ""
236 "The I<mcontext_t> type is machine-dependent and opaque.  The I<ucontext_t> "
237 "type is a structure that has at least the following fields:"
238 msgstr ""
239 "I<mcontext_t> 型はマシン依存で、外部からは隠蔽されている。 I<ucontext_t> 型は"
240 "構造体で、少なくとも以下の 4 つのフィールドを持つ。"
241
242 #. type: Plain text
243 #: build/C/man3/getcontext.3:67
244 #, no-wrap
245 msgid ""
246 "typedef struct ucontext {\n"
247 "    struct ucontext *uc_link;\n"
248 "    sigset_t         uc_sigmask;\n"
249 "    stack_t          uc_stack;\n"
250 "    mcontext_t       uc_mcontext;\n"
251 "    ...\n"
252 "} ucontext_t;\n"
253 msgstr ""
254 "typedef struct ucontext {\n"
255 "    struct ucontext *uc_link;\n"
256 "    sigset_t         uc_sigmask;\n"
257 "    stack_t          uc_stack;\n"
258 "    mcontext_t       uc_mcontext;\n"
259 "    ...\n"
260 "} ucontext_t;\n"
261
262 #. type: Plain text
263 #: build/C/man3/getcontext.3:94
264 msgid ""
265 "with I<sigset_t> and I<stack_t> defined in I<E<lt>signal.hE<gt>>.  Here "
266 "I<uc_link> points to the context that will be resumed when the current "
267 "context terminates (in case the current context was created using "
268 "B<makecontext>(3)), I<uc_sigmask> is the set of signals blocked in this "
269 "context (see B<sigprocmask>(2)), I<uc_stack> is the stack used by this "
270 "context (see B<sigaltstack>(2)), and I<uc_mcontext> is the machine-specific "
271 "representation of the saved context, that includes the calling thread's "
272 "machine registers."
273 msgstr ""
274 "I<sigset_t> と I<stack_t> は I<E<lt>signal.hE<gt>> で定義されている。 ここで "
275 "I<uc_link> は、 現在のコンテキストが終了したとき、 続いて切り替わるコンテキス"
276 "トへのポインタである (現在のコンテキストが B<makecontext>(3)  で生成されたも"
277 "のの場合)。 I<uc_sigmask> はこのコンテキストでブロックされている シグナル群で"
278 "ある (B<sigprocmask>(2)  を見よ)。 I<uc_stack> はこのコンテキストが用いている"
279 "スタックである (B<signalstack>(2)  を見よ)。 I<uc_mcontext> は保存されている"
280 "コンテキストの マシン特有の表現形式であり、 ここには呼び出したスレッドのマシ"
281 "ンレジスタが格納される。"
282
283 #. type: Plain text
284 #: build/C/man3/getcontext.3:101
285 msgid ""
286 "The function B<getcontext>()  initializes the structure pointed at by I<ucp> "
287 "to the currently active context."
288 msgstr ""
289 "B<getcontext>()  関数は、 ポインタ I<ucp> が指す構造体を、 現在アクティブなコ"
290 "ンテキストに初期化する。"
291
292 #. type: Plain text
293 #: build/C/man3/getcontext.3:114
294 msgid ""
295 "The function B<setcontext>()  restores the user context pointed at by "
296 "I<ucp>.  A successful call does not return.  The context should have been "
297 "obtained by a call of B<getcontext>(), or B<makecontext>(3), or passed as "
298 "third argument to a signal handler."
299 msgstr ""
300 "B<setcontext>()  関数は、ポインタ I<ucp> が指すユーザコンテキストをリストアす"
301 "る。 呼び出しに成功すると返らない。 このコンテキストは、以前に B<getcontext>"
302 "()  または B<makecontext>(3)  で得られたものか、 あるいはシグナルの第三引数と"
303 "して与えられたものになる。"
304
305 #. type: Plain text
306 #: build/C/man3/getcontext.3:118
307 msgid ""
308 "If the context was obtained by a call of B<getcontext>(), program execution "
309 "continues as if this call just returned."
310 msgstr ""
311 "コンテキストが B<getcontext>()  の呼び出しによって得られていたものの場合は、 "
312 "プログラムはこの呼び出しから返った直後からのように実行を継続する。"
313
314 #. type: Plain text
315 #: build/C/man3/getcontext.3:135
316 msgid ""
317 "If the context was obtained by a call of B<makecontext>(3), program "
318 "execution continues by a call to the function I<func> specified as the "
319 "second argument of that call to B<makecontext>(3).  When the function "
320 "I<func> returns, we continue with the I<uc_link> member of the structure "
321 "I<ucp> specified as the first argument of that call to B<makecontext>(3).  "
322 "When this member is NULL, the thread exits."
323 msgstr ""
324 "コンテキストが B<makecontext>(3)  の呼び出しによって得られていたものの場合"
325 "は、 プログラムの実行はその B<makecontext>(3)  呼び出しの第二引数で指定された"
326 "関数 I<func> を呼び出すかたちで継続する。 I<func> から返ると、 B<makecontext>"
327 "(3)  呼び出しの第一引数で指定されていた I<ucp> 構造体の I<uc_link> メンバで継"
328 "続する。 このメンバが NULL だった場合は、そのスレッドは終了する。"
329
330 #. type: Plain text
331 #: build/C/man3/getcontext.3:142
332 msgid ""
333 "If the context was obtained by a call to a signal handler, then old standard "
334 "text says that \"program execution continues with the program instruction "
335 "following the instruction interrupted by the signal\".  However, this "
336 "sentence was removed in SUSv2, and the present verdict is \"the result is "
337 "unspecified\"."
338 msgstr ""
339 "コンテキストがシグナルハンドラの呼び出しによって得られていたものの場合は、 古"
340 "い標準によれば 「プログラムの実行はシグナルによって割り込まれた命令の次の命令"
341 "から継続される」。 しかしこの文は SUSv2 で削除されたので、 現在の判断は「結果"
342 "は定義されていない」である。"
343
344 #. type: SH
345 #: build/C/man3/getcontext.3:142 build/C/man3/makecontext.3:84
346 #: build/C/man3/pthread_attr_init.3:68
347 #: build/C/man3/pthread_attr_setaffinity_np.3:76
348 #: build/C/man3/pthread_attr_setdetachstate.3:77
349 #: build/C/man3/pthread_attr_setguardsize.3:90
350 #: build/C/man3/pthread_attr_setinheritsched.3:93
351 #: build/C/man3/pthread_attr_setschedparam.3:85
352 #: build/C/man3/pthread_attr_setschedpolicy.3:83
353 #: build/C/man3/pthread_attr_setscope.3:103
354 #: build/C/man3/pthread_attr_setstack.3:85
355 #: build/C/man3/pthread_attr_setstackaddr.3:74
356 #: build/C/man3/pthread_attr_setstacksize.3:61
357 #: build/C/man3/pthread_cancel.3:112 build/C/man3/pthread_cleanup_push.3:121
358 #: build/C/man3/pthread_create.3:115 build/C/man3/pthread_detach.3:49
359 #: build/C/man3/pthread_equal.3:41 build/C/man3/pthread_exit.3:71
360 #: build/C/man3/pthread_getattr_np.3:73
361 #: build/C/man3/pthread_getcpuclockid.3:46 build/C/man3/pthread_join.3:70
362 #: build/C/man3/pthread_kill.3:52 build/C/man3/pthread_self.3:46
363 #: build/C/man3/pthread_setaffinity_np.3:77
364 #: build/C/man3/pthread_setcancelstate.3:92
365 #: build/C/man3/pthread_setconcurrency.3:56
366 #: build/C/man3/pthread_setname_np.3:72
367 #: build/C/man3/pthread_setschedparam.3:104
368 #: build/C/man3/pthread_setschedprio.3:53 build/C/man3/pthread_sigmask.3:49
369 #: build/C/man3/pthread_sigqueue.3:65 build/C/man3/pthread_testcancel.3:50
370 #: build/C/man3/pthread_tryjoin_np.3:85 build/C/man3/pthread_yield.3:44
371 #, no-wrap
372 msgid "RETURN VALUE"
373 msgstr "返り値"
374
375 #. type: Plain text
376 #: build/C/man3/getcontext.3:151
377 msgid ""
378 "When successful, B<getcontext>()  returns 0 and B<setcontext>()  does not "
379 "return.  On error, both return -1 and set I<errno> appropriately."
380 msgstr ""
381 "成功すると、 B<getcontext>()  は 0 を返し、 B<setcontext>()  は返らない。 失"
382 "敗すると、両者とも -1 を返し、I<errno> をエラーに応じて設定する。"
383
384 #. type: SH
385 #: build/C/man3/getcontext.3:151 build/C/man3/makecontext.3:96
386 #: build/C/man3/pthread_attr_init.3:71
387 #: build/C/man3/pthread_attr_setaffinity_np.3:79
388 #: build/C/man3/pthread_attr_setdetachstate.3:80
389 #: build/C/man3/pthread_attr_setguardsize.3:93
390 #: build/C/man3/pthread_attr_setinheritsched.3:96
391 #: build/C/man3/pthread_attr_setschedparam.3:88
392 #: build/C/man3/pthread_attr_setschedpolicy.3:86
393 #: build/C/man3/pthread_attr_setscope.3:106
394 #: build/C/man3/pthread_attr_setstack.3:88
395 #: build/C/man3/pthread_attr_setstackaddr.3:77
396 #: build/C/man3/pthread_attr_setstacksize.3:64
397 #: build/C/man3/pthread_cancel.3:117 build/C/man3/pthread_cleanup_push.3:123
398 #: build/C/man3/pthread_create.3:122 build/C/man3/pthread_detach.3:54
399 #: build/C/man3/pthread_equal.3:45 build/C/man3/pthread_exit.3:73
400 #: build/C/man3/pthread_getattr_np.3:76
401 #: build/C/man3/pthread_getcpuclockid.3:49 build/C/man3/pthread_join.3:75
402 #: build/C/man3/pthread_kill.3:57 build/C/man3/pthread_self.3:48
403 #: build/C/man3/pthread_setaffinity_np.3:80
404 #: build/C/man3/pthread_setcancelstate.3:95
405 #: build/C/man3/pthread_setconcurrency.3:68
406 #: build/C/man3/pthread_setname_np.3:75
407 #: build/C/man3/pthread_setschedparam.3:112
408 #: build/C/man3/pthread_setschedprio.3:61 build/C/man3/pthread_sigmask.3:54
409 #: build/C/man3/pthread_sigqueue.3:70 build/C/man3/pthread_testcancel.3:54
410 #: build/C/man3/pthread_tryjoin_np.3:89 build/C/man3/pthread_yield.3:49
411 #, no-wrap
412 msgid "ERRORS"
413 msgstr "エラー"
414
415 #. type: Plain text
416 #: build/C/man3/getcontext.3:153
417 msgid "None defined."
418 msgstr "定義されていない。"
419
420 #. type: SH
421 #: build/C/man3/getcontext.3:153 build/C/man3/makecontext.3:105
422 #: build/C/man3/pthread_attr_init.3:79
423 #: build/C/man3/pthread_attr_setaffinity_np.3:108
424 #: build/C/man3/pthread_attr_setdetachstate.3:87
425 #: build/C/man3/pthread_attr_setguardsize.3:106
426 #: build/C/man3/pthread_attr_setinheritsched.3:110
427 #: build/C/man3/pthread_attr_setschedparam.3:100
428 #: build/C/man3/pthread_attr_setschedpolicy.3:100
429 #: build/C/man3/pthread_attr_setscope.3:119
430 #: build/C/man3/pthread_attr_setstack.3:112
431 #: build/C/man3/pthread_attr_setstackaddr.3:83
432 #: build/C/man3/pthread_attr_setstacksize.3:83
433 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_cleanup_push.3:127
434 #: build/C/man3/pthread_cleanup_push_defer_np.3:101
435 #: build/C/man3/pthread_create.3:146 build/C/man3/pthread_detach.3:64
436 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
437 #: build/C/man3/pthread_getattr_np.3:98
438 #: build/C/man3/pthread_getcpuclockid.3:65 build/C/man3/pthread_join.3:98
439 #: build/C/man3/pthread_kill.3:66
440 #: build/C/man3/pthread_kill_other_threads_np.3:47
441 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_setaffinity_np.3:121
442 #: build/C/man3/pthread_setcancelstate.3:113
443 #: build/C/man3/pthread_setconcurrency.3:83
444 #: build/C/man3/pthread_setname_np.3:102
445 #: build/C/man3/pthread_setschedparam.3:141
446 #: build/C/man3/pthread_setschedprio.3:83 build/C/man3/pthread_sigmask.3:57
447 #: build/C/man3/pthread_sigqueue.3:93 build/C/man3/pthread_testcancel.3:58
448 #: build/C/man3/pthread_tryjoin_np.3:112 build/C/man3/pthread_yield.3:53
449 #, no-wrap
450 msgid "CONFORMING TO"
451 msgstr "準拠"
452
453 #. type: Plain text
454 #: build/C/man3/getcontext.3:159
455 msgid ""
456 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specification of B<getcontext>"
457 "(), citing portability issues, and recommending that applications be "
458 "rewritten to use POSIX threads instead."
459 msgstr ""
460 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<getcontext>()  の"
461 "仕様が削除された。 代わりに、アプリケーションを POSIX スレッドを使って書き直"
462 "すことが 推奨されている。"
463
464 #. type: SH
465 #: build/C/man3/getcontext.3:159 build/C/man3/makecontext.3:113
466 #: build/C/man3/pthread_attr_init.3:81
467 #: build/C/man3/pthread_attr_setaffinity_np.3:111
468 #: build/C/man3/pthread_attr_setdetachstate.3:89
469 #: build/C/man3/pthread_attr_setguardsize.3:108
470 #: build/C/man3/pthread_attr_setschedparam.3:102
471 #: build/C/man3/pthread_attr_setscope.3:121
472 #: build/C/man3/pthread_attr_setstack.3:114
473 #: build/C/man3/pthread_attr_setstackaddr.3:86
474 #: build/C/man3/pthread_attr_setstacksize.3:85
475 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
476 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
477 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
478 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
479 #: build/C/man3/pthread_kill.3:68
480 #: build/C/man3/pthread_kill_other_threads_np.3:50
481 #: build/C/man3/pthread_self.3:52 build/C/man3/pthread_setaffinity_np.3:124
482 #: build/C/man3/pthread_setcancelstate.3:115
483 #: build/C/man3/pthread_setconcurrency.3:85
484 #: build/C/man3/pthread_setname_np.3:104
485 #: build/C/man3/pthread_setschedparam.3:143
486 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
487 #: build/C/man3/pthread_yield.3:59
488 #, no-wrap
489 msgid "NOTES"
490 msgstr "注意"
491
492 #. type: Plain text
493 #: build/C/man3/getcontext.3:176
494 msgid ""
495 "The earliest incarnation of this mechanism was the B<setjmp>(3)/B<longjmp>"
496 "(3)  mechanism.  Since that does not define the handling of the signal "
497 "context, the next stage was the B<sigsetjmp>(3)/B<siglongjmp>(3)  pair.  The "
498 "present mechanism gives much more control.  On the other hand, there is no "
499 "easy way to detect whether a return from B<getcontext>()  is from the first "
500 "call, or via a B<setcontext>()  call.  The user has to invent her own "
501 "bookkeeping device, and a register variable won't do since registers are "
502 "restored."
503 msgstr ""
504 "このメカニズムの最古の実装は、 B<setjmp>(3)/B<longjmp>(3)  機構であった。 こ"
505 "れらにはシグナルコンテキストの取り扱いが定義されていなかったので、 次の段階で"
506 "は B<sigsetjmp>(3)/B<siglongjmp>(3)  のペアが現われた。 現在の機構ではずっと"
507 "細かな制御ができる。 一方 B<getcontext>()  から返ったとき、 これが最初の呼び"
508 "出しであったか、 それとも B<setcontext>()  呼び出しからのものであるかを 区別"
509 "する容易な方法がなくなってしまった。 ユーザは「しおり」機構を自分で作らなけれ"
510 "ばならない。 レジスタ変数は (レジスタはリストアされてしまうので) これをやって"
511 "くれない。"
512
513 #. type: Plain text
514 #: build/C/man3/getcontext.3:187
515 msgid ""
516 "When a signal occurs, the current user context is saved and a new context is "
517 "created by the kernel for the signal handler.  Do not leave the handler "
518 "using B<longjmp>(3): it is undefined what would happen with contexts.  Use "
519 "B<siglongjmp>(3)  or B<setcontext>()  instead."
520 msgstr ""
521 "シグナルが発生すると、 現在のユーザコンテキストは保存され、 シグナルハンドラ"
522 "用のコンテキストがカーネルによって生成される。 今後はハンドラに B<longjmp>"
523 "(3)  を使わせないこと: この関数のコンテキスト下での動作は定義されていない。 "
524 "代わりに B<siglongjmp>(3)  か B<setcontext>()  を使うこと。"
525
526 #. type: SH
527 #: build/C/man3/getcontext.3:187 build/C/man3/makecontext.3:220
528 #: build/C/man3/pthread_attr_init.3:297
529 #: build/C/man3/pthread_attr_setaffinity_np.3:118
530 #: build/C/man3/pthread_attr_setdetachstate.3:111
531 #: build/C/man3/pthread_attr_setguardsize.3:158
532 #: build/C/man3/pthread_attr_setinheritsched.3:131
533 #: build/C/man3/pthread_attr_setschedparam.3:109
534 #: build/C/man3/pthread_attr_setschedpolicy.3:105
535 #: build/C/man3/pthread_attr_setscope.3:132
536 #: build/C/man3/pthread_attr_setstack.3:156
537 #: build/C/man3/pthread_attr_setstackaddr.3:110
538 #: build/C/man3/pthread_attr_setstacksize.3:111
539 #: build/C/man3/pthread_cancel.3:226 build/C/man3/pthread_cleanup_push.3:315
540 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
541 #: build/C/man3/pthread_create.3:369 build/C/man3/pthread_detach.3:97
542 #: build/C/man3/pthread_equal.3:56 build/C/man3/pthread_exit.3:105
543 #: build/C/man3/pthread_getattr_np.3:345
544 #: build/C/man3/pthread_getcpuclockid.3:169 build/C/man3/pthread_join.3:127
545 #: build/C/man3/pthread_kill.3:75
546 #: build/C/man3/pthread_kill_other_threads_np.3:66
547 #: build/C/man3/pthread_self.3:76 build/C/man3/pthread_setaffinity_np.3:206
548 #: build/C/man3/pthread_setcancelstate.3:177
549 #: build/C/man3/pthread_setconcurrency.3:100
550 #: build/C/man3/pthread_setname_np.3:198
551 #: build/C/man3/pthread_setschedparam.3:431
552 #: build/C/man3/pthread_setschedprio.3:91 build/C/man3/pthread_sigmask.3:135
553 #: build/C/man3/pthread_sigqueue.3:95 build/C/man3/pthread_testcancel.3:63
554 #: build/C/man3/pthread_tryjoin_np.3:135 build/C/man3/pthread_yield.3:62
555 #: build/C/man7/pthreads.7:895
556 #, no-wrap
557 msgid "SEE ALSO"
558 msgstr "関連項目"
559
560 #. type: Plain text
561 #: build/C/man3/getcontext.3:194
562 msgid ""
563 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
564 "B<makecontext>(3), B<sigsetjmp>(3)"
565 msgstr ""
566 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
567 "B<makecontext>(3), B<sigsetjmp>(3)"
568
569 #. type: SH
570 #: build/C/man3/getcontext.3:194 build/C/man3/makecontext.3:226
571 #: build/C/man3/pthread_attr_init.3:313
572 #: build/C/man3/pthread_attr_setaffinity_np.3:124
573 #: build/C/man3/pthread_attr_setdetachstate.3:117
574 #: build/C/man3/pthread_attr_setguardsize.3:166
575 #: build/C/man3/pthread_attr_setinheritsched.3:143
576 #: build/C/man3/pthread_attr_setschedparam.3:121
577 #: build/C/man3/pthread_attr_setschedpolicy.3:116
578 #: build/C/man3/pthread_attr_setscope.3:142
579 #: build/C/man3/pthread_attr_setstack.3:168
580 #: build/C/man3/pthread_attr_setstackaddr.3:116
581 #: build/C/man3/pthread_attr_setstacksize.3:118
582 #: build/C/man3/pthread_cancel.3:238 build/C/man3/pthread_cleanup_push.3:321
583 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
584 #: build/C/man3/pthread_create.3:382 build/C/man3/pthread_detach.3:104
585 #: build/C/man3/pthread_equal.3:60 build/C/man3/pthread_exit.3:109
586 #: build/C/man3/pthread_getattr_np.3:361
587 #: build/C/man3/pthread_getcpuclockid.3:177 build/C/man3/pthread_join.3:134
588 #: build/C/man3/pthread_kill.3:84
589 #: build/C/man3/pthread_kill_other_threads_np.3:72
590 #: build/C/man3/pthread_self.3:80 build/C/man3/pthread_setaffinity_np.3:214
591 #: build/C/man3/pthread_setcancelstate.3:182
592 #: build/C/man3/pthread_setconcurrency.3:103
593 #: build/C/man3/pthread_setname_np.3:204
594 #: build/C/man3/pthread_setschedparam.3:445
595 #: build/C/man3/pthread_setschedprio.3:105 build/C/man3/pthread_sigmask.3:144
596 #: build/C/man3/pthread_sigqueue.3:103 build/C/man3/pthread_testcancel.3:68
597 #: build/C/man3/pthread_tryjoin_np.3:140 build/C/man3/pthread_yield.3:66
598 #: build/C/man7/pthreads.7:929
599 #, no-wrap
600 msgid "COLOPHON"
601 msgstr "この文書について"
602
603 #. type: Plain text
604 #: build/C/man3/getcontext.3:201 build/C/man3/makecontext.3:233
605 #: build/C/man3/pthread_attr_init.3:320
606 #: build/C/man3/pthread_attr_setaffinity_np.3:131
607 #: build/C/man3/pthread_attr_setdetachstate.3:124
608 #: build/C/man3/pthread_attr_setguardsize.3:173
609 #: build/C/man3/pthread_attr_setinheritsched.3:150
610 #: build/C/man3/pthread_attr_setschedparam.3:128
611 #: build/C/man3/pthread_attr_setschedpolicy.3:123
612 #: build/C/man3/pthread_attr_setscope.3:149
613 #: build/C/man3/pthread_attr_setstack.3:175
614 #: build/C/man3/pthread_attr_setstackaddr.3:123
615 #: build/C/man3/pthread_attr_setstacksize.3:125
616 #: build/C/man3/pthread_cancel.3:245 build/C/man3/pthread_cleanup_push.3:328
617 #: build/C/man3/pthread_cleanup_push_defer_np.3:117
618 #: build/C/man3/pthread_create.3:389 build/C/man3/pthread_detach.3:111
619 #: build/C/man3/pthread_equal.3:67 build/C/man3/pthread_exit.3:116
620 #: build/C/man3/pthread_getattr_np.3:368
621 #: build/C/man3/pthread_getcpuclockid.3:184 build/C/man3/pthread_join.3:141
622 #: build/C/man3/pthread_kill.3:91
623 #: build/C/man3/pthread_kill_other_threads_np.3:79
624 #: build/C/man3/pthread_self.3:87 build/C/man3/pthread_setaffinity_np.3:221
625 #: build/C/man3/pthread_setcancelstate.3:189
626 #: build/C/man3/pthread_setconcurrency.3:110
627 #: build/C/man3/pthread_setname_np.3:211
628 #: build/C/man3/pthread_setschedparam.3:452
629 #: build/C/man3/pthread_setschedprio.3:112 build/C/man3/pthread_sigmask.3:151
630 #: build/C/man3/pthread_sigqueue.3:110 build/C/man3/pthread_testcancel.3:75
631 #: build/C/man3/pthread_tryjoin_np.3:147 build/C/man3/pthread_yield.3:73
632 #: build/C/man7/pthreads.7:936
633 msgid ""
634 "This page is part of release 3.52 of the Linux I<man-pages> project.  A "
635 "description of the project, and information about reporting bugs, can be "
636 "found at \\%http://www.kernel.org/doc/man-pages/."
637 msgstr ""
638 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.52 の一部\n"
639 "である。プロジェクトの説明とバグ報告に関する情報は\n"
640 "http://www.kernel.org/doc/man-pages/ に書かれている。"
641
642 #. type: TH
643 #: build/C/man3/makecontext.3:28
644 #, no-wrap
645 msgid "MAKECONTEXT"
646 msgstr "MAKECONTEXT"
647
648 #. type: TH
649 #: build/C/man3/makecontext.3:28
650 #, no-wrap
651 msgid "2013-02-12"
652 msgstr "2013-02-12"
653
654 #. type: TH
655 #: build/C/man3/makecontext.3:28
656 #, no-wrap
657 msgid "GNU"
658 msgstr "GNU"
659
660 #. type: Plain text
661 #: build/C/man3/makecontext.3:31
662 msgid "makecontext, swapcontext - manipulate user context"
663 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
664
665 #. type: Plain text
666 #: build/C/man3/makecontext.3:36
667 msgid ""
668 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
669 ">I<argc>B<, ...);>"
670 msgstr ""
671 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
672 ">I<argc>B<, ...);>"
673
674 #. type: Plain text
675 #: build/C/man3/makecontext.3:38
676 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
677 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
678
679 #. type: Plain text
680 #: build/C/man3/makecontext.3:49
681 msgid ""
682 "In a System V-like environment, one has the type I<ucontext_t> defined in "
683 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
684 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
685 "level context switching between multiple threads of control within a process."
686 msgstr ""
687 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
688 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
689 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
690 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
691 "ようになっている。"
692
693 #. type: Plain text
694 #: build/C/man3/makecontext.3:52
695 msgid "For the type and the first two functions, see B<getcontext>(3)."
696 msgstr ""
697 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
698
699 #. type: Plain text
700 #: build/C/man3/makecontext.3:64
701 msgid ""
702 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
703 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
704 "B<makecontext>(), the caller must allocate a new stack for this context and "
705 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
706 "and assign its address to I<ucp-E<gt>uc_link>."
707 msgstr ""
708 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
709 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
710 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
711 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
712 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
713 "らない。"
714
715 #. type: Plain text
716 #: build/C/man3/makecontext.3:78
717 msgid ""
718 "When this context is later activated (using B<setcontext>(3)  or "
719 "B<swapcontext>())  the function I<func> is called, and passed the series of "
720 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
721 "number of these arguments in I<argc>.  When this function returns, the "
722 "successor context is activated.  If the successor context pointer is NULL, "
723 "the thread exits."
724 msgstr ""
725 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
726 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
727 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
728 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
729 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
730
731 #. type: Plain text
732 #: build/C/man3/makecontext.3:84
733 msgid ""
734 "The B<swapcontext>()  function saves the current context in the structure "
735 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
736 msgstr ""
737 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
738 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
739
740 #. type: Plain text
741 #: build/C/man3/makecontext.3:96
742 msgid ""
743 "When successful, B<swapcontext>()  does not return.  (But we may return "
744 "later, in case I<oucp> is activated, in which case it looks like "
745 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
746 "sets I<errno> appropriately."
747 msgstr ""
748 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
749 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
750 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
751 "て設定する。"
752
753 #. type: TP
754 #: build/C/man3/makecontext.3:97
755 #: build/C/man3/pthread_attr_setaffinity_np.3:102
756 #: build/C/man3/pthread_getattr_np.3:77
757 #, no-wrap
758 msgid "B<ENOMEM>"
759 msgstr "B<ENOMEM>"
760
761 #. type: Plain text
762 #: build/C/man3/makecontext.3:100
763 msgid "Insufficient stack space left."
764 msgstr "スタックに割り当てる空間が残っていない。"
765
766 #. type: SH
767 #: build/C/man3/makecontext.3:100
768 #: build/C/man3/pthread_attr_setaffinity_np.3:106
769 #: build/C/man3/pthread_attr_setguardsize.3:104
770 #: build/C/man3/pthread_attr_setstack.3:110
771 #: build/C/man3/pthread_attr_setstackaddr.3:81
772 #: build/C/man3/pthread_attr_setstacksize.3:81
773 #: build/C/man3/pthread_getattr_np.3:96
774 #: build/C/man3/pthread_getcpuclockid.3:63
775 #: build/C/man3/pthread_setaffinity_np.3:119
776 #: build/C/man3/pthread_setconcurrency.3:81
777 #: build/C/man3/pthread_setname_np.3:100
778 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
779 #: build/C/man3/pthread_tryjoin_np.3:110
780 #, no-wrap
781 msgid "VERSIONS"
782 msgstr "バージョン"
783
784 #. type: Plain text
785 #: build/C/man3/makecontext.3:105
786 msgid ""
787 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
788 "2.1."
789 msgstr ""
790 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
791 "されている。"
792
793 #. type: Plain text
794 #: build/C/man3/makecontext.3:113
795 msgid ""
796 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
797 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
798 "recommending that applications be rewritten to use POSIX threads instead."
799 msgstr ""
800 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
801 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
802 "POSIX スレッドを使って書き直すことが 推奨されている。"
803
804 #. type: Plain text
805 #: build/C/man3/makecontext.3:121
806 msgid ""
807 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
808 "namely, this struct contains the start and length of a memory area to be "
809 "used as the stack, regardless of the direction of growth of the stack.  "
810 "Thus, it is not necessary for the user program to worry about this direction."
811 msgstr ""
812 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
813 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
814 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
815 "て、ユーザプログラムはこの件については心配しなくてよい。"
816
817 #. type: Plain text
818 #: build/C/man3/makecontext.3:137
819 msgid ""
820 "On architectures where I<int> and pointer types are the same size (e.g., "
821 "x86-32, where both types are 32 bits), you may be able to get away with "
822 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
823 "However, doing this is not guaranteed to be portable, is undefined according "
824 "to the standards, and won't work on architectures where pointers are larger "
825 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
826 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
827 "g., x86-64)."
828 msgstr ""
829 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
830 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
831 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
832 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
833 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
834 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
835 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
836 "できるようになっている。"
837
838 #. type: SH
839 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
840 #: build/C/man3/pthread_attr_setdetachstate.3:108
841 #: build/C/man3/pthread_attr_setguardsize.3:155
842 #: build/C/man3/pthread_attr_setinheritsched.3:128
843 #: build/C/man3/pthread_attr_setschedparam.3:106
844 #: build/C/man3/pthread_attr_setschedpolicy.3:102
845 #: build/C/man3/pthread_attr_setstack.3:153
846 #: build/C/man3/pthread_attr_setstacksize.3:108
847 #: build/C/man3/pthread_cancel.3:135 build/C/man3/pthread_cleanup_push.3:155
848 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
849 #: build/C/man3/pthread_getattr_np.3:101
850 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
851 #: build/C/man3/pthread_setaffinity_np.3:154
852 #: build/C/man3/pthread_setcancelstate.3:174
853 #: build/C/man3/pthread_setname_np.3:112
854 #: build/C/man3/pthread_setschedparam.3:149 build/C/man3/pthread_sigmask.3:61
855 #: build/C/man3/pthread_testcancel.3:60 build/C/man3/pthread_tryjoin_np.3:115
856 #, no-wrap
857 msgid "EXAMPLE"
858 msgstr "例"
859
860 #. type: Plain text
861 #: build/C/man3/makecontext.3:145
862 msgid ""
863 "The example program below demonstrates the use of B<getcontext>(3), "
864 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
865 "following output:"
866 msgstr ""
867 "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), "
868 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
869 "と、以下のような出力が得られる:"
870
871 #. type: Plain text
872 #: build/C/man3/makecontext.3:157
873 #, no-wrap
874 msgid ""
875 "$B< ./a.out>\n"
876 "main: swapcontext(&uctx_main, &uctx_func2)\n"
877 "func2: started\n"
878 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
879 "func1: started\n"
880 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
881 "func2: returning\n"
882 "func1: returning\n"
883 "main: exiting\n"
884 msgstr ""
885 "$B< ./a.out>\n"
886 "main: swapcontext(&uctx_main, &uctx_func2)\n"
887 "func2: started\n"
888 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
889 "func1: started\n"
890 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
891 "func2: returning\n"
892 "func1: returning\n"
893 "main: exiting\n"
894
895 #. type: SS
896 #: build/C/man3/makecontext.3:159 build/C/man3/pthread_attr_init.3:148
897 #: build/C/man3/pthread_cancel.3:151 build/C/man3/pthread_cleanup_push.3:231
898 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
899 #: build/C/man3/pthread_getcpuclockid.3:95
900 #: build/C/man3/pthread_setname_np.3:138
901 #: build/C/man3/pthread_setschedparam.3:224 build/C/man3/pthread_sigmask.3:79
902 #, no-wrap
903 msgid "Program source"
904 msgstr "プログラムのソース"
905
906 #. type: Plain text
907 #: build/C/man3/makecontext.3:165
908 #, no-wrap
909 msgid ""
910 "#include E<lt>ucontext.hE<gt>\n"
911 "#include E<lt>stdio.hE<gt>\n"
912 "#include E<lt>stdlib.hE<gt>\n"
913 msgstr ""
914 "#include E<lt>ucontext.hE<gt>\n"
915 "#include E<lt>stdio.hE<gt>\n"
916 "#include E<lt>stdlib.hE<gt>\n"
917
918 #. type: Plain text
919 #: build/C/man3/makecontext.3:167
920 #, no-wrap
921 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
922 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
923
924 #. type: Plain text
925 #: build/C/man3/makecontext.3:170
926 #, no-wrap
927 msgid ""
928 "#define handle_error(msg) \\e\n"
929 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
930 msgstr ""
931 "#define handle_error(msg) \\e\n"
932 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
933
934 #. type: Plain text
935 #: build/C/man3/makecontext.3:180
936 #, no-wrap
937 msgid ""
938 "static void\n"
939 "func1(void)\n"
940 "{\n"
941 "    printf(\"func1: started\\en\");\n"
942 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
943 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
944 "        handle_error(\"swapcontext\");\n"
945 "    printf(\"func1: returning\\en\");\n"
946 "}\n"
947 msgstr ""
948 "static void\n"
949 "func1(void)\n"
950 "{\n"
951 "    printf(\"func1: started\\en\");\n"
952 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
953 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
954 "        handle_error(\"swapcontext\");\n"
955 "    printf(\"func1: returning\\en\");\n"
956 "}\n"
957
958 #. type: Plain text
959 #: build/C/man3/makecontext.3:190
960 #, no-wrap
961 msgid ""
962 "static void\n"
963 "func2(void)\n"
964 "{\n"
965 "    printf(\"func2: started\\en\");\n"
966 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
967 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
968 "        handle_error(\"swapcontext\");\n"
969 "    printf(\"func2: returning\\en\");\n"
970 "}\n"
971 msgstr ""
972 "static void\n"
973 "func2(void)\n"
974 "{\n"
975 "    printf(\"func2: started\\en\");\n"
976 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
977 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
978 "        handle_error(\"swapcontext\");\n"
979 "    printf(\"func2: returning\\en\");\n"
980 "}\n"
981
982 #. type: Plain text
983 #: build/C/man3/makecontext.3:196
984 #, no-wrap
985 msgid ""
986 "int\n"
987 "main(int argc, char *argv[])\n"
988 "{\n"
989 "    char func1_stack[16384];\n"
990 "    char func2_stack[16384];\n"
991 msgstr ""
992 "int\n"
993 "main(int argc, char *argv[])\n"
994 "{\n"
995 "    char func1_stack[16384];\n"
996 "    char func2_stack[16384];\n"
997
998 #. type: Plain text
999 #: build/C/man3/makecontext.3:203
1000 #, no-wrap
1001 msgid ""
1002 "    if (getcontext(&uctx_func1) == -1)\n"
1003 "        handle_error(\"getcontext\");\n"
1004 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1005 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1006 "    uctx_func1.uc_link = &uctx_main;\n"
1007 "    makecontext(&uctx_func1, func1, 0);\n"
1008 msgstr ""
1009 "    if (getcontext(&uctx_func1) == -1)\n"
1010 "        handle_error(\"getcontext\");\n"
1011 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1012 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1013 "    uctx_func1.uc_link = &uctx_main;\n"
1014 "    makecontext(&uctx_func1, func1, 0);\n"
1015
1016 #. type: Plain text
1017 #: build/C/man3/makecontext.3:211
1018 #, no-wrap
1019 msgid ""
1020 "    if (getcontext(&uctx_func2) == -1)\n"
1021 "        handle_error(\"getcontext\");\n"
1022 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1023 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1024 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1025 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1026 "    makecontext(&uctx_func2, func2, 0);\n"
1027 msgstr ""
1028 "    if (getcontext(&uctx_func2) == -1)\n"
1029 "        handle_error(\"getcontext\");\n"
1030 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1031 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1032 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1033 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1034 "    makecontext(&uctx_func2, func2, 0);\n"
1035
1036 #. type: Plain text
1037 #: build/C/man3/makecontext.3:215
1038 #, no-wrap
1039 msgid ""
1040 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1041 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1042 "        handle_error(\"swapcontext\");\n"
1043 msgstr ""
1044 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1045 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1046 "        handle_error(\"swapcontext\");\n"
1047
1048 #. type: Plain text
1049 #: build/C/man3/makecontext.3:219
1050 #, no-wrap
1051 msgid ""
1052 "    printf(\"main: exiting\\en\");\n"
1053 "    exit(EXIT_SUCCESS);\n"
1054 "}\n"
1055 msgstr ""
1056 "    printf(\"main: exiting\\en\");\n"
1057 "    exit(EXIT_SUCCESS);\n"
1058 "}\n"
1059
1060 #. type: Plain text
1061 #: build/C/man3/makecontext.3:226
1062 msgid ""
1063 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1064 "B<sigsetjmp>(3)"
1065 msgstr ""
1066 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1067 "B<sigsetjmp>(3)"
1068
1069 #. type: TH
1070 #: build/C/man3/pthread_attr_init.3:26
1071 #, no-wrap
1072 msgid "PTHREAD_ATTR_INIT"
1073 msgstr "PTHREAD_ATTR_INIT"
1074
1075 #. type: TH
1076 #: build/C/man3/pthread_attr_init.3:26
1077 #, no-wrap
1078 msgid "2008-11-11"
1079 msgstr "2008-11-11"
1080
1081 #. type: Plain text
1082 #: build/C/man3/pthread_attr_init.3:30
1083 msgid ""
1084 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1085 "attributes object"
1086 msgstr ""
1087 "pthread_attr_init, pthread_attr_destroy - \n"
1088 "スレッド属性オブジェクトの初期化と破棄を行う"
1089
1090 #. type: Plain text
1091 #: build/C/man3/pthread_attr_init.3:33
1092 #: build/C/man3/pthread_attr_setdetachstate.3:33
1093 #: build/C/man3/pthread_attr_setguardsize.3:33
1094 #: build/C/man3/pthread_attr_setinheritsched.3:33
1095 #: build/C/man3/pthread_attr_setschedparam.3:33
1096 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1097 #: build/C/man3/pthread_attr_setscope.3:33
1098 #: build/C/man3/pthread_attr_setstack.3:33
1099 #: build/C/man3/pthread_attr_setstackaddr.3:33
1100 #: build/C/man3/pthread_attr_setstacksize.3:33
1101 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1102 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1103 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1104 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1105 #: build/C/man3/pthread_join.3:32
1106 #: build/C/man3/pthread_kill_other_threads_np.3:32
1107 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1108 #: build/C/man3/pthread_setconcurrency.3:32
1109 #: build/C/man3/pthread_setschedparam.3:33
1110 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1111 #: build/C/man3/pthread_testcancel.3:32
1112 #, no-wrap
1113 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1114 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1115
1116 #. type: Plain text
1117 #: build/C/man3/pthread_attr_init.3:36
1118 #, no-wrap
1119 msgid ""
1120 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1121 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1122 msgstr ""
1123 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1124 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1125
1126 #. type: Plain text
1127 #: build/C/man3/pthread_attr_init.3:38
1128 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1129 #: build/C/man3/pthread_attr_setdetachstate.3:40
1130 #: build/C/man3/pthread_attr_setguardsize.3:40
1131 #: build/C/man3/pthread_attr_setinheritsched.3:40
1132 #: build/C/man3/pthread_attr_setschedparam.3:40
1133 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1134 #: build/C/man3/pthread_attr_setscope.3:40
1135 #: build/C/man3/pthread_attr_setstack.3:40
1136 #: build/C/man3/pthread_attr_setstackaddr.3:40
1137 #: build/C/man3/pthread_attr_setstacksize.3:40
1138 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1139 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1140 #: build/C/man3/pthread_getattr_np.3:37
1141 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1142 #: build/C/man3/pthread_setaffinity_np.3:41
1143 #: build/C/man3/pthread_setcancelstate.3:38
1144 #: build/C/man3/pthread_setconcurrency.3:37
1145 #: build/C/man3/pthread_setschedparam.3:40
1146 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1147 #, no-wrap
1148 msgid "Compile and link with I<-pthread>.\n"
1149 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1150
1151 #. type: Plain text
1152 #: build/C/man3/pthread_attr_init.3:50
1153 msgid ""
1154 "The B<pthread_attr_init>()  function initializes the thread attributes "
1155 "object pointed to by I<attr> with default attribute values.  After this "
1156 "call, individual attributes of the object can be set using various related "
1157 "functions (listed under SEE ALSO), and then the object can be used in one or "
1158 "more B<pthread_create>(3)  calls that create threads."
1159 msgstr ""
1160 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1161 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1162 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1163 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1164 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1165 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1166
1167 #. type: Plain text
1168 #: build/C/man3/pthread_attr_init.3:55
1169 msgid ""
1170 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1171 "already been initialized results in undefined behavior."
1172 msgstr ""
1173 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1174 "B<pthread_attr_init>() を呼び出した場合、\n"
1175 "どのような動作になるかは不定である。"
1176
1177 #. type: Plain text
1178 #: build/C/man3/pthread_attr_init.3:62
1179 msgid ""
1180 "When a thread attributes object is no longer required, it should be "
1181 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1182 "thread attributes object has no effect on threads that were created using "
1183 "that object."
1184 msgstr ""
1185 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1186 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1187 "スレッド属性オブジェクトを破棄しても、\n"
1188 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1189
1190 #. type: Plain text
1191 #: build/C/man3/pthread_attr_init.3:68
1192 msgid ""
1193 "Once a thread attributes object has been destroyed, it can be reinitialized "
1194 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1195 "attributes object has undefined results."
1196 msgstr ""
1197 "いったん破棄したスレッド属性オブジェクトは、\n"
1198 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1199 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1200 "使った場合の結果は不定である。"
1201
1202 #. type: Plain text
1203 #: build/C/man3/pthread_attr_init.3:71
1204 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1205 #: build/C/man3/pthread_attr_setdetachstate.3:80
1206 #: build/C/man3/pthread_attr_setguardsize.3:93
1207 #: build/C/man3/pthread_attr_setinheritsched.3:96
1208 #: build/C/man3/pthread_attr_setschedparam.3:88
1209 #: build/C/man3/pthread_attr_setschedpolicy.3:86
1210 #: build/C/man3/pthread_attr_setscope.3:106
1211 #: build/C/man3/pthread_attr_setstack.3:88
1212 #: build/C/man3/pthread_attr_setstackaddr.3:77
1213 #: build/C/man3/pthread_attr_setstacksize.3:64
1214 #: build/C/man3/pthread_setaffinity_np.3:80
1215 #: build/C/man3/pthread_setcancelstate.3:95
1216 #: build/C/man3/pthread_setname_np.3:75
1217 msgid ""
1218 "On success, these functions return 0; on error, they return a nonzero error "
1219 "number."
1220 msgstr ""
1221 "成功すると、これらの関数は 0 を返す。\n"
1222 "エラーの場合、0 以外のエラー番号を返す。"
1223
1224 #. type: Plain text
1225 #: build/C/man3/pthread_attr_init.3:79
1226 msgid ""
1227 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1228 "Linux these functions always succeed (but portable and future-proof "
1229 "applications should nevertheless handle a possible error return)."
1230 msgstr ""
1231 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1232 "記載されている。\n"
1233 "Linux では、これらの関数は常に成功する\n"
1234 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1235 "正のエラーの返り値を処理するようにすべきである)。"
1236
1237 #. type: Plain text
1238 #: build/C/man3/pthread_attr_init.3:81
1239 #: build/C/man3/pthread_attr_setdetachstate.3:89
1240 #: build/C/man3/pthread_attr_setguardsize.3:108
1241 #: build/C/man3/pthread_attr_setinheritsched.3:112
1242 #: build/C/man3/pthread_attr_setschedparam.3:102
1243 #: build/C/man3/pthread_attr_setschedpolicy.3:102
1244 #: build/C/man3/pthread_attr_setscope.3:121
1245 #: build/C/man3/pthread_attr_setstack.3:114
1246 #: build/C/man3/pthread_attr_setstacksize.3:85
1247 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
1248 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1249 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1250 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1251 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:52
1252 #: build/C/man3/pthread_setcancelstate.3:115
1253 #: build/C/man3/pthread_setconcurrency.3:85
1254 #: build/C/man3/pthread_setschedparam.3:143
1255 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
1256 #: build/C/man3/pthread_testcancel.3:60
1257 msgid "POSIX.1-2001."
1258 msgstr "POSIX.1-2001."
1259
1260 #. type: Plain text
1261 #: build/C/man3/pthread_attr_init.3:87
1262 msgid ""
1263 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1264 "object other than via pthreads functions is nonportable and produces "
1265 "undefined results."
1266 msgstr ""
1267 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1268 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1269 "どのような結果が得られるかも分からない。"
1270
1271 #. type: Plain text
1272 #: build/C/man3/pthread_attr_init.3:96
1273 msgid ""
1274 "The program below optionally makes use of B<pthread_attr_init>()  and "
1275 "various related functions to initialize a thread attributes object that is "
1276 "used to create a single thread.  Once created, the thread uses the "
1277 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1278 "the thread's attributes, and then displays those attributes."
1279 msgstr ""
1280 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1281 "スレッド属性オブジェクトの初期化を行い、\n"
1282 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1283 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1284 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1285 "取得した属性を表示する。"
1286
1287 #. type: Plain text
1288 #: build/C/man3/pthread_attr_init.3:105
1289 msgid ""
1290 "If the program is run with no command-line argument, then it passes NULL as "
1291 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1292 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1293 "threading implementation, we see the following:"
1294 msgstr ""
1295 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1296 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1297 "この場合、スレッドはデフォルトの属性で作成される。\n"
1298 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1299 "動作させると、以下のような出力が得られる。"
1300
1301 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1302 #. type: Plain text
1303 #: build/C/man3/pthread_attr_init.3:121
1304 #, no-wrap
1305 msgid ""
1306 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1307 "unlimited\n"
1308 "$B< ./a.out>\n"
1309 "Thread attributes:\n"
1310 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1311 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1312 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1313 "        Scheduling policy   = SCHED_OTHER\n"
1314 "        Scheduling priority = 0\n"
1315 "        Guard size          = 4096 bytes\n"
1316 "        Stack address       = 0x40196000\n"
1317 "        Stack size          = 0x201000 bytes\n"
1318 msgstr ""
1319 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1320 "unlimited\n"
1321 "$B< ./a.out>\n"
1322 "Thread attributes:\n"
1323 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1324 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1325 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1326 "        Scheduling policy   = SCHED_OTHER\n"
1327 "        Scheduling priority = 0\n"
1328 "        Guard size          = 4096 bytes\n"
1329 "        Stack address       = 0x40196000\n"
1330 "        Stack size          = 0x201000 bytes\n"
1331
1332 #. type: Plain text
1333 #: build/C/man3/pthread_attr_init.3:131
1334 msgid ""
1335 "When we supply a stack size as a command-line argument, the program "
1336 "initializes a thread attributes object, sets various attributes in that "
1337 "object, and passes a pointer to the object in the call to B<pthread_create>"
1338 "(3).  Running the program on Linux/x86-32 with the NPTL threading "
1339 "implementation, we see the following:"
1340 msgstr ""
1341 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1342 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1343 "そのオブジェクトの各種属性を設定し、\n"
1344 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1345 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1346 "動作させると、以下のような出力が得られる。"
1347
1348 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1349 #. type: Plain text
1350 #: build/C/man3/pthread_attr_init.3:146
1351 #, no-wrap
1352 msgid ""
1353 "$B< ./a.out 0x3000000>\n"
1354 "posix_memalign() allocated at 0x40197000\n"
1355 "Thread attributes:\n"
1356 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1357 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1358 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1359 "        Scheduling policy   = SCHED_OTHER\n"
1360 "        Scheduling priority = 0\n"
1361 "        Guard size          = 0 bytes\n"
1362 "        Stack address       = 0x40197000\n"
1363 "        Stack size          = 0x3000000 bytes\n"
1364 msgstr ""
1365 "$B< ./a.out 0x3000000>\n"
1366 "posix_memalign() allocated at 0x40197000\n"
1367 "Thread attributes:\n"
1368 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1369 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1370 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1371 "        Scheduling policy   = SCHED_OTHER\n"
1372 "        Scheduling priority = 0\n"
1373 "        Guard size          = 0 bytes\n"
1374 "        Stack address       = 0x40197000\n"
1375 "        Stack size          = 0x3000000 bytes\n"
1376
1377 #. type: Plain text
1378 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1379 #, no-wrap
1380 msgid ""
1381 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1382 "#include E<lt>pthread.hE<gt>\n"
1383 "#include E<lt>stdio.hE<gt>\n"
1384 "#include E<lt>stdlib.hE<gt>\n"
1385 "#include E<lt>unistd.hE<gt>\n"
1386 "#include E<lt>errno.hE<gt>\n"
1387 msgstr ""
1388 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1389 "#include E<lt>pthread.hE<gt>\n"
1390 "#include E<lt>stdio.hE<gt>\n"
1391 "#include E<lt>stdlib.hE<gt>\n"
1392 "#include E<lt>unistd.hE<gt>\n"
1393 "#include E<lt>errno.hE<gt>\n"
1394
1395 #. type: Plain text
1396 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:162
1397 #: build/C/man3/pthread_cleanup_push.3:243 build/C/man3/pthread_create.3:254
1398 #: build/C/man3/pthread_getattr_np.3:191
1399 #: build/C/man3/pthread_getcpuclockid.3:113
1400 #: build/C/man3/pthread_setaffinity_np.3:172
1401 #: build/C/man3/pthread_setschedparam.3:237 build/C/man3/pthread_sigmask.3:93
1402 #, no-wrap
1403 msgid ""
1404 "#define handle_error_en(en, msg) \\e\n"
1405 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1406 msgstr ""
1407 "#define handle_error_en(en, msg) \\e\n"
1408 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1409
1410 #. type: Plain text
1411 #: build/C/man3/pthread_attr_init.3:168
1412 #, no-wrap
1413 msgid ""
1414 "static void\n"
1415 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1416 "{\n"
1417 "    int s, i;\n"
1418 "    size_t v;\n"
1419 "    void *stkaddr;\n"
1420 "    struct sched_param sp;\n"
1421 msgstr ""
1422 "static void\n"
1423 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1424 "{\n"
1425 "    int s, i;\n"
1426 "    size_t v;\n"
1427 "    void *stkaddr;\n"
1428 "    struct sched_param sp;\n"
1429
1430 #. type: Plain text
1431 #: build/C/man3/pthread_attr_init.3:176
1432 #, no-wrap
1433 msgid ""
1434 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1435 "    if (s != 0)\n"
1436 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1437 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1438 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1439 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1440 "            \"???\");\n"
1441 msgstr ""
1442 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1443 "    if (s != 0)\n"
1444 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1445 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1446 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1447 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1448 "            \"???\");\n"
1449
1450 #. type: Plain text
1451 #: build/C/man3/pthread_attr_init.3:184
1452 #, no-wrap
1453 msgid ""
1454 "    s = pthread_attr_getscope(attr, &i);\n"
1455 "    if (s != 0)\n"
1456 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1457 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1458 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1459 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1460 "            \"???\");\n"
1461 msgstr ""
1462 "    s = pthread_attr_getscope(attr, &i);\n"
1463 "    if (s != 0)\n"
1464 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1465 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1466 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1467 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1468 "            \"???\");\n"
1469
1470 #. type: Plain text
1471 #: build/C/man3/pthread_attr_init.3:192
1472 #, no-wrap
1473 msgid ""
1474 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1475 "    if (s != 0)\n"
1476 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1477 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1478 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1479 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1480 "            \"???\");\n"
1481 msgstr ""
1482 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1483 "    if (s != 0)\n"
1484 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1485 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1486 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1487 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1488 "            \"???\");\n"
1489
1490 #. type: Plain text
1491 #: build/C/man3/pthread_attr_init.3:201
1492 #, no-wrap
1493 msgid ""
1494 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1495 "    if (s != 0)\n"
1496 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1497 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1498 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1499 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1500 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1501 "            \"???\");\n"
1502 msgstr ""
1503 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1504 "    if (s != 0)\n"
1505 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1506 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1507 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1508 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1509 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1510 "            \"???\");\n"
1511
1512 #. type: Plain text
1513 #: build/C/man3/pthread_attr_init.3:206
1514 #, no-wrap
1515 msgid ""
1516 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1517 "    if (s != 0)\n"
1518 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1519 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1520 msgstr ""
1521 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1522 "    if (s != 0)\n"
1523 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1524 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1525
1526 #. type: Plain text
1527 #: build/C/man3/pthread_attr_init.3:211
1528 #, no-wrap
1529 msgid ""
1530 "    s = pthread_attr_getguardsize(attr, &v);\n"
1531 "    if (s != 0)\n"
1532 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1533 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1534 msgstr ""
1535 "    s = pthread_attr_getguardsize(attr, &v);\n"
1536 "    if (s != 0)\n"
1537 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1538 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1539
1540 #. type: Plain text
1541 #: build/C/man3/pthread_attr_init.3:218
1542 #, no-wrap
1543 msgid ""
1544 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1545 "    if (s != 0)\n"
1546 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1547 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1548 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1549 "}\n"
1550 msgstr ""
1551 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1552 "    if (s != 0)\n"
1553 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1554 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1555 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1556 "}\n"
1557
1558 #. type: Plain text
1559 #: build/C/man3/pthread_attr_init.3:224
1560 #, no-wrap
1561 msgid ""
1562 "static void *\n"
1563 "thread_start(void *arg)\n"
1564 "{\n"
1565 "    int s;\n"
1566 "    pthread_attr_t gattr;\n"
1567 msgstr ""
1568 "static void *\n"
1569 "thread_start(void *arg)\n"
1570 "{\n"
1571 "    int s;\n"
1572 "    pthread_attr_t gattr;\n"
1573
1574 #. type: Plain text
1575 #: build/C/man3/pthread_attr_init.3:228
1576 #, no-wrap
1577 msgid ""
1578 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1579 "       retrieves the attributes of the thread specified in its\n"
1580 "       first argument */\n"
1581 msgstr ""
1582 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1583 "       retrieves the attributes of the thread specified in its\n"
1584 "       first argument */\n"
1585
1586 #. type: Plain text
1587 #: build/C/man3/pthread_attr_init.3:232
1588 #, no-wrap
1589 msgid ""
1590 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1591 "    if (s != 0)\n"
1592 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1593 msgstr ""
1594 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1595 "    if (s != 0)\n"
1596 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1597
1598 #. type: Plain text
1599 #: build/C/man3/pthread_attr_init.3:235
1600 #, no-wrap
1601 msgid ""
1602 "    printf(\"Thread attributes:\\en\");\n"
1603 "    display_pthread_attr(&gattr, \"\\et\");\n"
1604 msgstr ""
1605 "    printf(\"Thread attributes:\\en\");\n"
1606 "    display_pthread_attr(&gattr, \"\\et\");\n"
1607
1608 #. type: Plain text
1609 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1610 #, no-wrap
1611 msgid ""
1612 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1613 "}\n"
1614 msgstr ""
1615 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1616 "}\n"
1617
1618 #. type: Plain text
1619 #: build/C/man3/pthread_attr_init.3:246
1620 #, no-wrap
1621 msgid ""
1622 "int\n"
1623 "main(int argc, char *argv[])\n"
1624 "{\n"
1625 "    pthread_t thr;\n"
1626 "    pthread_attr_t attr;\n"
1627 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1628 "    int s;\n"
1629 msgstr ""
1630 "int\n"
1631 "main(int argc, char *argv[])\n"
1632 "{\n"
1633 "    pthread_t thr;\n"
1634 "    pthread_attr_t attr;\n"
1635 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1636 "    int s;\n"
1637
1638 #. type: Plain text
1639 #: build/C/man3/pthread_attr_init.3:248
1640 #: build/C/man3/pthread_setschedparam.3:355
1641 #, no-wrap
1642 msgid "    attrp = NULL;\n"
1643 msgstr "    attrp = NULL;\n"
1644
1645 #. type: Plain text
1646 #: build/C/man3/pthread_attr_init.3:252
1647 #, no-wrap
1648 msgid ""
1649 "    /* If a command-line argument was supplied, use it to set the\n"
1650 "       stack-size attribute and set a few other thread attributes,\n"
1651 "       and set attrp pointing to thread attributes object */\n"
1652 msgstr ""
1653 "    /* If a command-line argument was supplied, use it to set the\n"
1654 "       stack-size attribute and set a few other thread attributes,\n"
1655 "       and set attrp pointing to thread attributes object */\n"
1656
1657 #. type: Plain text
1658 #: build/C/man3/pthread_attr_init.3:256
1659 #, no-wrap
1660 msgid ""
1661 "    if (argc E<gt> 1) {\n"
1662 "        int stack_size;\n"
1663 "        void *sp;\n"
1664 msgstr ""
1665 "    if (argc E<gt> 1) {\n"
1666 "        int stack_size;\n"
1667 "        void *sp;\n"
1668
1669 #. type: Plain text
1670 #: build/C/man3/pthread_attr_init.3:258
1671 #, no-wrap
1672 msgid "        attrp = &attr;\n"
1673 msgstr "        attrp = &attr;\n"
1674
1675 #. type: Plain text
1676 #: build/C/man3/pthread_attr_init.3:262
1677 #, no-wrap
1678 msgid ""
1679 "        s = pthread_attr_init(&attr);\n"
1680 "        if (s != 0)\n"
1681 "            handle_error_en(s, \"pthread_attr_init\");\n"
1682 msgstr ""
1683 "        s = pthread_attr_init(&attr);\n"
1684 "        if (s != 0)\n"
1685 "            handle_error_en(s, \"pthread_attr_init\");\n"
1686
1687 #. type: Plain text
1688 #: build/C/man3/pthread_attr_init.3:266
1689 #, no-wrap
1690 msgid ""
1691 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1692 "        if (s != 0)\n"
1693 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1694 msgstr ""
1695 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1696 "        if (s != 0)\n"
1697 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1698
1699 #. type: Plain text
1700 #: build/C/man3/pthread_attr_init.3:270
1701 #, no-wrap
1702 msgid ""
1703 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1704 "        if (s != 0)\n"
1705 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1706 msgstr ""
1707 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1708 "        if (s != 0)\n"
1709 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1710
1711 #. type: Plain text
1712 #: build/C/man3/pthread_attr_init.3:272
1713 #, no-wrap
1714 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1715 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1716
1717 #. type: Plain text
1718 #: build/C/man3/pthread_attr_init.3:276
1719 #, no-wrap
1720 msgid ""
1721 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1722 "        if (s != 0)\n"
1723 "            handle_error_en(s, \"posix_memalign\");\n"
1724 msgstr ""
1725 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1726 "        if (s != 0)\n"
1727 "            handle_error_en(s, \"posix_memalign\");\n"
1728
1729 #. type: Plain text
1730 #: build/C/man3/pthread_attr_init.3:278
1731 #, no-wrap
1732 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1733 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1734
1735 #. type: Plain text
1736 #: build/C/man3/pthread_attr_init.3:283
1737 #, no-wrap
1738 msgid ""
1739 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1740 "        if (s != 0)\n"
1741 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1742 "    }\n"
1743 msgstr ""
1744 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1745 "        if (s != 0)\n"
1746 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1747 "    }\n"
1748
1749 #. type: Plain text
1750 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1751 #, no-wrap
1752 msgid ""
1753 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1754 "    if (s != 0)\n"
1755 "        handle_error_en(s, \"pthread_create\");\n"
1756 msgstr ""
1757 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1758 "    if (s != 0)\n"
1759 "        handle_error_en(s, \"pthread_create\");\n"
1760
1761 #. type: Plain text
1762 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1763 #, no-wrap
1764 msgid ""
1765 "    if (attrp != NULL) {\n"
1766 "        s = pthread_attr_destroy(attrp);\n"
1767 "        if (s != 0)\n"
1768 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1769 "    }\n"
1770 msgstr ""
1771 "    if (attrp != NULL) {\n"
1772 "        s = pthread_attr_destroy(attrp);\n"
1773 "        if (s != 0)\n"
1774 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1775 "    }\n"
1776
1777 #. type: Plain text
1778 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1779 #, no-wrap
1780 msgid ""
1781 "    pause();    /* Terminates when other thread calls exit() */\n"
1782 "}\n"
1783 msgstr ""
1784 "    pause();    /* Terminates when other thread calls exit() */\n"
1785 "}\n"
1786
1787 #. type: Plain text
1788 #: build/C/man3/pthread_attr_init.3:313
1789 msgid ""
1790 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1791 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1792 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1793 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1794 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1795 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1796 msgstr ""
1797 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1798 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1799 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1800 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1801 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1802 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1803
1804 #. type: TH
1805 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1806 #, no-wrap
1807 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1808 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1809
1810 #. type: TH
1811 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1812 #: build/C/man3/pthread_getattr_np.3:26
1813 #: build/C/man3/pthread_setaffinity_np.3:26
1814 #: build/C/man3/pthread_tryjoin_np.3:26
1815 #, no-wrap
1816 msgid "2010-09-10"
1817 msgstr "2010-09-10"
1818
1819 #. type: Plain text
1820 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1821 msgid ""
1822 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1823 "affinity attribute in thread attributes object"
1824 msgstr ""
1825 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1826 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1827
1828 #. type: Plain text
1829 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1830 #: build/C/man3/pthread_getattr_np.3:33
1831 #: build/C/man3/pthread_setaffinity_np.3:34
1832 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1833 #, no-wrap
1834 msgid ""
1835 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1836 "B<#include E<lt>pthread.hE<gt>>\n"
1837 msgstr ""
1838 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1839 "B<#include E<lt>pthread.hE<gt>>\n"
1840
1841 #. type: Plain text
1842 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1843 #, no-wrap
1844 msgid ""
1845 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1846 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1847 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1848 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1849 msgstr ""
1850 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1851 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1852 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1853 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1854
1855 #. type: Plain text
1856 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1857 msgid ""
1858 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1859 "attribute of the thread attributes object referred to by I<attr> to the "
1860 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1861 "mask of a thread created using the thread attributes object I<attr>."
1862 msgstr ""
1863 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1864 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1865 "I<cpuset> で指定された値に設定する。\n"
1866 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1867 "作成されたスレッドの CPU affinity マスクが決定される。"
1868
1869 #. type: Plain text
1870 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1871 msgid ""
1872 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1873 "attribute of the thread attributes object referred to by I<attr> in the "
1874 "buffer pointed to by I<cpuset>."
1875 msgstr ""
1876 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1877 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1878 "I<cpuset> が指すバッファに入れて返す。"
1879
1880 #. type: Plain text
1881 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1882 msgid ""
1883 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1884 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
1885 "(cpu_set_t)>."
1886 msgstr ""
1887 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1888 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1889 "指定することだろう。"
1890
1891 #. type: Plain text
1892 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1893 #: build/C/man3/pthread_setaffinity_np.3:67
1894 msgid ""
1895 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1896 "description of a set of macros that can be used to manipulate and inspect "
1897 "CPU sets, see B<CPU_SET>(3)."
1898 msgstr ""
1899 "CPU affinity マスクの詳細については、 \n"
1900 "B<sched_setaffinity>(2) を参照してほしい。\n"
1901 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1902 "B<CPU_SET>(3) を参照してほしい。"
1903
1904 #. type: TP
1905 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1906 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1907 #: build/C/man3/pthread_attr_setdetachstate.3:83
1908 #: build/C/man3/pthread_attr_setinheritsched.3:99
1909 #: build/C/man3/pthread_attr_setschedpolicy.3:89
1910 #: build/C/man3/pthread_attr_setscope.3:109
1911 #: build/C/man3/pthread_attr_setstack.3:91
1912 #: build/C/man3/pthread_attr_setstacksize.3:67
1913 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1914 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1915 #: build/C/man3/pthread_kill.3:58 build/C/man3/pthread_setaffinity_np.3:84
1916 #: build/C/man3/pthread_setaffinity_np.3:93
1917 #: build/C/man3/pthread_setaffinity_np.3:109
1918 #: build/C/man3/pthread_setcancelstate.3:99
1919 #: build/C/man3/pthread_setcancelstate.3:107
1920 #: build/C/man3/pthread_setconcurrency.3:71
1921 #: build/C/man3/pthread_setschedparam.3:122
1922 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1923 #, no-wrap
1924 msgid "B<EINVAL>"
1925 msgstr "B<EINVAL>"
1926
1927 #.  cpumask_t
1928 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1929 #.  of the cpumask_t type.
1930 #. type: Plain text
1931 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1932 msgid ""
1933 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1934 "outside the set supported by the kernel.  (The kernel configuration option "
1935 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1936 "type used to represent CPU sets.)"
1937 msgstr ""
1938 "(B<pthread_attr_setaffinity_np>())\n"
1939 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1940 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1941 "は、\n"
1942 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
1943
1944 #. type: Plain text
1945 #: build/C/man3/pthread_attr_setaffinity_np.3:102
1946 msgid ""
1947 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
1948 "attributes object referred to by I<attr> lies outside the range specified by "
1949 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
1950 msgstr ""
1951 "(B<pthread_attr_getaffinity_np>())\n"
1952 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
1953 "I<cpusetsize> により指定された範囲の中になかった\n"
1954 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
1955
1956 #. type: Plain text
1957 #: build/C/man3/pthread_attr_setaffinity_np.3:106
1958 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
1959 msgstr ""
1960 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
1961
1962 #. type: Plain text
1963 #: build/C/man3/pthread_attr_setaffinity_np.3:108
1964 #: build/C/man3/pthread_setaffinity_np.3:121
1965 msgid "These functions are provided by glibc since version 2.3.4."
1966 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
1967
1968 #. type: Plain text
1969 #: build/C/man3/pthread_attr_setaffinity_np.3:111
1970 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
1971 #: build/C/man3/pthread_setaffinity_np.3:124
1972 #: build/C/man3/pthread_tryjoin_np.3:115
1973 msgid ""
1974 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
1975 "\" (nonportable) in the names."
1976 msgstr ""
1977 "これらの関数は非標準の GNU による拡張である。\n"
1978 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
1979 "付いている。"
1980
1981 #. type: Plain text
1982 #: build/C/man3/pthread_attr_setaffinity_np.3:118
1983 #: build/C/man3/pthread_setaffinity_np.3:150
1984 msgid ""
1985 "In glibc 2.3.3 only, versions of these functions were provided that did not "
1986 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
1987 "underlying system calls was always I<sizeof(cpu_set_t)>."
1988 msgstr ""
1989 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
1990 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
1991 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
1992 "常に I<sizeof(cpu_set_t)> であった。"
1993
1994 #. type: Plain text
1995 #: build/C/man3/pthread_attr_setaffinity_np.3:124
1996 msgid ""
1997 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
1998 "(3), B<cpuset>(7), B<pthreads>(7)"
1999 msgstr ""
2000 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2001 "(3), B<cpuset>(7), B<pthreads>(7)"
2002
2003 #. type: TH
2004 #: build/C/man3/pthread_attr_setdetachstate.3:26
2005 #, no-wrap
2006 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2007 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2008
2009 #. type: TH
2010 #: build/C/man3/pthread_attr_setdetachstate.3:26
2011 #, no-wrap
2012 msgid "2010-02-03"
2013 msgstr "2010-02-03"
2014
2015 #. type: Plain text
2016 #: build/C/man3/pthread_attr_setdetachstate.3:30
2017 msgid ""
2018 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2019 "state attribute in thread attributes object"
2020 msgstr ""
2021 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2022 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2023
2024 #. type: Plain text
2025 #: build/C/man3/pthread_attr_setdetachstate.3:38
2026 #, no-wrap
2027 msgid ""
2028 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2029 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2030 msgstr ""
2031 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2032 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2033
2034 #. type: Plain text
2035 #: build/C/man3/pthread_attr_setdetachstate.3:53
2036 msgid ""
2037 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2038 "attribute of the thread attributes object referred to by I<attr> to the "
2039 "value specified in I<detachstate>.  The detach state attribute determines "
2040 "whether a thread created using the thread attributes object I<attr> will be "
2041 "created in a joinable or a detached state."
2042 msgstr ""
2043 "B<pthread_attr_setdetachstate>() 関数は、\n"
2044 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2045 "I<detachstate> で指定された値に設定する。\n"
2046 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2047 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2048 "detached (切り離された) 状態で作成されるかが決定される。"
2049
2050 #. type: Plain text
2051 #: build/C/man3/pthread_attr_setdetachstate.3:56
2052 msgid "The following values may be specified in I<detachstate>:"
2053 msgstr "I<detachstate> には以下の値を指定できる。"
2054
2055 #. type: TP
2056 #: build/C/man3/pthread_attr_setdetachstate.3:56
2057 #, no-wrap
2058 msgid "B<PTHREAD_CREATE_DETACHED>"
2059 msgstr "B<PTHREAD_CREATE_DETACHED>"
2060
2061 #. type: Plain text
2062 #: build/C/man3/pthread_attr_setdetachstate.3:61
2063 msgid ""
2064 "Threads that are created using I<attr> will be created in a detached state."
2065 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2066
2067 #. type: TP
2068 #: build/C/man3/pthread_attr_setdetachstate.3:61
2069 #, no-wrap
2070 msgid "B<PTHREAD_CREATE_JOINABLE>"
2071 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2072
2073 #. type: Plain text
2074 #: build/C/man3/pthread_attr_setdetachstate.3:66
2075 msgid ""
2076 "Threads that are created using I<attr> will be created in a joinable state."
2077 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2078
2079 #. type: Plain text
2080 #: build/C/man3/pthread_attr_setdetachstate.3:70
2081 msgid ""
2082 "The default setting of the detach state attribute in a newly initialized "
2083 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2084 msgstr ""
2085 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2086 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2087
2088 #. type: Plain text
2089 #: build/C/man3/pthread_attr_setdetachstate.3:77
2090 msgid ""
2091 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2092 "the thread attributes object I<attr> in the buffer pointed to by "
2093 "I<detachstate>."
2094 msgstr ""
2095 "B<pthread_attr_getdetachstate>() は、\n"
2096 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2097 "I<detachstate> が指すバッファに入れて返す。"
2098
2099 #. type: Plain text
2100 #: build/C/man3/pthread_attr_setdetachstate.3:83
2101 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2102 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2103
2104 #. type: Plain text
2105 #: build/C/man3/pthread_attr_setdetachstate.3:87
2106 msgid "An invalid value was specified in I<detachstate>."
2107 msgstr "無効な値が I<detachstate> で指定された。"
2108
2109 #. type: Plain text
2110 #: build/C/man3/pthread_attr_setdetachstate.3:93
2111 msgid ""
2112 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2113 msgstr ""
2114 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2115 "B<pthread_create>(3) を参照。"
2116
2117 #. type: Plain text
2118 #: build/C/man3/pthread_attr_setdetachstate.3:101
2119 msgid ""
2120 "A thread that is created in a joinable state should eventually either be "
2121 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2122 "B<pthread_create>(3)."
2123 msgstr ""
2124 "join 可能状態で作成されたスレッドは、最終的に\n"
2125 "B<pthread_join>(3) を使って join するか、\n"
2126 "B<pthread_detach>(3) を使って切り離すか、\n"
2127 "のどちらかを行うべきである。"
2128
2129 #. type: Plain text
2130 #: build/C/man3/pthread_attr_setdetachstate.3:108
2131 msgid ""
2132 "It is an error to specify the thread ID of a thread that was created in a "
2133 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2134 "(3)."
2135 msgstr ""
2136 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2137 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2138 "エラーである。"
2139
2140 #. type: Plain text
2141 #: build/C/man3/pthread_attr_setdetachstate.3:111
2142 #: build/C/man3/pthread_attr_setstack.3:156
2143 msgid "See B<pthread_attr_init>(3)."
2144 msgstr "B<pthread_attr_init>(3) を参照。"
2145
2146 #. type: Plain text
2147 #: build/C/man3/pthread_attr_setdetachstate.3:117
2148 msgid ""
2149 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2150 "B<pthread_join>(3), B<pthreads>(7)"
2151 msgstr ""
2152 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2153 "B<pthread_join>(3), B<pthreads>(7)"
2154
2155 #. type: TH
2156 #: build/C/man3/pthread_attr_setguardsize.3:26
2157 #, no-wrap
2158 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2159 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2160
2161 #. type: TH
2162 #: build/C/man3/pthread_attr_setguardsize.3:26
2163 #: build/C/man3/pthread_attr_setstack.3:26
2164 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2165 #, no-wrap
2166 msgid "2008-10-24"
2167 msgstr "2008-10-24"
2168
2169 #. type: Plain text
2170 #: build/C/man3/pthread_attr_setguardsize.3:30
2171 msgid ""
2172 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2173 "attribute in thread attributes object"
2174 msgstr ""
2175 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2176 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2177
2178 #. type: Plain text
2179 #: build/C/man3/pthread_attr_setguardsize.3:38
2180 #, no-wrap
2181 msgid ""
2182 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2183 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2184 msgstr ""
2185 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2186 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2187
2188 #. type: Plain text
2189 #: build/C/man3/pthread_attr_setguardsize.3:49
2190 msgid ""
2191 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2192 "of the thread attributes object referred to by I<attr> to the value "
2193 "specified in I<guardsize>."
2194 msgstr ""
2195 "B<pthread_attr_setguardsize>() 関数は、\n"
2196 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2197 "I<guardsize> で指定された値に設定する。"
2198
2199 #. type: Plain text
2200 #: build/C/man3/pthread_attr_setguardsize.3:59
2201 msgid ""
2202 "If I<guardsize> is greater than 0, then for each new thread created using "
2203 "I<attr> the system allocates an additional region of at least I<guardsize> "
2204 "bytes at the end of the thread's stack to act as the guard area for the "
2205 "stack (but see BUGS)."
2206 msgstr ""
2207 "I<guardsize> が 0 より大きい場合、\n"
2208 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2209 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2210 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2211 "機能する (ただし「バグ」の節も参照)。"
2212
2213 #. type: Plain text
2214 #: build/C/man3/pthread_attr_setguardsize.3:65
2215 msgid ""
2216 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2217 "guard area."
2218 msgstr ""
2219 "I<guardsize> が 0 の場合、\n"
2220 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2221
2222 #. type: Plain text
2223 #: build/C/man3/pthread_attr_setguardsize.3:67
2224 msgid "The default guard size is the same as the system page size."
2225 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2226
2227 #. type: Plain text
2228 #: build/C/man3/pthread_attr_setguardsize.3:82
2229 msgid ""
2230 "If the stack address attribute has been set in I<attr> (using "
2231 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2232 "that the caller is allocating the thread's stack, then the guard size "
2233 "attribute is ignored (i.e., no guard area is created by the system): it is "
2234 "the application's responsibility to handle stack overflow (perhaps by using "
2235 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2236 "it has allocated)."
2237 msgstr ""
2238 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2239 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2240 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2241 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2242 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2243 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2244 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2245
2246 #. type: Plain text
2247 #: build/C/man3/pthread_attr_setguardsize.3:90
2248 msgid ""
2249 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2250 "attribute of the thread attributes object referred to by I<attr> in the "
2251 "buffer pointed to by I<guardsize>."
2252 msgstr ""
2253 "B<pthread_attr_getguardsize>() は、\n"
2254 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2255 "I<guardsize> が指すバッファに入れて返す。"
2256
2257 #. type: Plain text
2258 #: build/C/man3/pthread_attr_setguardsize.3:104
2259 msgid ""
2260 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2261 "invalid.  On Linux these functions always succeed (but portable and future-"
2262 "proof applications should nevertheless handle a possible error return)."
2263 msgstr ""
2264 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2265 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2266 "Linux では、これらの関数は常に成功する\n"
2267 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2268 "正のエラーの返り値を処理するようにすべきである)。"
2269
2270 #. type: Plain text
2271 #: build/C/man3/pthread_attr_setguardsize.3:106
2272 #: build/C/man3/pthread_attr_setstackaddr.3:83
2273 #: build/C/man3/pthread_attr_setstacksize.3:83
2274 msgid "These functions are provided by glibc since version 2.1."
2275 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2276
2277 #. type: Plain text
2278 #: build/C/man3/pthread_attr_setguardsize.3:122
2279 msgid ""
2280 "A guard area consists of virtual memory pages that are protected to prevent "
2281 "read and write access.  If a thread overflows its stack into the guard area, "
2282 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2283 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2284 "guard size is internally rounded up to the system page size when creating a "
2285 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2286 "size that was set by B<pthread_attr_setguardsize>().)"
2287 msgstr ""
2288 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2289 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2290 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2291 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2292 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2293 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2294 "(その場合も B<pthread_attr_getguardsize>() では\n"
2295 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2296
2297 #. type: Plain text
2298 #: build/C/man3/pthread_attr_setguardsize.3:126
2299 msgid ""
2300 "Setting a guard size of 0 may be useful to save memory in an application "
2301 "that creates many threads and knows that stack overflow can never occur."
2302 msgstr ""
2303 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2304 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2305 "することで、メモリを節約できることもある。"
2306
2307 #. type: Plain text
2308 #: build/C/man3/pthread_attr_setguardsize.3:130
2309 msgid ""
2310 "Choosing a guard size larger than the default size may be necessary for "
2311 "detecting stack overflows if a thread allocates large data structures on the "
2312 "stack."
2313 msgstr ""
2314 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2315 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2316 "大きな guard size を選ぶ必要があるかもしれない。"
2317
2318 #. type: SH
2319 #: build/C/man3/pthread_attr_setguardsize.3:130
2320 #: build/C/man3/pthread_attr_setinheritsched.3:112
2321 #: build/C/man3/pthread_attr_setstacksize.3:96
2322 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2323 #, no-wrap
2324 msgid "BUGS"
2325 msgstr "バグ"
2326
2327 #. type: Plain text
2328 #: build/C/man3/pthread_attr_setguardsize.3:141
2329 msgid ""
2330 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2331 "within the stack size allocation, rather than allocating extra space at the "
2332 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2333 "error from B<pthread_create>(3)  if the guard size value is too large, "
2334 "leaving no space for the actual stack.)"
2335 msgstr ""
2336 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2337 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2338 "末尾に追加の領域を割り当てることが求められている。\n"
2339 "(このため、ガード領域が大きすぎて、\n"
2340 "実際のスタック用の場所がなくなってしまう場合、\n"
2341 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2342
2343 #.  glibc includes the guardsize within the allocated stack size,
2344 #.  which looks pretty clearly to be in violation of POSIX.
2345 #.  Filed bug, 22 Oct 2008:
2346 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2347 #.  Older reports:
2348 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2349 #.  Reportedly, LinuxThreads did the right thing, allocating
2350 #.  extra space at the end of the stack:
2351 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2352 #. type: Plain text
2353 #: build/C/man3/pthread_attr_setguardsize.3:155
2354 msgid ""
2355 "The obsolete LinuxThreads implementation did the right thing, allocating "
2356 "extra space at the end of the stack for the guard area."
2357 msgstr ""
2358 "廃止予定の LinuxThreads 実装では、\n"
2359 "POSIX.1 で求められている通りの動作で、\n"
2360 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2361
2362 #. type: Plain text
2363 #: build/C/man3/pthread_attr_setguardsize.3:158
2364 msgid "See B<pthread_getattr_np>(3)."
2365 msgstr "B<pthread_getattr_np>(3) を参照。"
2366
2367 #. type: Plain text
2368 #: build/C/man3/pthread_attr_setguardsize.3:166
2369 msgid ""
2370 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2371 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2372 msgstr ""
2373 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2374 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2375
2376 #. type: TH
2377 #: build/C/man3/pthread_attr_setinheritsched.3:26
2378 #, no-wrap
2379 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2380 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2381
2382 #. type: TH
2383 #: build/C/man3/pthread_attr_setinheritsched.3:26
2384 #: build/C/man3/pthread_attr_setscope.3:26
2385 #, fuzzy, no-wrap
2386 #| msgid "2013-04-02"
2387 msgid "2013-04-19"
2388 msgstr "2013-04-02"
2389
2390 #. type: Plain text
2391 #: build/C/man3/pthread_attr_setinheritsched.3:30
2392 #, fuzzy
2393 #| msgid ""
2394 #| "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get "
2395 #| "inherit scheduler attribute in thread attributes object"
2396 msgid ""
2397 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit-"
2398 "scheduler attribute in thread attributes object"
2399 msgstr ""
2400 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - \n"
2401 "スレッド属性オブジェクトの inherit scheduler 属性の設定/取得を行う"
2402
2403 #. type: Plain text
2404 #: build/C/man3/pthread_attr_setinheritsched.3:38
2405 #, no-wrap
2406 msgid ""
2407 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2408 "B<                                 int >I<inheritsched>B<);>\n"
2409 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2410 "B<                                 int *>I<inheritsched>B<);>\n"
2411 msgstr ""
2412 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2413 "B<                                 int >I<inheritsched>B<);>\n"
2414 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2415 "B<                                 int *>I<inheritsched>B<);>\n"
2416
2417 #. type: Plain text
2418 #: build/C/man3/pthread_attr_setinheritsched.3:55
2419 #, fuzzy
2420 #| msgid ""
2421 #| "The B<pthread_attr_setinheritsched>()  function sets the inherit "
2422 #| "scheduler attribute of the thread attributes object referred to by "
2423 #| "I<attr> to the value specified in I<inheritsched>.  The inherit scheduler "
2424 #| "attribute determines whether a thread created using the thread attributes "
2425 #| "object I<attr> will inherit its scheduling attributes from the calling "
2426 #| "thread or whether it will take them from I<attr>."
2427 msgid ""
2428 "The B<pthread_attr_setinheritsched>()  function sets the inherit-scheduler "
2429 "attribute of the thread attributes object referred to by I<attr> to the "
2430 "value specified in I<inheritsched>.  The inherit-scheduler attribute "
2431 "determines whether a thread created using the thread attributes object "
2432 "I<attr> will inherit its scheduling attributes from the calling thread or "
2433 "whether it will take them from I<attr>."
2434 msgstr ""
2435 "B<pthread_attr_setinheritsched>() 関数は、\n"
2436 "I<attr> が参照するスレッド属性オブジェクトの inherit scheduler 属性を\n"
2437 "I<inheritsched> で指定された値に設定する。\n"
2438 "inherit scheduler 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2439 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承\n"
2440 "するか、I<attr> からスケジューリング属性を取得するかが決定される。"
2441
2442 #. type: Plain text
2443 #: build/C/man3/pthread_attr_setinheritsched.3:64
2444 msgid ""
2445 "The following scheduling attributes are affected by the inherit-scheduler "
2446 "attribute: scheduling policy (B<pthread_attr_setschedpolicy>(3)), scheduling "
2447 "priority (B<pthread_attr_setschedparam>(3)), and contention scope "
2448 "(B<pthread_attr_setscope>(3))."
2449 msgstr ""
2450
2451 #. type: Plain text
2452 #: build/C/man3/pthread_attr_setinheritsched.3:67
2453 msgid "The following values may be specified in I<inheritsched>:"
2454 msgstr "以下の値を I<inheritsched> に指定できる。"
2455
2456 #. type: TP
2457 #: build/C/man3/pthread_attr_setinheritsched.3:67
2458 #, no-wrap
2459 msgid "B<PTHREAD_INHERIT_SCHED>"
2460 msgstr "B<PTHREAD_INHERIT_SCHED>"
2461
2462 #. type: Plain text
2463 #: build/C/man3/pthread_attr_setinheritsched.3:75
2464 msgid ""
2465 "Threads that are created using I<attr> inherit scheduling attributes from "
2466 "the creating thread; the scheduling attributes in I<attr> are ignored."
2467 msgstr ""
2468 "I<attr> を使って作成されたスレッドは、\n"
2469 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2470 "I<attr> 内のスケジューリング属性は無視される。"
2471
2472 #. type: TP
2473 #: build/C/man3/pthread_attr_setinheritsched.3:75
2474 #, no-wrap
2475 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2476 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2477
2478 #.  FIXME what are the defaults for scheduler settings?
2479 #. type: Plain text
2480 #: build/C/man3/pthread_attr_setinheritsched.3:82
2481 msgid ""
2482 "Threads that are created using I<attr> take their scheduling attributes from "
2483 "the values specified by the attributes object."
2484 msgstr ""
2485 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2486 "指定された値からスケジューリング属性を取得する。"
2487
2488 #. type: Plain text
2489 #: build/C/man3/pthread_attr_setinheritsched.3:86
2490 #, fuzzy
2491 #| msgid ""
2492 #| "The default setting of the inherit scheduler attribute in a newly "
2493 #| "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2494 msgid ""
2495 "The default setting of the inherit-scheduler attribute in a newly "
2496 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2497 msgstr ""
2498 "新たに初期化されたスレッド属性オブジェクトの inherit scheduler 属性の\n"
2499 "デフォルト設定は B<PTHREAD_INHERIT_SCHED> である。"
2500
2501 #. type: Plain text
2502 #: build/C/man3/pthread_attr_setinheritsched.3:93
2503 #, fuzzy
2504 #| msgid ""
2505 #| "The B<pthread_attr_getinheritsched>()  returns the inherit scheduler "
2506 #| "attribute of the thread attributes object I<attr> in the buffer pointed "
2507 #| "to by I<inheritsched>."
2508 msgid ""
2509 "The B<pthread_attr_getinheritsched>()  returns the inherit-scheduler "
2510 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2511 "by I<inheritsched>."
2512 msgstr ""
2513 "B<pthread_attr_getinheritsched>() は、\n"
2514 "スレッド属性オブジェクト I<attr> の inherit scheduler 属性を\n"
2515 "I<inheritsched> が指すバッファに入れて返す。"
2516
2517 #. type: Plain text
2518 #: build/C/man3/pthread_attr_setinheritsched.3:99
2519 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2520 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2521
2522 #. type: Plain text
2523 #: build/C/man3/pthread_attr_setinheritsched.3:103
2524 msgid "Invalid value in I<inheritsched>."
2525 msgstr "I<inheritsched> に無効な値が指定された。"
2526
2527 #.  .SH VERSIONS
2528 #.  Available since glibc 2.0.
2529 #. type: Plain text
2530 #: build/C/man3/pthread_attr_setinheritsched.3:110
2531 msgid ""
2532 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2533 "to set the attribute to an unsupported value\") for "
2534 "B<pthread_attr_setinheritsched>()."
2535 msgstr ""
2536 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2537 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2538 "も追加で規定されている。"
2539
2540 #.  FIXME . Track status of the following bug:
2541 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2542 #. type: Plain text
2543 #: build/C/man3/pthread_attr_setinheritsched.3:128
2544 #, fuzzy
2545 #| msgid ""
2546 #| "As at glibc 2.8, if a thread attributes object is initialized using "
2547 #| "B<pthread_attr_init>(3), then the scheduling policy of the attributes "
2548 #| "object is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  "
2549 #| "However, if the inherit scheduler attribute is then set to "
2550 #| "B<PTHREAD_EXPLICIT_SCHED>, then a thread created using the attribute "
2551 #| "object wrongly inherits its scheduling attributes from the creating "
2552 #| "thread.  This bug does not occur if either the scheduling policy or "
2553 #| "scheduling priority attribute is explicitly set in the thread attributes "
2554 #| "object before calling B<pthread_create>(3)."
2555 msgid ""
2556 "As at glibc 2.8, if a thread attributes object is initialized using "
2557 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2558 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2559 "if the inherit-scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2560 "then a thread created using the attribute object wrongly inherits its "
2561 "scheduling attributes from the creating thread.  This bug does not occur if "
2562 "either the scheduling policy or scheduling priority attribute is explicitly "
2563 "set in the thread attributes object before calling B<pthread_create>(3)."
2564 msgstr ""
2565 "glibc 2.8 の時点では、スレッド属性オブジェクトが\n"
2566 "B<pthread_attr_init>(3) を使って初期化された場合、\n"
2567 "スレッド属性オブジェクトのスケジューリングポリシーが B<SCHED_OTHER> に、\n"
2568 "スケジューリング優先度が 0 に設定される。一方、その後 inherit\n"
2569 "scheduling 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ\n"
2570 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するス\n"
2571 "レッドのスケジューリング属性が間違って継承されてしまう。\n"
2572 "B<pthread_create>(3) を呼び出す前にスケジューリングポリシー属性か\n"
2573 "スケジューリング優先度属性のどちらかが明示的に設定された場合には、\n"
2574 "このバグは発生しない。"
2575
2576 #. type: Plain text
2577 #: build/C/man3/pthread_attr_setinheritsched.3:131
2578 #: build/C/man3/pthread_attr_setschedparam.3:109
2579 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2580 msgid "See B<pthread_setschedparam>(3)."
2581 msgstr "B<pthread_setschedparam>(3) を参照。"
2582
2583 #. type: Plain text
2584 #: build/C/man3/pthread_attr_setinheritsched.3:143
2585 #, fuzzy
2586 #| msgid ""
2587 #| "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2588 #| "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2589 #| "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2590 #| "(3), B<pthreads>(7)"
2591 msgid ""
2592 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2593 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2594 "B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>"
2595 "(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2596 msgstr ""
2597 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2598 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2599 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2600 "(3), B<pthreads>(7)"
2601
2602 #. type: TH
2603 #: build/C/man3/pthread_attr_setschedparam.3:26
2604 #, no-wrap
2605 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2606 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2607
2608 #. type: TH
2609 #: build/C/man3/pthread_attr_setschedparam.3:26
2610 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2611 #: build/C/man3/pthread_setname_np.3:26
2612 #, fuzzy, no-wrap
2613 #| msgid "2013-02-12"
2614 msgid "2013-06-21"
2615 msgstr "2013-02-12"
2616
2617 #. type: Plain text
2618 #: build/C/man3/pthread_attr_setschedparam.3:30
2619 msgid ""
2620 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2621 "parameter attributes in thread attributes object"
2622 msgstr ""
2623 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2624 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2625
2626 #. type: Plain text
2627 #: build/C/man3/pthread_attr_setschedparam.3:38
2628 #, no-wrap
2629 msgid ""
2630 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2631 "B<                               const struct sched_param *>I<param>B<);>\n"
2632 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2633 "B<                               struct sched_param *>I<param>B<);>\n"
2634 msgstr ""
2635 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2636 "B<                               const struct sched_param *>I<param>B<);>\n"
2637 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2638 "B<                               struct sched_param *>I<param>B<);>\n"
2639
2640 #. type: Plain text
2641 #: build/C/man3/pthread_attr_setschedparam.3:52
2642 msgid ""
2643 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2644 "attributes of the thread attributes object referred to by I<attr> to the "
2645 "values specified in the buffer pointed to by I<param>.  These attributes "
2646 "determine the scheduling parameters of a thread created using the thread "
2647 "attributes object I<attr>."
2648 msgstr ""
2649 "B<pthread_attr_setschedparam>() 関数は、\n"
2650 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2651 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2652 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2653 "作成されるスレッドのスケジューリングパラメータが決定される。"
2654
2655 #. type: Plain text
2656 #: build/C/man3/pthread_attr_setschedparam.3:59
2657 msgid ""
2658 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2659 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2660 "by I<param>."
2661 msgstr ""
2662 "B<pthread_attr_getschedparam>() は、\n"
2663 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2664 "I<param> が指すバッファに入れて返す。"
2665
2666 #. type: Plain text
2667 #: build/C/man3/pthread_attr_setschedparam.3:61
2668 msgid "Scheduling parameters are maintained in the following structure:"
2669 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2670
2671 #. type: Plain text
2672 #: build/C/man3/pthread_attr_setschedparam.3:67
2673 #: build/C/man3/pthread_setschedparam.3:69
2674 #, no-wrap
2675 msgid ""
2676 "struct sched_param {\n"
2677 "    int sched_priority;     /* Scheduling priority */\n"
2678 "};\n"
2679 msgstr ""
2680 "struct sched_param {\n"
2681 "    int sched_priority;     /* Scheduling priority */\n"
2682 "};\n"
2683
2684 #. type: Plain text
2685 #: build/C/man3/pthread_attr_setschedparam.3:74
2686 #: build/C/man3/pthread_setschedparam.3:76
2687 msgid ""
2688 "As can be seen, only one scheduling parameter is supported.  For details of "
2689 "the permitted ranges for scheduling priorities in each scheduling policy, "
2690 "see B<sched_setscheduler>(2)."
2691 msgstr ""
2692 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2693 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2694 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2695
2696 #. type: Plain text
2697 #: build/C/man3/pthread_attr_setschedparam.3:85
2698 msgid ""
2699 "In order for the parameter setting made by B<pthread_attr_setschedparam>()  "
2700 "to have effect when calling B<pthread_create>(3), the caller must use "
2701 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2702 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2703 msgstr ""
2704
2705 #.  .SH VERSIONS
2706 #.  Available since glibc 2.0.
2707 #. type: Plain text
2708 #: build/C/man3/pthread_attr_setschedparam.3:100
2709 msgid ""
2710 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2711 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2712 "(but portable and future-proof applications should nevertheless handle a "
2713 "possible error return)."
2714 msgstr ""
2715 "POSIX.1 では、\n"
2716 "B<pthread_attr_setschedparam>() について\n"
2717 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2718 "Linux では、これらの関数は常に成功する\n"
2719 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2720 "正のエラーの返り値を処理するようにすべきである)。"
2721
2722 #. type: Plain text
2723 #: build/C/man3/pthread_attr_setschedparam.3:106
2724 msgid ""
2725 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2726 "policies supported on Linux."
2727 msgstr ""
2728 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2729 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2730
2731 #. type: Plain text
2732 #: build/C/man3/pthread_attr_setschedparam.3:121
2733 msgid ""
2734 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2735 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2736 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2737 "(3), B<pthreads>(7)"
2738 msgstr ""
2739 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2740 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2741 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2742 "(3), B<pthreads>(7)"
2743
2744 #. type: TH
2745 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2746 #, no-wrap
2747 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2748 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2749
2750 #. type: Plain text
2751 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2752 msgid ""
2753 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2754 "scheduling policy attribute in thread attributes object"
2755 msgstr ""
2756 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2757 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2758
2759 #. type: Plain text
2760 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2761 #, no-wrap
2762 msgid ""
2763 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2764 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2765 msgstr ""
2766 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2767 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2768
2769 #. type: Plain text
2770 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2771 msgid ""
2772 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2773 "attribute of the thread attributes object referred to by I<attr> to the "
2774 "value specified in I<policy>.  This attribute determines the scheduling "
2775 "policy of a thread created using the thread attributes object I<attr>."
2776 msgstr ""
2777 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2778 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2779 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2780 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2781 "作成されるスレッドのスケジューリングポリシーが決定される。"
2782
2783 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2784 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2785 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2786 #. type: Plain text
2787 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2788 msgid ""
2789 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2790 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2791 msgstr ""
2792 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2793 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2794 "である。"
2795
2796 #. type: Plain text
2797 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2798 msgid ""
2799 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2800 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2801 "by I<policy>."
2802 msgstr ""
2803 "B<pthread_attr_getschedpolicy>() は、\n"
2804 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2805 "I<policy> が指すバッファに入れて返す。"
2806
2807 #. type: Plain text
2808 #: build/C/man3/pthread_attr_setschedpolicy.3:83
2809 msgid ""
2810 "In order for the policy setting made by B<pthread_attr_setschedpolicy>()  to "
2811 "have effect when calling B<pthread_create>(3), the caller must use "
2812 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2813 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2814 msgstr ""
2815
2816 #. type: Plain text
2817 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2818 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2819 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2820
2821 #. type: Plain text
2822 #: build/C/man3/pthread_attr_setschedpolicy.3:93
2823 msgid "Invalid value in I<policy>."
2824 msgstr "I<policy> に無効な値が指定された。"
2825
2826 #.  .SH VERSIONS
2827 #.  Available since glibc 2.0.
2828 #. type: Plain text
2829 #: build/C/man3/pthread_attr_setschedpolicy.3:100
2830 msgid ""
2831 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2832 "to set the attribute to an unsupported value\") for "
2833 "B<pthread_attr_setschedpolicy>()."
2834 msgstr ""
2835 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2836 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2837 "も追加で規定されている。"
2838
2839 #. type: Plain text
2840 #: build/C/man3/pthread_attr_setschedpolicy.3:116
2841 msgid ""
2842 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2843 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2844 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2845 "(3), B<pthreads>(7)"
2846 msgstr ""
2847 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2848 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2849 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2850 "(3), B<pthreads>(7)"
2851
2852 #. type: TH
2853 #: build/C/man3/pthread_attr_setscope.3:26
2854 #, no-wrap
2855 msgid "PTHREAD_ATTR_SETSCOPE"
2856 msgstr "PTHREAD_ATTR_SETSCOPE"
2857
2858 #. type: Plain text
2859 #: build/C/man3/pthread_attr_setscope.3:30
2860 msgid ""
2861 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2862 "attribute in thread attributes object"
2863 msgstr ""
2864 "pthread_attr_setscope, pthread_attr_getscope - \n"
2865 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2866
2867 #. type: Plain text
2868 #: build/C/man3/pthread_attr_setscope.3:38
2869 #, no-wrap
2870 msgid ""
2871 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2872 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2873 msgstr ""
2874 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2875 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2876
2877 #. type: Plain text
2878 #: build/C/man3/pthread_attr_setscope.3:53
2879 msgid ""
2880 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2881 "of the thread attributes object referred to by I<attr> to the value "
2882 "specified in I<scope>.  The contention scope attribute defines the set of "
2883 "threads against which a thread competes for resources such as the CPU.  "
2884 "POSIX.1-2001 specifies two possible values for I<scope>:"
2885 msgstr ""
2886 "B<pthread_attr_setscope>() 関数は、\n"
2887 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2888 "属性を I<scope> で指定された値に設定する。\n"
2889 "contention scope 属性により、\n"
2890 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2891 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2892
2893 #. type: TP
2894 #: build/C/man3/pthread_attr_setscope.3:53
2895 #, no-wrap
2896 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2897 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2898
2899 #. type: Plain text
2900 #: build/C/man3/pthread_attr_setscope.3:61
2901 msgid ""
2902 "The thread competes for resources with all other threads in all processes on "
2903 "the system that are in the same scheduling allocation domain (a group of one "
2904 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2905 "to one another according to their scheduling policy and priority."
2906 msgstr ""
2907 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2908 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2909 "スレッドとリソースを取り合う。 \n"
2910 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2911 "優先度に基づき、互いに相対的にスケジューリングされる。"
2912
2913 #. type: TP
2914 #: build/C/man3/pthread_attr_setscope.3:61
2915 #, no-wrap
2916 msgid "B<PTHREAD_SCOPE_PROCESS>"
2917 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2918
2919 #. type: Plain text
2920 #: build/C/man3/pthread_attr_setscope.3:76
2921 msgid ""
2922 "The thread competes for resources with all other threads in the same process "
2923 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2924 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2925 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2926 "leaves it unspecified how these threads contend with other threads in other "
2927 "process on the system or with other threads in the same process that were "
2928 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2929 msgstr ""
2930 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2931 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2932 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2933 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2934 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2935 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2936 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2937 "規定されないままになっている。"
2938
2939 #. type: Plain text
2940 #: build/C/man3/pthread_attr_setscope.3:83
2941 #, fuzzy
2942 #| msgid ""
2943 #| "POSIX.1-2001 requires that an implementation support only one of these "
2944 #| "contention scopes, but permits both to be supported.  Linux supports "
2945 #| "B<PTHREAD_SCOPE_SYSTEM>, but not B<PTHREAD_SCOPE_PROCESS>."
2946 msgid ""
2947 "POSIX.1-2001 requires that an implementation support at least one of these "
2948 "contention scopes.  Linux supports B<PTHREAD_SCOPE_SYSTEM>, but not "
2949 "B<PTHREAD_SCOPE_PROCESS>."
2950 msgstr ""
2951 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention\n"
2952 "scope のうち 1 つをサポートすることだけであるが、\n"
2953 "両方をサポートすることも認めている。\n"
2954 "Linux は B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、\n"
2955 "B<PTHREAD_SCOPE_PROCESS> はサポートしていない。"
2956
2957 #. type: Plain text
2958 #: build/C/man3/pthread_attr_setscope.3:95
2959 msgid ""
2960 "On systems that support multiple contention scopes, then, in order for the "
2961 "parameter setting made by B<pthread_attr_setscope>()  to have effect when "
2962 "calling B<pthread_create>(3), the caller must use "
2963 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2964 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2965 msgstr ""
2966
2967 #. type: Plain text
2968 #: build/C/man3/pthread_attr_setscope.3:103
2969 msgid ""
2970 "The B<pthread_attr_getscope>()  function returns the contention scope "
2971 "attribute of the thread attributes object referred to by I<attr> in the "
2972 "buffer pointed to by I<scope>."
2973 msgstr ""
2974 "B<pthread_attr_getscope>() は、\n"
2975 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2976 "I<scope> が指すバッファに入れて返す。"
2977
2978 #. type: Plain text
2979 #: build/C/man3/pthread_attr_setscope.3:109
2980 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2981 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2982
2983 #. type: Plain text
2984 #: build/C/man3/pthread_attr_setscope.3:113
2985 msgid "An invalid value was specified in I<scope>."
2986 msgstr "I<scope> に無効な値が指定された。"
2987
2988 #. type: TP
2989 #: build/C/man3/pthread_attr_setscope.3:113
2990 #, no-wrap
2991 msgid "B<ENOTSUP>"
2992 msgstr "B<ENOTSUP>"
2993
2994 #. type: Plain text
2995 #: build/C/man3/pthread_attr_setscope.3:119
2996 msgid ""
2997 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2998 "supported on Linux."
2999 msgstr ""
3000 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
3001 "この値は Linux でサポートされていない。"
3002
3003 #. type: Plain text
3004 #: build/C/man3/pthread_attr_setscope.3:129
3005 msgid ""
3006 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
3007 "space thread is bound directly to a single kernel-scheduling entity.  This "
3008 "is the case on Linux for the obsolete LinuxThreads implementation and the "
3009 "modern NPTL implementation, which are both 1:1 threading implementations."
3010 msgstr ""
3011 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
3012 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
3013 "直接結び付けられる。\n"
3014 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
3015 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
3016
3017 #. type: Plain text
3018 #: build/C/man3/pthread_attr_setscope.3:132
3019 msgid ""
3020 "POSIX.1-2001 specifies that the default contention scope is implementation-"
3021 "defined."
3022 msgstr ""
3023 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
3024 "実装時で定義されるものと規定されている。"
3025
3026 #. type: Plain text
3027 #: build/C/man3/pthread_attr_setscope.3:142
3028 msgid ""
3029 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3030 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3031 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3032 msgstr ""
3033 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3034 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3035 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3036
3037 #. type: TH
3038 #: build/C/man3/pthread_attr_setstack.3:26
3039 #, no-wrap
3040 msgid "PTHREAD_ATTR_SETSTACK"
3041 msgstr "PTHREAD_ATTR_SETSTACK"
3042
3043 #. type: Plain text
3044 #: build/C/man3/pthread_attr_setstack.3:30
3045 msgid ""
3046 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
3047 "thread attributes object"
3048 msgstr ""
3049 "pthread_attr_setstack, pthread_attr_getstack - \n"
3050 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
3051
3052 #. type: Plain text
3053 #: build/C/man3/pthread_attr_setstack.3:38
3054 #, no-wrap
3055 msgid ""
3056 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3057 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3058 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3059 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3060 msgstr ""
3061 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3062 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3063 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3064 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3065
3066 #. type: Plain text
3067 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_sigqueue.3:41
3068 msgid ""
3069 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3070 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3071
3072 #. type: Plain text
3073 #: build/C/man3/pthread_attr_setstack.3:50
3074 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3075 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3076
3077 #. type: Plain text
3078 #: build/C/man3/pthread_attr_setstack.3:52
3079 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3080 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3081
3082 #. type: Plain text
3083 #: build/C/man3/pthread_attr_setstack.3:68
3084 msgid ""
3085 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3086 "size attributes of the thread attributes object referred to by I<attr> to "
3087 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3088 "attributes specify the location and size of the stack that should be used by "
3089 "a thread that is created using the thread attributes object I<attr>."
3090 msgstr ""
3091 "B<pthread_attr_setstack>() 関数は、\n"
3092 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3093 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3094 "指定された値に設定する。\n"
3095 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3096 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3097
3098 #. type: Plain text
3099 #: build/C/man3/pthread_attr_setstack.3:74
3100 msgid ""
3101 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3102 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3103 "allocated buffer should be both readable and writable."
3104 msgstr ""
3105 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3106 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3107 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3108 "べきである。"
3109
3110 #. type: Plain text
3111 #: build/C/man3/pthread_attr_setstack.3:85
3112 msgid ""
3113 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3114 "size attributes of the thread attributes object referred to by I<attr> in "
3115 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3116 msgstr ""
3117 "B<pthread_attr_getstack>() 関数は、\n"
3118 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3119 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3120 "指すバッファに入れて返す。"
3121
3122 #. type: Plain text
3123 #: build/C/man3/pthread_attr_setstack.3:91
3124 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3125 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3126
3127 #. type: Plain text
3128 #: build/C/man3/pthread_attr_setstack.3:102
3129 msgid ""
3130 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3131 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3132 "stacksize> is not suitably aligned."
3133 msgstr ""
3134 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3135 "システムによっては、 I<stackaddr> か\n"
3136 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3137 "このエラーが発生する。"
3138
3139 #. type: Plain text
3140 #: build/C/man3/pthread_attr_setstack.3:110
3141 msgid ""
3142 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3143 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3144 "caller."
3145 msgstr ""
3146 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3147 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3148 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3149
3150 #. type: Plain text
3151 #: build/C/man3/pthread_attr_setstack.3:112
3152 msgid "These functions are provided by glibc since version 2.2."
3153 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3154
3155 #. type: Plain text
3156 #: build/C/man3/pthread_attr_setstack.3:122
3157 msgid ""
3158 "These functions are provided for applications that must ensure that a "
3159 "thread's stack is placed in a particular location.  For most applications, "
3160 "this is not necessary, and the use of these functions should be avoided.  "
3161 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3162 "stack size other than the default.)"
3163 msgstr ""
3164 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3165 "しなければならないアプリケーションのために提供されている。\n"
3166 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3167 "これらの関数を使うのは避けるべきである。\n"
3168 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3169 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3170
3171 #. type: Plain text
3172 #: build/C/man3/pthread_attr_setstack.3:133
3173 msgid ""
3174 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3175 "responsibility of allocating the stack.  Any guard size value that was set "
3176 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3177 "is the application's responsibility to allocate a guard area (one or more "
3178 "pages protected against reading and writing)  to handle the possibility of "
3179 "stack overflow."
3180 msgstr ""
3181 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3182 "スタックの割り当てに責任を持つ必要がある。\n"
3183 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3184 "guard size の値は無視される。\n"
3185 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3186 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3187 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3188
3189 #. type: Plain text
3190 #: build/C/man3/pthread_attr_setstack.3:144
3191 msgid ""
3192 "The address specified in I<stackaddr> should be suitably aligned: for full "
3193 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3194 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3195 "should also be a multiple of the system page size."
3196 msgstr ""
3197 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3198 "完全な移植性を持たせるためには、\n"
3199 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3200 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3201 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3202
3203 #. type: Plain text
3204 #: build/C/man3/pthread_attr_setstack.3:153
3205 msgid ""
3206 "If I<attr> is used to create multiple threads, then the caller must change "
3207 "the stack address attribute between calls to B<pthread_create>(3); "
3208 "otherwise, the threads will attempt to use the same memory area for their "
3209 "stacks, and chaos will ensue."
3210 msgstr ""
3211 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3212 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3213 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3214 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3215 "使おうとするため、訳の分からない状況が発生してしまう。"
3216
3217 #. type: Plain text
3218 #: build/C/man3/pthread_attr_setstack.3:168
3219 msgid ""
3220 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3221 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3222 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3223 msgstr ""
3224 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3225 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3226 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3227
3228 #. type: TH
3229 #: build/C/man3/pthread_attr_setstackaddr.3:26
3230 #, no-wrap
3231 msgid "PTHREAD_ATTR_SETSTACKADDR"
3232 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3233
3234 #. type: Plain text
3235 #: build/C/man3/pthread_attr_setstackaddr.3:30
3236 msgid ""
3237 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3238 "attribute in thread attributes object"
3239 msgstr ""
3240 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3241 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3242
3243 #. type: Plain text
3244 #: build/C/man3/pthread_attr_setstackaddr.3:38
3245 #, no-wrap
3246 msgid ""
3247 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3248 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3249 msgstr ""
3250 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3251 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3252
3253 #. type: Plain text
3254 #: build/C/man3/pthread_attr_setstackaddr.3:49
3255 msgid ""
3256 "These functions are obsolete: B<do not use them.> Use "
3257 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3258 msgstr ""
3259 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3260 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3261 "うこと。"
3262
3263 #. type: Plain text
3264 #: build/C/man3/pthread_attr_setstackaddr.3:60
3265 msgid ""
3266 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3267 "attribute of the thread attributes object referred to by I<attr> to the "
3268 "value specified in I<stackaddr>.  This attribute specifies the location of "
3269 "the stack that should be used by a thread that is created using the thread "
3270 "attributes object I<attr>."
3271 msgstr ""
3272 "B<pthread_attr_setstackaddr>() 関数は、\n"
3273 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3274 "属性を I<stackaddr> で指定された値に設定する。\n"
3275 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3276 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3277
3278 #. type: Plain text
3279 #: build/C/man3/pthread_attr_setstackaddr.3:66
3280 msgid ""
3281 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3282 "that was allocated by the caller.  The pages of the allocated buffer should "
3283 "be both readable and writable."
3284 msgstr ""
3285 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3286 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3287 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3288 "なっているべきである。"
3289
3290 #. type: Plain text
3291 #: build/C/man3/pthread_attr_setstackaddr.3:74
3292 msgid ""
3293 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3294 "attribute of the thread attributes object referred to by I<attr> in the "
3295 "buffer pointed to by I<stackaddr>."
3296 msgstr ""
3297 "B<pthread_attr_getstackaddr>() は、\n"
3298 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3299 "I<stackaddr> が指すバッファに入れて返す。"
3300
3301 #. type: Plain text
3302 #: build/C/man3/pthread_attr_setstackaddr.3:81
3303 msgid ""
3304 "No errors are defined (but applications should nevertheless handle a "
3305 "possible error return)."
3306 msgstr ""
3307 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3308 "返り値を処理するようにすべきである)。"
3309
3310 #. type: Plain text
3311 #: build/C/man3/pthread_attr_setstackaddr.3:86
3312 msgid ""
3313 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3314 "POSIX.1-2008 removes the specification of these functions."
3315 msgstr ""
3316 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3317 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3318
3319 #. type: Plain text
3320 #: build/C/man3/pthread_attr_setstackaddr.3:110
3321 msgid ""
3322 "I<Do not use these functions!> They cannot be portably used, since they "
3323 "provide no way of specifying the direction of growth or the range of the "
3324 "stack.  For example, on architectures with a stack that grows downward, "
3325 "I<stackaddr> specifies the next address past the I<highest> address of the "
3326 "allocated stack area.  However, on architectures with a stack that grows "
3327 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3328 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3329 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3330 "in the allocated stack area (and the I<stacksize> argument specifies the "
3331 "range of the stack)."
3332 msgstr ""
3333 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3334 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3335 "かを指定する手段が提供されていないからである。\n"
3336 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3337 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3338 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3339 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3340 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3341 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3342 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3343 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3344
3345 #. type: Plain text
3346 #: build/C/man3/pthread_attr_setstackaddr.3:116
3347 msgid ""
3348 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3349 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3350 msgstr ""
3351 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3352 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3353
3354 #. type: TH
3355 #: build/C/man3/pthread_attr_setstacksize.3:26
3356 #, no-wrap
3357 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3358 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3359
3360 #. type: TH
3361 #: build/C/man3/pthread_attr_setstacksize.3:26
3362 #, no-wrap
3363 msgid "2012-03-15"
3364 msgstr "2012-03-15"
3365
3366 #. type: Plain text
3367 #: build/C/man3/pthread_attr_setstacksize.3:30
3368 msgid ""
3369 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3370 "attribute in thread attributes object"
3371 msgstr ""
3372 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3373 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3374
3375 #. type: Plain text
3376 #: build/C/man3/pthread_attr_setstacksize.3:38
3377 #, no-wrap
3378 msgid ""
3379 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3380 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3381 msgstr ""
3382 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3383 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3384
3385 #. type: Plain text
3386 #: build/C/man3/pthread_attr_setstacksize.3:49
3387 msgid ""
3388 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3389 "of the thread attributes object referred to by I<attr> to the value "
3390 "specified in I<stacksize>."
3391 msgstr ""
3392 "B<pthread_attr_setstacksize>() 関数は、\n"
3393 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3394 "属性を I<stacksize> で指定された値に設定する。"
3395
3396 #. type: Plain text
3397 #: build/C/man3/pthread_attr_setstacksize.3:53
3398 msgid ""
3399 "The stack size attribute determines the minimum size (in bytes) that will be "
3400 "allocated for threads created using the thread attributes object I<attr>."
3401 msgstr ""
3402 "スタックサイズ属性により、\n"
3403 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3404 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3405
3406 #. type: Plain text
3407 #: build/C/man3/pthread_attr_setstacksize.3:61
3408 msgid ""
3409 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3410 "attribute of the thread attributes object referred to by I<attr> in the "
3411 "buffer pointed to by I<stacksize>."
3412 msgstr ""
3413 "B<pthread_attr_getstacksize>() は、\n"
3414 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3415 "I<stacksize> が指すバッファに入れて返す。"
3416
3417 #. type: Plain text
3418 #: build/C/man3/pthread_attr_setstacksize.3:67
3419 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3420 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3421
3422 #. type: Plain text
3423 #: build/C/man3/pthread_attr_setstacksize.3:72
3424 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3425 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3426
3427 #.  e.g., MacOS
3428 #. type: Plain text
3429 #: build/C/man3/pthread_attr_setstacksize.3:81
3430 msgid ""
3431 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3432 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3433 msgstr ""
3434 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3435 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3436 "エラー B<EINVAL> で失敗する。"
3437
3438 #. type: Plain text
3439 #: build/C/man3/pthread_attr_setstacksize.3:88
3440 msgid ""
3441 "For details on the default stack size of new threads, see B<pthread_create>"
3442 "(3)."
3443 msgstr ""
3444 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3445 "B<pthread_create>(3) を参照。"
3446
3447 #. type: Plain text
3448 #: build/C/man3/pthread_attr_setstacksize.3:91
3449 msgid ""
3450 "A thread's stack size is fixed at the time of thread creation.  Only the "
3451 "main thread can dynamically grow its stack."
3452 msgstr ""
3453 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3454 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3455
3456 #. type: Plain text
3457 #: build/C/man3/pthread_attr_setstacksize.3:96
3458 msgid ""
3459 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3460 "the size and location of a caller-allocated stack that is to be used by a "
3461 "thread."
3462 msgstr ""
3463 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3464 "アプリケーションは、スレッドが使用するスタックとして、\n"
3465 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3466
3467 #. type: Plain text
3468 #: build/C/man3/pthread_attr_setstacksize.3:108
3469 msgid ""
3470 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3471 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3472 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3473 "stack will be at least I<stacksize> bytes."
3474 msgstr ""
3475 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3476 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3477 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3478 "これは POSIX.1-2001 に違反している。\n"
3479 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3480 "少なくとも I<stacksize> バイトになると書かれている。"
3481
3482 #. type: Plain text
3483 #: build/C/man3/pthread_attr_setstacksize.3:111
3484 #: build/C/man3/pthread_join.3:127
3485 msgid "See B<pthread_create>(3)."
3486 msgstr "B<pthread_create>(3) を参照。"
3487
3488 #. type: Plain text
3489 #: build/C/man3/pthread_attr_setstacksize.3:118
3490 msgid ""
3491 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3492 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3493 msgstr ""
3494 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3495 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3496
3497 #. type: TH
3498 #: build/C/man3/pthread_cancel.3:26
3499 #, no-wrap
3500 msgid "PTHREAD_CANCEL"
3501 msgstr "PTHREAD_CANCEL"
3502
3503 #. type: TH
3504 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3505 #, no-wrap
3506 msgid "2008-11-17"
3507 msgstr "2008-11-17"
3508
3509 #. type: Plain text
3510 #: build/C/man3/pthread_cancel.3:29
3511 msgid "pthread_cancel - send a cancellation request to a thread"
3512 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3513
3514 #. type: Plain text
3515 #: build/C/man3/pthread_cancel.3:34
3516 #, no-wrap
3517 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3518 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3519
3520 #. type: Plain text
3521 #: build/C/man3/pthread_cancel.3:49
3522 msgid ""
3523 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3524 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3525 "request depends on two attributes that are under the control of that thread: "
3526 "its cancelability I<state> and I<type>."
3527 msgstr ""
3528 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3529 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3530 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3531 "I<state> と I<type>により決まる。"
3532
3533 #. type: Plain text
3534 #: build/C/man3/pthread_cancel.3:61
3535 msgid ""
3536 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3537 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3538 "has disabled cancellation, then a cancellation request remains queued until "
3539 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3540 "its cancelability type determines when cancellation occurs."
3541 msgstr ""
3542 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3543 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3544 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3545 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3546 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3547 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3548
3549 #. type: Plain text
3550 #: build/C/man3/pthread_cancel.3:77
3551 msgid ""
3552 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3553 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3554 "Asynchronous cancelability means that the thread can be canceled at any time "
3555 "(usually immediately, but the system does not guarantee this).  Deferred "
3556 "cancelability means that cancellation will be delayed until the thread next "
3557 "calls a function that is a I<cancellation point>.  A list of functions that "
3558 "are or may be cancellation points is provided in I<pthreads>(7)."
3559 msgstr ""
3560 "スレッドのキャンセル種別 (cancelability type) は\n"
3561 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3562 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3563 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3564 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3565 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3566 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3567 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3568 "遅延される。取り消しポイントに設定されていたり設定\n"
3569 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3570
3571 #. type: Plain text
3572 #: build/C/man3/pthread_cancel.3:81
3573 msgid ""
3574 "When a cancellation requested is acted on, the following steps occur for "
3575 "I<thread> (in this order):"
3576 msgstr ""
3577 "キャンセル要求が実行されると、\n"
3578 "I<thread> では以下のステップが (この順序で) 行われる。"
3579
3580 #. type: IP
3581 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3582 #, no-wrap
3583 msgid "1."
3584 msgstr "1."
3585
3586 #. type: Plain text
3587 #: build/C/man3/pthread_cancel.3:86
3588 msgid ""
3589 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3590 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3591 msgstr ""
3592 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3593 "取り出され (pop され)、呼び出される。\n"
3594 "(B<pthread_cleanup_push>(3) 参照)"
3595
3596 #. type: IP
3597 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3598 #, no-wrap
3599 msgid "2."
3600 msgstr "2."
3601
3602 #. type: Plain text
3603 #: build/C/man3/pthread_cancel.3:91
3604 msgid ""
3605 "Thread-specific data destructors are called, in an unspecified order.  (See "
3606 "B<pthread_key_create>(3).)"
3607 msgstr ""
3608 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3609 "呼び出し順序は規定されていない。\n"
3610 "(B<pthread_key_create>(3) 参照)"
3611
3612 #. type: IP
3613 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3614 #, no-wrap
3615 msgid "3."
3616 msgstr "3."
3617
3618 #. type: Plain text
3619 #: build/C/man3/pthread_cancel.3:95
3620 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3621 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3622
3623 #. type: Plain text
3624 #: build/C/man3/pthread_cancel.3:103
3625 msgid ""
3626 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3627 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3628 "caller whether the cancellation request was successfully queued."
3629 msgstr ""
3630 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3631 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3632 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3633
3634 #. type: Plain text
3635 #: build/C/man3/pthread_cancel.3:112
3636 msgid ""
3637 "After a canceled thread has terminated, a join with that thread using "
3638 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3639 "status.  (Joining with a thread is the only way to know that cancellation "
3640 "has completed.)"
3641 msgstr ""
3642 "キャンセルされたスレッドが終了された後に、\n"
3643 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3644 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3645 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3646
3647 #. type: Plain text
3648 #: build/C/man3/pthread_cancel.3:117
3649 msgid ""
3650 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3651 "error number."
3652 msgstr ""
3653 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3654 "エラーの場合、0 以外のエラー番号を返す。"
3655
3656 #. type: TP
3657 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3658 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3659 #: build/C/man3/pthread_kill.3:61 build/C/man3/pthread_setaffinity_np.3:114
3660 #: build/C/man3/pthread_setschedparam.3:114
3661 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3662 #, no-wrap
3663 msgid "B<ESRCH>"
3664 msgstr "B<ESRCH>"
3665
3666 #. type: Plain text
3667 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3668 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3669 #: build/C/man3/pthread_kill.3:66 build/C/man3/pthread_setaffinity_np.3:119
3670 #: build/C/man3/pthread_setschedparam.3:119
3671 #: build/C/man3/pthread_setschedprio.3:75
3672 msgid "No thread with the ID I<thread> could be found."
3673 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3674
3675 #. type: Plain text
3676 #: build/C/man3/pthread_cancel.3:135
3677 msgid ""
3678 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3679 "threading implementation, the first real-time signal (i.e., signal 32) is "
3680 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3681 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3682 msgstr ""
3683 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3684 "は、\n"
3685 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3686 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3687 "ム\n"
3688 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3689
3690 #. type: Plain text
3691 #: build/C/man3/pthread_cancel.3:141
3692 msgid ""
3693 "The program below creates a thread and then cancels it.  The main thread "
3694 "joins with the canceled thread to check that its exit status was "
3695 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3696 "run the program:"
3697 msgstr ""
3698 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3699 "る。\n"
3700 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3701 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3702 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3703
3704 #. type: Plain text
3705 #: build/C/man3/pthread_cancel.3:149
3706 #, no-wrap
3707 msgid ""
3708 "$ ./a.out\n"
3709 "thread_func(): started; cancellation disabled\n"
3710 "main(): sending cancellation request\n"
3711 "thread_func(): about to enable cancellation\n"
3712 "main(): thread was canceled\n"
3713 msgstr ""
3714 "$ ./a.out\n"
3715 "thread_func(): started; cancellation disabled\n"
3716 "main(): sending cancellation request\n"
3717 "thread_func(): about to enable cancellation\n"
3718 "main(): thread was canceled\n"
3719
3720 #. type: Plain text
3721 #: build/C/man3/pthread_cancel.3:159
3722 #, no-wrap
3723 msgid ""
3724 "#include E<lt>pthread.hE<gt>\n"
3725 "#include E<lt>stdio.hE<gt>\n"
3726 "#include E<lt>errno.hE<gt>\n"
3727 "#include E<lt>stdlib.hE<gt>\n"
3728 "#include E<lt>unistd.hE<gt>\n"
3729 msgstr ""
3730 "#include E<lt>pthread.hE<gt>\n"
3731 "#include E<lt>stdio.hE<gt>\n"
3732 "#include E<lt>errno.hE<gt>\n"
3733 "#include E<lt>stdlib.hE<gt>\n"
3734 "#include E<lt>unistd.hE<gt>\n"
3735
3736 #. type: Plain text
3737 #: build/C/man3/pthread_cancel.3:167
3738 #, no-wrap
3739 msgid ""
3740 "static void *\n"
3741 "thread_func(void *ignored_argument)\n"
3742 "{\n"
3743 "    int s;\n"
3744 msgstr ""
3745 "static void *\n"
3746 "thread_func(void *ignored_argument)\n"
3747 "{\n"
3748 "    int s;\n"
3749
3750 #. type: Plain text
3751 #: build/C/man3/pthread_cancel.3:170
3752 #, no-wrap
3753 msgid ""
3754 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3755 "       immediately react to a cancellation request */\n"
3756 msgstr ""
3757 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3758 "       immediately react to a cancellation request */\n"
3759
3760 #. type: Plain text
3761 #: build/C/man3/pthread_cancel.3:174
3762 #, no-wrap
3763 msgid ""
3764 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3765 "    if (s != 0)\n"
3766 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3767 msgstr ""
3768 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3769 "    if (s != 0)\n"
3770 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3771
3772 #. type: Plain text
3773 #: build/C/man3/pthread_cancel.3:178
3774 #, no-wrap
3775 msgid ""
3776 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3777 "    sleep(5);\n"
3778 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3779 msgstr ""
3780 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3781 "    sleep(5);\n"
3782 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3783
3784 #. type: Plain text
3785 #: build/C/man3/pthread_cancel.3:182
3786 #, no-wrap
3787 msgid ""
3788 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3789 "    if (s != 0)\n"
3790 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3791 msgstr ""
3792 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3793 "    if (s != 0)\n"
3794 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3795
3796 #. type: Plain text
3797 #: build/C/man3/pthread_cancel.3:184
3798 #, no-wrap
3799 msgid "    /* sleep() is a cancellation point */\n"
3800 msgstr "    /* sleep() is a cancellation point */\n"
3801
3802 #. type: Plain text
3803 #: build/C/man3/pthread_cancel.3:186
3804 #, no-wrap
3805 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3806 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3807
3808 #. type: Plain text
3809 #: build/C/man3/pthread_cancel.3:188
3810 #, no-wrap
3811 msgid "    /* Should never get here */\n"
3812 msgstr "    /* Should never get here */\n"
3813
3814 #. type: Plain text
3815 #: build/C/man3/pthread_cancel.3:192
3816 #, no-wrap
3817 msgid ""
3818 "    printf(\"thread_func(): not canceled!\\en\");\n"
3819 "    return NULL;\n"
3820 "}\n"
3821 msgstr ""
3822 "    printf(\"thread_func(): not canceled!\\en\");\n"
3823 "    return NULL;\n"
3824 "}\n"
3825
3826 #. type: Plain text
3827 #: build/C/man3/pthread_cancel.3:199
3828 #, no-wrap
3829 msgid ""
3830 "int\n"
3831 "main(void)\n"
3832 "{\n"
3833 "    pthread_t thr;\n"
3834 "    void *res;\n"
3835 "    int s;\n"
3836 msgstr ""
3837 "int\n"
3838 "main(void)\n"
3839 "{\n"
3840 "    pthread_t thr;\n"
3841 "    void *res;\n"
3842 "    int s;\n"
3843
3844 #. type: Plain text
3845 #: build/C/man3/pthread_cancel.3:201
3846 #, no-wrap
3847 msgid "    /* Start a thread and then send it a cancellation request */\n"
3848 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3849
3850 #. type: Plain text
3851 #: build/C/man3/pthread_cancel.3:205
3852 #, no-wrap
3853 msgid ""
3854 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3855 "    if (s != 0)\n"
3856 "        handle_error_en(s, \"pthread_create\");\n"
3857 msgstr ""
3858 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3859 "    if (s != 0)\n"
3860 "        handle_error_en(s, \"pthread_create\");\n"
3861
3862 #. type: Plain text
3863 #: build/C/man3/pthread_cancel.3:207
3864 #, no-wrap
3865 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3866 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3867
3868 #. type: Plain text
3869 #: build/C/man3/pthread_cancel.3:212
3870 #, no-wrap
3871 msgid ""
3872 "    printf(\"main(): sending cancellation request\\en\");\n"
3873 "    s = pthread_cancel(thr);\n"
3874 "    if (s != 0)\n"
3875 "        handle_error_en(s, \"pthread_cancel\");\n"
3876 msgstr ""
3877 "    printf(\"main(): sending cancellation request\\en\");\n"
3878 "    s = pthread_cancel(thr);\n"
3879 "    if (s != 0)\n"
3880 "        handle_error_en(s, \"pthread_cancel\");\n"
3881
3882 #. type: Plain text
3883 #: build/C/man3/pthread_cancel.3:214
3884 #, no-wrap
3885 msgid "    /* Join with thread to see what its exit status was */\n"
3886 msgstr "    /* Join with thread to see what its exit status was */\n"
3887
3888 #. type: Plain text
3889 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
3890 #, no-wrap
3891 msgid ""
3892 "    s = pthread_join(thr, &res);\n"
3893 "    if (s != 0)\n"
3894 "        handle_error_en(s, \"pthread_join\");\n"
3895 msgstr ""
3896 "    s = pthread_join(thr, &res);\n"
3897 "    if (s != 0)\n"
3898 "        handle_error_en(s, \"pthread_join\");\n"
3899
3900 #. type: Plain text
3901 #: build/C/man3/pthread_cancel.3:225
3902 #, no-wrap
3903 msgid ""
3904 "    if (res == PTHREAD_CANCELED)\n"
3905 "        printf(\"main(): thread was canceled\\en\");\n"
3906 "    else\n"
3907 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3908 "    exit(EXIT_SUCCESS);\n"
3909 "}\n"
3910 msgstr ""
3911 "    if (res == PTHREAD_CANCELED)\n"
3912 "        printf(\"main(): thread was canceled\\en\");\n"
3913 "    else\n"
3914 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3915 "    exit(EXIT_SUCCESS);\n"
3916 "}\n"
3917
3918 #. type: Plain text
3919 #: build/C/man3/pthread_cancel.3:238
3920 msgid ""
3921 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3922 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3923 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3924 msgstr ""
3925 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3926 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3927 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3928
3929 #. type: TH
3930 #: build/C/man3/pthread_cleanup_push.3:26
3931 #, no-wrap
3932 msgid "PTHREAD_CLEANUP_PUSH"
3933 msgstr "PTHREAD_CLEANUP_PUSH"
3934
3935 #. type: TH
3936 #: build/C/man3/pthread_cleanup_push.3:26
3937 #: build/C/man3/pthread_setcancelstate.3:26
3938 #, no-wrap
3939 msgid "2008-11-24"
3940 msgstr "2008-11-24"
3941
3942 #. type: Plain text
3943 #: build/C/man3/pthread_cleanup_push.3:30
3944 msgid ""
3945 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3946 "clean-up handlers"
3947 msgstr ""
3948 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3949 "キャンセルクリーンアップハンドラの push/pop を行う"
3950
3951 #. type: Plain text
3952 #: build/C/man3/pthread_cleanup_push.3:37
3953 #, no-wrap
3954 msgid ""
3955 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3956 "B<                          void *>I<arg>B<);>\n"
3957 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3958 msgstr ""
3959 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3960 "B<                          void *>I<arg>B<);>\n"
3961 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3962
3963 #. type: Plain text
3964 #: build/C/man3/pthread_cleanup_push.3:48
3965 msgid ""
3966 "These functions manipulate the calling thread's stack of thread-cancellation "
3967 "clean-up handlers.  A clean-up handler is a function that is automatically "
3968 "executed when a thread is canceled (or in various other circumstances "
3969 "described below); it might, for example, unlock a mutex so that it becomes "
3970 "available to other threads in the process."
3971 msgstr ""
3972 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3973 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3974 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3975 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3976 "他のスレッドが利用できるようにする関数などが考えられる。"
3977
3978 #. type: Plain text
3979 #: build/C/man3/pthread_cleanup_push.3:59
3980 msgid ""
3981 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3982 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3983 "be given I<arg> as its argument."
3984 msgstr ""
3985 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3986 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3987 "起動される際には、 I<arg> が関数の引き数と渡される。"
3988
3989 #. type: Plain text
3990 #: build/C/man3/pthread_cleanup_push.3:66
3991 msgid ""
3992 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3993 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3994 "nonzero."
3995 msgstr ""
3996 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3997 "スタックの一番上のルーチンを削除する。\n"
3998 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3999
4000 #. type: Plain text
4001 #: build/C/man3/pthread_cleanup_push.3:69
4002 msgid ""
4003 "A cancellation clean-up handler is popped from the stack and executed in the "
4004 "following circumstances:"
4005 msgstr ""
4006 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
4007 "スタックから取り出され実行される。"
4008
4009 #. type: Plain text
4010 #: build/C/man3/pthread_cleanup_push.3:73
4011 msgid ""
4012 "When a thread is canceled, all of the stacked clean-up handlers are popped "
4013 "and executed in the reverse of the order in which they were pushed onto the "
4014 "stack."
4015 msgstr ""
4016 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
4017 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
4018 "実行は、スタックに登録されたのと逆の順序で行われる。"
4019
4020 #. type: Plain text
4021 #: build/C/man3/pthread_cleanup_push.3:83
4022 msgid ""
4023 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
4024 "handlers are executed as described in the preceding point.  (Clean-up "
4025 "handlers are I<not> called if the thread terminates by performing a "
4026 "I<return> from the thread start function.)"
4027 msgstr ""
4028 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
4029 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
4030 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
4031 "は、クリーンアップハンドラはI<呼び出されない>。)"
4032
4033 #. type: Plain text
4034 #: build/C/man3/pthread_cleanup_push.3:89
4035 msgid ""
4036 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
4037 "argument, the top-most clean-up handler is popped and executed."
4038 msgstr ""
4039 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
4040 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
4041 "実行される。"
4042
4043 #. type: Plain text
4044 #: build/C/man3/pthread_cleanup_push.3:101
4045 msgid ""
4046 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4047 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4048 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4049 "calls to these functions are paired within the same function, and at the "
4050 "same lexical nesting level.  (In other words, a clean-up handler is "
4051 "established only during the execution of a specified section of code.)"
4052 msgstr ""
4053 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4054 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4055 "して実装することを許容している。\n"
4056 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4057 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4058 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4059 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4060
4061 #. type: Plain text
4062 #: build/C/man3/pthread_cleanup_push.3:121
4063 msgid ""
4064 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4065 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
4066 "()  without the matching call of the pair since the jump buffer was filled "
4067 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
4068 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
4069 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
4070 "(3))  inside the handler."
4071 msgstr ""
4072 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4073 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4074 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4075 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4076 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4077 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4078 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4079 "結果になるかは不定である。"
4080
4081 #. type: Plain text
4082 #: build/C/man3/pthread_cleanup_push.3:123
4083 msgid "These functions do not return a value."
4084 msgstr "これらの関数は値を返さない。"
4085
4086 #.  SH VERSIONS
4087 #.  Available since glibc 2.0
4088 #. type: Plain text
4089 #: build/C/man3/pthread_cleanup_push.3:127
4090 msgid "There are no errors."
4091 msgstr "エラーはない。"
4092
4093 #. type: Plain text
4094 #: build/C/man3/pthread_cleanup_push.3:140
4095 msgid ""
4096 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4097 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4098 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4099 "declared within the scope of paired calls to these functions will be visible "
4100 "within only that scope."
4101 msgstr ""
4102 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4103 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4104 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4105 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4106 "ということを意味している。"
4107
4108 #.  The text was actually added in the 2004 TC2
4109 #. type: Plain text
4110 #: build/C/man3/pthread_cleanup_push.3:155
4111 msgid ""
4112 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4113 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4114 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4115 "avoid doing this."
4116 msgstr ""
4117 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4118 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4119 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4120 "不定であると書かれている。\n"
4121 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4122
4123 #. type: Plain text
4124 #: build/C/man3/pthread_cleanup_push.3:170
4125 msgid ""
4126 "The program below provides a simple example of the use of the functions "
4127 "described in this page.  The program creates a thread that executes a loop "
4128 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4129 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4130 "what command-line arguments are supplied, the main thread sends the other "
4131 "thread a cancellation request, or sets a global variable that causes the "
4132 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4133 msgstr ""
4134 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4135 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4136 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4137 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4138 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4139 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4140 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4141 "設定したりする。"
4142
4143 #. type: Plain text
4144 #: build/C/man3/pthread_cleanup_push.3:173
4145 msgid ""
4146 "In the following shell session, the main thread sends a cancellation request "
4147 "to the other thread:"
4148 msgstr ""
4149 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4150 "キャンセル要求を送信する。"
4151
4152 #. type: Plain text
4153 #: build/C/man3/pthread_cleanup_push.3:183
4154 #, no-wrap
4155 msgid ""
4156 "$ B<./a.out>\n"
4157 "New thread started\n"
4158 "cnt = 0\n"
4159 "cnt = 1\n"
4160 "Canceling thread\n"
4161 "Called clean-up handler\n"
4162 "Thread was canceled; cnt = 0\n"
4163 msgstr ""
4164 "$ B<./a.out>\n"
4165 "New thread started\n"
4166 "cnt = 0\n"
4167 "cnt = 1\n"
4168 "Canceling thread\n"
4169 "Called clean-up handler\n"
4170 "Thread was canceled; cnt = 0\n"
4171
4172 #. type: Plain text
4173 #: build/C/man3/pthread_cleanup_push.3:191
4174 msgid ""
4175 "From the above, we see that the thread was canceled, and that the "
4176 "cancellation clean-up handler was called and it reset the value of the "
4177 "global variable I<cnt> to 0."
4178 msgstr ""
4179 "上記の実行例から、スレッドがキャンセルされ、\n"
4180 "キャンセルクリーンアップハンドラが呼び出され、\n"
4181 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4182
4183 #. type: Plain text
4184 #: build/C/man3/pthread_cleanup_push.3:194
4185 msgid ""
4186 "In the next run, the main program sets a global variable that causes other "
4187 "thread to terminate normally:"
4188 msgstr ""
4189 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4190 "もう一つのスレッドが正常終了するようにしている。"
4191
4192 #. type: Plain text
4193 #: build/C/man3/pthread_cleanup_push.3:202
4194 #, no-wrap
4195 msgid ""
4196 "$ B<./a.out x>\n"
4197 "New thread started\n"
4198 "cnt = 0\n"
4199 "cnt = 1\n"
4200 "Thread terminated normally; cnt = 2\n"
4201 msgstr ""
4202 "$ B<./a.out x>\n"
4203 "New thread started\n"
4204 "cnt = 0\n"
4205 "cnt = 1\n"
4206 "Thread terminated normally; cnt = 2\n"
4207
4208 #. type: Plain text
4209 #: build/C/man3/pthread_cleanup_push.3:210
4210 msgid ""
4211 "From the above, we see that the clean-up handler was not executed (because "
4212 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4213 msgstr ""
4214 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4215 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4216 "分かる。"
4217
4218 #. type: Plain text
4219 #: build/C/man3/pthread_cleanup_push.3:215
4220 msgid ""
4221 "In the next run, the main program sets a global variable that causes the "
4222 "other thread to terminate normally, and supplies a nonzero value for "
4223 "I<cleanup_pop_arg>:"
4224 msgstr ""
4225 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4226 "もう一つのスレッドが正常終了するようにし、さらに\n"
4227 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4228
4229 #. type: Plain text
4230 #: build/C/man3/pthread_cleanup_push.3:224
4231 #, no-wrap
4232 msgid ""
4233 "$ B<./a.out x 1>\n"
4234 "New thread started\n"
4235 "cnt = 0\n"
4236 "cnt = 1\n"
4237 "Called clean-up handler\n"
4238 "Thread terminated normally; cnt = 0\n"
4239 msgstr ""
4240 "$ B<./a.out x 1>\n"
4241 "New thread started\n"
4242 "cnt = 0\n"
4243 "cnt = 1\n"
4244 "Called clean-up handler\n"
4245 "Thread terminated normally; cnt = 0\n"
4246
4247 #. type: Plain text
4248 #: build/C/man3/pthread_cleanup_push.3:231
4249 msgid ""
4250 "In the above, we see that although the thread was not canceled, the clean-up "
4251 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4252 "()  was nonzero."
4253 msgstr ""
4254 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4255 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4256 "に 0 以外を渡したからである。"
4257
4258 #. type: Plain text
4259 #: build/C/man3/pthread_cleanup_push.3:240
4260 #, no-wrap
4261 msgid ""
4262 "#include E<lt>pthread.hE<gt>\n"
4263 "#include E<lt>sys/types.hE<gt>\n"
4264 "#include E<lt>stdio.hE<gt>\n"
4265 "#include E<lt>stdlib.hE<gt>\n"
4266 "#include E<lt>unistd.hE<gt>\n"
4267 "#include E<lt>errno.hE<gt>\n"
4268 msgstr ""
4269 "#include E<lt>pthread.hE<gt>\n"
4270 "#include E<lt>sys/types.hE<gt>\n"
4271 "#include E<lt>stdio.hE<gt>\n"
4272 "#include E<lt>stdlib.hE<gt>\n"
4273 "#include E<lt>unistd.hE<gt>\n"
4274 "#include E<lt>errno.hE<gt>\n"
4275
4276 #. type: Plain text
4277 #: build/C/man3/pthread_cleanup_push.3:247
4278 #, no-wrap
4279 msgid ""
4280 "static int done = 0;\n"
4281 "static int cleanup_pop_arg = 0;\n"
4282 "static int cnt = 0;\n"
4283 msgstr ""
4284 "static int done = 0;\n"
4285 "static int cleanup_pop_arg = 0;\n"
4286 "static int cnt = 0;\n"
4287
4288 #. type: Plain text
4289 #: build/C/man3/pthread_cleanup_push.3:254
4290 #, no-wrap
4291 msgid ""
4292 "static void\n"
4293 "cleanup_handler(void *arg)\n"
4294 "{\n"
4295 "    printf(\"Called clean-up handler\\en\");\n"
4296 "    cnt = 0;\n"
4297 "}\n"
4298 msgstr ""
4299 "static void\n"
4300 "cleanup_handler(void *arg)\n"
4301 "{\n"
4302 "    printf(\"Called clean-up handler\\en\");\n"
4303 "    cnt = 0;\n"
4304 "}\n"
4305
4306 #. type: Plain text
4307 #: build/C/man3/pthread_cleanup_push.3:259
4308 #, no-wrap
4309 msgid ""
4310 "static void *\n"
4311 "thread_start(void *arg)\n"
4312 "{\n"
4313 "    time_t start, curr;\n"
4314 msgstr ""
4315 "static void *\n"
4316 "thread_start(void *arg)\n"
4317 "{\n"
4318 "    time_t start, curr;\n"
4319
4320 #. type: Plain text
4321 #: build/C/man3/pthread_cleanup_push.3:261
4322 #, no-wrap
4323 msgid "    printf(\"New thread started\\en\");\n"
4324 msgstr "    printf(\"New thread started\\en\");\n"
4325
4326 #. type: Plain text
4327 #: build/C/man3/pthread_cleanup_push.3:263
4328 #, no-wrap
4329 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4330 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4331
4332 #. type: Plain text
4333 #: build/C/man3/pthread_cleanup_push.3:265
4334 #, no-wrap
4335 msgid "    curr = start = time(NULL);\n"
4336 msgstr "    curr = start = time(NULL);\n"
4337
4338 #. type: Plain text
4339 #: build/C/man3/pthread_cleanup_push.3:274
4340 #, no-wrap
4341 msgid ""
4342 "    while (!done) {\n"
4343 "        pthread_testcancel();           /* A cancellation point */\n"
4344 "        if (curr E<lt> time(NULL)) {\n"
4345 "            curr = time(NULL);\n"
4346 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4347 "            cnt++;\n"
4348 "        }\n"
4349 "    }\n"
4350 msgstr ""
4351 "    while (!done) {\n"
4352 "        pthread_testcancel();           /* A cancellation point */\n"
4353 "        if (curr E<lt> time(NULL)) {\n"
4354 "            curr = time(NULL);\n"
4355 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4356 "            cnt++;\n"
4357 "        }\n"
4358 "    }\n"
4359
4360 #. type: Plain text
4361 #: build/C/man3/pthread_cleanup_push.3:278
4362 #, no-wrap
4363 msgid ""
4364 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4365 "    return NULL;\n"
4366 "}\n"
4367 msgstr ""
4368 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4369 "    return NULL;\n"
4370 "}\n"
4371
4372 #. type: Plain text
4373 #: build/C/man3/pthread_cleanup_push.3:285
4374 #, no-wrap
4375 msgid ""
4376 "int\n"
4377 "main(int argc, char *argv[])\n"
4378 "{\n"
4379 "    pthread_t thr;\n"
4380 "    int s;\n"
4381 "    void *res;\n"
4382 msgstr ""
4383 "int\n"
4384 "main(int argc, char *argv[])\n"
4385 "{\n"
4386 "    pthread_t thr;\n"
4387 "    int s;\n"
4388 "    void *res;\n"
4389
4390 #. type: Plain text
4391 #: build/C/man3/pthread_cleanup_push.3:289
4392 #, no-wrap
4393 msgid ""
4394 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4395 "    if (s != 0)\n"
4396 "        handle_error_en(s, \"pthread_create\");\n"
4397 msgstr ""
4398 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4399 "    if (s != 0)\n"
4400 "        handle_error_en(s, \"pthread_create\");\n"
4401
4402 #. type: Plain text
4403 #: build/C/man3/pthread_cleanup_push.3:291
4404 #, no-wrap
4405 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4406 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4407
4408 #. type: Plain text
4409 #: build/C/man3/pthread_cleanup_push.3:296
4410 #, no-wrap
4411 msgid ""
4412 "    if (argc E<gt> 1) {\n"
4413 "        if (argc E<gt> 2)\n"
4414 "            cleanup_pop_arg = atoi(argv[2]);\n"
4415 "        done = 1;\n"
4416 msgstr ""
4417 "    if (argc E<gt> 1) {\n"
4418 "        if (argc E<gt> 2)\n"
4419 "            cleanup_pop_arg = atoi(argv[2]);\n"
4420 "        done = 1;\n"
4421
4422 #. type: Plain text
4423 #: build/C/man3/pthread_cleanup_push.3:303
4424 #, no-wrap
4425 msgid ""
4426 "    } else {\n"
4427 "        printf(\"Canceling thread\\en\");\n"
4428 "        s = pthread_cancel(thr);\n"
4429 "        if (s != 0)\n"
4430 "            handle_error_en(s, \"pthread_cancel\");\n"
4431 "    }\n"
4432 msgstr ""
4433 "    } else {\n"
4434 "        printf(\"Canceling thread\\en\");\n"
4435 "        s = pthread_cancel(thr);\n"
4436 "        if (s != 0)\n"
4437 "            handle_error_en(s, \"pthread_cancel\");\n"
4438 "    }\n"
4439
4440 #. type: Plain text
4441 #: build/C/man3/pthread_cleanup_push.3:314
4442 #, no-wrap
4443 msgid ""
4444 "    if (res == PTHREAD_CANCELED)\n"
4445 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4446 "    else\n"
4447 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4448 "    exit(EXIT_SUCCESS);\n"
4449 "}\n"
4450 msgstr ""
4451 "    if (res == PTHREAD_CANCELED)\n"
4452 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4453 "    else\n"
4454 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4455 "    exit(EXIT_SUCCESS);\n"
4456 "}\n"
4457
4458 #. type: Plain text
4459 #: build/C/man3/pthread_cleanup_push.3:321
4460 msgid ""
4461 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4462 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4463 msgstr ""
4464 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4465 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4466
4467 #. type: TH
4468 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4469 #, no-wrap
4470 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4471 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4472
4473 #. type: TH
4474 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4475 #, no-wrap
4476 msgid "2008-12-04"
4477 msgstr "2008-12-04"
4478
4479 #. type: Plain text
4480 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4481 msgid ""
4482 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4483 "thread cancellation clean-up handlers while saving cancelability type"
4484 msgstr ""
4485 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4486 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4487 "の push/pop を行う"
4488
4489 #. type: Plain text
4490 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4491 #, no-wrap
4492 msgid ""
4493 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4494 "B<                                   void *>I<arg>B<);>\n"
4495 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4496 msgstr ""
4497 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4498 "B<                                   void *>I<arg>B<);>\n"
4499 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4500
4501 #. type: Plain text
4502 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4503 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4504 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4505 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4506 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4507 #: build/C/man3/pthread_yield.3:37
4508 msgid "Compile and link with I<-pthread>."
4509 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4510
4511 #. type: Plain text
4512 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4513 msgid ""
4514 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4515 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4516 msgstr ""
4517 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4518 "だが、このページで説明する点が異なる。"
4519
4520 #. type: Plain text
4521 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4522 msgid ""
4523 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4524 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4525 "addition, it also saves the thread's current cancelability type, and sets "
4526 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4527 "this ensures that cancellation clean-up will occur even if the thread's "
4528 "cancelability type was \"asynchronous\" before the call."
4529 msgstr ""
4530 "B<pthread_cleanup_push>(3) と同様に、\n"
4531 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4532 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4533 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4534 "保存し、cancelability type は \"deferred\" に設定する\n"
4535 "(B<pthread_setcanceltype>(3) 参照)。\n"
4536 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4537 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4538 "が保証される。"
4539
4540 #. type: Plain text
4541 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4542 msgid ""
4543 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4544 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4545 "up handlers.  In addition, it restores the thread's cancelability type to "
4546 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4547 msgstr ""
4548 "B<pthread_cleanup_pop>(3) と同様に、\n"
4549 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4550 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4551 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4552 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4553
4554 #. type: Plain text
4555 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4556 msgid ""
4557 "The caller must ensure that calls to these functions are paired within the "
4558 "same function, and at the same lexical nesting level.  Other restrictions "
4559 "apply, as described in B<pthread_cleanup_push>(3)."
4560 msgstr ""
4561 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4562 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4563 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4564 "適用される。"
4565
4566 #. type: Plain text
4567 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4568 msgid "This sequence of calls:"
4569 msgstr "以下の一連の呼び出し"
4570
4571 #. type: Plain text
4572 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4573 #, no-wrap
4574 msgid ""
4575 "pthread_cleanup_push_defer_np(routine, arg);\n"
4576 "pthread_cleanup_pop_restore_np(execute);\n"
4577 msgstr ""
4578 "pthread_cleanup_push_defer_np(routine, arg);\n"
4579 "pthread_cleanup_pop_restore_np(execute);\n"
4580
4581 #. type: Plain text
4582 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4583 msgid "is equivalent to (but shorter and more efficient than):"
4584 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4585
4586 #. type: Plain text
4587 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4588 #, no-wrap
4589 msgid "int oldtype;\n"
4590 msgstr "int oldtype;\n"
4591
4592 #. type: Plain text
4593 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4594 #, no-wrap
4595 msgid ""
4596 "pthread_cleanup_push(routine, arg);\n"
4597 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4598 "\\&...\n"
4599 "pthread_setcanceltype(oldtype, NULL);\n"
4600 "pthread_cleanup_pop(execute);\n"
4601 msgstr ""
4602 "pthread_cleanup_push(routine, arg);\n"
4603 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4604 "\\&...\n"
4605 "pthread_setcanceltype(oldtype, NULL);\n"
4606 "pthread_cleanup_pop(execute);\n"
4607
4608 #. type: Plain text
4609 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4610 msgid ""
4611 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4612 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4613 msgstr ""
4614 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4615 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4616
4617 #. type: TH
4618 #: build/C/man3/pthread_create.3:26
4619 #, no-wrap
4620 msgid "PTHREAD_CREATE"
4621 msgstr "PTHREAD_CREATE"
4622
4623 #. type: TH
4624 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_sigmask.3:26
4625 #, no-wrap
4626 msgid "2012-08-03"
4627 msgstr "2012-08-03"
4628
4629 #. type: Plain text
4630 #: build/C/man3/pthread_create.3:29
4631 msgid "pthread_create - create a new thread"
4632 msgstr "pthread_create - 新しいスレッドを作成する"
4633
4634 #. type: Plain text
4635 #: build/C/man3/pthread_create.3:35
4636 #, no-wrap
4637 msgid ""
4638 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4639 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4640 msgstr ""
4641 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4642 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4643
4644 #. type: Plain text
4645 #: build/C/man3/pthread_create.3:47
4646 msgid ""
4647 "The B<pthread_create>()  function starts a new thread in the calling "
4648 "process.  The new thread starts execution by invoking I<start_routine>(); "
4649 "I<arg> is passed as the sole argument of I<start_routine>()."
4650 msgstr ""
4651 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4652 "る。\n"
4653 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4654 "I<start_routine>() は引き数を一つだけ取り、\n"
4655 "I<arg> が I<start_routine>() の引き数として渡される。"
4656
4657 #. type: Plain text
4658 #: build/C/man3/pthread_create.3:49
4659 msgid "The new thread terminates in one of the following ways:"
4660 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4661
4662 #. type: IP
4663 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4664 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4665 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4666 #: build/C/man3/pthread_getattr_np.3:58
4667 #, no-wrap
4668 msgid "*"
4669 msgstr "*"
4670
4671 #. type: Plain text
4672 #: build/C/man3/pthread_create.3:55
4673 msgid ""
4674 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4675 "available to another thread in the same process that calls B<pthread_join>"
4676 "(3)."
4677 msgstr ""
4678 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4679 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4680 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4681 "別のスレッドで参照できる。"
4682
4683 #. type: Plain text
4684 #: build/C/man3/pthread_create.3:63
4685 msgid ""
4686 "It returns from I<start_routine>().  This is equivalent to calling "
4687 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4688 msgstr ""
4689 "スレッドが I<start_routine>() から返る。これは、\n"
4690 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4691
4692 #. type: Plain text
4693 #: build/C/man3/pthread_create.3:66
4694 msgid "It is canceled (see B<pthread_cancel>(3))."
4695 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4696
4697 #. type: Plain text
4698 #: build/C/man3/pthread_create.3:72
4699 msgid ""
4700 "Any of the threads in the process calls B<exit>(3), or the main thread "
4701 "performs a return from I<main>().  This causes the termination of all "
4702 "threads in the process."
4703 msgstr ""
4704 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4705 "メインスレッドで I<main>() 内で return が実行される。\n"
4706 "この場合は、プロセス内の全てのスレッドが終了される。"
4707
4708 #. type: Plain text
4709 #: build/C/man3/pthread_create.3:86
4710 msgid ""
4711 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4712 "are used at thread creation time to determine attributes for the new thread; "
4713 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4714 "functions.  If I<attr> is NULL, then the thread is created with default "
4715 "attributes."
4716 msgstr ""
4717 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4718 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4719 "新しいスレッドの属性が決定される。\n"
4720 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4721 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4722
4723 #. type: Plain text
4724 #: build/C/man3/pthread_create.3:93
4725 msgid ""
4726 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4727 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4728 "used to refer to the thread in subsequent calls to other pthreads functions."
4729 msgstr ""
4730 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4731 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4732 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4733
4734 #. type: Plain text
4735 #: build/C/man3/pthread_create.3:101
4736 msgid ""
4737 "The new thread inherits a copy of the creating thread's signal mask "
4738 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4739 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4740 "thread's alternate signal stack (B<sigaltstack>(2))."
4741 msgstr ""
4742 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4743 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4744 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4745 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4746 "(B<sigaltstack>(2)) を継承しない。"
4747
4748 #. type: Plain text
4749 #: build/C/man3/pthread_create.3:104
4750 msgid ""
4751 "The new thread inherits the calling thread's floating-point environment "
4752 "(B<fenv>(3))."
4753 msgstr ""
4754 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4755 "を継承する。"
4756
4757 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4758 #. type: Plain text
4759 #: build/C/man3/pthread_create.3:109
4760 msgid ""
4761 "The initial value of the new thread's CPU-time clock is 0 (see "
4762 "B<pthread_getcpuclockid>(3))."
4763 msgstr ""
4764 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4765 "(B<pthread_getcpuclockid>(3) 参照)。"
4766
4767 #. type: SS
4768 #: build/C/man3/pthread_create.3:109
4769 #, no-wrap
4770 msgid "Linux-specific details"
4771 msgstr "Linux 固有の詳細"
4772
4773 #. type: Plain text
4774 #: build/C/man3/pthread_create.3:115
4775 msgid ""
4776 "The new thread inherits copies of the calling thread's capability sets (see "
4777 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4778 msgstr ""
4779 "新しいスレッドは、呼び出したスレッドの\n"
4780 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4781 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4782 "コピーをを継承しない。"
4783
4784 #. type: Plain text
4785 #: build/C/man3/pthread_create.3:122
4786 msgid ""
4787 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4788 "number, and the contents of I<*thread> are undefined."
4789 msgstr ""
4790 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4791 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4792
4793 #. type: TP
4794 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4795 #, no-wrap
4796 msgid "B<EAGAIN>"
4797 msgstr "B<EAGAIN>"
4798
4799 #. type: Plain text
4800 #: build/C/man3/pthread_create.3:137
4801 msgid ""
4802 "Insufficient resources to create another thread, or a system-imposed limit "
4803 "on the number of threads was encountered.  The latter case may occur in two "
4804 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4805 "which limits the number of process for a real user ID, was reached; or the "
4806 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4807 "threads-max>, was reached."
4808 msgstr ""
4809 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4810 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4811 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4812 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4813 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4814 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4815
4816 #. type: Plain text
4817 #: build/C/man3/pthread_create.3:141
4818 msgid "Invalid settings in I<attr>."
4819 msgstr "I<attr> で指定された設定が不正である。"
4820
4821 #. type: TP
4822 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4823 #: build/C/man3/pthread_setschedprio.3:66
4824 #, no-wrap
4825 msgid "B<EPERM>"
4826 msgstr "B<EPERM>"
4827
4828 #. type: Plain text
4829 #: build/C/man3/pthread_create.3:146
4830 msgid ""
4831 "No permission to set the scheduling policy and parameters specified in "
4832 "I<attr>."
4833 msgstr ""
4834 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4835 "設定する許可がない。"
4836
4837 #. type: Plain text
4838 #: build/C/man3/pthread_create.3:160
4839 msgid ""
4840 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4841 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4842 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4843 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4844 msgstr ""
4845 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4846 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4847 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4848 "B<pthread_create>() の呼び出し後に、\n"
4849 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4850 "次に実行されるかは決まっていない。"
4851
4852 #. type: Plain text
4853 #: build/C/man3/pthread_create.3:180
4854 msgid ""
4855 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4856 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4857 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4858 "has been joined are the last of its resources released back to the system.  "
4859 "When a detached thread terminates, its resources are automatically released "
4860 "back to the system: it is not possible to join with the thread in order to "
4861 "obtain its exit status.  Making a thread detached is useful for some types "
4862 "of daemon threads whose exit status the application does not need to care "
4863 "about.  By default, a new thread is created in a joinable state, unless "
4864 "I<attr> was set to create the thread in a detached state (using "
4865 "B<pthread_attr_setdetachstate>(3))."
4866 msgstr ""
4867 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4868 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4869 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4870 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4871 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4872 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4873 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4874 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4875 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4876 "デーモン (daemon) スレッドでは有用である。\n"
4877 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4878 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4879 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4880 "作成される。"
4881
4882 #.  FIXME . Perhaps some of the following detail should be in
4883 #.  a future pthread_attr_setstacksize(3) page.
4884 #. type: Plain text
4885 #: build/C/man3/pthread_create.3:196
4886 msgid ""
4887 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4888 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4889 "resource limit I<at the time the program started> has any value other than "
4890 "\"unlimited\", then it determines the default stack size of new threads.  "
4891 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4892 "explicitly set in the I<attr> argument used to create a thread, in order to "
4893 "obtain a stack size other than the default."
4894 msgstr ""
4895 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4896 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4897 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4898 "フォルトのスタックサイズとなる。\n"
4899 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4900 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4901 "デフォルト値以外のスタックサイズを得ることができる。"
4902
4903 #. type: Plain text
4904 #: build/C/man3/pthread_create.3:202
4905 msgid ""
4906 "In the obsolete LinuxThreads implementation, each of the threads in a "
4907 "process has a different process ID.  This is in violation of the POSIX "
4908 "threads specification, and is the source of many other nonconformances to "
4909 "the standard; see B<pthreads>(7)."
4910 msgstr ""
4911 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4912 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4913 "他の多くの標準非準拠の点の原因になっている。\n"
4914 "B<pthreads>(7) を参照のこと。"
4915
4916 #. type: Plain text
4917 #: build/C/man3/pthread_create.3:206
4918 msgid ""
4919 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4920 "number of other functions in the pthreads API."
4921 msgstr ""
4922 "以下のプログラムは、 B<pthread_create>() や\n"
4923 "pthreads API の他のいろいろな関数の使用例を示している。"
4924
4925 #. type: Plain text
4926 #: build/C/man3/pthread_create.3:211
4927 msgid ""
4928 "In the following run, on a system providing the NPTL threading "
4929 "implementation, the stack size defaults to the value given by the \"stack "
4930 "size\" resource limit:"
4931 msgstr ""
4932 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4933 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4934 "になる。"
4935
4936 #. type: Plain text
4937 #: build/C/man3/pthread_create.3:223
4938 #, fuzzy, no-wrap
4939 #| msgid ""
4940 #| "$B< ulimit -s>\n"
4941 #| "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4942 #| "$B< ./a.out hola salut servus>\n"
4943 #| "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4944 #| "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4945 #| "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4946 #| "Joined with thread 1; returned value was HOLA\n"
4947 #| "Joined with thread 2; returned value was SALUT\n"
4948 #| "Joined with thread 3; returned value was SERVUS\n"
4949 msgid ""
4950 "$B< ulimit -s>\n"
4951 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4952 "$B< ./a.out hola salut servus>\n"
4953 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4954 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4955 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4956 "Joined with thread 1; returned value was HOLA\n"
4957 "Joined with thread 2; returned value was SALUT\n"
4958 "Joined with thread 3; returned value was SERVUS\n"
4959 msgstr ""
4960 "$B< ulimit -s>\n"
4961 "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4962 "$B< ./a.out hola salut servus>\n"
4963 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4964 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4965 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4966 "Joined with thread 1; returned value was HOLA\n"
4967 "Joined with thread 2; returned value was SALUT\n"
4968 "Joined with thread 3; returned value was SERVUS\n"
4969
4970 #. type: Plain text
4971 #: build/C/man3/pthread_create.3:229
4972 msgid ""
4973 "In the next run, the program explicitly sets a stack size of 1MB (using "
4974 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4975 msgstr ""
4976 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4977 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4978 "明示的に設定している。"
4979
4980 #. type: Plain text
4981 #: build/C/man3/pthread_create.3:239
4982 #, no-wrap
4983 msgid ""
4984 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4985 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4986 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4987 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4988 "Joined with thread 1; returned value was HOLA\n"
4989 "Joined with thread 2; returned value was SALUT\n"
4990 "Joined with thread 3; returned value was SERVUS\n"
4991 msgstr ""
4992 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4993 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4994 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4995 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4996 "Joined with thread 1; returned value was HOLA\n"
4997 "Joined with thread 2; returned value was SALUT\n"
4998 "Joined with thread 3; returned value was SERVUS\n"
4999
5000 #. type: Plain text
5001 #: build/C/man3/pthread_create.3:251
5002 #, no-wrap
5003 msgid ""
5004 "#include E<lt>pthread.hE<gt>\n"
5005 "#include E<lt>string.hE<gt>\n"
5006 "#include E<lt>stdio.hE<gt>\n"
5007 "#include E<lt>stdlib.hE<gt>\n"
5008 "#include E<lt>unistd.hE<gt>\n"
5009 "#include E<lt>errno.hE<gt>\n"
5010 "#include E<lt>ctype.hE<gt>\n"
5011 msgstr ""
5012 "#include E<lt>pthread.hE<gt>\n"
5013 "#include E<lt>string.hE<gt>\n"
5014 "#include E<lt>stdio.hE<gt>\n"
5015 "#include E<lt>stdlib.hE<gt>\n"
5016 "#include E<lt>unistd.hE<gt>\n"
5017 "#include E<lt>errno.hE<gt>\n"
5018 "#include E<lt>ctype.hE<gt>\n"
5019
5020 #. type: Plain text
5021 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:110
5022 #, no-wrap
5023 msgid ""
5024 "#define handle_error(msg) \\e\n"
5025 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5026 msgstr ""
5027 "#define handle_error(msg) \\e\n"
5028 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5029
5030 #. type: Plain text
5031 #: build/C/man3/pthread_create.3:263
5032 #, no-wrap
5033 msgid ""
5034 "struct thread_info {    /* Used as argument to thread_start() */\n"
5035 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5036 "    int       thread_num;       /* Application-defined thread # */\n"
5037 "    char     *argv_string;      /* From command-line argument */\n"
5038 "};\n"
5039 msgstr ""
5040 "struct thread_info {    /* Used as argument to thread_start() */\n"
5041 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5042 "    int       thread_num;       /* Application-defined thread # */\n"
5043 "    char     *argv_string;      /* From command-line argument */\n"
5044 "};\n"
5045
5046 #. type: Plain text
5047 #: build/C/man3/pthread_create.3:266
5048 #, no-wrap
5049 msgid ""
5050 "/* Thread start function: display address near top of our stack,\n"
5051 "   and return upper-cased copy of argv_string */\n"
5052 msgstr ""
5053 "/* Thread start function: display address near top of our stack,\n"
5054 "   and return upper-cased copy of argv_string */\n"
5055
5056 #. type: Plain text
5057 #: build/C/man3/pthread_create.3:272
5058 #, no-wrap
5059 msgid ""
5060 "static void *\n"
5061 "thread_start(void *arg)\n"
5062 "{\n"
5063 "    struct thread_info *tinfo = arg;\n"
5064 "    char *uargv, *p;\n"
5065 msgstr ""
5066 "static void *\n"
5067 "thread_start(void *arg)\n"
5068 "{\n"
5069 "    struct thread_info *tinfo = arg;\n"
5070 "    char *uargv, *p;\n"
5071
5072 #. type: Plain text
5073 #: build/C/man3/pthread_create.3:275
5074 #, no-wrap
5075 msgid ""
5076 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5077 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5078 msgstr ""
5079 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5080 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5081
5082 #. type: Plain text
5083 #: build/C/man3/pthread_create.3:279
5084 #, no-wrap
5085 msgid ""
5086 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5087 "    if (uargv == NULL)\n"
5088 "        handle_error(\"strdup\");\n"
5089 msgstr ""
5090 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5091 "    if (uargv == NULL)\n"
5092 "        handle_error(\"strdup\");\n"
5093
5094 #. type: Plain text
5095 #: build/C/man3/pthread_create.3:282
5096 #, no-wrap
5097 msgid ""
5098 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5099 "        *p = toupper(*p);\n"
5100 msgstr ""
5101 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5102 "        *p = toupper(*p);\n"
5103
5104 #. type: Plain text
5105 #: build/C/man3/pthread_create.3:285
5106 #, no-wrap
5107 msgid ""
5108 "    return uargv;\n"
5109 "}\n"
5110 msgstr ""
5111 "    return uargv;\n"
5112 "}\n"
5113
5114 #. type: Plain text
5115 #: build/C/man3/pthread_create.3:294
5116 #, no-wrap
5117 msgid ""
5118 "int\n"
5119 "main(int argc, char *argv[])\n"
5120 "{\n"
5121 "    int s, tnum, opt, num_threads;\n"
5122 "    struct thread_info *tinfo;\n"
5123 "    pthread_attr_t attr;\n"
5124 "    int stack_size;\n"
5125 "    void *res;\n"
5126 msgstr ""
5127 "int\n"
5128 "main(int argc, char *argv[])\n"
5129 "{\n"
5130 "    int s, tnum, opt, num_threads;\n"
5131 "    struct thread_info *tinfo;\n"
5132 "    pthread_attr_t attr;\n"
5133 "    int stack_size;\n"
5134 "    void *res;\n"
5135
5136 #. type: Plain text
5137 #: build/C/man3/pthread_create.3:296
5138 #, no-wrap
5139 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5140 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5141
5142 #. type: Plain text
5143 #: build/C/man3/pthread_create.3:303
5144 #, no-wrap
5145 msgid ""
5146 "    stack_size = -1;\n"
5147 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5148 "        switch (opt) {\n"
5149 "        case \\(aqs\\(aq:\n"
5150 "            stack_size = strtoul(optarg, NULL, 0);\n"
5151 "            break;\n"
5152 msgstr ""
5153 "    stack_size = -1;\n"
5154 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5155 "        switch (opt) {\n"
5156 "        case \\(aqs\\(aq:\n"
5157 "            stack_size = strtoul(optarg, NULL, 0);\n"
5158 "            break;\n"
5159
5160 #. type: Plain text
5161 #: build/C/man3/pthread_create.3:310
5162 #, no-wrap
5163 msgid ""
5164 "        default:\n"
5165 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5166 "                    argv[0]);\n"
5167 "            exit(EXIT_FAILURE);\n"
5168 "        }\n"
5169 "    }\n"
5170 msgstr ""
5171 "        default:\n"
5172 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5173 "                    argv[0]);\n"
5174 "            exit(EXIT_FAILURE);\n"
5175 "        }\n"
5176 "    }\n"
5177
5178 #. type: Plain text
5179 #: build/C/man3/pthread_create.3:312
5180 #, no-wrap
5181 msgid "    num_threads = argc - optind;\n"
5182 msgstr "    num_threads = argc - optind;\n"
5183
5184 #. type: Plain text
5185 #: build/C/man3/pthread_create.3:314
5186 #, no-wrap
5187 msgid "    /* Initialize thread creation attributes */\n"
5188 msgstr "    /* Initialize thread creation attributes */\n"
5189
5190 #. type: Plain text
5191 #: build/C/man3/pthread_create.3:318
5192 #, no-wrap
5193 msgid ""
5194 "    s = pthread_attr_init(&attr);\n"
5195 "    if (s != 0)\n"
5196 "        handle_error_en(s, \"pthread_attr_init\");\n"
5197 msgstr ""
5198 "    s = pthread_attr_init(&attr);\n"
5199 "    if (s != 0)\n"
5200 "        handle_error_en(s, \"pthread_attr_init\");\n"
5201
5202 #. type: Plain text
5203 #: build/C/man3/pthread_create.3:324
5204 #, no-wrap
5205 msgid ""
5206 "    if (stack_size E<gt> 0) {\n"
5207 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5208 "        if (s != 0)\n"
5209 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5210 "    }\n"
5211 msgstr ""
5212 "    if (stack_size E<gt> 0) {\n"
5213 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5214 "        if (s != 0)\n"
5215 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5216 "    }\n"
5217
5218 #. type: Plain text
5219 #: build/C/man3/pthread_create.3:326
5220 #, no-wrap
5221 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5222 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5223
5224 #. type: Plain text
5225 #: build/C/man3/pthread_create.3:330
5226 #, no-wrap
5227 msgid ""
5228 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5229 "    if (tinfo == NULL)\n"
5230 "        handle_error(\"calloc\");\n"
5231 msgstr ""
5232 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5233 "    if (tinfo == NULL)\n"
5234 "        handle_error(\"calloc\");\n"
5235
5236 #. type: Plain text
5237 #: build/C/man3/pthread_create.3:332
5238 #, no-wrap
5239 msgid "    /* Create one thread for each command-line argument */\n"
5240 msgstr "    /* Create one thread for each command-line argument */\n"
5241
5242 #. type: Plain text
5243 #: build/C/man3/pthread_create.3:336
5244 #, no-wrap
5245 msgid ""
5246 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5247 "        tinfo[tnum].thread_num = tnum + 1;\n"
5248 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5249 msgstr ""
5250 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5251 "        tinfo[tnum].thread_num = tnum + 1;\n"
5252 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5253
5254 #. type: Plain text
5255 #: build/C/man3/pthread_create.3:339
5256 #, no-wrap
5257 msgid ""
5258 "        /* The pthread_create() call stores the thread ID into\n"
5259 "           corresponding element of tinfo[] */\n"
5260 msgstr ""
5261 "        /* The pthread_create() call stores the thread ID into\n"
5262 "           corresponding element of tinfo[] */\n"
5263
5264 #. type: Plain text
5265 #: build/C/man3/pthread_create.3:345
5266 #, no-wrap
5267 msgid ""
5268 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5269 "                           &thread_start, &tinfo[tnum]);\n"
5270 "        if (s != 0)\n"
5271 "            handle_error_en(s, \"pthread_create\");\n"
5272 "    }\n"
5273 msgstr ""
5274 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5275 "                           &thread_start, &tinfo[tnum]);\n"
5276 "        if (s != 0)\n"
5277 "            handle_error_en(s, \"pthread_create\");\n"
5278 "    }\n"
5279
5280 #. type: Plain text
5281 #: build/C/man3/pthread_create.3:348
5282 #, no-wrap
5283 msgid ""
5284 "    /* Destroy the thread attributes object, since it is no\n"
5285 "       longer needed */\n"
5286 msgstr ""
5287 "    /* Destroy the thread attributes object, since it is no\n"
5288 "       longer needed */\n"
5289
5290 #. type: Plain text
5291 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5292 #, no-wrap
5293 msgid ""
5294 "    s = pthread_attr_destroy(&attr);\n"
5295 "    if (s != 0)\n"
5296 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5297 msgstr ""
5298 "    s = pthread_attr_destroy(&attr);\n"
5299 "    if (s != 0)\n"
5300 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5301
5302 #. type: Plain text
5303 #: build/C/man3/pthread_create.3:354
5304 #, no-wrap
5305 msgid "    /* Now join with each thread, and display its returned value */\n"
5306 msgstr "    /* Now join with each thread, and display its returned value */\n"
5307
5308 #. type: Plain text
5309 #: build/C/man3/pthread_create.3:359
5310 #, no-wrap
5311 msgid ""
5312 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5313 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5314 "        if (s != 0)\n"
5315 "            handle_error_en(s, \"pthread_join\");\n"
5316 msgstr ""
5317 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5318 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5319 "        if (s != 0)\n"
5320 "            handle_error_en(s, \"pthread_join\");\n"
5321
5322 #. type: Plain text
5323 #: build/C/man3/pthread_create.3:364
5324 #, no-wrap
5325 msgid ""
5326 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5327 "                tinfo[tnum].thread_num, (char *) res);\n"
5328 "        free(res);      /* Free memory allocated by thread */\n"
5329 "    }\n"
5330 msgstr ""
5331 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5332 "                tinfo[tnum].thread_num, (char *) res);\n"
5333 "        free(res);      /* Free memory allocated by thread */\n"
5334 "    }\n"
5335
5336 #. type: Plain text
5337 #: build/C/man3/pthread_create.3:368
5338 #, no-wrap
5339 msgid ""
5340 "    free(tinfo);\n"
5341 "    exit(EXIT_SUCCESS);\n"
5342 "}\n"
5343 msgstr ""
5344 "    free(tinfo);\n"
5345 "    exit(EXIT_SUCCESS);\n"
5346 "}\n"
5347
5348 #. type: Plain text
5349 #: build/C/man3/pthread_create.3:382
5350 msgid ""
5351 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5352 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5353 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5354 "(7)"
5355 msgstr ""
5356 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5357 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5358 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5359 "(7)"
5360
5361 #. type: TH
5362 #: build/C/man3/pthread_detach.3:26
5363 #, no-wrap
5364 msgid "PTHREAD_DETACH"
5365 msgstr "PTHREAD_DETACH"
5366
5367 #. type: TH
5368 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5369 #, no-wrap
5370 msgid "2008-11-27"
5371 msgstr "2008-11-27"
5372
5373 #. type: Plain text
5374 #: build/C/man3/pthread_detach.3:29
5375 msgid "pthread_detach - detach a thread"
5376 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5377
5378 #. type: Plain text
5379 #: build/C/man3/pthread_detach.3:34
5380 #, no-wrap
5381 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5382 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5383
5384 #. type: Plain text
5385 #: build/C/man3/pthread_detach.3:46
5386 msgid ""
5387 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5388 "as detached.  When a detached thread terminates, its resources are "
5389 "automatically released back to the system without the need for another "
5390 "thread to join with the terminated thread."
5391 msgstr ""
5392 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5393 "detached (切り離された状態) という印を付ける。\n"
5394 "detached 状態のスレッドが終了すると、\n"
5395 "別のスレッドが終了されたスレッドを join しなくても、\n"
5396 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5397
5398 #. type: Plain text
5399 #: build/C/man3/pthread_detach.3:49
5400 msgid ""
5401 "Attempting to detach an already detached thread results in unspecified "
5402 "behavior."
5403 msgstr ""
5404 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5405 "どのような結果となるかは規定されていない。"
5406
5407 #. type: Plain text
5408 #: build/C/man3/pthread_detach.3:54
5409 msgid ""
5410 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5411 "number."
5412 msgstr ""
5413 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5414 "エラーの場合、エラー番号を返す。"
5415
5416 #. type: Plain text
5417 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5418 msgid "I<thread> is not a joinable thread."
5419 msgstr "I<thread> が join 可能なスレッドではない。"
5420
5421 #. type: Plain text
5422 #: build/C/man3/pthread_detach.3:70
5423 msgid ""
5424 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5425 "or be made joinable again."
5426 msgstr ""
5427 "いったんスレッドを detached 状態にすると、\n"
5428 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5429 "もう一度 join 可能にしたりすることはできない。"
5430
5431 #. type: Plain text
5432 #: build/C/man3/pthread_detach.3:77
5433 msgid ""
5434 "A new thread can be created in a detached state using "
5435 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5436 "I<attr> argument of B<pthread_create>(3)."
5437 msgstr ""
5438 "B<pthread_attr_setdetachstate>(3) を使って\n"
5439 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5440 "新しいスレッドを detached 状態で作成することができる。"
5441
5442 #. type: Plain text
5443 #: build/C/man3/pthread_detach.3:84
5444 msgid ""
5445 "The detached attribute merely determines the behavior of the system when the "
5446 "thread terminates; it does not prevent the thread from being terminated if "
5447 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5448 "thread returns)."
5449 msgstr ""
5450 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5451 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5452 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5453 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5454
5455 #. type: Plain text
5456 #: build/C/man3/pthread_detach.3:93
5457 msgid ""
5458 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5459 "thread that an application creates, so that system resources for the thread "
5460 "can be released.  (But note that the resources of all threads are freed when "
5461 "the process terminates.)"
5462 msgstr ""
5463 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5464 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5465 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5466 "終了するときには、全てのスレッドのリソースが解放される)。"
5467
5468 #. type: Plain text
5469 #: build/C/man3/pthread_detach.3:95
5470 msgid "The following statement detaches the calling thread:"
5471 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5472
5473 #. type: Plain text
5474 #: build/C/man3/pthread_detach.3:97
5475 #, no-wrap
5476 msgid "    pthread_detach(pthread_self());\n"
5477 msgstr "    pthread_detach(pthread_self());\n"
5478
5479 #. type: Plain text
5480 #: build/C/man3/pthread_detach.3:104
5481 msgid ""
5482 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5483 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5484 msgstr ""
5485 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5486 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5487
5488 #. type: TH
5489 #: build/C/man3/pthread_equal.3:26
5490 #, no-wrap
5491 msgid "PTHREAD_EQUAL"
5492 msgstr "PTHREAD_EQUAL"
5493
5494 #. type: TH
5495 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5496 #, no-wrap
5497 msgid "2009-03-30"
5498 msgstr "2009-03-30"
5499
5500 #. type: Plain text
5501 #: build/C/man3/pthread_equal.3:29
5502 msgid "pthread_equal - compare thread IDs"
5503 msgstr "pthread_equal - スレッド ID を比較する"
5504
5505 #. type: Plain text
5506 #: build/C/man3/pthread_equal.3:34
5507 #, no-wrap
5508 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5509 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5510
5511 #. type: Plain text
5512 #: build/C/man3/pthread_equal.3:41
5513 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5514 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5515
5516 #. type: Plain text
5517 #: build/C/man3/pthread_equal.3:45
5518 msgid ""
5519 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5520 "value; otherwise, it returns 0."
5521 msgstr ""
5522 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5523 "そうでなければ 0 を返す。"
5524
5525 #.  SH VERSIONS
5526 #.  Available since glibc 2.0
5527 #. type: Plain text
5528 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5529 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5530 msgid "This function always succeeds."
5531 msgstr "この関数は常に成功する。"
5532
5533 #. type: Plain text
5534 #: build/C/man3/pthread_equal.3:56
5535 msgid ""
5536 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5537 "considered opaque: there is no portable way for applications to directly "
5538 "compare two I<pthread_t> values."
5539 msgstr ""
5540 "B<pthread_equal>() 関数が必要なのは、\n"
5541 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5542 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5543 "移植性を確保できる形で比較する方法はない。"
5544
5545 #. type: Plain text
5546 #: build/C/man3/pthread_equal.3:60
5547 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5548 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5549
5550 #. type: TH
5551 #: build/C/man3/pthread_exit.3:26
5552 #, no-wrap
5553 msgid "PTHREAD_EXIT"
5554 msgstr "PTHREAD_EXIT"
5555
5556 #. type: Plain text
5557 #: build/C/man3/pthread_exit.3:29
5558 msgid "pthread_exit - terminate calling thread"
5559 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5560
5561 #. type: Plain text
5562 #: build/C/man3/pthread_exit.3:34
5563 #, no-wrap
5564 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5565 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5566
5567 #. type: Plain text
5568 #: build/C/man3/pthread_exit.3:45
5569 msgid ""
5570 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5571 "value via I<retval> that (if the thread is joinable)  is available to "
5572 "another thread in the same process that calls B<pthread_join>(3)."
5573 msgstr ""
5574 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5575 "I<retval> 経由で値を返す。\n"
5576 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5577 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5578
5579 #. type: Plain text
5580 #: build/C/man3/pthread_exit.3:55
5581 msgid ""
5582 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5583 "not yet been popped, are popped (in the reverse of the order in which they "
5584 "were pushed)  and executed.  If the thread has any thread-specific data, "
5585 "then, after the clean-up handlers have been executed, the corresponding "
5586 "destructor functions are called, in an unspecified order."
5587 msgstr ""
5588 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5589 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5590 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5591 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5592 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5593 "は規定されていない)。"
5594
5595 #. type: Plain text
5596 #: build/C/man3/pthread_exit.3:62
5597 msgid ""
5598 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5599 "variables, semaphores, and file descriptors) are not released, and functions "
5600 "registered using B<atexit>(3)  are not called."
5601 msgstr ""
5602 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5603 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5604 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5605
5606 #. type: Plain text
5607 #: build/C/man3/pthread_exit.3:71
5608 msgid ""
5609 "After the last thread in a process terminates, the process terminates as by "
5610 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5611 "resources are released and functions registered using B<atexit>(3)  are "
5612 "called."
5613 msgstr ""
5614 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5615 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5616 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5617 "が呼び出される。"
5618
5619 #. type: Plain text
5620 #: build/C/man3/pthread_exit.3:73
5621 msgid "This function does not return to the caller."
5622 msgstr "この関数は呼び出し側には返らない。"
5623
5624 #. type: Plain text
5625 #: build/C/man3/pthread_exit.3:82
5626 msgid ""
5627 "Performing a return from the start function of any thread other than the "
5628 "main thread results in an implicit call to B<pthread_exit>(), using the "
5629 "function's return value as the thread's exit status."
5630 msgstr ""
5631 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5632 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5633 "関数の返り値がスレッドの終了ステータスとして使用される。"
5634
5635 #. type: Plain text
5636 #: build/C/man3/pthread_exit.3:88
5637 msgid ""
5638 "To allow other threads to continue execution, the main thread should "
5639 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5640 msgstr ""
5641 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5642 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5643
5644 #. type: Plain text
5645 #: build/C/man3/pthread_exit.3:93
5646 msgid ""
5647 "The value pointed to by I<retval> should not be located on the calling "
5648 "thread's stack, since the contents of that stack are undefined after the "
5649 "thread terminates."
5650 msgstr ""
5651 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5652 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5653 "である。"
5654
5655 #.  Linux 2.6.27
5656 #.  FIXME . review a later kernel to see if this gets fixed
5657 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5658 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5659 #. type: Plain text
5660 #: build/C/man3/pthread_exit.3:105
5661 msgid ""
5662 "Currently, there are limitations in the kernel implementation logic for "
5663 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5664 "This can manifest in problems such as a locked terminal if a stop signal is "
5665 "sent to a foreground process whose thread group leader has already called "
5666 "B<pthread_exit>()."
5667 msgstr ""
5668 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5669 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5670 "カーネル実装の論理には制限がある。\n"
5671 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5672 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5673 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5674 "場合がある。"
5675
5676 #. type: Plain text
5677 #: build/C/man3/pthread_exit.3:109
5678 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5679 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5680
5681 #. type: TH
5682 #: build/C/man3/pthread_getattr_np.3:26
5683 #, no-wrap
5684 msgid "PTHREAD_GETATTR_NP"
5685 msgstr "PTHREAD_GETATTR_NP"
5686
5687 #. type: Plain text
5688 #: build/C/man3/pthread_getattr_np.3:29
5689 msgid "pthread_getattr_np - get attributes of created thread"
5690 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5691
5692 #. type: Plain text
5693 #: build/C/man3/pthread_getattr_np.3:35
5694 #, no-wrap
5695 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5696 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5697
5698 #. type: Plain text
5699 #: build/C/man3/pthread_getattr_np.3:45
5700 msgid ""
5701 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5702 "object referred to by I<attr> so that it contains actual attribute values "
5703 "describing the running thread I<thread>."
5704 msgstr ""
5705 "B<pthread_getattr_np>() 関数は、\n"
5706 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5707 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5708 "格納して返す。"
5709
5710 #. type: Plain text
5711 #: build/C/man3/pthread_getattr_np.3:52
5712 msgid ""
5713 "The returned attribute values may differ from the corresponding attribute "
5714 "values passed in the I<attr> object that was used to create the thread using "
5715 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5716 msgstr ""
5717 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5718 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5719 "特に、以下の属性は異なる場合がある。"
5720
5721 #. type: Plain text
5722 #: build/C/man3/pthread_getattr_np.3:55
5723 msgid ""
5724 "the detach state, since a joinable thread may have detached itself after "
5725 "creation;"
5726 msgstr ""
5727 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5728 "切り離す (detach する) ことができるからである。"
5729
5730 #. type: Plain text
5731 #: build/C/man3/pthread_getattr_np.3:58
5732 msgid ""
5733 "the stack size, which the implementation may align to a suitable boundary."
5734 msgstr ""
5735 "スタックサイズ。\n"
5736 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5737
5738 #. type: Plain text
5739 #: build/C/man3/pthread_getattr_np.3:63
5740 msgid ""
5741 "and the guard size, which the implementation may round upward to a multiple "
5742 "of the page size, or ignore (i.e., treat as 0), if the application is "
5743 "allocating its own stack."
5744 msgstr ""
5745 "guard size.\n"
5746 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5747 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5748 "(0 として扱われる) ことがあるからである。"
5749
5750 #. type: Plain text
5751 #: build/C/man3/pthread_getattr_np.3:68
5752 msgid ""
5753 "Furthermore, if the stack address attribute was not set in the thread "
5754 "attributes object used to create the thread, then the returned thread "
5755 "attributes object will report the actual stack address that the "
5756 "implementation selected for the thread."
5757 msgstr ""
5758 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5759 "スタックアドレスが設定されていなかった場合、\n"
5760 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5761 "割り当てた実際のスタックアドレスが報告される。"
5762
5763 #. type: Plain text
5764 #: build/C/man3/pthread_getattr_np.3:73
5765 msgid ""
5766 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5767 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5768 msgstr ""
5769 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5770 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5771 "そのオブジェクトを破棄すべきである。"
5772
5773 #. type: Plain text
5774 #: build/C/man3/pthread_getattr_np.3:76
5775 #: build/C/man3/pthread_getcpuclockid.3:49
5776 msgid ""
5777 "On success, this function returns 0; on error, it returns a nonzero error "
5778 "number."
5779 msgstr ""
5780 "成功すると、この関数は 0 を返す。\n"
5781 "エラーの場合、 0 以外のエラー番号を返す。"
5782
5783 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5784 #. type: Plain text
5785 #: build/C/man3/pthread_getattr_np.3:81
5786 msgid "Insufficient memory."
5787 msgstr "メモリが十分になかった。"
5788
5789 #. type: Plain text
5790 #: build/C/man3/pthread_getattr_np.3:96
5791 msgid ""
5792 "In addition, if I<thread> refers to the main thread, then "
5793 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5794 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5795 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5796 msgstr ""
5797 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5798 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5799 "エラーで失敗する可能性がある。\n"
5800 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5801 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5802 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5803
5804 #. type: Plain text
5805 #: build/C/man3/pthread_getattr_np.3:98
5806 msgid "This function is available in glibc since version 2.2.3."
5807 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5808
5809 #. type: Plain text
5810 #: build/C/man3/pthread_getattr_np.3:101
5811 #: build/C/man3/pthread_kill_other_threads_np.3:50
5812 msgid ""
5813 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5814 "\" (nonportable) in the name."
5815 msgstr ""
5816 "この関数は非標準の GNU による拡張である。\n"
5817 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5818 "付いている。"
5819
5820 #. type: Plain text
5821 #: build/C/man3/pthread_getattr_np.3:111
5822 msgid ""
5823 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5824 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5825 "and display its guard size, stack address, and stack size attributes.  "
5826 "Command-line arguments can be used to set these attributes to values other "
5827 "than the default when creating the thread.  The shell sessions below "
5828 "demonstrate the use of the program."
5829 msgstr ""
5830 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5831 "このプログラムは、スレッドを作成し、それから\n"
5832 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5833 "スタックアドレス、スタックサイズを取得し表示する。\n"
5834 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5835 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5836 "下記のシェルのセッションはこのプログラムの使用例である。"
5837
5838 #. type: Plain text
5839 #: build/C/man3/pthread_getattr_np.3:114
5840 msgid ""
5841 "In the first run, on an x86-32 system, a thread is created using default "
5842 "attributes:"
5843 msgstr ""
5844 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5845 "(x86-32 システム上で実行)。"
5846
5847 #. type: Plain text
5848 #: build/C/man3/pthread_getattr_np.3:124
5849 #, no-wrap
5850 msgid ""
5851 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5852 "unlimited\n"
5853 "$B< ./a.out>\n"
5854 "Attributes of created thread:\n"
5855 "        Guard size          = 4096 bytes\n"
5856 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5857 "        Stack size          = 0x201000 (2101248) bytes\n"
5858 msgstr ""
5859 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5860 "unlimited\n"
5861 "$B< ./a.out>\n"
5862 "Attributes of created thread:\n"
5863 "        Guard size          = 4096 bytes\n"
5864 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5865 "        Stack size          = 0x201000 (2101248) bytes\n"
5866
5867 #. type: Plain text
5868 #: build/C/man3/pthread_getattr_np.3:130
5869 msgid ""
5870 "In the following run, we see that if a guard size is specified, it is "
5871 "rounded up to the next multiple of the system page size (4096 bytes on "
5872 "x86-32):"
5873 msgstr ""
5874 "次の実行例では、guard size が指定された場合、\n"
5875 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5876 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5877
5878 #. type: Plain text
5879 #: build/C/man3/pthread_getattr_np.3:138
5880 #, no-wrap
5881 msgid ""
5882 "$B< ./a.out -g 4097>\n"
5883 "Thread attributes object after initializations:\n"
5884 "        Guard size          = 4097 bytes\n"
5885 "        Stack address       = (nil)\n"
5886 "        Stack size          = 0x0 (0) bytes\n"
5887 msgstr ""
5888 "$B< ./a.out -g 4097>\n"
5889 "Thread attributes object after initializations:\n"
5890 "        Guard size          = 4097 bytes\n"
5891 "        Stack address       = (nil)\n"
5892 "        Stack size          = 0x0 (0) bytes\n"
5893
5894 #. type: Plain text
5895 #: build/C/man3/pthread_getattr_np.3:143
5896 #, no-wrap
5897 msgid ""
5898 "Attributes of created thread:\n"
5899 "        Guard size          = 8192 bytes\n"
5900 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5901 "        Stack size          = 0x201000 (2101248) bytes\n"
5902 msgstr ""
5903 "Attributes of created thread:\n"
5904 "        Guard size          = 8192 bytes\n"
5905 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5906 "        Stack size          = 0x201000 (2101248) bytes\n"
5907
5908 #. .in +4n
5909 #. .nf
5910 #. $ ./a.out \-s 0x8000
5911 #. Thread attributes object after initializations:
5912 #.         Guard size          = 4096 bytes
5913 #.         Stack address       = 0xffff8000 (EOS = (nil))
5914 #.         Stack size          = 0x8000 (32768) bytes
5915 #. Attributes of created thread:
5916 #.         Guard size          = 4096 bytes
5917 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5918 #.         Stack size          = 0x8000 (32768) bytes
5919 #. .fi
5920 #. .in
5921 #. type: Plain text
5922 #: build/C/man3/pthread_getattr_np.3:162
5923 msgid ""
5924 "In the last run, the program manually allocates a stack for the thread.  In "
5925 "this case, the guard size attribute is ignored."
5926 msgstr ""
5927 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5928 "この場合には、guard size 属性は無視される。"
5929
5930 #. type: Plain text
5931 #: build/C/man3/pthread_getattr_np.3:167
5932 #, no-wrap
5933 msgid ""
5934 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5935 "Allocated thread stack at 0x804d000\n"
5936 msgstr ""
5937 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5938 "Allocated thread stack at 0x804d000\n"
5939
5940 #. type: Plain text
5941 #: build/C/man3/pthread_getattr_np.3:172
5942 #, no-wrap
5943 msgid ""
5944 "Thread attributes object after initializations:\n"
5945 "        Guard size          = 4096 bytes\n"
5946 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5947 "        Stack size          = 0x8000 (32768) bytes\n"
5948 msgstr ""
5949 "Thread attributes object after initializations:\n"
5950 "        Guard size          = 4096 bytes\n"
5951 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5952 "        Stack size          = 0x8000 (32768) bytes\n"
5953
5954 #. type: Plain text
5955 #: build/C/man3/pthread_getattr_np.3:177
5956 #, no-wrap
5957 msgid ""
5958 "Attributes of created thread:\n"
5959 "        Guard size          = 0 bytes\n"
5960 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5961 "        Stack size          = 0x8000 (32768) bytes\n"
5962 msgstr ""
5963 "Attributes of created thread:\n"
5964 "        Guard size          = 0 bytes\n"
5965 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5966 "        Stack size          = 0x8000 (32768) bytes\n"
5967
5968 #. type: Plain text
5969 #: build/C/man3/pthread_getattr_np.3:198
5970 #, no-wrap
5971 msgid ""
5972 "static void\n"
5973 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5974 "{\n"
5975 "    int s;\n"
5976 "    size_t stack_size, guard_size;\n"
5977 "    void *stack_addr;\n"
5978 msgstr ""
5979 "static void\n"
5980 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5981 "{\n"
5982 "    int s;\n"
5983 "    size_t stack_size, guard_size;\n"
5984 "    void *stack_addr;\n"
5985
5986 #. type: Plain text
5987 #: build/C/man3/pthread_getattr_np.3:203
5988 #, no-wrap
5989 msgid ""
5990 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5991 "    if (s != 0)\n"
5992 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5993 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5994 msgstr ""
5995 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5996 "    if (s != 0)\n"
5997 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5998 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5999
6000 #. type: Plain text
6001 #: build/C/man3/pthread_getattr_np.3:214
6002 #, no-wrap
6003 msgid ""
6004 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
6005 "    if (s != 0)\n"
6006 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
6007 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
6008 "    if (stack_size E<gt> 0)\n"
6009 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
6010 "    printf(\"\\en\");\n"
6011 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
6012 "            prefix, stack_size, stack_size);\n"
6013 "}\n"
6014 msgstr ""
6015 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
6016 "    if (s != 0)\n"
6017 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
6018 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
6019 "    if (stack_size E<gt> 0)\n"
6020 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
6021 "    printf(\"\\en\");\n"
6022 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
6023 "            prefix, stack_size, stack_size);\n"
6024 "}\n"
6025
6026 #. type: Plain text
6027 #: build/C/man3/pthread_getattr_np.3:220
6028 #, no-wrap
6029 msgid ""
6030 "static void\n"
6031 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6032 "{\n"
6033 "    int s;\n"
6034 "    pthread_attr_t attr;\n"
6035 msgstr ""
6036 "static void\n"
6037 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6038 "{\n"
6039 "    int s;\n"
6040 "    pthread_attr_t attr;\n"
6041
6042 #. type: Plain text
6043 #: build/C/man3/pthread_getattr_np.3:224
6044 #, no-wrap
6045 msgid ""
6046 "    s = pthread_getattr_np(thread, &attr);\n"
6047 "    if (s != 0)\n"
6048 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6049 msgstr ""
6050 "    s = pthread_getattr_np(thread, &attr);\n"
6051 "    if (s != 0)\n"
6052 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6053
6054 #. type: Plain text
6055 #: build/C/man3/pthread_getattr_np.3:226
6056 #, no-wrap
6057 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6058 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6059
6060 #. type: Plain text
6061 #: build/C/man3/pthread_getattr_np.3:231
6062 #, no-wrap
6063 msgid ""
6064 "    s = pthread_attr_destroy(&attr);\n"
6065 "    if (s != 0)\n"
6066 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6067 "}\n"
6068 msgstr ""
6069 "    s = pthread_attr_destroy(&attr);\n"
6070 "    if (s != 0)\n"
6071 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6072 "}\n"
6073
6074 #. type: Plain text
6075 #: build/C/man3/pthread_getattr_np.3:237
6076 #, no-wrap
6077 msgid ""
6078 "static void *           /* Start function for thread we create */\n"
6079 "thread_start(void *arg)\n"
6080 "{\n"
6081 "    printf(\"Attributes of created thread:\\en\");\n"
6082 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6083 msgstr ""
6084 "static void *           /* Start function for thread we create */\n"
6085 "thread_start(void *arg)\n"
6086 "{\n"
6087 "    printf(\"Attributes of created thread:\\en\");\n"
6088 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6089
6090 #. type: Plain text
6091 #: build/C/man3/pthread_getattr_np.3:251
6092 #, no-wrap
6093 msgid ""
6094 "static void\n"
6095 "usage(char *pname, char *msg)\n"
6096 "{\n"
6097 "    if (msg != NULL)\n"
6098 "        fputs(msg, stderr);\n"
6099 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6100 "            \" [-g guard-size]\\en\", pname);\n"
6101 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6102 "    exit(EXIT_FAILURE);\n"
6103 "}\n"
6104 msgstr ""
6105 "static void\n"
6106 "usage(char *pname, char *msg)\n"
6107 "{\n"
6108 "    if (msg != NULL)\n"
6109 "        fputs(msg, stderr);\n"
6110 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6111 "            \" [-g guard-size]\\en\", pname);\n"
6112 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6113 "    exit(EXIT_FAILURE);\n"
6114 "}\n"
6115
6116 #. type: Plain text
6117 #: build/C/man3/pthread_getattr_np.3:264
6118 #, no-wrap
6119 msgid ""
6120 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6121 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6122 "                              pthread_attr_t *attrp)\n"
6123 "{\n"
6124 "    int s, opt, allocate_stack;\n"
6125 "    long stack_size, guard_size;\n"
6126 "            void *stack_addr;\n"
6127 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6128 "                                           a thread attributes object */\n"
6129 "    allocate_stack = 0;\n"
6130 "    stack_size = -1;\n"
6131 "    guard_size = -1;\n"
6132 msgstr ""
6133 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6134 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6135 "                              pthread_attr_t *attrp)\n"
6136 "{\n"
6137 "    int s, opt, allocate_stack;\n"
6138 "    long stack_size, guard_size;\n"
6139 "            void *stack_addr;\n"
6140 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6141 "                                           a thread attributes object */\n"
6142 "    allocate_stack = 0;\n"
6143 "    stack_size = -1;\n"
6144 "    guard_size = -1;\n"
6145
6146 #. type: Plain text
6147 #: build/C/man3/pthread_getattr_np.3:273
6148 #, no-wrap
6149 msgid ""
6150 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6151 "        switch (opt) {\n"
6152 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6153 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6154 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6155 "        default:    usage(argv[0], NULL);\n"
6156 "        }\n"
6157 "    }\n"
6158 msgstr ""
6159 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6160 "        switch (opt) {\n"
6161 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6162 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6163 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6164 "        default:    usage(argv[0], NULL);\n"
6165 "        }\n"
6166 "    }\n"
6167
6168 #. type: Plain text
6169 #: build/C/man3/pthread_getattr_np.3:276
6170 #, no-wrap
6171 msgid ""
6172 "    if (allocate_stack && stack_size == -1)\n"
6173 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6174 msgstr ""
6175 "    if (allocate_stack && stack_size == -1)\n"
6176 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6177
6178 #. type: Plain text
6179 #: build/C/man3/pthread_getattr_np.3:279
6180 #, no-wrap
6181 msgid ""
6182 "    if (argc E<gt> optind)\n"
6183 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6184 msgstr ""
6185 "    if (argc E<gt> optind)\n"
6186 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6187
6188 #. type: Plain text
6189 #: build/C/man3/pthread_getattr_np.3:282
6190 #, no-wrap
6191 msgid ""
6192 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6193 "        ret_attrp = attrp;\n"
6194 msgstr ""
6195 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6196 "        ret_attrp = attrp;\n"
6197
6198 #. type: Plain text
6199 #: build/C/man3/pthread_getattr_np.3:287
6200 #, no-wrap
6201 msgid ""
6202 "        s = pthread_attr_init(attrp);\n"
6203 "        if (s != 0)\n"
6204 "            handle_error_en(s, \"pthread_attr_init\");\n"
6205 "    }\n"
6206 msgstr ""
6207 "        s = pthread_attr_init(attrp);\n"
6208 "        if (s != 0)\n"
6209 "            handle_error_en(s, \"pthread_attr_init\");\n"
6210 "    }\n"
6211
6212 #. type: Plain text
6213 #: build/C/man3/pthread_getattr_np.3:299
6214 #, no-wrap
6215 msgid ""
6216 "    if (stack_size E<gt>= 0) {\n"
6217 "        if (!allocate_stack) {\n"
6218 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6219 "            if (s != 0)\n"
6220 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6221 "        } else {\n"
6222 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6223 "                               stack_size);\n"
6224 "            if (s != 0)\n"
6225 "                handle_error_en(s, \"posix_memalign\");\n"
6226 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6227 msgstr ""
6228 "    if (stack_size E<gt>= 0) {\n"
6229 "        if (!allocate_stack) {\n"
6230 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6231 "            if (s != 0)\n"
6232 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6233 "        } else {\n"
6234 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6235 "                               stack_size);\n"
6236 "            if (s != 0)\n"
6237 "                handle_error_en(s, \"posix_memalign\");\n"
6238 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6239
6240 #. type: Plain text
6241 #: build/C/man3/pthread_getattr_np.3:305
6242 #, no-wrap
6243 msgid ""
6244 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6245 "            if (s != 0)\n"
6246 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6247 "        }\n"
6248 "    }\n"
6249 msgstr ""
6250 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6251 "            if (s != 0)\n"
6252 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6253 "        }\n"
6254 "    }\n"
6255
6256 #. type: Plain text
6257 #: build/C/man3/pthread_getattr_np.3:311
6258 #, no-wrap
6259 msgid ""
6260 "    if (guard_size E<gt>= 0) {\n"
6261 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6262 "        if (s != 0)\n"
6263 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6264 "    }\n"
6265 msgstr ""
6266 "    if (guard_size E<gt>= 0) {\n"
6267 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6268 "        if (s != 0)\n"
6269 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6270 "    }\n"
6271
6272 #. type: Plain text
6273 #: build/C/man3/pthread_getattr_np.3:314
6274 #, no-wrap
6275 msgid ""
6276 "    return ret_attrp;\n"
6277 "}\n"
6278 msgstr ""
6279 "    return ret_attrp;\n"
6280 "}\n"
6281
6282 #. type: Plain text
6283 #: build/C/man3/pthread_getattr_np.3:323
6284 #, no-wrap
6285 msgid ""
6286 "int\n"
6287 "main(int argc, char *argv[])\n"
6288 "{\n"
6289 "    int s;\n"
6290 "    pthread_t thr;\n"
6291 "    pthread_attr_t attr;\n"
6292 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6293 "                                        a thread attributes object */\n"
6294 msgstr ""
6295 "int\n"
6296 "main(int argc, char *argv[])\n"
6297 "{\n"
6298 "    int s;\n"
6299 "    pthread_t thr;\n"
6300 "    pthread_attr_t attr;\n"
6301 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6302 "                                        a thread attributes object */\n"
6303
6304 #. type: Plain text
6305 #: build/C/man3/pthread_getattr_np.3:325
6306 #, no-wrap
6307 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6308 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6309
6310 #. type: Plain text
6311 #: build/C/man3/pthread_getattr_np.3:331
6312 #, no-wrap
6313 msgid ""
6314 "    if (attrp != NULL) {\n"
6315 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6316 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6317 "        printf(\"\\en\");\n"
6318 "    }\n"
6319 msgstr ""
6320 "    if (attrp != NULL) {\n"
6321 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6322 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6323 "        printf(\"\\en\");\n"
6324 "    }\n"
6325
6326 #. type: Plain text
6327 #: build/C/man3/pthread_getattr_np.3:361
6328 msgid ""
6329 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6330 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6331 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6332 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6333 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6334 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6335 msgstr ""
6336 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6337 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6338 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6339 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6340 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6341 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6342
6343 #. type: TH
6344 #: build/C/man3/pthread_getcpuclockid.3:26
6345 #, no-wrap
6346 msgid "PTHREAD_GETCPUCLOCKID"
6347 msgstr "PTHREAD_GETCPUCLOCKID"
6348
6349 #. type: TH
6350 #: build/C/man3/pthread_getcpuclockid.3:26
6351 #, no-wrap
6352 msgid "2009-02-08"
6353 msgstr "2009-02-08"
6354
6355 #. type: Plain text
6356 #: build/C/man3/pthread_getcpuclockid.3:29
6357 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6358 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6359
6360 #. type: Plain text
6361 #: build/C/man3/pthread_getcpuclockid.3:33
6362 #, no-wrap
6363 msgid ""
6364 "B<#include E<lt>pthread.hE<gt>>\n"
6365 "B<#include E<lt>time.hE<gt>>\n"
6366 msgstr ""
6367 "B<#include E<lt>pthread.hE<gt>>\n"
6368 "B<#include E<lt>time.hE<gt>>\n"
6369
6370 #. type: Plain text
6371 #: build/C/man3/pthread_getcpuclockid.3:35
6372 #, no-wrap
6373 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6374 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6375
6376 #.  The clockid is constructed as follows:
6377 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6378 #.  where CLOCK_IDFIELD_SIZE is 3.
6379 #. type: Plain text
6380 #: build/C/man3/pthread_getcpuclockid.3:46
6381 msgid ""
6382 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6383 "time clock of the thread I<thread>."
6384 msgstr ""
6385 "B<pthread_getcpuclockid>() 関数は、\n"
6386 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6387
6388 #. type: TP
6389 #: build/C/man3/pthread_getcpuclockid.3:50
6390 #, no-wrap
6391 msgid "B<ENOENT>"
6392 msgstr "B<ENOENT>"
6393
6394 #.  CLOCK_THREAD_CPUTIME_ID not defined
6395 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6396 #.  be possible if kernel thread IDs took more than 29 bits (which
6397 #.  they currently cannot).
6398 #. type: Plain text
6399 #: build/C/man3/pthread_getcpuclockid.3:58
6400 msgid "Per-thread CPU time clocks are not supported by the system."
6401 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6402
6403 #. type: Plain text
6404 #: build/C/man3/pthread_getcpuclockid.3:65
6405 msgid "This function is available in glibc since version 2.2."
6406 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6407
6408 #. type: Plain text
6409 #: build/C/man3/pthread_getcpuclockid.3:78
6410 msgid ""
6411 "When I<thread> refers to the calling thread, this function returns an "
6412 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6413 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6414 msgstr ""
6415 "I<thread> が呼び出したスレッドを参照している場合、\n"
6416 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6417 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6418 "を参照する ID が返される。"
6419
6420 #. type: Plain text
6421 #: build/C/man3/pthread_getcpuclockid.3:84
6422 msgid ""
6423 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6424 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6425 "the two threads.  The following shell session shows an example run:"
6426 msgstr ""
6427 "以下のプログラムは、スレッドを作成し、それから\n"
6428 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6429 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6430 "スレッド毎の CPU 時間を取得する。\n"
6431 "下記のシェルのセッションは実行例である。"
6432
6433 #. type: Plain text
6434 #: build/C/man3/pthread_getcpuclockid.3:93
6435 #, no-wrap
6436 msgid ""
6437 "$ B<./a.out>\n"
6438 "Main thread sleeping\n"
6439 "Subthread starting infinite loop\n"
6440 "Main thread consuming some CPU time...\n"
6441 "Process total CPU time:    1.368\n"
6442 "Main thread CPU time:      0.376\n"
6443 "Subthread CPU time:        0.992\n"
6444 msgstr ""
6445 "$ B<./a.out>\n"
6446 "Main thread sleeping\n"
6447 "Subthread starting infinite loop\n"
6448 "Main thread consuming some CPU time...\n"
6449 "Process total CPU time:    1.368\n"
6450 "Main thread CPU time:      0.376\n"
6451 "Subthread CPU time:        0.992\n"
6452
6453 #. type: Plain text
6454 #: build/C/man3/pthread_getcpuclockid.3:99
6455 #, no-wrap
6456 msgid "/* Link with \"-lrt\" */\n"
6457 msgstr "/* \"-lrt\" でリンクする */\n"
6458
6459 #. type: Plain text
6460 #: build/C/man3/pthread_getcpuclockid.3:107
6461 #, no-wrap
6462 msgid ""
6463 "#include E<lt>time.hE<gt>\n"
6464 "#include E<lt>stdio.hE<gt>\n"
6465 "#include E<lt>stdlib.hE<gt>\n"
6466 "#include E<lt>unistd.hE<gt>\n"
6467 "#include E<lt>pthread.hE<gt>\n"
6468 "#include E<lt>string.hE<gt>\n"
6469 "#include E<lt>errno.hE<gt>\n"
6470 msgstr ""
6471 "#include E<lt>time.hE<gt>\n"
6472 "#include E<lt>stdio.hE<gt>\n"
6473 "#include E<lt>stdlib.hE<gt>\n"
6474 "#include E<lt>unistd.hE<gt>\n"
6475 "#include E<lt>pthread.hE<gt>\n"
6476 "#include E<lt>string.hE<gt>\n"
6477 "#include E<lt>errno.hE<gt>\n"
6478
6479 #. type: Plain text
6480 #: build/C/man3/pthread_getcpuclockid.3:121
6481 #, no-wrap
6482 msgid ""
6483 "static void *\n"
6484 "thread_start(void *arg)\n"
6485 "{\n"
6486 "    printf(\"Subthread starting infinite loop\\en\");\n"
6487 "    for (;;)\n"
6488 "        continue;\n"
6489 "}\n"
6490 msgstr ""
6491 "static void *\n"
6492 "thread_start(void *arg)\n"
6493 "{\n"
6494 "    printf(\"Subthread starting infinite loop\\en\");\n"
6495 "    for (;;)\n"
6496 "        continue;\n"
6497 "}\n"
6498
6499 #. type: Plain text
6500 #: build/C/man3/pthread_getcpuclockid.3:126
6501 #, no-wrap
6502 msgid ""
6503 "static void\n"
6504 "pclock(char *msg, clockid_t cid)\n"
6505 "{\n"
6506 "    struct timespec ts;\n"
6507 msgstr ""
6508 "static void\n"
6509 "pclock(char *msg, clockid_t cid)\n"
6510 "{\n"
6511 "    struct timespec ts;\n"
6512
6513 #. type: Plain text
6514 #: build/C/man3/pthread_getcpuclockid.3:132
6515 #, no-wrap
6516 msgid ""
6517 "    printf(\"%s\", msg);\n"
6518 "    if (clock_gettime(cid, &ts) == -1)\n"
6519 "        handle_error(\"clock_gettime\");\n"
6520 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6521 "}\n"
6522 msgstr ""
6523 "    printf(\"%s\", msg);\n"
6524 "    if (clock_gettime(cid, &ts) == -1)\n"
6525 "        handle_error(\"clock_gettime\");\n"
6526 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6527 "}\n"
6528
6529 #. type: Plain text
6530 #: build/C/man3/pthread_getcpuclockid.3:139
6531 #, no-wrap
6532 msgid ""
6533 "int\n"
6534 "main(int argc, char *argv[])\n"
6535 "{\n"
6536 "    pthread_t thread;\n"
6537 "    clockid_t cid;\n"
6538 "    int j, s;\n"
6539 msgstr ""
6540 "int\n"
6541 "main(int argc, char *argv[])\n"
6542 "{\n"
6543 "    pthread_t thread;\n"
6544 "    clockid_t cid;\n"
6545 "    int j, s;\n"
6546
6547 #. type: Plain text
6548 #: build/C/man3/pthread_getcpuclockid.3:143
6549 #, no-wrap
6550 msgid ""
6551 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6552 "    if (s != 0)\n"
6553 "        handle_error_en(s, \"pthread_create\");\n"
6554 msgstr ""
6555 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6556 "    if (s != 0)\n"
6557 "        handle_error_en(s, \"pthread_create\");\n"
6558
6559 #. type: Plain text
6560 #: build/C/man3/pthread_getcpuclockid.3:146
6561 #, no-wrap
6562 msgid ""
6563 "    printf(\"Main thread sleeping\\en\");\n"
6564 "    sleep(1);\n"
6565 msgstr ""
6566 "    printf(\"Main thread sleeping\\en\");\n"
6567 "    sleep(1);\n"
6568
6569 #. type: Plain text
6570 #: build/C/man3/pthread_getcpuclockid.3:150
6571 #, no-wrap
6572 msgid ""
6573 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6574 "    for (j = 0; j E<lt> 2000000; j++)\n"
6575 "        getppid();\n"
6576 msgstr ""
6577 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6578 "    for (j = 0; j E<lt> 2000000; j++)\n"
6579 "        getppid();\n"
6580
6581 #. type: Plain text
6582 #: build/C/man3/pthread_getcpuclockid.3:152
6583 #, no-wrap
6584 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6585 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6586
6587 #. type: Plain text
6588 #: build/C/man3/pthread_getcpuclockid.3:157
6589 #, no-wrap
6590 msgid ""
6591 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6592 "    if (s != 0)\n"
6593 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6594 "    pclock(\"Main thread CPU time:   \", cid);\n"
6595 msgstr ""
6596 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6597 "    if (s != 0)\n"
6598 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6599 "    pclock(\"Main thread CPU time:   \", cid);\n"
6600
6601 #. type: Plain text
6602 #: build/C/man3/pthread_getcpuclockid.3:160
6603 #, no-wrap
6604 msgid ""
6605 "    /* The preceding 4 lines of code could have been replaced by:\n"
6606 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6607 msgstr ""
6608 "    /* The preceding 4 lines of code could have been replaced by:\n"
6609 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6610
6611 #. type: Plain text
6612 #: build/C/man3/pthread_getcpuclockid.3:165
6613 #, no-wrap
6614 msgid ""
6615 "    s = pthread_getcpuclockid(thread, &cid);\n"
6616 "    if (s != 0)\n"
6617 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6618 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6619 msgstr ""
6620 "    s = pthread_getcpuclockid(thread, &cid);\n"
6621 "    if (s != 0)\n"
6622 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6623 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6624
6625 #. type: Plain text
6626 #: build/C/man3/pthread_getcpuclockid.3:168
6627 #, no-wrap
6628 msgid ""
6629 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6630 "}\n"
6631 msgstr ""
6632 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6633 "}\n"
6634
6635 #. type: Plain text
6636 #: build/C/man3/pthread_getcpuclockid.3:177
6637 msgid ""
6638 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6639 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6640 msgstr ""
6641 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6642 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6643
6644 #. type: TH
6645 #: build/C/man3/pthread_join.3:26
6646 #, no-wrap
6647 msgid "PTHREAD_JOIN"
6648 msgstr "PTHREAD_JOIN"
6649
6650 #. type: Plain text
6651 #: build/C/man3/pthread_join.3:29
6652 msgid "pthread_join - join with a terminated thread"
6653 msgstr "pthread_join - 終了したスレッドを join する"
6654
6655 #. type: Plain text
6656 #: build/C/man3/pthread_join.3:34
6657 #, no-wrap
6658 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6659 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6660
6661 #. type: Plain text
6662 #: build/C/man3/pthread_join.3:49
6663 msgid ""
6664 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6665 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6666 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6667 msgstr ""
6668 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6669 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6670 "B<pthread_join>() はすぐに返る。\n"
6671 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6672
6673 #. type: Plain text
6674 #: build/C/man3/pthread_join.3:63
6675 msgid ""
6676 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6677 "the target thread (i.e., the value that the target thread supplied to "
6678 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6679 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6680 msgstr ""
6681 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6682 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6683 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6684 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6685
6686 #. type: Plain text
6687 #: build/C/man3/pthread_join.3:70
6688 msgid ""
6689 "If multiple threads simultaneously try to join with the same thread, the "
6690 "results are undefined.  If the thread calling B<pthread_join>()  is "
6691 "canceled, then the target thread will remain joinable (i.e., it will not be "
6692 "detached)."
6693 msgstr ""
6694 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6695 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6696 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6697 "ならない)。"
6698
6699 #. type: Plain text
6700 #: build/C/man3/pthread_join.3:75
6701 msgid ""
6702 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6703 "number."
6704 msgstr ""
6705 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6706 "エラーの場合、エラー番号を返す。"
6707
6708 #. type: TP
6709 #: build/C/man3/pthread_join.3:76
6710 #, no-wrap
6711 msgid "B<EDEADLK>"
6712 msgstr "B<EDEADLK>"
6713
6714 #.  The following verified by testing on glibc 2.8/NPTL:
6715 #.  The following verified by testing on glibc 2.8/NPTL:
6716 #. type: Plain text
6717 #: build/C/man3/pthread_join.3:85
6718 msgid ""
6719 "A deadlock was detected (e.g., two threads tried to join with each other); "
6720 "or I<thread> specifies the calling thread."
6721 msgstr ""
6722 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6723 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6724
6725 #.  POSIX.1-2001 does not specify this error case.
6726 #. type: Plain text
6727 #: build/C/man3/pthread_join.3:93
6728 msgid "Another thread is already waiting to join with this thread."
6729 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6730
6731 #. type: Plain text
6732 #: build/C/man3/pthread_join.3:104
6733 msgid ""
6734 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6735 "the target thread has terminated."
6736 msgstr ""
6737 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6738 "呼び出し側には、対象スレッドが終了していることが保証される。"
6739
6740 #. type: Plain text
6741 #: build/C/man3/pthread_join.3:107
6742 msgid ""
6743 "Joining with a thread that has previously been joined results in undefined "
6744 "behavior."
6745 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6746
6747 #. type: Plain text
6748 #: build/C/man3/pthread_join.3:115
6749 msgid ""
6750 "Failure to join with a thread that is joinable (i.e., one that is not "
6751 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6752 "zombie thread consumes some system resources, and when enough zombie threads "
6753 "have accumulated, it will no longer be possible to create new threads (or "
6754 "processes)."
6755 msgstr ""
6756 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6757 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6758 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6759 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6760 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6761 "このようなことが起きるのは避けること。"
6762
6763 #. type: Plain text
6764 #: build/C/man3/pthread_join.3:121
6765 msgid ""
6766 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6767 "\"join with any terminated thread\".  If you believe you need this "
6768 "functionality, you probably need to rethink your application design."
6769 msgstr ""
6770 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6771 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6772 "この機能が必要だと思うような場合には、おそらく\n"
6773 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6774
6775 #. type: Plain text
6776 #: build/C/man3/pthread_join.3:124
6777 msgid ""
6778 "All of the threads in a process are peers: any thread can join with any "
6779 "other thread in the process."
6780 msgstr ""
6781 "プロセス内の全てのスレッドは対等であり、\n"
6782 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6783
6784 #. type: Plain text
6785 #: build/C/man3/pthread_join.3:134
6786 msgid ""
6787 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6788 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6789 msgstr ""
6790 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6791 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6792
6793 #. type: TH
6794 #: build/C/man3/pthread_kill.3:26
6795 #, no-wrap
6796 msgid "PTHREAD_KILL"
6797 msgstr "PTHREAD_KILL"
6798
6799 #. type: TH
6800 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigqueue.3:25
6801 #, no-wrap
6802 msgid "2012-08-19"
6803 msgstr "2012-08-19"
6804
6805 #. type: Plain text
6806 #: build/C/man3/pthread_kill.3:29
6807 msgid "pthread_kill - send a signal to a thread"
6808 msgstr "pthread_kill - スレッドにシグナルを送信する"
6809
6810 #. type: Plain text
6811 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6812 #, no-wrap
6813 msgid "B<#include E<lt>signal.hE<gt>>\n"
6814 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6815
6816 #. type: Plain text
6817 #: build/C/man3/pthread_kill.3:34
6818 #, no-wrap
6819 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6820 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6821
6822 #. type: Plain text
6823 #: build/C/man3/pthread_kill.3:47
6824 msgid ""
6825 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6826 "thread in the same process as the caller.  The signal is asynchronously "
6827 "directed to I<thread>."
6828 msgstr ""
6829 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6830 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6831 "シグナルは非同期に I<thread> へ直接送られる。"
6832
6833 #. type: Plain text
6834 #: build/C/man3/pthread_kill.3:52
6835 msgid ""
6836 "If I<sig> is 0, then no signal is sent, but error checking is still "
6837 "performed; this can be used to check for the existence of a thread ID."
6838 msgstr ""
6839 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6840 "エラーチェックだけは実行される。\n"
6841 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6842
6843 #. type: Plain text
6844 #: build/C/man3/pthread_kill.3:57
6845 msgid ""
6846 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6847 "number, and no signal is sent."
6848 msgstr ""
6849 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6850 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6851
6852 #. type: Plain text
6853 #: build/C/man3/pthread_kill.3:61
6854 msgid "An invalid signal was specified."
6855 msgstr "無効なシグナルが指定された。"
6856
6857 #. type: Plain text
6858 #: build/C/man3/pthread_kill.3:75
6859 msgid ""
6860 "Signal dispositions are process-wide: if a signal handler is installed, the "
6861 "handler will be invoked in the thread I<thread>, but if the disposition of "
6862 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6863 "affect the whole process."
6864 msgstr ""
6865 "シグナルの配送はプロセス全体で行われる。\n"
6866 "シグナルハンドラが設定されている場合、\n"
6867 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6868 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6869 "シグナルに対するアクションはプロセス全体に影響がある。"
6870
6871 #. type: Plain text
6872 #: build/C/man3/pthread_kill.3:84
6873 msgid ""
6874 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6875 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6876 msgstr ""
6877 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6878 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6879
6880 #. type: TH
6881 #: build/C/man3/pthread_kill_other_threads_np.3:26
6882 #, no-wrap
6883 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6884 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6885
6886 #. type: TH
6887 #: build/C/man3/pthread_kill_other_threads_np.3:26
6888 #, no-wrap
6889 msgid "2010-09-09"
6890 msgstr "2010-09-09"
6891
6892 #. type: Plain text
6893 #: build/C/man3/pthread_kill_other_threads_np.3:29
6894 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6895 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6896
6897 #. type: Plain text
6898 #: build/C/man3/pthread_kill_other_threads_np.3:34
6899 #, no-wrap
6900 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6901 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6902
6903 #.  .SH VERSIONS
6904 #.  Available since glibc 2.0
6905 #. type: Plain text
6906 #: build/C/man3/pthread_kill_other_threads_np.3:47
6907 msgid ""
6908 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
6909 "threading implementation.  On that implementation, calling this function "
6910 "causes the immediate termination of all threads in the application, except "
6911 "the calling thread.  The cancellation state and cancellation type of the to-"
6912 "be-terminated threads are ignored, and the cleanup handlers are not called "
6913 "in those threads."
6914 msgstr ""
6915 "B<pthread_kill_other_threads_np>() は、\n"
6916 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6917 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6918 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6919 "終了対象のスレッドの cancelability state と cancelability type は\n"
6920 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6921
6922 #. type: Plain text
6923 #: build/C/man3/pthread_kill_other_threads_np.3:59
6924 msgid ""
6925 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6926 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6927 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6928 "the other threads of an application are not automatically terminated (as "
6929 "POSIX.1-2001 requires) during B<execve>(2)."
6930 msgstr ""
6931 "B<pthread_kill_other_threads_np>() は、\n"
6932 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6933 "呼ばれることを目的として用意されている。\n"
6934 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6935 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6936 "終了されないという制限を解決するために設計された。"
6937
6938 #. type: Plain text
6939 #: build/C/man3/pthread_kill_other_threads_np.3:66
6940 msgid ""
6941 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6942 "exists, but does nothing.  (Nothing needs to be done, because the "
6943 "implementation does the right thing during an B<execve>(2).)"
6944 msgstr ""
6945 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6946 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6947 "何もする必要がないということだ)。"
6948
6949 #. type: Plain text
6950 #: build/C/man3/pthread_kill_other_threads_np.3:72
6951 msgid ""
6952 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6953 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6954 msgstr ""
6955 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6956 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6957
6958 #. type: TH
6959 #: build/C/man3/pthread_self.3:26
6960 #, no-wrap
6961 msgid "PTHREAD_SELF"
6962 msgstr "PTHREAD_SELF"
6963
6964 #. type: Plain text
6965 #: build/C/man3/pthread_self.3:29
6966 msgid "pthread_self - obtain ID of the calling thread"
6967 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6968
6969 #. type: Plain text
6970 #: build/C/man3/pthread_self.3:34
6971 #, no-wrap
6972 msgid "B<pthread_t pthread_self(void);>\n"
6973 msgstr "B<pthread_t pthread_self(void);>\n"
6974
6975 #. type: Plain text
6976 #: build/C/man3/pthread_self.3:46
6977 msgid ""
6978 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6979 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6980 "(3)  call that created this thread."
6981 msgstr ""
6982 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6983 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6984 "呼び出しで I<*thread> で返されるのと同じ値である。"
6985
6986 #. type: Plain text
6987 #: build/C/man3/pthread_self.3:48
6988 msgid "This function always succeeds, returning the calling thread's ID."
6989 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6990
6991 #. type: Plain text
6992 #: build/C/man3/pthread_self.3:63
6993 msgid ""
6994 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6995 "represent a thread ID; for example, representation using either an "
6996 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6997 "I<pthread_t> can't portably be compared using the C equality operator "
6998 "(B<==>); use B<pthread_equal>(3)  instead."
6999 msgstr ""
7000 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
7001 "スレッド実装が完全に自由に選択してよいことになっている。\n"
7002 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
7003 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
7004 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
7005 "代わりに B<pthread_equal>(3) を使うこと。"
7006
7007 #. type: Plain text
7008 #: build/C/man3/pthread_self.3:67
7009 msgid ""
7010 "Thread identifiers should be considered opaque: any attempt to use a thread "
7011 "ID other than in pthreads calls is nonportable and can lead to unspecified "
7012 "results."
7013 msgstr ""
7014 "スレッド識別子はその内部構造を意識すべきではない。\n"
7015 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
7016 "移植性がなくなり、どのような結果が得られるかも分からない。"
7017
7018 #. type: Plain text
7019 #: build/C/man3/pthread_self.3:71
7020 msgid ""
7021 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
7022 "may be reused after a terminated thread has been joined, or a detached "
7023 "thread has terminated."
7024 msgstr ""
7025 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
7026 "終了したスレッドが join されたり、\n"
7027 "切り離された (detached) スレッドが終了されたりした後は、\n"
7028 "そのスレッド ID は再利用されることがある。"
7029
7030 #. type: Plain text
7031 #: build/C/man3/pthread_self.3:76
7032 msgid ""
7033 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
7034 "kernel thread ID returned by a call to B<gettid>(2)."
7035 msgstr ""
7036 "B<pthread_self>() が返すスレッド ID は、\n"
7037 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
7038
7039 #. type: Plain text
7040 #: build/C/man3/pthread_self.3:80
7041 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7042 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7043
7044 #. type: TH
7045 #: build/C/man3/pthread_setaffinity_np.3:26
7046 #, no-wrap
7047 msgid "PTHREAD_SETAFFINITY_NP"
7048 msgstr "PTHREAD_SETAFFINITY_NP"
7049
7050 #. type: Plain text
7051 #: build/C/man3/pthread_setaffinity_np.3:30
7052 msgid ""
7053 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7054 "thread"
7055 msgstr ""
7056 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7057 "CPU affinity の設定/取得を行う"
7058
7059 #. type: Plain text
7060 #: build/C/man3/pthread_setaffinity_np.3:39
7061 #, no-wrap
7062 msgid ""
7063 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7064 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7065 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7066 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7067 msgstr ""
7068 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7069 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7070 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7071 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7072
7073 #. type: Plain text
7074 #: build/C/man3/pthread_setaffinity_np.3:54
7075 msgid ""
7076 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7077 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7078 "successful, and the thread is not currently running on one of the CPUs in "
7079 "I<cpuset>, then it is migrated to one of those CPUs."
7080 msgstr ""
7081 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7082 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7083 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7084 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7085
7086 #. type: Plain text
7087 #: build/C/man3/pthread_setaffinity_np.3:61
7088 msgid ""
7089 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7090 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7091 msgstr ""
7092 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7093 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7094
7095 #. type: Plain text
7096 #: build/C/man3/pthread_setaffinity_np.3:77
7097 msgid ""
7098 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7099 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
7100 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
7101 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7102 msgstr ""
7103 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7104 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7105 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7106 "割り当てている場合には、別の値になることもある)。"
7107
7108 #. type: TP
7109 #: build/C/man3/pthread_setaffinity_np.3:81
7110 #, no-wrap
7111 msgid "B<EFAULT>"
7112 msgstr "B<EFAULT>"
7113
7114 #. type: Plain text
7115 #: build/C/man3/pthread_setaffinity_np.3:84
7116 msgid "A supplied memory address was invalid."
7117 msgstr "指定されたメモリアドレスが無効である。"
7118
7119 #. type: Plain text
7120 #: build/C/man3/pthread_setaffinity_np.3:93
7121 msgid ""
7122 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7123 "processors that are currently physically on the system and permitted to the "
7124 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7125 "mechanism described in B<cpuset>(7)."
7126 msgstr ""
7127 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7128 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7129 "されているプロセッサが一つも含まれていない。\n"
7130 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7131 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7132
7133 #.  FIXME . ?
7134 #.  Loic Domaigne commented: it seems that in the future the
7135 #.  kernel developers want to make cpumask_t dynamic, so
7136 #.  CONFIG_NR_CPUS might become obsolete in the future.
7137 #.  cpumask_t
7138 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7139 #.  of the cpumask_t type.
7140 #. type: Plain text
7141 #: build/C/man3/pthread_setaffinity_np.3:109
7142 msgid ""
7143 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7144 "the set supported by the kernel.  (The kernel configuration option "
7145 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7146 "type used to represent CPU sets.)"
7147 msgstr ""
7148 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7149 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7150 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7151 "データ型がサポートする CPU 集合の範囲が定義される。)"
7152
7153 #. type: Plain text
7154 #: build/C/man3/pthread_setaffinity_np.3:114
7155 msgid ""
7156 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7157 "affinity mask used by the kernel."
7158 msgstr ""
7159 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7160 "affinity マスクの大きさよりも小さい。"
7161
7162 #. type: Plain text
7163 #: build/C/man3/pthread_setaffinity_np.3:137
7164 msgid ""
7165 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7166 "thread will actually run is the intersection of the set specified in the "
7167 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7168 "system may further restrict the set of CPUs on which the thread runs if the "
7169 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7170 "restrictions on the actual set of CPUs on which the thread will run are "
7171 "silently imposed by the kernel."
7172 msgstr ""
7173 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7174 "そのスレッドが実際に実行される CPU 集合は、\n"
7175 "I<cpuset> 引き数で指定された集合と\n"
7176 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7177 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7178 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7179 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7180 "これらの制限は、カーネルにより黙って適用される。"
7181
7182 #. type: Plain text
7183 #: build/C/man3/pthread_setaffinity_np.3:143
7184 msgid ""
7185 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7186 "B<sched_getaffinity>(2)  system calls."
7187 msgstr ""
7188 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7189 "B<sched_getaffinity>(2) を使って実装されている。"
7190
7191 #. type: Plain text
7192 #: build/C/man3/pthread_setaffinity_np.3:154
7193 msgid ""
7194 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7195 "creator's CPU affinity mask."
7196 msgstr ""
7197 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7198 "作成者の CPU affinity マスクを継承する。"
7199
7200 #. type: Plain text
7201 #: build/C/man3/pthread_setaffinity_np.3:162
7202 msgid ""
7203 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7204 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7205 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7206 "check the resulting CPU affinity mask of the thread."
7207 msgstr ""
7208 "以下のプログラムでは、メインスレッドは\n"
7209 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7210 "CPU 0 から 7 が含まれるように設定し\n"
7211 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7212 "その後で B<pthread_getaffinity_np>() を使って\n"
7213 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7214
7215 #. type: Plain text
7216 #: build/C/man3/pthread_setaffinity_np.3:169
7217 #, no-wrap
7218 msgid ""
7219 "#define _GNU_SOURCE\n"
7220 "#include E<lt>pthread.hE<gt>\n"
7221 "#include E<lt>stdio.hE<gt>\n"
7222 "#include E<lt>stdlib.hE<gt>\n"
7223 "#include E<lt>errno.hE<gt>\n"
7224 msgstr ""
7225 "#define _GNU_SOURCE\n"
7226 "#include E<lt>pthread.hE<gt>\n"
7227 "#include E<lt>stdio.hE<gt>\n"
7228 "#include E<lt>stdlib.hE<gt>\n"
7229 "#include E<lt>errno.hE<gt>\n"
7230
7231 #. type: Plain text
7232 #: build/C/man3/pthread_setaffinity_np.3:179
7233 #, no-wrap
7234 msgid ""
7235 "int\n"
7236 "main(int argc, char *argv[])\n"
7237 "{\n"
7238 "    int s, j;\n"
7239 "    cpu_set_t cpuset;\n"
7240 "    pthread_t thread;\n"
7241 msgstr ""
7242 "int\n"
7243 "main(int argc, char *argv[])\n"
7244 "{\n"
7245 "    int s, j;\n"
7246 "    cpu_set_t cpuset;\n"
7247 "    pthread_t thread;\n"
7248
7249 #. type: Plain text
7250 #: build/C/man3/pthread_setaffinity_np.3:181
7251 #, no-wrap
7252 msgid "    thread = pthread_self();\n"
7253 msgstr "    thread = pthread_self();\n"
7254
7255 #. type: Plain text
7256 #: build/C/man3/pthread_setaffinity_np.3:183
7257 #, no-wrap
7258 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7259 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7260
7261 #. type: Plain text
7262 #: build/C/man3/pthread_setaffinity_np.3:187
7263 #, no-wrap
7264 msgid ""
7265 "    CPU_ZERO(&cpuset);\n"
7266 "    for (j = 0; j E<lt> 8; j++)\n"
7267 "        CPU_SET(j, &cpuset);\n"
7268 msgstr ""
7269 "    CPU_ZERO(&cpuset);\n"
7270 "    for (j = 0; j E<lt> 8; j++)\n"
7271 "        CPU_SET(j, &cpuset);\n"
7272
7273 #. type: Plain text
7274 #: build/C/man3/pthread_setaffinity_np.3:191
7275 #, no-wrap
7276 msgid ""
7277 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7278 "    if (s != 0)\n"
7279 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7280 msgstr ""
7281 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7282 "    if (s != 0)\n"
7283 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7284
7285 #. type: Plain text
7286 #: build/C/man3/pthread_setaffinity_np.3:193
7287 #, no-wrap
7288 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7289 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7290
7291 #. type: Plain text
7292 #: build/C/man3/pthread_setaffinity_np.3:197
7293 #, no-wrap
7294 msgid ""
7295 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7296 "    if (s != 0)\n"
7297 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7298 msgstr ""
7299 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7300 "    if (s != 0)\n"
7301 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7302
7303 #. type: Plain text
7304 #: build/C/man3/pthread_setaffinity_np.3:202
7305 #, no-wrap
7306 msgid ""
7307 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7308 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7309 "        if (CPU_ISSET(j, &cpuset))\n"
7310 "            printf(\"    CPU %d\\en\", j);\n"
7311 msgstr ""
7312 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7313 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7314 "        if (CPU_ISSET(j, &cpuset))\n"
7315 "            printf(\"    CPU %d\\en\", j);\n"
7316
7317 #. type: Plain text
7318 #: build/C/man3/pthread_setaffinity_np.3:205
7319 #: build/C/man3/pthread_setschedparam.3:430
7320 #, no-wrap
7321 msgid ""
7322 "    exit(EXIT_SUCCESS);\n"
7323 "}\n"
7324 msgstr ""
7325 "    exit(EXIT_SUCCESS);\n"
7326 "}\n"
7327
7328 #. type: Plain text
7329 #: build/C/man3/pthread_setaffinity_np.3:214
7330 msgid ""
7331 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7332 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7333 "B<cpuset>(7), B<pthreads>(7)"
7334 msgstr ""
7335 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7336 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7337 "B<cpuset>(7), B<pthreads>(7)"
7338
7339 #. type: TH
7340 #: build/C/man3/pthread_setcancelstate.3:26
7341 #, no-wrap
7342 msgid "PTHREAD_SETCANCELSTATE"
7343 msgstr "PTHREAD_SETCANCELSTATE"
7344
7345 #. type: Plain text
7346 #: build/C/man3/pthread_setcancelstate.3:30
7347 msgid ""
7348 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7349 "type"
7350 msgstr ""
7351 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7352 "cancelability type を設定する"
7353
7354 #. type: Plain text
7355 #: build/C/man3/pthread_setcancelstate.3:36
7356 #, no-wrap
7357 msgid ""
7358 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7359 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7360 msgstr ""
7361 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7362 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7363
7364 #. type: Plain text
7365 #: build/C/man3/pthread_setcancelstate.3:51
7366 msgid ""
7367 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7368 "thread to the value given in I<state>.  The previous cancelability state of "
7369 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7370 "I<state> argument must have one of the following values:"
7371 msgstr ""
7372 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7373 "cancelability state に I<state> で指定された\n"
7374 "値を設定する。変更前のスレッドの cancelability state は\n"
7375 "I<oldstate> が指すバッファで返される。\n"
7376 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7377
7378 #. type: TP
7379 #: build/C/man3/pthread_setcancelstate.3:51
7380 #, no-wrap
7381 msgid "B<PTHREAD_CANCEL_ENABLE>"
7382 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7383
7384 #. type: Plain text
7385 #: build/C/man3/pthread_setcancelstate.3:58
7386 msgid ""
7387 "The thread is cancelable.  This is the default cancelability state in all "
7388 "new threads, including the initial thread.  The thread's cancelability type "
7389 "determines when a cancelable thread will respond to a cancellation request."
7390 msgstr ""
7391 "スレッドは取り消し可能 (cancelable) である。\n"
7392 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7393 "cancelability state である。これには最初のスレッドも含まれる。\n"
7394 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7395 "取り消し要求にいつ反応するかが決まる。"
7396
7397 #. type: TP
7398 #: build/C/man3/pthread_setcancelstate.3:58
7399 #, no-wrap
7400 msgid "B<PTHREAD_CANCEL_DISABLE>"
7401 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7402
7403 #. type: Plain text
7404 #: build/C/man3/pthread_setcancelstate.3:63
7405 msgid ""
7406 "The thread is not cancelable.  If a cancellation request is received, it is "
7407 "blocked until cancelability is enabled."
7408 msgstr ""
7409 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7410 "取り消し可能に設定されるまでその要求はブロックされる。"
7411
7412 #. type: Plain text
7413 #: build/C/man3/pthread_setcancelstate.3:75
7414 msgid ""
7415 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7416 "thread to the value given in I<type>.  The previous cancelability type of "
7417 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7418 "argument must have one of the following values:"
7419 msgstr ""
7420 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7421 "cancelability type に I<type> で指定された値を設定する。\n"
7422 "変更前のスレッドの cancelability type は\n"
7423 "I<oldtype> が指すバッファで返される。\n"
7424 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7425
7426 #. type: TP
7427 #: build/C/man3/pthread_setcancelstate.3:75
7428 #, no-wrap
7429 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7430 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7431
7432 #. type: Plain text
7433 #: build/C/man3/pthread_setcancelstate.3:82
7434 msgid ""
7435 "A cancellation request is deferred until the thread next calls a function "
7436 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7437 "cancelability type in all new threads, including the initial thread."
7438 msgstr ""
7439 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7440 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7441 "スレッドでのデフォルトの cancelability type である。\n"
7442 "これには最初のスレッドも含まれる。"
7443
7444 #. type: TP
7445 #: build/C/man3/pthread_setcancelstate.3:82
7446 #, no-wrap
7447 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7448 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7449
7450 #. type: Plain text
7451 #: build/C/man3/pthread_setcancelstate.3:88
7452 msgid ""
7453 "The thread can be canceled at any time.  (Typically, it will be canceled "
7454 "immediately upon receiving a cancellation request, but the system doesn't "
7455 "guarantee this.)"
7456 msgstr ""
7457 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7458 "システムがそのことを保証しているわけではない)。"
7459
7460 #. type: Plain text
7461 #: build/C/man3/pthread_setcancelstate.3:92
7462 msgid ""
7463 "The set-and-get operation performed by each of these functions is atomic "
7464 "with respect to other threads in the process calling the same function."
7465 msgstr ""
7466 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7467 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7468 "アトミックに行われる。"
7469
7470 #. type: Plain text
7471 #: build/C/man3/pthread_setcancelstate.3:99
7472 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7473 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7474
7475 #. type: Plain text
7476 #: build/C/man3/pthread_setcancelstate.3:103
7477 msgid "Invalid value for I<state>."
7478 msgstr "I<state> に無効な値が指定された。"
7479
7480 #. type: Plain text
7481 #: build/C/man3/pthread_setcancelstate.3:107
7482 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7483 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7484
7485 #.  .SH VERSIONS
7486 #.  Available since glibc 2.0
7487 #. type: Plain text
7488 #: build/C/man3/pthread_setcancelstate.3:113
7489 msgid "Invalid value for I<type>."
7490 msgstr "I<type> に無効な値が指定された。"
7491
7492 #. type: Plain text
7493 #: build/C/man3/pthread_setcancelstate.3:118
7494 msgid ""
7495 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7496 "(3)."
7497 msgstr ""
7498 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7499 "B<pthread_cancel>(3) を参照。"
7500
7501 #. type: Plain text
7502 #: build/C/man3/pthread_setcancelstate.3:125
7503 msgid ""
7504 "Briefly disabling cancelability is useful if a thread performs some critical "
7505 "action that must not be interrupted by a cancellation request.  Beware of "
7506 "disabling cancelability for long periods, or around operations that may "
7507 "block for long periods, since that will render the thread unresponsive to "
7508 "cancellation requests."
7509 msgstr ""
7510 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7511 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7512 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7513 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7514 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7515 "スレッドが応答しない状態になってしまうからである。"
7516
7517 #. type: Plain text
7518 #: build/C/man3/pthread_setcancelstate.3:156
7519 msgid ""
7520 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7521 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7522 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7523 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7524 "because the application has no way of knowing what the state of these "
7525 "resources is when the thread is canceled; that is, did cancellation occur "
7526 "before the resources were reserved, while they were reserved, or after they "
7527 "were released? Furthermore, some internal data structures (e.g., the linked "
7528 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7529 "left in an inconsistent state if cancellation occurs in the middle of the "
7530 "function call.  Consequently, clean-up handlers cease to be useful.  "
7531 "Functions that can be safely asynchronously canceled are called I<async-"
7532 "cancel-safe functions>.  POSIX.1-2001 requires only that B<pthread_cancel>"
7533 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7534 "cancel-safe.  In general, other library functions can't be safely called "
7535 "from an asynchronously cancelable thread.  One of the few circumstances in "
7536 "which asynchronous cancelability is useful is for cancellation of a thread "
7537 "that is in a pure compute-bound loop."
7538 msgstr ""
7539 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7540 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7541 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7542 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7543 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7544 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7545 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7546 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7547 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7548 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7549 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7550 "が役に立たないものになってしまう。\n"
7551 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7552 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7553 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7554 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7555 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7556 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7557 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7558
7559 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7560 #. type: Plain text
7561 #: build/C/man3/pthread_setcancelstate.3:174
7562 msgid ""
7563 "The Linux threading implementations permit the I<oldstate> argument of "
7564 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7565 "the previous cancelability state is not returned to the caller.  Many other "
7566 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7567 "does not specify this point, so portable applications should always specify "
7568 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7569 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7570 msgstr ""
7571 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7572 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7573 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7574 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7575 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7576 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7577 "NULL 以外の値を指定するようにすべきである。\n"
7578 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7579 "全く同じことが言える。"
7580
7581 #. type: Plain text
7582 #: build/C/man3/pthread_setcancelstate.3:177
7583 msgid "See B<pthread_cancel>(3)."
7584 msgstr "B<pthread_cancel>(3) を参照。"
7585
7586 #. type: Plain text
7587 #: build/C/man3/pthread_setcancelstate.3:182
7588 msgid ""
7589 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7590 "B<pthreads>(7)"
7591 msgstr ""
7592 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7593 "B<pthreads>(7)"
7594
7595 #. type: TH
7596 #: build/C/man3/pthread_setconcurrency.3:25
7597 #, no-wrap
7598 msgid "PTHREAD_SETCONCURRENCY"
7599 msgstr "PTHREAD_SETCONCURRENCY"
7600
7601 #. type: TH
7602 #: build/C/man3/pthread_setconcurrency.3:25
7603 #, no-wrap
7604 msgid "2009-04-10"
7605 msgstr "2009-04-10"
7606
7607 #. type: Plain text
7608 #: build/C/man3/pthread_setconcurrency.3:29
7609 msgid ""
7610 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7611 "level"
7612 msgstr ""
7613 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7614 "行う"
7615
7616 #. type: Plain text
7617 #: build/C/man3/pthread_setconcurrency.3:35
7618 #, no-wrap
7619 msgid ""
7620 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7621 "B<int pthread_getconcurrency(void);>\n"
7622 msgstr ""
7623 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7624 "B<int pthread_getconcurrency(void);>\n"
7625
7626 #. type: Plain text
7627 #: build/C/man3/pthread_setconcurrency.3:48
7628 msgid ""
7629 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7630 "application's desired concurrency level, specified in I<new_level>.  The "
7631 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7632 "of concurrency that should be provided as a result of calling "
7633 "B<pthread_setconcurrency>()."
7634 msgstr ""
7635 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7636 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7637 "希望する並列処理レベルは I<new_level> で指定する。\n"
7638 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7639 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7640 "どのような並列度になるべきかは規定されていない。"
7641
7642 #. type: Plain text
7643 #: build/C/man3/pthread_setconcurrency.3:53
7644 msgid ""
7645 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7646 "concurrency level as it deems appropriate."
7647 msgstr ""
7648 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7649 "実装側で適切とみなしたレベルに設定するようになる。"
7650
7651 #. type: Plain text
7652 #: build/C/man3/pthread_setconcurrency.3:56
7653 msgid ""
7654 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7655 "level for this process."
7656 msgstr ""
7657 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7658 "の現在値を返す。"
7659
7660 #. type: Plain text
7661 #: build/C/man3/pthread_setconcurrency.3:61
7662 msgid ""
7663 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7664 "nonzero error number."
7665 msgstr ""
7666 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7667 "エラーの場合、 0 以外のエラー番号を返す。"
7668
7669 #. type: Plain text
7670 #: build/C/man3/pthread_setconcurrency.3:68
7671 msgid ""
7672 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7673 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7674 "B<pthread_setconcurrency>()  has not previously been called."
7675 msgstr ""
7676 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7677 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7678 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7679 "それまでに一度も呼び出されていない場合は 0 が返る。"
7680
7681 #. type: Plain text
7682 #: build/C/man3/pthread_setconcurrency.3:71
7683 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7684 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7685
7686 #. type: Plain text
7687 #: build/C/man3/pthread_setconcurrency.3:75
7688 msgid "I<new_level> is negative."
7689 msgstr "I<new_level> が負である。"
7690
7691 #. type: Plain text
7692 #: build/C/man3/pthread_setconcurrency.3:81
7693 msgid ""
7694 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7695 "I<new_level> would cause a system resource to be exceeded\")."
7696 msgstr ""
7697 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7698 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7699 "超過してしまう」)。"
7700
7701 #. type: Plain text
7702 #: build/C/man3/pthread_setconcurrency.3:83
7703 msgid "These functions are available in glibc since version 2.1."
7704 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7705
7706 #. type: Plain text
7707 #: build/C/man3/pthread_setconcurrency.3:87
7708 msgid "The default concurrency level is 0."
7709 msgstr "デフォルトの concurrency level は 0 である。"
7710
7711 #. type: Plain text
7712 #: build/C/man3/pthread_setconcurrency.3:94
7713 msgid ""
7714 "Concurrency levels are meaningful only for M:N threading implementations, "
7715 "where at any moment a subset of a process's set of user-level threads may be "
7716 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7717 "concurrency level allows the application to give the system a hint as to the "
7718 "number of kernel-scheduling entities that should be provided for efficient "
7719 "execution of the application."
7720 msgstr ""
7721 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7722 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7723 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7724 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7725 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7726 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7727 "ムに伝えることができる。"
7728
7729 #. type: Plain text
7730 #: build/C/man3/pthread_setconcurrency.3:100
7731 msgid ""
7732 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7733 "concurrency level has no meaning.  In other words, on Linux these functions "
7734 "merely exist for compatibility with other systems, and they have no effect "
7735 "on the execution of a program."
7736 msgstr ""
7737 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7738 "並列処理レベルを設定しても何の意味もない。\n"
7739 "言い換えると、 Linux では、これらの関数は、\n"
7740 "他のシステムとの互換性のためだけに存在し、\n"
7741 "プログラムの実行には何の影響も与えないということである。"
7742
7743 #. type: Plain text
7744 #: build/C/man3/pthread_setconcurrency.3:103
7745 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7746 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7747
7748 #. type: TH
7749 #: build/C/man3/pthread_setname_np.3:26
7750 #, no-wrap
7751 msgid "PTHREAD_SETNAME_NP"
7752 msgstr "PTHREAD_SETNAME_NP"
7753
7754 #. type: Plain text
7755 #: build/C/man3/pthread_setname_np.3:29
7756 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7757 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
7758
7759 #. type: Plain text
7760 #: build/C/man3/pthread_setname_np.3:36
7761 #, no-wrap
7762 msgid ""
7763 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7764 "B<#include E<lt>pthread.hE<gt>>\n"
7765 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7766 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7767 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7768 msgstr ""
7769 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7770 "B<#include E<lt>pthread.hE<gt>>\n"
7771 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7772 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7773 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7774
7775 #. type: Plain text
7776 #: build/C/man3/pthread_setname_np.3:55
7777 #, fuzzy
7778 #| msgid ""
7779 #| "By default, all the threads created using B<pthread_create>()  inherit "
7780 #| "the program name.  The B<pthread_setname_np>()  function can be used to "
7781 #| "set a unique name for a thread, which can be useful for debugging "
7782 #| "multithreaded applications.  The thread name is a meaningful C language "
7783 #| "string, whose length is restricted to 16 characters, including the "
7784 #| "terminating null byte.  The I<thread> argument specifies the thread whose "
7785 #| "name is to be changed; I<name> specifies the new name."
7786 msgid ""
7787 "By default, all the threads created using B<pthread_create>()  inherit the "
7788 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7789 "unique name for a thread, which can be useful for debugging multithreaded "
7790 "applications.  The thread name is a meaningful C language string, whose "
7791 "length is restricted to 16 characters, including the terminating null byte "
7792 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
7793 "to be changed; I<name> specifies the new name."
7794 msgstr ""
7795 "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム"
7796 "名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定"
7797 "することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデ"
7798 "バッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さ"
7799 "は 16 文字に限定されており、 終端の NULL バイトも 16 文字に含まれる。 "
7800 "I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には新しい名前を"
7801 "指定する。"
7802
7803 #. type: Plain text
7804 #: build/C/man3/pthread_setname_np.3:72
7805 msgid ""
7806 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7807 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7808 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7809 "specifies the number of bytes available in I<name>.  The buffer specified by "
7810 "I<name> should be at least 16 characters in length.  The returned thread "
7811 "name in the output buffer will be null terminated."
7812 msgstr ""
7813 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
7814 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
7815 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
7816 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
7817 "出力バッファに返されたスレッド名は NULL 終端される。"
7818
7819 #. type: Plain text
7820 #: build/C/man3/pthread_setname_np.3:79
7821 msgid ""
7822 "The B<pthread_setname_np>()  function can fail with the following error:"
7823 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7824
7825 #. type: TP
7826 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7827 #, no-wrap
7828 msgid "B<ERANGE>"
7829 msgstr "B<ERANGE>"
7830
7831 #. type: Plain text
7832 #: build/C/man3/pthread_setname_np.3:84
7833 msgid ""
7834 "The length of the string specified pointed to by I<name> exceeds the allowed "
7835 "limit."
7836 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
7837
7838 #. type: Plain text
7839 #: build/C/man3/pthread_setname_np.3:88
7840 msgid ""
7841 "The B<pthread_getname_np>()  function can fail with the following error:"
7842 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7843
7844 #. type: Plain text
7845 #: build/C/man3/pthread_setname_np.3:95
7846 msgid ""
7847 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7848 "name."
7849 msgstr ""
7850 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
7851 "る。"
7852
7853 #. type: Plain text
7854 #: build/C/man3/pthread_setname_np.3:100
7855 msgid ""
7856 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7857 "then the call may fail with one of the errors described in B<open>(2)."
7858 msgstr ""
7859 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
7860 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
7861
7862 #. type: Plain text
7863 #: build/C/man3/pthread_setname_np.3:102
7864 msgid "These functions first appeared in glibc in version 2.12."
7865 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7866
7867 #. type: Plain text
7868 #: build/C/man3/pthread_setname_np.3:104
7869 msgid "These functions are nonstandard GNU extensions."
7870 msgstr "これらの関数は非標準の GNU による拡張である。"
7871
7872 #. type: Plain text
7873 #: build/C/man3/pthread_setname_np.3:112
7874 msgid ""
7875 "B<pthread_setname_np>()  internally writes to the thread specific comm file "
7876 "under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7877 "B<pthread_getname_np>()  retrieves it from the same location."
7878 msgstr ""
7879 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
7880 "comm ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
7881 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
7882
7883 #. type: Plain text
7884 #: build/C/man3/pthread_setname_np.3:118
7885 msgid ""
7886 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7887 "B<pthread_getname_np>()."
7888 msgstr ""
7889 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7890 "の使用例を示している。"
7891
7892 #. type: Plain text
7893 #: build/C/man3/pthread_setname_np.3:120
7894 msgid "The following shell session shows a sample run of the program:"
7895 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7896
7897 #. type: Plain text
7898 #: build/C/man3/pthread_setname_np.3:136
7899 #, no-wrap
7900 msgid ""
7901 "$B< ./a.out>\n"
7902 "Created a thread. Default name is: a.out\n"
7903 "The thread name after setting it is THREADFOO.\n"
7904 "B<^Z>                           # Suspend the program\n"
7905 "[1]+  Stopped           ./a.out\n"
7906 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7907 "  PID   TID CMD                         COMMAND\n"
7908 " 5990  5990 ./a.out                     a.out\n"
7909 " 5990  5991 ./a.out                     THREADFOO\n"
7910 "$ B<cat /proc/5990/task/5990/comm>\n"
7911 "a.out\n"
7912 "$ B<cat /proc/5990/task/5991/comm>\n"
7913 "THREADFOO\n"
7914 msgstr ""
7915 "$B< ./a.out>\n"
7916 "Created a thread. Default name is: a.out\n"
7917 "The thread name after setting it is THREADFOO.\n"
7918 "B<^Z>                           # Suspend the program\n"
7919 "[1]+  Stopped           ./a.out\n"
7920 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7921 "  PID   TID CMD                         COMMAND\n"
7922 " 5990  5990 ./a.out                     a.out\n"
7923 " 5990  5991 ./a.out                     THREADFOO\n"
7924 "$ B<cat /proc/5990/task/5990/comm>\n"
7925 "a.out\n"
7926 "$ B<cat /proc/5990/task/5991/comm>\n"
7927 "THREADFOO\n"
7928
7929 #. type: Plain text
7930 #: build/C/man3/pthread_setname_np.3:148
7931 #, no-wrap
7932 msgid ""
7933 "#define _GNU_SOURCE\n"
7934 "#include E<lt>pthread.hE<gt>\n"
7935 "#include E<lt>stdio.hE<gt>\n"
7936 "#include E<lt>string.hE<gt>\n"
7937 "#include E<lt>unistd.hE<gt>\n"
7938 "#include E<lt>errno.hE<gt>\n"
7939 "#include E<lt>stdlib.hE<gt>\n"
7940 msgstr ""
7941 "#define _GNU_SOURCE\n"
7942 "#include E<lt>pthread.hE<gt>\n"
7943 "#include E<lt>stdio.hE<gt>\n"
7944 "#include E<lt>string.hE<gt>\n"
7945 "#include E<lt>unistd.hE<gt>\n"
7946 "#include E<lt>errno.hE<gt>\n"
7947 "#include E<lt>stdlib.hE<gt>\n"
7948
7949 #. type: Plain text
7950 #: build/C/man3/pthread_setname_np.3:150
7951 #, no-wrap
7952 msgid "#define NAMELEN 16\n"
7953 msgstr "#define NAMELEN 16\n"
7954
7955 #. type: Plain text
7956 #: build/C/man3/pthread_setname_np.3:154
7957 #, no-wrap
7958 msgid ""
7959 "#define errExitEN(en, msg) \\e\n"
7960 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7961 "        } while (0)\n"
7962 msgstr ""
7963 "#define errExitEN(en, msg) \\e\n"
7964 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7965 "        } while (0)\n"
7966
7967 #. type: Plain text
7968 #: build/C/man3/pthread_setname_np.3:161
7969 #, no-wrap
7970 msgid ""
7971 "static void *\n"
7972 "threadfunc(void *parm)\n"
7973 "{\n"
7974 "    sleep(5);          // allow main program to set the thread name\n"
7975 "    return NULL;\n"
7976 "}\n"
7977 msgstr ""
7978 "static void *\n"
7979 "threadfunc(void *parm)\n"
7980 "{\n"
7981 "    sleep(5);          // allow main program to set the thread name\n"
7982 "    return NULL;\n"
7983 "}\n"
7984
7985 #. type: Plain text
7986 #: build/C/man3/pthread_setname_np.3:168
7987 #, no-wrap
7988 msgid ""
7989 "int\n"
7990 "main(int argc, char **argv)\n"
7991 "{\n"
7992 "    pthread_t thread;\n"
7993 "    int rc;\n"
7994 "    char thread_name[NAMELEN];\n"
7995 msgstr ""
7996 "int\n"
7997 "main(int argc, char **argv)\n"
7998 "{\n"
7999 "    pthread_t thread;\n"
8000 "    int rc;\n"
8001 "    char thread_name[NAMELEN];\n"
8002
8003 #. type: Plain text
8004 #: build/C/man3/pthread_setname_np.3:172
8005 #, no-wrap
8006 msgid ""
8007 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8008 "    if (rc != 0)\n"
8009 "        errExitEN(rc, \"pthread_create\");\n"
8010 msgstr ""
8011 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8012 "    if (rc != 0)\n"
8013 "        errExitEN(rc, \"pthread_create\");\n"
8014
8015 #. type: Plain text
8016 #: build/C/man3/pthread_setname_np.3:176
8017 #, no-wrap
8018 msgid ""
8019 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8020 "    if (rc != 0)\n"
8021 "        errExitEN(rc, \"pthread_getname_np\");\n"
8022 msgstr ""
8023 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8024 "    if (rc != 0)\n"
8025 "        errExitEN(rc, \"pthread_getname_np\");\n"
8026
8027 #. type: Plain text
8028 #: build/C/man3/pthread_setname_np.3:181
8029 #, no-wrap
8030 msgid ""
8031 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8032 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8033 "    if (rc != 0)\n"
8034 "        errExitEN(rc, \"pthread_setname_np\");\n"
8035 msgstr ""
8036 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8037 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8038 "    if (rc != 0)\n"
8039 "        errExitEN(rc, \"pthread_setname_np\");\n"
8040
8041 #. type: Plain text
8042 #: build/C/man3/pthread_setname_np.3:183
8043 #, no-wrap
8044 msgid "    sleep(2);\n"
8045 msgstr "    sleep(2);\n"
8046
8047 #. type: Plain text
8048 #: build/C/man3/pthread_setname_np.3:189
8049 #, no-wrap
8050 msgid ""
8051 "    rc = pthread_getname_np(thread, thread_name,\n"
8052 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8053 "    if (rc != 0)\n"
8054 "        errExitEN(rc, \"pthread_getname_np\");\n"
8055 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8056 msgstr ""
8057 "    rc = pthread_getname_np(thread, thread_name,\n"
8058 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8059 "    if (rc != 0)\n"
8060 "        errExitEN(rc, \"pthread_getname_np\");\n"
8061 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8062
8063 #. type: Plain text
8064 #: build/C/man3/pthread_setname_np.3:193
8065 #, no-wrap
8066 msgid ""
8067 "    rc = pthread_join(thread, NULL);\n"
8068 "    if (rc != 0)\n"
8069 "        errExitEN(rc, \"pthread_join\");\n"
8070 msgstr ""
8071 "    rc = pthread_join(thread, NULL);\n"
8072 "    if (rc != 0)\n"
8073 "        errExitEN(rc, \"pthread_join\");\n"
8074
8075 #. type: Plain text
8076 #: build/C/man3/pthread_setname_np.3:197
8077 #, no-wrap
8078 msgid ""
8079 "    printf(\"Done\\en\");\n"
8080 "    exit(EXIT_SUCCESS);\n"
8081 "}\n"
8082 msgstr ""
8083 "    printf(\"Done\\en\");\n"
8084 "    exit(EXIT_SUCCESS);\n"
8085 "}\n"
8086
8087 #. type: Plain text
8088 #: build/C/man3/pthread_setname_np.3:204
8089 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8090 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8091
8092 #. type: TH
8093 #: build/C/man3/pthread_setschedparam.3:26
8094 #, no-wrap
8095 msgid "PTHREAD_SETSCHEDPARAM"
8096 msgstr "PTHREAD_SETSCHEDPARAM"
8097
8098 #. type: Plain text
8099 #: build/C/man3/pthread_setschedparam.3:30
8100 msgid ""
8101 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8102 "parameters of a thread"
8103 msgstr ""
8104 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8105 "スケジューリングポリシーとパラメータを設定/取得する"
8106
8107 #. type: Plain text
8108 #: build/C/man3/pthread_setschedparam.3:38
8109 #, no-wrap
8110 msgid ""
8111 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8112 "B<                      const struct sched_param *>I<param>B<);>\n"
8113 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8114 "B<                      struct sched_param *>I<param>B<);>\n"
8115 msgstr ""
8116 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8117 "B<                      const struct sched_param *>I<param>B<);>\n"
8118 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8119 "B<                      struct sched_param *>I<param>B<);>\n"
8120
8121 #. type: Plain text
8122 #: build/C/man3/pthread_setschedparam.3:46
8123 msgid ""
8124 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8125 "parameters of the thread I<thread>."
8126 msgstr ""
8127 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8128 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8129
8130 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8131 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8132 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8133 #. type: Plain text
8134 #: build/C/man3/pthread_setschedparam.3:57
8135 msgid ""
8136 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8137 "values for I<policy>, and their semantics, are described in "
8138 "B<sched_setscheduler>(2)."
8139 msgstr ""
8140 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8141 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8142 "説明されている。"
8143
8144 #. type: Plain text
8145 #: build/C/man3/pthread_setschedparam.3:63
8146 msgid ""
8147 "The structure pointed to by I<param> specifies the new scheduling parameters "
8148 "for I<thread>.  Scheduling parameters are maintained in the following "
8149 "structure:"
8150 msgstr ""
8151 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8152 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8153
8154 #.  FIXME . nptl/pthread_setschedparam.c has the following
8155 #.    /* If the thread should have higher priority because of some
8156 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8157 #.  Eventually (perhaps after writing the mutexattr pages), we
8158 #.  may want to add something on the topic to this page.
8159 #. type: Plain text
8160 #: build/C/man3/pthread_setschedparam.3:104
8161 msgid ""
8162 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8163 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8164 "and I<param>, respectively.  The returned priority value is that set by the "
8165 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8166 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8167 "does not reflect any temporary priority adjustments as a result of calls to "
8168 "any priority inheritance or priority ceiling functions (see, for example, "
8169 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8170 "(3))."
8171 msgstr ""
8172 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8173 "スケジューリングポリシーとパラメータを、\n"
8174 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8175 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8176 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8177 "B<pthread_create> で設定された値となる。\n"
8178 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8179 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8180 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8181 "行われる一時的な優先度の調整の影響を受けない。"
8182
8183 #. type: Plain text
8184 #: build/C/man3/pthread_setschedparam.3:112
8185 msgid ""
8186 "On success, these functions return 0; on error, they return a nonzero error "
8187 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8188 "parameters of I<thread> are not changed."
8189 msgstr ""
8190 "成功すると、これらの関数は 0 を返す。\n"
8191 "エラーの場合、0 以外のエラー番号を返す。\n"
8192 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8193 "スケジューリングポリシーとパラメータは変更されない。"
8194
8195 #. type: Plain text
8196 #: build/C/man3/pthread_setschedparam.3:114
8197 msgid "Both of these functions can fail with the following error:"
8198 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8199
8200 #. type: Plain text
8201 #: build/C/man3/pthread_setschedparam.3:122
8202 msgid ""
8203 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8204 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8205
8206 #. type: Plain text
8207 #: build/C/man3/pthread_setschedparam.3:129
8208 msgid ""
8209 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8210 "the I<policy>."
8211 msgstr ""
8212 "I<policy> が認識できないポリシーであるか、\n"
8213 "I<param> が I<policy> では意味を持たない値である。"
8214
8215 #. type: Plain text
8216 #: build/C/man3/pthread_setschedparam.3:133
8217 msgid ""
8218 "The caller does not have appropriate privileges to set the specified "
8219 "scheduling policy and parameters."
8220 msgstr ""
8221 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8222 "のに必要な特権を持たない。"
8223
8224 #.  .SH VERSIONS
8225 #.  Available since glibc 2.0
8226 #. type: Plain text
8227 #: build/C/man3/pthread_setschedparam.3:141
8228 msgid ""
8229 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8230 "policy or scheduling parameters to an unsupported value\") error for "
8231 "B<pthread_setschedparam>()."
8232 msgstr ""
8233 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8234 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8235 "パラメータに設定しようとした\") も追加で規定されている。"
8236
8237 #. type: Plain text
8238 #: build/C/man3/pthread_setschedparam.3:149
8239 msgid ""
8240 "For a description of the permissions required to, and the effect of, "
8241 "changing a thread's scheduling policy and priority, and details of the "
8242 "permitted ranges for priorities in each scheduling policy, see "
8243 "B<sched_setscheduler>(2)."
8244 msgstr ""
8245 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8246 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8247 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8248
8249 #. type: Plain text
8250 #: build/C/man3/pthread_setschedparam.3:156
8251 msgid ""
8252 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8253 "B<pthread_getschedparam>(), as well as the use of a number of other "
8254 "scheduling-related pthreads functions."
8255 msgstr ""
8256 "以下のプログラムは B<pthread_setschedparam>() と\n"
8257 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8258 "他のいろいろな関数の使用例を示すものである。"
8259
8260 #. type: Plain text
8261 #: build/C/man3/pthread_setschedparam.3:172
8262 msgid ""
8263 "In the following run, the main thread sets its scheduling policy to "
8264 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8265 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8266 "priority attribute of 20.  The program then sets (using "
8267 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8268 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8269 "created using this attributes object should take their scheduling attributes "
8270 "from the thread attributes object.  The program then creates a thread using "
8271 "the thread attributes object, and that thread displays its scheduling policy "
8272 "and priority."
8273 msgstr ""
8274 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8275 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8276 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8277 "属性 20 で初期化する。\n"
8278 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8279 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8280 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8281 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8282 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8283 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8284 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8285
8286 #. type: Plain text
8287 #: build/C/man3/pthread_setschedparam.3:180
8288 #, no-wrap
8289 msgid ""
8290 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8291 "Password:\n"
8292 "# B<./a.out -mf10 -ar20 -i e>\n"
8293 "Scheduler settings of main thread\n"
8294 "    policy=SCHED_FIFO, priority=10\n"
8295 msgstr ""
8296 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8297 "Password:\n"
8298 "# B<./a.out -mf10 -ar20 -i e>\n"
8299 "Scheduler settings of main thread\n"
8300 "    policy=SCHED_FIFO, priority=10\n"
8301
8302 #. type: Plain text
8303 #: build/C/man3/pthread_setschedparam.3:184
8304 #, no-wrap
8305 msgid ""
8306 "Scheduler settings in \\(aqattr\\(aq\n"
8307 "    policy=SCHED_RR, priority=20\n"
8308 "    inheritsched is EXPLICIT\n"
8309 msgstr ""
8310 "Scheduler settings in \\(aqattr\\(aq\n"
8311 "    policy=SCHED_RR, priority=20\n"
8312 "    inheritsched is EXPLICIT\n"
8313
8314 #. type: Plain text
8315 #: build/C/man3/pthread_setschedparam.3:187
8316 #, no-wrap
8317 msgid ""
8318 "Scheduler attributes of new thread\n"
8319 "    policy=SCHED_RR, priority=20\n"
8320 msgstr ""
8321 "Scheduler attributes of new thread\n"
8322 "    policy=SCHED_RR, priority=20\n"
8323
8324 #. type: Plain text
8325 #: build/C/man3/pthread_setschedparam.3:192
8326 msgid ""
8327 "In the above output, one can see that the scheduling policy and priority "
8328 "were taken from the values specified in the thread attributes object."
8329 msgstr ""
8330 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8331 "オブジェクトで指定された値から取られていることが分かる。"
8332
8333 #. type: Plain text
8334 #: build/C/man3/pthread_setschedparam.3:199
8335 msgid ""
8336 "The next run is the same as the previous, except that the inherit scheduler "
8337 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8338 "using the thread attributes object should ignore the scheduling attributes "
8339 "specified in the attributes object and instead take their scheduling "
8340 "attributes from the creating thread."
8341 msgstr ""
8342 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8343 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8344 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8345 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8346 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8347 "ことを意味する。"
8348
8349 #. type: Plain text
8350 #: build/C/man3/pthread_setschedparam.3:205
8351 #, no-wrap
8352 msgid ""
8353 "# B<./a.out -mf10 -ar20 -i i>\n"
8354 "Scheduler settings of main thread\n"
8355 "    policy=SCHED_FIFO, priority=10\n"
8356 msgstr ""
8357 "# B<./a.out -mf10 -ar20 -i i>\n"
8358 "Scheduler settings of main thread\n"
8359 "    policy=SCHED_FIFO, priority=10\n"
8360
8361 #. type: Plain text
8362 #: build/C/man3/pthread_setschedparam.3:209
8363 #, no-wrap
8364 msgid ""
8365 "Scheduler settings in \\(aqattr\\(aq\n"
8366 "    policy=SCHED_RR, priority=20\n"
8367 "    inheritsched is INHERIT\n"
8368 msgstr ""
8369 "Scheduler settings in \\(aqattr\\(aq\n"
8370 "    policy=SCHED_RR, priority=20\n"
8371 "    inheritsched is INHERIT\n"
8372
8373 #. type: Plain text
8374 #: build/C/man3/pthread_setschedparam.3:212
8375 #, no-wrap
8376 msgid ""
8377 "Scheduler attributes of new thread\n"
8378 "    policy=SCHED_FIFO, priority=10\n"
8379 msgstr ""
8380 "Scheduler attributes of new thread\n"
8381 "    policy=SCHED_FIFO, priority=10\n"
8382
8383 #. type: Plain text
8384 #: build/C/man3/pthread_setschedparam.3:218
8385 msgid ""
8386 "In the above output, one can see that the scheduling policy and priority "
8387 "were taken from the creating thread, rather than the thread attributes "
8388 "object."
8389 msgstr ""
8390 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8391 "スレッド属性オブジェクトからではなく、\n"
8392 "スレッドを作成したスレッドから取れれていることが分かる。"
8393
8394 #. type: Plain text
8395 #: build/C/man3/pthread_setschedparam.3:224
8396 msgid ""
8397 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8398 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8399 "scheduler attribute."
8400 msgstr ""
8401 "なお、 I<-i\\ i> を省略した場合でも、\n"
8402 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8403 "出力は同じになる。"
8404
8405 #. type: Plain text
8406 #: build/C/man3/pthread_setschedparam.3:228
8407 #, no-wrap
8408 msgid "/* pthreads_sched_test.c */\n"
8409 msgstr "/* pthreads_sched_test.c */\n"
8410
8411 #. type: Plain text
8412 #: build/C/man3/pthread_setschedparam.3:234
8413 #, no-wrap
8414 msgid ""
8415 "#include E<lt>pthread.hE<gt>\n"
8416 "#include E<lt>stdio.hE<gt>\n"
8417 "#include E<lt>stdlib.hE<gt>\n"
8418 "#include E<lt>unistd.hE<gt>\n"
8419 "#include E<lt>errno.hE<gt>\n"
8420 msgstr ""
8421 "#include E<lt>pthread.hE<gt>\n"
8422 "#include E<lt>stdio.hE<gt>\n"
8423 "#include E<lt>stdlib.hE<gt>\n"
8424 "#include E<lt>unistd.hE<gt>\n"
8425 "#include E<lt>errno.hE<gt>\n"
8426
8427 #. type: Plain text
8428 #: build/C/man3/pthread_setschedparam.3:243
8429 #, no-wrap
8430 msgid ""
8431 "static void\n"
8432 "usage(char *prog_name, char *msg)\n"
8433 "{\n"
8434 "    if (msg != NULL)\n"
8435 "        fputs(msg, stderr);\n"
8436 msgstr ""
8437 "static void\n"
8438 "usage(char *prog_name, char *msg)\n"
8439 "{\n"
8440 "    if (msg != NULL)\n"
8441 "        fputs(msg, stderr);\n"
8442
8443 #. type: Plain text
8444 #: build/C/man3/pthread_setschedparam.3:260
8445 #, no-wrap
8446 msgid ""
8447 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8448 "    fprintf(stderr, \"Options are:\\en\");\n"
8449 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8450 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8451 "    fpe(\"                 thread attributes object\\en\");\n"
8452 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8453 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8454 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8455 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8456 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8457 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8458 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8459 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8460 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8461 "    exit(EXIT_FAILURE);\n"
8462 "}\n"
8463 msgstr ""
8464 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8465 "    fprintf(stderr, \"Options are:\\en\");\n"
8466 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8467 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8468 "    fpe(\"                 thread attributes object\\en\");\n"
8469 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8470 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8471 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8472 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8473 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8474 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8475 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8476 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8477 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8478 "    exit(EXIT_FAILURE);\n"
8479 "}\n"
8480
8481 #. type: Plain text
8482 #: build/C/man3/pthread_setschedparam.3:271
8483 #, no-wrap
8484 msgid ""
8485 "static int\n"
8486 "get_policy(char p, int *policy)\n"
8487 "{\n"
8488 "    switch (p) {\n"
8489 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8490 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8491 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8492 "    default:  return 0;\n"
8493 "    }\n"
8494 "}\n"
8495 msgstr ""
8496 "static int\n"
8497 "get_policy(char p, int *policy)\n"
8498 "{\n"
8499 "    switch (p) {\n"
8500 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8501 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8502 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8503 "    default:  return 0;\n"
8504 "    }\n"
8505 "}\n"
8506
8507 #. type: Plain text
8508 #: build/C/man3/pthread_setschedparam.3:282
8509 #, no-wrap
8510 msgid ""
8511 "static void\n"
8512 "display_sched_attr(int policy, struct sched_param *param)\n"
8513 "{\n"
8514 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8515 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8516 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8517 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8518 "            \"???\",\n"
8519 "            param-E<gt>sched_priority);\n"
8520 "}\n"
8521 msgstr ""
8522 "static void\n"
8523 "display_sched_attr(int policy, struct sched_param *param)\n"
8524 "{\n"
8525 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8526 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8527 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8528 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8529 "            \"???\",\n"
8530 "            param-E<gt>sched_priority);\n"
8531 "}\n"
8532
8533 #. type: Plain text
8534 #: build/C/man3/pthread_setschedparam.3:288
8535 #, no-wrap
8536 msgid ""
8537 "static void\n"
8538 "display_thread_sched_attr(char *msg)\n"
8539 "{\n"
8540 "    int policy, s;\n"
8541 "    struct sched_param param;\n"
8542 msgstr ""
8543 "static void\n"
8544 "display_thread_sched_attr(char *msg)\n"
8545 "{\n"
8546 "    int policy, s;\n"
8547 "    struct sched_param param;\n"
8548
8549 #. type: Plain text
8550 #: build/C/man3/pthread_setschedparam.3:292
8551 #, no-wrap
8552 msgid ""
8553 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8554 "    if (s != 0)\n"
8555 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8556 msgstr ""
8557 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8558 "    if (s != 0)\n"
8559 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8560
8561 #. type: Plain text
8562 #: build/C/man3/pthread_setschedparam.3:296
8563 #, no-wrap
8564 msgid ""
8565 "    printf(\"%s\\en\", msg);\n"
8566 "    display_sched_attr(policy, &param);\n"
8567 "}\n"
8568 msgstr ""
8569 "    printf(\"%s\\en\", msg);\n"
8570 "    display_sched_attr(policy, &param);\n"
8571 "}\n"
8572
8573 #. type: Plain text
8574 #: build/C/man3/pthread_setschedparam.3:301
8575 #, no-wrap
8576 msgid ""
8577 "static void *\n"
8578 "thread_start(void *arg)\n"
8579 "{\n"
8580 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8581 msgstr ""
8582 "static void *\n"
8583 "thread_start(void *arg)\n"
8584 "{\n"
8585 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8586
8587 #. type: Plain text
8588 #: build/C/man3/pthread_setschedparam.3:304
8589 #, no-wrap
8590 msgid ""
8591 "    return NULL;\n"
8592 "}\n"
8593 msgstr ""
8594 "    return NULL;\n"
8595 "}\n"
8596
8597 #. type: Plain text
8598 #: build/C/man3/pthread_setschedparam.3:314
8599 #, no-wrap
8600 msgid ""
8601 "int\n"
8602 "main(int argc, char *argv[])\n"
8603 "{\n"
8604 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8605 "    pthread_t thread;\n"
8606 "    pthread_attr_t attr;\n"
8607 "    pthread_attr_t *attrp;\n"
8608 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8609 "    struct sched_param param;\n"
8610 msgstr ""
8611 "int\n"
8612 "main(int argc, char *argv[])\n"
8613 "{\n"
8614 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8615 "    pthread_t thread;\n"
8616 "    pthread_attr_t attr;\n"
8617 "    pthread_attr_t *attrp;\n"
8618 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8619 "    struct sched_param param;\n"
8620
8621 #. type: Plain text
8622 #: build/C/man3/pthread_setschedparam.3:316
8623 #, no-wrap
8624 msgid "    /* Process command-line options */\n"
8625 msgstr "    /* Process command-line options */\n"
8626
8627 #. type: Plain text
8628 #: build/C/man3/pthread_setschedparam.3:321
8629 #, no-wrap
8630 msgid ""
8631 "    use_null_attrib = 0;\n"
8632 "    attr_sched_str = NULL;\n"
8633 "    main_sched_str = NULL;\n"
8634 "    inheritsched_str = NULL;\n"
8635 msgstr ""
8636 "    use_null_attrib = 0;\n"
8637 "    attr_sched_str = NULL;\n"
8638 "    main_sched_str = NULL;\n"
8639 "    inheritsched_str = NULL;\n"
8640
8641 #. type: Plain text
8642 #: build/C/man3/pthread_setschedparam.3:331
8643 #, no-wrap
8644 msgid ""
8645 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8646 "        switch (opt) {\n"
8647 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8648 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8649 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8650 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8651 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8652 "        }\n"
8653 "    }\n"
8654 msgstr ""
8655 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8656 "        switch (opt) {\n"
8657 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8658 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8659 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8660 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8661 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8662 "        }\n"
8663 "    }\n"
8664
8665 #. type: Plain text
8666 #: build/C/man3/pthread_setschedparam.3:335
8667 #, no-wrap
8668 msgid ""
8669 "    if (use_null_attrib &&\n"
8670 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8671 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8672 msgstr ""
8673 "    if (use_null_attrib &&\n"
8674 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8675 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8676
8677 #. type: Plain text
8678 #: build/C/man3/pthread_setschedparam.3:338
8679 #, no-wrap
8680 msgid ""
8681 "    /* Optionally set scheduling attributes of main thread,\n"
8682 "       and display the attributes */\n"
8683 msgstr ""
8684 "    /* Optionally set scheduling attributes of main thread,\n"
8685 "       and display the attributes */\n"
8686
8687 #. type: Plain text
8688 #: build/C/man3/pthread_setschedparam.3:343
8689 #, no-wrap
8690 msgid ""
8691 "    if (main_sched_str != NULL) {\n"
8692 "        if (!get_policy(main_sched_str[0], &policy))\n"
8693 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8694 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8695 msgstr ""
8696 "    if (main_sched_str != NULL) {\n"
8697 "        if (!get_policy(main_sched_str[0], &policy))\n"
8698 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8699 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8700
8701 #. type: Plain text
8702 #: build/C/man3/pthread_setschedparam.3:348
8703 #, no-wrap
8704 msgid ""
8705 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8706 "        if (s != 0)\n"
8707 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8708 "    }\n"
8709 msgstr ""
8710 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8711 "        if (s != 0)\n"
8712 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8713 "    }\n"
8714
8715 #. type: Plain text
8716 #: build/C/man3/pthread_setschedparam.3:351
8717 #, no-wrap
8718 msgid ""
8719 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8720 "    printf(\"\\en\");\n"
8721 msgstr ""
8722 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8723 "    printf(\"\\en\");\n"
8724
8725 #. type: Plain text
8726 #: build/C/man3/pthread_setschedparam.3:353
8727 #, no-wrap
8728 msgid "    /* Initialize thread attributes object according to options */\n"
8729 msgstr "    /* Initialize thread attributes object according to options */\n"
8730
8731 #. type: Plain text
8732 #: build/C/man3/pthread_setschedparam.3:362
8733 #, no-wrap
8734 msgid ""
8735 "    if (!use_null_attrib) {\n"
8736 "        s = pthread_attr_init(&attr);\n"
8737 "        if (s != 0)\n"
8738 "            handle_error_en(s, \"pthread_attr_init\");\n"
8739 "        attrp = &attr;\n"
8740 "    }\n"
8741 msgstr ""
8742 "    if (!use_null_attrib) {\n"
8743 "        s = pthread_attr_init(&attr);\n"
8744 "        if (s != 0)\n"
8745 "            handle_error_en(s, \"pthread_attr_init\");\n"
8746 "        attrp = &attr;\n"
8747 "    }\n"
8748
8749 #. type: Plain text
8750 #: build/C/man3/pthread_setschedparam.3:370
8751 #, no-wrap
8752 msgid ""
8753 "    if (inheritsched_str != NULL) {\n"
8754 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8755 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8756 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8757 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8758 "        else\n"
8759 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8760 msgstr ""
8761 "    if (inheritsched_str != NULL) {\n"
8762 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8763 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8764 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8765 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8766 "        else\n"
8767 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8768
8769 #. type: Plain text
8770 #: build/C/man3/pthread_setschedparam.3:375
8771 #, no-wrap
8772 msgid ""
8773 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8774 "        if (s != 0)\n"
8775 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8776 "    }\n"
8777 msgstr ""
8778 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8779 "        if (s != 0)\n"
8780 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8781 "    }\n"
8782
8783 #. type: Plain text
8784 #: build/C/man3/pthread_setschedparam.3:381
8785 #, no-wrap
8786 msgid ""
8787 "    if (attr_sched_str != NULL) {\n"
8788 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8789 "            usage(argv[0],\n"
8790 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8791 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8792 msgstr ""
8793 "    if (attr_sched_str != NULL) {\n"
8794 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8795 "            usage(argv[0],\n"
8796 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8797 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8798
8799 #. type: Plain text
8800 #: build/C/man3/pthread_setschedparam.3:389
8801 #, no-wrap
8802 msgid ""
8803 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8804 "        if (s != 0)\n"
8805 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8806 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8807 "        if (s != 0)\n"
8808 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8809 "    }\n"
8810 msgstr ""
8811 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8812 "        if (s != 0)\n"
8813 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8814 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8815 "        if (s != 0)\n"
8816 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8817 "    }\n"
8818
8819 #. type: Plain text
8820 #: build/C/man3/pthread_setschedparam.3:392
8821 #, no-wrap
8822 msgid ""
8823 "    /* If we initialized a thread attributes object, display\n"
8824 "       the scheduling attributes that were set in the object */\n"
8825 msgstr ""
8826 "    /* If we initialized a thread attributes object, display\n"
8827 "       the scheduling attributes that were set in the object */\n"
8828
8829 #. type: Plain text
8830 #: build/C/man3/pthread_setschedparam.3:400
8831 #, no-wrap
8832 msgid ""
8833 "    if (attrp != NULL) {\n"
8834 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8835 "        if (s != 0)\n"
8836 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8837 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8838 "        if (s != 0)\n"
8839 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8840 msgstr ""
8841 "    if (attrp != NULL) {\n"
8842 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8843 "        if (s != 0)\n"
8844 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8845 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8846 "        if (s != 0)\n"
8847 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8848
8849 #. type: Plain text
8850 #: build/C/man3/pthread_setschedparam.3:403
8851 #, no-wrap
8852 msgid ""
8853 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8854 "        display_sched_attr(policy, &param);\n"
8855 msgstr ""
8856 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8857 "        display_sched_attr(policy, &param);\n"
8858
8859 #. type: Plain text
8860 #: build/C/man3/pthread_setschedparam.3:411
8861 #, no-wrap
8862 msgid ""
8863 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8864 "        printf(\"    inheritsched is %s\\en\",\n"
8865 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8866 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8867 "                \"???\");\n"
8868 "        printf(\"\\en\");\n"
8869 "    }\n"
8870 msgstr ""
8871 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8872 "        printf(\"    inheritsched is %s\\en\",\n"
8873 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8874 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8875 "                \"???\");\n"
8876 "        printf(\"\\en\");\n"
8877 "    }\n"
8878
8879 #. type: Plain text
8880 #: build/C/man3/pthread_setschedparam.3:413
8881 #, no-wrap
8882 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8883 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8884
8885 #. type: Plain text
8886 #: build/C/man3/pthread_setschedparam.3:417
8887 #, no-wrap
8888 msgid ""
8889 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8890 "    if (s != 0)\n"
8891 "        handle_error_en(s, \"pthread_create\");\n"
8892 msgstr ""
8893 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8894 "    if (s != 0)\n"
8895 "        handle_error_en(s, \"pthread_create\");\n"
8896
8897 #. type: Plain text
8898 #: build/C/man3/pthread_setschedparam.3:419
8899 #, no-wrap
8900 msgid "    /* Destroy unneeded thread attributes object */\n"
8901 msgstr "    /* Destroy unneeded thread attributes object */\n"
8902
8903 #. type: Plain text
8904 #: build/C/man3/pthread_setschedparam.3:427
8905 #, no-wrap
8906 msgid ""
8907 "    s = pthread_join(thread, NULL);\n"
8908 "    if (s != 0)\n"
8909 "        handle_error_en(s, \"pthread_join\");\n"
8910 msgstr ""
8911 "    s = pthread_join(thread, NULL);\n"
8912 "    if (s != 0)\n"
8913 "        handle_error_en(s, \"pthread_join\");\n"
8914
8915 #. type: Plain text
8916 #: build/C/man3/pthread_setschedparam.3:445
8917 msgid ""
8918 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8919 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8920 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8921 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8922 "B<pthreads>(7)"
8923 msgstr ""
8924 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8925 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8926 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8927 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8928 "B<pthreads>(7)"
8929
8930 #. type: TH
8931 #: build/C/man3/pthread_setschedprio.3:26
8932 #, no-wrap
8933 msgid "PTHREAD_SETSCHEDPRIO"
8934 msgstr "PTHREAD_SETSCHEDPRIO"
8935
8936 #. type: TH
8937 #: build/C/man3/pthread_setschedprio.3:26
8938 #, no-wrap
8939 msgid "2008-11-06"
8940 msgstr "2008-11-06"
8941
8942 #. type: Plain text
8943 #: build/C/man3/pthread_setschedprio.3:29
8944 msgid "pthread_setschedprio - set scheduling priority of a thread"
8945 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8946
8947 #. type: Plain text
8948 #: build/C/man3/pthread_setschedprio.3:34
8949 #, no-wrap
8950 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8951 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8952
8953 #.  FIXME . nptl/pthread_setschedprio.c has the following
8954 #.    /* If the thread should have higher priority because of some
8955 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8956 #.  Eventually (perhaps after writing the mutexattr pages), we
8957 #.  may want to add something on the topic to this page.
8958 #.  nptl/pthread_setschedparam.c has a similar case.
8959 #. type: Plain text
8960 #: build/C/man3/pthread_setschedprio.3:53
8961 msgid ""
8962 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8963 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8964 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8965 "of a thread.)"
8966 msgstr ""
8967 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8968 "優先度に I<prio> で指定された値を設定する\n"
8969 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8970 "と優先度の両方を変更する)。"
8971
8972 #. type: Plain text
8973 #: build/C/man3/pthread_setschedprio.3:61
8974 msgid ""
8975 "On success, this function returns 0; on error, it returns a nonzero error "
8976 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8977 "I<thread> is not changed."
8978 msgstr ""
8979 "成功すると、この関数は 0 を返す。\n"
8980 "エラーの場合、0 以外のエラー番号を返す。\n"
8981 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8982 "スケジューリング優先度は変更されない。"
8983
8984 #. type: Plain text
8985 #: build/C/man3/pthread_setschedprio.3:66
8986 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8987 msgstr ""
8988 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8989
8990 #. type: Plain text
8991 #: build/C/man3/pthread_setschedprio.3:70
8992 msgid ""
8993 "The caller does not have appropriate privileges to set the specified "
8994 "priority."
8995 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8996
8997 #. type: Plain text
8998 #: build/C/man3/pthread_setschedprio.3:81
8999 msgid ""
9000 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
9001 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
9002 msgstr ""
9003 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
9004 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
9005 "に設定しようとした\") も追加で規定されている。"
9006
9007 #. type: Plain text
9008 #: build/C/man3/pthread_setschedprio.3:83
9009 msgid "This function is available in glibc since version 2.3.4."
9010 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
9011
9012 #. type: Plain text
9013 #: build/C/man3/pthread_setschedprio.3:91
9014 msgid ""
9015 "For a description of the permissions required to, and the effect of, "
9016 "changing a thread's scheduling priority, and details of the permitted ranges "
9017 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
9018 msgstr ""
9019 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
9020 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
9021 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
9022
9023 #. type: Plain text
9024 #: build/C/man3/pthread_setschedprio.3:105
9025 msgid ""
9026 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9027 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9028 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9029 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9030 "B<pthreads>(7)"
9031 msgstr ""
9032 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9033 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9034 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9035 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9036 "B<pthreads>(7)"
9037
9038 #. type: TH
9039 #: build/C/man3/pthread_sigmask.3:26
9040 #, no-wrap
9041 msgid "PTHREAD_SIGMASK"
9042 msgstr "PTHREAD_SIGMASK"
9043
9044 #. type: Plain text
9045 #: build/C/man3/pthread_sigmask.3:29
9046 msgid "pthread_sigmask - examine and change mask of blocked signals"
9047 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
9048
9049 #. type: Plain text
9050 #: build/C/man3/pthread_sigmask.3:35
9051 #, no-wrap
9052 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9053 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9054
9055 #. type: Plain text
9056 #: build/C/man3/pthread_sigmask.3:46
9057 msgid ""
9058 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9059 "difference that its use in multithreaded programs is explicitly specified by "
9060 "POSIX.1-2001.  Other differences are noted in this page."
9061 msgstr ""
9062 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9063 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9064 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9065
9066 #. type: Plain text
9067 #: build/C/man3/pthread_sigmask.3:49
9068 msgid ""
9069 "For a description of the arguments and operation of this function, see "
9070 "B<sigprocmask>(2)."
9071 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9072
9073 #. type: Plain text
9074 #: build/C/man3/pthread_sigmask.3:54
9075 msgid ""
9076 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9077 "number."
9078 msgstr ""
9079 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9080 "エラーの場合、エラー番号を返す。"
9081
9082 #. type: Plain text
9083 #: build/C/man3/pthread_sigmask.3:57
9084 msgid "See B<sigprocmask>(2)."
9085 msgstr "B<sigprocmask>(2) を参照。"
9086
9087 #. type: Plain text
9088 #: build/C/man3/pthread_sigmask.3:61
9089 msgid "A new thread inherits a copy of its creator's signal mask."
9090 msgstr ""
9091 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9092 "継承する。"
9093
9094 #. type: Plain text
9095 #: build/C/man3/pthread_sigmask.3:66
9096 msgid ""
9097 "The program below blocks some signals in the main thread, and then creates a "
9098 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9099 "shell session demonstrates its use:"
9100 msgstr ""
9101 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9102 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9103 "専用のスレッドを作成する。\n"
9104 "下記のシェルのセッションはその利用例を示したものである。"
9105
9106 #. type: Plain text
9107 #: build/C/man3/pthread_sigmask.3:77
9108 #, no-wrap
9109 msgid ""
9110 "$B< ./a.out &>\n"
9111 "[1] 5423\n"
9112 "$B< kill -QUIT %1>\n"
9113 "Signal handling thread got signal 3\n"
9114 "$B< kill -USR1 %1>\n"
9115 "Signal handling thread got signal 10\n"
9116 "$B< kill -TERM %1>\n"
9117 "[1]+  Terminated              ./a.out\n"
9118 msgstr ""
9119 "$B< ./a.out &>\n"
9120 "[1] 5423\n"
9121 "$B< kill -QUIT %1>\n"
9122 "Signal handling thread got signal 3\n"
9123 "$B< kill -USR1 %1>\n"
9124 "Signal handling thread got signal 10\n"
9125 "$B< kill -TERM %1>\n"
9126 "[1]+  Terminated              ./a.out\n"
9127
9128 #. type: Plain text
9129 #: build/C/man3/pthread_sigmask.3:88
9130 #, no-wrap
9131 msgid ""
9132 "#include E<lt>pthread.hE<gt>\n"
9133 "#include E<lt>stdio.hE<gt>\n"
9134 "#include E<lt>stdlib.hE<gt>\n"
9135 "#include E<lt>unistd.hE<gt>\n"
9136 "#include E<lt>signal.hE<gt>\n"
9137 "#include E<lt>errno.hE<gt>\n"
9138 msgstr ""
9139 "#include E<lt>pthread.hE<gt>\n"
9140 "#include E<lt>stdio.hE<gt>\n"
9141 "#include E<lt>stdlib.hE<gt>\n"
9142 "#include E<lt>unistd.hE<gt>\n"
9143 "#include E<lt>signal.hE<gt>\n"
9144 "#include E<lt>errno.hE<gt>\n"
9145
9146 #. type: Plain text
9147 #: build/C/man3/pthread_sigmask.3:90
9148 #, no-wrap
9149 msgid "/* Simple error handling functions */\n"
9150 msgstr "/* Simple error handling functions */\n"
9151
9152 #. type: Plain text
9153 #: build/C/man3/pthread_sigmask.3:99
9154 #, no-wrap
9155 msgid ""
9156 "static void *\n"
9157 "sig_thread(void *arg)\n"
9158 "{\n"
9159 "    sigset_t *set = arg;\n"
9160 "    int s, sig;\n"
9161 msgstr ""
9162 "static void *\n"
9163 "sig_thread(void *arg)\n"
9164 "{\n"
9165 "    sigset_t *set = arg;\n"
9166 "    int s, sig;\n"
9167
9168 #. type: Plain text
9169 #: build/C/man3/pthread_sigmask.3:107
9170 #, no-wrap
9171 msgid ""
9172 "    for (;;) {\n"
9173 "        s = sigwait(set, &sig);\n"
9174 "        if (s != 0)\n"
9175 "            handle_error_en(s, \"sigwait\");\n"
9176 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9177 "    }\n"
9178 "}\n"
9179 msgstr ""
9180 "    for (;;) {\n"
9181 "        s = sigwait(set, &sig);\n"
9182 "        if (s != 0)\n"
9183 "            handle_error_en(s, \"sigwait\");\n"
9184 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9185 "    }\n"
9186 "}\n"
9187
9188 #. type: Plain text
9189 #: build/C/man3/pthread_sigmask.3:114
9190 #, no-wrap
9191 msgid ""
9192 "int\n"
9193 "main(int argc, char *argv[])\n"
9194 "{\n"
9195 "    pthread_t thread;\n"
9196 "    sigset_t set;\n"
9197 "    int s;\n"
9198 msgstr ""
9199 "int\n"
9200 "main(int argc, char *argv[])\n"
9201 "{\n"
9202 "    pthread_t thread;\n"
9203 "    sigset_t set;\n"
9204 "    int s;\n"
9205
9206 #. type: Plain text
9207 #: build/C/man3/pthread_sigmask.3:117
9208 #, no-wrap
9209 msgid ""
9210 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9211 "       will inherit a copy of the signal mask. */\n"
9212 msgstr ""
9213 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9214 "       will inherit a copy of the signal mask. */\n"
9215
9216 #. type: Plain text
9217 #: build/C/man3/pthread_sigmask.3:124
9218 #, no-wrap
9219 msgid ""
9220 "    sigemptyset(&set);\n"
9221 "    sigaddset(&set, SIGQUIT);\n"
9222 "    sigaddset(&set, SIGUSR1);\n"
9223 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9224 "    if (s != 0)\n"
9225 "        handle_error_en(s, \"pthread_sigmask\");\n"
9226 msgstr ""
9227 "    sigemptyset(&set);\n"
9228 "    sigaddset(&set, SIGQUIT);\n"
9229 "    sigaddset(&set, SIGUSR1);\n"
9230 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9231 "    if (s != 0)\n"
9232 "        handle_error_en(s, \"pthread_sigmask\");\n"
9233
9234 #. type: Plain text
9235 #: build/C/man3/pthread_sigmask.3:128
9236 #, no-wrap
9237 msgid ""
9238 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9239 "    if (s != 0)\n"
9240 "        handle_error_en(s, \"pthread_create\");\n"
9241 msgstr ""
9242 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9243 "    if (s != 0)\n"
9244 "        handle_error_en(s, \"pthread_create\");\n"
9245
9246 #. type: Plain text
9247 #: build/C/man3/pthread_sigmask.3:131
9248 #, no-wrap
9249 msgid ""
9250 "    /* Main thread carries on to create other threads and/or do\n"
9251 "       other work */\n"
9252 msgstr ""
9253 "    /* Main thread carries on to create other threads and/or do\n"
9254 "       other work */\n"
9255
9256 #. type: Plain text
9257 #: build/C/man3/pthread_sigmask.3:134
9258 #, no-wrap
9259 msgid ""
9260 "    pause();            /* Dummy pause so we can test program */\n"
9261 "}\n"
9262 msgstr ""
9263 "    pause();            /* Dummy pause so we can test program */\n"
9264 "}\n"
9265
9266 #. type: Plain text
9267 #: build/C/man3/pthread_sigmask.3:144
9268 msgid ""
9269 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9270 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9271 msgstr ""
9272 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9273 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9274
9275 #. type: TH
9276 #: build/C/man3/pthread_sigqueue.3:25
9277 #, no-wrap
9278 msgid "PTHREAD_SIGQUEUE"
9279 msgstr "PTHREAD_SIGQUEUE"
9280
9281 #. type: Plain text
9282 #: build/C/man3/pthread_sigqueue.3:28
9283 msgid "pthread_sigqueue - queue a signal and data to a thread"
9284 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9285
9286 #. type: Plain text
9287 #: build/C/man3/pthread_sigqueue.3:34
9288 #, no-wrap
9289 msgid ""
9290 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9291 "B<                     const union sigval >I<value>B<);>\n"
9292 msgstr ""
9293 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9294 "B<                     const union sigval >I<value>B<);>\n"
9295
9296 #. type: Plain text
9297 #: build/C/man3/pthread_sigqueue.3:45
9298 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9299 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9300
9301 #. type: Plain text
9302 #: build/C/man3/pthread_sigqueue.3:53
9303 msgid ""
9304 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9305 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9306 "thread in the same process as the calling thread."
9307 msgstr ""
9308 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9309 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9310 "同じプロセス内のスレッドにシグナルを送信する。"
9311
9312 #. type: Plain text
9313 #: build/C/man3/pthread_sigqueue.3:65
9314 msgid ""
9315 "The I<thread> argument is the ID of a thread in the same process as the "
9316 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9317 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9318 "details."
9319 msgstr ""
9320 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9321 "I<sig> 引き数は送信するシグナルを指定する。\n"
9322 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9323 "詳細は B<sigqueue>(3) を参照。"
9324
9325 #. type: Plain text
9326 #: build/C/man3/pthread_sigqueue.3:70
9327 msgid ""
9328 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9329 "number."
9330 msgstr ""
9331 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9332 "エラーの場合、エラー番号を返す。"
9333
9334 #. type: Plain text
9335 #: build/C/man3/pthread_sigqueue.3:77
9336 msgid ""
9337 "The limit of signals which may be queued has been reached.  (See B<signal>"
9338 "(7)  for further information.)"
9339 msgstr ""
9340 "キューに入れられるシグナル数が上限に達していた\n"
9341 "(詳しい情報は (B<signal>(7) を参照)。"
9342
9343 #. type: Plain text
9344 #: build/C/man3/pthread_sigqueue.3:81
9345 msgid "I<sig> was invalid."
9346 msgstr "I<sig> が無効であった。"
9347
9348 #. type: TP
9349 #: build/C/man3/pthread_sigqueue.3:81
9350 #, no-wrap
9351 msgid "B<ENOSYS>"
9352 msgstr "B<ENOSYS>"
9353
9354 #. type: Plain text
9355 #: build/C/man3/pthread_sigqueue.3:85
9356 msgid "B<pthread_sigqueue>()  is not supported on this system."
9357 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9358
9359 #. type: Plain text
9360 #: build/C/man3/pthread_sigqueue.3:89
9361 msgid "I<thread> is not valid."
9362 msgstr "I<thread> が無効である。"
9363
9364 #. type: Plain text
9365 #: build/C/man3/pthread_sigqueue.3:93
9366 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9367 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9368
9369 #. type: Plain text
9370 #: build/C/man3/pthread_sigqueue.3:95
9371 msgid "This function is a GNU extension."
9372 msgstr "この関数は GNU による拡張である。"
9373
9374 #. type: Plain text
9375 #: build/C/man3/pthread_sigqueue.3:103
9376 msgid ""
9377 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9378 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9379 msgstr ""
9380 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9381 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9382
9383 #. type: TH
9384 #: build/C/man3/pthread_testcancel.3:26
9385 #, no-wrap
9386 msgid "PTHREAD_TESTCANCEL"
9387 msgstr "PTHREAD_TESTCANCEL"
9388
9389 #. type: TH
9390 #: build/C/man3/pthread_testcancel.3:26
9391 #, no-wrap
9392 msgid "2012-04-14"
9393 msgstr "2012-04-14"
9394
9395 #. type: Plain text
9396 #: build/C/man3/pthread_testcancel.3:29
9397 msgid ""
9398 "pthread_testcancel - request delivery of any pending cancellation request"
9399 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9400
9401 #. type: Plain text
9402 #: build/C/man3/pthread_testcancel.3:34
9403 #, no-wrap
9404 msgid "B<void pthread_testcancel(void);>\n"
9405 msgstr "B<void pthread_testcancel(void);>\n"
9406
9407 #. type: Plain text
9408 #: build/C/man3/pthread_testcancel.3:43
9409 msgid ""
9410 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9411 "calling thread, so that a thread that is otherwise executing code that "
9412 "contains no cancellation points will respond to a cancellation request."
9413 msgstr ""
9414 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9415 "ポイント (cancellation point) が作成される。\n"
9416 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9417 "いるスレッドが取り消し要求に対応することができるようになる。"
9418
9419 #. type: Plain text
9420 #: build/C/man3/pthread_testcancel.3:50
9421 msgid ""
9422 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9423 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9424 "no effect."
9425 msgstr ""
9426 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9427 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9428 "呼び出しても何の影響もない。"
9429
9430 #. type: Plain text
9431 #: build/C/man3/pthread_testcancel.3:54
9432 msgid ""
9433 "This function does not return a value.  If the calling thread is canceled as "
9434 "a consequence of a call to this function, then the function does not return."
9435 msgstr ""
9436 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9437 "キャンセルされた場合、この関数が返ることはない。"
9438
9439 #. type: Plain text
9440 #: build/C/man3/pthread_testcancel.3:63
9441 msgid "See B<pthread_cleanup_push>(3)."
9442 msgstr "B<pthread_cleanup_push>(3) を参照。"
9443
9444 #. type: Plain text
9445 #: build/C/man3/pthread_testcancel.3:68
9446 msgid ""
9447 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9448 "(3), B<pthreads>(7)"
9449 msgstr ""
9450 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9451 "(3), B<pthreads>(7)"
9452
9453 #. type: TH
9454 #: build/C/man3/pthread_tryjoin_np.3:26
9455 #, no-wrap
9456 msgid "PTHREAD_TRYJOIN_NP"
9457 msgstr "PTHREAD_TRYJOIN_NP"
9458
9459 #. type: Plain text
9460 #: build/C/man3/pthread_tryjoin_np.3:30
9461 msgid ""
9462 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9463 "thread"
9464 msgstr ""
9465 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9466 "試みる"
9467
9468 #. type: Plain text
9469 #: build/C/man3/pthread_tryjoin_np.3:36
9470 #, no-wrap
9471 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9472 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9473
9474 #. type: Plain text
9475 #: build/C/man3/pthread_tryjoin_np.3:39
9476 #, no-wrap
9477 msgid ""
9478 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9479 "B<                         const struct timespec *>I<abstime>B<);>\n"
9480 msgstr ""
9481 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9482 "B<                         const struct timespec *>I<abstime>B<);>\n"
9483
9484 #. type: Plain text
9485 #: build/C/man3/pthread_tryjoin_np.3:46
9486 msgid ""
9487 "These functions operate in the same way as B<pthread_join>(3), except for "
9488 "the differences described on this page."
9489 msgstr ""
9490 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9491 "このページで説明する違いがある。"
9492
9493 #. type: Plain text
9494 #: build/C/man3/pthread_tryjoin_np.3:58
9495 msgid ""
9496 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9497 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9498 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9499 "B<pthread_join>(3), the call returns an error."
9500 msgstr ""
9501 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9502 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9503 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9504 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9505
9506 #. type: Plain text
9507 #: build/C/man3/pthread_tryjoin_np.3:76
9508 msgid ""
9509 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9510 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9511 "specified in I<abstime>.  If the timeout expires before I<thread> "
9512 "terminates, the call returns an error.  The I<abstime> argument is a "
9513 "structure of the following form, specifying an absolute time measured since "
9514 "the Epoch (see B<time>(2)):"
9515 msgstr ""
9516 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9517 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9518 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9519 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9520 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9521
9522 #. type: Plain text
9523 #: build/C/man3/pthread_tryjoin_np.3:83
9524 #, no-wrap
9525 msgid ""
9526 "struct timespec {\n"
9527 "    time_t tv_sec;     /* seconds */\n"
9528 "    long   tv_nsec;    /* nanoseconds */\n"
9529 "};\n"
9530 msgstr ""
9531 "struct timespec {\n"
9532 "    time_t tv_sec;     /* seconds */\n"
9533 "    long   tv_nsec;    /* nanoseconds */\n"
9534 "};\n"
9535
9536 #. type: Plain text
9537 #: build/C/man3/pthread_tryjoin_np.3:89
9538 msgid ""
9539 "On success, these functions return 0; on error, they return an error number."
9540 msgstr ""
9541 "成功すると、これらの関数は 0 を返す。\n"
9542 "エラーの場合、エラー番号を返す。"
9543
9544 #. type: Plain text
9545 #: build/C/man3/pthread_tryjoin_np.3:94
9546 msgid ""
9547 "These functions can fail with the same errors as B<pthread_join>(3).  "
9548 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9549 msgstr ""
9550 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9551 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9552
9553 #. type: TP
9554 #: build/C/man3/pthread_tryjoin_np.3:94
9555 #, no-wrap
9556 msgid "B<EBUSY>"
9557 msgstr "B<EBUSY>"
9558
9559 #. type: Plain text
9560 #: build/C/man3/pthread_tryjoin_np.3:98
9561 msgid "I<thread> had not yet terminated at the time of the call."
9562 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9563
9564 #. type: Plain text
9565 #: build/C/man3/pthread_tryjoin_np.3:101
9566 msgid ""
9567 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9568 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9569
9570 #. type: TP
9571 #: build/C/man3/pthread_tryjoin_np.3:101
9572 #, no-wrap
9573 msgid "B<ETIMEDOUT>"
9574 msgstr "B<ETIMEDOUT>"
9575
9576 #. type: Plain text
9577 #: build/C/man3/pthread_tryjoin_np.3:106
9578 msgid "The call timed out before I<thread> terminated."
9579 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9580
9581 #. type: Plain text
9582 #: build/C/man3/pthread_tryjoin_np.3:110
9583 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9584 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9585
9586 #. type: Plain text
9587 #: build/C/man3/pthread_tryjoin_np.3:112
9588 msgid "These functions first appeared in glibc in version 2.3.3."
9589 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9590
9591 #. type: Plain text
9592 #: build/C/man3/pthread_tryjoin_np.3:117
9593 msgid "The following code waits to join for up to 5 seconds:"
9594 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9595
9596 #. type: Plain text
9597 #: build/C/man3/pthread_tryjoin_np.3:121
9598 #, no-wrap
9599 msgid ""
9600 "    struct timespec ts;\n"
9601 "    int s;\n"
9602 msgstr ""
9603 "    struct timespec ts;\n"
9604 "    int s;\n"
9605
9606 #. type: Plain text
9607 #: build/C/man3/pthread_tryjoin_np.3:123
9608 #, no-wrap
9609 msgid "    ...\n"
9610 msgstr "    ...\n"
9611
9612 #. type: Plain text
9613 #: build/C/man3/pthread_tryjoin_np.3:127
9614 #, no-wrap
9615 msgid ""
9616 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9617 "\t/* Handle error */\n"
9618 "    }\n"
9619 msgstr ""
9620 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9621 "\t/* Handle error */\n"
9622 "    }\n"
9623
9624 #. type: Plain text
9625 #: build/C/man3/pthread_tryjoin_np.3:129
9626 #, no-wrap
9627 msgid "    ts.tv_sec += 5;\n"
9628 msgstr "    ts.tv_sec += 5;\n"
9629
9630 #. type: Plain text
9631 #: build/C/man3/pthread_tryjoin_np.3:134
9632 #, no-wrap
9633 msgid ""
9634 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9635 "    if (s != 0) {\n"
9636 "        /* Handle error */\n"
9637 "    }\n"
9638 msgstr ""
9639 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9640 "    if (s != 0) {\n"
9641 "        /* Handle error */\n"
9642 "    }\n"
9643
9644 #. type: Plain text
9645 #: build/C/man3/pthread_tryjoin_np.3:140
9646 msgid ""
9647 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9648 msgstr ""
9649 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9650
9651 #. type: TH
9652 #: build/C/man3/pthread_yield.3:25
9653 #, no-wrap
9654 msgid "PTHREAD_YIELD"
9655 msgstr "PTHREAD_YIELD"
9656
9657 #. type: TH
9658 #: build/C/man3/pthread_yield.3:25
9659 #, no-wrap
9660 msgid "2013-03-05"
9661 msgstr "2013-03-05"
9662
9663 #. type: Plain text
9664 #: build/C/man3/pthread_yield.3:28
9665 msgid "pthread_yield - yield the processor"
9666 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9667
9668 #. type: Plain text
9669 #: build/C/man3/pthread_yield.3:34
9670 #, no-wrap
9671 msgid "B<int pthread_yield(void);>\n"
9672 msgstr "B<int pthread_yield(void);>\n"
9673
9674 #. type: Plain text
9675 #: build/C/man3/pthread_yield.3:44
9676 msgid ""
9677 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9678 "thread is placed at the end of the run queue for its static priority and "
9679 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9680 "(2)"
9681 msgstr ""
9682 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9683 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9684 "別のスレッドが実行されるようにスケジューリングされる。\n"
9685 "詳細は B<sched_yield>(2) を参照。"
9686
9687 #. type: Plain text
9688 #: build/C/man3/pthread_yield.3:49
9689 msgid ""
9690 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9691 "number."
9692 msgstr ""
9693 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9694 "エラーの場合、エラー番号を返す。"
9695
9696 #. type: Plain text
9697 #: build/C/man3/pthread_yield.3:53
9698 msgid ""
9699 "On Linux, this call always succeeds (but portable and future-proof "
9700 "applications should nevertheless handle a possible error return)."
9701 msgstr ""
9702 "Linux では、この関数の呼び出しは常に成功する\n"
9703 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9704 "正のエラーの返り値を処理するようにすべきである)。"
9705
9706 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9707 #. type: Plain text
9708 #: build/C/man3/pthread_yield.3:59
9709 msgid ""
9710 "This call is nonstandard, but present on several other systems.  Use the "
9711 "standardized B<sched_yield>(2)  instead."
9712 msgstr ""
9713 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9714 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9715
9716 #. type: Plain text
9717 #: build/C/man3/pthread_yield.3:62
9718 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9719 msgstr ""
9720 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9721
9722 #. type: Plain text
9723 #: build/C/man3/pthread_yield.3:66
9724 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9725 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9726
9727 #. type: TH
9728 #: build/C/man7/pthreads.7:26
9729 #, no-wrap
9730 msgid "PTHREADS"
9731 msgstr "PTHREADS"
9732
9733 #. type: TH
9734 #: build/C/man7/pthreads.7:26
9735 #, no-wrap
9736 msgid "2010-11-14"
9737 msgstr "2010-11-14"
9738
9739 #. type: Plain text
9740 #: build/C/man7/pthreads.7:29
9741 msgid "pthreads - POSIX threads"
9742 msgstr "pthreads - POSIX スレッド"
9743
9744 #. type: Plain text
9745 #: build/C/man7/pthreads.7:36
9746 msgid ""
9747 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9748 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9749 "can contain multiple threads, all of which are executing the same program.  "
9750 "These threads share the same global memory (data and heap segments), but "
9751 "each thread has its own stack (automatic variables)."
9752 msgstr ""
9753 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9754 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9755 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9756 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9757 "スレッドは自分専用のスタック (自動変数) を持つ。"
9758
9759 #. type: Plain text
9760 #: build/C/man7/pthreads.7:39
9761 msgid ""
9762 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9763 "these attributes are process-wide rather than per-thread):"
9764 msgstr ""
9765 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9766 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9767
9768 #. type: IP
9769 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9770 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9771 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9772 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9773 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9774 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9775 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9776 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9777 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9778 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9779 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9780 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9781 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9782 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9783 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9784 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9785 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9786 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9787 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9788 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9789 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9790 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9791 #: build/C/man7/pthreads.7:835
9792 #, no-wrap
9793 msgid "-"
9794 msgstr "-"
9795
9796 #. type: Plain text
9797 #: build/C/man7/pthreads.7:41
9798 msgid "process ID"
9799 msgstr "プロセス ID"
9800
9801 #. type: Plain text
9802 #: build/C/man7/pthreads.7:43
9803 msgid "parent process ID"
9804 msgstr "親プロセス ID"
9805
9806 #. type: Plain text
9807 #: build/C/man7/pthreads.7:45
9808 msgid "process group ID and session ID"
9809 msgstr "プロセスグループ ID とセッション ID"
9810
9811 #. type: Plain text
9812 #: build/C/man7/pthreads.7:47
9813 msgid "controlling terminal"
9814 msgstr "制御端末"
9815
9816 #. type: Plain text
9817 #: build/C/man7/pthreads.7:49
9818 msgid "user and group IDs"
9819 msgstr "ユーザ ID とグループ ID"
9820
9821 #. type: Plain text
9822 #: build/C/man7/pthreads.7:51
9823 msgid "open file descriptors"
9824 msgstr "オープンするファイルディスクリプタ"
9825
9826 #. type: Plain text
9827 #: build/C/man7/pthreads.7:54
9828 msgid "record locks (see B<fcntl>(2))"
9829 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9830
9831 #. type: Plain text
9832 #: build/C/man7/pthreads.7:56
9833 msgid "signal dispositions"
9834 msgstr "シグナルの配置"
9835
9836 #. type: Plain text
9837 #: build/C/man7/pthreads.7:59
9838 msgid "file mode creation mask (B<umask>(2))"
9839 msgstr "ファイルモード作成マスク (B<umask>(2))"
9840
9841 #. type: Plain text
9842 #: build/C/man7/pthreads.7:65
9843 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9844 msgstr ""
9845 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9846
9847 #. type: Plain text
9848 #: build/C/man7/pthreads.7:70
9849 msgid ""
9850 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9851 msgstr ""
9852 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9853
9854 #. type: Plain text
9855 #: build/C/man7/pthreads.7:73
9856 msgid "nice value (B<setpriority>(2))"
9857 msgstr "nice 値 (B<setpriority>(2))"
9858
9859 #. type: Plain text
9860 #: build/C/man7/pthreads.7:76
9861 msgid "resource limits (B<setrlimit>(2))"
9862 msgstr "リソース制限 (B<setrlimit>(2))"
9863
9864 #. type: Plain text
9865 #: build/C/man7/pthreads.7:81
9866 msgid ""
9867 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9868 "(B<getrusage>(2))"
9869 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9870
9871 #. type: Plain text
9872 #: build/C/man7/pthreads.7:84
9873 msgid ""
9874 "As well as the stack, POSIX.1 specifies that various other attributes are "
9875 "distinct for each thread, including:"
9876 msgstr ""
9877 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9878 "るかを規定している:"
9879
9880 #. type: Plain text
9881 #: build/C/man7/pthreads.7:88
9882 msgid "thread ID (the I<pthread_t> data type)"
9883 msgstr "スレッド ID (B<pthread_t> データ型)"
9884
9885 #. type: Plain text
9886 #: build/C/man7/pthreads.7:91
9887 msgid "signal mask (B<pthread_sigmask>(3))"
9888 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9889
9890 #. type: Plain text
9891 #: build/C/man7/pthreads.7:95
9892 msgid "the I<errno> variable"
9893 msgstr "I<errno> 変数"
9894
9895 #. type: Plain text
9896 #: build/C/man7/pthreads.7:98
9897 msgid "alternate signal stack (B<sigaltstack>(2))"
9898 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9899
9900 #. type: Plain text
9901 #: build/C/man7/pthreads.7:103
9902 msgid ""
9903 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9904 "B<sched_setparam>(2))"
9905 msgstr ""
9906 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9907 "と B<sched_setparam>(2))"
9908
9909 #. type: Plain text
9910 #: build/C/man7/pthreads.7:105
9911 msgid "The following Linux-specific features are also per-thread:"
9912 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9913
9914 #. type: Plain text
9915 #: build/C/man7/pthreads.7:108
9916 msgid "capabilities (see B<capabilities>(7))"
9917 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9918
9919 #. type: Plain text
9920 #: build/C/man7/pthreads.7:111
9921 msgid "CPU affinity (B<sched_setaffinity>(2))"
9922 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9923
9924 #. type: SS
9925 #: build/C/man7/pthreads.7:111
9926 #, no-wrap
9927 msgid "Pthreads function return values"
9928 msgstr "pthreads 関数の返り値"
9929
9930 #. type: Plain text
9931 #: build/C/man7/pthreads.7:118
9932 msgid ""
9933 "Most pthreads functions return 0 on success, and an error number of "
9934 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9935 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9936 "the function can never fail with the error B<EINTR>."
9937 msgstr ""
9938 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9939 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9940 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9941 "は決してないと規定している。"
9942
9943 #. type: SS
9944 #: build/C/man7/pthreads.7:118
9945 #, no-wrap
9946 msgid "Thread IDs"
9947 msgstr "スレッド ID"
9948
9949 #. type: Plain text
9950 #: build/C/man7/pthreads.7:132
9951 msgid ""
9952 "Each of the threads in a process has a unique thread identifier (stored in "
9953 "the type I<pthread_t>).  This identifier is returned to the caller of "
9954 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9955 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
9956 "within a process.  A thread ID may be reused after a terminated thread has "
9957 "been joined, or a detached thread has terminated.  In all pthreads functions "
9958 "that accept a thread ID as an argument, that ID by definition refers to a "
9959 "thread in the same process as the caller."
9960 msgstr ""
9961 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9962 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9963 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9964 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9965 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9966 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9967 "じプロセス内の一つのスレッドを参照する。"
9968
9969 #. type: SS
9970 #: build/C/man7/pthreads.7:132
9971 #, no-wrap
9972 msgid "Thread-safe functions"
9973 msgstr "スレッドセーフな関数"
9974
9975 #. type: Plain text
9976 #: build/C/man7/pthreads.7:136
9977 msgid ""
9978 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9979 "same results regardless of whether it is)  called from multiple threads at "
9980 "the same time."
9981 msgstr ""
9982 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9983 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9984
9985 #. type: Plain text
9986 #: build/C/man7/pthreads.7:140
9987 msgid ""
9988 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9989 "standard shall be thread-safe, except for the following functions:"
9990 msgstr ""
9991 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9992 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9993
9994 #. type: Plain text
9995 #: build/C/man7/pthreads.7:234
9996 #, no-wrap
9997 msgid ""
9998 "asctime()\n"
9999 "basename()\n"
10000 "catgets()\n"
10001 "crypt()\n"
10002 "ctermid() if passed a non-NULL argument\n"
10003 "ctime()\n"
10004 "dbm_clearerr()\n"
10005 "dbm_close()\n"
10006 "dbm_delete()\n"
10007 "dbm_error()\n"
10008 "dbm_fetch()\n"
10009 "dbm_firstkey()\n"
10010 "dbm_nextkey()\n"
10011 "dbm_open()\n"
10012 "dbm_store()\n"
10013 "dirname()\n"
10014 "dlerror()\n"
10015 "drand48()\n"
10016 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10017 "encrypt()\n"
10018 "endgrent()\n"
10019 "endpwent()\n"
10020 "endutxent()\n"
10021 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10022 "ftw()\n"
10023 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10024 "getc_unlocked()\n"
10025 "getchar_unlocked()\n"
10026 "getdate()\n"
10027 "getenv()\n"
10028 "getgrent()\n"
10029 "getgrgid()\n"
10030 "getgrnam()\n"
10031 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10032 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10033 "gethostent()\n"
10034 "getlogin()\n"
10035 "getnetbyaddr()\n"
10036 "getnetbyname()\n"
10037 "getnetent()\n"
10038 "getopt()\n"
10039 "getprotobyname()\n"
10040 "getprotobynumber()\n"
10041 "getprotoent()\n"
10042 "getpwent()\n"
10043 "getpwnam()\n"
10044 "getpwuid()\n"
10045 "getservbyname()\n"
10046 "getservbyport()\n"
10047 "getservent()\n"
10048 "getutxent()\n"
10049 "getutxid()\n"
10050 "getutxline()\n"
10051 "gmtime()\n"
10052 "hcreate()\n"
10053 "hdestroy()\n"
10054 "hsearch()\n"
10055 "inet_ntoa()\n"
10056 "l64a()\n"
10057 "lgamma()\n"
10058 "lgammaf()\n"
10059 "lgammal()\n"
10060 "localeconv()\n"
10061 "localtime()\n"
10062 "lrand48()\n"
10063 "mrand48()\n"
10064 "nftw()\n"
10065 "nl_langinfo()\n"
10066 "ptsname()\n"
10067 "putc_unlocked()\n"
10068 "putchar_unlocked()\n"
10069 "putenv()\n"
10070 "pututxline()\n"
10071 "rand()\n"
10072 "readdir()\n"
10073 "setenv()\n"
10074 "setgrent()\n"
10075 "setkey()\n"
10076 "setpwent()\n"
10077 "setutxent()\n"
10078 "strerror()\n"
10079 "strsignal() [Added in POSIX.1-2008]\n"
10080 "strtok()\n"
10081 "system() [Added in POSIX.1-2008]\n"
10082 "tmpnam() if passed a non-NULL argument\n"
10083 "ttyname()\n"
10084 "unsetenv()\n"
10085 "wcrtomb() if its final argument is NULL\n"
10086 "wcsrtombs() if its final argument is NULL\n"
10087 "wcstombs()\n"
10088 "wctomb()\n"
10089 msgstr ""
10090 "asctime()\n"
10091 "basename()\n"
10092 "catgets()\n"
10093 "crypt()\n"
10094 "ctermid() (NULL でない引き数を渡された場合)\n"
10095 "ctime()\n"
10096 "dbm_clearerr()\n"
10097 "dbm_close()\n"
10098 "dbm_delete()\n"
10099 "dbm_error()\n"
10100 "dbm_fetch()\n"
10101 "dbm_firstkey()\n"
10102 "dbm_nextkey()\n"
10103 "dbm_open()\n"
10104 "dbm_store()\n"
10105 "dirname()\n"
10106 "dlerror()\n"
10107 "drand48()\n"
10108 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10109 "encrypt()\n"
10110 "endgrent()\n"
10111 "endpwent()\n"
10112 "endutxent()\n"
10113 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10114 "ftw()\n"
10115 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10116 "getc_unlocked()\n"
10117 "getchar_unlocked()\n"
10118 "getdate()\n"
10119 "getenv()\n"
10120 "getgrent()\n"
10121 "getgrgid()\n"
10122 "getgrnam()\n"
10123 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10124 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10125 "gethostent()\n"
10126 "getlogin()\n"
10127 "getnetbyaddr()\n"
10128 "getnetbyname()\n"
10129 "getnetent()\n"
10130 "getopt()\n"
10131 "getprotobyname()\n"
10132 "getprotobynumber()\n"
10133 "getprotoent()\n"
10134 "getpwent()\n"
10135 "getpwnam()\n"
10136 "getpwuid()\n"
10137 "getservbyname()\n"
10138 "getservbyport()\n"
10139 "getservent()\n"
10140 "getutxent()\n"
10141 "getutxid()\n"
10142 "getutxline()\n"
10143 "gmtime()\n"
10144 "hcreate()\n"
10145 "hdestroy()\n"
10146 "hsearch()\n"
10147 "inet_ntoa()\n"
10148 "l64a()\n"
10149 "lgamma()\n"
10150 "lgammaf()\n"
10151 "lgammal()\n"
10152 "localeconv()\n"
10153 "localtime()\n"
10154 "lrand48()\n"
10155 "mrand48()\n"
10156 "nftw()\n"
10157 "nl_langinfo()\n"
10158 "ptsname()\n"
10159 "putc_unlocked()\n"
10160 "putchar_unlocked()\n"
10161 "putenv()\n"
10162 "pututxline()\n"
10163 "rand()\n"
10164 "readdir()\n"
10165 "setenv()\n"
10166 "setgrent()\n"
10167 "setkey()\n"
10168 "setpwent()\n"
10169 "setutxent()\n"
10170 "strerror()\n"
10171 "strsignal() [POSIX.1-2008 で追加された]\n"
10172 "strtok()\n"
10173 "system() [POSIX.1-2008 で追加された]\n"
10174 "tmpnam() (NULL でない引き数を渡された場合)\n"
10175 "ttyname()\n"
10176 "unsetenv()\n"
10177 "wcrtomb() (最後の引き数が NULL の場合)\n"
10178 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10179 "wcstombs()\n"
10180 "wctomb()\n"
10181
10182 #. type: SS
10183 #: build/C/man7/pthreads.7:236
10184 #, no-wrap
10185 msgid "Async-cancel-safe functions"
10186 msgstr "async-cancel-safe 関数"
10187
10188 #. type: Plain text
10189 #: build/C/man7/pthreads.7:240
10190 msgid ""
10191 "An async-cancel-safe function is one that can be safely called in an "
10192 "application where asynchronous cancelability is enabled (see "
10193 "B<pthread_setcancelstate>(3))."
10194 msgstr ""
10195 "async-cancel-safe 関数は、\n"
10196 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10197 "安全に呼び出すことができる関数のことである\n"
10198 "(B<pthread_setcancelstate>(3) を参照)。"
10199
10200 #. type: Plain text
10201 #: build/C/man7/pthreads.7:243
10202 msgid ""
10203 "Only the following functions are required to be async-cancel-safe by "
10204 "POSIX.1-2001 and POSIX.1-2008:"
10205 msgstr ""
10206 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10207 "なければならないとされている。"
10208
10209 #. type: Plain text
10210 #: build/C/man7/pthreads.7:249
10211 #, no-wrap
10212 msgid ""
10213 "pthread_cancel()\n"
10214 "pthread_setcancelstate()\n"
10215 "pthread_setcanceltype()\n"
10216 msgstr ""
10217 "pthread_cancel()\n"
10218 "pthread_setcancelstate()\n"
10219 "pthread_setcanceltype()\n"
10220
10221 #. type: SS
10222 #: build/C/man7/pthreads.7:251
10223 #, no-wrap
10224 msgid "Cancellation points"
10225 msgstr "取り消しポイント (cancellation points)"
10226
10227 #. type: Plain text
10228 #: build/C/man7/pthreads.7:258
10229 msgid ""
10230 "POSIX.1 specifies that certain functions must, and certain other functions "
10231 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10232 "type is deferred, and a cancellation request is pending for the thread, then "
10233 "the thread is canceled when it calls a function that is a cancellation point."
10234 msgstr ""
10235 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10236 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10237 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10238 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10239 "時点で、そのスレッドのキャンセルが 行われる。"
10240
10241 #. type: Plain text
10242 #: build/C/man7/pthreads.7:261
10243 msgid ""
10244 "The following functions are required to be cancellation points by "
10245 "POSIX.1-2001 and/or POSIX.1-2008:"
10246 msgstr ""
10247 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10248 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10249
10250 #. type: Plain text
10251 #: build/C/man7/pthreads.7:324
10252 #, no-wrap
10253 msgid ""
10254 "accept()\n"
10255 "aio_suspend()\n"
10256 "clock_nanosleep()\n"
10257 "close()\n"
10258 "connect()\n"
10259 "creat()\n"
10260 "fcntl() F_SETLKW\n"
10261 "fdatasync()\n"
10262 "fsync()\n"
10263 "getmsg()\n"
10264 "getpmsg()\n"
10265 "lockf() F_LOCK\n"
10266 "mq_receive()\n"
10267 "mq_send()\n"
10268 "mq_timedreceive()\n"
10269 "mq_timedsend()\n"
10270 "msgrcv()\n"
10271 "msgsnd()\n"
10272 "msync()\n"
10273 "nanosleep()\n"
10274 "open()\n"
10275 "openat() [Added in POSIX.1-2008]\n"
10276 "pause()\n"
10277 "poll()\n"
10278 "pread()\n"
10279 "pselect()\n"
10280 "pthread_cond_timedwait()\n"
10281 "pthread_cond_wait()\n"
10282 "pthread_join()\n"
10283 "pthread_testcancel()\n"
10284 "putmsg()\n"
10285 "putpmsg()\n"
10286 "pwrite()\n"
10287 "read()\n"
10288 "readv()\n"
10289 "recv()\n"
10290 "recvfrom()\n"
10291 "recvmsg()\n"
10292 "select()\n"
10293 "sem_timedwait()\n"
10294 "sem_wait()\n"
10295 "send()\n"
10296 "sendmsg()\n"
10297 "sendto()\n"
10298 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10299 "sigsuspend()\n"
10300 "sigtimedwait()\n"
10301 "sigwait()\n"
10302 "sigwaitinfo()\n"
10303 "sleep()\n"
10304 "system()\n"
10305 "tcdrain()\n"
10306 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10307 "wait()\n"
10308 "waitid()\n"
10309 "waitpid()\n"
10310 "write()\n"
10311 "writev()\n"
10312 msgstr ""
10313 "accept()\n"
10314 "aio_suspend()\n"
10315 "clock_nanosleep()\n"
10316 "close()\n"
10317 "connect()\n"
10318 "creat()\n"
10319 "fcntl() F_SETLKW\n"
10320 "fdatasync()\n"
10321 "fsync()\n"
10322 "getmsg()\n"
10323 "getpmsg()\n"
10324 "lockf() F_LOCK\n"
10325 "mq_receive()\n"
10326 "mq_send()\n"
10327 "mq_timedreceive()\n"
10328 "mq_timedsend()\n"
10329 "msgrcv()\n"
10330 "msgsnd()\n"
10331 "msync()\n"
10332 "nanosleep()\n"
10333 "open()\n"
10334 "openat() [POSIX.1-2008 で追加された]\n"
10335 "pause()\n"
10336 "poll()\n"
10337 "pread()\n"
10338 "pselect()\n"
10339 "pthread_cond_timedwait()\n"
10340 "pthread_cond_wait()\n"
10341 "pthread_join()\n"
10342 "pthread_testcancel()\n"
10343 "putmsg()\n"
10344 "putpmsg()\n"
10345 "pwrite()\n"
10346 "read()\n"
10347 "readv()\n"
10348 "recv()\n"
10349 "recvfrom()\n"
10350 "recvmsg()\n"
10351 "select()\n"
10352 "sem_timedwait()\n"
10353 "sem_wait()\n"
10354 "send()\n"
10355 "sendmsg()\n"
10356 "sendto()\n"
10357 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10358 "sigsuspend()\n"
10359 "sigtimedwait()\n"
10360 "sigwait()\n"
10361 "sigwaitinfo()\n"
10362 "sleep()\n"
10363 "system()\n"
10364 "tcdrain()\n"
10365 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10366 "wait()\n"
10367 "waitid()\n"
10368 "waitpid()\n"
10369 "write()\n"
10370 "writev()\n"
10371
10372 #. type: Plain text
10373 #: build/C/man7/pthreads.7:329
10374 msgid ""
10375 "The following functions may be cancellation points according to POSIX.1-2001 "
10376 "and/or POSIX.1-2008:"
10377 msgstr ""
10378 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10379 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10380
10381 #. type: Plain text
10382 #: build/C/man7/pthreads.7:557
10383 #, no-wrap
10384 msgid ""
10385 "access()\n"
10386 "asctime()\n"
10387 "asctime_r()\n"
10388 "catclose()\n"
10389 "catgets()\n"
10390 "catopen()\n"
10391 "chmod() [Added in POSIX.1-2008]\n"
10392 "chown() [Added in POSIX.1-2008]\n"
10393 "closedir()\n"
10394 "closelog()\n"
10395 "ctermid()\n"
10396 "ctime()\n"
10397 "ctime_r()\n"
10398 "dbm_close()\n"
10399 "dbm_delete()\n"
10400 "dbm_fetch()\n"
10401 "dbm_nextkey()\n"
10402 "dbm_open()\n"
10403 "dbm_store()\n"
10404 "dlclose()\n"
10405 "dlopen()\n"
10406 "dprintf() [Added in POSIX.1-2008]\n"
10407 "endgrent()\n"
10408 "endhostent()\n"
10409 "endnetent()\n"
10410 "endprotoent()\n"
10411 "endpwent()\n"
10412 "endservent()\n"
10413 "endutxent()\n"
10414 "faccessat() [Added in POSIX.1-2008]\n"
10415 "fchmod() [Added in POSIX.1-2008]\n"
10416 "fchmodat() [Added in POSIX.1-2008]\n"
10417 "fchown() [Added in POSIX.1-2008]\n"
10418 "fchownat() [Added in POSIX.1-2008]\n"
10419 "fclose()\n"
10420 "fcntl() (for any value of cmd argument)\n"
10421 "fflush()\n"
10422 "fgetc()\n"
10423 "fgetpos()\n"
10424 "fgets()\n"
10425 "fgetwc()\n"
10426 "fgetws()\n"
10427 "fmtmsg()\n"
10428 "fopen()\n"
10429 "fpathconf()\n"
10430 "fprintf()\n"
10431 "fputc()\n"
10432 "fputs()\n"
10433 "fputwc()\n"
10434 "fputws()\n"
10435 "fread()\n"
10436 "freopen()\n"
10437 "fscanf()\n"
10438 "fseek()\n"
10439 "fseeko()\n"
10440 "fsetpos()\n"
10441 "fstat()\n"
10442 "fstatat() [Added in POSIX.1-2008]\n"
10443 "ftell()\n"
10444 "ftello()\n"
10445 "ftw()\n"
10446 "futimens() [Added in POSIX.1-2008]\n"
10447 "fwprintf()\n"
10448 "fwrite()\n"
10449 "fwscanf()\n"
10450 "getaddrinfo()\n"
10451 "getc()\n"
10452 "getc_unlocked()\n"
10453 "getchar()\n"
10454 "getchar_unlocked()\n"
10455 "getcwd()\n"
10456 "getdate()\n"
10457 "getdelim() [Added in POSIX.1-2008]\n"
10458 "getgrent()\n"
10459 "getgrgid()\n"
10460 "getgrgid_r()\n"
10461 "getgrnam()\n"
10462 "getgrnam_r()\n"
10463 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10464 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10465 "gethostent()\n"
10466 "gethostid()\n"
10467 "gethostname()\n"
10468 "getline() [Added in POSIX.1-2008]\n"
10469 "getlogin()\n"
10470 "getlogin_r()\n"
10471 "getnameinfo()\n"
10472 "getnetbyaddr()\n"
10473 "getnetbyname()\n"
10474 "getnetent()\n"
10475 "getopt() (if opterr is nonzero)\n"
10476 "getprotobyname()\n"
10477 "getprotobynumber()\n"
10478 "getprotoent()\n"
10479 "getpwent()\n"
10480 "getpwnam()\n"
10481 "getpwnam_r()\n"
10482 "getpwuid()\n"
10483 "getpwuid_r()\n"
10484 "gets()\n"
10485 "getservbyname()\n"
10486 "getservbyport()\n"
10487 "getservent()\n"
10488 "getutxent()\n"
10489 "getutxid()\n"
10490 "getutxline()\n"
10491 "getwc()\n"
10492 "getwchar()\n"
10493 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10494 "glob()\n"
10495 "iconv_close()\n"
10496 "iconv_open()\n"
10497 "ioctl()\n"
10498 "link()\n"
10499 "linkat() [Added in POSIX.1-2008]\n"
10500 "lio_listio() [Added in POSIX.1-2008]\n"
10501 "localtime()\n"
10502 "localtime_r()\n"
10503 "lockf() [Added in POSIX.1-2008]\n"
10504 "lseek()\n"
10505 "lstat()\n"
10506 "mkdir() [Added in POSIX.1-2008]\n"
10507 "mkdirat() [Added in POSIX.1-2008]\n"
10508 "mkdtemp() [Added in POSIX.1-2008]\n"
10509 "mkfifo() [Added in POSIX.1-2008]\n"
10510 "mkfifoat() [Added in POSIX.1-2008]\n"
10511 "mknod() [Added in POSIX.1-2008]\n"
10512 "mknodat() [Added in POSIX.1-2008]\n"
10513 "mkstemp()\n"
10514 "mktime()\n"
10515 "nftw()\n"
10516 "opendir()\n"
10517 "openlog()\n"
10518 "pathconf()\n"
10519 "pclose()\n"
10520 "perror()\n"
10521 "popen()\n"
10522 "posix_fadvise()\n"
10523 "posix_fallocate()\n"
10524 "posix_madvise()\n"
10525 "posix_openpt()\n"
10526 "posix_spawn()\n"
10527 "posix_spawnp()\n"
10528 "posix_trace_clear()\n"
10529 "posix_trace_close()\n"
10530 "posix_trace_create()\n"
10531 "posix_trace_create_withlog()\n"
10532 "posix_trace_eventtypelist_getnext_id()\n"
10533 "posix_trace_eventtypelist_rewind()\n"
10534 "posix_trace_flush()\n"
10535 "posix_trace_get_attr()\n"
10536 "posix_trace_get_filter()\n"
10537 "posix_trace_get_status()\n"
10538 "posix_trace_getnext_event()\n"
10539 "posix_trace_open()\n"
10540 "posix_trace_rewind()\n"
10541 "posix_trace_set_filter()\n"
10542 "posix_trace_shutdown()\n"
10543 "posix_trace_timedgetnext_event()\n"
10544 "posix_typed_mem_open()\n"
10545 "printf()\n"
10546 "psiginfo() [Added in POSIX.1-2008]\n"
10547 "psignal() [Added in POSIX.1-2008]\n"
10548 "pthread_rwlock_rdlock()\n"
10549 "pthread_rwlock_timedrdlock()\n"
10550 "pthread_rwlock_timedwrlock()\n"
10551 "pthread_rwlock_wrlock()\n"
10552 "putc()\n"
10553 "putc_unlocked()\n"
10554 "putchar()\n"
10555 "putchar_unlocked()\n"
10556 "puts()\n"
10557 "pututxline()\n"
10558 "putwc()\n"
10559 "putwchar()\n"
10560 "readdir()\n"
10561 "readdir_r()\n"
10562 "readlink() [Added in POSIX.1-2008]\n"
10563 "readlinkat() [Added in POSIX.1-2008]\n"
10564 "remove()\n"
10565 "rename()\n"
10566 "renameat() [Added in POSIX.1-2008]\n"
10567 "rewind()\n"
10568 "rewinddir()\n"
10569 "scandir() [Added in POSIX.1-2008]\n"
10570 "scanf()\n"
10571 "seekdir()\n"
10572 "semop()\n"
10573 "setgrent()\n"
10574 "sethostent()\n"
10575 "setnetent()\n"
10576 "setprotoent()\n"
10577 "setpwent()\n"
10578 "setservent()\n"
10579 "setutxent()\n"
10580 "sigpause() [Added in POSIX.1-2008]\n"
10581 "stat()\n"
10582 "strerror()\n"
10583 "strerror_r()\n"
10584 "strftime()\n"
10585 "symlink()\n"
10586 "symlinkat() [Added in POSIX.1-2008]\n"
10587 "sync()\n"
10588 "syslog()\n"
10589 "tmpfile()\n"
10590 "tmpnam()\n"
10591 "ttyname()\n"
10592 "ttyname_r()\n"
10593 "tzset()\n"
10594 "ungetc()\n"
10595 "ungetwc()\n"
10596 "unlink()\n"
10597 "unlinkat() [Added in POSIX.1-2008]\n"
10598 "utime() [Added in POSIX.1-2008]\n"
10599 "utimensat() [Added in POSIX.1-2008]\n"
10600 "utimes() [Added in POSIX.1-2008]\n"
10601 "vdprintf() [Added in POSIX.1-2008]\n"
10602 "vfprintf()\n"
10603 "vfwprintf()\n"
10604 "vprintf()\n"
10605 "vwprintf()\n"
10606 "wcsftime()\n"
10607 "wordexp()\n"
10608 "wprintf()\n"
10609 "wscanf()\n"
10610 msgstr ""
10611 "access()\n"
10612 "asctime()\n"
10613 "asctime_r()\n"
10614 "catclose()\n"
10615 "catgets()\n"
10616 "catopen()\n"
10617 "chmod() [POSIX.1-2008 で追加された]\n"
10618 "chown() [POSIX.1-2008 で追加された]\n"
10619 "closedir()\n"
10620 "closelog()\n"
10621 "ctermid()\n"
10622 "ctime()\n"
10623 "ctime_r()\n"
10624 "dbm_close()\n"
10625 "dbm_delete()\n"
10626 "dbm_fetch()\n"
10627 "dbm_nextkey()\n"
10628 "dbm_open()\n"
10629 "dbm_store()\n"
10630 "dlclose()\n"
10631 "dlopen()\n"
10632 "dprintf() [POSIX.1-2008 で追加された]\n"
10633 "endgrent()\n"
10634 "endhostent()\n"
10635 "endnetent()\n"
10636 "endprotoent()\n"
10637 "endpwent()\n"
10638 "endservent()\n"
10639 "endutxent()\n"
10640 "faccessat() [POSIX.1-2008 で追加された]\n"
10641 "fchmod() [POSIX.1-2008 で追加された]\n"
10642 "fchmodat() [POSIX.1-2008 で追加された]\n"
10643 "fchown() [POSIX.1-2008 で追加された]\n"
10644 "fchownat() [POSIX.1-2008 で追加された]\n"
10645 "fclose()\n"
10646 "fcntl() (cmd 引き数が何であっても)\n"
10647 "fflush()\n"
10648 "fgetc()\n"
10649 "fgetpos()\n"
10650 "fgets()\n"
10651 "fgetwc()\n"
10652 "fgetws()\n"
10653 "fmtmsg()\n"
10654 "fopen()\n"
10655 "fpathconf()\n"
10656 "fprintf()\n"
10657 "fputc()\n"
10658 "fputs()\n"
10659 "fputwc()\n"
10660 "fputws()\n"
10661 "fread()\n"
10662 "freopen()\n"
10663 "fscanf()\n"
10664 "fseek()\n"
10665 "fseeko()\n"
10666 "fsetpos()\n"
10667 "fstat()\n"
10668 "fstatat() [POSIX.1-2008 で追加された]\n"
10669 "ftell()\n"
10670 "ftello()\n"
10671 "ftw()\n"
10672 "futimens() [POSIX.1-2008 で追加された]\n"
10673 "fwprintf()\n"
10674 "fwrite()\n"
10675 "fwscanf()\n"
10676 "getaddrinfo()\n"
10677 "getc()\n"
10678 "getc_unlocked()\n"
10679 "getchar()\n"
10680 "getchar_unlocked()\n"
10681 "getcwd()\n"
10682 "getdate()\n"
10683 "getdelim() [POSIX.1-2008 で追加された]\n"
10684 "getgrent()\n"
10685 "getgrgid()\n"
10686 "getgrgid_r()\n"
10687 "getgrnam()\n"
10688 "getgrnam_r()\n"
10689 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10690 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10691 "gethostent()\n"
10692 "gethostid()\n"
10693 "gethostname()\n"
10694 "getline() [POSIX.1-2008 で追加された]\n"
10695 "getlogin()\n"
10696 "getlogin_r()\n"
10697 "getnameinfo()\n"
10698 "getnetbyaddr()\n"
10699 "getnetbyname()\n"
10700 "getnetent()\n"
10701 "getopt() (opterr が 0 以外の場合)\n"
10702 "getprotobyname()\n"
10703 "getprotobynumber()\n"
10704 "getprotoent()\n"
10705 "getpwent()\n"
10706 "getpwnam()\n"
10707 "getpwnam_r()\n"
10708 "getpwuid()\n"
10709 "getpwuid_r()\n"
10710 "gets()\n"
10711 "getservbyname()\n"
10712 "getservbyport()\n"
10713 "getservent()\n"
10714 "getutxent()\n"
10715 "getutxid()\n"
10716 "getutxline()\n"
10717 "getwc()\n"
10718 "getwchar()\n"
10719 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10720 "glob()\n"
10721 "iconv_close()\n"
10722 "iconv_open()\n"
10723 "ioctl()\n"
10724 "link()\n"
10725 "linkat() [POSIX.1-2008 で追加された]\n"
10726 "lio_listio() [POSIX.1-2008 で追加された]\n"
10727 "localtime()\n"
10728 "localtime_r()\n"
10729 "lockf() [POSIX.1-2008 で追加された]\n"
10730 "lseek()\n"
10731 "lstat()\n"
10732 "mkdir() [POSIX.1-2008 で追加された]\n"
10733 "mkdirat() [POSIX.1-2008 で追加された]\n"
10734 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10735 "mkfifo() [POSIX.1-2008 で追加された]\n"
10736 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10737 "mknod() [POSIX.1-2008 で追加された]\n"
10738 "mknodat() [POSIX.1-2008 で追加された]\n"
10739 "mkstemp()\n"
10740 "mktime()\n"
10741 "nftw()\n"
10742 "opendir()\n"
10743 "openlog()\n"
10744 "pathconf()\n"
10745 "pclose()\n"
10746 "perror()\n"
10747 "popen()\n"
10748 "posix_fadvise()\n"
10749 "posix_fallocate()\n"
10750 "posix_madvise()\n"
10751 "posix_openpt()\n"
10752 "posix_spawn()\n"
10753 "posix_spawnp()\n"
10754 "posix_trace_clear()\n"
10755 "posix_trace_close()\n"
10756 "posix_trace_create()\n"
10757 "posix_trace_create_withlog()\n"
10758 "posix_trace_eventtypelist_getnext_id()\n"
10759 "posix_trace_eventtypelist_rewind()\n"
10760 "posix_trace_flush()\n"
10761 "posix_trace_get_attr()\n"
10762 "posix_trace_get_filter()\n"
10763 "posix_trace_get_status()\n"
10764 "posix_trace_getnext_event()\n"
10765 "posix_trace_open()\n"
10766 "posix_trace_rewind()\n"
10767 "posix_trace_set_filter()\n"
10768 "posix_trace_shutdown()\n"
10769 "posix_trace_timedgetnext_event()\n"
10770 "posix_typed_mem_open()\n"
10771 "printf()\n"
10772 "psiginfo() [POSIX.1-2008 で追加された]\n"
10773 "psignal() [POSIX.1-2008 で追加された]\n"
10774 "pthread_rwlock_rdlock()\n"
10775 "pthread_rwlock_timedrdlock()\n"
10776 "pthread_rwlock_timedwrlock()\n"
10777 "pthread_rwlock_wrlock()\n"
10778 "putc()\n"
10779 "putc_unlocked()\n"
10780 "putchar()\n"
10781 "putchar_unlocked()\n"
10782 "puts()\n"
10783 "pututxline()\n"
10784 "putwc()\n"
10785 "putwchar()\n"
10786 "readdir()\n"
10787 "readdir_r()\n"
10788 "readlink() [POSIX.1-2008 で追加された]\n"
10789 "readlinkat() [POSIX.1-2008 で追加された]\n"
10790 "remove()\n"
10791 "rename()\n"
10792 "renameat() [POSIX.1-2008 で追加された]\n"
10793 "rewind()\n"
10794 "rewinddir()\n"
10795 "scandir() [POSIX.1-2008 で追加された]\n"
10796 "scanf()\n"
10797 "seekdir()\n"
10798 "semop()\n"
10799 "setgrent()\n"
10800 "sethostent()\n"
10801 "setnetent()\n"
10802 "setprotoent()\n"
10803 "setpwent()\n"
10804 "setservent()\n"
10805 "setutxent()\n"
10806 "sigpause() [POSIX.1-2008 で追加された]\n"
10807 "stat()\n"
10808 "strerror()\n"
10809 "strerror_r()\n"
10810 "strftime()\n"
10811 "symlink()\n"
10812 "symlinkat() [POSIX.1-2008 で追加された]\n"
10813 "sync()\n"
10814 "syslog()\n"
10815 "tmpfile()\n"
10816 "tmpnam()\n"
10817 "ttyname()\n"
10818 "ttyname_r()\n"
10819 "tzset()\n"
10820 "ungetc()\n"
10821 "ungetwc()\n"
10822 "unlink()\n"
10823 "unlinkat() [POSIX.1-2008 で追加された]\n"
10824 "utime() [POSIX.1-2008 で追加された]\n"
10825 "utimensat() [POSIX.1-2008 で追加された]\n"
10826 "utimes() [POSIX.1-2008 で追加された]\n"
10827 "vdprintf() [POSIX.1-2008 で追加された]\n"
10828 "vfprintf()\n"
10829 "vfwprintf()\n"
10830 "vprintf()\n"
10831 "vwprintf()\n"
10832 "wcsftime()\n"
10833 "wordexp()\n"
10834 "wprintf()\n"
10835 "wscanf()\n"
10836
10837 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10838 #.  files, it looks as though at least the following nonstandard
10839 #.  functions are cancellation points:
10840 #.  endnetgrent
10841 #.  endspent
10842 #.  epoll_pwait
10843 #.  epoll_wait
10844 #.  fcloseall
10845 #.  fdopendir
10846 #.  fflush_unlocked
10847 #.  fgetc_unlocked
10848 #.  fgetgrent
10849 #.  fgetgrent_r
10850 #.  fgetpwent
10851 #.  fgetpwent_r
10852 #.  fgets_unlocked
10853 #.  fgetspent
10854 #.  fgetspent_r
10855 #.  fgetwc_unlocked
10856 #.  fgetws_unlocked
10857 #.  fputc_unlocked
10858 #.  fputs_unlocked
10859 #.  fputwc_unlocked
10860 #.  fputws_unlocked
10861 #.  fread_unlocked
10862 #.  fwrite_unlocked
10863 #.  gai_suspend
10864 #.  getaddrinfo_a
10865 #.  getdate_r
10866 #.  getgrent_r
10867 #.  getgrouplist
10868 #.  gethostbyaddr_r
10869 #.  gethostbyname2
10870 #.  gethostbyname2_r
10871 #.  gethostbyname_r
10872 #.  gethostent_r
10873 #.  getnetbyaddr_r
10874 #.  getnetbyname_r
10875 #.  getnetent_r
10876 #.  getnetgrent
10877 #.  getnetgrent_r
10878 #.  getprotobyname_r
10879 #.  getprotobynumber_r
10880 #.  getprotoent_r
10881 #.  getpw
10882 #.  getpwent_r
10883 #.  getservbyname_r
10884 #.  getservbyport_r
10885 #.  getservent_r
10886 #.  getspent
10887 #.  getspent_r
10888 #.  getspnam
10889 #.  getspnam_r
10890 #.  getutmp
10891 #.  getutmpx
10892 #.  getw
10893 #.  getwc_unlocked
10894 #.  getwchar_unlocked
10895 #.  initgroups
10896 #.  innetgr
10897 #.  mkostemp
10898 #.  mkostemp64
10899 #.  mkstemp64
10900 #.  ppoll
10901 #.  pthread_timedjoin_np
10902 #.  putgrent
10903 #.  putpwent
10904 #.  putspent
10905 #.  putw
10906 #.  putwc_unlocked
10907 #.  putwchar_unlocked
10908 #.  rcmd
10909 #.  rcmd_af
10910 #.  rexec
10911 #.  rexec_af
10912 #.  rresvport
10913 #.  rresvport_af
10914 #.  ruserok
10915 #.  ruserok_af
10916 #.  setnetgrent
10917 #.  setspent
10918 #.  sgetspent
10919 #.  sgetspent_r
10920 #.  updwtmpx
10921 #.  utmpxname
10922 #.  vfscanf
10923 #.  vfwscanf
10924 #.  vscanf
10925 #.  vsyslog
10926 #.  vwscanf
10927 #. type: Plain text
10928 #: build/C/man7/pthreads.7:655
10929 msgid ""
10930 "An implementation may also mark other functions not specified in the "
10931 "standard as cancellation points.  In particular, an implementation is likely "
10932 "to mark any nonstandard function that may block as a cancellation point.  "
10933 "(This includes most functions that can touch files.)"
10934 msgstr ""
10935 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10936 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10937 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10938 "関数がこれに含まれる)。"
10939
10940 #. type: SS
10941 #: build/C/man7/pthreads.7:655
10942 #, no-wrap
10943 msgid "Compiling on Linux"
10944 msgstr "Linux でのコンパイル"
10945
10946 #. type: Plain text
10947 #: build/C/man7/pthreads.7:658
10948 msgid ""
10949 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10950 "pthread>."
10951 msgstr ""
10952 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10953 "きである。"
10954
10955 #. type: SS
10956 #: build/C/man7/pthreads.7:658
10957 #, no-wrap
10958 msgid "Linux implementations of POSIX threads"
10959 msgstr "POSIX スレッドの Linux での実装"
10960
10961 #. type: Plain text
10962 #: build/C/man7/pthreads.7:661
10963 msgid ""
10964 "Over time, two threading implementations have been provided by the GNU C "
10965 "library on Linux:"
10966 msgstr ""
10967 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10968 "た。"
10969
10970 #. type: TP
10971 #: build/C/man7/pthreads.7:661
10972 #, no-wrap
10973 msgid "B<LinuxThreads>"
10974 msgstr "B<LinuxThreads>"
10975
10976 #. type: Plain text
10977 #: build/C/man7/pthreads.7:665
10978 msgid ""
10979 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10980 "implementation is no longer supported."
10981 msgstr ""
10982 "最初の Pthreads の実装。\n"
10983 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10984
10985 #. type: TP
10986 #: build/C/man7/pthreads.7:665
10987 #, no-wrap
10988 msgid "B<NPTL> (Native POSIX Threads Library)"
10989 msgstr "B<NPTL> (Native POSIX Threads Library)"
10990
10991 #. type: Plain text
10992 #: build/C/man7/pthreads.7:673
10993 msgid ""
10994 "This is the modern Pthreads implementation.  By comparison with "
10995 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10996 "POSIX.1 specification and better performance when creating large numbers of "
10997 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10998 "are present in the Linux 2.6 kernel."
10999 msgstr ""
11000 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
11001 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
11002 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
11003 "装されている機能が必要である。"
11004
11005 #. type: Plain text
11006 #: build/C/man7/pthreads.7:683
11007 msgid ""
11008 "Both of these are so-called 1:1 implementations, meaning that each thread "
11009 "maps to a kernel scheduling entity.  Both threading implementations employ "
11010 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
11011 "primitives (mutexes, thread joining, and so on) are implemented using the "
11012 "Linux B<futex>(2)  system call."
11013 msgstr ""
11014 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
11015 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
11016 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
11017 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
11018 "使って実装されている。"
11019
11020 #. type: SS
11021 #: build/C/man7/pthreads.7:683
11022 #, no-wrap
11023 msgid "LinuxThreads"
11024 msgstr "LinuxThreads"
11025
11026 #. type: Plain text
11027 #: build/C/man7/pthreads.7:685
11028 msgid "The notable features of this implementation are the following:"
11029 msgstr "この実装の大きな特徴は以下の通りである:"
11030
11031 #. type: Plain text
11032 #: build/C/man7/pthreads.7:692
11033 msgid ""
11034 "In addition to the main (initial) thread, and the threads that the program "
11035 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
11036 "thread.  This thread handles thread creation and termination.  (Problems can "
11037 "result if this thread is inadvertently killed.)"
11038 msgstr ""
11039 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
11040 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
11041 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
11042 "kill されると、問題が起こることがある)。"
11043
11044 #. type: Plain text
11045 #: build/C/man7/pthreads.7:704
11046 msgid ""
11047 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
11048 "the first three real-time signals are used (see also B<signal>(7)).  On "
11049 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
11050 "avoid the use of whichever set of signals is employed by the implementation."
11051 msgstr ""
11052 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11053 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11054 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11055 "用されているシグナルを どれも使わないようにしなければならない。"
11056
11057 #. type: Plain text
11058 #: build/C/man7/pthreads.7:711
11059 msgid ""
11060 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11061 "implemented as processes which share more information than usual, but which "
11062 "do not share a common process ID.)  LinuxThreads threads (including the "
11063 "manager thread)  are visible as separate processes using B<ps>(1)."
11064 msgstr ""
11065 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11066 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11067 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11068 "を使うと別のプロセスのように見える。"
11069
11070 #. type: Plain text
11071 #: build/C/man7/pthreads.7:714
11072 msgid ""
11073 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11074 "number of ways, including the following:"
11075 msgstr ""
11076 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11077 "示すような点がある:"
11078
11079 #. type: Plain text
11080 #: build/C/man7/pthreads.7:718
11081 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11082 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11083
11084 #. type: Plain text
11085 #: build/C/man7/pthreads.7:727
11086 msgid ""
11087 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11088 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11089 "should return the same value as B<getppid>(2)  in the main thread."
11090 msgstr ""
11091 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11092 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11093 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11094
11095 #. type: Plain text
11096 #: build/C/man7/pthreads.7:737
11097 msgid ""
11098 "When one thread creates a new child process using B<fork>(2), any thread "
11099 "should be able to B<wait>(2)  on the child.  However, the implementation "
11100 "only allows the thread that created the child to B<wait>(2)  on it."
11101 msgstr ""
11102 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11103 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11104 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11105 "る。"
11106
11107 #. type: Plain text
11108 #: build/C/man7/pthreads.7:744
11109 msgid ""
11110 "When a thread calls B<execve>(2), all other threads are terminated (as "
11111 "required by POSIX.1).  However, the resulting process has the same PID as "
11112 "the thread that called B<execve>(2): it should have the same PID as the main "
11113 "thread."
11114 msgstr ""
11115 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11116 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11117 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11118 "る。"
11119
11120 #. type: Plain text
11121 #: build/C/man7/pthreads.7:751
11122 msgid ""
11123 "Threads do not share user and group IDs.  This can cause complications with "
11124 "set-user-ID programs and can cause failures in Pthreads functions if an "
11125 "application changes its credentials using B<seteuid>(2)  or similar."
11126 msgstr ""
11127 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11128 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11129 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11130
11131 #. type: Plain text
11132 #: build/C/man7/pthreads.7:753
11133 msgid "Threads do not share a common session ID and process group ID."
11134 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11135
11136 #. type: Plain text
11137 #: build/C/man7/pthreads.7:756
11138 msgid "Threads do not share record locks created using B<fcntl>(2)."
11139 msgstr ""
11140 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11141
11142 #. type: Plain text
11143 #: build/C/man7/pthreads.7:762
11144 msgid ""
11145 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11146 "rather than process-wide."
11147 msgstr ""
11148 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11149 "単位の情報である。"
11150
11151 #. type: Plain text
11152 #: build/C/man7/pthreads.7:765
11153 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11154 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11155
11156 #. type: Plain text
11157 #: build/C/man7/pthreads.7:767
11158 msgid "Threads do not share interval timers."
11159 msgstr "スレッド間でインターバル・タイマを共有しない。"
11160
11161 #.  FIXME . bug report filed for NPTL nice nonconformance
11162 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11163 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11164 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11165 #.  Monitor this to see if it makes it into mainline.
11166 #. type: Plain text
11167 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11168 msgid "Threads do not share a common nice value."
11169 msgstr "スレッドは共通の nice 値を共有しない。"
11170
11171 #. type: Plain text
11172 #: build/C/man7/pthreads.7:779
11173 msgid ""
11174 "POSIX.1 distinguishes the notions of signals that are directed to the "
11175 "process as a whole and signals that are directed to individual threads.  "
11176 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11177 "example) should be handled by a single, arbitrarily selected thread within "
11178 "the process.  LinuxThreads does not support the notion of process-directed "
11179 "signals: signals may be sent only to specific threads."
11180 msgstr ""
11181 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11182 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11183 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11184 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11185 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11186 "ルは特定のスレッドにだけ送ることができる。"
11187
11188 #. type: Plain text
11189 #: build/C/man7/pthreads.7:788
11190 msgid ""
11191 "Threads have distinct alternate signal stack settings.  However, a new "
11192 "thread's alternate signal stack settings are copied from the thread that "
11193 "created it, so that the threads initially share an alternate signal stack.  "
11194 "(A new thread should start with no alternate signal stack defined.  If two "
11195 "threads handle signals on their shared alternate signal stack at the same "
11196 "time, unpredictable program failures are likely to occur.)"
11197 msgstr ""
11198 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11199 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11200 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11201 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11202 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11203 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11204
11205 #. type: SS
11206 #: build/C/man7/pthreads.7:788
11207 #, no-wrap
11208 msgid "NPTL"
11209 msgstr "NPTL"
11210
11211 #. type: Plain text
11212 #: build/C/man7/pthreads.7:797
11213 msgid ""
11214 "With NPTL, all of the threads in a process are placed in the same thread "
11215 "group; all members of a thread group share the same PID.  NPTL does not "
11216 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11217 "signals (see also B<signal>(7)); these signals cannot be used in "
11218 "applications."
11219 msgstr ""
11220 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11221 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11222 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11223 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11224 "ションでは使用できない。"
11225
11226 #. type: Plain text
11227 #: build/C/man7/pthreads.7:799
11228 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11229 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11230
11231 #. type: Plain text
11232 #: build/C/man7/pthreads.7:808
11233 msgid "Some NPTL nonconformances occur only with older kernels:"
11234 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11235
11236 #. type: Plain text
11237 #: build/C/man7/pthreads.7:814
11238 msgid ""
11239 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11240 "rather than process-wide (fixed in kernel 2.6.9)."
11241 msgstr ""
11242 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11243 "単位の情報である (カーネル 2.6.9 で修正された)。"
11244
11245 #. type: Plain text
11246 #: build/C/man7/pthreads.7:816
11247 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11248 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11249
11250 #. type: Plain text
11251 #: build/C/man7/pthreads.7:818
11252 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11253 msgstr ""
11254 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11255
11256 #. type: Plain text
11257 #: build/C/man7/pthreads.7:822
11258 msgid ""
11259 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11260 "(fixed in kernel 2.6.16)."
11261 msgstr ""
11262 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11263 "きる (カーネル 2.6.16 で修正された)。"
11264
11265 #. type: Plain text
11266 #: build/C/man7/pthreads.7:827
11267 msgid ""
11268 "Only the main thread is permitted to make the process into a process group "
11269 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11270 msgstr ""
11271 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11272 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11273
11274 #. type: Plain text
11275 #: build/C/man7/pthreads.7:833
11276 msgid ""
11277 "Threads have distinct alternate signal stack settings.  However, a new "
11278 "thread's alternate signal stack settings are copied from the thread that "
11279 "created it, so that the threads initially share an alternate signal stack "
11280 "(fixed in kernel 2.6.16)."
11281 msgstr ""
11282 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11283 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11284 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11285 "ル 2.6.16 で修正された)。"
11286
11287 #. type: Plain text
11288 #: build/C/man7/pthreads.7:835
11289 msgid "Note the following further points about the NPTL implementation:"
11290 msgstr "NPTL の実装では以下の点についても注意すること:"
11291
11292 #. type: Plain text
11293 #: build/C/man7/pthreads.7:849
11294 msgid ""
11295 "If the stack size soft resource limit (see the description of "
11296 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11297 "I<unlimited>, then this value defines the default stack size for new "
11298 "threads.  To be effective, this limit must be set before the program is "
11299 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11300 "stacksize> in the C shell)."
11301 msgstr ""
11302 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11303 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11304 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11305 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11306 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11307 "は I<limit stacksize>)  を使って設定する。"
11308
11309 #. type: SS
11310 #: build/C/man7/pthreads.7:849
11311 #, no-wrap
11312 msgid "Determining the threading implementation"
11313 msgstr "スレッド実装の判定"
11314
11315 #. type: Plain text
11316 #: build/C/man7/pthreads.7:854
11317 msgid ""
11318 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11319 "system's threading implementation, for example:"
11320 msgstr ""
11321 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11322 "装を判定することができる。 以下に例を示す:"
11323
11324 #. type: Plain text
11325 #: build/C/man7/pthreads.7:859
11326 #, no-wrap
11327 msgid ""
11328 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11329 "NPTL 2.3.4\n"
11330 msgstr ""
11331 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11332 "NPTL 2.3.4\n"
11333
11334 #. type: Plain text
11335 #: build/C/man7/pthreads.7:864
11336 msgid ""
11337 "With older glibc versions, a command such as the following should be "
11338 "sufficient to determine the default threading implementation:"
11339 msgstr ""
11340 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11341 "ド実装を判定することができる。"
11342
11343 #. type: Plain text
11344 #: build/C/man7/pthreads.7:870
11345 #, no-wrap
11346 msgid ""
11347 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11348 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11349 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11350 msgstr ""
11351 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11352 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11353 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11354
11355 #. type: SS
11356 #: build/C/man7/pthreads.7:872
11357 #, no-wrap
11358 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11359 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11360
11361 #. type: Plain text
11362 #: build/C/man7/pthreads.7:887
11363 msgid ""
11364 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11365 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11366 "override the dynamic linker's default choice of threading implementation.  "
11367 "This variable tells the dynamic linker to assume that it is running on top "
11368 "of a particular kernel version.  By specifying a kernel version that does "
11369 "not provide the support required by NPTL, we can force the use of "
11370 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11371 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11372 "For example:"
11373 msgstr ""
11374 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11375 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11376 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11377 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11378 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11379 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11380 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11381 "ン を動作させる場合だろう)。 以下に例を示す:"
11382
11383 #. type: Plain text
11384 #: build/C/man7/pthreads.7:893
11385 #, no-wrap
11386 msgid ""
11387 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11388 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11389 "        linuxthreads-0.10 by Xavier Leroy\n"
11390 msgstr ""
11391 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11392 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11393 "        linuxthreads-0.10 by Xavier Leroy\n"
11394
11395 #. type: Plain text
11396 #: build/C/man7/pthreads.7:905
11397 msgid ""
11398 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11399 "(7), B<signal>(7),"
11400 msgstr ""
11401 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11402 "B<signal>(7),"
11403
11404 #. type: Plain text
11405 #: build/C/man7/pthreads.7:929
11406 msgid ""
11407 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11408 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11409 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11410 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11411 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11412 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11413 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11414 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11415 msgstr ""
11416 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11417 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11418 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11419 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11420 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11421 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11422 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11423 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11424 "and B<pthread_testcancel>(3)"