OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.54
[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-09-28 04:05+0900\n"
10 "PO-Revision-Date: 2013-08-15 20:31+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 #, fuzzy
634 #| msgid ""
635 #| "This page is part of release 3.53 of the Linux I<man-pages> project.  A "
636 #| "description of the project, and information about reporting bugs, can be "
637 #| "found at \\%http://www.kernel.org/doc/man-pages/."
638 msgid ""
639 "This page is part of release 3.54 of the Linux I<man-pages> project.  A "
640 "description of the project, and information about reporting bugs, can be "
641 "found at \\%http://www.kernel.org/doc/man-pages/."
642 msgstr ""
643 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.53 の一部\n"
644 "である。プロジェクトの説明とバグ報告に関する情報は\n"
645 "http://www.kernel.org/doc/man-pages/ に書かれている。"
646
647 #. type: TH
648 #: build/C/man3/makecontext.3:28
649 #, no-wrap
650 msgid "MAKECONTEXT"
651 msgstr "MAKECONTEXT"
652
653 #. type: TH
654 #: build/C/man3/makecontext.3:28
655 #, no-wrap
656 msgid "2013-02-12"
657 msgstr "2013-02-12"
658
659 #. type: TH
660 #: build/C/man3/makecontext.3:28
661 #, no-wrap
662 msgid "GNU"
663 msgstr "GNU"
664
665 #. type: Plain text
666 #: build/C/man3/makecontext.3:31
667 msgid "makecontext, swapcontext - manipulate user context"
668 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
669
670 #. type: Plain text
671 #: build/C/man3/makecontext.3:36
672 msgid ""
673 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
674 ">I<argc>B<, ...);>"
675 msgstr ""
676 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
677 ">I<argc>B<, ...);>"
678
679 #. type: Plain text
680 #: build/C/man3/makecontext.3:38
681 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
682 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
683
684 #. type: Plain text
685 #: build/C/man3/makecontext.3:49
686 msgid ""
687 "In a System V-like environment, one has the type I<ucontext_t> defined in "
688 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
689 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
690 "level context switching between multiple threads of control within a process."
691 msgstr ""
692 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
693 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
694 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
695 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
696 "ようになっている。"
697
698 #. type: Plain text
699 #: build/C/man3/makecontext.3:52
700 msgid "For the type and the first two functions, see B<getcontext>(3)."
701 msgstr ""
702 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
703
704 #. type: Plain text
705 #: build/C/man3/makecontext.3:64
706 msgid ""
707 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
708 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
709 "B<makecontext>(), the caller must allocate a new stack for this context and "
710 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
711 "and assign its address to I<ucp-E<gt>uc_link>."
712 msgstr ""
713 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
714 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
715 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
716 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
717 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
718 "らない。"
719
720 #. type: Plain text
721 #: build/C/man3/makecontext.3:78
722 msgid ""
723 "When this context is later activated (using B<setcontext>(3)  or "
724 "B<swapcontext>())  the function I<func> is called, and passed the series of "
725 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
726 "number of these arguments in I<argc>.  When this function returns, the "
727 "successor context is activated.  If the successor context pointer is NULL, "
728 "the thread exits."
729 msgstr ""
730 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
731 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
732 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
733 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
734 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
735
736 #. type: Plain text
737 #: build/C/man3/makecontext.3:84
738 msgid ""
739 "The B<swapcontext>()  function saves the current context in the structure "
740 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
741 msgstr ""
742 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
743 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
744
745 #. type: Plain text
746 #: build/C/man3/makecontext.3:96
747 msgid ""
748 "When successful, B<swapcontext>()  does not return.  (But we may return "
749 "later, in case I<oucp> is activated, in which case it looks like "
750 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
751 "sets I<errno> appropriately."
752 msgstr ""
753 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
754 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
755 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
756 "て設定する。"
757
758 #. type: TP
759 #: build/C/man3/makecontext.3:97
760 #: build/C/man3/pthread_attr_setaffinity_np.3:102
761 #: build/C/man3/pthread_getattr_np.3:77
762 #, no-wrap
763 msgid "B<ENOMEM>"
764 msgstr "B<ENOMEM>"
765
766 #. type: Plain text
767 #: build/C/man3/makecontext.3:100
768 msgid "Insufficient stack space left."
769 msgstr "スタックに割り当てる空間が残っていない。"
770
771 #. type: SH
772 #: build/C/man3/makecontext.3:100
773 #: build/C/man3/pthread_attr_setaffinity_np.3:106
774 #: build/C/man3/pthread_attr_setguardsize.3:104
775 #: build/C/man3/pthread_attr_setstack.3:110
776 #: build/C/man3/pthread_attr_setstackaddr.3:81
777 #: build/C/man3/pthread_attr_setstacksize.3:81
778 #: build/C/man3/pthread_getattr_np.3:96
779 #: build/C/man3/pthread_getcpuclockid.3:63
780 #: build/C/man3/pthread_setaffinity_np.3:119
781 #: build/C/man3/pthread_setconcurrency.3:81
782 #: build/C/man3/pthread_setname_np.3:100
783 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
784 #: build/C/man3/pthread_tryjoin_np.3:110
785 #, no-wrap
786 msgid "VERSIONS"
787 msgstr "バージョン"
788
789 #. type: Plain text
790 #: build/C/man3/makecontext.3:105
791 msgid ""
792 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
793 "2.1."
794 msgstr ""
795 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
796 "されている。"
797
798 #. type: Plain text
799 #: build/C/man3/makecontext.3:113
800 msgid ""
801 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
802 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
803 "recommending that applications be rewritten to use POSIX threads instead."
804 msgstr ""
805 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
806 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
807 "POSIX スレッドを使って書き直すことが 推奨されている。"
808
809 #. type: Plain text
810 #: build/C/man3/makecontext.3:121
811 msgid ""
812 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
813 "namely, this struct contains the start and length of a memory area to be "
814 "used as the stack, regardless of the direction of growth of the stack.  "
815 "Thus, it is not necessary for the user program to worry about this direction."
816 msgstr ""
817 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
818 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
819 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
820 "て、ユーザプログラムはこの件については心配しなくてよい。"
821
822 #. type: Plain text
823 #: build/C/man3/makecontext.3:137
824 msgid ""
825 "On architectures where I<int> and pointer types are the same size (e.g., "
826 "x86-32, where both types are 32 bits), you may be able to get away with "
827 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
828 "However, doing this is not guaranteed to be portable, is undefined according "
829 "to the standards, and won't work on architectures where pointers are larger "
830 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
831 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
832 "g., x86-64)."
833 msgstr ""
834 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
835 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
836 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
837 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
838 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
839 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
840 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
841 "できるようになっている。"
842
843 #. type: SH
844 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
845 #: build/C/man3/pthread_attr_setdetachstate.3:108
846 #: build/C/man3/pthread_attr_setguardsize.3:155
847 #: build/C/man3/pthread_attr_setinheritsched.3:128
848 #: build/C/man3/pthread_attr_setschedparam.3:106
849 #: build/C/man3/pthread_attr_setschedpolicy.3:102
850 #: build/C/man3/pthread_attr_setstack.3:153
851 #: build/C/man3/pthread_attr_setstacksize.3:108
852 #: build/C/man3/pthread_cancel.3:135 build/C/man3/pthread_cleanup_push.3:155
853 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
854 #: build/C/man3/pthread_getattr_np.3:101
855 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
856 #: build/C/man3/pthread_setaffinity_np.3:154
857 #: build/C/man3/pthread_setcancelstate.3:174
858 #: build/C/man3/pthread_setname_np.3:112
859 #: build/C/man3/pthread_setschedparam.3:149 build/C/man3/pthread_sigmask.3:61
860 #: build/C/man3/pthread_testcancel.3:60 build/C/man3/pthread_tryjoin_np.3:115
861 #, no-wrap
862 msgid "EXAMPLE"
863 msgstr "例"
864
865 #. type: Plain text
866 #: build/C/man3/makecontext.3:145
867 msgid ""
868 "The example program below demonstrates the use of B<getcontext>(3), "
869 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
870 "following output:"
871 msgstr ""
872 "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), "
873 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
874 "と、以下のような出力が得られる:"
875
876 #. type: Plain text
877 #: build/C/man3/makecontext.3:157
878 #, no-wrap
879 msgid ""
880 "$B< ./a.out>\n"
881 "main: swapcontext(&uctx_main, &uctx_func2)\n"
882 "func2: started\n"
883 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
884 "func1: started\n"
885 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
886 "func2: returning\n"
887 "func1: returning\n"
888 "main: exiting\n"
889 msgstr ""
890 "$B< ./a.out>\n"
891 "main: swapcontext(&uctx_main, &uctx_func2)\n"
892 "func2: started\n"
893 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
894 "func1: started\n"
895 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
896 "func2: returning\n"
897 "func1: returning\n"
898 "main: exiting\n"
899
900 #. type: SS
901 #: build/C/man3/makecontext.3:159 build/C/man3/pthread_attr_init.3:148
902 #: build/C/man3/pthread_cancel.3:151 build/C/man3/pthread_cleanup_push.3:231
903 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
904 #: build/C/man3/pthread_getcpuclockid.3:95
905 #: build/C/man3/pthread_setname_np.3:138
906 #: build/C/man3/pthread_setschedparam.3:224 build/C/man3/pthread_sigmask.3:79
907 #, no-wrap
908 msgid "Program source"
909 msgstr "プログラムのソース"
910
911 #. type: Plain text
912 #: build/C/man3/makecontext.3:165
913 #, no-wrap
914 msgid ""
915 "#include E<lt>ucontext.hE<gt>\n"
916 "#include E<lt>stdio.hE<gt>\n"
917 "#include E<lt>stdlib.hE<gt>\n"
918 msgstr ""
919 "#include E<lt>ucontext.hE<gt>\n"
920 "#include E<lt>stdio.hE<gt>\n"
921 "#include E<lt>stdlib.hE<gt>\n"
922
923 #. type: Plain text
924 #: build/C/man3/makecontext.3:167
925 #, no-wrap
926 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
927 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
928
929 #. type: Plain text
930 #: build/C/man3/makecontext.3:170
931 #, no-wrap
932 msgid ""
933 "#define handle_error(msg) \\e\n"
934 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
935 msgstr ""
936 "#define handle_error(msg) \\e\n"
937 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
938
939 #. type: Plain text
940 #: build/C/man3/makecontext.3:180
941 #, no-wrap
942 msgid ""
943 "static void\n"
944 "func1(void)\n"
945 "{\n"
946 "    printf(\"func1: started\\en\");\n"
947 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
948 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
949 "        handle_error(\"swapcontext\");\n"
950 "    printf(\"func1: returning\\en\");\n"
951 "}\n"
952 msgstr ""
953 "static void\n"
954 "func1(void)\n"
955 "{\n"
956 "    printf(\"func1: started\\en\");\n"
957 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
958 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
959 "        handle_error(\"swapcontext\");\n"
960 "    printf(\"func1: returning\\en\");\n"
961 "}\n"
962
963 #. type: Plain text
964 #: build/C/man3/makecontext.3:190
965 #, no-wrap
966 msgid ""
967 "static void\n"
968 "func2(void)\n"
969 "{\n"
970 "    printf(\"func2: started\\en\");\n"
971 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
972 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
973 "        handle_error(\"swapcontext\");\n"
974 "    printf(\"func2: returning\\en\");\n"
975 "}\n"
976 msgstr ""
977 "static void\n"
978 "func2(void)\n"
979 "{\n"
980 "    printf(\"func2: started\\en\");\n"
981 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
982 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
983 "        handle_error(\"swapcontext\");\n"
984 "    printf(\"func2: returning\\en\");\n"
985 "}\n"
986
987 #. type: Plain text
988 #: build/C/man3/makecontext.3:196
989 #, no-wrap
990 msgid ""
991 "int\n"
992 "main(int argc, char *argv[])\n"
993 "{\n"
994 "    char func1_stack[16384];\n"
995 "    char func2_stack[16384];\n"
996 msgstr ""
997 "int\n"
998 "main(int argc, char *argv[])\n"
999 "{\n"
1000 "    char func1_stack[16384];\n"
1001 "    char func2_stack[16384];\n"
1002
1003 #. type: Plain text
1004 #: build/C/man3/makecontext.3:203
1005 #, no-wrap
1006 msgid ""
1007 "    if (getcontext(&uctx_func1) == -1)\n"
1008 "        handle_error(\"getcontext\");\n"
1009 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1010 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1011 "    uctx_func1.uc_link = &uctx_main;\n"
1012 "    makecontext(&uctx_func1, func1, 0);\n"
1013 msgstr ""
1014 "    if (getcontext(&uctx_func1) == -1)\n"
1015 "        handle_error(\"getcontext\");\n"
1016 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1017 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1018 "    uctx_func1.uc_link = &uctx_main;\n"
1019 "    makecontext(&uctx_func1, func1, 0);\n"
1020
1021 #. type: Plain text
1022 #: build/C/man3/makecontext.3:211
1023 #, no-wrap
1024 msgid ""
1025 "    if (getcontext(&uctx_func2) == -1)\n"
1026 "        handle_error(\"getcontext\");\n"
1027 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1028 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1029 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1030 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1031 "    makecontext(&uctx_func2, func2, 0);\n"
1032 msgstr ""
1033 "    if (getcontext(&uctx_func2) == -1)\n"
1034 "        handle_error(\"getcontext\");\n"
1035 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1036 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1037 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1038 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1039 "    makecontext(&uctx_func2, func2, 0);\n"
1040
1041 #. type: Plain text
1042 #: build/C/man3/makecontext.3:215
1043 #, no-wrap
1044 msgid ""
1045 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1046 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1047 "        handle_error(\"swapcontext\");\n"
1048 msgstr ""
1049 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1050 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1051 "        handle_error(\"swapcontext\");\n"
1052
1053 #. type: Plain text
1054 #: build/C/man3/makecontext.3:219
1055 #, no-wrap
1056 msgid ""
1057 "    printf(\"main: exiting\\en\");\n"
1058 "    exit(EXIT_SUCCESS);\n"
1059 "}\n"
1060 msgstr ""
1061 "    printf(\"main: exiting\\en\");\n"
1062 "    exit(EXIT_SUCCESS);\n"
1063 "}\n"
1064
1065 #. type: Plain text
1066 #: build/C/man3/makecontext.3:226
1067 msgid ""
1068 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1069 "B<sigsetjmp>(3)"
1070 msgstr ""
1071 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1072 "B<sigsetjmp>(3)"
1073
1074 #. type: TH
1075 #: build/C/man3/pthread_attr_init.3:26
1076 #, no-wrap
1077 msgid "PTHREAD_ATTR_INIT"
1078 msgstr "PTHREAD_ATTR_INIT"
1079
1080 #. type: TH
1081 #: build/C/man3/pthread_attr_init.3:26
1082 #, no-wrap
1083 msgid "2008-11-11"
1084 msgstr "2008-11-11"
1085
1086 #. type: Plain text
1087 #: build/C/man3/pthread_attr_init.3:30
1088 msgid ""
1089 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1090 "attributes object"
1091 msgstr ""
1092 "pthread_attr_init, pthread_attr_destroy - \n"
1093 "スレッド属性オブジェクトの初期化と破棄を行う"
1094
1095 #. type: Plain text
1096 #: build/C/man3/pthread_attr_init.3:33
1097 #: build/C/man3/pthread_attr_setdetachstate.3:33
1098 #: build/C/man3/pthread_attr_setguardsize.3:33
1099 #: build/C/man3/pthread_attr_setinheritsched.3:33
1100 #: build/C/man3/pthread_attr_setschedparam.3:33
1101 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1102 #: build/C/man3/pthread_attr_setscope.3:33
1103 #: build/C/man3/pthread_attr_setstack.3:33
1104 #: build/C/man3/pthread_attr_setstackaddr.3:33
1105 #: build/C/man3/pthread_attr_setstacksize.3:33
1106 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1107 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1108 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1109 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1110 #: build/C/man3/pthread_join.3:32
1111 #: build/C/man3/pthread_kill_other_threads_np.3:32
1112 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1113 #: build/C/man3/pthread_setconcurrency.3:32
1114 #: build/C/man3/pthread_setschedparam.3:33
1115 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1116 #: build/C/man3/pthread_testcancel.3:32
1117 #, no-wrap
1118 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1119 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1120
1121 #. type: Plain text
1122 #: build/C/man3/pthread_attr_init.3:36
1123 #, no-wrap
1124 msgid ""
1125 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1126 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1127 msgstr ""
1128 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1129 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1130
1131 #. type: Plain text
1132 #: build/C/man3/pthread_attr_init.3:38
1133 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1134 #: build/C/man3/pthread_attr_setdetachstate.3:40
1135 #: build/C/man3/pthread_attr_setguardsize.3:40
1136 #: build/C/man3/pthread_attr_setinheritsched.3:40
1137 #: build/C/man3/pthread_attr_setschedparam.3:40
1138 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1139 #: build/C/man3/pthread_attr_setscope.3:40
1140 #: build/C/man3/pthread_attr_setstack.3:40
1141 #: build/C/man3/pthread_attr_setstackaddr.3:40
1142 #: build/C/man3/pthread_attr_setstacksize.3:40
1143 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1144 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1145 #: build/C/man3/pthread_getattr_np.3:37
1146 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1147 #: build/C/man3/pthread_setaffinity_np.3:41
1148 #: build/C/man3/pthread_setcancelstate.3:38
1149 #: build/C/man3/pthread_setconcurrency.3:37
1150 #: build/C/man3/pthread_setschedparam.3:40
1151 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1152 #, no-wrap
1153 msgid "Compile and link with I<-pthread>.\n"
1154 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1155
1156 #. type: Plain text
1157 #: build/C/man3/pthread_attr_init.3:50
1158 msgid ""
1159 "The B<pthread_attr_init>()  function initializes the thread attributes "
1160 "object pointed to by I<attr> with default attribute values.  After this "
1161 "call, individual attributes of the object can be set using various related "
1162 "functions (listed under SEE ALSO), and then the object can be used in one or "
1163 "more B<pthread_create>(3)  calls that create threads."
1164 msgstr ""
1165 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1166 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1167 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1168 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1169 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1170 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1171
1172 #. type: Plain text
1173 #: build/C/man3/pthread_attr_init.3:55
1174 msgid ""
1175 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1176 "already been initialized results in undefined behavior."
1177 msgstr ""
1178 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1179 "B<pthread_attr_init>() を呼び出した場合、\n"
1180 "どのような動作になるかは不定である。"
1181
1182 #. type: Plain text
1183 #: build/C/man3/pthread_attr_init.3:62
1184 msgid ""
1185 "When a thread attributes object is no longer required, it should be "
1186 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1187 "thread attributes object has no effect on threads that were created using "
1188 "that object."
1189 msgstr ""
1190 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1191 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1192 "スレッド属性オブジェクトを破棄しても、\n"
1193 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1194
1195 #. type: Plain text
1196 #: build/C/man3/pthread_attr_init.3:68
1197 msgid ""
1198 "Once a thread attributes object has been destroyed, it can be reinitialized "
1199 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1200 "attributes object has undefined results."
1201 msgstr ""
1202 "いったん破棄したスレッド属性オブジェクトは、\n"
1203 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1204 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1205 "使った場合の結果は不定である。"
1206
1207 #. type: Plain text
1208 #: build/C/man3/pthread_attr_init.3:71
1209 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1210 #: build/C/man3/pthread_attr_setdetachstate.3:80
1211 #: build/C/man3/pthread_attr_setguardsize.3:93
1212 #: build/C/man3/pthread_attr_setinheritsched.3:96
1213 #: build/C/man3/pthread_attr_setschedparam.3:88
1214 #: build/C/man3/pthread_attr_setschedpolicy.3:86
1215 #: build/C/man3/pthread_attr_setscope.3:106
1216 #: build/C/man3/pthread_attr_setstack.3:88
1217 #: build/C/man3/pthread_attr_setstackaddr.3:77
1218 #: build/C/man3/pthread_attr_setstacksize.3:64
1219 #: build/C/man3/pthread_setaffinity_np.3:80
1220 #: build/C/man3/pthread_setcancelstate.3:95
1221 #: build/C/man3/pthread_setname_np.3:75
1222 msgid ""
1223 "On success, these functions return 0; on error, they return a nonzero error "
1224 "number."
1225 msgstr ""
1226 "成功すると、これらの関数は 0 を返す。\n"
1227 "エラーの場合、0 以外のエラー番号を返す。"
1228
1229 #. type: Plain text
1230 #: build/C/man3/pthread_attr_init.3:79
1231 msgid ""
1232 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1233 "Linux these functions always succeed (but portable and future-proof "
1234 "applications should nevertheless handle a possible error return)."
1235 msgstr ""
1236 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1237 "記載されている。\n"
1238 "Linux では、これらの関数は常に成功する\n"
1239 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1240 "正のエラーの返り値を処理するようにすべきである)。"
1241
1242 #. type: Plain text
1243 #: build/C/man3/pthread_attr_init.3:81
1244 #: build/C/man3/pthread_attr_setdetachstate.3:89
1245 #: build/C/man3/pthread_attr_setguardsize.3:108
1246 #: build/C/man3/pthread_attr_setinheritsched.3:112
1247 #: build/C/man3/pthread_attr_setschedparam.3:102
1248 #: build/C/man3/pthread_attr_setschedpolicy.3:102
1249 #: build/C/man3/pthread_attr_setscope.3:121
1250 #: build/C/man3/pthread_attr_setstack.3:114
1251 #: build/C/man3/pthread_attr_setstacksize.3:85
1252 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
1253 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1254 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1255 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1256 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:52
1257 #: build/C/man3/pthread_setcancelstate.3:115
1258 #: build/C/man3/pthread_setconcurrency.3:85
1259 #: build/C/man3/pthread_setschedparam.3:143
1260 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
1261 #: build/C/man3/pthread_testcancel.3:60
1262 msgid "POSIX.1-2001."
1263 msgstr "POSIX.1-2001."
1264
1265 #. type: Plain text
1266 #: build/C/man3/pthread_attr_init.3:87
1267 msgid ""
1268 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1269 "object other than via pthreads functions is nonportable and produces "
1270 "undefined results."
1271 msgstr ""
1272 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1273 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1274 "どのような結果が得られるかも分からない。"
1275
1276 #. type: Plain text
1277 #: build/C/man3/pthread_attr_init.3:96
1278 msgid ""
1279 "The program below optionally makes use of B<pthread_attr_init>()  and "
1280 "various related functions to initialize a thread attributes object that is "
1281 "used to create a single thread.  Once created, the thread uses the "
1282 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1283 "the thread's attributes, and then displays those attributes."
1284 msgstr ""
1285 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1286 "スレッド属性オブジェクトの初期化を行い、\n"
1287 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1288 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1289 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1290 "取得した属性を表示する。"
1291
1292 #. type: Plain text
1293 #: build/C/man3/pthread_attr_init.3:105
1294 msgid ""
1295 "If the program is run with no command-line argument, then it passes NULL as "
1296 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1297 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1298 "threading implementation, we see the following:"
1299 msgstr ""
1300 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1301 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1302 "この場合、スレッドはデフォルトの属性で作成される。\n"
1303 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1304 "動作させると、以下のような出力が得られる。"
1305
1306 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1307 #. type: Plain text
1308 #: build/C/man3/pthread_attr_init.3:121
1309 #, no-wrap
1310 msgid ""
1311 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1312 "unlimited\n"
1313 "$B< ./a.out>\n"
1314 "Thread attributes:\n"
1315 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1316 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1317 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1318 "        Scheduling policy   = SCHED_OTHER\n"
1319 "        Scheduling priority = 0\n"
1320 "        Guard size          = 4096 bytes\n"
1321 "        Stack address       = 0x40196000\n"
1322 "        Stack size          = 0x201000 bytes\n"
1323 msgstr ""
1324 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1325 "unlimited\n"
1326 "$B< ./a.out>\n"
1327 "Thread attributes:\n"
1328 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1329 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1330 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1331 "        Scheduling policy   = SCHED_OTHER\n"
1332 "        Scheduling priority = 0\n"
1333 "        Guard size          = 4096 bytes\n"
1334 "        Stack address       = 0x40196000\n"
1335 "        Stack size          = 0x201000 bytes\n"
1336
1337 #. type: Plain text
1338 #: build/C/man3/pthread_attr_init.3:131
1339 msgid ""
1340 "When we supply a stack size as a command-line argument, the program "
1341 "initializes a thread attributes object, sets various attributes in that "
1342 "object, and passes a pointer to the object in the call to B<pthread_create>"
1343 "(3).  Running the program on Linux/x86-32 with the NPTL threading "
1344 "implementation, we see the following:"
1345 msgstr ""
1346 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1347 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1348 "そのオブジェクトの各種属性を設定し、\n"
1349 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1350 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1351 "動作させると、以下のような出力が得られる。"
1352
1353 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1354 #. type: Plain text
1355 #: build/C/man3/pthread_attr_init.3:146
1356 #, no-wrap
1357 msgid ""
1358 "$B< ./a.out 0x3000000>\n"
1359 "posix_memalign() allocated at 0x40197000\n"
1360 "Thread attributes:\n"
1361 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1362 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1363 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1364 "        Scheduling policy   = SCHED_OTHER\n"
1365 "        Scheduling priority = 0\n"
1366 "        Guard size          = 0 bytes\n"
1367 "        Stack address       = 0x40197000\n"
1368 "        Stack size          = 0x3000000 bytes\n"
1369 msgstr ""
1370 "$B< ./a.out 0x3000000>\n"
1371 "posix_memalign() allocated at 0x40197000\n"
1372 "Thread attributes:\n"
1373 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1374 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1375 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1376 "        Scheduling policy   = SCHED_OTHER\n"
1377 "        Scheduling priority = 0\n"
1378 "        Guard size          = 0 bytes\n"
1379 "        Stack address       = 0x40197000\n"
1380 "        Stack size          = 0x3000000 bytes\n"
1381
1382 #. type: Plain text
1383 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1384 #, no-wrap
1385 msgid ""
1386 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1387 "#include E<lt>pthread.hE<gt>\n"
1388 "#include E<lt>stdio.hE<gt>\n"
1389 "#include E<lt>stdlib.hE<gt>\n"
1390 "#include E<lt>unistd.hE<gt>\n"
1391 "#include E<lt>errno.hE<gt>\n"
1392 msgstr ""
1393 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1394 "#include E<lt>pthread.hE<gt>\n"
1395 "#include E<lt>stdio.hE<gt>\n"
1396 "#include E<lt>stdlib.hE<gt>\n"
1397 "#include E<lt>unistd.hE<gt>\n"
1398 "#include E<lt>errno.hE<gt>\n"
1399
1400 #. type: Plain text
1401 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:162
1402 #: build/C/man3/pthread_cleanup_push.3:243 build/C/man3/pthread_create.3:254
1403 #: build/C/man3/pthread_getattr_np.3:191
1404 #: build/C/man3/pthread_getcpuclockid.3:113
1405 #: build/C/man3/pthread_setaffinity_np.3:172
1406 #: build/C/man3/pthread_setschedparam.3:237 build/C/man3/pthread_sigmask.3:93
1407 #, no-wrap
1408 msgid ""
1409 "#define handle_error_en(en, msg) \\e\n"
1410 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1411 msgstr ""
1412 "#define handle_error_en(en, msg) \\e\n"
1413 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1414
1415 #. type: Plain text
1416 #: build/C/man3/pthread_attr_init.3:168
1417 #, no-wrap
1418 msgid ""
1419 "static void\n"
1420 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1421 "{\n"
1422 "    int s, i;\n"
1423 "    size_t v;\n"
1424 "    void *stkaddr;\n"
1425 "    struct sched_param sp;\n"
1426 msgstr ""
1427 "static void\n"
1428 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1429 "{\n"
1430 "    int s, i;\n"
1431 "    size_t v;\n"
1432 "    void *stkaddr;\n"
1433 "    struct sched_param sp;\n"
1434
1435 #. type: Plain text
1436 #: build/C/man3/pthread_attr_init.3:176
1437 #, no-wrap
1438 msgid ""
1439 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1440 "    if (s != 0)\n"
1441 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1442 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1443 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1444 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1445 "            \"???\");\n"
1446 msgstr ""
1447 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1448 "    if (s != 0)\n"
1449 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1450 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1451 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1452 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1453 "            \"???\");\n"
1454
1455 #. type: Plain text
1456 #: build/C/man3/pthread_attr_init.3:184
1457 #, no-wrap
1458 msgid ""
1459 "    s = pthread_attr_getscope(attr, &i);\n"
1460 "    if (s != 0)\n"
1461 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1462 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1463 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1464 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1465 "            \"???\");\n"
1466 msgstr ""
1467 "    s = pthread_attr_getscope(attr, &i);\n"
1468 "    if (s != 0)\n"
1469 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1470 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1471 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1472 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1473 "            \"???\");\n"
1474
1475 #. type: Plain text
1476 #: build/C/man3/pthread_attr_init.3:192
1477 #, no-wrap
1478 msgid ""
1479 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1480 "    if (s != 0)\n"
1481 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1482 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1483 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1484 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1485 "            \"???\");\n"
1486 msgstr ""
1487 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1488 "    if (s != 0)\n"
1489 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1490 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1491 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1492 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1493 "            \"???\");\n"
1494
1495 #. type: Plain text
1496 #: build/C/man3/pthread_attr_init.3:201
1497 #, no-wrap
1498 msgid ""
1499 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1500 "    if (s != 0)\n"
1501 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1502 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1503 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1504 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1505 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1506 "            \"???\");\n"
1507 msgstr ""
1508 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1509 "    if (s != 0)\n"
1510 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1511 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1512 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1513 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1514 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1515 "            \"???\");\n"
1516
1517 #. type: Plain text
1518 #: build/C/man3/pthread_attr_init.3:206
1519 #, no-wrap
1520 msgid ""
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 msgstr ""
1526 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1527 "    if (s != 0)\n"
1528 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1529 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1530
1531 #. type: Plain text
1532 #: build/C/man3/pthread_attr_init.3:211
1533 #, no-wrap
1534 msgid ""
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 msgstr ""
1540 "    s = pthread_attr_getguardsize(attr, &v);\n"
1541 "    if (s != 0)\n"
1542 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1543 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1544
1545 #. type: Plain text
1546 #: build/C/man3/pthread_attr_init.3:218
1547 #, no-wrap
1548 msgid ""
1549 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1550 "    if (s != 0)\n"
1551 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1552 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1553 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1554 "}\n"
1555 msgstr ""
1556 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1557 "    if (s != 0)\n"
1558 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1559 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1560 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1561 "}\n"
1562
1563 #. type: Plain text
1564 #: build/C/man3/pthread_attr_init.3:224
1565 #, no-wrap
1566 msgid ""
1567 "static void *\n"
1568 "thread_start(void *arg)\n"
1569 "{\n"
1570 "    int s;\n"
1571 "    pthread_attr_t gattr;\n"
1572 msgstr ""
1573 "static void *\n"
1574 "thread_start(void *arg)\n"
1575 "{\n"
1576 "    int s;\n"
1577 "    pthread_attr_t gattr;\n"
1578
1579 #. type: Plain text
1580 #: build/C/man3/pthread_attr_init.3:228
1581 #, no-wrap
1582 msgid ""
1583 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1584 "       retrieves the attributes of the thread specified in its\n"
1585 "       first argument */\n"
1586 msgstr ""
1587 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1588 "       retrieves the attributes of the thread specified in its\n"
1589 "       first argument */\n"
1590
1591 #. type: Plain text
1592 #: build/C/man3/pthread_attr_init.3:232
1593 #, no-wrap
1594 msgid ""
1595 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1596 "    if (s != 0)\n"
1597 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1598 msgstr ""
1599 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1600 "    if (s != 0)\n"
1601 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1602
1603 #. type: Plain text
1604 #: build/C/man3/pthread_attr_init.3:235
1605 #, no-wrap
1606 msgid ""
1607 "    printf(\"Thread attributes:\\en\");\n"
1608 "    display_pthread_attr(&gattr, \"\\et\");\n"
1609 msgstr ""
1610 "    printf(\"Thread attributes:\\en\");\n"
1611 "    display_pthread_attr(&gattr, \"\\et\");\n"
1612
1613 #. type: Plain text
1614 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1615 #, no-wrap
1616 msgid ""
1617 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1618 "}\n"
1619 msgstr ""
1620 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1621 "}\n"
1622
1623 #. type: Plain text
1624 #: build/C/man3/pthread_attr_init.3:246
1625 #, no-wrap
1626 msgid ""
1627 "int\n"
1628 "main(int argc, char *argv[])\n"
1629 "{\n"
1630 "    pthread_t thr;\n"
1631 "    pthread_attr_t attr;\n"
1632 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1633 "    int s;\n"
1634 msgstr ""
1635 "int\n"
1636 "main(int argc, char *argv[])\n"
1637 "{\n"
1638 "    pthread_t thr;\n"
1639 "    pthread_attr_t attr;\n"
1640 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1641 "    int s;\n"
1642
1643 #. type: Plain text
1644 #: build/C/man3/pthread_attr_init.3:248
1645 #: build/C/man3/pthread_setschedparam.3:355
1646 #, no-wrap
1647 msgid "    attrp = NULL;\n"
1648 msgstr "    attrp = NULL;\n"
1649
1650 #. type: Plain text
1651 #: build/C/man3/pthread_attr_init.3:252
1652 #, no-wrap
1653 msgid ""
1654 "    /* If a command-line argument was supplied, use it to set the\n"
1655 "       stack-size attribute and set a few other thread attributes,\n"
1656 "       and set attrp pointing to thread attributes object */\n"
1657 msgstr ""
1658 "    /* If a command-line argument was supplied, use it to set the\n"
1659 "       stack-size attribute and set a few other thread attributes,\n"
1660 "       and set attrp pointing to thread attributes object */\n"
1661
1662 #. type: Plain text
1663 #: build/C/man3/pthread_attr_init.3:256
1664 #, no-wrap
1665 msgid ""
1666 "    if (argc E<gt> 1) {\n"
1667 "        int stack_size;\n"
1668 "        void *sp;\n"
1669 msgstr ""
1670 "    if (argc E<gt> 1) {\n"
1671 "        int stack_size;\n"
1672 "        void *sp;\n"
1673
1674 #. type: Plain text
1675 #: build/C/man3/pthread_attr_init.3:258
1676 #, no-wrap
1677 msgid "        attrp = &attr;\n"
1678 msgstr "        attrp = &attr;\n"
1679
1680 #. type: Plain text
1681 #: build/C/man3/pthread_attr_init.3:262
1682 #, no-wrap
1683 msgid ""
1684 "        s = pthread_attr_init(&attr);\n"
1685 "        if (s != 0)\n"
1686 "            handle_error_en(s, \"pthread_attr_init\");\n"
1687 msgstr ""
1688 "        s = pthread_attr_init(&attr);\n"
1689 "        if (s != 0)\n"
1690 "            handle_error_en(s, \"pthread_attr_init\");\n"
1691
1692 #. type: Plain text
1693 #: build/C/man3/pthread_attr_init.3:266
1694 #, no-wrap
1695 msgid ""
1696 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1697 "        if (s != 0)\n"
1698 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1699 msgstr ""
1700 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1701 "        if (s != 0)\n"
1702 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1703
1704 #. type: Plain text
1705 #: build/C/man3/pthread_attr_init.3:270
1706 #, no-wrap
1707 msgid ""
1708 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1709 "        if (s != 0)\n"
1710 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1711 msgstr ""
1712 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1713 "        if (s != 0)\n"
1714 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1715
1716 #. type: Plain text
1717 #: build/C/man3/pthread_attr_init.3:272
1718 #, no-wrap
1719 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1720 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1721
1722 #. type: Plain text
1723 #: build/C/man3/pthread_attr_init.3:276
1724 #, no-wrap
1725 msgid ""
1726 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1727 "        if (s != 0)\n"
1728 "            handle_error_en(s, \"posix_memalign\");\n"
1729 msgstr ""
1730 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1731 "        if (s != 0)\n"
1732 "            handle_error_en(s, \"posix_memalign\");\n"
1733
1734 #. type: Plain text
1735 #: build/C/man3/pthread_attr_init.3:278
1736 #, no-wrap
1737 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1738 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1739
1740 #. type: Plain text
1741 #: build/C/man3/pthread_attr_init.3:283
1742 #, no-wrap
1743 msgid ""
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 msgstr ""
1749 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1750 "        if (s != 0)\n"
1751 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1752 "    }\n"
1753
1754 #. type: Plain text
1755 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1756 #, no-wrap
1757 msgid ""
1758 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1759 "    if (s != 0)\n"
1760 "        handle_error_en(s, \"pthread_create\");\n"
1761 msgstr ""
1762 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1763 "    if (s != 0)\n"
1764 "        handle_error_en(s, \"pthread_create\");\n"
1765
1766 #. type: Plain text
1767 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1768 #, no-wrap
1769 msgid ""
1770 "    if (attrp != NULL) {\n"
1771 "        s = pthread_attr_destroy(attrp);\n"
1772 "        if (s != 0)\n"
1773 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1774 "    }\n"
1775 msgstr ""
1776 "    if (attrp != NULL) {\n"
1777 "        s = pthread_attr_destroy(attrp);\n"
1778 "        if (s != 0)\n"
1779 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1780 "    }\n"
1781
1782 #. type: Plain text
1783 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1784 #, no-wrap
1785 msgid ""
1786 "    pause();    /* Terminates when other thread calls exit() */\n"
1787 "}\n"
1788 msgstr ""
1789 "    pause();    /* Terminates when other thread calls exit() */\n"
1790 "}\n"
1791
1792 #. type: Plain text
1793 #: build/C/man3/pthread_attr_init.3:313
1794 msgid ""
1795 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1796 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1797 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1798 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1799 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1800 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1801 msgstr ""
1802 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1803 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1804 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1805 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1806 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1807 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1808
1809 #. type: TH
1810 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1811 #, no-wrap
1812 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1813 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1814
1815 #. type: TH
1816 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1817 #: build/C/man3/pthread_getattr_np.3:26
1818 #: build/C/man3/pthread_setaffinity_np.3:26
1819 #: build/C/man3/pthread_tryjoin_np.3:26
1820 #, no-wrap
1821 msgid "2010-09-10"
1822 msgstr "2010-09-10"
1823
1824 #. type: Plain text
1825 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1826 msgid ""
1827 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1828 "affinity attribute in thread attributes object"
1829 msgstr ""
1830 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1831 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1832
1833 #. type: Plain text
1834 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1835 #: build/C/man3/pthread_getattr_np.3:33
1836 #: build/C/man3/pthread_setaffinity_np.3:34
1837 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1838 #, no-wrap
1839 msgid ""
1840 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1841 "B<#include E<lt>pthread.hE<gt>>\n"
1842 msgstr ""
1843 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1844 "B<#include E<lt>pthread.hE<gt>>\n"
1845
1846 #. type: Plain text
1847 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1848 #, no-wrap
1849 msgid ""
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 msgstr ""
1855 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1856 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1857 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1858 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1859
1860 #. type: Plain text
1861 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1862 msgid ""
1863 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1864 "attribute of the thread attributes object referred to by I<attr> to the "
1865 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1866 "mask of a thread created using the thread attributes object I<attr>."
1867 msgstr ""
1868 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1869 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1870 "I<cpuset> で指定された値に設定する。\n"
1871 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1872 "作成されたスレッドの CPU affinity マスクが決定される。"
1873
1874 #. type: Plain text
1875 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1876 msgid ""
1877 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1878 "attribute of the thread attributes object referred to by I<attr> in the "
1879 "buffer pointed to by I<cpuset>."
1880 msgstr ""
1881 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1882 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1883 "I<cpuset> が指すバッファに入れて返す。"
1884
1885 #. type: Plain text
1886 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1887 msgid ""
1888 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1889 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
1890 "(cpu_set_t)>."
1891 msgstr ""
1892 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1893 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1894 "指定することだろう。"
1895
1896 #. type: Plain text
1897 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1898 #: build/C/man3/pthread_setaffinity_np.3:67
1899 msgid ""
1900 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1901 "description of a set of macros that can be used to manipulate and inspect "
1902 "CPU sets, see B<CPU_SET>(3)."
1903 msgstr ""
1904 "CPU affinity マスクの詳細については、 \n"
1905 "B<sched_setaffinity>(2) を参照してほしい。\n"
1906 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1907 "B<CPU_SET>(3) を参照してほしい。"
1908
1909 #. type: TP
1910 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1911 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1912 #: build/C/man3/pthread_attr_setdetachstate.3:83
1913 #: build/C/man3/pthread_attr_setinheritsched.3:99
1914 #: build/C/man3/pthread_attr_setschedpolicy.3:89
1915 #: build/C/man3/pthread_attr_setscope.3:109
1916 #: build/C/man3/pthread_attr_setstack.3:91
1917 #: build/C/man3/pthread_attr_setstacksize.3:67
1918 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1919 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1920 #: build/C/man3/pthread_kill.3:58 build/C/man3/pthread_setaffinity_np.3:84
1921 #: build/C/man3/pthread_setaffinity_np.3:93
1922 #: build/C/man3/pthread_setaffinity_np.3:109
1923 #: build/C/man3/pthread_setcancelstate.3:99
1924 #: build/C/man3/pthread_setcancelstate.3:107
1925 #: build/C/man3/pthread_setconcurrency.3:71
1926 #: build/C/man3/pthread_setschedparam.3:122
1927 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1928 #, no-wrap
1929 msgid "B<EINVAL>"
1930 msgstr "B<EINVAL>"
1931
1932 #.  cpumask_t
1933 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1934 #.  of the cpumask_t type.
1935 #. type: Plain text
1936 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1937 msgid ""
1938 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1939 "outside the set supported by the kernel.  (The kernel configuration option "
1940 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1941 "type used to represent CPU sets.)"
1942 msgstr ""
1943 "(B<pthread_attr_setaffinity_np>())\n"
1944 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1945 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1946 "は、\n"
1947 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
1948
1949 #. type: Plain text
1950 #: build/C/man3/pthread_attr_setaffinity_np.3:102
1951 msgid ""
1952 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
1953 "attributes object referred to by I<attr> lies outside the range specified by "
1954 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
1955 msgstr ""
1956 "(B<pthread_attr_getaffinity_np>())\n"
1957 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
1958 "I<cpusetsize> により指定された範囲の中になかった\n"
1959 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
1960
1961 #. type: Plain text
1962 #: build/C/man3/pthread_attr_setaffinity_np.3:106
1963 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
1964 msgstr ""
1965 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
1966
1967 #. type: Plain text
1968 #: build/C/man3/pthread_attr_setaffinity_np.3:108
1969 #: build/C/man3/pthread_setaffinity_np.3:121
1970 msgid "These functions are provided by glibc since version 2.3.4."
1971 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
1972
1973 #. type: Plain text
1974 #: build/C/man3/pthread_attr_setaffinity_np.3:111
1975 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
1976 #: build/C/man3/pthread_setaffinity_np.3:124
1977 #: build/C/man3/pthread_tryjoin_np.3:115
1978 msgid ""
1979 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
1980 "\" (nonportable) in the names."
1981 msgstr ""
1982 "これらの関数は非標準の GNU による拡張である。\n"
1983 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
1984 "付いている。"
1985
1986 #. type: Plain text
1987 #: build/C/man3/pthread_attr_setaffinity_np.3:118
1988 #: build/C/man3/pthread_setaffinity_np.3:150
1989 msgid ""
1990 "In glibc 2.3.3 only, versions of these functions were provided that did not "
1991 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
1992 "underlying system calls was always I<sizeof(cpu_set_t)>."
1993 msgstr ""
1994 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
1995 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
1996 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
1997 "常に I<sizeof(cpu_set_t)> であった。"
1998
1999 #. type: Plain text
2000 #: build/C/man3/pthread_attr_setaffinity_np.3:124
2001 msgid ""
2002 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2003 "(3), B<cpuset>(7), B<pthreads>(7)"
2004 msgstr ""
2005 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2006 "(3), B<cpuset>(7), B<pthreads>(7)"
2007
2008 #. type: TH
2009 #: build/C/man3/pthread_attr_setdetachstate.3:26
2010 #, no-wrap
2011 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2012 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2013
2014 #. type: TH
2015 #: build/C/man3/pthread_attr_setdetachstate.3:26
2016 #, no-wrap
2017 msgid "2010-02-03"
2018 msgstr "2010-02-03"
2019
2020 #. type: Plain text
2021 #: build/C/man3/pthread_attr_setdetachstate.3:30
2022 msgid ""
2023 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2024 "state attribute in thread attributes object"
2025 msgstr ""
2026 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2027 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2028
2029 #. type: Plain text
2030 #: build/C/man3/pthread_attr_setdetachstate.3:38
2031 #, no-wrap
2032 msgid ""
2033 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2034 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2035 msgstr ""
2036 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2037 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2038
2039 #. type: Plain text
2040 #: build/C/man3/pthread_attr_setdetachstate.3:53
2041 msgid ""
2042 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2043 "attribute of the thread attributes object referred to by I<attr> to the "
2044 "value specified in I<detachstate>.  The detach state attribute determines "
2045 "whether a thread created using the thread attributes object I<attr> will be "
2046 "created in a joinable or a detached state."
2047 msgstr ""
2048 "B<pthread_attr_setdetachstate>() 関数は、\n"
2049 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2050 "I<detachstate> で指定された値に設定する。\n"
2051 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2052 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2053 "detached (切り離された) 状態で作成されるかが決定される。"
2054
2055 #. type: Plain text
2056 #: build/C/man3/pthread_attr_setdetachstate.3:56
2057 msgid "The following values may be specified in I<detachstate>:"
2058 msgstr "I<detachstate> には以下の値を指定できる。"
2059
2060 #. type: TP
2061 #: build/C/man3/pthread_attr_setdetachstate.3:56
2062 #, no-wrap
2063 msgid "B<PTHREAD_CREATE_DETACHED>"
2064 msgstr "B<PTHREAD_CREATE_DETACHED>"
2065
2066 #. type: Plain text
2067 #: build/C/man3/pthread_attr_setdetachstate.3:61
2068 msgid ""
2069 "Threads that are created using I<attr> will be created in a detached state."
2070 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2071
2072 #. type: TP
2073 #: build/C/man3/pthread_attr_setdetachstate.3:61
2074 #, no-wrap
2075 msgid "B<PTHREAD_CREATE_JOINABLE>"
2076 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2077
2078 #. type: Plain text
2079 #: build/C/man3/pthread_attr_setdetachstate.3:66
2080 msgid ""
2081 "Threads that are created using I<attr> will be created in a joinable state."
2082 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2083
2084 #. type: Plain text
2085 #: build/C/man3/pthread_attr_setdetachstate.3:70
2086 msgid ""
2087 "The default setting of the detach state attribute in a newly initialized "
2088 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2089 msgstr ""
2090 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2091 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2092
2093 #. type: Plain text
2094 #: build/C/man3/pthread_attr_setdetachstate.3:77
2095 msgid ""
2096 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2097 "the thread attributes object I<attr> in the buffer pointed to by "
2098 "I<detachstate>."
2099 msgstr ""
2100 "B<pthread_attr_getdetachstate>() は、\n"
2101 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2102 "I<detachstate> が指すバッファに入れて返す。"
2103
2104 #. type: Plain text
2105 #: build/C/man3/pthread_attr_setdetachstate.3:83
2106 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2107 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2108
2109 #. type: Plain text
2110 #: build/C/man3/pthread_attr_setdetachstate.3:87
2111 msgid "An invalid value was specified in I<detachstate>."
2112 msgstr "無効な値が I<detachstate> で指定された。"
2113
2114 #. type: Plain text
2115 #: build/C/man3/pthread_attr_setdetachstate.3:93
2116 msgid ""
2117 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2118 msgstr ""
2119 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2120 "B<pthread_create>(3) を参照。"
2121
2122 #. type: Plain text
2123 #: build/C/man3/pthread_attr_setdetachstate.3:101
2124 msgid ""
2125 "A thread that is created in a joinable state should eventually either be "
2126 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2127 "B<pthread_create>(3)."
2128 msgstr ""
2129 "join 可能状態で作成されたスレッドは、最終的に\n"
2130 "B<pthread_join>(3) を使って join するか、\n"
2131 "B<pthread_detach>(3) を使って切り離すか、\n"
2132 "のどちらかを行うべきである。"
2133
2134 #. type: Plain text
2135 #: build/C/man3/pthread_attr_setdetachstate.3:108
2136 msgid ""
2137 "It is an error to specify the thread ID of a thread that was created in a "
2138 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2139 "(3)."
2140 msgstr ""
2141 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2142 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2143 "エラーである。"
2144
2145 #. type: Plain text
2146 #: build/C/man3/pthread_attr_setdetachstate.3:111
2147 #: build/C/man3/pthread_attr_setstack.3:156
2148 msgid "See B<pthread_attr_init>(3)."
2149 msgstr "B<pthread_attr_init>(3) を参照。"
2150
2151 #. type: Plain text
2152 #: build/C/man3/pthread_attr_setdetachstate.3:117
2153 msgid ""
2154 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2155 "B<pthread_join>(3), B<pthreads>(7)"
2156 msgstr ""
2157 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2158 "B<pthread_join>(3), B<pthreads>(7)"
2159
2160 #. type: TH
2161 #: build/C/man3/pthread_attr_setguardsize.3:26
2162 #, no-wrap
2163 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2164 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2165
2166 #. type: TH
2167 #: build/C/man3/pthread_attr_setguardsize.3:26
2168 #: build/C/man3/pthread_attr_setstack.3:26
2169 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2170 #, no-wrap
2171 msgid "2008-10-24"
2172 msgstr "2008-10-24"
2173
2174 #. type: Plain text
2175 #: build/C/man3/pthread_attr_setguardsize.3:30
2176 msgid ""
2177 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2178 "attribute in thread attributes object"
2179 msgstr ""
2180 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2181 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2182
2183 #. type: Plain text
2184 #: build/C/man3/pthread_attr_setguardsize.3:38
2185 #, no-wrap
2186 msgid ""
2187 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2188 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2189 msgstr ""
2190 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2191 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2192
2193 #. type: Plain text
2194 #: build/C/man3/pthread_attr_setguardsize.3:49
2195 msgid ""
2196 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2197 "of the thread attributes object referred to by I<attr> to the value "
2198 "specified in I<guardsize>."
2199 msgstr ""
2200 "B<pthread_attr_setguardsize>() 関数は、\n"
2201 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2202 "I<guardsize> で指定された値に設定する。"
2203
2204 #. type: Plain text
2205 #: build/C/man3/pthread_attr_setguardsize.3:59
2206 msgid ""
2207 "If I<guardsize> is greater than 0, then for each new thread created using "
2208 "I<attr> the system allocates an additional region of at least I<guardsize> "
2209 "bytes at the end of the thread's stack to act as the guard area for the "
2210 "stack (but see BUGS)."
2211 msgstr ""
2212 "I<guardsize> が 0 より大きい場合、\n"
2213 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2214 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2215 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2216 "機能する (ただし「バグ」の節も参照)。"
2217
2218 #. type: Plain text
2219 #: build/C/man3/pthread_attr_setguardsize.3:65
2220 msgid ""
2221 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2222 "guard area."
2223 msgstr ""
2224 "I<guardsize> が 0 の場合、\n"
2225 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2226
2227 #. type: Plain text
2228 #: build/C/man3/pthread_attr_setguardsize.3:67
2229 msgid "The default guard size is the same as the system page size."
2230 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2231
2232 #. type: Plain text
2233 #: build/C/man3/pthread_attr_setguardsize.3:82
2234 msgid ""
2235 "If the stack address attribute has been set in I<attr> (using "
2236 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2237 "that the caller is allocating the thread's stack, then the guard size "
2238 "attribute is ignored (i.e., no guard area is created by the system): it is "
2239 "the application's responsibility to handle stack overflow (perhaps by using "
2240 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2241 "it has allocated)."
2242 msgstr ""
2243 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2244 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2245 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2246 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2247 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2248 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2249 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2250
2251 #. type: Plain text
2252 #: build/C/man3/pthread_attr_setguardsize.3:90
2253 msgid ""
2254 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2255 "attribute of the thread attributes object referred to by I<attr> in the "
2256 "buffer pointed to by I<guardsize>."
2257 msgstr ""
2258 "B<pthread_attr_getguardsize>() は、\n"
2259 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2260 "I<guardsize> が指すバッファに入れて返す。"
2261
2262 #. type: Plain text
2263 #: build/C/man3/pthread_attr_setguardsize.3:104
2264 msgid ""
2265 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2266 "invalid.  On Linux these functions always succeed (but portable and future-"
2267 "proof applications should nevertheless handle a possible error return)."
2268 msgstr ""
2269 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2270 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2271 "Linux では、これらの関数は常に成功する\n"
2272 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2273 "正のエラーの返り値を処理するようにすべきである)。"
2274
2275 #. type: Plain text
2276 #: build/C/man3/pthread_attr_setguardsize.3:106
2277 #: build/C/man3/pthread_attr_setstackaddr.3:83
2278 #: build/C/man3/pthread_attr_setstacksize.3:83
2279 msgid "These functions are provided by glibc since version 2.1."
2280 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2281
2282 #. type: Plain text
2283 #: build/C/man3/pthread_attr_setguardsize.3:122
2284 msgid ""
2285 "A guard area consists of virtual memory pages that are protected to prevent "
2286 "read and write access.  If a thread overflows its stack into the guard area, "
2287 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2288 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2289 "guard size is internally rounded up to the system page size when creating a "
2290 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2291 "size that was set by B<pthread_attr_setguardsize>().)"
2292 msgstr ""
2293 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2294 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2295 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2296 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2297 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2298 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2299 "(その場合も B<pthread_attr_getguardsize>() では\n"
2300 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2301
2302 #. type: Plain text
2303 #: build/C/man3/pthread_attr_setguardsize.3:126
2304 msgid ""
2305 "Setting a guard size of 0 may be useful to save memory in an application "
2306 "that creates many threads and knows that stack overflow can never occur."
2307 msgstr ""
2308 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2309 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2310 "することで、メモリを節約できることもある。"
2311
2312 #. type: Plain text
2313 #: build/C/man3/pthread_attr_setguardsize.3:130
2314 msgid ""
2315 "Choosing a guard size larger than the default size may be necessary for "
2316 "detecting stack overflows if a thread allocates large data structures on the "
2317 "stack."
2318 msgstr ""
2319 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2320 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2321 "大きな guard size を選ぶ必要があるかもしれない。"
2322
2323 #. type: SH
2324 #: build/C/man3/pthread_attr_setguardsize.3:130
2325 #: build/C/man3/pthread_attr_setinheritsched.3:112
2326 #: build/C/man3/pthread_attr_setstacksize.3:96
2327 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2328 #, no-wrap
2329 msgid "BUGS"
2330 msgstr "バグ"
2331
2332 #. type: Plain text
2333 #: build/C/man3/pthread_attr_setguardsize.3:141
2334 msgid ""
2335 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2336 "within the stack size allocation, rather than allocating extra space at the "
2337 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2338 "error from B<pthread_create>(3)  if the guard size value is too large, "
2339 "leaving no space for the actual stack.)"
2340 msgstr ""
2341 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2342 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2343 "末尾に追加の領域を割り当てることが求められている。\n"
2344 "(このため、ガード領域が大きすぎて、\n"
2345 "実際のスタック用の場所がなくなってしまう場合、\n"
2346 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2347
2348 #.  glibc includes the guardsize within the allocated stack size,
2349 #.  which looks pretty clearly to be in violation of POSIX.
2350 #.  Filed bug, 22 Oct 2008:
2351 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2352 #.  Older reports:
2353 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2354 #.  Reportedly, LinuxThreads did the right thing, allocating
2355 #.  extra space at the end of the stack:
2356 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2357 #. type: Plain text
2358 #: build/C/man3/pthread_attr_setguardsize.3:155
2359 msgid ""
2360 "The obsolete LinuxThreads implementation did the right thing, allocating "
2361 "extra space at the end of the stack for the guard area."
2362 msgstr ""
2363 "廃止予定の LinuxThreads 実装では、\n"
2364 "POSIX.1 で求められている通りの動作で、\n"
2365 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2366
2367 #. type: Plain text
2368 #: build/C/man3/pthread_attr_setguardsize.3:158
2369 msgid "See B<pthread_getattr_np>(3)."
2370 msgstr "B<pthread_getattr_np>(3) を参照。"
2371
2372 #. type: Plain text
2373 #: build/C/man3/pthread_attr_setguardsize.3:166
2374 msgid ""
2375 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2376 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2377 msgstr ""
2378 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2379 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2380
2381 #. type: TH
2382 #: build/C/man3/pthread_attr_setinheritsched.3:26
2383 #, no-wrap
2384 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2385 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2386
2387 #. type: TH
2388 #: build/C/man3/pthread_attr_setinheritsched.3:26
2389 #: build/C/man3/pthread_attr_setscope.3:26
2390 #, no-wrap
2391 msgid "2013-04-19"
2392 msgstr "2013-04-19"
2393
2394 #. type: Plain text
2395 #: build/C/man3/pthread_attr_setinheritsched.3:30
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 - スレッド属性オブ"
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 msgid ""
2420 "The B<pthread_attr_setinheritsched>()  function sets the inherit-scheduler "
2421 "attribute of the thread attributes object referred to by I<attr> to the "
2422 "value specified in I<inheritsched>.  The inherit-scheduler attribute "
2423 "determines whether a thread created using the thread attributes object "
2424 "I<attr> will inherit its scheduling attributes from the calling thread or "
2425 "whether it will take them from I<attr>."
2426 msgstr ""
2427 "B<pthread_attr_setinheritsched>() 関数は、 I<attr> が参照するスレッド属性オブ"
2428 "ジェクトの inherit-scheduler 属性を I<inheritsched> で指定された値に設定す"
2429 "る。 inherit-scheduler 属性により、スレッド属性オブジェクト I<attr> を使って"
2430 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承するか、 "
2431 "I<attr> からスケジューリング属性を取得するかが決定される。"
2432
2433 #. type: Plain text
2434 #: build/C/man3/pthread_attr_setinheritsched.3:64
2435 msgid ""
2436 "The following scheduling attributes are affected by the inherit-scheduler "
2437 "attribute: scheduling policy (B<pthread_attr_setschedpolicy>(3)), scheduling "
2438 "priority (B<pthread_attr_setschedparam>(3)), and contention scope "
2439 "(B<pthread_attr_setscope>(3))."
2440 msgstr ""
2441 "次に挙げるスケジューリング属性は inherit-scheduler 属性の影響を受ける: スケ"
2442 "ジューリングポリシー (B<pthread_attr_setschedpolicy>(3))、 スケジューリング優"
2443 "先度 (B<pthread_attr_setschedparam>(3))、 contention scope "
2444 "(B<pthread_attr_setscope>(3))。"
2445
2446 #. type: Plain text
2447 #: build/C/man3/pthread_attr_setinheritsched.3:67
2448 msgid "The following values may be specified in I<inheritsched>:"
2449 msgstr "以下の値を I<inheritsched> に指定できる。"
2450
2451 #. type: TP
2452 #: build/C/man3/pthread_attr_setinheritsched.3:67
2453 #, no-wrap
2454 msgid "B<PTHREAD_INHERIT_SCHED>"
2455 msgstr "B<PTHREAD_INHERIT_SCHED>"
2456
2457 #. type: Plain text
2458 #: build/C/man3/pthread_attr_setinheritsched.3:75
2459 msgid ""
2460 "Threads that are created using I<attr> inherit scheduling attributes from "
2461 "the creating thread; the scheduling attributes in I<attr> are ignored."
2462 msgstr ""
2463 "I<attr> を使って作成されたスレッドは、\n"
2464 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2465 "I<attr> 内のスケジューリング属性は無視される。"
2466
2467 #. type: TP
2468 #: build/C/man3/pthread_attr_setinheritsched.3:75
2469 #, no-wrap
2470 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2471 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2472
2473 #.  FIXME what are the defaults for scheduler settings?
2474 #. type: Plain text
2475 #: build/C/man3/pthread_attr_setinheritsched.3:82
2476 msgid ""
2477 "Threads that are created using I<attr> take their scheduling attributes from "
2478 "the values specified by the attributes object."
2479 msgstr ""
2480 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2481 "指定された値からスケジューリング属性を取得する。"
2482
2483 #. type: Plain text
2484 #: build/C/man3/pthread_attr_setinheritsched.3:86
2485 msgid ""
2486 "The default setting of the inherit-scheduler attribute in a newly "
2487 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2488 msgstr ""
2489 "新たに初期化されたスレッド属性オブジェクトの inherit-scheduler 属性のデフォル"
2490 "ト設定は B<PTHREAD_INHERIT_SCHED> である。"
2491
2492 #. type: Plain text
2493 #: build/C/man3/pthread_attr_setinheritsched.3:93
2494 msgid ""
2495 "The B<pthread_attr_getinheritsched>()  returns the inherit-scheduler "
2496 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2497 "by I<inheritsched>."
2498 msgstr ""
2499 "B<pthread_attr_getinheritsched>() は、 スレッド属性オブジェクト I<attr> の "
2500 "inherit-scheduler 属性を I<inheritsched> が指すバッファに入れて返す。"
2501
2502 #. type: Plain text
2503 #: build/C/man3/pthread_attr_setinheritsched.3:99
2504 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2505 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2506
2507 #. type: Plain text
2508 #: build/C/man3/pthread_attr_setinheritsched.3:103
2509 msgid "Invalid value in I<inheritsched>."
2510 msgstr "I<inheritsched> に無効な値が指定された。"
2511
2512 #.  .SH VERSIONS
2513 #.  Available since glibc 2.0.
2514 #. type: Plain text
2515 #: build/C/man3/pthread_attr_setinheritsched.3:110
2516 msgid ""
2517 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2518 "to set the attribute to an unsupported value\") for "
2519 "B<pthread_attr_setinheritsched>()."
2520 msgstr ""
2521 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2522 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2523 "も追加で規定されている。"
2524
2525 #.  FIXME . Track status of the following bug:
2526 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2527 #. type: Plain text
2528 #: build/C/man3/pthread_attr_setinheritsched.3:128
2529 msgid ""
2530 "As at glibc 2.8, if a thread attributes object is initialized using "
2531 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2532 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2533 "if the inherit-scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2534 "then a thread created using the attribute object wrongly inherits its "
2535 "scheduling attributes from the creating thread.  This bug does not occur if "
2536 "either the scheduling policy or scheduling priority attribute is explicitly "
2537 "set in the thread attributes object before calling B<pthread_create>(3)."
2538 msgstr ""
2539 "glibc 2.8 の時点では、スレッド属性オブジェクトが B<pthread_attr_init>(3) を"
2540 "使って初期化された場合、 スレッド属性オブジェクトのスケジューリングポリシー"
2541 "が B<SCHED_OTHER> に、 スケジューリング優先度が 0 に設定される。一方、その後 "
2542 "inherit-scheduler 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ"
2543 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するスレッド"
2544 "のスケジューリング属性が間違って継承されてしまう。 B<pthread_create>(3) を呼"
2545 "び出す前にスケジューリングポリシー属性かスケジューリング優先度属性のどちらか"
2546 "が明示的に設定された場合には、 このバグは発生しない。"
2547
2548 #. type: Plain text
2549 #: build/C/man3/pthread_attr_setinheritsched.3:131
2550 #: build/C/man3/pthread_attr_setschedparam.3:109
2551 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2552 msgid "See B<pthread_setschedparam>(3)."
2553 msgstr "B<pthread_setschedparam>(3) を参照。"
2554
2555 #. type: Plain text
2556 #: build/C/man3/pthread_attr_setinheritsched.3:143
2557 msgid ""
2558 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2559 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2560 "B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>"
2561 "(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2562 msgstr ""
2563 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2564 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2565 "B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>"
2566 "(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2567
2568 #. type: TH
2569 #: build/C/man3/pthread_attr_setschedparam.3:26
2570 #, no-wrap
2571 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2572 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2573
2574 #. type: TH
2575 #: build/C/man3/pthread_attr_setschedparam.3:26
2576 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2577 #: build/C/man3/pthread_setname_np.3:26
2578 #, no-wrap
2579 msgid "2013-06-21"
2580 msgstr "2013-06-21"
2581
2582 #. type: Plain text
2583 #: build/C/man3/pthread_attr_setschedparam.3:30
2584 msgid ""
2585 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2586 "parameter attributes in thread attributes object"
2587 msgstr ""
2588 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2589 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2590
2591 #. type: Plain text
2592 #: build/C/man3/pthread_attr_setschedparam.3:38
2593 #, no-wrap
2594 msgid ""
2595 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2596 "B<                               const struct sched_param *>I<param>B<);>\n"
2597 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2598 "B<                               struct sched_param *>I<param>B<);>\n"
2599 msgstr ""
2600 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2601 "B<                               const struct sched_param *>I<param>B<);>\n"
2602 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2603 "B<                               struct sched_param *>I<param>B<);>\n"
2604
2605 #. type: Plain text
2606 #: build/C/man3/pthread_attr_setschedparam.3:52
2607 msgid ""
2608 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2609 "attributes of the thread attributes object referred to by I<attr> to the "
2610 "values specified in the buffer pointed to by I<param>.  These attributes "
2611 "determine the scheduling parameters of a thread created using the thread "
2612 "attributes object I<attr>."
2613 msgstr ""
2614 "B<pthread_attr_setschedparam>() 関数は、\n"
2615 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2616 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2617 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2618 "作成されるスレッドのスケジューリングパラメータが決定される。"
2619
2620 #. type: Plain text
2621 #: build/C/man3/pthread_attr_setschedparam.3:59
2622 msgid ""
2623 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2624 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2625 "by I<param>."
2626 msgstr ""
2627 "B<pthread_attr_getschedparam>() は、\n"
2628 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2629 "I<param> が指すバッファに入れて返す。"
2630
2631 #. type: Plain text
2632 #: build/C/man3/pthread_attr_setschedparam.3:61
2633 msgid "Scheduling parameters are maintained in the following structure:"
2634 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2635
2636 #. type: Plain text
2637 #: build/C/man3/pthread_attr_setschedparam.3:67
2638 #: build/C/man3/pthread_setschedparam.3:69
2639 #, no-wrap
2640 msgid ""
2641 "struct sched_param {\n"
2642 "    int sched_priority;     /* Scheduling priority */\n"
2643 "};\n"
2644 msgstr ""
2645 "struct sched_param {\n"
2646 "    int sched_priority;     /* Scheduling priority */\n"
2647 "};\n"
2648
2649 #. type: Plain text
2650 #: build/C/man3/pthread_attr_setschedparam.3:74
2651 #: build/C/man3/pthread_setschedparam.3:76
2652 msgid ""
2653 "As can be seen, only one scheduling parameter is supported.  For details of "
2654 "the permitted ranges for scheduling priorities in each scheduling policy, "
2655 "see B<sched_setscheduler>(2)."
2656 msgstr ""
2657 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2658 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2659 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2660
2661 #. type: Plain text
2662 #: build/C/man3/pthread_attr_setschedparam.3:85
2663 msgid ""
2664 "In order for the parameter setting made by B<pthread_attr_setschedparam>()  "
2665 "to have effect when calling B<pthread_create>(3), the caller must use "
2666 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2667 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2668 msgstr ""
2669 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedparam>() で行っ"
2670 "たパラメータ設定を有効にするには、 呼び出し側で "
2671 "B<pthread_attr_setinheritsched>(3) を使って 属性オブジェクト I<attr> の "
2672 "inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければなら"
2673 "ない。"
2674
2675 #.  .SH VERSIONS
2676 #.  Available since glibc 2.0.
2677 #. type: Plain text
2678 #: build/C/man3/pthread_attr_setschedparam.3:100
2679 msgid ""
2680 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2681 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2682 "(but portable and future-proof applications should nevertheless handle a "
2683 "possible error return)."
2684 msgstr ""
2685 "POSIX.1 では、\n"
2686 "B<pthread_attr_setschedparam>() について\n"
2687 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2688 "Linux では、これらの関数は常に成功する\n"
2689 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2690 "正のエラーの返り値を処理するようにすべきである)。"
2691
2692 #. type: Plain text
2693 #: build/C/man3/pthread_attr_setschedparam.3:106
2694 msgid ""
2695 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2696 "policies supported on Linux."
2697 msgstr ""
2698 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2699 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2700
2701 #. type: Plain text
2702 #: build/C/man3/pthread_attr_setschedparam.3:121
2703 msgid ""
2704 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2705 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2706 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2707 "(3), B<pthreads>(7)"
2708 msgstr ""
2709 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2710 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2711 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2712 "(3), B<pthreads>(7)"
2713
2714 #. type: TH
2715 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2716 #, no-wrap
2717 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2718 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2719
2720 #. type: Plain text
2721 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2722 msgid ""
2723 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2724 "scheduling policy attribute in thread attributes object"
2725 msgstr ""
2726 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2727 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2728
2729 #. type: Plain text
2730 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2731 #, no-wrap
2732 msgid ""
2733 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2734 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2735 msgstr ""
2736 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2737 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2738
2739 #. type: Plain text
2740 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2741 msgid ""
2742 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2743 "attribute of the thread attributes object referred to by I<attr> to the "
2744 "value specified in I<policy>.  This attribute determines the scheduling "
2745 "policy of a thread created using the thread attributes object I<attr>."
2746 msgstr ""
2747 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2748 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2749 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2750 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2751 "作成されるスレッドのスケジューリングポリシーが決定される。"
2752
2753 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2754 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2755 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2756 #. type: Plain text
2757 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2758 msgid ""
2759 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2760 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2761 msgstr ""
2762 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2763 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2764 "である。"
2765
2766 #. type: Plain text
2767 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2768 msgid ""
2769 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2770 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2771 "by I<policy>."
2772 msgstr ""
2773 "B<pthread_attr_getschedpolicy>() は、\n"
2774 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2775 "I<policy> が指すバッファに入れて返す。"
2776
2777 #. type: Plain text
2778 #: build/C/man3/pthread_attr_setschedpolicy.3:83
2779 msgid ""
2780 "In order for the policy setting made by B<pthread_attr_setschedpolicy>()  to "
2781 "have effect when calling B<pthread_create>(3), the caller must use "
2782 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2783 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2784 msgstr ""
2785 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedpolicy>() で行っ"
2786 "たポリシー設定を有効にするには、 呼び出し側で B<pthread_attr_setinheritsched>"
2787 "(3) を使って 属性オブジェクト I<attr> の inherit-scheduler 属性を "
2788 "B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければならない。"
2789
2790 #. type: Plain text
2791 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2792 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2793 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2794
2795 #. type: Plain text
2796 #: build/C/man3/pthread_attr_setschedpolicy.3:93
2797 msgid "Invalid value in I<policy>."
2798 msgstr "I<policy> に無効な値が指定された。"
2799
2800 #.  .SH VERSIONS
2801 #.  Available since glibc 2.0.
2802 #. type: Plain text
2803 #: build/C/man3/pthread_attr_setschedpolicy.3:100
2804 msgid ""
2805 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2806 "to set the attribute to an unsupported value\") for "
2807 "B<pthread_attr_setschedpolicy>()."
2808 msgstr ""
2809 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2810 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2811 "も追加で規定されている。"
2812
2813 #. type: Plain text
2814 #: build/C/man3/pthread_attr_setschedpolicy.3:116
2815 msgid ""
2816 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2817 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2818 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2819 "(3), B<pthreads>(7)"
2820 msgstr ""
2821 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2822 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2823 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2824 "(3), B<pthreads>(7)"
2825
2826 #. type: TH
2827 #: build/C/man3/pthread_attr_setscope.3:26
2828 #, no-wrap
2829 msgid "PTHREAD_ATTR_SETSCOPE"
2830 msgstr "PTHREAD_ATTR_SETSCOPE"
2831
2832 #. type: Plain text
2833 #: build/C/man3/pthread_attr_setscope.3:30
2834 msgid ""
2835 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2836 "attribute in thread attributes object"
2837 msgstr ""
2838 "pthread_attr_setscope, pthread_attr_getscope - \n"
2839 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2840
2841 #. type: Plain text
2842 #: build/C/man3/pthread_attr_setscope.3:38
2843 #, no-wrap
2844 msgid ""
2845 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2846 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2847 msgstr ""
2848 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2849 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2850
2851 #. type: Plain text
2852 #: build/C/man3/pthread_attr_setscope.3:53
2853 msgid ""
2854 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2855 "of the thread attributes object referred to by I<attr> to the value "
2856 "specified in I<scope>.  The contention scope attribute defines the set of "
2857 "threads against which a thread competes for resources such as the CPU.  "
2858 "POSIX.1-2001 specifies two possible values for I<scope>:"
2859 msgstr ""
2860 "B<pthread_attr_setscope>() 関数は、\n"
2861 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2862 "属性を I<scope> で指定された値に設定する。\n"
2863 "contention scope 属性により、\n"
2864 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2865 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2866
2867 #. type: TP
2868 #: build/C/man3/pthread_attr_setscope.3:53
2869 #, no-wrap
2870 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2871 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2872
2873 #. type: Plain text
2874 #: build/C/man3/pthread_attr_setscope.3:61
2875 msgid ""
2876 "The thread competes for resources with all other threads in all processes on "
2877 "the system that are in the same scheduling allocation domain (a group of one "
2878 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2879 "to one another according to their scheduling policy and priority."
2880 msgstr ""
2881 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2882 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2883 "スレッドとリソースを取り合う。 \n"
2884 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2885 "優先度に基づき、互いに相対的にスケジューリングされる。"
2886
2887 #. type: TP
2888 #: build/C/man3/pthread_attr_setscope.3:61
2889 #, no-wrap
2890 msgid "B<PTHREAD_SCOPE_PROCESS>"
2891 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2892
2893 #. type: Plain text
2894 #: build/C/man3/pthread_attr_setscope.3:76
2895 msgid ""
2896 "The thread competes for resources with all other threads in the same process "
2897 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2898 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2899 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2900 "leaves it unspecified how these threads contend with other threads in other "
2901 "process on the system or with other threads in the same process that were "
2902 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2903 msgstr ""
2904 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2905 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2906 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2907 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2908 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2909 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2910 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2911 "規定されないままになっている。"
2912
2913 #. type: Plain text
2914 #: build/C/man3/pthread_attr_setscope.3:83
2915 msgid ""
2916 "POSIX.1-2001 requires that an implementation support at least one of these "
2917 "contention scopes.  Linux supports B<PTHREAD_SCOPE_SYSTEM>, but not "
2918 "B<PTHREAD_SCOPE_PROCESS>."
2919 msgstr ""
2920 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention scope の"
2921 "うち少なくとも 1 つをサポートすることだけである。 Linux は "
2922 "B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、 B<PTHREAD_SCOPE_PROCESS> はサ"
2923 "ポートしていない。"
2924
2925 #. type: Plain text
2926 #: build/C/man3/pthread_attr_setscope.3:95
2927 msgid ""
2928 "On systems that support multiple contention scopes, then, in order for the "
2929 "parameter setting made by B<pthread_attr_setscope>()  to have effect when "
2930 "calling B<pthread_create>(3), the caller must use "
2931 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2932 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2933 msgstr ""
2934 "複数の contention scope をサポートしているシステムで、 B<pthread_create>(3) "
2935 "を呼び出した際に B<pthread_attr_setscope>() で行ったパラメータ設定を有効にす"
2936 "るには、 呼び出し側で B<pthread_attr_setinheritsched>(3) を使って 属性オブ"
2937 "ジェクト I<attr> の inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定"
2938 "しておかなければならない。"
2939
2940 #. type: Plain text
2941 #: build/C/man3/pthread_attr_setscope.3:103
2942 msgid ""
2943 "The B<pthread_attr_getscope>()  function returns the contention scope "
2944 "attribute of the thread attributes object referred to by I<attr> in the "
2945 "buffer pointed to by I<scope>."
2946 msgstr ""
2947 "B<pthread_attr_getscope>() は、\n"
2948 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2949 "I<scope> が指すバッファに入れて返す。"
2950
2951 #. type: Plain text
2952 #: build/C/man3/pthread_attr_setscope.3:109
2953 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2954 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2955
2956 #. type: Plain text
2957 #: build/C/man3/pthread_attr_setscope.3:113
2958 msgid "An invalid value was specified in I<scope>."
2959 msgstr "I<scope> に無効な値が指定された。"
2960
2961 #. type: TP
2962 #: build/C/man3/pthread_attr_setscope.3:113
2963 #, no-wrap
2964 msgid "B<ENOTSUP>"
2965 msgstr "B<ENOTSUP>"
2966
2967 #. type: Plain text
2968 #: build/C/man3/pthread_attr_setscope.3:119
2969 msgid ""
2970 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2971 "supported on Linux."
2972 msgstr ""
2973 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
2974 "この値は Linux でサポートされていない。"
2975
2976 #. type: Plain text
2977 #: build/C/man3/pthread_attr_setscope.3:129
2978 msgid ""
2979 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
2980 "space thread is bound directly to a single kernel-scheduling entity.  This "
2981 "is the case on Linux for the obsolete LinuxThreads implementation and the "
2982 "modern NPTL implementation, which are both 1:1 threading implementations."
2983 msgstr ""
2984 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
2985 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
2986 "直接結び付けられる。\n"
2987 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
2988 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
2989
2990 #. type: Plain text
2991 #: build/C/man3/pthread_attr_setscope.3:132
2992 msgid ""
2993 "POSIX.1-2001 specifies that the default contention scope is implementation-"
2994 "defined."
2995 msgstr ""
2996 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
2997 "実装時で定義されるものと規定されている。"
2998
2999 #. type: Plain text
3000 #: build/C/man3/pthread_attr_setscope.3:142
3001 msgid ""
3002 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3003 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3004 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3005 msgstr ""
3006 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3007 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3008 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3009
3010 #. type: TH
3011 #: build/C/man3/pthread_attr_setstack.3:26
3012 #, no-wrap
3013 msgid "PTHREAD_ATTR_SETSTACK"
3014 msgstr "PTHREAD_ATTR_SETSTACK"
3015
3016 #. type: Plain text
3017 #: build/C/man3/pthread_attr_setstack.3:30
3018 msgid ""
3019 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
3020 "thread attributes object"
3021 msgstr ""
3022 "pthread_attr_setstack, pthread_attr_getstack - \n"
3023 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
3024
3025 #. type: Plain text
3026 #: build/C/man3/pthread_attr_setstack.3:38
3027 #, no-wrap
3028 msgid ""
3029 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3030 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3031 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3032 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3033 msgstr ""
3034 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3035 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3036 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3037 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3038
3039 #. type: Plain text
3040 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_sigqueue.3:41
3041 msgid ""
3042 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3043 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3044
3045 #. type: Plain text
3046 #: build/C/man3/pthread_attr_setstack.3:50
3047 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3048 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3049
3050 #. type: Plain text
3051 #: build/C/man3/pthread_attr_setstack.3:52
3052 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3053 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3054
3055 #. type: Plain text
3056 #: build/C/man3/pthread_attr_setstack.3:68
3057 msgid ""
3058 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3059 "size attributes of the thread attributes object referred to by I<attr> to "
3060 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3061 "attributes specify the location and size of the stack that should be used by "
3062 "a thread that is created using the thread attributes object I<attr>."
3063 msgstr ""
3064 "B<pthread_attr_setstack>() 関数は、\n"
3065 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3066 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3067 "指定された値に設定する。\n"
3068 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3069 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3070
3071 #. type: Plain text
3072 #: build/C/man3/pthread_attr_setstack.3:74
3073 msgid ""
3074 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3075 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3076 "allocated buffer should be both readable and writable."
3077 msgstr ""
3078 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3079 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3080 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3081 "べきである。"
3082
3083 #. type: Plain text
3084 #: build/C/man3/pthread_attr_setstack.3:85
3085 msgid ""
3086 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3087 "size attributes of the thread attributes object referred to by I<attr> in "
3088 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3089 msgstr ""
3090 "B<pthread_attr_getstack>() 関数は、\n"
3091 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3092 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3093 "指すバッファに入れて返す。"
3094
3095 #. type: Plain text
3096 #: build/C/man3/pthread_attr_setstack.3:91
3097 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3098 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3099
3100 #. type: Plain text
3101 #: build/C/man3/pthread_attr_setstack.3:102
3102 msgid ""
3103 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3104 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3105 "stacksize> is not suitably aligned."
3106 msgstr ""
3107 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3108 "システムによっては、 I<stackaddr> か\n"
3109 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3110 "このエラーが発生する。"
3111
3112 #. type: Plain text
3113 #: build/C/man3/pthread_attr_setstack.3:110
3114 msgid ""
3115 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3116 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3117 "caller."
3118 msgstr ""
3119 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3120 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3121 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3122
3123 #. type: Plain text
3124 #: build/C/man3/pthread_attr_setstack.3:112
3125 msgid "These functions are provided by glibc since version 2.2."
3126 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3127
3128 #. type: Plain text
3129 #: build/C/man3/pthread_attr_setstack.3:122
3130 msgid ""
3131 "These functions are provided for applications that must ensure that a "
3132 "thread's stack is placed in a particular location.  For most applications, "
3133 "this is not necessary, and the use of these functions should be avoided.  "
3134 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3135 "stack size other than the default.)"
3136 msgstr ""
3137 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3138 "しなければならないアプリケーションのために提供されている。\n"
3139 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3140 "これらの関数を使うのは避けるべきである。\n"
3141 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3142 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3143
3144 #. type: Plain text
3145 #: build/C/man3/pthread_attr_setstack.3:133
3146 msgid ""
3147 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3148 "responsibility of allocating the stack.  Any guard size value that was set "
3149 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3150 "is the application's responsibility to allocate a guard area (one or more "
3151 "pages protected against reading and writing)  to handle the possibility of "
3152 "stack overflow."
3153 msgstr ""
3154 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3155 "スタックの割り当てに責任を持つ必要がある。\n"
3156 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3157 "guard size の値は無視される。\n"
3158 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3159 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3160 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3161
3162 #. type: Plain text
3163 #: build/C/man3/pthread_attr_setstack.3:144
3164 msgid ""
3165 "The address specified in I<stackaddr> should be suitably aligned: for full "
3166 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3167 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3168 "should also be a multiple of the system page size."
3169 msgstr ""
3170 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3171 "完全な移植性を持たせるためには、\n"
3172 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3173 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3174 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3175
3176 #. type: Plain text
3177 #: build/C/man3/pthread_attr_setstack.3:153
3178 msgid ""
3179 "If I<attr> is used to create multiple threads, then the caller must change "
3180 "the stack address attribute between calls to B<pthread_create>(3); "
3181 "otherwise, the threads will attempt to use the same memory area for their "
3182 "stacks, and chaos will ensue."
3183 msgstr ""
3184 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3185 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3186 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3187 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3188 "使おうとするため、訳の分からない状況が発生してしまう。"
3189
3190 #. type: Plain text
3191 #: build/C/man3/pthread_attr_setstack.3:168
3192 msgid ""
3193 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3194 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3195 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3196 msgstr ""
3197 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3198 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3199 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3200
3201 #. type: TH
3202 #: build/C/man3/pthread_attr_setstackaddr.3:26
3203 #, no-wrap
3204 msgid "PTHREAD_ATTR_SETSTACKADDR"
3205 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3206
3207 #. type: Plain text
3208 #: build/C/man3/pthread_attr_setstackaddr.3:30
3209 msgid ""
3210 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3211 "attribute in thread attributes object"
3212 msgstr ""
3213 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3214 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3215
3216 #. type: Plain text
3217 #: build/C/man3/pthread_attr_setstackaddr.3:38
3218 #, no-wrap
3219 msgid ""
3220 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3221 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3222 msgstr ""
3223 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3224 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3225
3226 #. type: Plain text
3227 #: build/C/man3/pthread_attr_setstackaddr.3:49
3228 msgid ""
3229 "These functions are obsolete: B<do not use them.> Use "
3230 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3231 msgstr ""
3232 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3233 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3234 "うこと。"
3235
3236 #. type: Plain text
3237 #: build/C/man3/pthread_attr_setstackaddr.3:60
3238 msgid ""
3239 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3240 "attribute of the thread attributes object referred to by I<attr> to the "
3241 "value specified in I<stackaddr>.  This attribute specifies the location of "
3242 "the stack that should be used by a thread that is created using the thread "
3243 "attributes object I<attr>."
3244 msgstr ""
3245 "B<pthread_attr_setstackaddr>() 関数は、\n"
3246 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3247 "属性を I<stackaddr> で指定された値に設定する。\n"
3248 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3249 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3250
3251 #. type: Plain text
3252 #: build/C/man3/pthread_attr_setstackaddr.3:66
3253 msgid ""
3254 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3255 "that was allocated by the caller.  The pages of the allocated buffer should "
3256 "be both readable and writable."
3257 msgstr ""
3258 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3259 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3260 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3261 "なっているべきである。"
3262
3263 #. type: Plain text
3264 #: build/C/man3/pthread_attr_setstackaddr.3:74
3265 msgid ""
3266 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3267 "attribute of the thread attributes object referred to by I<attr> in the "
3268 "buffer pointed to by I<stackaddr>."
3269 msgstr ""
3270 "B<pthread_attr_getstackaddr>() は、\n"
3271 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3272 "I<stackaddr> が指すバッファに入れて返す。"
3273
3274 #. type: Plain text
3275 #: build/C/man3/pthread_attr_setstackaddr.3:81
3276 msgid ""
3277 "No errors are defined (but applications should nevertheless handle a "
3278 "possible error return)."
3279 msgstr ""
3280 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3281 "返り値を処理するようにすべきである)。"
3282
3283 #. type: Plain text
3284 #: build/C/man3/pthread_attr_setstackaddr.3:86
3285 msgid ""
3286 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3287 "POSIX.1-2008 removes the specification of these functions."
3288 msgstr ""
3289 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3290 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3291
3292 #. type: Plain text
3293 #: build/C/man3/pthread_attr_setstackaddr.3:110
3294 msgid ""
3295 "I<Do not use these functions!> They cannot be portably used, since they "
3296 "provide no way of specifying the direction of growth or the range of the "
3297 "stack.  For example, on architectures with a stack that grows downward, "
3298 "I<stackaddr> specifies the next address past the I<highest> address of the "
3299 "allocated stack area.  However, on architectures with a stack that grows "
3300 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3301 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3302 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3303 "in the allocated stack area (and the I<stacksize> argument specifies the "
3304 "range of the stack)."
3305 msgstr ""
3306 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3307 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3308 "かを指定する手段が提供されていないからである。\n"
3309 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3310 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3311 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3312 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3313 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3314 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3315 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3316 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3317
3318 #. type: Plain text
3319 #: build/C/man3/pthread_attr_setstackaddr.3:116
3320 msgid ""
3321 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3322 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3323 msgstr ""
3324 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3325 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3326
3327 #. type: TH
3328 #: build/C/man3/pthread_attr_setstacksize.3:26
3329 #, no-wrap
3330 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3331 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3332
3333 #. type: TH
3334 #: build/C/man3/pthread_attr_setstacksize.3:26
3335 #, no-wrap
3336 msgid "2012-03-15"
3337 msgstr "2012-03-15"
3338
3339 #. type: Plain text
3340 #: build/C/man3/pthread_attr_setstacksize.3:30
3341 msgid ""
3342 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3343 "attribute in thread attributes object"
3344 msgstr ""
3345 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3346 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3347
3348 #. type: Plain text
3349 #: build/C/man3/pthread_attr_setstacksize.3:38
3350 #, no-wrap
3351 msgid ""
3352 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3353 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3354 msgstr ""
3355 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3356 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3357
3358 #. type: Plain text
3359 #: build/C/man3/pthread_attr_setstacksize.3:49
3360 msgid ""
3361 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3362 "of the thread attributes object referred to by I<attr> to the value "
3363 "specified in I<stacksize>."
3364 msgstr ""
3365 "B<pthread_attr_setstacksize>() 関数は、\n"
3366 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3367 "属性を I<stacksize> で指定された値に設定する。"
3368
3369 #. type: Plain text
3370 #: build/C/man3/pthread_attr_setstacksize.3:53
3371 msgid ""
3372 "The stack size attribute determines the minimum size (in bytes) that will be "
3373 "allocated for threads created using the thread attributes object I<attr>."
3374 msgstr ""
3375 "スタックサイズ属性により、\n"
3376 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3377 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3378
3379 #. type: Plain text
3380 #: build/C/man3/pthread_attr_setstacksize.3:61
3381 msgid ""
3382 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3383 "attribute of the thread attributes object referred to by I<attr> in the "
3384 "buffer pointed to by I<stacksize>."
3385 msgstr ""
3386 "B<pthread_attr_getstacksize>() は、\n"
3387 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3388 "I<stacksize> が指すバッファに入れて返す。"
3389
3390 #. type: Plain text
3391 #: build/C/man3/pthread_attr_setstacksize.3:67
3392 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3393 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3394
3395 #. type: Plain text
3396 #: build/C/man3/pthread_attr_setstacksize.3:72
3397 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3398 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3399
3400 #.  e.g., MacOS
3401 #. type: Plain text
3402 #: build/C/man3/pthread_attr_setstacksize.3:81
3403 msgid ""
3404 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3405 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3406 msgstr ""
3407 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3408 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3409 "エラー B<EINVAL> で失敗する。"
3410
3411 #. type: Plain text
3412 #: build/C/man3/pthread_attr_setstacksize.3:88
3413 msgid ""
3414 "For details on the default stack size of new threads, see B<pthread_create>"
3415 "(3)."
3416 msgstr ""
3417 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3418 "B<pthread_create>(3) を参照。"
3419
3420 #. type: Plain text
3421 #: build/C/man3/pthread_attr_setstacksize.3:91
3422 msgid ""
3423 "A thread's stack size is fixed at the time of thread creation.  Only the "
3424 "main thread can dynamically grow its stack."
3425 msgstr ""
3426 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3427 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3428
3429 #. type: Plain text
3430 #: build/C/man3/pthread_attr_setstacksize.3:96
3431 msgid ""
3432 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3433 "the size and location of a caller-allocated stack that is to be used by a "
3434 "thread."
3435 msgstr ""
3436 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3437 "アプリケーションは、スレッドが使用するスタックとして、\n"
3438 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3439
3440 #. type: Plain text
3441 #: build/C/man3/pthread_attr_setstacksize.3:108
3442 msgid ""
3443 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3444 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3445 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3446 "stack will be at least I<stacksize> bytes."
3447 msgstr ""
3448 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3449 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3450 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3451 "これは POSIX.1-2001 に違反している。\n"
3452 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3453 "少なくとも I<stacksize> バイトになると書かれている。"
3454
3455 #. type: Plain text
3456 #: build/C/man3/pthread_attr_setstacksize.3:111
3457 #: build/C/man3/pthread_join.3:127
3458 msgid "See B<pthread_create>(3)."
3459 msgstr "B<pthread_create>(3) を参照。"
3460
3461 #. type: Plain text
3462 #: build/C/man3/pthread_attr_setstacksize.3:118
3463 msgid ""
3464 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3465 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3466 msgstr ""
3467 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3468 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3469
3470 #. type: TH
3471 #: build/C/man3/pthread_cancel.3:26
3472 #, no-wrap
3473 msgid "PTHREAD_CANCEL"
3474 msgstr "PTHREAD_CANCEL"
3475
3476 #. type: TH
3477 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3478 #, no-wrap
3479 msgid "2008-11-17"
3480 msgstr "2008-11-17"
3481
3482 #. type: Plain text
3483 #: build/C/man3/pthread_cancel.3:29
3484 msgid "pthread_cancel - send a cancellation request to a thread"
3485 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3486
3487 #. type: Plain text
3488 #: build/C/man3/pthread_cancel.3:34
3489 #, no-wrap
3490 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3491 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3492
3493 #. type: Plain text
3494 #: build/C/man3/pthread_cancel.3:49
3495 msgid ""
3496 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3497 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3498 "request depends on two attributes that are under the control of that thread: "
3499 "its cancelability I<state> and I<type>."
3500 msgstr ""
3501 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3502 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3503 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3504 "I<state> と I<type>により決まる。"
3505
3506 #. type: Plain text
3507 #: build/C/man3/pthread_cancel.3:61
3508 msgid ""
3509 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3510 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3511 "has disabled cancellation, then a cancellation request remains queued until "
3512 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3513 "its cancelability type determines when cancellation occurs."
3514 msgstr ""
3515 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3516 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3517 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3518 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3519 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3520 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3521
3522 #. type: Plain text
3523 #: build/C/man3/pthread_cancel.3:77
3524 msgid ""
3525 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3526 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3527 "Asynchronous cancelability means that the thread can be canceled at any time "
3528 "(usually immediately, but the system does not guarantee this).  Deferred "
3529 "cancelability means that cancellation will be delayed until the thread next "
3530 "calls a function that is a I<cancellation point>.  A list of functions that "
3531 "are or may be cancellation points is provided in I<pthreads>(7)."
3532 msgstr ""
3533 "スレッドのキャンセル種別 (cancelability type) は\n"
3534 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3535 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3536 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3537 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3538 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3539 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3540 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3541 "遅延される。取り消しポイントに設定されていたり設定\n"
3542 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3543
3544 #. type: Plain text
3545 #: build/C/man3/pthread_cancel.3:81
3546 msgid ""
3547 "When a cancellation requested is acted on, the following steps occur for "
3548 "I<thread> (in this order):"
3549 msgstr ""
3550 "キャンセル要求が実行されると、\n"
3551 "I<thread> では以下のステップが (この順序で) 行われる。"
3552
3553 #. type: IP
3554 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3555 #, no-wrap
3556 msgid "1."
3557 msgstr "1."
3558
3559 #. type: Plain text
3560 #: build/C/man3/pthread_cancel.3:86
3561 msgid ""
3562 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3563 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3564 msgstr ""
3565 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3566 "取り出され (pop され)、呼び出される。\n"
3567 "(B<pthread_cleanup_push>(3) 参照)"
3568
3569 #. type: IP
3570 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3571 #, no-wrap
3572 msgid "2."
3573 msgstr "2."
3574
3575 #. type: Plain text
3576 #: build/C/man3/pthread_cancel.3:91
3577 msgid ""
3578 "Thread-specific data destructors are called, in an unspecified order.  (See "
3579 "B<pthread_key_create>(3).)"
3580 msgstr ""
3581 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3582 "呼び出し順序は規定されていない。\n"
3583 "(B<pthread_key_create>(3) 参照)"
3584
3585 #. type: IP
3586 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3587 #, no-wrap
3588 msgid "3."
3589 msgstr "3."
3590
3591 #. type: Plain text
3592 #: build/C/man3/pthread_cancel.3:95
3593 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3594 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3595
3596 #. type: Plain text
3597 #: build/C/man3/pthread_cancel.3:103
3598 msgid ""
3599 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3600 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3601 "caller whether the cancellation request was successfully queued."
3602 msgstr ""
3603 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3604 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3605 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3606
3607 #. type: Plain text
3608 #: build/C/man3/pthread_cancel.3:112
3609 msgid ""
3610 "After a canceled thread has terminated, a join with that thread using "
3611 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3612 "status.  (Joining with a thread is the only way to know that cancellation "
3613 "has completed.)"
3614 msgstr ""
3615 "キャンセルされたスレッドが終了された後に、\n"
3616 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3617 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3618 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3619
3620 #. type: Plain text
3621 #: build/C/man3/pthread_cancel.3:117
3622 msgid ""
3623 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3624 "error number."
3625 msgstr ""
3626 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3627 "エラーの場合、0 以外のエラー番号を返す。"
3628
3629 #. type: TP
3630 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3631 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3632 #: build/C/man3/pthread_kill.3:61 build/C/man3/pthread_setaffinity_np.3:114
3633 #: build/C/man3/pthread_setschedparam.3:114
3634 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3635 #, no-wrap
3636 msgid "B<ESRCH>"
3637 msgstr "B<ESRCH>"
3638
3639 #. type: Plain text
3640 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3641 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3642 #: build/C/man3/pthread_kill.3:66 build/C/man3/pthread_setaffinity_np.3:119
3643 #: build/C/man3/pthread_setschedparam.3:119
3644 #: build/C/man3/pthread_setschedprio.3:75
3645 msgid "No thread with the ID I<thread> could be found."
3646 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3647
3648 #. type: Plain text
3649 #: build/C/man3/pthread_cancel.3:135
3650 msgid ""
3651 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3652 "threading implementation, the first real-time signal (i.e., signal 32) is "
3653 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3654 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3655 msgstr ""
3656 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3657 "は、\n"
3658 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3659 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3660 "ム\n"
3661 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3662
3663 #. type: Plain text
3664 #: build/C/man3/pthread_cancel.3:141
3665 msgid ""
3666 "The program below creates a thread and then cancels it.  The main thread "
3667 "joins with the canceled thread to check that its exit status was "
3668 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3669 "run the program:"
3670 msgstr ""
3671 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3672 "る。\n"
3673 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3674 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3675 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3676
3677 #. type: Plain text
3678 #: build/C/man3/pthread_cancel.3:149
3679 #, no-wrap
3680 msgid ""
3681 "$ ./a.out\n"
3682 "thread_func(): started; cancellation disabled\n"
3683 "main(): sending cancellation request\n"
3684 "thread_func(): about to enable cancellation\n"
3685 "main(): thread was canceled\n"
3686 msgstr ""
3687 "$ ./a.out\n"
3688 "thread_func(): started; cancellation disabled\n"
3689 "main(): sending cancellation request\n"
3690 "thread_func(): about to enable cancellation\n"
3691 "main(): thread was canceled\n"
3692
3693 #. type: Plain text
3694 #: build/C/man3/pthread_cancel.3:159
3695 #, no-wrap
3696 msgid ""
3697 "#include E<lt>pthread.hE<gt>\n"
3698 "#include E<lt>stdio.hE<gt>\n"
3699 "#include E<lt>errno.hE<gt>\n"
3700 "#include E<lt>stdlib.hE<gt>\n"
3701 "#include E<lt>unistd.hE<gt>\n"
3702 msgstr ""
3703 "#include E<lt>pthread.hE<gt>\n"
3704 "#include E<lt>stdio.hE<gt>\n"
3705 "#include E<lt>errno.hE<gt>\n"
3706 "#include E<lt>stdlib.hE<gt>\n"
3707 "#include E<lt>unistd.hE<gt>\n"
3708
3709 #. type: Plain text
3710 #: build/C/man3/pthread_cancel.3:167
3711 #, no-wrap
3712 msgid ""
3713 "static void *\n"
3714 "thread_func(void *ignored_argument)\n"
3715 "{\n"
3716 "    int s;\n"
3717 msgstr ""
3718 "static void *\n"
3719 "thread_func(void *ignored_argument)\n"
3720 "{\n"
3721 "    int s;\n"
3722
3723 #. type: Plain text
3724 #: build/C/man3/pthread_cancel.3:170
3725 #, no-wrap
3726 msgid ""
3727 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3728 "       immediately react to a cancellation request */\n"
3729 msgstr ""
3730 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3731 "       immediately react to a cancellation request */\n"
3732
3733 #. type: Plain text
3734 #: build/C/man3/pthread_cancel.3:174
3735 #, no-wrap
3736 msgid ""
3737 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3738 "    if (s != 0)\n"
3739 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3740 msgstr ""
3741 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3742 "    if (s != 0)\n"
3743 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3744
3745 #. type: Plain text
3746 #: build/C/man3/pthread_cancel.3:178
3747 #, no-wrap
3748 msgid ""
3749 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3750 "    sleep(5);\n"
3751 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3752 msgstr ""
3753 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3754 "    sleep(5);\n"
3755 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3756
3757 #. type: Plain text
3758 #: build/C/man3/pthread_cancel.3:182
3759 #, no-wrap
3760 msgid ""
3761 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3762 "    if (s != 0)\n"
3763 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3764 msgstr ""
3765 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3766 "    if (s != 0)\n"
3767 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3768
3769 #. type: Plain text
3770 #: build/C/man3/pthread_cancel.3:184
3771 #, no-wrap
3772 msgid "    /* sleep() is a cancellation point */\n"
3773 msgstr "    /* sleep() is a cancellation point */\n"
3774
3775 #. type: Plain text
3776 #: build/C/man3/pthread_cancel.3:186
3777 #, no-wrap
3778 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3779 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3780
3781 #. type: Plain text
3782 #: build/C/man3/pthread_cancel.3:188
3783 #, no-wrap
3784 msgid "    /* Should never get here */\n"
3785 msgstr "    /* Should never get here */\n"
3786
3787 #. type: Plain text
3788 #: build/C/man3/pthread_cancel.3:192
3789 #, no-wrap
3790 msgid ""
3791 "    printf(\"thread_func(): not canceled!\\en\");\n"
3792 "    return NULL;\n"
3793 "}\n"
3794 msgstr ""
3795 "    printf(\"thread_func(): not canceled!\\en\");\n"
3796 "    return NULL;\n"
3797 "}\n"
3798
3799 #. type: Plain text
3800 #: build/C/man3/pthread_cancel.3:199
3801 #, no-wrap
3802 msgid ""
3803 "int\n"
3804 "main(void)\n"
3805 "{\n"
3806 "    pthread_t thr;\n"
3807 "    void *res;\n"
3808 "    int s;\n"
3809 msgstr ""
3810 "int\n"
3811 "main(void)\n"
3812 "{\n"
3813 "    pthread_t thr;\n"
3814 "    void *res;\n"
3815 "    int s;\n"
3816
3817 #. type: Plain text
3818 #: build/C/man3/pthread_cancel.3:201
3819 #, no-wrap
3820 msgid "    /* Start a thread and then send it a cancellation request */\n"
3821 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3822
3823 #. type: Plain text
3824 #: build/C/man3/pthread_cancel.3:205
3825 #, no-wrap
3826 msgid ""
3827 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3828 "    if (s != 0)\n"
3829 "        handle_error_en(s, \"pthread_create\");\n"
3830 msgstr ""
3831 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3832 "    if (s != 0)\n"
3833 "        handle_error_en(s, \"pthread_create\");\n"
3834
3835 #. type: Plain text
3836 #: build/C/man3/pthread_cancel.3:207
3837 #, no-wrap
3838 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3839 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3840
3841 #. type: Plain text
3842 #: build/C/man3/pthread_cancel.3:212
3843 #, no-wrap
3844 msgid ""
3845 "    printf(\"main(): sending cancellation request\\en\");\n"
3846 "    s = pthread_cancel(thr);\n"
3847 "    if (s != 0)\n"
3848 "        handle_error_en(s, \"pthread_cancel\");\n"
3849 msgstr ""
3850 "    printf(\"main(): sending cancellation request\\en\");\n"
3851 "    s = pthread_cancel(thr);\n"
3852 "    if (s != 0)\n"
3853 "        handle_error_en(s, \"pthread_cancel\");\n"
3854
3855 #. type: Plain text
3856 #: build/C/man3/pthread_cancel.3:214
3857 #, no-wrap
3858 msgid "    /* Join with thread to see what its exit status was */\n"
3859 msgstr "    /* Join with thread to see what its exit status was */\n"
3860
3861 #. type: Plain text
3862 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
3863 #, no-wrap
3864 msgid ""
3865 "    s = pthread_join(thr, &res);\n"
3866 "    if (s != 0)\n"
3867 "        handle_error_en(s, \"pthread_join\");\n"
3868 msgstr ""
3869 "    s = pthread_join(thr, &res);\n"
3870 "    if (s != 0)\n"
3871 "        handle_error_en(s, \"pthread_join\");\n"
3872
3873 #. type: Plain text
3874 #: build/C/man3/pthread_cancel.3:225
3875 #, no-wrap
3876 msgid ""
3877 "    if (res == PTHREAD_CANCELED)\n"
3878 "        printf(\"main(): thread was canceled\\en\");\n"
3879 "    else\n"
3880 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3881 "    exit(EXIT_SUCCESS);\n"
3882 "}\n"
3883 msgstr ""
3884 "    if (res == PTHREAD_CANCELED)\n"
3885 "        printf(\"main(): thread was canceled\\en\");\n"
3886 "    else\n"
3887 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3888 "    exit(EXIT_SUCCESS);\n"
3889 "}\n"
3890
3891 #. type: Plain text
3892 #: build/C/man3/pthread_cancel.3:238
3893 msgid ""
3894 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3895 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3896 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3897 msgstr ""
3898 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3899 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3900 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3901
3902 #. type: TH
3903 #: build/C/man3/pthread_cleanup_push.3:26
3904 #, no-wrap
3905 msgid "PTHREAD_CLEANUP_PUSH"
3906 msgstr "PTHREAD_CLEANUP_PUSH"
3907
3908 #. type: TH
3909 #: build/C/man3/pthread_cleanup_push.3:26
3910 #: build/C/man3/pthread_setcancelstate.3:26
3911 #, no-wrap
3912 msgid "2008-11-24"
3913 msgstr "2008-11-24"
3914
3915 #. type: Plain text
3916 #: build/C/man3/pthread_cleanup_push.3:30
3917 msgid ""
3918 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3919 "clean-up handlers"
3920 msgstr ""
3921 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3922 "キャンセルクリーンアップハンドラの push/pop を行う"
3923
3924 #. type: Plain text
3925 #: build/C/man3/pthread_cleanup_push.3:37
3926 #, no-wrap
3927 msgid ""
3928 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3929 "B<                          void *>I<arg>B<);>\n"
3930 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3931 msgstr ""
3932 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3933 "B<                          void *>I<arg>B<);>\n"
3934 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3935
3936 #. type: Plain text
3937 #: build/C/man3/pthread_cleanup_push.3:48
3938 msgid ""
3939 "These functions manipulate the calling thread's stack of thread-cancellation "
3940 "clean-up handlers.  A clean-up handler is a function that is automatically "
3941 "executed when a thread is canceled (or in various other circumstances "
3942 "described below); it might, for example, unlock a mutex so that it becomes "
3943 "available to other threads in the process."
3944 msgstr ""
3945 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3946 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3947 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3948 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3949 "他のスレッドが利用できるようにする関数などが考えられる。"
3950
3951 #. type: Plain text
3952 #: build/C/man3/pthread_cleanup_push.3:59
3953 msgid ""
3954 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3955 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3956 "be given I<arg> as its argument."
3957 msgstr ""
3958 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3959 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3960 "起動される際には、 I<arg> が関数の引き数と渡される。"
3961
3962 #. type: Plain text
3963 #: build/C/man3/pthread_cleanup_push.3:66
3964 msgid ""
3965 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3966 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3967 "nonzero."
3968 msgstr ""
3969 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3970 "スタックの一番上のルーチンを削除する。\n"
3971 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3972
3973 #. type: Plain text
3974 #: build/C/man3/pthread_cleanup_push.3:69
3975 msgid ""
3976 "A cancellation clean-up handler is popped from the stack and executed in the "
3977 "following circumstances:"
3978 msgstr ""
3979 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3980 "スタックから取り出され実行される。"
3981
3982 #. type: Plain text
3983 #: build/C/man3/pthread_cleanup_push.3:73
3984 msgid ""
3985 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3986 "and executed in the reverse of the order in which they were pushed onto the "
3987 "stack."
3988 msgstr ""
3989 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3990 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3991 "実行は、スタックに登録されたのと逆の順序で行われる。"
3992
3993 #. type: Plain text
3994 #: build/C/man3/pthread_cleanup_push.3:83
3995 msgid ""
3996 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
3997 "handlers are executed as described in the preceding point.  (Clean-up "
3998 "handlers are I<not> called if the thread terminates by performing a "
3999 "I<return> from the thread start function.)"
4000 msgstr ""
4001 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
4002 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
4003 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
4004 "は、クリーンアップハンドラはI<呼び出されない>。)"
4005
4006 #. type: Plain text
4007 #: build/C/man3/pthread_cleanup_push.3:89
4008 msgid ""
4009 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
4010 "argument, the top-most clean-up handler is popped and executed."
4011 msgstr ""
4012 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
4013 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
4014 "実行される。"
4015
4016 #. type: Plain text
4017 #: build/C/man3/pthread_cleanup_push.3:101
4018 msgid ""
4019 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4020 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4021 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4022 "calls to these functions are paired within the same function, and at the "
4023 "same lexical nesting level.  (In other words, a clean-up handler is "
4024 "established only during the execution of a specified section of code.)"
4025 msgstr ""
4026 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4027 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4028 "して実装することを許容している。\n"
4029 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4030 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4031 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4032 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4033
4034 #. type: Plain text
4035 #: build/C/man3/pthread_cleanup_push.3:121
4036 msgid ""
4037 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4038 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
4039 "()  without the matching call of the pair since the jump buffer was filled "
4040 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
4041 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
4042 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
4043 "(3))  inside the handler."
4044 msgstr ""
4045 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4046 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4047 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4048 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4049 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4050 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4051 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4052 "結果になるかは不定である。"
4053
4054 #. type: Plain text
4055 #: build/C/man3/pthread_cleanup_push.3:123
4056 msgid "These functions do not return a value."
4057 msgstr "これらの関数は値を返さない。"
4058
4059 #.  SH VERSIONS
4060 #.  Available since glibc 2.0
4061 #. type: Plain text
4062 #: build/C/man3/pthread_cleanup_push.3:127
4063 msgid "There are no errors."
4064 msgstr "エラーはない。"
4065
4066 #. type: Plain text
4067 #: build/C/man3/pthread_cleanup_push.3:140
4068 msgid ""
4069 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4070 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4071 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4072 "declared within the scope of paired calls to these functions will be visible "
4073 "within only that scope."
4074 msgstr ""
4075 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4076 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4077 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4078 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4079 "ということを意味している。"
4080
4081 #.  The text was actually added in the 2004 TC2
4082 #. type: Plain text
4083 #: build/C/man3/pthread_cleanup_push.3:155
4084 msgid ""
4085 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4086 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4087 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4088 "avoid doing this."
4089 msgstr ""
4090 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4091 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4092 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4093 "不定であると書かれている。\n"
4094 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4095
4096 #. type: Plain text
4097 #: build/C/man3/pthread_cleanup_push.3:170
4098 msgid ""
4099 "The program below provides a simple example of the use of the functions "
4100 "described in this page.  The program creates a thread that executes a loop "
4101 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4102 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4103 "what command-line arguments are supplied, the main thread sends the other "
4104 "thread a cancellation request, or sets a global variable that causes the "
4105 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4106 msgstr ""
4107 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4108 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4109 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4110 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4111 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4112 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4113 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4114 "設定したりする。"
4115
4116 #. type: Plain text
4117 #: build/C/man3/pthread_cleanup_push.3:173
4118 msgid ""
4119 "In the following shell session, the main thread sends a cancellation request "
4120 "to the other thread:"
4121 msgstr ""
4122 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4123 "キャンセル要求を送信する。"
4124
4125 #. type: Plain text
4126 #: build/C/man3/pthread_cleanup_push.3:183
4127 #, no-wrap
4128 msgid ""
4129 "$ B<./a.out>\n"
4130 "New thread started\n"
4131 "cnt = 0\n"
4132 "cnt = 1\n"
4133 "Canceling thread\n"
4134 "Called clean-up handler\n"
4135 "Thread was canceled; cnt = 0\n"
4136 msgstr ""
4137 "$ B<./a.out>\n"
4138 "New thread started\n"
4139 "cnt = 0\n"
4140 "cnt = 1\n"
4141 "Canceling thread\n"
4142 "Called clean-up handler\n"
4143 "Thread was canceled; cnt = 0\n"
4144
4145 #. type: Plain text
4146 #: build/C/man3/pthread_cleanup_push.3:191
4147 msgid ""
4148 "From the above, we see that the thread was canceled, and that the "
4149 "cancellation clean-up handler was called and it reset the value of the "
4150 "global variable I<cnt> to 0."
4151 msgstr ""
4152 "上記の実行例から、スレッドがキャンセルされ、\n"
4153 "キャンセルクリーンアップハンドラが呼び出され、\n"
4154 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4155
4156 #. type: Plain text
4157 #: build/C/man3/pthread_cleanup_push.3:194
4158 msgid ""
4159 "In the next run, the main program sets a global variable that causes other "
4160 "thread to terminate normally:"
4161 msgstr ""
4162 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4163 "もう一つのスレッドが正常終了するようにしている。"
4164
4165 #. type: Plain text
4166 #: build/C/man3/pthread_cleanup_push.3:202
4167 #, no-wrap
4168 msgid ""
4169 "$ B<./a.out x>\n"
4170 "New thread started\n"
4171 "cnt = 0\n"
4172 "cnt = 1\n"
4173 "Thread terminated normally; cnt = 2\n"
4174 msgstr ""
4175 "$ B<./a.out x>\n"
4176 "New thread started\n"
4177 "cnt = 0\n"
4178 "cnt = 1\n"
4179 "Thread terminated normally; cnt = 2\n"
4180
4181 #. type: Plain text
4182 #: build/C/man3/pthread_cleanup_push.3:210
4183 msgid ""
4184 "From the above, we see that the clean-up handler was not executed (because "
4185 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4186 msgstr ""
4187 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4188 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4189 "分かる。"
4190
4191 #. type: Plain text
4192 #: build/C/man3/pthread_cleanup_push.3:215
4193 msgid ""
4194 "In the next run, the main program sets a global variable that causes the "
4195 "other thread to terminate normally, and supplies a nonzero value for "
4196 "I<cleanup_pop_arg>:"
4197 msgstr ""
4198 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4199 "もう一つのスレッドが正常終了するようにし、さらに\n"
4200 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4201
4202 #. type: Plain text
4203 #: build/C/man3/pthread_cleanup_push.3:224
4204 #, no-wrap
4205 msgid ""
4206 "$ B<./a.out x 1>\n"
4207 "New thread started\n"
4208 "cnt = 0\n"
4209 "cnt = 1\n"
4210 "Called clean-up handler\n"
4211 "Thread terminated normally; cnt = 0\n"
4212 msgstr ""
4213 "$ B<./a.out x 1>\n"
4214 "New thread started\n"
4215 "cnt = 0\n"
4216 "cnt = 1\n"
4217 "Called clean-up handler\n"
4218 "Thread terminated normally; cnt = 0\n"
4219
4220 #. type: Plain text
4221 #: build/C/man3/pthread_cleanup_push.3:231
4222 msgid ""
4223 "In the above, we see that although the thread was not canceled, the clean-up "
4224 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4225 "()  was nonzero."
4226 msgstr ""
4227 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4228 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4229 "に 0 以外を渡したからである。"
4230
4231 #. type: Plain text
4232 #: build/C/man3/pthread_cleanup_push.3:240
4233 #, no-wrap
4234 msgid ""
4235 "#include E<lt>pthread.hE<gt>\n"
4236 "#include E<lt>sys/types.hE<gt>\n"
4237 "#include E<lt>stdio.hE<gt>\n"
4238 "#include E<lt>stdlib.hE<gt>\n"
4239 "#include E<lt>unistd.hE<gt>\n"
4240 "#include E<lt>errno.hE<gt>\n"
4241 msgstr ""
4242 "#include E<lt>pthread.hE<gt>\n"
4243 "#include E<lt>sys/types.hE<gt>\n"
4244 "#include E<lt>stdio.hE<gt>\n"
4245 "#include E<lt>stdlib.hE<gt>\n"
4246 "#include E<lt>unistd.hE<gt>\n"
4247 "#include E<lt>errno.hE<gt>\n"
4248
4249 #. type: Plain text
4250 #: build/C/man3/pthread_cleanup_push.3:247
4251 #, no-wrap
4252 msgid ""
4253 "static int done = 0;\n"
4254 "static int cleanup_pop_arg = 0;\n"
4255 "static int cnt = 0;\n"
4256 msgstr ""
4257 "static int done = 0;\n"
4258 "static int cleanup_pop_arg = 0;\n"
4259 "static int cnt = 0;\n"
4260
4261 #. type: Plain text
4262 #: build/C/man3/pthread_cleanup_push.3:254
4263 #, no-wrap
4264 msgid ""
4265 "static void\n"
4266 "cleanup_handler(void *arg)\n"
4267 "{\n"
4268 "    printf(\"Called clean-up handler\\en\");\n"
4269 "    cnt = 0;\n"
4270 "}\n"
4271 msgstr ""
4272 "static void\n"
4273 "cleanup_handler(void *arg)\n"
4274 "{\n"
4275 "    printf(\"Called clean-up handler\\en\");\n"
4276 "    cnt = 0;\n"
4277 "}\n"
4278
4279 #. type: Plain text
4280 #: build/C/man3/pthread_cleanup_push.3:259
4281 #, no-wrap
4282 msgid ""
4283 "static void *\n"
4284 "thread_start(void *arg)\n"
4285 "{\n"
4286 "    time_t start, curr;\n"
4287 msgstr ""
4288 "static void *\n"
4289 "thread_start(void *arg)\n"
4290 "{\n"
4291 "    time_t start, curr;\n"
4292
4293 #. type: Plain text
4294 #: build/C/man3/pthread_cleanup_push.3:261
4295 #, no-wrap
4296 msgid "    printf(\"New thread started\\en\");\n"
4297 msgstr "    printf(\"New thread started\\en\");\n"
4298
4299 #. type: Plain text
4300 #: build/C/man3/pthread_cleanup_push.3:263
4301 #, no-wrap
4302 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4303 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4304
4305 #. type: Plain text
4306 #: build/C/man3/pthread_cleanup_push.3:265
4307 #, no-wrap
4308 msgid "    curr = start = time(NULL);\n"
4309 msgstr "    curr = start = time(NULL);\n"
4310
4311 #. type: Plain text
4312 #: build/C/man3/pthread_cleanup_push.3:274
4313 #, no-wrap
4314 msgid ""
4315 "    while (!done) {\n"
4316 "        pthread_testcancel();           /* A cancellation point */\n"
4317 "        if (curr E<lt> time(NULL)) {\n"
4318 "            curr = time(NULL);\n"
4319 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4320 "            cnt++;\n"
4321 "        }\n"
4322 "    }\n"
4323 msgstr ""
4324 "    while (!done) {\n"
4325 "        pthread_testcancel();           /* A cancellation point */\n"
4326 "        if (curr E<lt> time(NULL)) {\n"
4327 "            curr = time(NULL);\n"
4328 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4329 "            cnt++;\n"
4330 "        }\n"
4331 "    }\n"
4332
4333 #. type: Plain text
4334 #: build/C/man3/pthread_cleanup_push.3:278
4335 #, no-wrap
4336 msgid ""
4337 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4338 "    return NULL;\n"
4339 "}\n"
4340 msgstr ""
4341 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4342 "    return NULL;\n"
4343 "}\n"
4344
4345 #. type: Plain text
4346 #: build/C/man3/pthread_cleanup_push.3:285
4347 #, no-wrap
4348 msgid ""
4349 "int\n"
4350 "main(int argc, char *argv[])\n"
4351 "{\n"
4352 "    pthread_t thr;\n"
4353 "    int s;\n"
4354 "    void *res;\n"
4355 msgstr ""
4356 "int\n"
4357 "main(int argc, char *argv[])\n"
4358 "{\n"
4359 "    pthread_t thr;\n"
4360 "    int s;\n"
4361 "    void *res;\n"
4362
4363 #. type: Plain text
4364 #: build/C/man3/pthread_cleanup_push.3:289
4365 #, no-wrap
4366 msgid ""
4367 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4368 "    if (s != 0)\n"
4369 "        handle_error_en(s, \"pthread_create\");\n"
4370 msgstr ""
4371 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4372 "    if (s != 0)\n"
4373 "        handle_error_en(s, \"pthread_create\");\n"
4374
4375 #. type: Plain text
4376 #: build/C/man3/pthread_cleanup_push.3:291
4377 #, no-wrap
4378 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4379 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4380
4381 #. type: Plain text
4382 #: build/C/man3/pthread_cleanup_push.3:296
4383 #, no-wrap
4384 msgid ""
4385 "    if (argc E<gt> 1) {\n"
4386 "        if (argc E<gt> 2)\n"
4387 "            cleanup_pop_arg = atoi(argv[2]);\n"
4388 "        done = 1;\n"
4389 msgstr ""
4390 "    if (argc E<gt> 1) {\n"
4391 "        if (argc E<gt> 2)\n"
4392 "            cleanup_pop_arg = atoi(argv[2]);\n"
4393 "        done = 1;\n"
4394
4395 #. type: Plain text
4396 #: build/C/man3/pthread_cleanup_push.3:303
4397 #, no-wrap
4398 msgid ""
4399 "    } else {\n"
4400 "        printf(\"Canceling thread\\en\");\n"
4401 "        s = pthread_cancel(thr);\n"
4402 "        if (s != 0)\n"
4403 "            handle_error_en(s, \"pthread_cancel\");\n"
4404 "    }\n"
4405 msgstr ""
4406 "    } else {\n"
4407 "        printf(\"Canceling thread\\en\");\n"
4408 "        s = pthread_cancel(thr);\n"
4409 "        if (s != 0)\n"
4410 "            handle_error_en(s, \"pthread_cancel\");\n"
4411 "    }\n"
4412
4413 #. type: Plain text
4414 #: build/C/man3/pthread_cleanup_push.3:314
4415 #, no-wrap
4416 msgid ""
4417 "    if (res == PTHREAD_CANCELED)\n"
4418 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4419 "    else\n"
4420 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4421 "    exit(EXIT_SUCCESS);\n"
4422 "}\n"
4423 msgstr ""
4424 "    if (res == PTHREAD_CANCELED)\n"
4425 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4426 "    else\n"
4427 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4428 "    exit(EXIT_SUCCESS);\n"
4429 "}\n"
4430
4431 #. type: Plain text
4432 #: build/C/man3/pthread_cleanup_push.3:321
4433 msgid ""
4434 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4435 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4436 msgstr ""
4437 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4438 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4439
4440 #. type: TH
4441 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4442 #, no-wrap
4443 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4444 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4445
4446 #. type: TH
4447 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4448 #, no-wrap
4449 msgid "2008-12-04"
4450 msgstr "2008-12-04"
4451
4452 #. type: Plain text
4453 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4454 msgid ""
4455 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4456 "thread cancellation clean-up handlers while saving cancelability type"
4457 msgstr ""
4458 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4459 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4460 "の push/pop を行う"
4461
4462 #. type: Plain text
4463 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4464 #, no-wrap
4465 msgid ""
4466 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4467 "B<                                   void *>I<arg>B<);>\n"
4468 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4469 msgstr ""
4470 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4471 "B<                                   void *>I<arg>B<);>\n"
4472 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4473
4474 #. type: Plain text
4475 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4476 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4477 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4478 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4479 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4480 #: build/C/man3/pthread_yield.3:37
4481 msgid "Compile and link with I<-pthread>."
4482 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4483
4484 #. type: Plain text
4485 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4486 msgid ""
4487 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4488 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4489 msgstr ""
4490 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4491 "だが、このページで説明する点が異なる。"
4492
4493 #. type: Plain text
4494 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4495 msgid ""
4496 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4497 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4498 "addition, it also saves the thread's current cancelability type, and sets "
4499 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4500 "this ensures that cancellation clean-up will occur even if the thread's "
4501 "cancelability type was \"asynchronous\" before the call."
4502 msgstr ""
4503 "B<pthread_cleanup_push>(3) と同様に、\n"
4504 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4505 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4506 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4507 "保存し、cancelability type は \"deferred\" に設定する\n"
4508 "(B<pthread_setcanceltype>(3) 参照)。\n"
4509 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4510 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4511 "が保証される。"
4512
4513 #. type: Plain text
4514 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4515 msgid ""
4516 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4517 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4518 "up handlers.  In addition, it restores the thread's cancelability type to "
4519 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4520 msgstr ""
4521 "B<pthread_cleanup_pop>(3) と同様に、\n"
4522 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4523 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4524 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4525 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4526
4527 #. type: Plain text
4528 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4529 msgid ""
4530 "The caller must ensure that calls to these functions are paired within the "
4531 "same function, and at the same lexical nesting level.  Other restrictions "
4532 "apply, as described in B<pthread_cleanup_push>(3)."
4533 msgstr ""
4534 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4535 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4536 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4537 "適用される。"
4538
4539 #. type: Plain text
4540 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4541 msgid "This sequence of calls:"
4542 msgstr "以下の一連の呼び出し"
4543
4544 #. type: Plain text
4545 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4546 #, no-wrap
4547 msgid ""
4548 "pthread_cleanup_push_defer_np(routine, arg);\n"
4549 "pthread_cleanup_pop_restore_np(execute);\n"
4550 msgstr ""
4551 "pthread_cleanup_push_defer_np(routine, arg);\n"
4552 "pthread_cleanup_pop_restore_np(execute);\n"
4553
4554 #. type: Plain text
4555 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4556 msgid "is equivalent to (but shorter and more efficient than):"
4557 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4558
4559 #. type: Plain text
4560 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4561 #, no-wrap
4562 msgid "int oldtype;\n"
4563 msgstr "int oldtype;\n"
4564
4565 #. type: Plain text
4566 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4567 #, no-wrap
4568 msgid ""
4569 "pthread_cleanup_push(routine, arg);\n"
4570 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4571 "\\&...\n"
4572 "pthread_setcanceltype(oldtype, NULL);\n"
4573 "pthread_cleanup_pop(execute);\n"
4574 msgstr ""
4575 "pthread_cleanup_push(routine, arg);\n"
4576 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4577 "\\&...\n"
4578 "pthread_setcanceltype(oldtype, NULL);\n"
4579 "pthread_cleanup_pop(execute);\n"
4580
4581 #. type: Plain text
4582 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4583 msgid ""
4584 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4585 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4586 msgstr ""
4587 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4588 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4589
4590 #. type: TH
4591 #: build/C/man3/pthread_create.3:26
4592 #, no-wrap
4593 msgid "PTHREAD_CREATE"
4594 msgstr "PTHREAD_CREATE"
4595
4596 #. type: TH
4597 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_sigmask.3:26
4598 #, no-wrap
4599 msgid "2012-08-03"
4600 msgstr "2012-08-03"
4601
4602 #. type: Plain text
4603 #: build/C/man3/pthread_create.3:29
4604 msgid "pthread_create - create a new thread"
4605 msgstr "pthread_create - 新しいスレッドを作成する"
4606
4607 #. type: Plain text
4608 #: build/C/man3/pthread_create.3:35
4609 #, no-wrap
4610 msgid ""
4611 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4612 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4613 msgstr ""
4614 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4615 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4616
4617 #. type: Plain text
4618 #: build/C/man3/pthread_create.3:47
4619 msgid ""
4620 "The B<pthread_create>()  function starts a new thread in the calling "
4621 "process.  The new thread starts execution by invoking I<start_routine>(); "
4622 "I<arg> is passed as the sole argument of I<start_routine>()."
4623 msgstr ""
4624 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4625 "る。\n"
4626 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4627 "I<start_routine>() は引き数を一つだけ取り、\n"
4628 "I<arg> が I<start_routine>() の引き数として渡される。"
4629
4630 #. type: Plain text
4631 #: build/C/man3/pthread_create.3:49
4632 msgid "The new thread terminates in one of the following ways:"
4633 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4634
4635 #. type: IP
4636 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4637 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4638 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4639 #: build/C/man3/pthread_getattr_np.3:58
4640 #, no-wrap
4641 msgid "*"
4642 msgstr "*"
4643
4644 #. type: Plain text
4645 #: build/C/man3/pthread_create.3:55
4646 msgid ""
4647 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4648 "available to another thread in the same process that calls B<pthread_join>"
4649 "(3)."
4650 msgstr ""
4651 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4652 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4653 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4654 "別のスレッドで参照できる。"
4655
4656 #. type: Plain text
4657 #: build/C/man3/pthread_create.3:63
4658 msgid ""
4659 "It returns from I<start_routine>().  This is equivalent to calling "
4660 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4661 msgstr ""
4662 "スレッドが I<start_routine>() から返る。これは、\n"
4663 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4664
4665 #. type: Plain text
4666 #: build/C/man3/pthread_create.3:66
4667 msgid "It is canceled (see B<pthread_cancel>(3))."
4668 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4669
4670 #. type: Plain text
4671 #: build/C/man3/pthread_create.3:72
4672 msgid ""
4673 "Any of the threads in the process calls B<exit>(3), or the main thread "
4674 "performs a return from I<main>().  This causes the termination of all "
4675 "threads in the process."
4676 msgstr ""
4677 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4678 "メインスレッドで I<main>() 内で return が実行される。\n"
4679 "この場合は、プロセス内の全てのスレッドが終了される。"
4680
4681 #. type: Plain text
4682 #: build/C/man3/pthread_create.3:86
4683 msgid ""
4684 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4685 "are used at thread creation time to determine attributes for the new thread; "
4686 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4687 "functions.  If I<attr> is NULL, then the thread is created with default "
4688 "attributes."
4689 msgstr ""
4690 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4691 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4692 "新しいスレッドの属性が決定される。\n"
4693 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4694 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4695
4696 #. type: Plain text
4697 #: build/C/man3/pthread_create.3:93
4698 msgid ""
4699 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4700 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4701 "used to refer to the thread in subsequent calls to other pthreads functions."
4702 msgstr ""
4703 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4704 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4705 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4706
4707 #. type: Plain text
4708 #: build/C/man3/pthread_create.3:101
4709 msgid ""
4710 "The new thread inherits a copy of the creating thread's signal mask "
4711 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4712 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4713 "thread's alternate signal stack (B<sigaltstack>(2))."
4714 msgstr ""
4715 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4716 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4717 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4718 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4719 "(B<sigaltstack>(2)) を継承しない。"
4720
4721 #. type: Plain text
4722 #: build/C/man3/pthread_create.3:104
4723 msgid ""
4724 "The new thread inherits the calling thread's floating-point environment "
4725 "(B<fenv>(3))."
4726 msgstr ""
4727 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4728 "を継承する。"
4729
4730 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4731 #. type: Plain text
4732 #: build/C/man3/pthread_create.3:109
4733 msgid ""
4734 "The initial value of the new thread's CPU-time clock is 0 (see "
4735 "B<pthread_getcpuclockid>(3))."
4736 msgstr ""
4737 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4738 "(B<pthread_getcpuclockid>(3) 参照)。"
4739
4740 #. type: SS
4741 #: build/C/man3/pthread_create.3:109
4742 #, no-wrap
4743 msgid "Linux-specific details"
4744 msgstr "Linux 固有の詳細"
4745
4746 #. type: Plain text
4747 #: build/C/man3/pthread_create.3:115
4748 msgid ""
4749 "The new thread inherits copies of the calling thread's capability sets (see "
4750 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4751 msgstr ""
4752 "新しいスレッドは、呼び出したスレッドの\n"
4753 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4754 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4755 "コピーをを継承しない。"
4756
4757 #. type: Plain text
4758 #: build/C/man3/pthread_create.3:122
4759 msgid ""
4760 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4761 "number, and the contents of I<*thread> are undefined."
4762 msgstr ""
4763 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4764 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4765
4766 #. type: TP
4767 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4768 #, no-wrap
4769 msgid "B<EAGAIN>"
4770 msgstr "B<EAGAIN>"
4771
4772 #. type: Plain text
4773 #: build/C/man3/pthread_create.3:137
4774 msgid ""
4775 "Insufficient resources to create another thread, or a system-imposed limit "
4776 "on the number of threads was encountered.  The latter case may occur in two "
4777 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4778 "which limits the number of process for a real user ID, was reached; or the "
4779 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4780 "threads-max>, was reached."
4781 msgstr ""
4782 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4783 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4784 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4785 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4786 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4787 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4788
4789 #. type: Plain text
4790 #: build/C/man3/pthread_create.3:141
4791 msgid "Invalid settings in I<attr>."
4792 msgstr "I<attr> で指定された設定が不正である。"
4793
4794 #. type: TP
4795 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4796 #: build/C/man3/pthread_setschedprio.3:66
4797 #, no-wrap
4798 msgid "B<EPERM>"
4799 msgstr "B<EPERM>"
4800
4801 #. type: Plain text
4802 #: build/C/man3/pthread_create.3:146
4803 msgid ""
4804 "No permission to set the scheduling policy and parameters specified in "
4805 "I<attr>."
4806 msgstr ""
4807 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4808 "設定する許可がない。"
4809
4810 #. type: Plain text
4811 #: build/C/man3/pthread_create.3:160
4812 msgid ""
4813 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4814 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4815 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4816 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4817 msgstr ""
4818 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4819 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4820 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4821 "B<pthread_create>() の呼び出し後に、\n"
4822 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4823 "次に実行されるかは決まっていない。"
4824
4825 #. type: Plain text
4826 #: build/C/man3/pthread_create.3:180
4827 msgid ""
4828 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4829 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4830 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4831 "has been joined are the last of its resources released back to the system.  "
4832 "When a detached thread terminates, its resources are automatically released "
4833 "back to the system: it is not possible to join with the thread in order to "
4834 "obtain its exit status.  Making a thread detached is useful for some types "
4835 "of daemon threads whose exit status the application does not need to care "
4836 "about.  By default, a new thread is created in a joinable state, unless "
4837 "I<attr> was set to create the thread in a detached state (using "
4838 "B<pthread_attr_setdetachstate>(3))."
4839 msgstr ""
4840 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4841 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4842 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4843 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4844 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4845 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4846 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4847 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4848 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4849 "デーモン (daemon) スレッドでは有用である。\n"
4850 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4851 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4852 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4853 "作成される。"
4854
4855 #.  FIXME . Perhaps some of the following detail should be in
4856 #.  a future pthread_attr_setstacksize(3) page.
4857 #. type: Plain text
4858 #: build/C/man3/pthread_create.3:196
4859 msgid ""
4860 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4861 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4862 "resource limit I<at the time the program started> has any value other than "
4863 "\"unlimited\", then it determines the default stack size of new threads.  "
4864 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4865 "explicitly set in the I<attr> argument used to create a thread, in order to "
4866 "obtain a stack size other than the default."
4867 msgstr ""
4868 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4869 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4870 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4871 "フォルトのスタックサイズとなる。\n"
4872 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4873 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4874 "デフォルト値以外のスタックサイズを得ることができる。"
4875
4876 #. type: Plain text
4877 #: build/C/man3/pthread_create.3:202
4878 msgid ""
4879 "In the obsolete LinuxThreads implementation, each of the threads in a "
4880 "process has a different process ID.  This is in violation of the POSIX "
4881 "threads specification, and is the source of many other nonconformances to "
4882 "the standard; see B<pthreads>(7)."
4883 msgstr ""
4884 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4885 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4886 "他の多くの標準非準拠の点の原因になっている。\n"
4887 "B<pthreads>(7) を参照のこと。"
4888
4889 #. type: Plain text
4890 #: build/C/man3/pthread_create.3:206
4891 msgid ""
4892 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4893 "number of other functions in the pthreads API."
4894 msgstr ""
4895 "以下のプログラムは、 B<pthread_create>() や\n"
4896 "pthreads API の他のいろいろな関数の使用例を示している。"
4897
4898 #. type: Plain text
4899 #: build/C/man3/pthread_create.3:211
4900 msgid ""
4901 "In the following run, on a system providing the NPTL threading "
4902 "implementation, the stack size defaults to the value given by the \"stack "
4903 "size\" resource limit:"
4904 msgstr ""
4905 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4906 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4907 "になる。"
4908
4909 #. type: Plain text
4910 #: build/C/man3/pthread_create.3:223
4911 #, no-wrap
4912 msgid ""
4913 "$B< ulimit -s>\n"
4914 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4915 "$B< ./a.out hola salut servus>\n"
4916 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4917 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4918 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4919 "Joined with thread 1; returned value was HOLA\n"
4920 "Joined with thread 2; returned value was SALUT\n"
4921 "Joined with thread 3; returned value was SERVUS\n"
4922 msgstr ""
4923 "$B< ulimit -s>\n"
4924 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4925 "$B< ./a.out hola salut servus>\n"
4926 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4927 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4928 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4929 "Joined with thread 1; returned value was HOLA\n"
4930 "Joined with thread 2; returned value was SALUT\n"
4931 "Joined with thread 3; returned value was SERVUS\n"
4932
4933 #. type: Plain text
4934 #: build/C/man3/pthread_create.3:229
4935 msgid ""
4936 "In the next run, the program explicitly sets a stack size of 1MB (using "
4937 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4938 msgstr ""
4939 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4940 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4941 "明示的に設定している。"
4942
4943 #. type: Plain text
4944 #: build/C/man3/pthread_create.3:239
4945 #, no-wrap
4946 msgid ""
4947 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4948 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4949 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4950 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4951 "Joined with thread 1; returned value was HOLA\n"
4952 "Joined with thread 2; returned value was SALUT\n"
4953 "Joined with thread 3; returned value was SERVUS\n"
4954 msgstr ""
4955 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4956 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4957 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4958 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4959 "Joined with thread 1; returned value was HOLA\n"
4960 "Joined with thread 2; returned value was SALUT\n"
4961 "Joined with thread 3; returned value was SERVUS\n"
4962
4963 #. type: Plain text
4964 #: build/C/man3/pthread_create.3:251
4965 #, no-wrap
4966 msgid ""
4967 "#include E<lt>pthread.hE<gt>\n"
4968 "#include E<lt>string.hE<gt>\n"
4969 "#include E<lt>stdio.hE<gt>\n"
4970 "#include E<lt>stdlib.hE<gt>\n"
4971 "#include E<lt>unistd.hE<gt>\n"
4972 "#include E<lt>errno.hE<gt>\n"
4973 "#include E<lt>ctype.hE<gt>\n"
4974 msgstr ""
4975 "#include E<lt>pthread.hE<gt>\n"
4976 "#include E<lt>string.hE<gt>\n"
4977 "#include E<lt>stdio.hE<gt>\n"
4978 "#include E<lt>stdlib.hE<gt>\n"
4979 "#include E<lt>unistd.hE<gt>\n"
4980 "#include E<lt>errno.hE<gt>\n"
4981 "#include E<lt>ctype.hE<gt>\n"
4982
4983 #. type: Plain text
4984 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:110
4985 #, no-wrap
4986 msgid ""
4987 "#define handle_error(msg) \\e\n"
4988 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4989 msgstr ""
4990 "#define handle_error(msg) \\e\n"
4991 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4992
4993 #. type: Plain text
4994 #: build/C/man3/pthread_create.3:263
4995 #, no-wrap
4996 msgid ""
4997 "struct thread_info {    /* Used as argument to thread_start() */\n"
4998 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4999 "    int       thread_num;       /* Application-defined thread # */\n"
5000 "    char     *argv_string;      /* From command-line argument */\n"
5001 "};\n"
5002 msgstr ""
5003 "struct thread_info {    /* Used as argument to thread_start() */\n"
5004 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5005 "    int       thread_num;       /* Application-defined thread # */\n"
5006 "    char     *argv_string;      /* From command-line argument */\n"
5007 "};\n"
5008
5009 #. type: Plain text
5010 #: build/C/man3/pthread_create.3:266
5011 #, no-wrap
5012 msgid ""
5013 "/* Thread start function: display address near top of our stack,\n"
5014 "   and return upper-cased copy of argv_string */\n"
5015 msgstr ""
5016 "/* Thread start function: display address near top of our stack,\n"
5017 "   and return upper-cased copy of argv_string */\n"
5018
5019 #. type: Plain text
5020 #: build/C/man3/pthread_create.3:272
5021 #, no-wrap
5022 msgid ""
5023 "static void *\n"
5024 "thread_start(void *arg)\n"
5025 "{\n"
5026 "    struct thread_info *tinfo = arg;\n"
5027 "    char *uargv, *p;\n"
5028 msgstr ""
5029 "static void *\n"
5030 "thread_start(void *arg)\n"
5031 "{\n"
5032 "    struct thread_info *tinfo = arg;\n"
5033 "    char *uargv, *p;\n"
5034
5035 #. type: Plain text
5036 #: build/C/man3/pthread_create.3:275
5037 #, no-wrap
5038 msgid ""
5039 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5040 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5041 msgstr ""
5042 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5043 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5044
5045 #. type: Plain text
5046 #: build/C/man3/pthread_create.3:279
5047 #, no-wrap
5048 msgid ""
5049 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5050 "    if (uargv == NULL)\n"
5051 "        handle_error(\"strdup\");\n"
5052 msgstr ""
5053 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5054 "    if (uargv == NULL)\n"
5055 "        handle_error(\"strdup\");\n"
5056
5057 #. type: Plain text
5058 #: build/C/man3/pthread_create.3:282
5059 #, no-wrap
5060 msgid ""
5061 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5062 "        *p = toupper(*p);\n"
5063 msgstr ""
5064 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5065 "        *p = toupper(*p);\n"
5066
5067 #. type: Plain text
5068 #: build/C/man3/pthread_create.3:285
5069 #, no-wrap
5070 msgid ""
5071 "    return uargv;\n"
5072 "}\n"
5073 msgstr ""
5074 "    return uargv;\n"
5075 "}\n"
5076
5077 #. type: Plain text
5078 #: build/C/man3/pthread_create.3:294
5079 #, no-wrap
5080 msgid ""
5081 "int\n"
5082 "main(int argc, char *argv[])\n"
5083 "{\n"
5084 "    int s, tnum, opt, num_threads;\n"
5085 "    struct thread_info *tinfo;\n"
5086 "    pthread_attr_t attr;\n"
5087 "    int stack_size;\n"
5088 "    void *res;\n"
5089 msgstr ""
5090 "int\n"
5091 "main(int argc, char *argv[])\n"
5092 "{\n"
5093 "    int s, tnum, opt, num_threads;\n"
5094 "    struct thread_info *tinfo;\n"
5095 "    pthread_attr_t attr;\n"
5096 "    int stack_size;\n"
5097 "    void *res;\n"
5098
5099 #. type: Plain text
5100 #: build/C/man3/pthread_create.3:296
5101 #, no-wrap
5102 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5103 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5104
5105 #. type: Plain text
5106 #: build/C/man3/pthread_create.3:303
5107 #, no-wrap
5108 msgid ""
5109 "    stack_size = -1;\n"
5110 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5111 "        switch (opt) {\n"
5112 "        case \\(aqs\\(aq:\n"
5113 "            stack_size = strtoul(optarg, NULL, 0);\n"
5114 "            break;\n"
5115 msgstr ""
5116 "    stack_size = -1;\n"
5117 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5118 "        switch (opt) {\n"
5119 "        case \\(aqs\\(aq:\n"
5120 "            stack_size = strtoul(optarg, NULL, 0);\n"
5121 "            break;\n"
5122
5123 #. type: Plain text
5124 #: build/C/man3/pthread_create.3:310
5125 #, no-wrap
5126 msgid ""
5127 "        default:\n"
5128 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5129 "                    argv[0]);\n"
5130 "            exit(EXIT_FAILURE);\n"
5131 "        }\n"
5132 "    }\n"
5133 msgstr ""
5134 "        default:\n"
5135 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5136 "                    argv[0]);\n"
5137 "            exit(EXIT_FAILURE);\n"
5138 "        }\n"
5139 "    }\n"
5140
5141 #. type: Plain text
5142 #: build/C/man3/pthread_create.3:312
5143 #, no-wrap
5144 msgid "    num_threads = argc - optind;\n"
5145 msgstr "    num_threads = argc - optind;\n"
5146
5147 #. type: Plain text
5148 #: build/C/man3/pthread_create.3:314
5149 #, no-wrap
5150 msgid "    /* Initialize thread creation attributes */\n"
5151 msgstr "    /* Initialize thread creation attributes */\n"
5152
5153 #. type: Plain text
5154 #: build/C/man3/pthread_create.3:318
5155 #, no-wrap
5156 msgid ""
5157 "    s = pthread_attr_init(&attr);\n"
5158 "    if (s != 0)\n"
5159 "        handle_error_en(s, \"pthread_attr_init\");\n"
5160 msgstr ""
5161 "    s = pthread_attr_init(&attr);\n"
5162 "    if (s != 0)\n"
5163 "        handle_error_en(s, \"pthread_attr_init\");\n"
5164
5165 #. type: Plain text
5166 #: build/C/man3/pthread_create.3:324
5167 #, no-wrap
5168 msgid ""
5169 "    if (stack_size E<gt> 0) {\n"
5170 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5171 "        if (s != 0)\n"
5172 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5173 "    }\n"
5174 msgstr ""
5175 "    if (stack_size E<gt> 0) {\n"
5176 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5177 "        if (s != 0)\n"
5178 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5179 "    }\n"
5180
5181 #. type: Plain text
5182 #: build/C/man3/pthread_create.3:326
5183 #, no-wrap
5184 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5185 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5186
5187 #. type: Plain text
5188 #: build/C/man3/pthread_create.3:330
5189 #, no-wrap
5190 msgid ""
5191 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5192 "    if (tinfo == NULL)\n"
5193 "        handle_error(\"calloc\");\n"
5194 msgstr ""
5195 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5196 "    if (tinfo == NULL)\n"
5197 "        handle_error(\"calloc\");\n"
5198
5199 #. type: Plain text
5200 #: build/C/man3/pthread_create.3:332
5201 #, no-wrap
5202 msgid "    /* Create one thread for each command-line argument */\n"
5203 msgstr "    /* Create one thread for each command-line argument */\n"
5204
5205 #. type: Plain text
5206 #: build/C/man3/pthread_create.3:336
5207 #, no-wrap
5208 msgid ""
5209 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5210 "        tinfo[tnum].thread_num = tnum + 1;\n"
5211 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5212 msgstr ""
5213 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5214 "        tinfo[tnum].thread_num = tnum + 1;\n"
5215 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5216
5217 #. type: Plain text
5218 #: build/C/man3/pthread_create.3:339
5219 #, no-wrap
5220 msgid ""
5221 "        /* The pthread_create() call stores the thread ID into\n"
5222 "           corresponding element of tinfo[] */\n"
5223 msgstr ""
5224 "        /* The pthread_create() call stores the thread ID into\n"
5225 "           corresponding element of tinfo[] */\n"
5226
5227 #. type: Plain text
5228 #: build/C/man3/pthread_create.3:345
5229 #, no-wrap
5230 msgid ""
5231 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5232 "                           &thread_start, &tinfo[tnum]);\n"
5233 "        if (s != 0)\n"
5234 "            handle_error_en(s, \"pthread_create\");\n"
5235 "    }\n"
5236 msgstr ""
5237 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5238 "                           &thread_start, &tinfo[tnum]);\n"
5239 "        if (s != 0)\n"
5240 "            handle_error_en(s, \"pthread_create\");\n"
5241 "    }\n"
5242
5243 #. type: Plain text
5244 #: build/C/man3/pthread_create.3:348
5245 #, no-wrap
5246 msgid ""
5247 "    /* Destroy the thread attributes object, since it is no\n"
5248 "       longer needed */\n"
5249 msgstr ""
5250 "    /* Destroy the thread attributes object, since it is no\n"
5251 "       longer needed */\n"
5252
5253 #. type: Plain text
5254 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5255 #, no-wrap
5256 msgid ""
5257 "    s = pthread_attr_destroy(&attr);\n"
5258 "    if (s != 0)\n"
5259 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5260 msgstr ""
5261 "    s = pthread_attr_destroy(&attr);\n"
5262 "    if (s != 0)\n"
5263 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5264
5265 #. type: Plain text
5266 #: build/C/man3/pthread_create.3:354
5267 #, no-wrap
5268 msgid "    /* Now join with each thread, and display its returned value */\n"
5269 msgstr "    /* Now join with each thread, and display its returned value */\n"
5270
5271 #. type: Plain text
5272 #: build/C/man3/pthread_create.3:359
5273 #, no-wrap
5274 msgid ""
5275 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5276 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5277 "        if (s != 0)\n"
5278 "            handle_error_en(s, \"pthread_join\");\n"
5279 msgstr ""
5280 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5281 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5282 "        if (s != 0)\n"
5283 "            handle_error_en(s, \"pthread_join\");\n"
5284
5285 #. type: Plain text
5286 #: build/C/man3/pthread_create.3:364
5287 #, no-wrap
5288 msgid ""
5289 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5290 "                tinfo[tnum].thread_num, (char *) res);\n"
5291 "        free(res);      /* Free memory allocated by thread */\n"
5292 "    }\n"
5293 msgstr ""
5294 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5295 "                tinfo[tnum].thread_num, (char *) res);\n"
5296 "        free(res);      /* Free memory allocated by thread */\n"
5297 "    }\n"
5298
5299 #. type: Plain text
5300 #: build/C/man3/pthread_create.3:368
5301 #, no-wrap
5302 msgid ""
5303 "    free(tinfo);\n"
5304 "    exit(EXIT_SUCCESS);\n"
5305 "}\n"
5306 msgstr ""
5307 "    free(tinfo);\n"
5308 "    exit(EXIT_SUCCESS);\n"
5309 "}\n"
5310
5311 #. type: Plain text
5312 #: build/C/man3/pthread_create.3:382
5313 msgid ""
5314 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5315 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5316 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5317 "(7)"
5318 msgstr ""
5319 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5320 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5321 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5322 "(7)"
5323
5324 #. type: TH
5325 #: build/C/man3/pthread_detach.3:26
5326 #, no-wrap
5327 msgid "PTHREAD_DETACH"
5328 msgstr "PTHREAD_DETACH"
5329
5330 #. type: TH
5331 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5332 #, no-wrap
5333 msgid "2008-11-27"
5334 msgstr "2008-11-27"
5335
5336 #. type: Plain text
5337 #: build/C/man3/pthread_detach.3:29
5338 msgid "pthread_detach - detach a thread"
5339 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5340
5341 #. type: Plain text
5342 #: build/C/man3/pthread_detach.3:34
5343 #, no-wrap
5344 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5345 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5346
5347 #. type: Plain text
5348 #: build/C/man3/pthread_detach.3:46
5349 msgid ""
5350 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5351 "as detached.  When a detached thread terminates, its resources are "
5352 "automatically released back to the system without the need for another "
5353 "thread to join with the terminated thread."
5354 msgstr ""
5355 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5356 "detached (切り離された状態) という印を付ける。\n"
5357 "detached 状態のスレッドが終了すると、\n"
5358 "別のスレッドが終了されたスレッドを join しなくても、\n"
5359 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5360
5361 #. type: Plain text
5362 #: build/C/man3/pthread_detach.3:49
5363 msgid ""
5364 "Attempting to detach an already detached thread results in unspecified "
5365 "behavior."
5366 msgstr ""
5367 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5368 "どのような結果となるかは規定されていない。"
5369
5370 #. type: Plain text
5371 #: build/C/man3/pthread_detach.3:54
5372 msgid ""
5373 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5374 "number."
5375 msgstr ""
5376 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5377 "エラーの場合、エラー番号を返す。"
5378
5379 #. type: Plain text
5380 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5381 msgid "I<thread> is not a joinable thread."
5382 msgstr "I<thread> が join 可能なスレッドではない。"
5383
5384 #. type: Plain text
5385 #: build/C/man3/pthread_detach.3:70
5386 msgid ""
5387 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5388 "or be made joinable again."
5389 msgstr ""
5390 "いったんスレッドを detached 状態にすると、\n"
5391 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5392 "もう一度 join 可能にしたりすることはできない。"
5393
5394 #. type: Plain text
5395 #: build/C/man3/pthread_detach.3:77
5396 msgid ""
5397 "A new thread can be created in a detached state using "
5398 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5399 "I<attr> argument of B<pthread_create>(3)."
5400 msgstr ""
5401 "B<pthread_attr_setdetachstate>(3) を使って\n"
5402 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5403 "新しいスレッドを detached 状態で作成することができる。"
5404
5405 #. type: Plain text
5406 #: build/C/man3/pthread_detach.3:84
5407 msgid ""
5408 "The detached attribute merely determines the behavior of the system when the "
5409 "thread terminates; it does not prevent the thread from being terminated if "
5410 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5411 "thread returns)."
5412 msgstr ""
5413 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5414 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5415 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5416 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5417
5418 #. type: Plain text
5419 #: build/C/man3/pthread_detach.3:93
5420 msgid ""
5421 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5422 "thread that an application creates, so that system resources for the thread "
5423 "can be released.  (But note that the resources of all threads are freed when "
5424 "the process terminates.)"
5425 msgstr ""
5426 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5427 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5428 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5429 "終了するときには、全てのスレッドのリソースが解放される)。"
5430
5431 #. type: Plain text
5432 #: build/C/man3/pthread_detach.3:95
5433 msgid "The following statement detaches the calling thread:"
5434 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5435
5436 #. type: Plain text
5437 #: build/C/man3/pthread_detach.3:97
5438 #, no-wrap
5439 msgid "    pthread_detach(pthread_self());\n"
5440 msgstr "    pthread_detach(pthread_self());\n"
5441
5442 #. type: Plain text
5443 #: build/C/man3/pthread_detach.3:104
5444 msgid ""
5445 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5446 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5447 msgstr ""
5448 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5449 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5450
5451 #. type: TH
5452 #: build/C/man3/pthread_equal.3:26
5453 #, no-wrap
5454 msgid "PTHREAD_EQUAL"
5455 msgstr "PTHREAD_EQUAL"
5456
5457 #. type: TH
5458 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5459 #, no-wrap
5460 msgid "2009-03-30"
5461 msgstr "2009-03-30"
5462
5463 #. type: Plain text
5464 #: build/C/man3/pthread_equal.3:29
5465 msgid "pthread_equal - compare thread IDs"
5466 msgstr "pthread_equal - スレッド ID を比較する"
5467
5468 #. type: Plain text
5469 #: build/C/man3/pthread_equal.3:34
5470 #, no-wrap
5471 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5472 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5473
5474 #. type: Plain text
5475 #: build/C/man3/pthread_equal.3:41
5476 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5477 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5478
5479 #. type: Plain text
5480 #: build/C/man3/pthread_equal.3:45
5481 msgid ""
5482 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5483 "value; otherwise, it returns 0."
5484 msgstr ""
5485 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5486 "そうでなければ 0 を返す。"
5487
5488 #.  SH VERSIONS
5489 #.  Available since glibc 2.0
5490 #. type: Plain text
5491 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5492 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5493 msgid "This function always succeeds."
5494 msgstr "この関数は常に成功する。"
5495
5496 #. type: Plain text
5497 #: build/C/man3/pthread_equal.3:56
5498 msgid ""
5499 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5500 "considered opaque: there is no portable way for applications to directly "
5501 "compare two I<pthread_t> values."
5502 msgstr ""
5503 "B<pthread_equal>() 関数が必要なのは、\n"
5504 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5505 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5506 "移植性を確保できる形で比較する方法はない。"
5507
5508 #. type: Plain text
5509 #: build/C/man3/pthread_equal.3:60
5510 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5511 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5512
5513 #. type: TH
5514 #: build/C/man3/pthread_exit.3:26
5515 #, no-wrap
5516 msgid "PTHREAD_EXIT"
5517 msgstr "PTHREAD_EXIT"
5518
5519 #. type: Plain text
5520 #: build/C/man3/pthread_exit.3:29
5521 msgid "pthread_exit - terminate calling thread"
5522 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5523
5524 #. type: Plain text
5525 #: build/C/man3/pthread_exit.3:34
5526 #, no-wrap
5527 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5528 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5529
5530 #. type: Plain text
5531 #: build/C/man3/pthread_exit.3:45
5532 msgid ""
5533 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5534 "value via I<retval> that (if the thread is joinable)  is available to "
5535 "another thread in the same process that calls B<pthread_join>(3)."
5536 msgstr ""
5537 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5538 "I<retval> 経由で値を返す。\n"
5539 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5540 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5541
5542 #. type: Plain text
5543 #: build/C/man3/pthread_exit.3:55
5544 msgid ""
5545 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5546 "not yet been popped, are popped (in the reverse of the order in which they "
5547 "were pushed)  and executed.  If the thread has any thread-specific data, "
5548 "then, after the clean-up handlers have been executed, the corresponding "
5549 "destructor functions are called, in an unspecified order."
5550 msgstr ""
5551 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5552 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5553 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5554 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5555 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5556 "は規定されていない)。"
5557
5558 #. type: Plain text
5559 #: build/C/man3/pthread_exit.3:62
5560 msgid ""
5561 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5562 "variables, semaphores, and file descriptors) are not released, and functions "
5563 "registered using B<atexit>(3)  are not called."
5564 msgstr ""
5565 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5566 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5567 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5568
5569 #. type: Plain text
5570 #: build/C/man3/pthread_exit.3:71
5571 msgid ""
5572 "After the last thread in a process terminates, the process terminates as by "
5573 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5574 "resources are released and functions registered using B<atexit>(3)  are "
5575 "called."
5576 msgstr ""
5577 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5578 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5579 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5580 "が呼び出される。"
5581
5582 #. type: Plain text
5583 #: build/C/man3/pthread_exit.3:73
5584 msgid "This function does not return to the caller."
5585 msgstr "この関数は呼び出し側には返らない。"
5586
5587 #. type: Plain text
5588 #: build/C/man3/pthread_exit.3:82
5589 msgid ""
5590 "Performing a return from the start function of any thread other than the "
5591 "main thread results in an implicit call to B<pthread_exit>(), using the "
5592 "function's return value as the thread's exit status."
5593 msgstr ""
5594 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5595 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5596 "関数の返り値がスレッドの終了ステータスとして使用される。"
5597
5598 #. type: Plain text
5599 #: build/C/man3/pthread_exit.3:88
5600 msgid ""
5601 "To allow other threads to continue execution, the main thread should "
5602 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5603 msgstr ""
5604 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5605 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5606
5607 #. type: Plain text
5608 #: build/C/man3/pthread_exit.3:93
5609 msgid ""
5610 "The value pointed to by I<retval> should not be located on the calling "
5611 "thread's stack, since the contents of that stack are undefined after the "
5612 "thread terminates."
5613 msgstr ""
5614 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5615 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5616 "である。"
5617
5618 #.  Linux 2.6.27
5619 #.  FIXME . review a later kernel to see if this gets fixed
5620 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5621 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5622 #. type: Plain text
5623 #: build/C/man3/pthread_exit.3:105
5624 msgid ""
5625 "Currently, there are limitations in the kernel implementation logic for "
5626 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5627 "This can manifest in problems such as a locked terminal if a stop signal is "
5628 "sent to a foreground process whose thread group leader has already called "
5629 "B<pthread_exit>()."
5630 msgstr ""
5631 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5632 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5633 "カーネル実装の論理には制限がある。\n"
5634 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5635 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5636 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5637 "場合がある。"
5638
5639 #. type: Plain text
5640 #: build/C/man3/pthread_exit.3:109
5641 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5642 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5643
5644 #. type: TH
5645 #: build/C/man3/pthread_getattr_np.3:26
5646 #, no-wrap
5647 msgid "PTHREAD_GETATTR_NP"
5648 msgstr "PTHREAD_GETATTR_NP"
5649
5650 #. type: Plain text
5651 #: build/C/man3/pthread_getattr_np.3:29
5652 msgid "pthread_getattr_np - get attributes of created thread"
5653 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5654
5655 #. type: Plain text
5656 #: build/C/man3/pthread_getattr_np.3:35
5657 #, no-wrap
5658 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5659 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5660
5661 #. type: Plain text
5662 #: build/C/man3/pthread_getattr_np.3:45
5663 msgid ""
5664 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5665 "object referred to by I<attr> so that it contains actual attribute values "
5666 "describing the running thread I<thread>."
5667 msgstr ""
5668 "B<pthread_getattr_np>() 関数は、\n"
5669 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5670 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5671 "格納して返す。"
5672
5673 #. type: Plain text
5674 #: build/C/man3/pthread_getattr_np.3:52
5675 msgid ""
5676 "The returned attribute values may differ from the corresponding attribute "
5677 "values passed in the I<attr> object that was used to create the thread using "
5678 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5679 msgstr ""
5680 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5681 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5682 "特に、以下の属性は異なる場合がある。"
5683
5684 #. type: Plain text
5685 #: build/C/man3/pthread_getattr_np.3:55
5686 msgid ""
5687 "the detach state, since a joinable thread may have detached itself after "
5688 "creation;"
5689 msgstr ""
5690 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5691 "切り離す (detach する) ことができるからである。"
5692
5693 #. type: Plain text
5694 #: build/C/man3/pthread_getattr_np.3:58
5695 msgid ""
5696 "the stack size, which the implementation may align to a suitable boundary."
5697 msgstr ""
5698 "スタックサイズ。\n"
5699 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5700
5701 #. type: Plain text
5702 #: build/C/man3/pthread_getattr_np.3:63
5703 msgid ""
5704 "and the guard size, which the implementation may round upward to a multiple "
5705 "of the page size, or ignore (i.e., treat as 0), if the application is "
5706 "allocating its own stack."
5707 msgstr ""
5708 "guard size.\n"
5709 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5710 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5711 "(0 として扱われる) ことがあるからである。"
5712
5713 #. type: Plain text
5714 #: build/C/man3/pthread_getattr_np.3:68
5715 msgid ""
5716 "Furthermore, if the stack address attribute was not set in the thread "
5717 "attributes object used to create the thread, then the returned thread "
5718 "attributes object will report the actual stack address that the "
5719 "implementation selected for the thread."
5720 msgstr ""
5721 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5722 "スタックアドレスが設定されていなかった場合、\n"
5723 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5724 "割り当てた実際のスタックアドレスが報告される。"
5725
5726 #. type: Plain text
5727 #: build/C/man3/pthread_getattr_np.3:73
5728 msgid ""
5729 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5730 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5731 msgstr ""
5732 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5733 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5734 "そのオブジェクトを破棄すべきである。"
5735
5736 #. type: Plain text
5737 #: build/C/man3/pthread_getattr_np.3:76
5738 #: build/C/man3/pthread_getcpuclockid.3:49
5739 msgid ""
5740 "On success, this function returns 0; on error, it returns a nonzero error "
5741 "number."
5742 msgstr ""
5743 "成功すると、この関数は 0 を返す。\n"
5744 "エラーの場合、 0 以外のエラー番号を返す。"
5745
5746 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5747 #. type: Plain text
5748 #: build/C/man3/pthread_getattr_np.3:81
5749 msgid "Insufficient memory."
5750 msgstr "メモリが十分になかった。"
5751
5752 #. type: Plain text
5753 #: build/C/man3/pthread_getattr_np.3:96
5754 msgid ""
5755 "In addition, if I<thread> refers to the main thread, then "
5756 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5757 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5758 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5759 msgstr ""
5760 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5761 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5762 "エラーで失敗する可能性がある。\n"
5763 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5764 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5765 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5766
5767 #. type: Plain text
5768 #: build/C/man3/pthread_getattr_np.3:98
5769 msgid "This function is available in glibc since version 2.2.3."
5770 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5771
5772 #. type: Plain text
5773 #: build/C/man3/pthread_getattr_np.3:101
5774 #: build/C/man3/pthread_kill_other_threads_np.3:50
5775 msgid ""
5776 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5777 "\" (nonportable) in the name."
5778 msgstr ""
5779 "この関数は非標準の GNU による拡張である。\n"
5780 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5781 "付いている。"
5782
5783 #. type: Plain text
5784 #: build/C/man3/pthread_getattr_np.3:111
5785 msgid ""
5786 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5787 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5788 "and display its guard size, stack address, and stack size attributes.  "
5789 "Command-line arguments can be used to set these attributes to values other "
5790 "than the default when creating the thread.  The shell sessions below "
5791 "demonstrate the use of the program."
5792 msgstr ""
5793 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5794 "このプログラムは、スレッドを作成し、それから\n"
5795 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5796 "スタックアドレス、スタックサイズを取得し表示する。\n"
5797 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5798 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5799 "下記のシェルのセッションはこのプログラムの使用例である。"
5800
5801 #. type: Plain text
5802 #: build/C/man3/pthread_getattr_np.3:114
5803 msgid ""
5804 "In the first run, on an x86-32 system, a thread is created using default "
5805 "attributes:"
5806 msgstr ""
5807 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5808 "(x86-32 システム上で実行)。"
5809
5810 #. type: Plain text
5811 #: build/C/man3/pthread_getattr_np.3:124
5812 #, no-wrap
5813 msgid ""
5814 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5815 "unlimited\n"
5816 "$B< ./a.out>\n"
5817 "Attributes of created thread:\n"
5818 "        Guard size          = 4096 bytes\n"
5819 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5820 "        Stack size          = 0x201000 (2101248) bytes\n"
5821 msgstr ""
5822 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5823 "unlimited\n"
5824 "$B< ./a.out>\n"
5825 "Attributes of created thread:\n"
5826 "        Guard size          = 4096 bytes\n"
5827 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5828 "        Stack size          = 0x201000 (2101248) bytes\n"
5829
5830 #. type: Plain text
5831 #: build/C/man3/pthread_getattr_np.3:130
5832 msgid ""
5833 "In the following run, we see that if a guard size is specified, it is "
5834 "rounded up to the next multiple of the system page size (4096 bytes on "
5835 "x86-32):"
5836 msgstr ""
5837 "次の実行例では、guard size が指定された場合、\n"
5838 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5839 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5840
5841 #. type: Plain text
5842 #: build/C/man3/pthread_getattr_np.3:138
5843 #, no-wrap
5844 msgid ""
5845 "$B< ./a.out -g 4097>\n"
5846 "Thread attributes object after initializations:\n"
5847 "        Guard size          = 4097 bytes\n"
5848 "        Stack address       = (nil)\n"
5849 "        Stack size          = 0x0 (0) bytes\n"
5850 msgstr ""
5851 "$B< ./a.out -g 4097>\n"
5852 "Thread attributes object after initializations:\n"
5853 "        Guard size          = 4097 bytes\n"
5854 "        Stack address       = (nil)\n"
5855 "        Stack size          = 0x0 (0) bytes\n"
5856
5857 #. type: Plain text
5858 #: build/C/man3/pthread_getattr_np.3:143
5859 #, no-wrap
5860 msgid ""
5861 "Attributes of created thread:\n"
5862 "        Guard size          = 8192 bytes\n"
5863 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5864 "        Stack size          = 0x201000 (2101248) bytes\n"
5865 msgstr ""
5866 "Attributes of created thread:\n"
5867 "        Guard size          = 8192 bytes\n"
5868 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5869 "        Stack size          = 0x201000 (2101248) bytes\n"
5870
5871 #. .in +4n
5872 #. .nf
5873 #. $ ./a.out \-s 0x8000
5874 #. Thread attributes object after initializations:
5875 #.         Guard size          = 4096 bytes
5876 #.         Stack address       = 0xffff8000 (EOS = (nil))
5877 #.         Stack size          = 0x8000 (32768) bytes
5878 #. Attributes of created thread:
5879 #.         Guard size          = 4096 bytes
5880 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5881 #.         Stack size          = 0x8000 (32768) bytes
5882 #. .fi
5883 #. .in
5884 #. type: Plain text
5885 #: build/C/man3/pthread_getattr_np.3:162
5886 msgid ""
5887 "In the last run, the program manually allocates a stack for the thread.  In "
5888 "this case, the guard size attribute is ignored."
5889 msgstr ""
5890 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5891 "この場合には、guard size 属性は無視される。"
5892
5893 #. type: Plain text
5894 #: build/C/man3/pthread_getattr_np.3:167
5895 #, no-wrap
5896 msgid ""
5897 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5898 "Allocated thread stack at 0x804d000\n"
5899 msgstr ""
5900 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5901 "Allocated thread stack at 0x804d000\n"
5902
5903 #. type: Plain text
5904 #: build/C/man3/pthread_getattr_np.3:172
5905 #, no-wrap
5906 msgid ""
5907 "Thread attributes object after initializations:\n"
5908 "        Guard size          = 4096 bytes\n"
5909 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5910 "        Stack size          = 0x8000 (32768) bytes\n"
5911 msgstr ""
5912 "Thread attributes object after initializations:\n"
5913 "        Guard size          = 4096 bytes\n"
5914 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5915 "        Stack size          = 0x8000 (32768) bytes\n"
5916
5917 #. type: Plain text
5918 #: build/C/man3/pthread_getattr_np.3:177
5919 #, no-wrap
5920 msgid ""
5921 "Attributes of created thread:\n"
5922 "        Guard size          = 0 bytes\n"
5923 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5924 "        Stack size          = 0x8000 (32768) bytes\n"
5925 msgstr ""
5926 "Attributes of created thread:\n"
5927 "        Guard size          = 0 bytes\n"
5928 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5929 "        Stack size          = 0x8000 (32768) bytes\n"
5930
5931 #. type: Plain text
5932 #: build/C/man3/pthread_getattr_np.3:198
5933 #, no-wrap
5934 msgid ""
5935 "static void\n"
5936 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5937 "{\n"
5938 "    int s;\n"
5939 "    size_t stack_size, guard_size;\n"
5940 "    void *stack_addr;\n"
5941 msgstr ""
5942 "static void\n"
5943 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5944 "{\n"
5945 "    int s;\n"
5946 "    size_t stack_size, guard_size;\n"
5947 "    void *stack_addr;\n"
5948
5949 #. type: Plain text
5950 #: build/C/man3/pthread_getattr_np.3:203
5951 #, no-wrap
5952 msgid ""
5953 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5954 "    if (s != 0)\n"
5955 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5956 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5957 msgstr ""
5958 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5959 "    if (s != 0)\n"
5960 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5961 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5962
5963 #. type: Plain text
5964 #: build/C/man3/pthread_getattr_np.3:214
5965 #, no-wrap
5966 msgid ""
5967 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5968 "    if (s != 0)\n"
5969 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5970 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5971 "    if (stack_size E<gt> 0)\n"
5972 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5973 "    printf(\"\\en\");\n"
5974 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5975 "            prefix, stack_size, stack_size);\n"
5976 "}\n"
5977 msgstr ""
5978 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5979 "    if (s != 0)\n"
5980 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5981 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5982 "    if (stack_size E<gt> 0)\n"
5983 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5984 "    printf(\"\\en\");\n"
5985 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5986 "            prefix, stack_size, stack_size);\n"
5987 "}\n"
5988
5989 #. type: Plain text
5990 #: build/C/man3/pthread_getattr_np.3:220
5991 #, no-wrap
5992 msgid ""
5993 "static void\n"
5994 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5995 "{\n"
5996 "    int s;\n"
5997 "    pthread_attr_t attr;\n"
5998 msgstr ""
5999 "static void\n"
6000 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6001 "{\n"
6002 "    int s;\n"
6003 "    pthread_attr_t attr;\n"
6004
6005 #. type: Plain text
6006 #: build/C/man3/pthread_getattr_np.3:224
6007 #, no-wrap
6008 msgid ""
6009 "    s = pthread_getattr_np(thread, &attr);\n"
6010 "    if (s != 0)\n"
6011 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6012 msgstr ""
6013 "    s = pthread_getattr_np(thread, &attr);\n"
6014 "    if (s != 0)\n"
6015 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6016
6017 #. type: Plain text
6018 #: build/C/man3/pthread_getattr_np.3:226
6019 #, no-wrap
6020 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6021 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6022
6023 #. type: Plain text
6024 #: build/C/man3/pthread_getattr_np.3:231
6025 #, no-wrap
6026 msgid ""
6027 "    s = pthread_attr_destroy(&attr);\n"
6028 "    if (s != 0)\n"
6029 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6030 "}\n"
6031 msgstr ""
6032 "    s = pthread_attr_destroy(&attr);\n"
6033 "    if (s != 0)\n"
6034 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6035 "}\n"
6036
6037 #. type: Plain text
6038 #: build/C/man3/pthread_getattr_np.3:237
6039 #, no-wrap
6040 msgid ""
6041 "static void *           /* Start function for thread we create */\n"
6042 "thread_start(void *arg)\n"
6043 "{\n"
6044 "    printf(\"Attributes of created thread:\\en\");\n"
6045 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6046 msgstr ""
6047 "static void *           /* Start function for thread we create */\n"
6048 "thread_start(void *arg)\n"
6049 "{\n"
6050 "    printf(\"Attributes of created thread:\\en\");\n"
6051 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6052
6053 #. type: Plain text
6054 #: build/C/man3/pthread_getattr_np.3:251
6055 #, no-wrap
6056 msgid ""
6057 "static void\n"
6058 "usage(char *pname, char *msg)\n"
6059 "{\n"
6060 "    if (msg != NULL)\n"
6061 "        fputs(msg, stderr);\n"
6062 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6063 "            \" [-g guard-size]\\en\", pname);\n"
6064 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6065 "    exit(EXIT_FAILURE);\n"
6066 "}\n"
6067 msgstr ""
6068 "static void\n"
6069 "usage(char *pname, char *msg)\n"
6070 "{\n"
6071 "    if (msg != NULL)\n"
6072 "        fputs(msg, stderr);\n"
6073 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6074 "            \" [-g guard-size]\\en\", pname);\n"
6075 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6076 "    exit(EXIT_FAILURE);\n"
6077 "}\n"
6078
6079 #. type: Plain text
6080 #: build/C/man3/pthread_getattr_np.3:264
6081 #, no-wrap
6082 msgid ""
6083 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6084 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6085 "                              pthread_attr_t *attrp)\n"
6086 "{\n"
6087 "    int s, opt, allocate_stack;\n"
6088 "    long stack_size, guard_size;\n"
6089 "            void *stack_addr;\n"
6090 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6091 "                                           a thread attributes object */\n"
6092 "    allocate_stack = 0;\n"
6093 "    stack_size = -1;\n"
6094 "    guard_size = -1;\n"
6095 msgstr ""
6096 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6097 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6098 "                              pthread_attr_t *attrp)\n"
6099 "{\n"
6100 "    int s, opt, allocate_stack;\n"
6101 "    long stack_size, guard_size;\n"
6102 "            void *stack_addr;\n"
6103 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6104 "                                           a thread attributes object */\n"
6105 "    allocate_stack = 0;\n"
6106 "    stack_size = -1;\n"
6107 "    guard_size = -1;\n"
6108
6109 #. type: Plain text
6110 #: build/C/man3/pthread_getattr_np.3:273
6111 #, no-wrap
6112 msgid ""
6113 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6114 "        switch (opt) {\n"
6115 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6116 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6117 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6118 "        default:    usage(argv[0], NULL);\n"
6119 "        }\n"
6120 "    }\n"
6121 msgstr ""
6122 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6123 "        switch (opt) {\n"
6124 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6125 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6126 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6127 "        default:    usage(argv[0], NULL);\n"
6128 "        }\n"
6129 "    }\n"
6130
6131 #. type: Plain text
6132 #: build/C/man3/pthread_getattr_np.3:276
6133 #, no-wrap
6134 msgid ""
6135 "    if (allocate_stack && stack_size == -1)\n"
6136 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6137 msgstr ""
6138 "    if (allocate_stack && stack_size == -1)\n"
6139 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6140
6141 #. type: Plain text
6142 #: build/C/man3/pthread_getattr_np.3:279
6143 #, no-wrap
6144 msgid ""
6145 "    if (argc E<gt> optind)\n"
6146 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6147 msgstr ""
6148 "    if (argc E<gt> optind)\n"
6149 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6150
6151 #. type: Plain text
6152 #: build/C/man3/pthread_getattr_np.3:282
6153 #, no-wrap
6154 msgid ""
6155 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6156 "        ret_attrp = attrp;\n"
6157 msgstr ""
6158 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6159 "        ret_attrp = attrp;\n"
6160
6161 #. type: Plain text
6162 #: build/C/man3/pthread_getattr_np.3:287
6163 #, no-wrap
6164 msgid ""
6165 "        s = pthread_attr_init(attrp);\n"
6166 "        if (s != 0)\n"
6167 "            handle_error_en(s, \"pthread_attr_init\");\n"
6168 "    }\n"
6169 msgstr ""
6170 "        s = pthread_attr_init(attrp);\n"
6171 "        if (s != 0)\n"
6172 "            handle_error_en(s, \"pthread_attr_init\");\n"
6173 "    }\n"
6174
6175 #. type: Plain text
6176 #: build/C/man3/pthread_getattr_np.3:299
6177 #, no-wrap
6178 msgid ""
6179 "    if (stack_size E<gt>= 0) {\n"
6180 "        if (!allocate_stack) {\n"
6181 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6182 "            if (s != 0)\n"
6183 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6184 "        } else {\n"
6185 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6186 "                               stack_size);\n"
6187 "            if (s != 0)\n"
6188 "                handle_error_en(s, \"posix_memalign\");\n"
6189 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6190 msgstr ""
6191 "    if (stack_size E<gt>= 0) {\n"
6192 "        if (!allocate_stack) {\n"
6193 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6194 "            if (s != 0)\n"
6195 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6196 "        } else {\n"
6197 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6198 "                               stack_size);\n"
6199 "            if (s != 0)\n"
6200 "                handle_error_en(s, \"posix_memalign\");\n"
6201 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6202
6203 #. type: Plain text
6204 #: build/C/man3/pthread_getattr_np.3:305
6205 #, no-wrap
6206 msgid ""
6207 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6208 "            if (s != 0)\n"
6209 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6210 "        }\n"
6211 "    }\n"
6212 msgstr ""
6213 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6214 "            if (s != 0)\n"
6215 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6216 "        }\n"
6217 "    }\n"
6218
6219 #. type: Plain text
6220 #: build/C/man3/pthread_getattr_np.3:311
6221 #, no-wrap
6222 msgid ""
6223 "    if (guard_size E<gt>= 0) {\n"
6224 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6225 "        if (s != 0)\n"
6226 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6227 "    }\n"
6228 msgstr ""
6229 "    if (guard_size E<gt>= 0) {\n"
6230 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6231 "        if (s != 0)\n"
6232 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6233 "    }\n"
6234
6235 #. type: Plain text
6236 #: build/C/man3/pthread_getattr_np.3:314
6237 #, no-wrap
6238 msgid ""
6239 "    return ret_attrp;\n"
6240 "}\n"
6241 msgstr ""
6242 "    return ret_attrp;\n"
6243 "}\n"
6244
6245 #. type: Plain text
6246 #: build/C/man3/pthread_getattr_np.3:323
6247 #, no-wrap
6248 msgid ""
6249 "int\n"
6250 "main(int argc, char *argv[])\n"
6251 "{\n"
6252 "    int s;\n"
6253 "    pthread_t thr;\n"
6254 "    pthread_attr_t attr;\n"
6255 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6256 "                                        a thread attributes object */\n"
6257 msgstr ""
6258 "int\n"
6259 "main(int argc, char *argv[])\n"
6260 "{\n"
6261 "    int s;\n"
6262 "    pthread_t thr;\n"
6263 "    pthread_attr_t attr;\n"
6264 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6265 "                                        a thread attributes object */\n"
6266
6267 #. type: Plain text
6268 #: build/C/man3/pthread_getattr_np.3:325
6269 #, no-wrap
6270 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6271 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6272
6273 #. type: Plain text
6274 #: build/C/man3/pthread_getattr_np.3:331
6275 #, no-wrap
6276 msgid ""
6277 "    if (attrp != NULL) {\n"
6278 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6279 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6280 "        printf(\"\\en\");\n"
6281 "    }\n"
6282 msgstr ""
6283 "    if (attrp != NULL) {\n"
6284 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6285 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6286 "        printf(\"\\en\");\n"
6287 "    }\n"
6288
6289 #. type: Plain text
6290 #: build/C/man3/pthread_getattr_np.3:361
6291 msgid ""
6292 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6293 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6294 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6295 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6296 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6297 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6298 msgstr ""
6299 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6300 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6301 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6302 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6303 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6304 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6305
6306 #. type: TH
6307 #: build/C/man3/pthread_getcpuclockid.3:26
6308 #, no-wrap
6309 msgid "PTHREAD_GETCPUCLOCKID"
6310 msgstr "PTHREAD_GETCPUCLOCKID"
6311
6312 #. type: TH
6313 #: build/C/man3/pthread_getcpuclockid.3:26
6314 #, no-wrap
6315 msgid "2009-02-08"
6316 msgstr "2009-02-08"
6317
6318 #. type: Plain text
6319 #: build/C/man3/pthread_getcpuclockid.3:29
6320 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6321 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6322
6323 #. type: Plain text
6324 #: build/C/man3/pthread_getcpuclockid.3:33
6325 #, no-wrap
6326 msgid ""
6327 "B<#include E<lt>pthread.hE<gt>>\n"
6328 "B<#include E<lt>time.hE<gt>>\n"
6329 msgstr ""
6330 "B<#include E<lt>pthread.hE<gt>>\n"
6331 "B<#include E<lt>time.hE<gt>>\n"
6332
6333 #. type: Plain text
6334 #: build/C/man3/pthread_getcpuclockid.3:35
6335 #, no-wrap
6336 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6337 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6338
6339 #.  The clockid is constructed as follows:
6340 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6341 #.  where CLOCK_IDFIELD_SIZE is 3.
6342 #. type: Plain text
6343 #: build/C/man3/pthread_getcpuclockid.3:46
6344 msgid ""
6345 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6346 "time clock of the thread I<thread>."
6347 msgstr ""
6348 "B<pthread_getcpuclockid>() 関数は、\n"
6349 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6350
6351 #. type: TP
6352 #: build/C/man3/pthread_getcpuclockid.3:50
6353 #, no-wrap
6354 msgid "B<ENOENT>"
6355 msgstr "B<ENOENT>"
6356
6357 #.  CLOCK_THREAD_CPUTIME_ID not defined
6358 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6359 #.  be possible if kernel thread IDs took more than 29 bits (which
6360 #.  they currently cannot).
6361 #. type: Plain text
6362 #: build/C/man3/pthread_getcpuclockid.3:58
6363 msgid "Per-thread CPU time clocks are not supported by the system."
6364 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6365
6366 #. type: Plain text
6367 #: build/C/man3/pthread_getcpuclockid.3:65
6368 msgid "This function is available in glibc since version 2.2."
6369 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6370
6371 #. type: Plain text
6372 #: build/C/man3/pthread_getcpuclockid.3:78
6373 msgid ""
6374 "When I<thread> refers to the calling thread, this function returns an "
6375 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6376 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6377 msgstr ""
6378 "I<thread> が呼び出したスレッドを参照している場合、\n"
6379 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6380 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6381 "を参照する ID が返される。"
6382
6383 #. type: Plain text
6384 #: build/C/man3/pthread_getcpuclockid.3:84
6385 msgid ""
6386 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6387 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6388 "the two threads.  The following shell session shows an example run:"
6389 msgstr ""
6390 "以下のプログラムは、スレッドを作成し、それから\n"
6391 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6392 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6393 "スレッド毎の CPU 時間を取得する。\n"
6394 "下記のシェルのセッションは実行例である。"
6395
6396 #. type: Plain text
6397 #: build/C/man3/pthread_getcpuclockid.3:93
6398 #, no-wrap
6399 msgid ""
6400 "$ B<./a.out>\n"
6401 "Main thread sleeping\n"
6402 "Subthread starting infinite loop\n"
6403 "Main thread consuming some CPU time...\n"
6404 "Process total CPU time:    1.368\n"
6405 "Main thread CPU time:      0.376\n"
6406 "Subthread CPU time:        0.992\n"
6407 msgstr ""
6408 "$ B<./a.out>\n"
6409 "Main thread sleeping\n"
6410 "Subthread starting infinite loop\n"
6411 "Main thread consuming some CPU time...\n"
6412 "Process total CPU time:    1.368\n"
6413 "Main thread CPU time:      0.376\n"
6414 "Subthread CPU time:        0.992\n"
6415
6416 #. type: Plain text
6417 #: build/C/man3/pthread_getcpuclockid.3:99
6418 #, no-wrap
6419 msgid "/* Link with \"-lrt\" */\n"
6420 msgstr "/* \"-lrt\" でリンクする */\n"
6421
6422 #. type: Plain text
6423 #: build/C/man3/pthread_getcpuclockid.3:107
6424 #, no-wrap
6425 msgid ""
6426 "#include E<lt>time.hE<gt>\n"
6427 "#include E<lt>stdio.hE<gt>\n"
6428 "#include E<lt>stdlib.hE<gt>\n"
6429 "#include E<lt>unistd.hE<gt>\n"
6430 "#include E<lt>pthread.hE<gt>\n"
6431 "#include E<lt>string.hE<gt>\n"
6432 "#include E<lt>errno.hE<gt>\n"
6433 msgstr ""
6434 "#include E<lt>time.hE<gt>\n"
6435 "#include E<lt>stdio.hE<gt>\n"
6436 "#include E<lt>stdlib.hE<gt>\n"
6437 "#include E<lt>unistd.hE<gt>\n"
6438 "#include E<lt>pthread.hE<gt>\n"
6439 "#include E<lt>string.hE<gt>\n"
6440 "#include E<lt>errno.hE<gt>\n"
6441
6442 #. type: Plain text
6443 #: build/C/man3/pthread_getcpuclockid.3:121
6444 #, no-wrap
6445 msgid ""
6446 "static void *\n"
6447 "thread_start(void *arg)\n"
6448 "{\n"
6449 "    printf(\"Subthread starting infinite loop\\en\");\n"
6450 "    for (;;)\n"
6451 "        continue;\n"
6452 "}\n"
6453 msgstr ""
6454 "static void *\n"
6455 "thread_start(void *arg)\n"
6456 "{\n"
6457 "    printf(\"Subthread starting infinite loop\\en\");\n"
6458 "    for (;;)\n"
6459 "        continue;\n"
6460 "}\n"
6461
6462 #. type: Plain text
6463 #: build/C/man3/pthread_getcpuclockid.3:126
6464 #, no-wrap
6465 msgid ""
6466 "static void\n"
6467 "pclock(char *msg, clockid_t cid)\n"
6468 "{\n"
6469 "    struct timespec ts;\n"
6470 msgstr ""
6471 "static void\n"
6472 "pclock(char *msg, clockid_t cid)\n"
6473 "{\n"
6474 "    struct timespec ts;\n"
6475
6476 #. type: Plain text
6477 #: build/C/man3/pthread_getcpuclockid.3:132
6478 #, no-wrap
6479 msgid ""
6480 "    printf(\"%s\", msg);\n"
6481 "    if (clock_gettime(cid, &ts) == -1)\n"
6482 "        handle_error(\"clock_gettime\");\n"
6483 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6484 "}\n"
6485 msgstr ""
6486 "    printf(\"%s\", msg);\n"
6487 "    if (clock_gettime(cid, &ts) == -1)\n"
6488 "        handle_error(\"clock_gettime\");\n"
6489 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6490 "}\n"
6491
6492 #. type: Plain text
6493 #: build/C/man3/pthread_getcpuclockid.3:139
6494 #, no-wrap
6495 msgid ""
6496 "int\n"
6497 "main(int argc, char *argv[])\n"
6498 "{\n"
6499 "    pthread_t thread;\n"
6500 "    clockid_t cid;\n"
6501 "    int j, s;\n"
6502 msgstr ""
6503 "int\n"
6504 "main(int argc, char *argv[])\n"
6505 "{\n"
6506 "    pthread_t thread;\n"
6507 "    clockid_t cid;\n"
6508 "    int j, s;\n"
6509
6510 #. type: Plain text
6511 #: build/C/man3/pthread_getcpuclockid.3:143
6512 #, no-wrap
6513 msgid ""
6514 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6515 "    if (s != 0)\n"
6516 "        handle_error_en(s, \"pthread_create\");\n"
6517 msgstr ""
6518 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6519 "    if (s != 0)\n"
6520 "        handle_error_en(s, \"pthread_create\");\n"
6521
6522 #. type: Plain text
6523 #: build/C/man3/pthread_getcpuclockid.3:146
6524 #, no-wrap
6525 msgid ""
6526 "    printf(\"Main thread sleeping\\en\");\n"
6527 "    sleep(1);\n"
6528 msgstr ""
6529 "    printf(\"Main thread sleeping\\en\");\n"
6530 "    sleep(1);\n"
6531
6532 #. type: Plain text
6533 #: build/C/man3/pthread_getcpuclockid.3:150
6534 #, no-wrap
6535 msgid ""
6536 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6537 "    for (j = 0; j E<lt> 2000000; j++)\n"
6538 "        getppid();\n"
6539 msgstr ""
6540 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6541 "    for (j = 0; j E<lt> 2000000; j++)\n"
6542 "        getppid();\n"
6543
6544 #. type: Plain text
6545 #: build/C/man3/pthread_getcpuclockid.3:152
6546 #, no-wrap
6547 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6548 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6549
6550 #. type: Plain text
6551 #: build/C/man3/pthread_getcpuclockid.3:157
6552 #, no-wrap
6553 msgid ""
6554 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6555 "    if (s != 0)\n"
6556 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6557 "    pclock(\"Main thread CPU time:   \", cid);\n"
6558 msgstr ""
6559 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6560 "    if (s != 0)\n"
6561 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6562 "    pclock(\"Main thread CPU time:   \", cid);\n"
6563
6564 #. type: Plain text
6565 #: build/C/man3/pthread_getcpuclockid.3:160
6566 #, no-wrap
6567 msgid ""
6568 "    /* The preceding 4 lines of code could have been replaced by:\n"
6569 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6570 msgstr ""
6571 "    /* The preceding 4 lines of code could have been replaced by:\n"
6572 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6573
6574 #. type: Plain text
6575 #: build/C/man3/pthread_getcpuclockid.3:165
6576 #, no-wrap
6577 msgid ""
6578 "    s = pthread_getcpuclockid(thread, &cid);\n"
6579 "    if (s != 0)\n"
6580 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6581 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6582 msgstr ""
6583 "    s = pthread_getcpuclockid(thread, &cid);\n"
6584 "    if (s != 0)\n"
6585 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6586 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6587
6588 #. type: Plain text
6589 #: build/C/man3/pthread_getcpuclockid.3:168
6590 #, no-wrap
6591 msgid ""
6592 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6593 "}\n"
6594 msgstr ""
6595 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6596 "}\n"
6597
6598 #. type: Plain text
6599 #: build/C/man3/pthread_getcpuclockid.3:177
6600 msgid ""
6601 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6602 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6603 msgstr ""
6604 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6605 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6606
6607 #. type: TH
6608 #: build/C/man3/pthread_join.3:26
6609 #, no-wrap
6610 msgid "PTHREAD_JOIN"
6611 msgstr "PTHREAD_JOIN"
6612
6613 #. type: Plain text
6614 #: build/C/man3/pthread_join.3:29
6615 msgid "pthread_join - join with a terminated thread"
6616 msgstr "pthread_join - 終了したスレッドを join する"
6617
6618 #. type: Plain text
6619 #: build/C/man3/pthread_join.3:34
6620 #, no-wrap
6621 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6622 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6623
6624 #. type: Plain text
6625 #: build/C/man3/pthread_join.3:49
6626 msgid ""
6627 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6628 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6629 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6630 msgstr ""
6631 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6632 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6633 "B<pthread_join>() はすぐに返る。\n"
6634 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6635
6636 #. type: Plain text
6637 #: build/C/man3/pthread_join.3:63
6638 msgid ""
6639 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6640 "the target thread (i.e., the value that the target thread supplied to "
6641 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6642 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6643 msgstr ""
6644 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6645 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6646 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6647 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6648
6649 #. type: Plain text
6650 #: build/C/man3/pthread_join.3:70
6651 msgid ""
6652 "If multiple threads simultaneously try to join with the same thread, the "
6653 "results are undefined.  If the thread calling B<pthread_join>()  is "
6654 "canceled, then the target thread will remain joinable (i.e., it will not be "
6655 "detached)."
6656 msgstr ""
6657 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6658 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6659 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6660 "ならない)。"
6661
6662 #. type: Plain text
6663 #: build/C/man3/pthread_join.3:75
6664 msgid ""
6665 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6666 "number."
6667 msgstr ""
6668 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6669 "エラーの場合、エラー番号を返す。"
6670
6671 #. type: TP
6672 #: build/C/man3/pthread_join.3:76
6673 #, no-wrap
6674 msgid "B<EDEADLK>"
6675 msgstr "B<EDEADLK>"
6676
6677 #.  The following verified by testing on glibc 2.8/NPTL:
6678 #.  The following verified by testing on glibc 2.8/NPTL:
6679 #. type: Plain text
6680 #: build/C/man3/pthread_join.3:85
6681 msgid ""
6682 "A deadlock was detected (e.g., two threads tried to join with each other); "
6683 "or I<thread> specifies the calling thread."
6684 msgstr ""
6685 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6686 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6687
6688 #.  POSIX.1-2001 does not specify this error case.
6689 #. type: Plain text
6690 #: build/C/man3/pthread_join.3:93
6691 msgid "Another thread is already waiting to join with this thread."
6692 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6693
6694 #. type: Plain text
6695 #: build/C/man3/pthread_join.3:104
6696 msgid ""
6697 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6698 "the target thread has terminated."
6699 msgstr ""
6700 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6701 "呼び出し側には、対象スレッドが終了していることが保証される。"
6702
6703 #. type: Plain text
6704 #: build/C/man3/pthread_join.3:107
6705 msgid ""
6706 "Joining with a thread that has previously been joined results in undefined "
6707 "behavior."
6708 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6709
6710 #. type: Plain text
6711 #: build/C/man3/pthread_join.3:115
6712 msgid ""
6713 "Failure to join with a thread that is joinable (i.e., one that is not "
6714 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6715 "zombie thread consumes some system resources, and when enough zombie threads "
6716 "have accumulated, it will no longer be possible to create new threads (or "
6717 "processes)."
6718 msgstr ""
6719 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6720 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6721 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6722 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6723 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6724 "このようなことが起きるのは避けること。"
6725
6726 #. type: Plain text
6727 #: build/C/man3/pthread_join.3:121
6728 msgid ""
6729 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6730 "\"join with any terminated thread\".  If you believe you need this "
6731 "functionality, you probably need to rethink your application design."
6732 msgstr ""
6733 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6734 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6735 "この機能が必要だと思うような場合には、おそらく\n"
6736 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6737
6738 #. type: Plain text
6739 #: build/C/man3/pthread_join.3:124
6740 msgid ""
6741 "All of the threads in a process are peers: any thread can join with any "
6742 "other thread in the process."
6743 msgstr ""
6744 "プロセス内の全てのスレッドは対等であり、\n"
6745 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6746
6747 #. type: Plain text
6748 #: build/C/man3/pthread_join.3:134
6749 msgid ""
6750 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6751 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6752 msgstr ""
6753 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6754 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6755
6756 #. type: TH
6757 #: build/C/man3/pthread_kill.3:26
6758 #, no-wrap
6759 msgid "PTHREAD_KILL"
6760 msgstr "PTHREAD_KILL"
6761
6762 #. type: TH
6763 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigqueue.3:25
6764 #, no-wrap
6765 msgid "2012-08-19"
6766 msgstr "2012-08-19"
6767
6768 #. type: Plain text
6769 #: build/C/man3/pthread_kill.3:29
6770 msgid "pthread_kill - send a signal to a thread"
6771 msgstr "pthread_kill - スレッドにシグナルを送信する"
6772
6773 #. type: Plain text
6774 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6775 #, no-wrap
6776 msgid "B<#include E<lt>signal.hE<gt>>\n"
6777 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6778
6779 #. type: Plain text
6780 #: build/C/man3/pthread_kill.3:34
6781 #, no-wrap
6782 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6783 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6784
6785 #. type: Plain text
6786 #: build/C/man3/pthread_kill.3:47
6787 msgid ""
6788 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6789 "thread in the same process as the caller.  The signal is asynchronously "
6790 "directed to I<thread>."
6791 msgstr ""
6792 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6793 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6794 "シグナルは非同期に I<thread> へ直接送られる。"
6795
6796 #. type: Plain text
6797 #: build/C/man3/pthread_kill.3:52
6798 msgid ""
6799 "If I<sig> is 0, then no signal is sent, but error checking is still "
6800 "performed; this can be used to check for the existence of a thread ID."
6801 msgstr ""
6802 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6803 "エラーチェックだけは実行される。\n"
6804 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6805
6806 #. type: Plain text
6807 #: build/C/man3/pthread_kill.3:57
6808 msgid ""
6809 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6810 "number, and no signal is sent."
6811 msgstr ""
6812 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6813 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6814
6815 #. type: Plain text
6816 #: build/C/man3/pthread_kill.3:61
6817 msgid "An invalid signal was specified."
6818 msgstr "無効なシグナルが指定された。"
6819
6820 #. type: Plain text
6821 #: build/C/man3/pthread_kill.3:75
6822 msgid ""
6823 "Signal dispositions are process-wide: if a signal handler is installed, the "
6824 "handler will be invoked in the thread I<thread>, but if the disposition of "
6825 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6826 "affect the whole process."
6827 msgstr ""
6828 "シグナルの配送はプロセス全体で行われる。\n"
6829 "シグナルハンドラが設定されている場合、\n"
6830 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6831 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6832 "シグナルに対するアクションはプロセス全体に影響がある。"
6833
6834 #. type: Plain text
6835 #: build/C/man3/pthread_kill.3:84
6836 msgid ""
6837 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6838 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6839 msgstr ""
6840 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6841 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6842
6843 #. type: TH
6844 #: build/C/man3/pthread_kill_other_threads_np.3:26
6845 #, no-wrap
6846 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6847 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6848
6849 #. type: TH
6850 #: build/C/man3/pthread_kill_other_threads_np.3:26
6851 #, no-wrap
6852 msgid "2010-09-09"
6853 msgstr "2010-09-09"
6854
6855 #. type: Plain text
6856 #: build/C/man3/pthread_kill_other_threads_np.3:29
6857 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6858 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6859
6860 #. type: Plain text
6861 #: build/C/man3/pthread_kill_other_threads_np.3:34
6862 #, no-wrap
6863 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6864 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6865
6866 #.  .SH VERSIONS
6867 #.  Available since glibc 2.0
6868 #. type: Plain text
6869 #: build/C/man3/pthread_kill_other_threads_np.3:47
6870 msgid ""
6871 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
6872 "threading implementation.  On that implementation, calling this function "
6873 "causes the immediate termination of all threads in the application, except "
6874 "the calling thread.  The cancellation state and cancellation type of the to-"
6875 "be-terminated threads are ignored, and the cleanup handlers are not called "
6876 "in those threads."
6877 msgstr ""
6878 "B<pthread_kill_other_threads_np>() は、\n"
6879 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6880 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6881 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6882 "終了対象のスレッドの cancelability state と cancelability type は\n"
6883 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6884
6885 #. type: Plain text
6886 #: build/C/man3/pthread_kill_other_threads_np.3:59
6887 msgid ""
6888 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6889 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6890 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6891 "the other threads of an application are not automatically terminated (as "
6892 "POSIX.1-2001 requires) during B<execve>(2)."
6893 msgstr ""
6894 "B<pthread_kill_other_threads_np>() は、\n"
6895 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6896 "呼ばれることを目的として用意されている。\n"
6897 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6898 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6899 "終了されないという制限を解決するために設計された。"
6900
6901 #. type: Plain text
6902 #: build/C/man3/pthread_kill_other_threads_np.3:66
6903 msgid ""
6904 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6905 "exists, but does nothing.  (Nothing needs to be done, because the "
6906 "implementation does the right thing during an B<execve>(2).)"
6907 msgstr ""
6908 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6909 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6910 "何もする必要がないということだ)。"
6911
6912 #. type: Plain text
6913 #: build/C/man3/pthread_kill_other_threads_np.3:72
6914 msgid ""
6915 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6916 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6917 msgstr ""
6918 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6919 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6920
6921 #. type: TH
6922 #: build/C/man3/pthread_self.3:26
6923 #, no-wrap
6924 msgid "PTHREAD_SELF"
6925 msgstr "PTHREAD_SELF"
6926
6927 #. type: Plain text
6928 #: build/C/man3/pthread_self.3:29
6929 msgid "pthread_self - obtain ID of the calling thread"
6930 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6931
6932 #. type: Plain text
6933 #: build/C/man3/pthread_self.3:34
6934 #, no-wrap
6935 msgid "B<pthread_t pthread_self(void);>\n"
6936 msgstr "B<pthread_t pthread_self(void);>\n"
6937
6938 #. type: Plain text
6939 #: build/C/man3/pthread_self.3:46
6940 msgid ""
6941 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6942 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6943 "(3)  call that created this thread."
6944 msgstr ""
6945 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6946 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6947 "呼び出しで I<*thread> で返されるのと同じ値である。"
6948
6949 #. type: Plain text
6950 #: build/C/man3/pthread_self.3:48
6951 msgid "This function always succeeds, returning the calling thread's ID."
6952 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6953
6954 #. type: Plain text
6955 #: build/C/man3/pthread_self.3:63
6956 msgid ""
6957 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6958 "represent a thread ID; for example, representation using either an "
6959 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6960 "I<pthread_t> can't portably be compared using the C equality operator "
6961 "(B<==>); use B<pthread_equal>(3)  instead."
6962 msgstr ""
6963 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
6964 "スレッド実装が完全に自由に選択してよいことになっている。\n"
6965 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
6966 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
6967 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
6968 "代わりに B<pthread_equal>(3) を使うこと。"
6969
6970 #. type: Plain text
6971 #: build/C/man3/pthread_self.3:67
6972 msgid ""
6973 "Thread identifiers should be considered opaque: any attempt to use a thread "
6974 "ID other than in pthreads calls is nonportable and can lead to unspecified "
6975 "results."
6976 msgstr ""
6977 "スレッド識別子はその内部構造を意識すべきではない。\n"
6978 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
6979 "移植性がなくなり、どのような結果が得られるかも分からない。"
6980
6981 #. type: Plain text
6982 #: build/C/man3/pthread_self.3:71
6983 msgid ""
6984 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
6985 "may be reused after a terminated thread has been joined, or a detached "
6986 "thread has terminated."
6987 msgstr ""
6988 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
6989 "終了したスレッドが join されたり、\n"
6990 "切り離された (detached) スレッドが終了されたりした後は、\n"
6991 "そのスレッド ID は再利用されることがある。"
6992
6993 #. type: Plain text
6994 #: build/C/man3/pthread_self.3:76
6995 msgid ""
6996 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
6997 "kernel thread ID returned by a call to B<gettid>(2)."
6998 msgstr ""
6999 "B<pthread_self>() が返すスレッド ID は、\n"
7000 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
7001
7002 #. type: Plain text
7003 #: build/C/man3/pthread_self.3:80
7004 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7005 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7006
7007 #. type: TH
7008 #: build/C/man3/pthread_setaffinity_np.3:26
7009 #, no-wrap
7010 msgid "PTHREAD_SETAFFINITY_NP"
7011 msgstr "PTHREAD_SETAFFINITY_NP"
7012
7013 #. type: Plain text
7014 #: build/C/man3/pthread_setaffinity_np.3:30
7015 msgid ""
7016 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7017 "thread"
7018 msgstr ""
7019 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7020 "CPU affinity の設定/取得を行う"
7021
7022 #. type: Plain text
7023 #: build/C/man3/pthread_setaffinity_np.3:39
7024 #, no-wrap
7025 msgid ""
7026 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7027 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7028 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7029 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7030 msgstr ""
7031 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7032 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7033 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7034 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7035
7036 #. type: Plain text
7037 #: build/C/man3/pthread_setaffinity_np.3:54
7038 msgid ""
7039 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7040 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7041 "successful, and the thread is not currently running on one of the CPUs in "
7042 "I<cpuset>, then it is migrated to one of those CPUs."
7043 msgstr ""
7044 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7045 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7046 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7047 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7048
7049 #. type: Plain text
7050 #: build/C/man3/pthread_setaffinity_np.3:61
7051 msgid ""
7052 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7053 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7054 msgstr ""
7055 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7056 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7057
7058 #. type: Plain text
7059 #: build/C/man3/pthread_setaffinity_np.3:77
7060 msgid ""
7061 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7062 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
7063 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
7064 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7065 msgstr ""
7066 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7067 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7068 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7069 "割り当てている場合には、別の値になることもある)。"
7070
7071 #. type: TP
7072 #: build/C/man3/pthread_setaffinity_np.3:81
7073 #, no-wrap
7074 msgid "B<EFAULT>"
7075 msgstr "B<EFAULT>"
7076
7077 #. type: Plain text
7078 #: build/C/man3/pthread_setaffinity_np.3:84
7079 msgid "A supplied memory address was invalid."
7080 msgstr "指定されたメモリアドレスが無効である。"
7081
7082 #. type: Plain text
7083 #: build/C/man3/pthread_setaffinity_np.3:93
7084 msgid ""
7085 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7086 "processors that are currently physically on the system and permitted to the "
7087 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7088 "mechanism described in B<cpuset>(7)."
7089 msgstr ""
7090 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7091 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7092 "されているプロセッサが一つも含まれていない。\n"
7093 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7094 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7095
7096 #.  FIXME . ?
7097 #.  Loic Domaigne commented: it seems that in the future the
7098 #.  kernel developers want to make cpumask_t dynamic, so
7099 #.  CONFIG_NR_CPUS might become obsolete in the future.
7100 #.  cpumask_t
7101 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7102 #.  of the cpumask_t type.
7103 #. type: Plain text
7104 #: build/C/man3/pthread_setaffinity_np.3:109
7105 msgid ""
7106 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7107 "the set supported by the kernel.  (The kernel configuration option "
7108 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7109 "type used to represent CPU sets.)"
7110 msgstr ""
7111 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7112 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7113 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7114 "データ型がサポートする CPU 集合の範囲が定義される。)"
7115
7116 #. type: Plain text
7117 #: build/C/man3/pthread_setaffinity_np.3:114
7118 msgid ""
7119 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7120 "affinity mask used by the kernel."
7121 msgstr ""
7122 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7123 "affinity マスクの大きさよりも小さい。"
7124
7125 #. type: Plain text
7126 #: build/C/man3/pthread_setaffinity_np.3:137
7127 msgid ""
7128 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7129 "thread will actually run is the intersection of the set specified in the "
7130 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7131 "system may further restrict the set of CPUs on which the thread runs if the "
7132 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7133 "restrictions on the actual set of CPUs on which the thread will run are "
7134 "silently imposed by the kernel."
7135 msgstr ""
7136 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7137 "そのスレッドが実際に実行される CPU 集合は、\n"
7138 "I<cpuset> 引き数で指定された集合と\n"
7139 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7140 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7141 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7142 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7143 "これらの制限は、カーネルにより黙って適用される。"
7144
7145 #. type: Plain text
7146 #: build/C/man3/pthread_setaffinity_np.3:143
7147 msgid ""
7148 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7149 "B<sched_getaffinity>(2)  system calls."
7150 msgstr ""
7151 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7152 "B<sched_getaffinity>(2) を使って実装されている。"
7153
7154 #. type: Plain text
7155 #: build/C/man3/pthread_setaffinity_np.3:154
7156 msgid ""
7157 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7158 "creator's CPU affinity mask."
7159 msgstr ""
7160 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7161 "作成者の CPU affinity マスクを継承する。"
7162
7163 #. type: Plain text
7164 #: build/C/man3/pthread_setaffinity_np.3:162
7165 msgid ""
7166 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7167 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7168 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7169 "check the resulting CPU affinity mask of the thread."
7170 msgstr ""
7171 "以下のプログラムでは、メインスレッドは\n"
7172 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7173 "CPU 0 から 7 が含まれるように設定し\n"
7174 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7175 "その後で B<pthread_getaffinity_np>() を使って\n"
7176 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7177
7178 #. type: Plain text
7179 #: build/C/man3/pthread_setaffinity_np.3:169
7180 #, no-wrap
7181 msgid ""
7182 "#define _GNU_SOURCE\n"
7183 "#include E<lt>pthread.hE<gt>\n"
7184 "#include E<lt>stdio.hE<gt>\n"
7185 "#include E<lt>stdlib.hE<gt>\n"
7186 "#include E<lt>errno.hE<gt>\n"
7187 msgstr ""
7188 "#define _GNU_SOURCE\n"
7189 "#include E<lt>pthread.hE<gt>\n"
7190 "#include E<lt>stdio.hE<gt>\n"
7191 "#include E<lt>stdlib.hE<gt>\n"
7192 "#include E<lt>errno.hE<gt>\n"
7193
7194 #. type: Plain text
7195 #: build/C/man3/pthread_setaffinity_np.3:179
7196 #, no-wrap
7197 msgid ""
7198 "int\n"
7199 "main(int argc, char *argv[])\n"
7200 "{\n"
7201 "    int s, j;\n"
7202 "    cpu_set_t cpuset;\n"
7203 "    pthread_t thread;\n"
7204 msgstr ""
7205 "int\n"
7206 "main(int argc, char *argv[])\n"
7207 "{\n"
7208 "    int s, j;\n"
7209 "    cpu_set_t cpuset;\n"
7210 "    pthread_t thread;\n"
7211
7212 #. type: Plain text
7213 #: build/C/man3/pthread_setaffinity_np.3:181
7214 #, no-wrap
7215 msgid "    thread = pthread_self();\n"
7216 msgstr "    thread = pthread_self();\n"
7217
7218 #. type: Plain text
7219 #: build/C/man3/pthread_setaffinity_np.3:183
7220 #, no-wrap
7221 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7222 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7223
7224 #. type: Plain text
7225 #: build/C/man3/pthread_setaffinity_np.3:187
7226 #, no-wrap
7227 msgid ""
7228 "    CPU_ZERO(&cpuset);\n"
7229 "    for (j = 0; j E<lt> 8; j++)\n"
7230 "        CPU_SET(j, &cpuset);\n"
7231 msgstr ""
7232 "    CPU_ZERO(&cpuset);\n"
7233 "    for (j = 0; j E<lt> 8; j++)\n"
7234 "        CPU_SET(j, &cpuset);\n"
7235
7236 #. type: Plain text
7237 #: build/C/man3/pthread_setaffinity_np.3:191
7238 #, no-wrap
7239 msgid ""
7240 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7241 "    if (s != 0)\n"
7242 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7243 msgstr ""
7244 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7245 "    if (s != 0)\n"
7246 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7247
7248 #. type: Plain text
7249 #: build/C/man3/pthread_setaffinity_np.3:193
7250 #, no-wrap
7251 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7252 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7253
7254 #. type: Plain text
7255 #: build/C/man3/pthread_setaffinity_np.3:197
7256 #, no-wrap
7257 msgid ""
7258 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7259 "    if (s != 0)\n"
7260 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7261 msgstr ""
7262 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7263 "    if (s != 0)\n"
7264 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7265
7266 #. type: Plain text
7267 #: build/C/man3/pthread_setaffinity_np.3:202
7268 #, no-wrap
7269 msgid ""
7270 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7271 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7272 "        if (CPU_ISSET(j, &cpuset))\n"
7273 "            printf(\"    CPU %d\\en\", j);\n"
7274 msgstr ""
7275 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7276 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7277 "        if (CPU_ISSET(j, &cpuset))\n"
7278 "            printf(\"    CPU %d\\en\", j);\n"
7279
7280 #. type: Plain text
7281 #: build/C/man3/pthread_setaffinity_np.3:205
7282 #: build/C/man3/pthread_setschedparam.3:430
7283 #, no-wrap
7284 msgid ""
7285 "    exit(EXIT_SUCCESS);\n"
7286 "}\n"
7287 msgstr ""
7288 "    exit(EXIT_SUCCESS);\n"
7289 "}\n"
7290
7291 #. type: Plain text
7292 #: build/C/man3/pthread_setaffinity_np.3:214
7293 msgid ""
7294 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7295 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7296 "B<cpuset>(7), B<pthreads>(7)"
7297 msgstr ""
7298 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7299 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7300 "B<cpuset>(7), B<pthreads>(7)"
7301
7302 #. type: TH
7303 #: build/C/man3/pthread_setcancelstate.3:26
7304 #, no-wrap
7305 msgid "PTHREAD_SETCANCELSTATE"
7306 msgstr "PTHREAD_SETCANCELSTATE"
7307
7308 #. type: Plain text
7309 #: build/C/man3/pthread_setcancelstate.3:30
7310 msgid ""
7311 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7312 "type"
7313 msgstr ""
7314 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7315 "cancelability type を設定する"
7316
7317 #. type: Plain text
7318 #: build/C/man3/pthread_setcancelstate.3:36
7319 #, no-wrap
7320 msgid ""
7321 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7322 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7323 msgstr ""
7324 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7325 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7326
7327 #. type: Plain text
7328 #: build/C/man3/pthread_setcancelstate.3:51
7329 msgid ""
7330 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7331 "thread to the value given in I<state>.  The previous cancelability state of "
7332 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7333 "I<state> argument must have one of the following values:"
7334 msgstr ""
7335 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7336 "cancelability state に I<state> で指定された\n"
7337 "値を設定する。変更前のスレッドの cancelability state は\n"
7338 "I<oldstate> が指すバッファで返される。\n"
7339 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7340
7341 #. type: TP
7342 #: build/C/man3/pthread_setcancelstate.3:51
7343 #, no-wrap
7344 msgid "B<PTHREAD_CANCEL_ENABLE>"
7345 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7346
7347 #. type: Plain text
7348 #: build/C/man3/pthread_setcancelstate.3:58
7349 msgid ""
7350 "The thread is cancelable.  This is the default cancelability state in all "
7351 "new threads, including the initial thread.  The thread's cancelability type "
7352 "determines when a cancelable thread will respond to a cancellation request."
7353 msgstr ""
7354 "スレッドは取り消し可能 (cancelable) である。\n"
7355 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7356 "cancelability state である。これには最初のスレッドも含まれる。\n"
7357 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7358 "取り消し要求にいつ反応するかが決まる。"
7359
7360 #. type: TP
7361 #: build/C/man3/pthread_setcancelstate.3:58
7362 #, no-wrap
7363 msgid "B<PTHREAD_CANCEL_DISABLE>"
7364 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7365
7366 #. type: Plain text
7367 #: build/C/man3/pthread_setcancelstate.3:63
7368 msgid ""
7369 "The thread is not cancelable.  If a cancellation request is received, it is "
7370 "blocked until cancelability is enabled."
7371 msgstr ""
7372 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7373 "取り消し可能に設定されるまでその要求はブロックされる。"
7374
7375 #. type: Plain text
7376 #: build/C/man3/pthread_setcancelstate.3:75
7377 msgid ""
7378 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7379 "thread to the value given in I<type>.  The previous cancelability type of "
7380 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7381 "argument must have one of the following values:"
7382 msgstr ""
7383 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7384 "cancelability type に I<type> で指定された値を設定する。\n"
7385 "変更前のスレッドの cancelability type は\n"
7386 "I<oldtype> が指すバッファで返される。\n"
7387 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7388
7389 #. type: TP
7390 #: build/C/man3/pthread_setcancelstate.3:75
7391 #, no-wrap
7392 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7393 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7394
7395 #. type: Plain text
7396 #: build/C/man3/pthread_setcancelstate.3:82
7397 msgid ""
7398 "A cancellation request is deferred until the thread next calls a function "
7399 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7400 "cancelability type in all new threads, including the initial thread."
7401 msgstr ""
7402 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7403 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7404 "スレッドでのデフォルトの cancelability type である。\n"
7405 "これには最初のスレッドも含まれる。"
7406
7407 #. type: TP
7408 #: build/C/man3/pthread_setcancelstate.3:82
7409 #, no-wrap
7410 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7411 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7412
7413 #. type: Plain text
7414 #: build/C/man3/pthread_setcancelstate.3:88
7415 msgid ""
7416 "The thread can be canceled at any time.  (Typically, it will be canceled "
7417 "immediately upon receiving a cancellation request, but the system doesn't "
7418 "guarantee this.)"
7419 msgstr ""
7420 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7421 "システムがそのことを保証しているわけではない)。"
7422
7423 #. type: Plain text
7424 #: build/C/man3/pthread_setcancelstate.3:92
7425 msgid ""
7426 "The set-and-get operation performed by each of these functions is atomic "
7427 "with respect to other threads in the process calling the same function."
7428 msgstr ""
7429 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7430 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7431 "アトミックに行われる。"
7432
7433 #. type: Plain text
7434 #: build/C/man3/pthread_setcancelstate.3:99
7435 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7436 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7437
7438 #. type: Plain text
7439 #: build/C/man3/pthread_setcancelstate.3:103
7440 msgid "Invalid value for I<state>."
7441 msgstr "I<state> に無効な値が指定された。"
7442
7443 #. type: Plain text
7444 #: build/C/man3/pthread_setcancelstate.3:107
7445 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7446 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7447
7448 #.  .SH VERSIONS
7449 #.  Available since glibc 2.0
7450 #. type: Plain text
7451 #: build/C/man3/pthread_setcancelstate.3:113
7452 msgid "Invalid value for I<type>."
7453 msgstr "I<type> に無効な値が指定された。"
7454
7455 #. type: Plain text
7456 #: build/C/man3/pthread_setcancelstate.3:118
7457 msgid ""
7458 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7459 "(3)."
7460 msgstr ""
7461 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7462 "B<pthread_cancel>(3) を参照。"
7463
7464 #. type: Plain text
7465 #: build/C/man3/pthread_setcancelstate.3:125
7466 msgid ""
7467 "Briefly disabling cancelability is useful if a thread performs some critical "
7468 "action that must not be interrupted by a cancellation request.  Beware of "
7469 "disabling cancelability for long periods, or around operations that may "
7470 "block for long periods, since that will render the thread unresponsive to "
7471 "cancellation requests."
7472 msgstr ""
7473 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7474 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7475 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7476 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7477 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7478 "スレッドが応答しない状態になってしまうからである。"
7479
7480 #. type: Plain text
7481 #: build/C/man3/pthread_setcancelstate.3:156
7482 msgid ""
7483 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7484 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7485 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7486 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7487 "because the application has no way of knowing what the state of these "
7488 "resources is when the thread is canceled; that is, did cancellation occur "
7489 "before the resources were reserved, while they were reserved, or after they "
7490 "were released? Furthermore, some internal data structures (e.g., the linked "
7491 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7492 "left in an inconsistent state if cancellation occurs in the middle of the "
7493 "function call.  Consequently, clean-up handlers cease to be useful.  "
7494 "Functions that can be safely asynchronously canceled are called I<async-"
7495 "cancel-safe functions>.  POSIX.1-2001 requires only that B<pthread_cancel>"
7496 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7497 "cancel-safe.  In general, other library functions can't be safely called "
7498 "from an asynchronously cancelable thread.  One of the few circumstances in "
7499 "which asynchronous cancelability is useful is for cancellation of a thread "
7500 "that is in a pure compute-bound loop."
7501 msgstr ""
7502 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7503 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7504 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7505 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7506 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7507 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7508 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7509 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7510 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7511 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7512 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7513 "が役に立たないものになってしまう。\n"
7514 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7515 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7516 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7517 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7518 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7519 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7520 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7521
7522 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7523 #. type: Plain text
7524 #: build/C/man3/pthread_setcancelstate.3:174
7525 msgid ""
7526 "The Linux threading implementations permit the I<oldstate> argument of "
7527 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7528 "the previous cancelability state is not returned to the caller.  Many other "
7529 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7530 "does not specify this point, so portable applications should always specify "
7531 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7532 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7533 msgstr ""
7534 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7535 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7536 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7537 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7538 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7539 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7540 "NULL 以外の値を指定するようにすべきである。\n"
7541 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7542 "全く同じことが言える。"
7543
7544 #. type: Plain text
7545 #: build/C/man3/pthread_setcancelstate.3:177
7546 msgid "See B<pthread_cancel>(3)."
7547 msgstr "B<pthread_cancel>(3) を参照。"
7548
7549 #. type: Plain text
7550 #: build/C/man3/pthread_setcancelstate.3:182
7551 msgid ""
7552 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7553 "B<pthreads>(7)"
7554 msgstr ""
7555 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7556 "B<pthreads>(7)"
7557
7558 #. type: TH
7559 #: build/C/man3/pthread_setconcurrency.3:25
7560 #, no-wrap
7561 msgid "PTHREAD_SETCONCURRENCY"
7562 msgstr "PTHREAD_SETCONCURRENCY"
7563
7564 #. type: TH
7565 #: build/C/man3/pthread_setconcurrency.3:25
7566 #, no-wrap
7567 msgid "2009-04-10"
7568 msgstr "2009-04-10"
7569
7570 #. type: Plain text
7571 #: build/C/man3/pthread_setconcurrency.3:29
7572 msgid ""
7573 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7574 "level"
7575 msgstr ""
7576 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7577 "行う"
7578
7579 #. type: Plain text
7580 #: build/C/man3/pthread_setconcurrency.3:35
7581 #, no-wrap
7582 msgid ""
7583 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7584 "B<int pthread_getconcurrency(void);>\n"
7585 msgstr ""
7586 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7587 "B<int pthread_getconcurrency(void);>\n"
7588
7589 #. type: Plain text
7590 #: build/C/man3/pthread_setconcurrency.3:48
7591 msgid ""
7592 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7593 "application's desired concurrency level, specified in I<new_level>.  The "
7594 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7595 "of concurrency that should be provided as a result of calling "
7596 "B<pthread_setconcurrency>()."
7597 msgstr ""
7598 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7599 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7600 "希望する並列処理レベルは I<new_level> で指定する。\n"
7601 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7602 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7603 "どのような並列度になるべきかは規定されていない。"
7604
7605 #. type: Plain text
7606 #: build/C/man3/pthread_setconcurrency.3:53
7607 msgid ""
7608 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7609 "concurrency level as it deems appropriate."
7610 msgstr ""
7611 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7612 "実装側で適切とみなしたレベルに設定するようになる。"
7613
7614 #. type: Plain text
7615 #: build/C/man3/pthread_setconcurrency.3:56
7616 msgid ""
7617 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7618 "level for this process."
7619 msgstr ""
7620 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7621 "の現在値を返す。"
7622
7623 #. type: Plain text
7624 #: build/C/man3/pthread_setconcurrency.3:61
7625 msgid ""
7626 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7627 "nonzero error number."
7628 msgstr ""
7629 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7630 "エラーの場合、 0 以外のエラー番号を返す。"
7631
7632 #. type: Plain text
7633 #: build/C/man3/pthread_setconcurrency.3:68
7634 msgid ""
7635 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7636 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7637 "B<pthread_setconcurrency>()  has not previously been called."
7638 msgstr ""
7639 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7640 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7641 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7642 "それまでに一度も呼び出されていない場合は 0 が返る。"
7643
7644 #. type: Plain text
7645 #: build/C/man3/pthread_setconcurrency.3:71
7646 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7647 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7648
7649 #. type: Plain text
7650 #: build/C/man3/pthread_setconcurrency.3:75
7651 msgid "I<new_level> is negative."
7652 msgstr "I<new_level> が負である。"
7653
7654 #. type: Plain text
7655 #: build/C/man3/pthread_setconcurrency.3:81
7656 msgid ""
7657 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7658 "I<new_level> would cause a system resource to be exceeded\")."
7659 msgstr ""
7660 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7661 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7662 "超過してしまう」)。"
7663
7664 #. type: Plain text
7665 #: build/C/man3/pthread_setconcurrency.3:83
7666 msgid "These functions are available in glibc since version 2.1."
7667 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7668
7669 #. type: Plain text
7670 #: build/C/man3/pthread_setconcurrency.3:87
7671 msgid "The default concurrency level is 0."
7672 msgstr "デフォルトの concurrency level は 0 である。"
7673
7674 #. type: Plain text
7675 #: build/C/man3/pthread_setconcurrency.3:94
7676 msgid ""
7677 "Concurrency levels are meaningful only for M:N threading implementations, "
7678 "where at any moment a subset of a process's set of user-level threads may be "
7679 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7680 "concurrency level allows the application to give the system a hint as to the "
7681 "number of kernel-scheduling entities that should be provided for efficient "
7682 "execution of the application."
7683 msgstr ""
7684 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7685 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7686 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7687 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7688 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7689 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7690 "ムに伝えることができる。"
7691
7692 #. type: Plain text
7693 #: build/C/man3/pthread_setconcurrency.3:100
7694 msgid ""
7695 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7696 "concurrency level has no meaning.  In other words, on Linux these functions "
7697 "merely exist for compatibility with other systems, and they have no effect "
7698 "on the execution of a program."
7699 msgstr ""
7700 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7701 "並列処理レベルを設定しても何の意味もない。\n"
7702 "言い換えると、 Linux では、これらの関数は、\n"
7703 "他のシステムとの互換性のためだけに存在し、\n"
7704 "プログラムの実行には何の影響も与えないということである。"
7705
7706 #. type: Plain text
7707 #: build/C/man3/pthread_setconcurrency.3:103
7708 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7709 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7710
7711 #. type: TH
7712 #: build/C/man3/pthread_setname_np.3:26
7713 #, no-wrap
7714 msgid "PTHREAD_SETNAME_NP"
7715 msgstr "PTHREAD_SETNAME_NP"
7716
7717 #. type: Plain text
7718 #: build/C/man3/pthread_setname_np.3:29
7719 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7720 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
7721
7722 #. type: Plain text
7723 #: build/C/man3/pthread_setname_np.3:36
7724 #, no-wrap
7725 msgid ""
7726 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7727 "B<#include E<lt>pthread.hE<gt>>\n"
7728 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7729 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7730 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7731 msgstr ""
7732 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7733 "B<#include E<lt>pthread.hE<gt>>\n"
7734 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7735 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7736 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7737
7738 #. type: Plain text
7739 #: build/C/man3/pthread_setname_np.3:55
7740 msgid ""
7741 "By default, all the threads created using B<pthread_create>()  inherit the "
7742 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7743 "unique name for a thread, which can be useful for debugging multithreaded "
7744 "applications.  The thread name is a meaningful C language string, whose "
7745 "length is restricted to 16 characters, including the terminating null byte "
7746 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
7747 "to be changed; I<name> specifies the new name."
7748 msgstr ""
7749 "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム"
7750 "名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定"
7751 "することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデ"
7752 "バッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さ"
7753 "は 16 文字に限定されており、 終端の NULL バイト (\\(aq\\e0\\(aq) も 16 文字に"
7754 "含まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には"
7755 "新しい名前を指定する。"
7756
7757 #. type: Plain text
7758 #: build/C/man3/pthread_setname_np.3:72
7759 msgid ""
7760 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7761 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7762 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7763 "specifies the number of bytes available in I<name>.  The buffer specified by "
7764 "I<name> should be at least 16 characters in length.  The returned thread "
7765 "name in the output buffer will be null terminated."
7766 msgstr ""
7767 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
7768 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
7769 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
7770 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
7771 "出力バッファに返されたスレッド名は NULL 終端される。"
7772
7773 #. type: Plain text
7774 #: build/C/man3/pthread_setname_np.3:79
7775 msgid ""
7776 "The B<pthread_setname_np>()  function can fail with the following error:"
7777 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7778
7779 #. type: TP
7780 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7781 #, no-wrap
7782 msgid "B<ERANGE>"
7783 msgstr "B<ERANGE>"
7784
7785 #. type: Plain text
7786 #: build/C/man3/pthread_setname_np.3:84
7787 msgid ""
7788 "The length of the string specified pointed to by I<name> exceeds the allowed "
7789 "limit."
7790 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
7791
7792 #. type: Plain text
7793 #: build/C/man3/pthread_setname_np.3:88
7794 msgid ""
7795 "The B<pthread_getname_np>()  function can fail with the following error:"
7796 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7797
7798 #. type: Plain text
7799 #: build/C/man3/pthread_setname_np.3:95
7800 msgid ""
7801 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7802 "name."
7803 msgstr ""
7804 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
7805 "る。"
7806
7807 #. type: Plain text
7808 #: build/C/man3/pthread_setname_np.3:100
7809 msgid ""
7810 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7811 "then the call may fail with one of the errors described in B<open>(2)."
7812 msgstr ""
7813 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
7814 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
7815
7816 #. type: Plain text
7817 #: build/C/man3/pthread_setname_np.3:102
7818 msgid "These functions first appeared in glibc in version 2.12."
7819 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7820
7821 #. type: Plain text
7822 #: build/C/man3/pthread_setname_np.3:104
7823 msgid "These functions are nonstandard GNU extensions."
7824 msgstr "これらの関数は非標準の GNU による拡張である。"
7825
7826 #. type: Plain text
7827 #: build/C/man3/pthread_setname_np.3:112
7828 msgid ""
7829 "B<pthread_setname_np>()  internally writes to the thread specific comm file "
7830 "under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7831 "B<pthread_getname_np>()  retrieves it from the same location."
7832 msgstr ""
7833 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
7834 "comm ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
7835 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
7836
7837 #. type: Plain text
7838 #: build/C/man3/pthread_setname_np.3:118
7839 msgid ""
7840 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7841 "B<pthread_getname_np>()."
7842 msgstr ""
7843 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7844 "の使用例を示している。"
7845
7846 #. type: Plain text
7847 #: build/C/man3/pthread_setname_np.3:120
7848 msgid "The following shell session shows a sample run of the program:"
7849 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7850
7851 #. type: Plain text
7852 #: build/C/man3/pthread_setname_np.3:136
7853 #, no-wrap
7854 msgid ""
7855 "$B< ./a.out>\n"
7856 "Created a thread. Default name is: a.out\n"
7857 "The thread name after setting it is THREADFOO.\n"
7858 "B<^Z>                           # Suspend the program\n"
7859 "[1]+  Stopped           ./a.out\n"
7860 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7861 "  PID   TID CMD                         COMMAND\n"
7862 " 5990  5990 ./a.out                     a.out\n"
7863 " 5990  5991 ./a.out                     THREADFOO\n"
7864 "$ B<cat /proc/5990/task/5990/comm>\n"
7865 "a.out\n"
7866 "$ B<cat /proc/5990/task/5991/comm>\n"
7867 "THREADFOO\n"
7868 msgstr ""
7869 "$B< ./a.out>\n"
7870 "Created a thread. Default name is: a.out\n"
7871 "The thread name after setting it is THREADFOO.\n"
7872 "B<^Z>                           # Suspend the program\n"
7873 "[1]+  Stopped           ./a.out\n"
7874 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7875 "  PID   TID CMD                         COMMAND\n"
7876 " 5990  5990 ./a.out                     a.out\n"
7877 " 5990  5991 ./a.out                     THREADFOO\n"
7878 "$ B<cat /proc/5990/task/5990/comm>\n"
7879 "a.out\n"
7880 "$ B<cat /proc/5990/task/5991/comm>\n"
7881 "THREADFOO\n"
7882
7883 #. type: Plain text
7884 #: build/C/man3/pthread_setname_np.3:148
7885 #, no-wrap
7886 msgid ""
7887 "#define _GNU_SOURCE\n"
7888 "#include E<lt>pthread.hE<gt>\n"
7889 "#include E<lt>stdio.hE<gt>\n"
7890 "#include E<lt>string.hE<gt>\n"
7891 "#include E<lt>unistd.hE<gt>\n"
7892 "#include E<lt>errno.hE<gt>\n"
7893 "#include E<lt>stdlib.hE<gt>\n"
7894 msgstr ""
7895 "#define _GNU_SOURCE\n"
7896 "#include E<lt>pthread.hE<gt>\n"
7897 "#include E<lt>stdio.hE<gt>\n"
7898 "#include E<lt>string.hE<gt>\n"
7899 "#include E<lt>unistd.hE<gt>\n"
7900 "#include E<lt>errno.hE<gt>\n"
7901 "#include E<lt>stdlib.hE<gt>\n"
7902
7903 #. type: Plain text
7904 #: build/C/man3/pthread_setname_np.3:150
7905 #, no-wrap
7906 msgid "#define NAMELEN 16\n"
7907 msgstr "#define NAMELEN 16\n"
7908
7909 #. type: Plain text
7910 #: build/C/man3/pthread_setname_np.3:154
7911 #, no-wrap
7912 msgid ""
7913 "#define errExitEN(en, msg) \\e\n"
7914 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7915 "        } while (0)\n"
7916 msgstr ""
7917 "#define errExitEN(en, msg) \\e\n"
7918 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7919 "        } while (0)\n"
7920
7921 #. type: Plain text
7922 #: build/C/man3/pthread_setname_np.3:161
7923 #, no-wrap
7924 msgid ""
7925 "static void *\n"
7926 "threadfunc(void *parm)\n"
7927 "{\n"
7928 "    sleep(5);          // allow main program to set the thread name\n"
7929 "    return NULL;\n"
7930 "}\n"
7931 msgstr ""
7932 "static void *\n"
7933 "threadfunc(void *parm)\n"
7934 "{\n"
7935 "    sleep(5);          // allow main program to set the thread name\n"
7936 "    return NULL;\n"
7937 "}\n"
7938
7939 #. type: Plain text
7940 #: build/C/man3/pthread_setname_np.3:168
7941 #, no-wrap
7942 msgid ""
7943 "int\n"
7944 "main(int argc, char **argv)\n"
7945 "{\n"
7946 "    pthread_t thread;\n"
7947 "    int rc;\n"
7948 "    char thread_name[NAMELEN];\n"
7949 msgstr ""
7950 "int\n"
7951 "main(int argc, char **argv)\n"
7952 "{\n"
7953 "    pthread_t thread;\n"
7954 "    int rc;\n"
7955 "    char thread_name[NAMELEN];\n"
7956
7957 #. type: Plain text
7958 #: build/C/man3/pthread_setname_np.3:172
7959 #, no-wrap
7960 msgid ""
7961 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7962 "    if (rc != 0)\n"
7963 "        errExitEN(rc, \"pthread_create\");\n"
7964 msgstr ""
7965 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7966 "    if (rc != 0)\n"
7967 "        errExitEN(rc, \"pthread_create\");\n"
7968
7969 #. type: Plain text
7970 #: build/C/man3/pthread_setname_np.3:176
7971 #, no-wrap
7972 msgid ""
7973 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7974 "    if (rc != 0)\n"
7975 "        errExitEN(rc, \"pthread_getname_np\");\n"
7976 msgstr ""
7977 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7978 "    if (rc != 0)\n"
7979 "        errExitEN(rc, \"pthread_getname_np\");\n"
7980
7981 #. type: Plain text
7982 #: build/C/man3/pthread_setname_np.3:181
7983 #, no-wrap
7984 msgid ""
7985 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7986 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7987 "    if (rc != 0)\n"
7988 "        errExitEN(rc, \"pthread_setname_np\");\n"
7989 msgstr ""
7990 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7991 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7992 "    if (rc != 0)\n"
7993 "        errExitEN(rc, \"pthread_setname_np\");\n"
7994
7995 #. type: Plain text
7996 #: build/C/man3/pthread_setname_np.3:183
7997 #, no-wrap
7998 msgid "    sleep(2);\n"
7999 msgstr "    sleep(2);\n"
8000
8001 #. type: Plain text
8002 #: build/C/man3/pthread_setname_np.3:189
8003 #, no-wrap
8004 msgid ""
8005 "    rc = pthread_getname_np(thread, thread_name,\n"
8006 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8007 "    if (rc != 0)\n"
8008 "        errExitEN(rc, \"pthread_getname_np\");\n"
8009 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8010 msgstr ""
8011 "    rc = pthread_getname_np(thread, thread_name,\n"
8012 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8013 "    if (rc != 0)\n"
8014 "        errExitEN(rc, \"pthread_getname_np\");\n"
8015 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8016
8017 #. type: Plain text
8018 #: build/C/man3/pthread_setname_np.3:193
8019 #, no-wrap
8020 msgid ""
8021 "    rc = pthread_join(thread, NULL);\n"
8022 "    if (rc != 0)\n"
8023 "        errExitEN(rc, \"pthread_join\");\n"
8024 msgstr ""
8025 "    rc = pthread_join(thread, NULL);\n"
8026 "    if (rc != 0)\n"
8027 "        errExitEN(rc, \"pthread_join\");\n"
8028
8029 #. type: Plain text
8030 #: build/C/man3/pthread_setname_np.3:197
8031 #, no-wrap
8032 msgid ""
8033 "    printf(\"Done\\en\");\n"
8034 "    exit(EXIT_SUCCESS);\n"
8035 "}\n"
8036 msgstr ""
8037 "    printf(\"Done\\en\");\n"
8038 "    exit(EXIT_SUCCESS);\n"
8039 "}\n"
8040
8041 #. type: Plain text
8042 #: build/C/man3/pthread_setname_np.3:204
8043 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8044 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8045
8046 #. type: TH
8047 #: build/C/man3/pthread_setschedparam.3:26
8048 #, no-wrap
8049 msgid "PTHREAD_SETSCHEDPARAM"
8050 msgstr "PTHREAD_SETSCHEDPARAM"
8051
8052 #. type: Plain text
8053 #: build/C/man3/pthread_setschedparam.3:30
8054 msgid ""
8055 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8056 "parameters of a thread"
8057 msgstr ""
8058 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8059 "スケジューリングポリシーとパラメータを設定/取得する"
8060
8061 #. type: Plain text
8062 #: build/C/man3/pthread_setschedparam.3:38
8063 #, no-wrap
8064 msgid ""
8065 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8066 "B<                      const struct sched_param *>I<param>B<);>\n"
8067 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8068 "B<                      struct sched_param *>I<param>B<);>\n"
8069 msgstr ""
8070 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8071 "B<                      const struct sched_param *>I<param>B<);>\n"
8072 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8073 "B<                      struct sched_param *>I<param>B<);>\n"
8074
8075 #. type: Plain text
8076 #: build/C/man3/pthread_setschedparam.3:46
8077 msgid ""
8078 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8079 "parameters of the thread I<thread>."
8080 msgstr ""
8081 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8082 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8083
8084 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8085 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8086 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8087 #. type: Plain text
8088 #: build/C/man3/pthread_setschedparam.3:57
8089 msgid ""
8090 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8091 "values for I<policy>, and their semantics, are described in "
8092 "B<sched_setscheduler>(2)."
8093 msgstr ""
8094 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8095 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8096 "説明されている。"
8097
8098 #. type: Plain text
8099 #: build/C/man3/pthread_setschedparam.3:63
8100 msgid ""
8101 "The structure pointed to by I<param> specifies the new scheduling parameters "
8102 "for I<thread>.  Scheduling parameters are maintained in the following "
8103 "structure:"
8104 msgstr ""
8105 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8106 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8107
8108 #.  FIXME . nptl/pthread_setschedparam.c has the following
8109 #.    /* If the thread should have higher priority because of some
8110 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8111 #.  Eventually (perhaps after writing the mutexattr pages), we
8112 #.  may want to add something on the topic to this page.
8113 #. type: Plain text
8114 #: build/C/man3/pthread_setschedparam.3:104
8115 msgid ""
8116 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8117 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8118 "and I<param>, respectively.  The returned priority value is that set by the "
8119 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8120 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8121 "does not reflect any temporary priority adjustments as a result of calls to "
8122 "any priority inheritance or priority ceiling functions (see, for example, "
8123 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8124 "(3))."
8125 msgstr ""
8126 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8127 "スケジューリングポリシーとパラメータを、\n"
8128 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8129 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8130 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8131 "B<pthread_create> で設定された値となる。\n"
8132 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8133 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8134 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8135 "行われる一時的な優先度の調整の影響を受けない。"
8136
8137 #. type: Plain text
8138 #: build/C/man3/pthread_setschedparam.3:112
8139 msgid ""
8140 "On success, these functions return 0; on error, they return a nonzero error "
8141 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8142 "parameters of I<thread> are not changed."
8143 msgstr ""
8144 "成功すると、これらの関数は 0 を返す。\n"
8145 "エラーの場合、0 以外のエラー番号を返す。\n"
8146 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8147 "スケジューリングポリシーとパラメータは変更されない。"
8148
8149 #. type: Plain text
8150 #: build/C/man3/pthread_setschedparam.3:114
8151 msgid "Both of these functions can fail with the following error:"
8152 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8153
8154 #. type: Plain text
8155 #: build/C/man3/pthread_setschedparam.3:122
8156 msgid ""
8157 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8158 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8159
8160 #. type: Plain text
8161 #: build/C/man3/pthread_setschedparam.3:129
8162 msgid ""
8163 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8164 "the I<policy>."
8165 msgstr ""
8166 "I<policy> が認識できないポリシーであるか、\n"
8167 "I<param> が I<policy> では意味を持たない値である。"
8168
8169 #. type: Plain text
8170 #: build/C/man3/pthread_setschedparam.3:133
8171 msgid ""
8172 "The caller does not have appropriate privileges to set the specified "
8173 "scheduling policy and parameters."
8174 msgstr ""
8175 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8176 "のに必要な特権を持たない。"
8177
8178 #.  .SH VERSIONS
8179 #.  Available since glibc 2.0
8180 #. type: Plain text
8181 #: build/C/man3/pthread_setschedparam.3:141
8182 msgid ""
8183 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8184 "policy or scheduling parameters to an unsupported value\") error for "
8185 "B<pthread_setschedparam>()."
8186 msgstr ""
8187 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8188 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8189 "パラメータに設定しようとした\") も追加で規定されている。"
8190
8191 #. type: Plain text
8192 #: build/C/man3/pthread_setschedparam.3:149
8193 msgid ""
8194 "For a description of the permissions required to, and the effect of, "
8195 "changing a thread's scheduling policy and priority, and details of the "
8196 "permitted ranges for priorities in each scheduling policy, see "
8197 "B<sched_setscheduler>(2)."
8198 msgstr ""
8199 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8200 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8201 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8202
8203 #. type: Plain text
8204 #: build/C/man3/pthread_setschedparam.3:156
8205 msgid ""
8206 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8207 "B<pthread_getschedparam>(), as well as the use of a number of other "
8208 "scheduling-related pthreads functions."
8209 msgstr ""
8210 "以下のプログラムは B<pthread_setschedparam>() と\n"
8211 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8212 "他のいろいろな関数の使用例を示すものである。"
8213
8214 #. type: Plain text
8215 #: build/C/man3/pthread_setschedparam.3:172
8216 msgid ""
8217 "In the following run, the main thread sets its scheduling policy to "
8218 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8219 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8220 "priority attribute of 20.  The program then sets (using "
8221 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8222 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8223 "created using this attributes object should take their scheduling attributes "
8224 "from the thread attributes object.  The program then creates a thread using "
8225 "the thread attributes object, and that thread displays its scheduling policy "
8226 "and priority."
8227 msgstr ""
8228 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8229 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8230 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8231 "属性 20 で初期化する。\n"
8232 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8233 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8234 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8235 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8236 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8237 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8238 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8239
8240 #. type: Plain text
8241 #: build/C/man3/pthread_setschedparam.3:180
8242 #, no-wrap
8243 msgid ""
8244 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8245 "Password:\n"
8246 "# B<./a.out -mf10 -ar20 -i e>\n"
8247 "Scheduler settings of main thread\n"
8248 "    policy=SCHED_FIFO, priority=10\n"
8249 msgstr ""
8250 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8251 "Password:\n"
8252 "# B<./a.out -mf10 -ar20 -i e>\n"
8253 "Scheduler settings of main thread\n"
8254 "    policy=SCHED_FIFO, priority=10\n"
8255
8256 #. type: Plain text
8257 #: build/C/man3/pthread_setschedparam.3:184
8258 #, no-wrap
8259 msgid ""
8260 "Scheduler settings in \\(aqattr\\(aq\n"
8261 "    policy=SCHED_RR, priority=20\n"
8262 "    inheritsched is EXPLICIT\n"
8263 msgstr ""
8264 "Scheduler settings in \\(aqattr\\(aq\n"
8265 "    policy=SCHED_RR, priority=20\n"
8266 "    inheritsched is EXPLICIT\n"
8267
8268 #. type: Plain text
8269 #: build/C/man3/pthread_setschedparam.3:187
8270 #, no-wrap
8271 msgid ""
8272 "Scheduler attributes of new thread\n"
8273 "    policy=SCHED_RR, priority=20\n"
8274 msgstr ""
8275 "Scheduler attributes of new thread\n"
8276 "    policy=SCHED_RR, priority=20\n"
8277
8278 #. type: Plain text
8279 #: build/C/man3/pthread_setschedparam.3:192
8280 msgid ""
8281 "In the above output, one can see that the scheduling policy and priority "
8282 "were taken from the values specified in the thread attributes object."
8283 msgstr ""
8284 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8285 "オブジェクトで指定された値から取られていることが分かる。"
8286
8287 #. type: Plain text
8288 #: build/C/man3/pthread_setschedparam.3:199
8289 msgid ""
8290 "The next run is the same as the previous, except that the inherit scheduler "
8291 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8292 "using the thread attributes object should ignore the scheduling attributes "
8293 "specified in the attributes object and instead take their scheduling "
8294 "attributes from the creating thread."
8295 msgstr ""
8296 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8297 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8298 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8299 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8300 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8301 "ことを意味する。"
8302
8303 #. type: Plain text
8304 #: build/C/man3/pthread_setschedparam.3:205
8305 #, no-wrap
8306 msgid ""
8307 "# B<./a.out -mf10 -ar20 -i i>\n"
8308 "Scheduler settings of main thread\n"
8309 "    policy=SCHED_FIFO, priority=10\n"
8310 msgstr ""
8311 "# B<./a.out -mf10 -ar20 -i i>\n"
8312 "Scheduler settings of main thread\n"
8313 "    policy=SCHED_FIFO, priority=10\n"
8314
8315 #. type: Plain text
8316 #: build/C/man3/pthread_setschedparam.3:209
8317 #, no-wrap
8318 msgid ""
8319 "Scheduler settings in \\(aqattr\\(aq\n"
8320 "    policy=SCHED_RR, priority=20\n"
8321 "    inheritsched is INHERIT\n"
8322 msgstr ""
8323 "Scheduler settings in \\(aqattr\\(aq\n"
8324 "    policy=SCHED_RR, priority=20\n"
8325 "    inheritsched is INHERIT\n"
8326
8327 #. type: Plain text
8328 #: build/C/man3/pthread_setschedparam.3:212
8329 #, no-wrap
8330 msgid ""
8331 "Scheduler attributes of new thread\n"
8332 "    policy=SCHED_FIFO, priority=10\n"
8333 msgstr ""
8334 "Scheduler attributes of new thread\n"
8335 "    policy=SCHED_FIFO, priority=10\n"
8336
8337 #. type: Plain text
8338 #: build/C/man3/pthread_setschedparam.3:218
8339 msgid ""
8340 "In the above output, one can see that the scheduling policy and priority "
8341 "were taken from the creating thread, rather than the thread attributes "
8342 "object."
8343 msgstr ""
8344 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8345 "スレッド属性オブジェクトからではなく、\n"
8346 "スレッドを作成したスレッドから取れれていることが分かる。"
8347
8348 #. type: Plain text
8349 #: build/C/man3/pthread_setschedparam.3:224
8350 msgid ""
8351 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8352 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8353 "scheduler attribute."
8354 msgstr ""
8355 "なお、 I<-i\\ i> を省略した場合でも、\n"
8356 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8357 "出力は同じになる。"
8358
8359 #. type: Plain text
8360 #: build/C/man3/pthread_setschedparam.3:228
8361 #, no-wrap
8362 msgid "/* pthreads_sched_test.c */\n"
8363 msgstr "/* pthreads_sched_test.c */\n"
8364
8365 #. type: Plain text
8366 #: build/C/man3/pthread_setschedparam.3:234
8367 #, no-wrap
8368 msgid ""
8369 "#include E<lt>pthread.hE<gt>\n"
8370 "#include E<lt>stdio.hE<gt>\n"
8371 "#include E<lt>stdlib.hE<gt>\n"
8372 "#include E<lt>unistd.hE<gt>\n"
8373 "#include E<lt>errno.hE<gt>\n"
8374 msgstr ""
8375 "#include E<lt>pthread.hE<gt>\n"
8376 "#include E<lt>stdio.hE<gt>\n"
8377 "#include E<lt>stdlib.hE<gt>\n"
8378 "#include E<lt>unistd.hE<gt>\n"
8379 "#include E<lt>errno.hE<gt>\n"
8380
8381 #. type: Plain text
8382 #: build/C/man3/pthread_setschedparam.3:243
8383 #, no-wrap
8384 msgid ""
8385 "static void\n"
8386 "usage(char *prog_name, char *msg)\n"
8387 "{\n"
8388 "    if (msg != NULL)\n"
8389 "        fputs(msg, stderr);\n"
8390 msgstr ""
8391 "static void\n"
8392 "usage(char *prog_name, char *msg)\n"
8393 "{\n"
8394 "    if (msg != NULL)\n"
8395 "        fputs(msg, stderr);\n"
8396
8397 #. type: Plain text
8398 #: build/C/man3/pthread_setschedparam.3:260
8399 #, no-wrap
8400 msgid ""
8401 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8402 "    fprintf(stderr, \"Options are:\\en\");\n"
8403 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8404 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8405 "    fpe(\"                 thread attributes object\\en\");\n"
8406 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8407 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8408 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8409 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8410 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8411 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8412 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8413 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8414 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8415 "    exit(EXIT_FAILURE);\n"
8416 "}\n"
8417 msgstr ""
8418 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8419 "    fprintf(stderr, \"Options are:\\en\");\n"
8420 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8421 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8422 "    fpe(\"                 thread attributes object\\en\");\n"
8423 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8424 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8425 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8426 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8427 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8428 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8429 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8430 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8431 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8432 "    exit(EXIT_FAILURE);\n"
8433 "}\n"
8434
8435 #. type: Plain text
8436 #: build/C/man3/pthread_setschedparam.3:271
8437 #, no-wrap
8438 msgid ""
8439 "static int\n"
8440 "get_policy(char p, int *policy)\n"
8441 "{\n"
8442 "    switch (p) {\n"
8443 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8444 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8445 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8446 "    default:  return 0;\n"
8447 "    }\n"
8448 "}\n"
8449 msgstr ""
8450 "static int\n"
8451 "get_policy(char p, int *policy)\n"
8452 "{\n"
8453 "    switch (p) {\n"
8454 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8455 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8456 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8457 "    default:  return 0;\n"
8458 "    }\n"
8459 "}\n"
8460
8461 #. type: Plain text
8462 #: build/C/man3/pthread_setschedparam.3:282
8463 #, no-wrap
8464 msgid ""
8465 "static void\n"
8466 "display_sched_attr(int policy, struct sched_param *param)\n"
8467 "{\n"
8468 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8469 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8470 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8471 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8472 "            \"???\",\n"
8473 "            param-E<gt>sched_priority);\n"
8474 "}\n"
8475 msgstr ""
8476 "static void\n"
8477 "display_sched_attr(int policy, struct sched_param *param)\n"
8478 "{\n"
8479 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8480 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8481 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8482 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8483 "            \"???\",\n"
8484 "            param-E<gt>sched_priority);\n"
8485 "}\n"
8486
8487 #. type: Plain text
8488 #: build/C/man3/pthread_setschedparam.3:288
8489 #, no-wrap
8490 msgid ""
8491 "static void\n"
8492 "display_thread_sched_attr(char *msg)\n"
8493 "{\n"
8494 "    int policy, s;\n"
8495 "    struct sched_param param;\n"
8496 msgstr ""
8497 "static void\n"
8498 "display_thread_sched_attr(char *msg)\n"
8499 "{\n"
8500 "    int policy, s;\n"
8501 "    struct sched_param param;\n"
8502
8503 #. type: Plain text
8504 #: build/C/man3/pthread_setschedparam.3:292
8505 #, no-wrap
8506 msgid ""
8507 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8508 "    if (s != 0)\n"
8509 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8510 msgstr ""
8511 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8512 "    if (s != 0)\n"
8513 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8514
8515 #. type: Plain text
8516 #: build/C/man3/pthread_setschedparam.3:296
8517 #, no-wrap
8518 msgid ""
8519 "    printf(\"%s\\en\", msg);\n"
8520 "    display_sched_attr(policy, &param);\n"
8521 "}\n"
8522 msgstr ""
8523 "    printf(\"%s\\en\", msg);\n"
8524 "    display_sched_attr(policy, &param);\n"
8525 "}\n"
8526
8527 #. type: Plain text
8528 #: build/C/man3/pthread_setschedparam.3:301
8529 #, no-wrap
8530 msgid ""
8531 "static void *\n"
8532 "thread_start(void *arg)\n"
8533 "{\n"
8534 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8535 msgstr ""
8536 "static void *\n"
8537 "thread_start(void *arg)\n"
8538 "{\n"
8539 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8540
8541 #. type: Plain text
8542 #: build/C/man3/pthread_setschedparam.3:304
8543 #, no-wrap
8544 msgid ""
8545 "    return NULL;\n"
8546 "}\n"
8547 msgstr ""
8548 "    return NULL;\n"
8549 "}\n"
8550
8551 #. type: Plain text
8552 #: build/C/man3/pthread_setschedparam.3:314
8553 #, no-wrap
8554 msgid ""
8555 "int\n"
8556 "main(int argc, char *argv[])\n"
8557 "{\n"
8558 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8559 "    pthread_t thread;\n"
8560 "    pthread_attr_t attr;\n"
8561 "    pthread_attr_t *attrp;\n"
8562 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8563 "    struct sched_param param;\n"
8564 msgstr ""
8565 "int\n"
8566 "main(int argc, char *argv[])\n"
8567 "{\n"
8568 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8569 "    pthread_t thread;\n"
8570 "    pthread_attr_t attr;\n"
8571 "    pthread_attr_t *attrp;\n"
8572 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8573 "    struct sched_param param;\n"
8574
8575 #. type: Plain text
8576 #: build/C/man3/pthread_setschedparam.3:316
8577 #, no-wrap
8578 msgid "    /* Process command-line options */\n"
8579 msgstr "    /* Process command-line options */\n"
8580
8581 #. type: Plain text
8582 #: build/C/man3/pthread_setschedparam.3:321
8583 #, no-wrap
8584 msgid ""
8585 "    use_null_attrib = 0;\n"
8586 "    attr_sched_str = NULL;\n"
8587 "    main_sched_str = NULL;\n"
8588 "    inheritsched_str = NULL;\n"
8589 msgstr ""
8590 "    use_null_attrib = 0;\n"
8591 "    attr_sched_str = NULL;\n"
8592 "    main_sched_str = NULL;\n"
8593 "    inheritsched_str = NULL;\n"
8594
8595 #. type: Plain text
8596 #: build/C/man3/pthread_setschedparam.3:331
8597 #, no-wrap
8598 msgid ""
8599 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8600 "        switch (opt) {\n"
8601 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8602 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8603 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8604 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8605 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8606 "        }\n"
8607 "    }\n"
8608 msgstr ""
8609 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8610 "        switch (opt) {\n"
8611 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8612 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8613 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8614 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8615 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8616 "        }\n"
8617 "    }\n"
8618
8619 #. type: Plain text
8620 #: build/C/man3/pthread_setschedparam.3:335
8621 #, no-wrap
8622 msgid ""
8623 "    if (use_null_attrib &&\n"
8624 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8625 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8626 msgstr ""
8627 "    if (use_null_attrib &&\n"
8628 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8629 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8630
8631 #. type: Plain text
8632 #: build/C/man3/pthread_setschedparam.3:338
8633 #, no-wrap
8634 msgid ""
8635 "    /* Optionally set scheduling attributes of main thread,\n"
8636 "       and display the attributes */\n"
8637 msgstr ""
8638 "    /* Optionally set scheduling attributes of main thread,\n"
8639 "       and display the attributes */\n"
8640
8641 #. type: Plain text
8642 #: build/C/man3/pthread_setschedparam.3:343
8643 #, no-wrap
8644 msgid ""
8645 "    if (main_sched_str != NULL) {\n"
8646 "        if (!get_policy(main_sched_str[0], &policy))\n"
8647 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8648 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8649 msgstr ""
8650 "    if (main_sched_str != NULL) {\n"
8651 "        if (!get_policy(main_sched_str[0], &policy))\n"
8652 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8653 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8654
8655 #. type: Plain text
8656 #: build/C/man3/pthread_setschedparam.3:348
8657 #, no-wrap
8658 msgid ""
8659 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8660 "        if (s != 0)\n"
8661 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8662 "    }\n"
8663 msgstr ""
8664 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8665 "        if (s != 0)\n"
8666 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8667 "    }\n"
8668
8669 #. type: Plain text
8670 #: build/C/man3/pthread_setschedparam.3:351
8671 #, no-wrap
8672 msgid ""
8673 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8674 "    printf(\"\\en\");\n"
8675 msgstr ""
8676 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8677 "    printf(\"\\en\");\n"
8678
8679 #. type: Plain text
8680 #: build/C/man3/pthread_setschedparam.3:353
8681 #, no-wrap
8682 msgid "    /* Initialize thread attributes object according to options */\n"
8683 msgstr "    /* Initialize thread attributes object according to options */\n"
8684
8685 #. type: Plain text
8686 #: build/C/man3/pthread_setschedparam.3:362
8687 #, no-wrap
8688 msgid ""
8689 "    if (!use_null_attrib) {\n"
8690 "        s = pthread_attr_init(&attr);\n"
8691 "        if (s != 0)\n"
8692 "            handle_error_en(s, \"pthread_attr_init\");\n"
8693 "        attrp = &attr;\n"
8694 "    }\n"
8695 msgstr ""
8696 "    if (!use_null_attrib) {\n"
8697 "        s = pthread_attr_init(&attr);\n"
8698 "        if (s != 0)\n"
8699 "            handle_error_en(s, \"pthread_attr_init\");\n"
8700 "        attrp = &attr;\n"
8701 "    }\n"
8702
8703 #. type: Plain text
8704 #: build/C/man3/pthread_setschedparam.3:370
8705 #, no-wrap
8706 msgid ""
8707 "    if (inheritsched_str != NULL) {\n"
8708 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8709 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8710 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8711 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8712 "        else\n"
8713 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8714 msgstr ""
8715 "    if (inheritsched_str != NULL) {\n"
8716 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8717 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8718 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8719 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8720 "        else\n"
8721 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8722
8723 #. type: Plain text
8724 #: build/C/man3/pthread_setschedparam.3:375
8725 #, no-wrap
8726 msgid ""
8727 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8728 "        if (s != 0)\n"
8729 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8730 "    }\n"
8731 msgstr ""
8732 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8733 "        if (s != 0)\n"
8734 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8735 "    }\n"
8736
8737 #. type: Plain text
8738 #: build/C/man3/pthread_setschedparam.3:381
8739 #, no-wrap
8740 msgid ""
8741 "    if (attr_sched_str != NULL) {\n"
8742 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8743 "            usage(argv[0],\n"
8744 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8745 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8746 msgstr ""
8747 "    if (attr_sched_str != NULL) {\n"
8748 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8749 "            usage(argv[0],\n"
8750 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8751 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8752
8753 #. type: Plain text
8754 #: build/C/man3/pthread_setschedparam.3:389
8755 #, no-wrap
8756 msgid ""
8757 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8758 "        if (s != 0)\n"
8759 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8760 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8761 "        if (s != 0)\n"
8762 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8763 "    }\n"
8764 msgstr ""
8765 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8766 "        if (s != 0)\n"
8767 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8768 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8769 "        if (s != 0)\n"
8770 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8771 "    }\n"
8772
8773 #. type: Plain text
8774 #: build/C/man3/pthread_setschedparam.3:392
8775 #, no-wrap
8776 msgid ""
8777 "    /* If we initialized a thread attributes object, display\n"
8778 "       the scheduling attributes that were set in the object */\n"
8779 msgstr ""
8780 "    /* If we initialized a thread attributes object, display\n"
8781 "       the scheduling attributes that were set in the object */\n"
8782
8783 #. type: Plain text
8784 #: build/C/man3/pthread_setschedparam.3:400
8785 #, no-wrap
8786 msgid ""
8787 "    if (attrp != NULL) {\n"
8788 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8789 "        if (s != 0)\n"
8790 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8791 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8792 "        if (s != 0)\n"
8793 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8794 msgstr ""
8795 "    if (attrp != NULL) {\n"
8796 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8797 "        if (s != 0)\n"
8798 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8799 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8800 "        if (s != 0)\n"
8801 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8802
8803 #. type: Plain text
8804 #: build/C/man3/pthread_setschedparam.3:403
8805 #, no-wrap
8806 msgid ""
8807 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8808 "        display_sched_attr(policy, &param);\n"
8809 msgstr ""
8810 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8811 "        display_sched_attr(policy, &param);\n"
8812
8813 #. type: Plain text
8814 #: build/C/man3/pthread_setschedparam.3:411
8815 #, no-wrap
8816 msgid ""
8817 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8818 "        printf(\"    inheritsched is %s\\en\",\n"
8819 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8820 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8821 "                \"???\");\n"
8822 "        printf(\"\\en\");\n"
8823 "    }\n"
8824 msgstr ""
8825 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8826 "        printf(\"    inheritsched is %s\\en\",\n"
8827 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8828 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8829 "                \"???\");\n"
8830 "        printf(\"\\en\");\n"
8831 "    }\n"
8832
8833 #. type: Plain text
8834 #: build/C/man3/pthread_setschedparam.3:413
8835 #, no-wrap
8836 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8837 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8838
8839 #. type: Plain text
8840 #: build/C/man3/pthread_setschedparam.3:417
8841 #, no-wrap
8842 msgid ""
8843 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8844 "    if (s != 0)\n"
8845 "        handle_error_en(s, \"pthread_create\");\n"
8846 msgstr ""
8847 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8848 "    if (s != 0)\n"
8849 "        handle_error_en(s, \"pthread_create\");\n"
8850
8851 #. type: Plain text
8852 #: build/C/man3/pthread_setschedparam.3:419
8853 #, no-wrap
8854 msgid "    /* Destroy unneeded thread attributes object */\n"
8855 msgstr "    /* Destroy unneeded thread attributes object */\n"
8856
8857 #. type: Plain text
8858 #: build/C/man3/pthread_setschedparam.3:427
8859 #, no-wrap
8860 msgid ""
8861 "    s = pthread_join(thread, NULL);\n"
8862 "    if (s != 0)\n"
8863 "        handle_error_en(s, \"pthread_join\");\n"
8864 msgstr ""
8865 "    s = pthread_join(thread, NULL);\n"
8866 "    if (s != 0)\n"
8867 "        handle_error_en(s, \"pthread_join\");\n"
8868
8869 #. type: Plain text
8870 #: build/C/man3/pthread_setschedparam.3:445
8871 msgid ""
8872 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8873 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8874 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8875 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8876 "B<pthreads>(7)"
8877 msgstr ""
8878 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8879 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8880 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8881 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8882 "B<pthreads>(7)"
8883
8884 #. type: TH
8885 #: build/C/man3/pthread_setschedprio.3:26
8886 #, no-wrap
8887 msgid "PTHREAD_SETSCHEDPRIO"
8888 msgstr "PTHREAD_SETSCHEDPRIO"
8889
8890 #. type: TH
8891 #: build/C/man3/pthread_setschedprio.3:26
8892 #, no-wrap
8893 msgid "2008-11-06"
8894 msgstr "2008-11-06"
8895
8896 #. type: Plain text
8897 #: build/C/man3/pthread_setschedprio.3:29
8898 msgid "pthread_setschedprio - set scheduling priority of a thread"
8899 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8900
8901 #. type: Plain text
8902 #: build/C/man3/pthread_setschedprio.3:34
8903 #, no-wrap
8904 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8905 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8906
8907 #.  FIXME . nptl/pthread_setschedprio.c has the following
8908 #.    /* If the thread should have higher priority because of some
8909 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8910 #.  Eventually (perhaps after writing the mutexattr pages), we
8911 #.  may want to add something on the topic to this page.
8912 #.  nptl/pthread_setschedparam.c has a similar case.
8913 #. type: Plain text
8914 #: build/C/man3/pthread_setschedprio.3:53
8915 msgid ""
8916 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8917 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8918 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8919 "of a thread.)"
8920 msgstr ""
8921 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8922 "優先度に I<prio> で指定された値を設定する\n"
8923 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8924 "と優先度の両方を変更する)。"
8925
8926 #. type: Plain text
8927 #: build/C/man3/pthread_setschedprio.3:61
8928 msgid ""
8929 "On success, this function returns 0; on error, it returns a nonzero error "
8930 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8931 "I<thread> is not changed."
8932 msgstr ""
8933 "成功すると、この関数は 0 を返す。\n"
8934 "エラーの場合、0 以外のエラー番号を返す。\n"
8935 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8936 "スケジューリング優先度は変更されない。"
8937
8938 #. type: Plain text
8939 #: build/C/man3/pthread_setschedprio.3:66
8940 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8941 msgstr ""
8942 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8943
8944 #. type: Plain text
8945 #: build/C/man3/pthread_setschedprio.3:70
8946 msgid ""
8947 "The caller does not have appropriate privileges to set the specified "
8948 "priority."
8949 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8950
8951 #. type: Plain text
8952 #: build/C/man3/pthread_setschedprio.3:81
8953 msgid ""
8954 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8955 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
8956 msgstr ""
8957 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
8958 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
8959 "に設定しようとした\") も追加で規定されている。"
8960
8961 #. type: Plain text
8962 #: build/C/man3/pthread_setschedprio.3:83
8963 msgid "This function is available in glibc since version 2.3.4."
8964 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
8965
8966 #. type: Plain text
8967 #: build/C/man3/pthread_setschedprio.3:91
8968 msgid ""
8969 "For a description of the permissions required to, and the effect of, "
8970 "changing a thread's scheduling priority, and details of the permitted ranges "
8971 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
8972 msgstr ""
8973 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
8974 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8975 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8976
8977 #. type: Plain text
8978 #: build/C/man3/pthread_setschedprio.3:105
8979 msgid ""
8980 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8981 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8982 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8983 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8984 "B<pthreads>(7)"
8985 msgstr ""
8986 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8987 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8988 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8989 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8990 "B<pthreads>(7)"
8991
8992 #. type: TH
8993 #: build/C/man3/pthread_sigmask.3:26
8994 #, no-wrap
8995 msgid "PTHREAD_SIGMASK"
8996 msgstr "PTHREAD_SIGMASK"
8997
8998 #. type: Plain text
8999 #: build/C/man3/pthread_sigmask.3:29
9000 msgid "pthread_sigmask - examine and change mask of blocked signals"
9001 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
9002
9003 #. type: Plain text
9004 #: build/C/man3/pthread_sigmask.3:35
9005 #, no-wrap
9006 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9007 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9008
9009 #. type: Plain text
9010 #: build/C/man3/pthread_sigmask.3:46
9011 msgid ""
9012 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9013 "difference that its use in multithreaded programs is explicitly specified by "
9014 "POSIX.1-2001.  Other differences are noted in this page."
9015 msgstr ""
9016 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9017 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9018 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9019
9020 #. type: Plain text
9021 #: build/C/man3/pthread_sigmask.3:49
9022 msgid ""
9023 "For a description of the arguments and operation of this function, see "
9024 "B<sigprocmask>(2)."
9025 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9026
9027 #. type: Plain text
9028 #: build/C/man3/pthread_sigmask.3:54
9029 msgid ""
9030 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9031 "number."
9032 msgstr ""
9033 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9034 "エラーの場合、エラー番号を返す。"
9035
9036 #. type: Plain text
9037 #: build/C/man3/pthread_sigmask.3:57
9038 msgid "See B<sigprocmask>(2)."
9039 msgstr "B<sigprocmask>(2) を参照。"
9040
9041 #. type: Plain text
9042 #: build/C/man3/pthread_sigmask.3:61
9043 msgid "A new thread inherits a copy of its creator's signal mask."
9044 msgstr ""
9045 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9046 "継承する。"
9047
9048 #. type: Plain text
9049 #: build/C/man3/pthread_sigmask.3:66
9050 msgid ""
9051 "The program below blocks some signals in the main thread, and then creates a "
9052 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9053 "shell session demonstrates its use:"
9054 msgstr ""
9055 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9056 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9057 "専用のスレッドを作成する。\n"
9058 "下記のシェルのセッションはその利用例を示したものである。"
9059
9060 #. type: Plain text
9061 #: build/C/man3/pthread_sigmask.3:77
9062 #, no-wrap
9063 msgid ""
9064 "$B< ./a.out &>\n"
9065 "[1] 5423\n"
9066 "$B< kill -QUIT %1>\n"
9067 "Signal handling thread got signal 3\n"
9068 "$B< kill -USR1 %1>\n"
9069 "Signal handling thread got signal 10\n"
9070 "$B< kill -TERM %1>\n"
9071 "[1]+  Terminated              ./a.out\n"
9072 msgstr ""
9073 "$B< ./a.out &>\n"
9074 "[1] 5423\n"
9075 "$B< kill -QUIT %1>\n"
9076 "Signal handling thread got signal 3\n"
9077 "$B< kill -USR1 %1>\n"
9078 "Signal handling thread got signal 10\n"
9079 "$B< kill -TERM %1>\n"
9080 "[1]+  Terminated              ./a.out\n"
9081
9082 #. type: Plain text
9083 #: build/C/man3/pthread_sigmask.3:88
9084 #, no-wrap
9085 msgid ""
9086 "#include E<lt>pthread.hE<gt>\n"
9087 "#include E<lt>stdio.hE<gt>\n"
9088 "#include E<lt>stdlib.hE<gt>\n"
9089 "#include E<lt>unistd.hE<gt>\n"
9090 "#include E<lt>signal.hE<gt>\n"
9091 "#include E<lt>errno.hE<gt>\n"
9092 msgstr ""
9093 "#include E<lt>pthread.hE<gt>\n"
9094 "#include E<lt>stdio.hE<gt>\n"
9095 "#include E<lt>stdlib.hE<gt>\n"
9096 "#include E<lt>unistd.hE<gt>\n"
9097 "#include E<lt>signal.hE<gt>\n"
9098 "#include E<lt>errno.hE<gt>\n"
9099
9100 #. type: Plain text
9101 #: build/C/man3/pthread_sigmask.3:90
9102 #, no-wrap
9103 msgid "/* Simple error handling functions */\n"
9104 msgstr "/* Simple error handling functions */\n"
9105
9106 #. type: Plain text
9107 #: build/C/man3/pthread_sigmask.3:99
9108 #, no-wrap
9109 msgid ""
9110 "static void *\n"
9111 "sig_thread(void *arg)\n"
9112 "{\n"
9113 "    sigset_t *set = arg;\n"
9114 "    int s, sig;\n"
9115 msgstr ""
9116 "static void *\n"
9117 "sig_thread(void *arg)\n"
9118 "{\n"
9119 "    sigset_t *set = arg;\n"
9120 "    int s, sig;\n"
9121
9122 #. type: Plain text
9123 #: build/C/man3/pthread_sigmask.3:107
9124 #, no-wrap
9125 msgid ""
9126 "    for (;;) {\n"
9127 "        s = sigwait(set, &sig);\n"
9128 "        if (s != 0)\n"
9129 "            handle_error_en(s, \"sigwait\");\n"
9130 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9131 "    }\n"
9132 "}\n"
9133 msgstr ""
9134 "    for (;;) {\n"
9135 "        s = sigwait(set, &sig);\n"
9136 "        if (s != 0)\n"
9137 "            handle_error_en(s, \"sigwait\");\n"
9138 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9139 "    }\n"
9140 "}\n"
9141
9142 #. type: Plain text
9143 #: build/C/man3/pthread_sigmask.3:114
9144 #, no-wrap
9145 msgid ""
9146 "int\n"
9147 "main(int argc, char *argv[])\n"
9148 "{\n"
9149 "    pthread_t thread;\n"
9150 "    sigset_t set;\n"
9151 "    int s;\n"
9152 msgstr ""
9153 "int\n"
9154 "main(int argc, char *argv[])\n"
9155 "{\n"
9156 "    pthread_t thread;\n"
9157 "    sigset_t set;\n"
9158 "    int s;\n"
9159
9160 #. type: Plain text
9161 #: build/C/man3/pthread_sigmask.3:117
9162 #, no-wrap
9163 msgid ""
9164 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9165 "       will inherit a copy of the signal mask. */\n"
9166 msgstr ""
9167 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9168 "       will inherit a copy of the signal mask. */\n"
9169
9170 #. type: Plain text
9171 #: build/C/man3/pthread_sigmask.3:124
9172 #, no-wrap
9173 msgid ""
9174 "    sigemptyset(&set);\n"
9175 "    sigaddset(&set, SIGQUIT);\n"
9176 "    sigaddset(&set, SIGUSR1);\n"
9177 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9178 "    if (s != 0)\n"
9179 "        handle_error_en(s, \"pthread_sigmask\");\n"
9180 msgstr ""
9181 "    sigemptyset(&set);\n"
9182 "    sigaddset(&set, SIGQUIT);\n"
9183 "    sigaddset(&set, SIGUSR1);\n"
9184 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9185 "    if (s != 0)\n"
9186 "        handle_error_en(s, \"pthread_sigmask\");\n"
9187
9188 #. type: Plain text
9189 #: build/C/man3/pthread_sigmask.3:128
9190 #, no-wrap
9191 msgid ""
9192 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9193 "    if (s != 0)\n"
9194 "        handle_error_en(s, \"pthread_create\");\n"
9195 msgstr ""
9196 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9197 "    if (s != 0)\n"
9198 "        handle_error_en(s, \"pthread_create\");\n"
9199
9200 #. type: Plain text
9201 #: build/C/man3/pthread_sigmask.3:131
9202 #, no-wrap
9203 msgid ""
9204 "    /* Main thread carries on to create other threads and/or do\n"
9205 "       other work */\n"
9206 msgstr ""
9207 "    /* Main thread carries on to create other threads and/or do\n"
9208 "       other work */\n"
9209
9210 #. type: Plain text
9211 #: build/C/man3/pthread_sigmask.3:134
9212 #, no-wrap
9213 msgid ""
9214 "    pause();            /* Dummy pause so we can test program */\n"
9215 "}\n"
9216 msgstr ""
9217 "    pause();            /* Dummy pause so we can test program */\n"
9218 "}\n"
9219
9220 #. type: Plain text
9221 #: build/C/man3/pthread_sigmask.3:144
9222 msgid ""
9223 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9224 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9225 msgstr ""
9226 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9227 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9228
9229 #. type: TH
9230 #: build/C/man3/pthread_sigqueue.3:25
9231 #, no-wrap
9232 msgid "PTHREAD_SIGQUEUE"
9233 msgstr "PTHREAD_SIGQUEUE"
9234
9235 #. type: Plain text
9236 #: build/C/man3/pthread_sigqueue.3:28
9237 msgid "pthread_sigqueue - queue a signal and data to a thread"
9238 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9239
9240 #. type: Plain text
9241 #: build/C/man3/pthread_sigqueue.3:34
9242 #, fuzzy, no-wrap
9243 #| msgid ""
9244 #| "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9245 #| "B<                     const union sigval >I<value>B<);>\n"
9246 msgid ""
9247 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9248 "B<                     const union sigval >I<value>B<);>\n"
9249 msgstr ""
9250 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9251 "B<                     const union sigval >I<value>B<);>\n"
9252
9253 #. type: Plain text
9254 #: build/C/man3/pthread_sigqueue.3:45
9255 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9256 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9257
9258 #. type: Plain text
9259 #: build/C/man3/pthread_sigqueue.3:53
9260 msgid ""
9261 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9262 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9263 "thread in the same process as the calling thread."
9264 msgstr ""
9265 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9266 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9267 "同じプロセス内のスレッドにシグナルを送信する。"
9268
9269 #. type: Plain text
9270 #: build/C/man3/pthread_sigqueue.3:65
9271 msgid ""
9272 "The I<thread> argument is the ID of a thread in the same process as the "
9273 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9274 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9275 "details."
9276 msgstr ""
9277 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9278 "I<sig> 引き数は送信するシグナルを指定する。\n"
9279 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9280 "詳細は B<sigqueue>(3) を参照。"
9281
9282 #. type: Plain text
9283 #: build/C/man3/pthread_sigqueue.3:70
9284 msgid ""
9285 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9286 "number."
9287 msgstr ""
9288 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9289 "エラーの場合、エラー番号を返す。"
9290
9291 #. type: Plain text
9292 #: build/C/man3/pthread_sigqueue.3:77
9293 msgid ""
9294 "The limit of signals which may be queued has been reached.  (See B<signal>"
9295 "(7)  for further information.)"
9296 msgstr ""
9297 "キューに入れられるシグナル数が上限に達していた\n"
9298 "(詳しい情報は (B<signal>(7) を参照)。"
9299
9300 #. type: Plain text
9301 #: build/C/man3/pthread_sigqueue.3:81
9302 msgid "I<sig> was invalid."
9303 msgstr "I<sig> が無効であった。"
9304
9305 #. type: TP
9306 #: build/C/man3/pthread_sigqueue.3:81
9307 #, no-wrap
9308 msgid "B<ENOSYS>"
9309 msgstr "B<ENOSYS>"
9310
9311 #. type: Plain text
9312 #: build/C/man3/pthread_sigqueue.3:85
9313 msgid "B<pthread_sigqueue>()  is not supported on this system."
9314 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9315
9316 #. type: Plain text
9317 #: build/C/man3/pthread_sigqueue.3:89
9318 msgid "I<thread> is not valid."
9319 msgstr "I<thread> が無効である。"
9320
9321 #. type: Plain text
9322 #: build/C/man3/pthread_sigqueue.3:93
9323 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9324 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9325
9326 #. type: Plain text
9327 #: build/C/man3/pthread_sigqueue.3:95
9328 msgid "This function is a GNU extension."
9329 msgstr "この関数は GNU による拡張である。"
9330
9331 #. type: Plain text
9332 #: build/C/man3/pthread_sigqueue.3:103
9333 msgid ""
9334 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9335 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9336 msgstr ""
9337 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9338 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9339
9340 #. type: TH
9341 #: build/C/man3/pthread_testcancel.3:26
9342 #, no-wrap
9343 msgid "PTHREAD_TESTCANCEL"
9344 msgstr "PTHREAD_TESTCANCEL"
9345
9346 #. type: TH
9347 #: build/C/man3/pthread_testcancel.3:26
9348 #, no-wrap
9349 msgid "2012-04-14"
9350 msgstr "2012-04-14"
9351
9352 #. type: Plain text
9353 #: build/C/man3/pthread_testcancel.3:29
9354 msgid ""
9355 "pthread_testcancel - request delivery of any pending cancellation request"
9356 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9357
9358 #. type: Plain text
9359 #: build/C/man3/pthread_testcancel.3:34
9360 #, no-wrap
9361 msgid "B<void pthread_testcancel(void);>\n"
9362 msgstr "B<void pthread_testcancel(void);>\n"
9363
9364 #. type: Plain text
9365 #: build/C/man3/pthread_testcancel.3:43
9366 msgid ""
9367 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9368 "calling thread, so that a thread that is otherwise executing code that "
9369 "contains no cancellation points will respond to a cancellation request."
9370 msgstr ""
9371 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9372 "ポイント (cancellation point) が作成される。\n"
9373 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9374 "いるスレッドが取り消し要求に対応することができるようになる。"
9375
9376 #. type: Plain text
9377 #: build/C/man3/pthread_testcancel.3:50
9378 msgid ""
9379 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9380 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9381 "no effect."
9382 msgstr ""
9383 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9384 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9385 "呼び出しても何の影響もない。"
9386
9387 #. type: Plain text
9388 #: build/C/man3/pthread_testcancel.3:54
9389 msgid ""
9390 "This function does not return a value.  If the calling thread is canceled as "
9391 "a consequence of a call to this function, then the function does not return."
9392 msgstr ""
9393 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9394 "キャンセルされた場合、この関数が返ることはない。"
9395
9396 #. type: Plain text
9397 #: build/C/man3/pthread_testcancel.3:63
9398 msgid "See B<pthread_cleanup_push>(3)."
9399 msgstr "B<pthread_cleanup_push>(3) を参照。"
9400
9401 #. type: Plain text
9402 #: build/C/man3/pthread_testcancel.3:68
9403 msgid ""
9404 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9405 "(3), B<pthreads>(7)"
9406 msgstr ""
9407 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9408 "(3), B<pthreads>(7)"
9409
9410 #. type: TH
9411 #: build/C/man3/pthread_tryjoin_np.3:26
9412 #, no-wrap
9413 msgid "PTHREAD_TRYJOIN_NP"
9414 msgstr "PTHREAD_TRYJOIN_NP"
9415
9416 #. type: Plain text
9417 #: build/C/man3/pthread_tryjoin_np.3:30
9418 msgid ""
9419 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9420 "thread"
9421 msgstr ""
9422 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9423 "試みる"
9424
9425 #. type: Plain text
9426 #: build/C/man3/pthread_tryjoin_np.3:36
9427 #, no-wrap
9428 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9429 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9430
9431 #. type: Plain text
9432 #: build/C/man3/pthread_tryjoin_np.3:39
9433 #, no-wrap
9434 msgid ""
9435 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9436 "B<                         const struct timespec *>I<abstime>B<);>\n"
9437 msgstr ""
9438 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9439 "B<                         const struct timespec *>I<abstime>B<);>\n"
9440
9441 #. type: Plain text
9442 #: build/C/man3/pthread_tryjoin_np.3:46
9443 msgid ""
9444 "These functions operate in the same way as B<pthread_join>(3), except for "
9445 "the differences described on this page."
9446 msgstr ""
9447 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9448 "このページで説明する違いがある。"
9449
9450 #. type: Plain text
9451 #: build/C/man3/pthread_tryjoin_np.3:58
9452 msgid ""
9453 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9454 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9455 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9456 "B<pthread_join>(3), the call returns an error."
9457 msgstr ""
9458 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9459 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9460 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9461 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9462
9463 #. type: Plain text
9464 #: build/C/man3/pthread_tryjoin_np.3:76
9465 msgid ""
9466 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9467 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9468 "specified in I<abstime>.  If the timeout expires before I<thread> "
9469 "terminates, the call returns an error.  The I<abstime> argument is a "
9470 "structure of the following form, specifying an absolute time measured since "
9471 "the Epoch (see B<time>(2)):"
9472 msgstr ""
9473 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9474 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9475 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9476 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9477 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9478
9479 #. type: Plain text
9480 #: build/C/man3/pthread_tryjoin_np.3:83
9481 #, no-wrap
9482 msgid ""
9483 "struct timespec {\n"
9484 "    time_t tv_sec;     /* seconds */\n"
9485 "    long   tv_nsec;    /* nanoseconds */\n"
9486 "};\n"
9487 msgstr ""
9488 "struct timespec {\n"
9489 "    time_t tv_sec;     /* seconds */\n"
9490 "    long   tv_nsec;    /* nanoseconds */\n"
9491 "};\n"
9492
9493 #. type: Plain text
9494 #: build/C/man3/pthread_tryjoin_np.3:89
9495 msgid ""
9496 "On success, these functions return 0; on error, they return an error number."
9497 msgstr ""
9498 "成功すると、これらの関数は 0 を返す。\n"
9499 "エラーの場合、エラー番号を返す。"
9500
9501 #. type: Plain text
9502 #: build/C/man3/pthread_tryjoin_np.3:94
9503 msgid ""
9504 "These functions can fail with the same errors as B<pthread_join>(3).  "
9505 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9506 msgstr ""
9507 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9508 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9509
9510 #. type: TP
9511 #: build/C/man3/pthread_tryjoin_np.3:94
9512 #, no-wrap
9513 msgid "B<EBUSY>"
9514 msgstr "B<EBUSY>"
9515
9516 #. type: Plain text
9517 #: build/C/man3/pthread_tryjoin_np.3:98
9518 msgid "I<thread> had not yet terminated at the time of the call."
9519 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9520
9521 #. type: Plain text
9522 #: build/C/man3/pthread_tryjoin_np.3:101
9523 msgid ""
9524 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9525 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9526
9527 #. type: TP
9528 #: build/C/man3/pthread_tryjoin_np.3:101
9529 #, no-wrap
9530 msgid "B<ETIMEDOUT>"
9531 msgstr "B<ETIMEDOUT>"
9532
9533 #. type: Plain text
9534 #: build/C/man3/pthread_tryjoin_np.3:106
9535 msgid "The call timed out before I<thread> terminated."
9536 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9537
9538 #. type: Plain text
9539 #: build/C/man3/pthread_tryjoin_np.3:110
9540 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9541 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9542
9543 #. type: Plain text
9544 #: build/C/man3/pthread_tryjoin_np.3:112
9545 msgid "These functions first appeared in glibc in version 2.3.3."
9546 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9547
9548 #. type: Plain text
9549 #: build/C/man3/pthread_tryjoin_np.3:117
9550 msgid "The following code waits to join for up to 5 seconds:"
9551 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9552
9553 #. type: Plain text
9554 #: build/C/man3/pthread_tryjoin_np.3:121
9555 #, no-wrap
9556 msgid ""
9557 "    struct timespec ts;\n"
9558 "    int s;\n"
9559 msgstr ""
9560 "    struct timespec ts;\n"
9561 "    int s;\n"
9562
9563 #. type: Plain text
9564 #: build/C/man3/pthread_tryjoin_np.3:123
9565 #, no-wrap
9566 msgid "    ...\n"
9567 msgstr "    ...\n"
9568
9569 #. type: Plain text
9570 #: build/C/man3/pthread_tryjoin_np.3:127
9571 #, no-wrap
9572 msgid ""
9573 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9574 "\t/* Handle error */\n"
9575 "    }\n"
9576 msgstr ""
9577 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9578 "\t/* Handle error */\n"
9579 "    }\n"
9580
9581 #. type: Plain text
9582 #: build/C/man3/pthread_tryjoin_np.3:129
9583 #, no-wrap
9584 msgid "    ts.tv_sec += 5;\n"
9585 msgstr "    ts.tv_sec += 5;\n"
9586
9587 #. type: Plain text
9588 #: build/C/man3/pthread_tryjoin_np.3:134
9589 #, no-wrap
9590 msgid ""
9591 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9592 "    if (s != 0) {\n"
9593 "        /* Handle error */\n"
9594 "    }\n"
9595 msgstr ""
9596 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9597 "    if (s != 0) {\n"
9598 "        /* Handle error */\n"
9599 "    }\n"
9600
9601 #. type: Plain text
9602 #: build/C/man3/pthread_tryjoin_np.3:140
9603 msgid ""
9604 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9605 msgstr ""
9606 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9607
9608 #. type: TH
9609 #: build/C/man3/pthread_yield.3:25
9610 #, no-wrap
9611 msgid "PTHREAD_YIELD"
9612 msgstr "PTHREAD_YIELD"
9613
9614 #. type: TH
9615 #: build/C/man3/pthread_yield.3:25
9616 #, no-wrap
9617 msgid "2013-03-05"
9618 msgstr "2013-03-05"
9619
9620 #. type: Plain text
9621 #: build/C/man3/pthread_yield.3:28
9622 msgid "pthread_yield - yield the processor"
9623 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9624
9625 #. type: Plain text
9626 #: build/C/man3/pthread_yield.3:34
9627 #, no-wrap
9628 msgid "B<int pthread_yield(void);>\n"
9629 msgstr "B<int pthread_yield(void);>\n"
9630
9631 #. type: Plain text
9632 #: build/C/man3/pthread_yield.3:44
9633 msgid ""
9634 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9635 "thread is placed at the end of the run queue for its static priority and "
9636 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9637 "(2)"
9638 msgstr ""
9639 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9640 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9641 "別のスレッドが実行されるようにスケジューリングされる。\n"
9642 "詳細は B<sched_yield>(2) を参照。"
9643
9644 #. type: Plain text
9645 #: build/C/man3/pthread_yield.3:49
9646 msgid ""
9647 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9648 "number."
9649 msgstr ""
9650 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9651 "エラーの場合、エラー番号を返す。"
9652
9653 #. type: Plain text
9654 #: build/C/man3/pthread_yield.3:53
9655 msgid ""
9656 "On Linux, this call always succeeds (but portable and future-proof "
9657 "applications should nevertheless handle a possible error return)."
9658 msgstr ""
9659 "Linux では、この関数の呼び出しは常に成功する\n"
9660 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9661 "正のエラーの返り値を処理するようにすべきである)。"
9662
9663 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9664 #. type: Plain text
9665 #: build/C/man3/pthread_yield.3:59
9666 msgid ""
9667 "This call is nonstandard, but present on several other systems.  Use the "
9668 "standardized B<sched_yield>(2)  instead."
9669 msgstr ""
9670 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9671 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9672
9673 #. type: Plain text
9674 #: build/C/man3/pthread_yield.3:62
9675 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9676 msgstr ""
9677 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9678
9679 #. type: Plain text
9680 #: build/C/man3/pthread_yield.3:66
9681 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9682 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9683
9684 #. type: TH
9685 #: build/C/man7/pthreads.7:26
9686 #, no-wrap
9687 msgid "PTHREADS"
9688 msgstr "PTHREADS"
9689
9690 #. type: TH
9691 #: build/C/man7/pthreads.7:26
9692 #, no-wrap
9693 msgid "2010-11-14"
9694 msgstr "2010-11-14"
9695
9696 #. type: Plain text
9697 #: build/C/man7/pthreads.7:29
9698 msgid "pthreads - POSIX threads"
9699 msgstr "pthreads - POSIX スレッド"
9700
9701 #. type: Plain text
9702 #: build/C/man7/pthreads.7:36
9703 msgid ""
9704 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9705 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9706 "can contain multiple threads, all of which are executing the same program.  "
9707 "These threads share the same global memory (data and heap segments), but "
9708 "each thread has its own stack (automatic variables)."
9709 msgstr ""
9710 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9711 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9712 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9713 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9714 "スレッドは自分専用のスタック (自動変数) を持つ。"
9715
9716 #. type: Plain text
9717 #: build/C/man7/pthreads.7:39
9718 msgid ""
9719 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9720 "these attributes are process-wide rather than per-thread):"
9721 msgstr ""
9722 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9723 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9724
9725 #. type: IP
9726 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9727 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9728 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9729 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9730 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9731 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9732 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9733 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9734 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9735 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9736 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9737 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9738 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9739 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9740 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9741 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9742 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9743 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9744 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9745 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9746 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9747 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9748 #: build/C/man7/pthreads.7:835
9749 #, no-wrap
9750 msgid "-"
9751 msgstr "-"
9752
9753 #. type: Plain text
9754 #: build/C/man7/pthreads.7:41
9755 msgid "process ID"
9756 msgstr "プロセス ID"
9757
9758 #. type: Plain text
9759 #: build/C/man7/pthreads.7:43
9760 msgid "parent process ID"
9761 msgstr "親プロセス ID"
9762
9763 #. type: Plain text
9764 #: build/C/man7/pthreads.7:45
9765 msgid "process group ID and session ID"
9766 msgstr "プロセスグループ ID とセッション ID"
9767
9768 #. type: Plain text
9769 #: build/C/man7/pthreads.7:47
9770 msgid "controlling terminal"
9771 msgstr "制御端末"
9772
9773 #. type: Plain text
9774 #: build/C/man7/pthreads.7:49
9775 msgid "user and group IDs"
9776 msgstr "ユーザ ID とグループ ID"
9777
9778 #. type: Plain text
9779 #: build/C/man7/pthreads.7:51
9780 msgid "open file descriptors"
9781 msgstr "オープンするファイルディスクリプタ"
9782
9783 #. type: Plain text
9784 #: build/C/man7/pthreads.7:54
9785 msgid "record locks (see B<fcntl>(2))"
9786 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9787
9788 #. type: Plain text
9789 #: build/C/man7/pthreads.7:56
9790 msgid "signal dispositions"
9791 msgstr "シグナルの配置"
9792
9793 #. type: Plain text
9794 #: build/C/man7/pthreads.7:59
9795 msgid "file mode creation mask (B<umask>(2))"
9796 msgstr "ファイルモード作成マスク (B<umask>(2))"
9797
9798 #. type: Plain text
9799 #: build/C/man7/pthreads.7:65
9800 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9801 msgstr ""
9802 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9803
9804 #. type: Plain text
9805 #: build/C/man7/pthreads.7:70
9806 msgid ""
9807 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9808 msgstr ""
9809 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9810
9811 #. type: Plain text
9812 #: build/C/man7/pthreads.7:73
9813 msgid "nice value (B<setpriority>(2))"
9814 msgstr "nice 値 (B<setpriority>(2))"
9815
9816 #. type: Plain text
9817 #: build/C/man7/pthreads.7:76
9818 msgid "resource limits (B<setrlimit>(2))"
9819 msgstr "リソース制限 (B<setrlimit>(2))"
9820
9821 #. type: Plain text
9822 #: build/C/man7/pthreads.7:81
9823 msgid ""
9824 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9825 "(B<getrusage>(2))"
9826 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9827
9828 #. type: Plain text
9829 #: build/C/man7/pthreads.7:84
9830 msgid ""
9831 "As well as the stack, POSIX.1 specifies that various other attributes are "
9832 "distinct for each thread, including:"
9833 msgstr ""
9834 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9835 "るかを規定している:"
9836
9837 #. type: Plain text
9838 #: build/C/man7/pthreads.7:88
9839 msgid "thread ID (the I<pthread_t> data type)"
9840 msgstr "スレッド ID (B<pthread_t> データ型)"
9841
9842 #. type: Plain text
9843 #: build/C/man7/pthreads.7:91
9844 msgid "signal mask (B<pthread_sigmask>(3))"
9845 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9846
9847 #. type: Plain text
9848 #: build/C/man7/pthreads.7:95
9849 msgid "the I<errno> variable"
9850 msgstr "I<errno> 変数"
9851
9852 #. type: Plain text
9853 #: build/C/man7/pthreads.7:98
9854 msgid "alternate signal stack (B<sigaltstack>(2))"
9855 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9856
9857 #. type: Plain text
9858 #: build/C/man7/pthreads.7:103
9859 msgid ""
9860 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9861 "B<sched_setparam>(2))"
9862 msgstr ""
9863 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9864 "と B<sched_setparam>(2))"
9865
9866 #. type: Plain text
9867 #: build/C/man7/pthreads.7:105
9868 msgid "The following Linux-specific features are also per-thread:"
9869 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9870
9871 #. type: Plain text
9872 #: build/C/man7/pthreads.7:108
9873 msgid "capabilities (see B<capabilities>(7))"
9874 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9875
9876 #. type: Plain text
9877 #: build/C/man7/pthreads.7:111
9878 msgid "CPU affinity (B<sched_setaffinity>(2))"
9879 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9880
9881 #. type: SS
9882 #: build/C/man7/pthreads.7:111
9883 #, no-wrap
9884 msgid "Pthreads function return values"
9885 msgstr "pthreads 関数の返り値"
9886
9887 #. type: Plain text
9888 #: build/C/man7/pthreads.7:118
9889 msgid ""
9890 "Most pthreads functions return 0 on success, and an error number of "
9891 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9892 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9893 "the function can never fail with the error B<EINTR>."
9894 msgstr ""
9895 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9896 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9897 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9898 "は決してないと規定している。"
9899
9900 #. type: SS
9901 #: build/C/man7/pthreads.7:118
9902 #, no-wrap
9903 msgid "Thread IDs"
9904 msgstr "スレッド ID"
9905
9906 #. type: Plain text
9907 #: build/C/man7/pthreads.7:132
9908 msgid ""
9909 "Each of the threads in a process has a unique thread identifier (stored in "
9910 "the type I<pthread_t>).  This identifier is returned to the caller of "
9911 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9912 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
9913 "within a process.  A thread ID may be reused after a terminated thread has "
9914 "been joined, or a detached thread has terminated.  In all pthreads functions "
9915 "that accept a thread ID as an argument, that ID by definition refers to a "
9916 "thread in the same process as the caller."
9917 msgstr ""
9918 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9919 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9920 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9921 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9922 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9923 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9924 "じプロセス内の一つのスレッドを参照する。"
9925
9926 #. type: SS
9927 #: build/C/man7/pthreads.7:132
9928 #, no-wrap
9929 msgid "Thread-safe functions"
9930 msgstr "スレッドセーフな関数"
9931
9932 #. type: Plain text
9933 #: build/C/man7/pthreads.7:136
9934 msgid ""
9935 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9936 "same results regardless of whether it is)  called from multiple threads at "
9937 "the same time."
9938 msgstr ""
9939 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9940 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9941
9942 #. type: Plain text
9943 #: build/C/man7/pthreads.7:140
9944 msgid ""
9945 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9946 "standard shall be thread-safe, except for the following functions:"
9947 msgstr ""
9948 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9949 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9950
9951 #. type: Plain text
9952 #: build/C/man7/pthreads.7:234
9953 #, no-wrap
9954 msgid ""
9955 "asctime()\n"
9956 "basename()\n"
9957 "catgets()\n"
9958 "crypt()\n"
9959 "ctermid() if passed a non-NULL argument\n"
9960 "ctime()\n"
9961 "dbm_clearerr()\n"
9962 "dbm_close()\n"
9963 "dbm_delete()\n"
9964 "dbm_error()\n"
9965 "dbm_fetch()\n"
9966 "dbm_firstkey()\n"
9967 "dbm_nextkey()\n"
9968 "dbm_open()\n"
9969 "dbm_store()\n"
9970 "dirname()\n"
9971 "dlerror()\n"
9972 "drand48()\n"
9973 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9974 "encrypt()\n"
9975 "endgrent()\n"
9976 "endpwent()\n"
9977 "endutxent()\n"
9978 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9979 "ftw()\n"
9980 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9981 "getc_unlocked()\n"
9982 "getchar_unlocked()\n"
9983 "getdate()\n"
9984 "getenv()\n"
9985 "getgrent()\n"
9986 "getgrgid()\n"
9987 "getgrnam()\n"
9988 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9989 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9990 "gethostent()\n"
9991 "getlogin()\n"
9992 "getnetbyaddr()\n"
9993 "getnetbyname()\n"
9994 "getnetent()\n"
9995 "getopt()\n"
9996 "getprotobyname()\n"
9997 "getprotobynumber()\n"
9998 "getprotoent()\n"
9999 "getpwent()\n"
10000 "getpwnam()\n"
10001 "getpwuid()\n"
10002 "getservbyname()\n"
10003 "getservbyport()\n"
10004 "getservent()\n"
10005 "getutxent()\n"
10006 "getutxid()\n"
10007 "getutxline()\n"
10008 "gmtime()\n"
10009 "hcreate()\n"
10010 "hdestroy()\n"
10011 "hsearch()\n"
10012 "inet_ntoa()\n"
10013 "l64a()\n"
10014 "lgamma()\n"
10015 "lgammaf()\n"
10016 "lgammal()\n"
10017 "localeconv()\n"
10018 "localtime()\n"
10019 "lrand48()\n"
10020 "mrand48()\n"
10021 "nftw()\n"
10022 "nl_langinfo()\n"
10023 "ptsname()\n"
10024 "putc_unlocked()\n"
10025 "putchar_unlocked()\n"
10026 "putenv()\n"
10027 "pututxline()\n"
10028 "rand()\n"
10029 "readdir()\n"
10030 "setenv()\n"
10031 "setgrent()\n"
10032 "setkey()\n"
10033 "setpwent()\n"
10034 "setutxent()\n"
10035 "strerror()\n"
10036 "strsignal() [Added in POSIX.1-2008]\n"
10037 "strtok()\n"
10038 "system() [Added in POSIX.1-2008]\n"
10039 "tmpnam() if passed a non-NULL argument\n"
10040 "ttyname()\n"
10041 "unsetenv()\n"
10042 "wcrtomb() if its final argument is NULL\n"
10043 "wcsrtombs() if its final argument is NULL\n"
10044 "wcstombs()\n"
10045 "wctomb()\n"
10046 msgstr ""
10047 "asctime()\n"
10048 "basename()\n"
10049 "catgets()\n"
10050 "crypt()\n"
10051 "ctermid() (NULL でない引き数を渡された場合)\n"
10052 "ctime()\n"
10053 "dbm_clearerr()\n"
10054 "dbm_close()\n"
10055 "dbm_delete()\n"
10056 "dbm_error()\n"
10057 "dbm_fetch()\n"
10058 "dbm_firstkey()\n"
10059 "dbm_nextkey()\n"
10060 "dbm_open()\n"
10061 "dbm_store()\n"
10062 "dirname()\n"
10063 "dlerror()\n"
10064 "drand48()\n"
10065 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10066 "encrypt()\n"
10067 "endgrent()\n"
10068 "endpwent()\n"
10069 "endutxent()\n"
10070 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10071 "ftw()\n"
10072 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10073 "getc_unlocked()\n"
10074 "getchar_unlocked()\n"
10075 "getdate()\n"
10076 "getenv()\n"
10077 "getgrent()\n"
10078 "getgrgid()\n"
10079 "getgrnam()\n"
10080 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10081 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10082 "gethostent()\n"
10083 "getlogin()\n"
10084 "getnetbyaddr()\n"
10085 "getnetbyname()\n"
10086 "getnetent()\n"
10087 "getopt()\n"
10088 "getprotobyname()\n"
10089 "getprotobynumber()\n"
10090 "getprotoent()\n"
10091 "getpwent()\n"
10092 "getpwnam()\n"
10093 "getpwuid()\n"
10094 "getservbyname()\n"
10095 "getservbyport()\n"
10096 "getservent()\n"
10097 "getutxent()\n"
10098 "getutxid()\n"
10099 "getutxline()\n"
10100 "gmtime()\n"
10101 "hcreate()\n"
10102 "hdestroy()\n"
10103 "hsearch()\n"
10104 "inet_ntoa()\n"
10105 "l64a()\n"
10106 "lgamma()\n"
10107 "lgammaf()\n"
10108 "lgammal()\n"
10109 "localeconv()\n"
10110 "localtime()\n"
10111 "lrand48()\n"
10112 "mrand48()\n"
10113 "nftw()\n"
10114 "nl_langinfo()\n"
10115 "ptsname()\n"
10116 "putc_unlocked()\n"
10117 "putchar_unlocked()\n"
10118 "putenv()\n"
10119 "pututxline()\n"
10120 "rand()\n"
10121 "readdir()\n"
10122 "setenv()\n"
10123 "setgrent()\n"
10124 "setkey()\n"
10125 "setpwent()\n"
10126 "setutxent()\n"
10127 "strerror()\n"
10128 "strsignal() [POSIX.1-2008 で追加された]\n"
10129 "strtok()\n"
10130 "system() [POSIX.1-2008 で追加された]\n"
10131 "tmpnam() (NULL でない引き数を渡された場合)\n"
10132 "ttyname()\n"
10133 "unsetenv()\n"
10134 "wcrtomb() (最後の引き数が NULL の場合)\n"
10135 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10136 "wcstombs()\n"
10137 "wctomb()\n"
10138
10139 #. type: SS
10140 #: build/C/man7/pthreads.7:236
10141 #, no-wrap
10142 msgid "Async-cancel-safe functions"
10143 msgstr "async-cancel-safe 関数"
10144
10145 #. type: Plain text
10146 #: build/C/man7/pthreads.7:240
10147 msgid ""
10148 "An async-cancel-safe function is one that can be safely called in an "
10149 "application where asynchronous cancelability is enabled (see "
10150 "B<pthread_setcancelstate>(3))."
10151 msgstr ""
10152 "async-cancel-safe 関数は、\n"
10153 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10154 "安全に呼び出すことができる関数のことである\n"
10155 "(B<pthread_setcancelstate>(3) を参照)。"
10156
10157 #. type: Plain text
10158 #: build/C/man7/pthreads.7:243
10159 msgid ""
10160 "Only the following functions are required to be async-cancel-safe by "
10161 "POSIX.1-2001 and POSIX.1-2008:"
10162 msgstr ""
10163 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10164 "なければならないとされている。"
10165
10166 #. type: Plain text
10167 #: build/C/man7/pthreads.7:249
10168 #, no-wrap
10169 msgid ""
10170 "pthread_cancel()\n"
10171 "pthread_setcancelstate()\n"
10172 "pthread_setcanceltype()\n"
10173 msgstr ""
10174 "pthread_cancel()\n"
10175 "pthread_setcancelstate()\n"
10176 "pthread_setcanceltype()\n"
10177
10178 #. type: SS
10179 #: build/C/man7/pthreads.7:251
10180 #, no-wrap
10181 msgid "Cancellation points"
10182 msgstr "取り消しポイント (cancellation points)"
10183
10184 #. type: Plain text
10185 #: build/C/man7/pthreads.7:258
10186 msgid ""
10187 "POSIX.1 specifies that certain functions must, and certain other functions "
10188 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10189 "type is deferred, and a cancellation request is pending for the thread, then "
10190 "the thread is canceled when it calls a function that is a cancellation point."
10191 msgstr ""
10192 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10193 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10194 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10195 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10196 "時点で、そのスレッドのキャンセルが 行われる。"
10197
10198 #. type: Plain text
10199 #: build/C/man7/pthreads.7:261
10200 msgid ""
10201 "The following functions are required to be cancellation points by "
10202 "POSIX.1-2001 and/or POSIX.1-2008:"
10203 msgstr ""
10204 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10205 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10206
10207 #. type: Plain text
10208 #: build/C/man7/pthreads.7:324
10209 #, no-wrap
10210 msgid ""
10211 "accept()\n"
10212 "aio_suspend()\n"
10213 "clock_nanosleep()\n"
10214 "close()\n"
10215 "connect()\n"
10216 "creat()\n"
10217 "fcntl() F_SETLKW\n"
10218 "fdatasync()\n"
10219 "fsync()\n"
10220 "getmsg()\n"
10221 "getpmsg()\n"
10222 "lockf() F_LOCK\n"
10223 "mq_receive()\n"
10224 "mq_send()\n"
10225 "mq_timedreceive()\n"
10226 "mq_timedsend()\n"
10227 "msgrcv()\n"
10228 "msgsnd()\n"
10229 "msync()\n"
10230 "nanosleep()\n"
10231 "open()\n"
10232 "openat() [Added in POSIX.1-2008]\n"
10233 "pause()\n"
10234 "poll()\n"
10235 "pread()\n"
10236 "pselect()\n"
10237 "pthread_cond_timedwait()\n"
10238 "pthread_cond_wait()\n"
10239 "pthread_join()\n"
10240 "pthread_testcancel()\n"
10241 "putmsg()\n"
10242 "putpmsg()\n"
10243 "pwrite()\n"
10244 "read()\n"
10245 "readv()\n"
10246 "recv()\n"
10247 "recvfrom()\n"
10248 "recvmsg()\n"
10249 "select()\n"
10250 "sem_timedwait()\n"
10251 "sem_wait()\n"
10252 "send()\n"
10253 "sendmsg()\n"
10254 "sendto()\n"
10255 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10256 "sigsuspend()\n"
10257 "sigtimedwait()\n"
10258 "sigwait()\n"
10259 "sigwaitinfo()\n"
10260 "sleep()\n"
10261 "system()\n"
10262 "tcdrain()\n"
10263 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10264 "wait()\n"
10265 "waitid()\n"
10266 "waitpid()\n"
10267 "write()\n"
10268 "writev()\n"
10269 msgstr ""
10270 "accept()\n"
10271 "aio_suspend()\n"
10272 "clock_nanosleep()\n"
10273 "close()\n"
10274 "connect()\n"
10275 "creat()\n"
10276 "fcntl() F_SETLKW\n"
10277 "fdatasync()\n"
10278 "fsync()\n"
10279 "getmsg()\n"
10280 "getpmsg()\n"
10281 "lockf() F_LOCK\n"
10282 "mq_receive()\n"
10283 "mq_send()\n"
10284 "mq_timedreceive()\n"
10285 "mq_timedsend()\n"
10286 "msgrcv()\n"
10287 "msgsnd()\n"
10288 "msync()\n"
10289 "nanosleep()\n"
10290 "open()\n"
10291 "openat() [POSIX.1-2008 で追加された]\n"
10292 "pause()\n"
10293 "poll()\n"
10294 "pread()\n"
10295 "pselect()\n"
10296 "pthread_cond_timedwait()\n"
10297 "pthread_cond_wait()\n"
10298 "pthread_join()\n"
10299 "pthread_testcancel()\n"
10300 "putmsg()\n"
10301 "putpmsg()\n"
10302 "pwrite()\n"
10303 "read()\n"
10304 "readv()\n"
10305 "recv()\n"
10306 "recvfrom()\n"
10307 "recvmsg()\n"
10308 "select()\n"
10309 "sem_timedwait()\n"
10310 "sem_wait()\n"
10311 "send()\n"
10312 "sendmsg()\n"
10313 "sendto()\n"
10314 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10315 "sigsuspend()\n"
10316 "sigtimedwait()\n"
10317 "sigwait()\n"
10318 "sigwaitinfo()\n"
10319 "sleep()\n"
10320 "system()\n"
10321 "tcdrain()\n"
10322 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10323 "wait()\n"
10324 "waitid()\n"
10325 "waitpid()\n"
10326 "write()\n"
10327 "writev()\n"
10328
10329 #. type: Plain text
10330 #: build/C/man7/pthreads.7:329
10331 msgid ""
10332 "The following functions may be cancellation points according to POSIX.1-2001 "
10333 "and/or POSIX.1-2008:"
10334 msgstr ""
10335 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10336 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10337
10338 #. type: Plain text
10339 #: build/C/man7/pthreads.7:557
10340 #, no-wrap
10341 msgid ""
10342 "access()\n"
10343 "asctime()\n"
10344 "asctime_r()\n"
10345 "catclose()\n"
10346 "catgets()\n"
10347 "catopen()\n"
10348 "chmod() [Added in POSIX.1-2008]\n"
10349 "chown() [Added in POSIX.1-2008]\n"
10350 "closedir()\n"
10351 "closelog()\n"
10352 "ctermid()\n"
10353 "ctime()\n"
10354 "ctime_r()\n"
10355 "dbm_close()\n"
10356 "dbm_delete()\n"
10357 "dbm_fetch()\n"
10358 "dbm_nextkey()\n"
10359 "dbm_open()\n"
10360 "dbm_store()\n"
10361 "dlclose()\n"
10362 "dlopen()\n"
10363 "dprintf() [Added in POSIX.1-2008]\n"
10364 "endgrent()\n"
10365 "endhostent()\n"
10366 "endnetent()\n"
10367 "endprotoent()\n"
10368 "endpwent()\n"
10369 "endservent()\n"
10370 "endutxent()\n"
10371 "faccessat() [Added in POSIX.1-2008]\n"
10372 "fchmod() [Added in POSIX.1-2008]\n"
10373 "fchmodat() [Added in POSIX.1-2008]\n"
10374 "fchown() [Added in POSIX.1-2008]\n"
10375 "fchownat() [Added in POSIX.1-2008]\n"
10376 "fclose()\n"
10377 "fcntl() (for any value of cmd argument)\n"
10378 "fflush()\n"
10379 "fgetc()\n"
10380 "fgetpos()\n"
10381 "fgets()\n"
10382 "fgetwc()\n"
10383 "fgetws()\n"
10384 "fmtmsg()\n"
10385 "fopen()\n"
10386 "fpathconf()\n"
10387 "fprintf()\n"
10388 "fputc()\n"
10389 "fputs()\n"
10390 "fputwc()\n"
10391 "fputws()\n"
10392 "fread()\n"
10393 "freopen()\n"
10394 "fscanf()\n"
10395 "fseek()\n"
10396 "fseeko()\n"
10397 "fsetpos()\n"
10398 "fstat()\n"
10399 "fstatat() [Added in POSIX.1-2008]\n"
10400 "ftell()\n"
10401 "ftello()\n"
10402 "ftw()\n"
10403 "futimens() [Added in POSIX.1-2008]\n"
10404 "fwprintf()\n"
10405 "fwrite()\n"
10406 "fwscanf()\n"
10407 "getaddrinfo()\n"
10408 "getc()\n"
10409 "getc_unlocked()\n"
10410 "getchar()\n"
10411 "getchar_unlocked()\n"
10412 "getcwd()\n"
10413 "getdate()\n"
10414 "getdelim() [Added in POSIX.1-2008]\n"
10415 "getgrent()\n"
10416 "getgrgid()\n"
10417 "getgrgid_r()\n"
10418 "getgrnam()\n"
10419 "getgrnam_r()\n"
10420 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10421 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10422 "gethostent()\n"
10423 "gethostid()\n"
10424 "gethostname()\n"
10425 "getline() [Added in POSIX.1-2008]\n"
10426 "getlogin()\n"
10427 "getlogin_r()\n"
10428 "getnameinfo()\n"
10429 "getnetbyaddr()\n"
10430 "getnetbyname()\n"
10431 "getnetent()\n"
10432 "getopt() (if opterr is nonzero)\n"
10433 "getprotobyname()\n"
10434 "getprotobynumber()\n"
10435 "getprotoent()\n"
10436 "getpwent()\n"
10437 "getpwnam()\n"
10438 "getpwnam_r()\n"
10439 "getpwuid()\n"
10440 "getpwuid_r()\n"
10441 "gets()\n"
10442 "getservbyname()\n"
10443 "getservbyport()\n"
10444 "getservent()\n"
10445 "getutxent()\n"
10446 "getutxid()\n"
10447 "getutxline()\n"
10448 "getwc()\n"
10449 "getwchar()\n"
10450 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10451 "glob()\n"
10452 "iconv_close()\n"
10453 "iconv_open()\n"
10454 "ioctl()\n"
10455 "link()\n"
10456 "linkat() [Added in POSIX.1-2008]\n"
10457 "lio_listio() [Added in POSIX.1-2008]\n"
10458 "localtime()\n"
10459 "localtime_r()\n"
10460 "lockf() [Added in POSIX.1-2008]\n"
10461 "lseek()\n"
10462 "lstat()\n"
10463 "mkdir() [Added in POSIX.1-2008]\n"
10464 "mkdirat() [Added in POSIX.1-2008]\n"
10465 "mkdtemp() [Added in POSIX.1-2008]\n"
10466 "mkfifo() [Added in POSIX.1-2008]\n"
10467 "mkfifoat() [Added in POSIX.1-2008]\n"
10468 "mknod() [Added in POSIX.1-2008]\n"
10469 "mknodat() [Added in POSIX.1-2008]\n"
10470 "mkstemp()\n"
10471 "mktime()\n"
10472 "nftw()\n"
10473 "opendir()\n"
10474 "openlog()\n"
10475 "pathconf()\n"
10476 "pclose()\n"
10477 "perror()\n"
10478 "popen()\n"
10479 "posix_fadvise()\n"
10480 "posix_fallocate()\n"
10481 "posix_madvise()\n"
10482 "posix_openpt()\n"
10483 "posix_spawn()\n"
10484 "posix_spawnp()\n"
10485 "posix_trace_clear()\n"
10486 "posix_trace_close()\n"
10487 "posix_trace_create()\n"
10488 "posix_trace_create_withlog()\n"
10489 "posix_trace_eventtypelist_getnext_id()\n"
10490 "posix_trace_eventtypelist_rewind()\n"
10491 "posix_trace_flush()\n"
10492 "posix_trace_get_attr()\n"
10493 "posix_trace_get_filter()\n"
10494 "posix_trace_get_status()\n"
10495 "posix_trace_getnext_event()\n"
10496 "posix_trace_open()\n"
10497 "posix_trace_rewind()\n"
10498 "posix_trace_set_filter()\n"
10499 "posix_trace_shutdown()\n"
10500 "posix_trace_timedgetnext_event()\n"
10501 "posix_typed_mem_open()\n"
10502 "printf()\n"
10503 "psiginfo() [Added in POSIX.1-2008]\n"
10504 "psignal() [Added in POSIX.1-2008]\n"
10505 "pthread_rwlock_rdlock()\n"
10506 "pthread_rwlock_timedrdlock()\n"
10507 "pthread_rwlock_timedwrlock()\n"
10508 "pthread_rwlock_wrlock()\n"
10509 "putc()\n"
10510 "putc_unlocked()\n"
10511 "putchar()\n"
10512 "putchar_unlocked()\n"
10513 "puts()\n"
10514 "pututxline()\n"
10515 "putwc()\n"
10516 "putwchar()\n"
10517 "readdir()\n"
10518 "readdir_r()\n"
10519 "readlink() [Added in POSIX.1-2008]\n"
10520 "readlinkat() [Added in POSIX.1-2008]\n"
10521 "remove()\n"
10522 "rename()\n"
10523 "renameat() [Added in POSIX.1-2008]\n"
10524 "rewind()\n"
10525 "rewinddir()\n"
10526 "scandir() [Added in POSIX.1-2008]\n"
10527 "scanf()\n"
10528 "seekdir()\n"
10529 "semop()\n"
10530 "setgrent()\n"
10531 "sethostent()\n"
10532 "setnetent()\n"
10533 "setprotoent()\n"
10534 "setpwent()\n"
10535 "setservent()\n"
10536 "setutxent()\n"
10537 "sigpause() [Added in POSIX.1-2008]\n"
10538 "stat()\n"
10539 "strerror()\n"
10540 "strerror_r()\n"
10541 "strftime()\n"
10542 "symlink()\n"
10543 "symlinkat() [Added in POSIX.1-2008]\n"
10544 "sync()\n"
10545 "syslog()\n"
10546 "tmpfile()\n"
10547 "tmpnam()\n"
10548 "ttyname()\n"
10549 "ttyname_r()\n"
10550 "tzset()\n"
10551 "ungetc()\n"
10552 "ungetwc()\n"
10553 "unlink()\n"
10554 "unlinkat() [Added in POSIX.1-2008]\n"
10555 "utime() [Added in POSIX.1-2008]\n"
10556 "utimensat() [Added in POSIX.1-2008]\n"
10557 "utimes() [Added in POSIX.1-2008]\n"
10558 "vdprintf() [Added in POSIX.1-2008]\n"
10559 "vfprintf()\n"
10560 "vfwprintf()\n"
10561 "vprintf()\n"
10562 "vwprintf()\n"
10563 "wcsftime()\n"
10564 "wordexp()\n"
10565 "wprintf()\n"
10566 "wscanf()\n"
10567 msgstr ""
10568 "access()\n"
10569 "asctime()\n"
10570 "asctime_r()\n"
10571 "catclose()\n"
10572 "catgets()\n"
10573 "catopen()\n"
10574 "chmod() [POSIX.1-2008 で追加された]\n"
10575 "chown() [POSIX.1-2008 で追加された]\n"
10576 "closedir()\n"
10577 "closelog()\n"
10578 "ctermid()\n"
10579 "ctime()\n"
10580 "ctime_r()\n"
10581 "dbm_close()\n"
10582 "dbm_delete()\n"
10583 "dbm_fetch()\n"
10584 "dbm_nextkey()\n"
10585 "dbm_open()\n"
10586 "dbm_store()\n"
10587 "dlclose()\n"
10588 "dlopen()\n"
10589 "dprintf() [POSIX.1-2008 で追加された]\n"
10590 "endgrent()\n"
10591 "endhostent()\n"
10592 "endnetent()\n"
10593 "endprotoent()\n"
10594 "endpwent()\n"
10595 "endservent()\n"
10596 "endutxent()\n"
10597 "faccessat() [POSIX.1-2008 で追加された]\n"
10598 "fchmod() [POSIX.1-2008 で追加された]\n"
10599 "fchmodat() [POSIX.1-2008 で追加された]\n"
10600 "fchown() [POSIX.1-2008 で追加された]\n"
10601 "fchownat() [POSIX.1-2008 で追加された]\n"
10602 "fclose()\n"
10603 "fcntl() (cmd 引き数が何であっても)\n"
10604 "fflush()\n"
10605 "fgetc()\n"
10606 "fgetpos()\n"
10607 "fgets()\n"
10608 "fgetwc()\n"
10609 "fgetws()\n"
10610 "fmtmsg()\n"
10611 "fopen()\n"
10612 "fpathconf()\n"
10613 "fprintf()\n"
10614 "fputc()\n"
10615 "fputs()\n"
10616 "fputwc()\n"
10617 "fputws()\n"
10618 "fread()\n"
10619 "freopen()\n"
10620 "fscanf()\n"
10621 "fseek()\n"
10622 "fseeko()\n"
10623 "fsetpos()\n"
10624 "fstat()\n"
10625 "fstatat() [POSIX.1-2008 で追加された]\n"
10626 "ftell()\n"
10627 "ftello()\n"
10628 "ftw()\n"
10629 "futimens() [POSIX.1-2008 で追加された]\n"
10630 "fwprintf()\n"
10631 "fwrite()\n"
10632 "fwscanf()\n"
10633 "getaddrinfo()\n"
10634 "getc()\n"
10635 "getc_unlocked()\n"
10636 "getchar()\n"
10637 "getchar_unlocked()\n"
10638 "getcwd()\n"
10639 "getdate()\n"
10640 "getdelim() [POSIX.1-2008 で追加された]\n"
10641 "getgrent()\n"
10642 "getgrgid()\n"
10643 "getgrgid_r()\n"
10644 "getgrnam()\n"
10645 "getgrnam_r()\n"
10646 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10647 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10648 "gethostent()\n"
10649 "gethostid()\n"
10650 "gethostname()\n"
10651 "getline() [POSIX.1-2008 で追加された]\n"
10652 "getlogin()\n"
10653 "getlogin_r()\n"
10654 "getnameinfo()\n"
10655 "getnetbyaddr()\n"
10656 "getnetbyname()\n"
10657 "getnetent()\n"
10658 "getopt() (opterr が 0 以外の場合)\n"
10659 "getprotobyname()\n"
10660 "getprotobynumber()\n"
10661 "getprotoent()\n"
10662 "getpwent()\n"
10663 "getpwnam()\n"
10664 "getpwnam_r()\n"
10665 "getpwuid()\n"
10666 "getpwuid_r()\n"
10667 "gets()\n"
10668 "getservbyname()\n"
10669 "getservbyport()\n"
10670 "getservent()\n"
10671 "getutxent()\n"
10672 "getutxid()\n"
10673 "getutxline()\n"
10674 "getwc()\n"
10675 "getwchar()\n"
10676 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10677 "glob()\n"
10678 "iconv_close()\n"
10679 "iconv_open()\n"
10680 "ioctl()\n"
10681 "link()\n"
10682 "linkat() [POSIX.1-2008 で追加された]\n"
10683 "lio_listio() [POSIX.1-2008 で追加された]\n"
10684 "localtime()\n"
10685 "localtime_r()\n"
10686 "lockf() [POSIX.1-2008 で追加された]\n"
10687 "lseek()\n"
10688 "lstat()\n"
10689 "mkdir() [POSIX.1-2008 で追加された]\n"
10690 "mkdirat() [POSIX.1-2008 で追加された]\n"
10691 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10692 "mkfifo() [POSIX.1-2008 で追加された]\n"
10693 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10694 "mknod() [POSIX.1-2008 で追加された]\n"
10695 "mknodat() [POSIX.1-2008 で追加された]\n"
10696 "mkstemp()\n"
10697 "mktime()\n"
10698 "nftw()\n"
10699 "opendir()\n"
10700 "openlog()\n"
10701 "pathconf()\n"
10702 "pclose()\n"
10703 "perror()\n"
10704 "popen()\n"
10705 "posix_fadvise()\n"
10706 "posix_fallocate()\n"
10707 "posix_madvise()\n"
10708 "posix_openpt()\n"
10709 "posix_spawn()\n"
10710 "posix_spawnp()\n"
10711 "posix_trace_clear()\n"
10712 "posix_trace_close()\n"
10713 "posix_trace_create()\n"
10714 "posix_trace_create_withlog()\n"
10715 "posix_trace_eventtypelist_getnext_id()\n"
10716 "posix_trace_eventtypelist_rewind()\n"
10717 "posix_trace_flush()\n"
10718 "posix_trace_get_attr()\n"
10719 "posix_trace_get_filter()\n"
10720 "posix_trace_get_status()\n"
10721 "posix_trace_getnext_event()\n"
10722 "posix_trace_open()\n"
10723 "posix_trace_rewind()\n"
10724 "posix_trace_set_filter()\n"
10725 "posix_trace_shutdown()\n"
10726 "posix_trace_timedgetnext_event()\n"
10727 "posix_typed_mem_open()\n"
10728 "printf()\n"
10729 "psiginfo() [POSIX.1-2008 で追加された]\n"
10730 "psignal() [POSIX.1-2008 で追加された]\n"
10731 "pthread_rwlock_rdlock()\n"
10732 "pthread_rwlock_timedrdlock()\n"
10733 "pthread_rwlock_timedwrlock()\n"
10734 "pthread_rwlock_wrlock()\n"
10735 "putc()\n"
10736 "putc_unlocked()\n"
10737 "putchar()\n"
10738 "putchar_unlocked()\n"
10739 "puts()\n"
10740 "pututxline()\n"
10741 "putwc()\n"
10742 "putwchar()\n"
10743 "readdir()\n"
10744 "readdir_r()\n"
10745 "readlink() [POSIX.1-2008 で追加された]\n"
10746 "readlinkat() [POSIX.1-2008 で追加された]\n"
10747 "remove()\n"
10748 "rename()\n"
10749 "renameat() [POSIX.1-2008 で追加された]\n"
10750 "rewind()\n"
10751 "rewinddir()\n"
10752 "scandir() [POSIX.1-2008 で追加された]\n"
10753 "scanf()\n"
10754 "seekdir()\n"
10755 "semop()\n"
10756 "setgrent()\n"
10757 "sethostent()\n"
10758 "setnetent()\n"
10759 "setprotoent()\n"
10760 "setpwent()\n"
10761 "setservent()\n"
10762 "setutxent()\n"
10763 "sigpause() [POSIX.1-2008 で追加された]\n"
10764 "stat()\n"
10765 "strerror()\n"
10766 "strerror_r()\n"
10767 "strftime()\n"
10768 "symlink()\n"
10769 "symlinkat() [POSIX.1-2008 で追加された]\n"
10770 "sync()\n"
10771 "syslog()\n"
10772 "tmpfile()\n"
10773 "tmpnam()\n"
10774 "ttyname()\n"
10775 "ttyname_r()\n"
10776 "tzset()\n"
10777 "ungetc()\n"
10778 "ungetwc()\n"
10779 "unlink()\n"
10780 "unlinkat() [POSIX.1-2008 で追加された]\n"
10781 "utime() [POSIX.1-2008 で追加された]\n"
10782 "utimensat() [POSIX.1-2008 で追加された]\n"
10783 "utimes() [POSIX.1-2008 で追加された]\n"
10784 "vdprintf() [POSIX.1-2008 で追加された]\n"
10785 "vfprintf()\n"
10786 "vfwprintf()\n"
10787 "vprintf()\n"
10788 "vwprintf()\n"
10789 "wcsftime()\n"
10790 "wordexp()\n"
10791 "wprintf()\n"
10792 "wscanf()\n"
10793
10794 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10795 #.  files, it looks as though at least the following nonstandard
10796 #.  functions are cancellation points:
10797 #.  endnetgrent
10798 #.  endspent
10799 #.  epoll_pwait
10800 #.  epoll_wait
10801 #.  fcloseall
10802 #.  fdopendir
10803 #.  fflush_unlocked
10804 #.  fgetc_unlocked
10805 #.  fgetgrent
10806 #.  fgetgrent_r
10807 #.  fgetpwent
10808 #.  fgetpwent_r
10809 #.  fgets_unlocked
10810 #.  fgetspent
10811 #.  fgetspent_r
10812 #.  fgetwc_unlocked
10813 #.  fgetws_unlocked
10814 #.  fputc_unlocked
10815 #.  fputs_unlocked
10816 #.  fputwc_unlocked
10817 #.  fputws_unlocked
10818 #.  fread_unlocked
10819 #.  fwrite_unlocked
10820 #.  gai_suspend
10821 #.  getaddrinfo_a
10822 #.  getdate_r
10823 #.  getgrent_r
10824 #.  getgrouplist
10825 #.  gethostbyaddr_r
10826 #.  gethostbyname2
10827 #.  gethostbyname2_r
10828 #.  gethostbyname_r
10829 #.  gethostent_r
10830 #.  getnetbyaddr_r
10831 #.  getnetbyname_r
10832 #.  getnetent_r
10833 #.  getnetgrent
10834 #.  getnetgrent_r
10835 #.  getprotobyname_r
10836 #.  getprotobynumber_r
10837 #.  getprotoent_r
10838 #.  getpw
10839 #.  getpwent_r
10840 #.  getservbyname_r
10841 #.  getservbyport_r
10842 #.  getservent_r
10843 #.  getspent
10844 #.  getspent_r
10845 #.  getspnam
10846 #.  getspnam_r
10847 #.  getutmp
10848 #.  getutmpx
10849 #.  getw
10850 #.  getwc_unlocked
10851 #.  getwchar_unlocked
10852 #.  initgroups
10853 #.  innetgr
10854 #.  mkostemp
10855 #.  mkostemp64
10856 #.  mkstemp64
10857 #.  ppoll
10858 #.  pthread_timedjoin_np
10859 #.  putgrent
10860 #.  putpwent
10861 #.  putspent
10862 #.  putw
10863 #.  putwc_unlocked
10864 #.  putwchar_unlocked
10865 #.  rcmd
10866 #.  rcmd_af
10867 #.  rexec
10868 #.  rexec_af
10869 #.  rresvport
10870 #.  rresvport_af
10871 #.  ruserok
10872 #.  ruserok_af
10873 #.  setnetgrent
10874 #.  setspent
10875 #.  sgetspent
10876 #.  sgetspent_r
10877 #.  updwtmpx
10878 #.  utmpxname
10879 #.  vfscanf
10880 #.  vfwscanf
10881 #.  vscanf
10882 #.  vsyslog
10883 #.  vwscanf
10884 #. type: Plain text
10885 #: build/C/man7/pthreads.7:655
10886 msgid ""
10887 "An implementation may also mark other functions not specified in the "
10888 "standard as cancellation points.  In particular, an implementation is likely "
10889 "to mark any nonstandard function that may block as a cancellation point.  "
10890 "(This includes most functions that can touch files.)"
10891 msgstr ""
10892 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10893 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10894 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10895 "関数がこれに含まれる)。"
10896
10897 #. type: SS
10898 #: build/C/man7/pthreads.7:655
10899 #, no-wrap
10900 msgid "Compiling on Linux"
10901 msgstr "Linux でのコンパイル"
10902
10903 #. type: Plain text
10904 #: build/C/man7/pthreads.7:658
10905 msgid ""
10906 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10907 "pthread>."
10908 msgstr ""
10909 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10910 "きである。"
10911
10912 #. type: SS
10913 #: build/C/man7/pthreads.7:658
10914 #, no-wrap
10915 msgid "Linux implementations of POSIX threads"
10916 msgstr "POSIX スレッドの Linux での実装"
10917
10918 #. type: Plain text
10919 #: build/C/man7/pthreads.7:661
10920 msgid ""
10921 "Over time, two threading implementations have been provided by the GNU C "
10922 "library on Linux:"
10923 msgstr ""
10924 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10925 "た。"
10926
10927 #. type: TP
10928 #: build/C/man7/pthreads.7:661
10929 #, no-wrap
10930 msgid "B<LinuxThreads>"
10931 msgstr "B<LinuxThreads>"
10932
10933 #. type: Plain text
10934 #: build/C/man7/pthreads.7:665
10935 msgid ""
10936 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10937 "implementation is no longer supported."
10938 msgstr ""
10939 "最初の Pthreads の実装。\n"
10940 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10941
10942 #. type: TP
10943 #: build/C/man7/pthreads.7:665
10944 #, no-wrap
10945 msgid "B<NPTL> (Native POSIX Threads Library)"
10946 msgstr "B<NPTL> (Native POSIX Threads Library)"
10947
10948 #. type: Plain text
10949 #: build/C/man7/pthreads.7:673
10950 msgid ""
10951 "This is the modern Pthreads implementation.  By comparison with "
10952 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10953 "POSIX.1 specification and better performance when creating large numbers of "
10954 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10955 "are present in the Linux 2.6 kernel."
10956 msgstr ""
10957 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
10958 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
10959 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
10960 "装されている機能が必要である。"
10961
10962 #. type: Plain text
10963 #: build/C/man7/pthreads.7:683
10964 msgid ""
10965 "Both of these are so-called 1:1 implementations, meaning that each thread "
10966 "maps to a kernel scheduling entity.  Both threading implementations employ "
10967 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
10968 "primitives (mutexes, thread joining, and so on) are implemented using the "
10969 "Linux B<futex>(2)  system call."
10970 msgstr ""
10971 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
10972 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
10973 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
10974 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
10975 "使って実装されている。"
10976
10977 #. type: SS
10978 #: build/C/man7/pthreads.7:683
10979 #, no-wrap
10980 msgid "LinuxThreads"
10981 msgstr "LinuxThreads"
10982
10983 #. type: Plain text
10984 #: build/C/man7/pthreads.7:685
10985 msgid "The notable features of this implementation are the following:"
10986 msgstr "この実装の大きな特徴は以下の通りである:"
10987
10988 #. type: Plain text
10989 #: build/C/man7/pthreads.7:692
10990 msgid ""
10991 "In addition to the main (initial) thread, and the threads that the program "
10992 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
10993 "thread.  This thread handles thread creation and termination.  (Problems can "
10994 "result if this thread is inadvertently killed.)"
10995 msgstr ""
10996 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
10997 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
10998 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
10999 "kill されると、問題が起こることがある)。"
11000
11001 #. type: Plain text
11002 #: build/C/man7/pthreads.7:704
11003 msgid ""
11004 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
11005 "the first three real-time signals are used (see also B<signal>(7)).  On "
11006 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
11007 "avoid the use of whichever set of signals is employed by the implementation."
11008 msgstr ""
11009 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11010 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11011 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11012 "用されているシグナルを どれも使わないようにしなければならない。"
11013
11014 #. type: Plain text
11015 #: build/C/man7/pthreads.7:711
11016 msgid ""
11017 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11018 "implemented as processes which share more information than usual, but which "
11019 "do not share a common process ID.)  LinuxThreads threads (including the "
11020 "manager thread)  are visible as separate processes using B<ps>(1)."
11021 msgstr ""
11022 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11023 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11024 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11025 "を使うと別のプロセスのように見える。"
11026
11027 #. type: Plain text
11028 #: build/C/man7/pthreads.7:714
11029 msgid ""
11030 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11031 "number of ways, including the following:"
11032 msgstr ""
11033 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11034 "示すような点がある:"
11035
11036 #. type: Plain text
11037 #: build/C/man7/pthreads.7:718
11038 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11039 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11040
11041 #. type: Plain text
11042 #: build/C/man7/pthreads.7:727
11043 msgid ""
11044 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11045 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11046 "should return the same value as B<getppid>(2)  in the main thread."
11047 msgstr ""
11048 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11049 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11050 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11051
11052 #. type: Plain text
11053 #: build/C/man7/pthreads.7:737
11054 msgid ""
11055 "When one thread creates a new child process using B<fork>(2), any thread "
11056 "should be able to B<wait>(2)  on the child.  However, the implementation "
11057 "only allows the thread that created the child to B<wait>(2)  on it."
11058 msgstr ""
11059 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11060 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11061 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11062 "る。"
11063
11064 #. type: Plain text
11065 #: build/C/man7/pthreads.7:744
11066 msgid ""
11067 "When a thread calls B<execve>(2), all other threads are terminated (as "
11068 "required by POSIX.1).  However, the resulting process has the same PID as "
11069 "the thread that called B<execve>(2): it should have the same PID as the main "
11070 "thread."
11071 msgstr ""
11072 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11073 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11074 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11075 "る。"
11076
11077 #. type: Plain text
11078 #: build/C/man7/pthreads.7:751
11079 msgid ""
11080 "Threads do not share user and group IDs.  This can cause complications with "
11081 "set-user-ID programs and can cause failures in Pthreads functions if an "
11082 "application changes its credentials using B<seteuid>(2)  or similar."
11083 msgstr ""
11084 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11085 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11086 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11087
11088 #. type: Plain text
11089 #: build/C/man7/pthreads.7:753
11090 msgid "Threads do not share a common session ID and process group ID."
11091 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11092
11093 #. type: Plain text
11094 #: build/C/man7/pthreads.7:756
11095 msgid "Threads do not share record locks created using B<fcntl>(2)."
11096 msgstr ""
11097 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11098
11099 #. type: Plain text
11100 #: build/C/man7/pthreads.7:762
11101 msgid ""
11102 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11103 "rather than process-wide."
11104 msgstr ""
11105 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11106 "単位の情報である。"
11107
11108 #. type: Plain text
11109 #: build/C/man7/pthreads.7:765
11110 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11111 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11112
11113 #. type: Plain text
11114 #: build/C/man7/pthreads.7:767
11115 msgid "Threads do not share interval timers."
11116 msgstr "スレッド間でインターバル・タイマを共有しない。"
11117
11118 #.  FIXME . bug report filed for NPTL nice nonconformance
11119 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11120 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11121 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11122 #.  Monitor this to see if it makes it into mainline.
11123 #. type: Plain text
11124 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11125 msgid "Threads do not share a common nice value."
11126 msgstr "スレッドは共通の nice 値を共有しない。"
11127
11128 #. type: Plain text
11129 #: build/C/man7/pthreads.7:779
11130 msgid ""
11131 "POSIX.1 distinguishes the notions of signals that are directed to the "
11132 "process as a whole and signals that are directed to individual threads.  "
11133 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11134 "example) should be handled by a single, arbitrarily selected thread within "
11135 "the process.  LinuxThreads does not support the notion of process-directed "
11136 "signals: signals may be sent only to specific threads."
11137 msgstr ""
11138 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11139 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11140 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11141 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11142 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11143 "ルは特定のスレッドにだけ送ることができる。"
11144
11145 #. type: Plain text
11146 #: build/C/man7/pthreads.7:788
11147 msgid ""
11148 "Threads have distinct alternate signal stack settings.  However, a new "
11149 "thread's alternate signal stack settings are copied from the thread that "
11150 "created it, so that the threads initially share an alternate signal stack.  "
11151 "(A new thread should start with no alternate signal stack defined.  If two "
11152 "threads handle signals on their shared alternate signal stack at the same "
11153 "time, unpredictable program failures are likely to occur.)"
11154 msgstr ""
11155 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11156 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11157 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11158 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11159 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11160 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11161
11162 #. type: SS
11163 #: build/C/man7/pthreads.7:788
11164 #, no-wrap
11165 msgid "NPTL"
11166 msgstr "NPTL"
11167
11168 #. type: Plain text
11169 #: build/C/man7/pthreads.7:797
11170 msgid ""
11171 "With NPTL, all of the threads in a process are placed in the same thread "
11172 "group; all members of a thread group share the same PID.  NPTL does not "
11173 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11174 "signals (see also B<signal>(7)); these signals cannot be used in "
11175 "applications."
11176 msgstr ""
11177 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11178 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11179 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11180 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11181 "ションでは使用できない。"
11182
11183 #. type: Plain text
11184 #: build/C/man7/pthreads.7:799
11185 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11186 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11187
11188 #. type: Plain text
11189 #: build/C/man7/pthreads.7:808
11190 msgid "Some NPTL nonconformances occur only with older kernels:"
11191 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11192
11193 #. type: Plain text
11194 #: build/C/man7/pthreads.7:814
11195 msgid ""
11196 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11197 "rather than process-wide (fixed in kernel 2.6.9)."
11198 msgstr ""
11199 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11200 "単位の情報である (カーネル 2.6.9 で修正された)。"
11201
11202 #. type: Plain text
11203 #: build/C/man7/pthreads.7:816
11204 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11205 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11206
11207 #. type: Plain text
11208 #: build/C/man7/pthreads.7:818
11209 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11210 msgstr ""
11211 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11212
11213 #. type: Plain text
11214 #: build/C/man7/pthreads.7:822
11215 msgid ""
11216 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11217 "(fixed in kernel 2.6.16)."
11218 msgstr ""
11219 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11220 "きる (カーネル 2.6.16 で修正された)。"
11221
11222 #. type: Plain text
11223 #: build/C/man7/pthreads.7:827
11224 msgid ""
11225 "Only the main thread is permitted to make the process into a process group "
11226 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11227 msgstr ""
11228 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11229 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11230
11231 #. type: Plain text
11232 #: build/C/man7/pthreads.7:833
11233 msgid ""
11234 "Threads have distinct alternate signal stack settings.  However, a new "
11235 "thread's alternate signal stack settings are copied from the thread that "
11236 "created it, so that the threads initially share an alternate signal stack "
11237 "(fixed in kernel 2.6.16)."
11238 msgstr ""
11239 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11240 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11241 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11242 "ル 2.6.16 で修正された)。"
11243
11244 #. type: Plain text
11245 #: build/C/man7/pthreads.7:835
11246 msgid "Note the following further points about the NPTL implementation:"
11247 msgstr "NPTL の実装では以下の点についても注意すること:"
11248
11249 #. type: Plain text
11250 #: build/C/man7/pthreads.7:849
11251 msgid ""
11252 "If the stack size soft resource limit (see the description of "
11253 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11254 "I<unlimited>, then this value defines the default stack size for new "
11255 "threads.  To be effective, this limit must be set before the program is "
11256 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11257 "stacksize> in the C shell)."
11258 msgstr ""
11259 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11260 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11261 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11262 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11263 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11264 "は I<limit stacksize>)  を使って設定する。"
11265
11266 #. type: SS
11267 #: build/C/man7/pthreads.7:849
11268 #, no-wrap
11269 msgid "Determining the threading implementation"
11270 msgstr "スレッド実装の判定"
11271
11272 #. type: Plain text
11273 #: build/C/man7/pthreads.7:854
11274 msgid ""
11275 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11276 "system's threading implementation, for example:"
11277 msgstr ""
11278 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11279 "装を判定することができる。 以下に例を示す:"
11280
11281 #. type: Plain text
11282 #: build/C/man7/pthreads.7:859
11283 #, no-wrap
11284 msgid ""
11285 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11286 "NPTL 2.3.4\n"
11287 msgstr ""
11288 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11289 "NPTL 2.3.4\n"
11290
11291 #. type: Plain text
11292 #: build/C/man7/pthreads.7:864
11293 msgid ""
11294 "With older glibc versions, a command such as the following should be "
11295 "sufficient to determine the default threading implementation:"
11296 msgstr ""
11297 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11298 "ド実装を判定することができる。"
11299
11300 #. type: Plain text
11301 #: build/C/man7/pthreads.7:870
11302 #, no-wrap
11303 msgid ""
11304 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11305 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11306 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11307 msgstr ""
11308 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11309 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11310 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11311
11312 #. type: SS
11313 #: build/C/man7/pthreads.7:872
11314 #, no-wrap
11315 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11316 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11317
11318 #. type: Plain text
11319 #: build/C/man7/pthreads.7:887
11320 msgid ""
11321 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11322 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11323 "override the dynamic linker's default choice of threading implementation.  "
11324 "This variable tells the dynamic linker to assume that it is running on top "
11325 "of a particular kernel version.  By specifying a kernel version that does "
11326 "not provide the support required by NPTL, we can force the use of "
11327 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11328 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11329 "For example:"
11330 msgstr ""
11331 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11332 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11333 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11334 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11335 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11336 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11337 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11338 "ン を動作させる場合だろう)。 以下に例を示す:"
11339
11340 #. type: Plain text
11341 #: build/C/man7/pthreads.7:893
11342 #, no-wrap
11343 msgid ""
11344 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11345 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11346 "        linuxthreads-0.10 by Xavier Leroy\n"
11347 msgstr ""
11348 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11349 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11350 "        linuxthreads-0.10 by Xavier Leroy\n"
11351
11352 #. type: Plain text
11353 #: build/C/man7/pthreads.7:905
11354 msgid ""
11355 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11356 "(7), B<signal>(7),"
11357 msgstr ""
11358 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11359 "B<signal>(7),"
11360
11361 #. type: Plain text
11362 #: build/C/man7/pthreads.7:929
11363 msgid ""
11364 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11365 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11366 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11367 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11368 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11369 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11370 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11371 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11372 msgstr ""
11373 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11374 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11375 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11376 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11377 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11378 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11379 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11380 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11381 "and B<pthread_testcancel>(3)"