OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[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-08-15 19:32+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 msgid ""
634 "This page is part of release 3.53 of the Linux I<man-pages> project.  A "
635 "description of the project, and information about reporting bugs, can be "
636 "found at \\%http://www.kernel.org/doc/man-pages/."
637 msgstr ""
638 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.53 の一部\n"
639 "である。プロジェクトの説明とバグ報告に関する情報は\n"
640 "http://www.kernel.org/doc/man-pages/ に書かれている。"
641
642 #. type: TH
643 #: build/C/man3/makecontext.3:28
644 #, no-wrap
645 msgid "MAKECONTEXT"
646 msgstr "MAKECONTEXT"
647
648 #. type: TH
649 #: build/C/man3/makecontext.3:28
650 #, no-wrap
651 msgid "2013-02-12"
652 msgstr "2013-02-12"
653
654 #. type: TH
655 #: build/C/man3/makecontext.3:28
656 #, no-wrap
657 msgid "GNU"
658 msgstr "GNU"
659
660 #. type: Plain text
661 #: build/C/man3/makecontext.3:31
662 msgid "makecontext, swapcontext - manipulate user context"
663 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
664
665 #. type: Plain text
666 #: build/C/man3/makecontext.3:36
667 msgid ""
668 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
669 ">I<argc>B<, ...);>"
670 msgstr ""
671 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
672 ">I<argc>B<, ...);>"
673
674 #. type: Plain text
675 #: build/C/man3/makecontext.3:38
676 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
677 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
678
679 #. type: Plain text
680 #: build/C/man3/makecontext.3:49
681 msgid ""
682 "In a System V-like environment, one has the type I<ucontext_t> defined in "
683 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
684 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
685 "level context switching between multiple threads of control within a process."
686 msgstr ""
687 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
688 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
689 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
690 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
691 "ようになっている。"
692
693 #. type: Plain text
694 #: build/C/man3/makecontext.3:52
695 msgid "For the type and the first two functions, see B<getcontext>(3)."
696 msgstr ""
697 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
698
699 #. type: Plain text
700 #: build/C/man3/makecontext.3:64
701 msgid ""
702 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
703 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
704 "B<makecontext>(), the caller must allocate a new stack for this context and "
705 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
706 "and assign its address to I<ucp-E<gt>uc_link>."
707 msgstr ""
708 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
709 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
710 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
711 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
712 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
713 "らない。"
714
715 #. type: Plain text
716 #: build/C/man3/makecontext.3:78
717 msgid ""
718 "When this context is later activated (using B<setcontext>(3)  or "
719 "B<swapcontext>())  the function I<func> is called, and passed the series of "
720 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
721 "number of these arguments in I<argc>.  When this function returns, the "
722 "successor context is activated.  If the successor context pointer is NULL, "
723 "the thread exits."
724 msgstr ""
725 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
726 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
727 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
728 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
729 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
730
731 #. type: Plain text
732 #: build/C/man3/makecontext.3:84
733 msgid ""
734 "The B<swapcontext>()  function saves the current context in the structure "
735 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
736 msgstr ""
737 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
738 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
739
740 #. type: Plain text
741 #: build/C/man3/makecontext.3:96
742 msgid ""
743 "When successful, B<swapcontext>()  does not return.  (But we may return "
744 "later, in case I<oucp> is activated, in which case it looks like "
745 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
746 "sets I<errno> appropriately."
747 msgstr ""
748 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
749 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
750 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
751 "て設定する。"
752
753 #. type: TP
754 #: build/C/man3/makecontext.3:97
755 #: build/C/man3/pthread_attr_setaffinity_np.3:102
756 #: build/C/man3/pthread_getattr_np.3:77
757 #, no-wrap
758 msgid "B<ENOMEM>"
759 msgstr "B<ENOMEM>"
760
761 #. type: Plain text
762 #: build/C/man3/makecontext.3:100
763 msgid "Insufficient stack space left."
764 msgstr "スタックに割り当てる空間が残っていない。"
765
766 #. type: SH
767 #: build/C/man3/makecontext.3:100
768 #: build/C/man3/pthread_attr_setaffinity_np.3:106
769 #: build/C/man3/pthread_attr_setguardsize.3:104
770 #: build/C/man3/pthread_attr_setstack.3:110
771 #: build/C/man3/pthread_attr_setstackaddr.3:81
772 #: build/C/man3/pthread_attr_setstacksize.3:81
773 #: build/C/man3/pthread_getattr_np.3:96
774 #: build/C/man3/pthread_getcpuclockid.3:63
775 #: build/C/man3/pthread_setaffinity_np.3:119
776 #: build/C/man3/pthread_setconcurrency.3:81
777 #: build/C/man3/pthread_setname_np.3:100
778 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
779 #: build/C/man3/pthread_tryjoin_np.3:110
780 #, no-wrap
781 msgid "VERSIONS"
782 msgstr "バージョン"
783
784 #. type: Plain text
785 #: build/C/man3/makecontext.3:105
786 msgid ""
787 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
788 "2.1."
789 msgstr ""
790 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
791 "されている。"
792
793 #. type: Plain text
794 #: build/C/man3/makecontext.3:113
795 msgid ""
796 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
797 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
798 "recommending that applications be rewritten to use POSIX threads instead."
799 msgstr ""
800 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
801 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
802 "POSIX スレッドを使って書き直すことが 推奨されている。"
803
804 #. type: Plain text
805 #: build/C/man3/makecontext.3:121
806 msgid ""
807 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
808 "namely, this struct contains the start and length of a memory area to be "
809 "used as the stack, regardless of the direction of growth of the stack.  "
810 "Thus, it is not necessary for the user program to worry about this direction."
811 msgstr ""
812 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
813 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
814 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
815 "て、ユーザプログラムはこの件については心配しなくてよい。"
816
817 #. type: Plain text
818 #: build/C/man3/makecontext.3:137
819 msgid ""
820 "On architectures where I<int> and pointer types are the same size (e.g., "
821 "x86-32, where both types are 32 bits), you may be able to get away with "
822 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
823 "However, doing this is not guaranteed to be portable, is undefined according "
824 "to the standards, and won't work on architectures where pointers are larger "
825 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
826 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
827 "g., x86-64)."
828 msgstr ""
829 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
830 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
831 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
832 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
833 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
834 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
835 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
836 "できるようになっている。"
837
838 #. type: SH
839 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
840 #: build/C/man3/pthread_attr_setdetachstate.3:108
841 #: build/C/man3/pthread_attr_setguardsize.3:155
842 #: build/C/man3/pthread_attr_setinheritsched.3:128
843 #: build/C/man3/pthread_attr_setschedparam.3:106
844 #: build/C/man3/pthread_attr_setschedpolicy.3:102
845 #: build/C/man3/pthread_attr_setstack.3:153
846 #: build/C/man3/pthread_attr_setstacksize.3:108
847 #: build/C/man3/pthread_cancel.3:135 build/C/man3/pthread_cleanup_push.3:155
848 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
849 #: build/C/man3/pthread_getattr_np.3:101
850 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
851 #: build/C/man3/pthread_setaffinity_np.3:154
852 #: build/C/man3/pthread_setcancelstate.3:174
853 #: build/C/man3/pthread_setname_np.3:112
854 #: build/C/man3/pthread_setschedparam.3:149 build/C/man3/pthread_sigmask.3:61
855 #: build/C/man3/pthread_testcancel.3:60 build/C/man3/pthread_tryjoin_np.3:115
856 #, no-wrap
857 msgid "EXAMPLE"
858 msgstr "例"
859
860 #. type: Plain text
861 #: build/C/man3/makecontext.3:145
862 msgid ""
863 "The example program below demonstrates the use of B<getcontext>(3), "
864 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
865 "following output:"
866 msgstr ""
867 "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), "
868 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
869 "と、以下のような出力が得られる:"
870
871 #. type: Plain text
872 #: build/C/man3/makecontext.3:157
873 #, no-wrap
874 msgid ""
875 "$B< ./a.out>\n"
876 "main: swapcontext(&uctx_main, &uctx_func2)\n"
877 "func2: started\n"
878 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
879 "func1: started\n"
880 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
881 "func2: returning\n"
882 "func1: returning\n"
883 "main: exiting\n"
884 msgstr ""
885 "$B< ./a.out>\n"
886 "main: swapcontext(&uctx_main, &uctx_func2)\n"
887 "func2: started\n"
888 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
889 "func1: started\n"
890 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
891 "func2: returning\n"
892 "func1: returning\n"
893 "main: exiting\n"
894
895 #. type: SS
896 #: build/C/man3/makecontext.3:159 build/C/man3/pthread_attr_init.3:148
897 #: build/C/man3/pthread_cancel.3:151 build/C/man3/pthread_cleanup_push.3:231
898 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
899 #: build/C/man3/pthread_getcpuclockid.3:95
900 #: build/C/man3/pthread_setname_np.3:138
901 #: build/C/man3/pthread_setschedparam.3:224 build/C/man3/pthread_sigmask.3:79
902 #, no-wrap
903 msgid "Program source"
904 msgstr "プログラムのソース"
905
906 #. type: Plain text
907 #: build/C/man3/makecontext.3:165
908 #, no-wrap
909 msgid ""
910 "#include E<lt>ucontext.hE<gt>\n"
911 "#include E<lt>stdio.hE<gt>\n"
912 "#include E<lt>stdlib.hE<gt>\n"
913 msgstr ""
914 "#include E<lt>ucontext.hE<gt>\n"
915 "#include E<lt>stdio.hE<gt>\n"
916 "#include E<lt>stdlib.hE<gt>\n"
917
918 #. type: Plain text
919 #: build/C/man3/makecontext.3:167
920 #, no-wrap
921 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
922 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
923
924 #. type: Plain text
925 #: build/C/man3/makecontext.3:170
926 #, no-wrap
927 msgid ""
928 "#define handle_error(msg) \\e\n"
929 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
930 msgstr ""
931 "#define handle_error(msg) \\e\n"
932 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
933
934 #. type: Plain text
935 #: build/C/man3/makecontext.3:180
936 #, no-wrap
937 msgid ""
938 "static void\n"
939 "func1(void)\n"
940 "{\n"
941 "    printf(\"func1: started\\en\");\n"
942 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
943 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
944 "        handle_error(\"swapcontext\");\n"
945 "    printf(\"func1: returning\\en\");\n"
946 "}\n"
947 msgstr ""
948 "static void\n"
949 "func1(void)\n"
950 "{\n"
951 "    printf(\"func1: started\\en\");\n"
952 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
953 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
954 "        handle_error(\"swapcontext\");\n"
955 "    printf(\"func1: returning\\en\");\n"
956 "}\n"
957
958 #. type: Plain text
959 #: build/C/man3/makecontext.3:190
960 #, no-wrap
961 msgid ""
962 "static void\n"
963 "func2(void)\n"
964 "{\n"
965 "    printf(\"func2: started\\en\");\n"
966 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
967 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
968 "        handle_error(\"swapcontext\");\n"
969 "    printf(\"func2: returning\\en\");\n"
970 "}\n"
971 msgstr ""
972 "static void\n"
973 "func2(void)\n"
974 "{\n"
975 "    printf(\"func2: started\\en\");\n"
976 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
977 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
978 "        handle_error(\"swapcontext\");\n"
979 "    printf(\"func2: returning\\en\");\n"
980 "}\n"
981
982 #. type: Plain text
983 #: build/C/man3/makecontext.3:196
984 #, no-wrap
985 msgid ""
986 "int\n"
987 "main(int argc, char *argv[])\n"
988 "{\n"
989 "    char func1_stack[16384];\n"
990 "    char func2_stack[16384];\n"
991 msgstr ""
992 "int\n"
993 "main(int argc, char *argv[])\n"
994 "{\n"
995 "    char func1_stack[16384];\n"
996 "    char func2_stack[16384];\n"
997
998 #. type: Plain text
999 #: build/C/man3/makecontext.3:203
1000 #, no-wrap
1001 msgid ""
1002 "    if (getcontext(&uctx_func1) == -1)\n"
1003 "        handle_error(\"getcontext\");\n"
1004 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1005 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1006 "    uctx_func1.uc_link = &uctx_main;\n"
1007 "    makecontext(&uctx_func1, func1, 0);\n"
1008 msgstr ""
1009 "    if (getcontext(&uctx_func1) == -1)\n"
1010 "        handle_error(\"getcontext\");\n"
1011 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1012 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1013 "    uctx_func1.uc_link = &uctx_main;\n"
1014 "    makecontext(&uctx_func1, func1, 0);\n"
1015
1016 #. type: Plain text
1017 #: build/C/man3/makecontext.3:211
1018 #, no-wrap
1019 msgid ""
1020 "    if (getcontext(&uctx_func2) == -1)\n"
1021 "        handle_error(\"getcontext\");\n"
1022 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1023 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1024 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1025 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1026 "    makecontext(&uctx_func2, func2, 0);\n"
1027 msgstr ""
1028 "    if (getcontext(&uctx_func2) == -1)\n"
1029 "        handle_error(\"getcontext\");\n"
1030 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1031 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1032 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1033 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1034 "    makecontext(&uctx_func2, func2, 0);\n"
1035
1036 #. type: Plain text
1037 #: build/C/man3/makecontext.3:215
1038 #, no-wrap
1039 msgid ""
1040 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1041 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1042 "        handle_error(\"swapcontext\");\n"
1043 msgstr ""
1044 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1045 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1046 "        handle_error(\"swapcontext\");\n"
1047
1048 #. type: Plain text
1049 #: build/C/man3/makecontext.3:219
1050 #, no-wrap
1051 msgid ""
1052 "    printf(\"main: exiting\\en\");\n"
1053 "    exit(EXIT_SUCCESS);\n"
1054 "}\n"
1055 msgstr ""
1056 "    printf(\"main: exiting\\en\");\n"
1057 "    exit(EXIT_SUCCESS);\n"
1058 "}\n"
1059
1060 #. type: Plain text
1061 #: build/C/man3/makecontext.3:226
1062 msgid ""
1063 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1064 "B<sigsetjmp>(3)"
1065 msgstr ""
1066 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1067 "B<sigsetjmp>(3)"
1068
1069 #. type: TH
1070 #: build/C/man3/pthread_attr_init.3:26
1071 #, no-wrap
1072 msgid "PTHREAD_ATTR_INIT"
1073 msgstr "PTHREAD_ATTR_INIT"
1074
1075 #. type: TH
1076 #: build/C/man3/pthread_attr_init.3:26
1077 #, no-wrap
1078 msgid "2008-11-11"
1079 msgstr "2008-11-11"
1080
1081 #. type: Plain text
1082 #: build/C/man3/pthread_attr_init.3:30
1083 msgid ""
1084 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1085 "attributes object"
1086 msgstr ""
1087 "pthread_attr_init, pthread_attr_destroy - \n"
1088 "スレッド属性オブジェクトの初期化と破棄を行う"
1089
1090 #. type: Plain text
1091 #: build/C/man3/pthread_attr_init.3:33
1092 #: build/C/man3/pthread_attr_setdetachstate.3:33
1093 #: build/C/man3/pthread_attr_setguardsize.3:33
1094 #: build/C/man3/pthread_attr_setinheritsched.3:33
1095 #: build/C/man3/pthread_attr_setschedparam.3:33
1096 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1097 #: build/C/man3/pthread_attr_setscope.3:33
1098 #: build/C/man3/pthread_attr_setstack.3:33
1099 #: build/C/man3/pthread_attr_setstackaddr.3:33
1100 #: build/C/man3/pthread_attr_setstacksize.3:33
1101 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1102 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1103 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1104 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1105 #: build/C/man3/pthread_join.3:32
1106 #: build/C/man3/pthread_kill_other_threads_np.3:32
1107 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1108 #: build/C/man3/pthread_setconcurrency.3:32
1109 #: build/C/man3/pthread_setschedparam.3:33
1110 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1111 #: build/C/man3/pthread_testcancel.3:32
1112 #, no-wrap
1113 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1114 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1115
1116 #. type: Plain text
1117 #: build/C/man3/pthread_attr_init.3:36
1118 #, no-wrap
1119 msgid ""
1120 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1121 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1122 msgstr ""
1123 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1124 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1125
1126 #. type: Plain text
1127 #: build/C/man3/pthread_attr_init.3:38
1128 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1129 #: build/C/man3/pthread_attr_setdetachstate.3:40
1130 #: build/C/man3/pthread_attr_setguardsize.3:40
1131 #: build/C/man3/pthread_attr_setinheritsched.3:40
1132 #: build/C/man3/pthread_attr_setschedparam.3:40
1133 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1134 #: build/C/man3/pthread_attr_setscope.3:40
1135 #: build/C/man3/pthread_attr_setstack.3:40
1136 #: build/C/man3/pthread_attr_setstackaddr.3:40
1137 #: build/C/man3/pthread_attr_setstacksize.3:40
1138 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1139 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1140 #: build/C/man3/pthread_getattr_np.3:37
1141 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1142 #: build/C/man3/pthread_setaffinity_np.3:41
1143 #: build/C/man3/pthread_setcancelstate.3:38
1144 #: build/C/man3/pthread_setconcurrency.3:37
1145 #: build/C/man3/pthread_setschedparam.3:40
1146 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1147 #, no-wrap
1148 msgid "Compile and link with I<-pthread>.\n"
1149 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1150
1151 #. type: Plain text
1152 #: build/C/man3/pthread_attr_init.3:50
1153 msgid ""
1154 "The B<pthread_attr_init>()  function initializes the thread attributes "
1155 "object pointed to by I<attr> with default attribute values.  After this "
1156 "call, individual attributes of the object can be set using various related "
1157 "functions (listed under SEE ALSO), and then the object can be used in one or "
1158 "more B<pthread_create>(3)  calls that create threads."
1159 msgstr ""
1160 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1161 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1162 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1163 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1164 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1165 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1166
1167 #. type: Plain text
1168 #: build/C/man3/pthread_attr_init.3:55
1169 msgid ""
1170 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1171 "already been initialized results in undefined behavior."
1172 msgstr ""
1173 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1174 "B<pthread_attr_init>() を呼び出した場合、\n"
1175 "どのような動作になるかは不定である。"
1176
1177 #. type: Plain text
1178 #: build/C/man3/pthread_attr_init.3:62
1179 msgid ""
1180 "When a thread attributes object is no longer required, it should be "
1181 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1182 "thread attributes object has no effect on threads that were created using "
1183 "that object."
1184 msgstr ""
1185 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1186 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1187 "スレッド属性オブジェクトを破棄しても、\n"
1188 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1189
1190 #. type: Plain text
1191 #: build/C/man3/pthread_attr_init.3:68
1192 msgid ""
1193 "Once a thread attributes object has been destroyed, it can be reinitialized "
1194 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1195 "attributes object has undefined results."
1196 msgstr ""
1197 "いったん破棄したスレッド属性オブジェクトは、\n"
1198 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1199 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1200 "使った場合の結果は不定である。"
1201
1202 #. type: Plain text
1203 #: build/C/man3/pthread_attr_init.3:71
1204 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1205 #: build/C/man3/pthread_attr_setdetachstate.3:80
1206 #: build/C/man3/pthread_attr_setguardsize.3:93
1207 #: build/C/man3/pthread_attr_setinheritsched.3:96
1208 #: build/C/man3/pthread_attr_setschedparam.3:88
1209 #: build/C/man3/pthread_attr_setschedpolicy.3:86
1210 #: build/C/man3/pthread_attr_setscope.3:106
1211 #: build/C/man3/pthread_attr_setstack.3:88
1212 #: build/C/man3/pthread_attr_setstackaddr.3:77
1213 #: build/C/man3/pthread_attr_setstacksize.3:64
1214 #: build/C/man3/pthread_setaffinity_np.3:80
1215 #: build/C/man3/pthread_setcancelstate.3:95
1216 #: build/C/man3/pthread_setname_np.3:75
1217 msgid ""
1218 "On success, these functions return 0; on error, they return a nonzero error "
1219 "number."
1220 msgstr ""
1221 "成功すると、これらの関数は 0 を返す。\n"
1222 "エラーの場合、0 以外のエラー番号を返す。"
1223
1224 #. type: Plain text
1225 #: build/C/man3/pthread_attr_init.3:79
1226 msgid ""
1227 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1228 "Linux these functions always succeed (but portable and future-proof "
1229 "applications should nevertheless handle a possible error return)."
1230 msgstr ""
1231 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1232 "記載されている。\n"
1233 "Linux では、これらの関数は常に成功する\n"
1234 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1235 "正のエラーの返り値を処理するようにすべきである)。"
1236
1237 #. type: Plain text
1238 #: build/C/man3/pthread_attr_init.3:81
1239 #: build/C/man3/pthread_attr_setdetachstate.3:89
1240 #: build/C/man3/pthread_attr_setguardsize.3:108
1241 #: build/C/man3/pthread_attr_setinheritsched.3:112
1242 #: build/C/man3/pthread_attr_setschedparam.3:102
1243 #: build/C/man3/pthread_attr_setschedpolicy.3:102
1244 #: build/C/man3/pthread_attr_setscope.3:121
1245 #: build/C/man3/pthread_attr_setstack.3:114
1246 #: build/C/man3/pthread_attr_setstacksize.3:85
1247 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
1248 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1249 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1250 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1251 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:52
1252 #: build/C/man3/pthread_setcancelstate.3:115
1253 #: build/C/man3/pthread_setconcurrency.3:85
1254 #: build/C/man3/pthread_setschedparam.3:143
1255 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
1256 #: build/C/man3/pthread_testcancel.3:60
1257 msgid "POSIX.1-2001."
1258 msgstr "POSIX.1-2001."
1259
1260 #. type: Plain text
1261 #: build/C/man3/pthread_attr_init.3:87
1262 msgid ""
1263 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1264 "object other than via pthreads functions is nonportable and produces "
1265 "undefined results."
1266 msgstr ""
1267 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1268 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1269 "どのような結果が得られるかも分からない。"
1270
1271 #. type: Plain text
1272 #: build/C/man3/pthread_attr_init.3:96
1273 msgid ""
1274 "The program below optionally makes use of B<pthread_attr_init>()  and "
1275 "various related functions to initialize a thread attributes object that is "
1276 "used to create a single thread.  Once created, the thread uses the "
1277 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1278 "the thread's attributes, and then displays those attributes."
1279 msgstr ""
1280 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1281 "スレッド属性オブジェクトの初期化を行い、\n"
1282 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1283 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1284 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1285 "取得した属性を表示する。"
1286
1287 #. type: Plain text
1288 #: build/C/man3/pthread_attr_init.3:105
1289 msgid ""
1290 "If the program is run with no command-line argument, then it passes NULL as "
1291 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1292 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1293 "threading implementation, we see the following:"
1294 msgstr ""
1295 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1296 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1297 "この場合、スレッドはデフォルトの属性で作成される。\n"
1298 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1299 "動作させると、以下のような出力が得られる。"
1300
1301 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1302 #. type: Plain text
1303 #: build/C/man3/pthread_attr_init.3:121
1304 #, no-wrap
1305 msgid ""
1306 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1307 "unlimited\n"
1308 "$B< ./a.out>\n"
1309 "Thread attributes:\n"
1310 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1311 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1312 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1313 "        Scheduling policy   = SCHED_OTHER\n"
1314 "        Scheduling priority = 0\n"
1315 "        Guard size          = 4096 bytes\n"
1316 "        Stack address       = 0x40196000\n"
1317 "        Stack size          = 0x201000 bytes\n"
1318 msgstr ""
1319 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1320 "unlimited\n"
1321 "$B< ./a.out>\n"
1322 "Thread attributes:\n"
1323 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1324 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1325 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1326 "        Scheduling policy   = SCHED_OTHER\n"
1327 "        Scheduling priority = 0\n"
1328 "        Guard size          = 4096 bytes\n"
1329 "        Stack address       = 0x40196000\n"
1330 "        Stack size          = 0x201000 bytes\n"
1331
1332 #. type: Plain text
1333 #: build/C/man3/pthread_attr_init.3:131
1334 msgid ""
1335 "When we supply a stack size as a command-line argument, the program "
1336 "initializes a thread attributes object, sets various attributes in that "
1337 "object, and passes a pointer to the object in the call to B<pthread_create>"
1338 "(3).  Running the program on Linux/x86-32 with the NPTL threading "
1339 "implementation, we see the following:"
1340 msgstr ""
1341 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1342 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1343 "そのオブジェクトの各種属性を設定し、\n"
1344 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1345 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1346 "動作させると、以下のような出力が得られる。"
1347
1348 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1349 #. type: Plain text
1350 #: build/C/man3/pthread_attr_init.3:146
1351 #, no-wrap
1352 msgid ""
1353 "$B< ./a.out 0x3000000>\n"
1354 "posix_memalign() allocated at 0x40197000\n"
1355 "Thread attributes:\n"
1356 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1357 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1358 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1359 "        Scheduling policy   = SCHED_OTHER\n"
1360 "        Scheduling priority = 0\n"
1361 "        Guard size          = 0 bytes\n"
1362 "        Stack address       = 0x40197000\n"
1363 "        Stack size          = 0x3000000 bytes\n"
1364 msgstr ""
1365 "$B< ./a.out 0x3000000>\n"
1366 "posix_memalign() allocated at 0x40197000\n"
1367 "Thread attributes:\n"
1368 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1369 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1370 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1371 "        Scheduling policy   = SCHED_OTHER\n"
1372 "        Scheduling priority = 0\n"
1373 "        Guard size          = 0 bytes\n"
1374 "        Stack address       = 0x40197000\n"
1375 "        Stack size          = 0x3000000 bytes\n"
1376
1377 #. type: Plain text
1378 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1379 #, no-wrap
1380 msgid ""
1381 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1382 "#include E<lt>pthread.hE<gt>\n"
1383 "#include E<lt>stdio.hE<gt>\n"
1384 "#include E<lt>stdlib.hE<gt>\n"
1385 "#include E<lt>unistd.hE<gt>\n"
1386 "#include E<lt>errno.hE<gt>\n"
1387 msgstr ""
1388 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1389 "#include E<lt>pthread.hE<gt>\n"
1390 "#include E<lt>stdio.hE<gt>\n"
1391 "#include E<lt>stdlib.hE<gt>\n"
1392 "#include E<lt>unistd.hE<gt>\n"
1393 "#include E<lt>errno.hE<gt>\n"
1394
1395 #. type: Plain text
1396 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:162
1397 #: build/C/man3/pthread_cleanup_push.3:243 build/C/man3/pthread_create.3:254
1398 #: build/C/man3/pthread_getattr_np.3:191
1399 #: build/C/man3/pthread_getcpuclockid.3:113
1400 #: build/C/man3/pthread_setaffinity_np.3:172
1401 #: build/C/man3/pthread_setschedparam.3:237 build/C/man3/pthread_sigmask.3:93
1402 #, no-wrap
1403 msgid ""
1404 "#define handle_error_en(en, msg) \\e\n"
1405 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1406 msgstr ""
1407 "#define handle_error_en(en, msg) \\e\n"
1408 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1409
1410 #. type: Plain text
1411 #: build/C/man3/pthread_attr_init.3:168
1412 #, no-wrap
1413 msgid ""
1414 "static void\n"
1415 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1416 "{\n"
1417 "    int s, i;\n"
1418 "    size_t v;\n"
1419 "    void *stkaddr;\n"
1420 "    struct sched_param sp;\n"
1421 msgstr ""
1422 "static void\n"
1423 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1424 "{\n"
1425 "    int s, i;\n"
1426 "    size_t v;\n"
1427 "    void *stkaddr;\n"
1428 "    struct sched_param sp;\n"
1429
1430 #. type: Plain text
1431 #: build/C/man3/pthread_attr_init.3:176
1432 #, no-wrap
1433 msgid ""
1434 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1435 "    if (s != 0)\n"
1436 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1437 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1438 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1439 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1440 "            \"???\");\n"
1441 msgstr ""
1442 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1443 "    if (s != 0)\n"
1444 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1445 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1446 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1447 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1448 "            \"???\");\n"
1449
1450 #. type: Plain text
1451 #: build/C/man3/pthread_attr_init.3:184
1452 #, no-wrap
1453 msgid ""
1454 "    s = pthread_attr_getscope(attr, &i);\n"
1455 "    if (s != 0)\n"
1456 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1457 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1458 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1459 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1460 "            \"???\");\n"
1461 msgstr ""
1462 "    s = pthread_attr_getscope(attr, &i);\n"
1463 "    if (s != 0)\n"
1464 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1465 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1466 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1467 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1468 "            \"???\");\n"
1469
1470 #. type: Plain text
1471 #: build/C/man3/pthread_attr_init.3:192
1472 #, no-wrap
1473 msgid ""
1474 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1475 "    if (s != 0)\n"
1476 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1477 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1478 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1479 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1480 "            \"???\");\n"
1481 msgstr ""
1482 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1483 "    if (s != 0)\n"
1484 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1485 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1486 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1487 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1488 "            \"???\");\n"
1489
1490 #. type: Plain text
1491 #: build/C/man3/pthread_attr_init.3:201
1492 #, no-wrap
1493 msgid ""
1494 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1495 "    if (s != 0)\n"
1496 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1497 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1498 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1499 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1500 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1501 "            \"???\");\n"
1502 msgstr ""
1503 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1504 "    if (s != 0)\n"
1505 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1506 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1507 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1508 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1509 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1510 "            \"???\");\n"
1511
1512 #. type: Plain text
1513 #: build/C/man3/pthread_attr_init.3:206
1514 #, no-wrap
1515 msgid ""
1516 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1517 "    if (s != 0)\n"
1518 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1519 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1520 msgstr ""
1521 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1522 "    if (s != 0)\n"
1523 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1524 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1525
1526 #. type: Plain text
1527 #: build/C/man3/pthread_attr_init.3:211
1528 #, no-wrap
1529 msgid ""
1530 "    s = pthread_attr_getguardsize(attr, &v);\n"
1531 "    if (s != 0)\n"
1532 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1533 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1534 msgstr ""
1535 "    s = pthread_attr_getguardsize(attr, &v);\n"
1536 "    if (s != 0)\n"
1537 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1538 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1539
1540 #. type: Plain text
1541 #: build/C/man3/pthread_attr_init.3:218
1542 #, no-wrap
1543 msgid ""
1544 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1545 "    if (s != 0)\n"
1546 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1547 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1548 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1549 "}\n"
1550 msgstr ""
1551 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1552 "    if (s != 0)\n"
1553 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1554 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1555 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1556 "}\n"
1557
1558 #. type: Plain text
1559 #: build/C/man3/pthread_attr_init.3:224
1560 #, no-wrap
1561 msgid ""
1562 "static void *\n"
1563 "thread_start(void *arg)\n"
1564 "{\n"
1565 "    int s;\n"
1566 "    pthread_attr_t gattr;\n"
1567 msgstr ""
1568 "static void *\n"
1569 "thread_start(void *arg)\n"
1570 "{\n"
1571 "    int s;\n"
1572 "    pthread_attr_t gattr;\n"
1573
1574 #. type: Plain text
1575 #: build/C/man3/pthread_attr_init.3:228
1576 #, no-wrap
1577 msgid ""
1578 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1579 "       retrieves the attributes of the thread specified in its\n"
1580 "       first argument */\n"
1581 msgstr ""
1582 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1583 "       retrieves the attributes of the thread specified in its\n"
1584 "       first argument */\n"
1585
1586 #. type: Plain text
1587 #: build/C/man3/pthread_attr_init.3:232
1588 #, no-wrap
1589 msgid ""
1590 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1591 "    if (s != 0)\n"
1592 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1593 msgstr ""
1594 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1595 "    if (s != 0)\n"
1596 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1597
1598 #. type: Plain text
1599 #: build/C/man3/pthread_attr_init.3:235
1600 #, no-wrap
1601 msgid ""
1602 "    printf(\"Thread attributes:\\en\");\n"
1603 "    display_pthread_attr(&gattr, \"\\et\");\n"
1604 msgstr ""
1605 "    printf(\"Thread attributes:\\en\");\n"
1606 "    display_pthread_attr(&gattr, \"\\et\");\n"
1607
1608 #. type: Plain text
1609 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1610 #, no-wrap
1611 msgid ""
1612 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1613 "}\n"
1614 msgstr ""
1615 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1616 "}\n"
1617
1618 #. type: Plain text
1619 #: build/C/man3/pthread_attr_init.3:246
1620 #, no-wrap
1621 msgid ""
1622 "int\n"
1623 "main(int argc, char *argv[])\n"
1624 "{\n"
1625 "    pthread_t thr;\n"
1626 "    pthread_attr_t attr;\n"
1627 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1628 "    int s;\n"
1629 msgstr ""
1630 "int\n"
1631 "main(int argc, char *argv[])\n"
1632 "{\n"
1633 "    pthread_t thr;\n"
1634 "    pthread_attr_t attr;\n"
1635 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1636 "    int s;\n"
1637
1638 #. type: Plain text
1639 #: build/C/man3/pthread_attr_init.3:248
1640 #: build/C/man3/pthread_setschedparam.3:355
1641 #, no-wrap
1642 msgid "    attrp = NULL;\n"
1643 msgstr "    attrp = NULL;\n"
1644
1645 #. type: Plain text
1646 #: build/C/man3/pthread_attr_init.3:252
1647 #, no-wrap
1648 msgid ""
1649 "    /* If a command-line argument was supplied, use it to set the\n"
1650 "       stack-size attribute and set a few other thread attributes,\n"
1651 "       and set attrp pointing to thread attributes object */\n"
1652 msgstr ""
1653 "    /* If a command-line argument was supplied, use it to set the\n"
1654 "       stack-size attribute and set a few other thread attributes,\n"
1655 "       and set attrp pointing to thread attributes object */\n"
1656
1657 #. type: Plain text
1658 #: build/C/man3/pthread_attr_init.3:256
1659 #, no-wrap
1660 msgid ""
1661 "    if (argc E<gt> 1) {\n"
1662 "        int stack_size;\n"
1663 "        void *sp;\n"
1664 msgstr ""
1665 "    if (argc E<gt> 1) {\n"
1666 "        int stack_size;\n"
1667 "        void *sp;\n"
1668
1669 #. type: Plain text
1670 #: build/C/man3/pthread_attr_init.3:258
1671 #, no-wrap
1672 msgid "        attrp = &attr;\n"
1673 msgstr "        attrp = &attr;\n"
1674
1675 #. type: Plain text
1676 #: build/C/man3/pthread_attr_init.3:262
1677 #, no-wrap
1678 msgid ""
1679 "        s = pthread_attr_init(&attr);\n"
1680 "        if (s != 0)\n"
1681 "            handle_error_en(s, \"pthread_attr_init\");\n"
1682 msgstr ""
1683 "        s = pthread_attr_init(&attr);\n"
1684 "        if (s != 0)\n"
1685 "            handle_error_en(s, \"pthread_attr_init\");\n"
1686
1687 #. type: Plain text
1688 #: build/C/man3/pthread_attr_init.3:266
1689 #, no-wrap
1690 msgid ""
1691 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1692 "        if (s != 0)\n"
1693 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1694 msgstr ""
1695 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1696 "        if (s != 0)\n"
1697 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1698
1699 #. type: Plain text
1700 #: build/C/man3/pthread_attr_init.3:270
1701 #, no-wrap
1702 msgid ""
1703 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1704 "        if (s != 0)\n"
1705 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1706 msgstr ""
1707 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1708 "        if (s != 0)\n"
1709 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1710
1711 #. type: Plain text
1712 #: build/C/man3/pthread_attr_init.3:272
1713 #, no-wrap
1714 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1715 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1716
1717 #. type: Plain text
1718 #: build/C/man3/pthread_attr_init.3:276
1719 #, no-wrap
1720 msgid ""
1721 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1722 "        if (s != 0)\n"
1723 "            handle_error_en(s, \"posix_memalign\");\n"
1724 msgstr ""
1725 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1726 "        if (s != 0)\n"
1727 "            handle_error_en(s, \"posix_memalign\");\n"
1728
1729 #. type: Plain text
1730 #: build/C/man3/pthread_attr_init.3:278
1731 #, no-wrap
1732 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1733 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1734
1735 #. type: Plain text
1736 #: build/C/man3/pthread_attr_init.3:283
1737 #, no-wrap
1738 msgid ""
1739 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1740 "        if (s != 0)\n"
1741 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1742 "    }\n"
1743 msgstr ""
1744 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1745 "        if (s != 0)\n"
1746 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1747 "    }\n"
1748
1749 #. type: Plain text
1750 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1751 #, no-wrap
1752 msgid ""
1753 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1754 "    if (s != 0)\n"
1755 "        handle_error_en(s, \"pthread_create\");\n"
1756 msgstr ""
1757 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1758 "    if (s != 0)\n"
1759 "        handle_error_en(s, \"pthread_create\");\n"
1760
1761 #. type: Plain text
1762 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1763 #, no-wrap
1764 msgid ""
1765 "    if (attrp != NULL) {\n"
1766 "        s = pthread_attr_destroy(attrp);\n"
1767 "        if (s != 0)\n"
1768 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1769 "    }\n"
1770 msgstr ""
1771 "    if (attrp != NULL) {\n"
1772 "        s = pthread_attr_destroy(attrp);\n"
1773 "        if (s != 0)\n"
1774 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1775 "    }\n"
1776
1777 #. type: Plain text
1778 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1779 #, no-wrap
1780 msgid ""
1781 "    pause();    /* Terminates when other thread calls exit() */\n"
1782 "}\n"
1783 msgstr ""
1784 "    pause();    /* Terminates when other thread calls exit() */\n"
1785 "}\n"
1786
1787 #. type: Plain text
1788 #: build/C/man3/pthread_attr_init.3:313
1789 msgid ""
1790 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1791 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1792 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1793 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1794 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1795 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1796 msgstr ""
1797 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1798 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1799 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1800 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1801 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1802 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1803
1804 #. type: TH
1805 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1806 #, no-wrap
1807 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1808 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1809
1810 #. type: TH
1811 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1812 #: build/C/man3/pthread_getattr_np.3:26
1813 #: build/C/man3/pthread_setaffinity_np.3:26
1814 #: build/C/man3/pthread_tryjoin_np.3:26
1815 #, no-wrap
1816 msgid "2010-09-10"
1817 msgstr "2010-09-10"
1818
1819 #. type: Plain text
1820 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1821 msgid ""
1822 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1823 "affinity attribute in thread attributes object"
1824 msgstr ""
1825 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1826 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1827
1828 #. type: Plain text
1829 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1830 #: build/C/man3/pthread_getattr_np.3:33
1831 #: build/C/man3/pthread_setaffinity_np.3:34
1832 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1833 #, no-wrap
1834 msgid ""
1835 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1836 "B<#include E<lt>pthread.hE<gt>>\n"
1837 msgstr ""
1838 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1839 "B<#include E<lt>pthread.hE<gt>>\n"
1840
1841 #. type: Plain text
1842 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1843 #, no-wrap
1844 msgid ""
1845 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1846 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1847 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1848 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1849 msgstr ""
1850 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1851 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1852 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1853 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1854
1855 #. type: Plain text
1856 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1857 msgid ""
1858 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1859 "attribute of the thread attributes object referred to by I<attr> to the "
1860 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1861 "mask of a thread created using the thread attributes object I<attr>."
1862 msgstr ""
1863 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1864 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1865 "I<cpuset> で指定された値に設定する。\n"
1866 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1867 "作成されたスレッドの CPU affinity マスクが決定される。"
1868
1869 #. type: Plain text
1870 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1871 msgid ""
1872 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1873 "attribute of the thread attributes object referred to by I<attr> in the "
1874 "buffer pointed to by I<cpuset>."
1875 msgstr ""
1876 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1877 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1878 "I<cpuset> が指すバッファに入れて返す。"
1879
1880 #. type: Plain text
1881 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1882 msgid ""
1883 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1884 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
1885 "(cpu_set_t)>."
1886 msgstr ""
1887 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1888 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1889 "指定することだろう。"
1890
1891 #. type: Plain text
1892 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1893 #: build/C/man3/pthread_setaffinity_np.3:67
1894 msgid ""
1895 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1896 "description of a set of macros that can be used to manipulate and inspect "
1897 "CPU sets, see B<CPU_SET>(3)."
1898 msgstr ""
1899 "CPU affinity マスクの詳細については、 \n"
1900 "B<sched_setaffinity>(2) を参照してほしい。\n"
1901 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1902 "B<CPU_SET>(3) を参照してほしい。"
1903
1904 #. type: TP
1905 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1906 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1907 #: build/C/man3/pthread_attr_setdetachstate.3:83
1908 #: build/C/man3/pthread_attr_setinheritsched.3:99
1909 #: build/C/man3/pthread_attr_setschedpolicy.3:89
1910 #: build/C/man3/pthread_attr_setscope.3:109
1911 #: build/C/man3/pthread_attr_setstack.3:91
1912 #: build/C/man3/pthread_attr_setstacksize.3:67
1913 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1914 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1915 #: build/C/man3/pthread_kill.3:58 build/C/man3/pthread_setaffinity_np.3:84
1916 #: build/C/man3/pthread_setaffinity_np.3:93
1917 #: build/C/man3/pthread_setaffinity_np.3:109
1918 #: build/C/man3/pthread_setcancelstate.3:99
1919 #: build/C/man3/pthread_setcancelstate.3:107
1920 #: build/C/man3/pthread_setconcurrency.3:71
1921 #: build/C/man3/pthread_setschedparam.3:122
1922 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1923 #, no-wrap
1924 msgid "B<EINVAL>"
1925 msgstr "B<EINVAL>"
1926
1927 #.  cpumask_t
1928 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1929 #.  of the cpumask_t type.
1930 #. type: Plain text
1931 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1932 msgid ""
1933 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1934 "outside the set supported by the kernel.  (The kernel configuration option "
1935 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1936 "type used to represent CPU sets.)"
1937 msgstr ""
1938 "(B<pthread_attr_setaffinity_np>())\n"
1939 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1940 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1941 "は、\n"
1942 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
1943
1944 #. type: Plain text
1945 #: build/C/man3/pthread_attr_setaffinity_np.3:102
1946 msgid ""
1947 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
1948 "attributes object referred to by I<attr> lies outside the range specified by "
1949 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
1950 msgstr ""
1951 "(B<pthread_attr_getaffinity_np>())\n"
1952 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
1953 "I<cpusetsize> により指定された範囲の中になかった\n"
1954 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
1955
1956 #. type: Plain text
1957 #: build/C/man3/pthread_attr_setaffinity_np.3:106
1958 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
1959 msgstr ""
1960 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
1961
1962 #. type: Plain text
1963 #: build/C/man3/pthread_attr_setaffinity_np.3:108
1964 #: build/C/man3/pthread_setaffinity_np.3:121
1965 msgid "These functions are provided by glibc since version 2.3.4."
1966 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
1967
1968 #. type: Plain text
1969 #: build/C/man3/pthread_attr_setaffinity_np.3:111
1970 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
1971 #: build/C/man3/pthread_setaffinity_np.3:124
1972 #: build/C/man3/pthread_tryjoin_np.3:115
1973 msgid ""
1974 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
1975 "\" (nonportable) in the names."
1976 msgstr ""
1977 "これらの関数は非標準の GNU による拡張である。\n"
1978 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
1979 "付いている。"
1980
1981 #. type: Plain text
1982 #: build/C/man3/pthread_attr_setaffinity_np.3:118
1983 #: build/C/man3/pthread_setaffinity_np.3:150
1984 msgid ""
1985 "In glibc 2.3.3 only, versions of these functions were provided that did not "
1986 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
1987 "underlying system calls was always I<sizeof(cpu_set_t)>."
1988 msgstr ""
1989 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
1990 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
1991 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
1992 "常に I<sizeof(cpu_set_t)> であった。"
1993
1994 #. type: Plain text
1995 #: build/C/man3/pthread_attr_setaffinity_np.3:124
1996 msgid ""
1997 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
1998 "(3), B<cpuset>(7), B<pthreads>(7)"
1999 msgstr ""
2000 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2001 "(3), B<cpuset>(7), B<pthreads>(7)"
2002
2003 #. type: TH
2004 #: build/C/man3/pthread_attr_setdetachstate.3:26
2005 #, no-wrap
2006 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2007 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2008
2009 #. type: TH
2010 #: build/C/man3/pthread_attr_setdetachstate.3:26
2011 #, no-wrap
2012 msgid "2010-02-03"
2013 msgstr "2010-02-03"
2014
2015 #. type: Plain text
2016 #: build/C/man3/pthread_attr_setdetachstate.3:30
2017 msgid ""
2018 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2019 "state attribute in thread attributes object"
2020 msgstr ""
2021 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2022 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2023
2024 #. type: Plain text
2025 #: build/C/man3/pthread_attr_setdetachstate.3:38
2026 #, no-wrap
2027 msgid ""
2028 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2029 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2030 msgstr ""
2031 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2032 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2033
2034 #. type: Plain text
2035 #: build/C/man3/pthread_attr_setdetachstate.3:53
2036 msgid ""
2037 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2038 "attribute of the thread attributes object referred to by I<attr> to the "
2039 "value specified in I<detachstate>.  The detach state attribute determines "
2040 "whether a thread created using the thread attributes object I<attr> will be "
2041 "created in a joinable or a detached state."
2042 msgstr ""
2043 "B<pthread_attr_setdetachstate>() 関数は、\n"
2044 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2045 "I<detachstate> で指定された値に設定する。\n"
2046 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2047 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2048 "detached (切り離された) 状態で作成されるかが決定される。"
2049
2050 #. type: Plain text
2051 #: build/C/man3/pthread_attr_setdetachstate.3:56
2052 msgid "The following values may be specified in I<detachstate>:"
2053 msgstr "I<detachstate> には以下の値を指定できる。"
2054
2055 #. type: TP
2056 #: build/C/man3/pthread_attr_setdetachstate.3:56
2057 #, no-wrap
2058 msgid "B<PTHREAD_CREATE_DETACHED>"
2059 msgstr "B<PTHREAD_CREATE_DETACHED>"
2060
2061 #. type: Plain text
2062 #: build/C/man3/pthread_attr_setdetachstate.3:61
2063 msgid ""
2064 "Threads that are created using I<attr> will be created in a detached state."
2065 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2066
2067 #. type: TP
2068 #: build/C/man3/pthread_attr_setdetachstate.3:61
2069 #, no-wrap
2070 msgid "B<PTHREAD_CREATE_JOINABLE>"
2071 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2072
2073 #. type: Plain text
2074 #: build/C/man3/pthread_attr_setdetachstate.3:66
2075 msgid ""
2076 "Threads that are created using I<attr> will be created in a joinable state."
2077 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2078
2079 #. type: Plain text
2080 #: build/C/man3/pthread_attr_setdetachstate.3:70
2081 msgid ""
2082 "The default setting of the detach state attribute in a newly initialized "
2083 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2084 msgstr ""
2085 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2086 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2087
2088 #. type: Plain text
2089 #: build/C/man3/pthread_attr_setdetachstate.3:77
2090 msgid ""
2091 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2092 "the thread attributes object I<attr> in the buffer pointed to by "
2093 "I<detachstate>."
2094 msgstr ""
2095 "B<pthread_attr_getdetachstate>() は、\n"
2096 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2097 "I<detachstate> が指すバッファに入れて返す。"
2098
2099 #. type: Plain text
2100 #: build/C/man3/pthread_attr_setdetachstate.3:83
2101 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2102 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2103
2104 #. type: Plain text
2105 #: build/C/man3/pthread_attr_setdetachstate.3:87
2106 msgid "An invalid value was specified in I<detachstate>."
2107 msgstr "無効な値が I<detachstate> で指定された。"
2108
2109 #. type: Plain text
2110 #: build/C/man3/pthread_attr_setdetachstate.3:93
2111 msgid ""
2112 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2113 msgstr ""
2114 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2115 "B<pthread_create>(3) を参照。"
2116
2117 #. type: Plain text
2118 #: build/C/man3/pthread_attr_setdetachstate.3:101
2119 msgid ""
2120 "A thread that is created in a joinable state should eventually either be "
2121 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2122 "B<pthread_create>(3)."
2123 msgstr ""
2124 "join 可能状態で作成されたスレッドは、最終的に\n"
2125 "B<pthread_join>(3) を使って join するか、\n"
2126 "B<pthread_detach>(3) を使って切り離すか、\n"
2127 "のどちらかを行うべきである。"
2128
2129 #. type: Plain text
2130 #: build/C/man3/pthread_attr_setdetachstate.3:108
2131 msgid ""
2132 "It is an error to specify the thread ID of a thread that was created in a "
2133 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2134 "(3)."
2135 msgstr ""
2136 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2137 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2138 "エラーである。"
2139
2140 #. type: Plain text
2141 #: build/C/man3/pthread_attr_setdetachstate.3:111
2142 #: build/C/man3/pthread_attr_setstack.3:156
2143 msgid "See B<pthread_attr_init>(3)."
2144 msgstr "B<pthread_attr_init>(3) を参照。"
2145
2146 #. type: Plain text
2147 #: build/C/man3/pthread_attr_setdetachstate.3:117
2148 msgid ""
2149 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2150 "B<pthread_join>(3), B<pthreads>(7)"
2151 msgstr ""
2152 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2153 "B<pthread_join>(3), B<pthreads>(7)"
2154
2155 #. type: TH
2156 #: build/C/man3/pthread_attr_setguardsize.3:26
2157 #, no-wrap
2158 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2159 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2160
2161 #. type: TH
2162 #: build/C/man3/pthread_attr_setguardsize.3:26
2163 #: build/C/man3/pthread_attr_setstack.3:26
2164 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2165 #, no-wrap
2166 msgid "2008-10-24"
2167 msgstr "2008-10-24"
2168
2169 #. type: Plain text
2170 #: build/C/man3/pthread_attr_setguardsize.3:30
2171 msgid ""
2172 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2173 "attribute in thread attributes object"
2174 msgstr ""
2175 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2176 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2177
2178 #. type: Plain text
2179 #: build/C/man3/pthread_attr_setguardsize.3:38
2180 #, no-wrap
2181 msgid ""
2182 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2183 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2184 msgstr ""
2185 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2186 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2187
2188 #. type: Plain text
2189 #: build/C/man3/pthread_attr_setguardsize.3:49
2190 msgid ""
2191 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2192 "of the thread attributes object referred to by I<attr> to the value "
2193 "specified in I<guardsize>."
2194 msgstr ""
2195 "B<pthread_attr_setguardsize>() 関数は、\n"
2196 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2197 "I<guardsize> で指定された値に設定する。"
2198
2199 #. type: Plain text
2200 #: build/C/man3/pthread_attr_setguardsize.3:59
2201 msgid ""
2202 "If I<guardsize> is greater than 0, then for each new thread created using "
2203 "I<attr> the system allocates an additional region of at least I<guardsize> "
2204 "bytes at the end of the thread's stack to act as the guard area for the "
2205 "stack (but see BUGS)."
2206 msgstr ""
2207 "I<guardsize> が 0 より大きい場合、\n"
2208 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2209 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2210 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2211 "機能する (ただし「バグ」の節も参照)。"
2212
2213 #. type: Plain text
2214 #: build/C/man3/pthread_attr_setguardsize.3:65
2215 msgid ""
2216 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2217 "guard area."
2218 msgstr ""
2219 "I<guardsize> が 0 の場合、\n"
2220 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2221
2222 #. type: Plain text
2223 #: build/C/man3/pthread_attr_setguardsize.3:67
2224 msgid "The default guard size is the same as the system page size."
2225 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2226
2227 #. type: Plain text
2228 #: build/C/man3/pthread_attr_setguardsize.3:82
2229 msgid ""
2230 "If the stack address attribute has been set in I<attr> (using "
2231 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2232 "that the caller is allocating the thread's stack, then the guard size "
2233 "attribute is ignored (i.e., no guard area is created by the system): it is "
2234 "the application's responsibility to handle stack overflow (perhaps by using "
2235 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2236 "it has allocated)."
2237 msgstr ""
2238 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2239 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2240 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2241 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2242 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2243 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2244 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2245
2246 #. type: Plain text
2247 #: build/C/man3/pthread_attr_setguardsize.3:90
2248 msgid ""
2249 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2250 "attribute of the thread attributes object referred to by I<attr> in the "
2251 "buffer pointed to by I<guardsize>."
2252 msgstr ""
2253 "B<pthread_attr_getguardsize>() は、\n"
2254 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2255 "I<guardsize> が指すバッファに入れて返す。"
2256
2257 #. type: Plain text
2258 #: build/C/man3/pthread_attr_setguardsize.3:104
2259 msgid ""
2260 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2261 "invalid.  On Linux these functions always succeed (but portable and future-"
2262 "proof applications should nevertheless handle a possible error return)."
2263 msgstr ""
2264 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2265 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2266 "Linux では、これらの関数は常に成功する\n"
2267 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2268 "正のエラーの返り値を処理するようにすべきである)。"
2269
2270 #. type: Plain text
2271 #: build/C/man3/pthread_attr_setguardsize.3:106
2272 #: build/C/man3/pthread_attr_setstackaddr.3:83
2273 #: build/C/man3/pthread_attr_setstacksize.3:83
2274 msgid "These functions are provided by glibc since version 2.1."
2275 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2276
2277 #. type: Plain text
2278 #: build/C/man3/pthread_attr_setguardsize.3:122
2279 msgid ""
2280 "A guard area consists of virtual memory pages that are protected to prevent "
2281 "read and write access.  If a thread overflows its stack into the guard area, "
2282 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2283 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2284 "guard size is internally rounded up to the system page size when creating a "
2285 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2286 "size that was set by B<pthread_attr_setguardsize>().)"
2287 msgstr ""
2288 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2289 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2290 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2291 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2292 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2293 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2294 "(その場合も B<pthread_attr_getguardsize>() では\n"
2295 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2296
2297 #. type: Plain text
2298 #: build/C/man3/pthread_attr_setguardsize.3:126
2299 msgid ""
2300 "Setting a guard size of 0 may be useful to save memory in an application "
2301 "that creates many threads and knows that stack overflow can never occur."
2302 msgstr ""
2303 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2304 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2305 "することで、メモリを節約できることもある。"
2306
2307 #. type: Plain text
2308 #: build/C/man3/pthread_attr_setguardsize.3:130
2309 msgid ""
2310 "Choosing a guard size larger than the default size may be necessary for "
2311 "detecting stack overflows if a thread allocates large data structures on the "
2312 "stack."
2313 msgstr ""
2314 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2315 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2316 "大きな guard size を選ぶ必要があるかもしれない。"
2317
2318 #. type: SH
2319 #: build/C/man3/pthread_attr_setguardsize.3:130
2320 #: build/C/man3/pthread_attr_setinheritsched.3:112
2321 #: build/C/man3/pthread_attr_setstacksize.3:96
2322 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2323 #, no-wrap
2324 msgid "BUGS"
2325 msgstr "バグ"
2326
2327 #. type: Plain text
2328 #: build/C/man3/pthread_attr_setguardsize.3:141
2329 msgid ""
2330 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2331 "within the stack size allocation, rather than allocating extra space at the "
2332 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2333 "error from B<pthread_create>(3)  if the guard size value is too large, "
2334 "leaving no space for the actual stack.)"
2335 msgstr ""
2336 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2337 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2338 "末尾に追加の領域を割り当てることが求められている。\n"
2339 "(このため、ガード領域が大きすぎて、\n"
2340 "実際のスタック用の場所がなくなってしまう場合、\n"
2341 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2342
2343 #.  glibc includes the guardsize within the allocated stack size,
2344 #.  which looks pretty clearly to be in violation of POSIX.
2345 #.  Filed bug, 22 Oct 2008:
2346 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2347 #.  Older reports:
2348 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2349 #.  Reportedly, LinuxThreads did the right thing, allocating
2350 #.  extra space at the end of the stack:
2351 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2352 #. type: Plain text
2353 #: build/C/man3/pthread_attr_setguardsize.3:155
2354 msgid ""
2355 "The obsolete LinuxThreads implementation did the right thing, allocating "
2356 "extra space at the end of the stack for the guard area."
2357 msgstr ""
2358 "廃止予定の LinuxThreads 実装では、\n"
2359 "POSIX.1 で求められている通りの動作で、\n"
2360 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2361
2362 #. type: Plain text
2363 #: build/C/man3/pthread_attr_setguardsize.3:158
2364 msgid "See B<pthread_getattr_np>(3)."
2365 msgstr "B<pthread_getattr_np>(3) を参照。"
2366
2367 #. type: Plain text
2368 #: build/C/man3/pthread_attr_setguardsize.3:166
2369 msgid ""
2370 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2371 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2372 msgstr ""
2373 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2374 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2375
2376 #. type: TH
2377 #: build/C/man3/pthread_attr_setinheritsched.3:26
2378 #, no-wrap
2379 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2380 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2381
2382 #. type: TH
2383 #: build/C/man3/pthread_attr_setinheritsched.3:26
2384 #: build/C/man3/pthread_attr_setscope.3:26
2385 #, no-wrap
2386 msgid "2013-04-19"
2387 msgstr "2013-04-19"
2388
2389 #. type: Plain text
2390 #: build/C/man3/pthread_attr_setinheritsched.3:30
2391 msgid ""
2392 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit-"
2393 "scheduler attribute in thread attributes object"
2394 msgstr ""
2395 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - スレッド属性オブ"
2396 "ジェクトの inherit-scheduler 属性の設定/取得を行う"
2397
2398 #. type: Plain text
2399 #: build/C/man3/pthread_attr_setinheritsched.3:38
2400 #, no-wrap
2401 msgid ""
2402 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2403 "B<                                 int >I<inheritsched>B<);>\n"
2404 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2405 "B<                                 int *>I<inheritsched>B<);>\n"
2406 msgstr ""
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
2412 #. type: Plain text
2413 #: build/C/man3/pthread_attr_setinheritsched.3:55
2414 msgid ""
2415 "The B<pthread_attr_setinheritsched>()  function sets the inherit-scheduler "
2416 "attribute of the thread attributes object referred to by I<attr> to the "
2417 "value specified in I<inheritsched>.  The inherit-scheduler attribute "
2418 "determines whether a thread created using the thread attributes object "
2419 "I<attr> will inherit its scheduling attributes from the calling thread or "
2420 "whether it will take them from I<attr>."
2421 msgstr ""
2422 "B<pthread_attr_setinheritsched>() 関数は、 I<attr> が参照するスレッド属性オブ"
2423 "ジェクトの inherit-scheduler 属性を I<inheritsched> で指定された値に設定す"
2424 "る。 inherit-scheduler 属性により、スレッド属性オブジェクト I<attr> を使って"
2425 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承するか、 "
2426 "I<attr> からスケジューリング属性を取得するかが決定される。"
2427
2428 #. type: Plain text
2429 #: build/C/man3/pthread_attr_setinheritsched.3:64
2430 msgid ""
2431 "The following scheduling attributes are affected by the inherit-scheduler "
2432 "attribute: scheduling policy (B<pthread_attr_setschedpolicy>(3)), scheduling "
2433 "priority (B<pthread_attr_setschedparam>(3)), and contention scope "
2434 "(B<pthread_attr_setscope>(3))."
2435 msgstr ""
2436 "次に挙げるスケジューリング属性は inherit-scheduler 属性の影響を受ける: スケ"
2437 "ジューリングポリシー (B<pthread_attr_setschedpolicy>(3))、 スケジューリング優"
2438 "先度 (B<pthread_attr_setschedparam>(3))、 contention scope "
2439 "(B<pthread_attr_setscope>(3))。"
2440
2441 #. type: Plain text
2442 #: build/C/man3/pthread_attr_setinheritsched.3:67
2443 msgid "The following values may be specified in I<inheritsched>:"
2444 msgstr "以下の値を I<inheritsched> に指定できる。"
2445
2446 #. type: TP
2447 #: build/C/man3/pthread_attr_setinheritsched.3:67
2448 #, no-wrap
2449 msgid "B<PTHREAD_INHERIT_SCHED>"
2450 msgstr "B<PTHREAD_INHERIT_SCHED>"
2451
2452 #. type: Plain text
2453 #: build/C/man3/pthread_attr_setinheritsched.3:75
2454 msgid ""
2455 "Threads that are created using I<attr> inherit scheduling attributes from "
2456 "the creating thread; the scheduling attributes in I<attr> are ignored."
2457 msgstr ""
2458 "I<attr> を使って作成されたスレッドは、\n"
2459 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2460 "I<attr> 内のスケジューリング属性は無視される。"
2461
2462 #. type: TP
2463 #: build/C/man3/pthread_attr_setinheritsched.3:75
2464 #, no-wrap
2465 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2466 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2467
2468 #.  FIXME what are the defaults for scheduler settings?
2469 #. type: Plain text
2470 #: build/C/man3/pthread_attr_setinheritsched.3:82
2471 msgid ""
2472 "Threads that are created using I<attr> take their scheduling attributes from "
2473 "the values specified by the attributes object."
2474 msgstr ""
2475 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2476 "指定された値からスケジューリング属性を取得する。"
2477
2478 #. type: Plain text
2479 #: build/C/man3/pthread_attr_setinheritsched.3:86
2480 msgid ""
2481 "The default setting of the inherit-scheduler attribute in a newly "
2482 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2483 msgstr ""
2484 "新たに初期化されたスレッド属性オブジェクトの inherit-scheduler 属性のデフォル"
2485 "ト設定は B<PTHREAD_INHERIT_SCHED> である。"
2486
2487 #. type: Plain text
2488 #: build/C/man3/pthread_attr_setinheritsched.3:93
2489 msgid ""
2490 "The B<pthread_attr_getinheritsched>()  returns the inherit-scheduler "
2491 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2492 "by I<inheritsched>."
2493 msgstr ""
2494 "B<pthread_attr_getinheritsched>() は、 スレッド属性オブジェクト I<attr> の "
2495 "inherit-scheduler 属性を I<inheritsched> が指すバッファに入れて返す。"
2496
2497 #. type: Plain text
2498 #: build/C/man3/pthread_attr_setinheritsched.3:99
2499 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2500 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2501
2502 #. type: Plain text
2503 #: build/C/man3/pthread_attr_setinheritsched.3:103
2504 msgid "Invalid value in I<inheritsched>."
2505 msgstr "I<inheritsched> に無効な値が指定された。"
2506
2507 #.  .SH VERSIONS
2508 #.  Available since glibc 2.0.
2509 #. type: Plain text
2510 #: build/C/man3/pthread_attr_setinheritsched.3:110
2511 msgid ""
2512 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2513 "to set the attribute to an unsupported value\") for "
2514 "B<pthread_attr_setinheritsched>()."
2515 msgstr ""
2516 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2517 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2518 "も追加で規定されている。"
2519
2520 #.  FIXME . Track status of the following bug:
2521 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2522 #. type: Plain text
2523 #: build/C/man3/pthread_attr_setinheritsched.3:128
2524 msgid ""
2525 "As at glibc 2.8, if a thread attributes object is initialized using "
2526 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2527 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2528 "if the inherit-scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2529 "then a thread created using the attribute object wrongly inherits its "
2530 "scheduling attributes from the creating thread.  This bug does not occur if "
2531 "either the scheduling policy or scheduling priority attribute is explicitly "
2532 "set in the thread attributes object before calling B<pthread_create>(3)."
2533 msgstr ""
2534 "glibc 2.8 の時点では、スレッド属性オブジェクトが B<pthread_attr_init>(3) を"
2535 "使って初期化された場合、 スレッド属性オブジェクトのスケジューリングポリシー"
2536 "が B<SCHED_OTHER> に、 スケジューリング優先度が 0 に設定される。一方、その後 "
2537 "inherit-scheduler 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ"
2538 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するスレッド"
2539 "のスケジューリング属性が間違って継承されてしまう。 B<pthread_create>(3) を呼"
2540 "び出す前にスケジューリングポリシー属性かスケジューリング優先度属性のどちらか"
2541 "が明示的に設定された場合には、 このバグは発生しない。"
2542
2543 #. type: Plain text
2544 #: build/C/man3/pthread_attr_setinheritsched.3:131
2545 #: build/C/man3/pthread_attr_setschedparam.3:109
2546 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2547 msgid "See B<pthread_setschedparam>(3)."
2548 msgstr "B<pthread_setschedparam>(3) を参照。"
2549
2550 #. type: Plain text
2551 #: build/C/man3/pthread_attr_setinheritsched.3:143
2552 msgid ""
2553 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2554 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2555 "B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>"
2556 "(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2557 msgstr ""
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
2563 #. type: TH
2564 #: build/C/man3/pthread_attr_setschedparam.3:26
2565 #, no-wrap
2566 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2567 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2568
2569 #. type: TH
2570 #: build/C/man3/pthread_attr_setschedparam.3:26
2571 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2572 #: build/C/man3/pthread_setname_np.3:26
2573 #, no-wrap
2574 msgid "2013-06-21"
2575 msgstr "2013-06-21"
2576
2577 #. type: Plain text
2578 #: build/C/man3/pthread_attr_setschedparam.3:30
2579 msgid ""
2580 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2581 "parameter attributes in thread attributes object"
2582 msgstr ""
2583 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2584 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2585
2586 #. type: Plain text
2587 #: build/C/man3/pthread_attr_setschedparam.3:38
2588 #, no-wrap
2589 msgid ""
2590 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2591 "B<                               const struct sched_param *>I<param>B<);>\n"
2592 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2593 "B<                               struct sched_param *>I<param>B<);>\n"
2594 msgstr ""
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
2600 #. type: Plain text
2601 #: build/C/man3/pthread_attr_setschedparam.3:52
2602 msgid ""
2603 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2604 "attributes of the thread attributes object referred to by I<attr> to the "
2605 "values specified in the buffer pointed to by I<param>.  These attributes "
2606 "determine the scheduling parameters of a thread created using the thread "
2607 "attributes object I<attr>."
2608 msgstr ""
2609 "B<pthread_attr_setschedparam>() 関数は、\n"
2610 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2611 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2612 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2613 "作成されるスレッドのスケジューリングパラメータが決定される。"
2614
2615 #. type: Plain text
2616 #: build/C/man3/pthread_attr_setschedparam.3:59
2617 msgid ""
2618 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2619 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2620 "by I<param>."
2621 msgstr ""
2622 "B<pthread_attr_getschedparam>() は、\n"
2623 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2624 "I<param> が指すバッファに入れて返す。"
2625
2626 #. type: Plain text
2627 #: build/C/man3/pthread_attr_setschedparam.3:61
2628 msgid "Scheduling parameters are maintained in the following structure:"
2629 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2630
2631 #. type: Plain text
2632 #: build/C/man3/pthread_attr_setschedparam.3:67
2633 #: build/C/man3/pthread_setschedparam.3:69
2634 #, no-wrap
2635 msgid ""
2636 "struct sched_param {\n"
2637 "    int sched_priority;     /* Scheduling priority */\n"
2638 "};\n"
2639 msgstr ""
2640 "struct sched_param {\n"
2641 "    int sched_priority;     /* Scheduling priority */\n"
2642 "};\n"
2643
2644 #. type: Plain text
2645 #: build/C/man3/pthread_attr_setschedparam.3:74
2646 #: build/C/man3/pthread_setschedparam.3:76
2647 msgid ""
2648 "As can be seen, only one scheduling parameter is supported.  For details of "
2649 "the permitted ranges for scheduling priorities in each scheduling policy, "
2650 "see B<sched_setscheduler>(2)."
2651 msgstr ""
2652 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2653 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2654 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2655
2656 #. type: Plain text
2657 #: build/C/man3/pthread_attr_setschedparam.3:85
2658 msgid ""
2659 "In order for the parameter setting made by B<pthread_attr_setschedparam>()  "
2660 "to have effect when calling B<pthread_create>(3), the caller must use "
2661 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2662 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2663 msgstr ""
2664 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedparam>() で行っ"
2665 "たパラメータ設定を有効にするには、 呼び出し側で "
2666 "B<pthread_attr_setinheritsched>(3) を使って 属性オブジェクト I<attr> の "
2667 "inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければなら"
2668 "ない。"
2669
2670 #.  .SH VERSIONS
2671 #.  Available since glibc 2.0.
2672 #. type: Plain text
2673 #: build/C/man3/pthread_attr_setschedparam.3:100
2674 msgid ""
2675 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2676 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2677 "(but portable and future-proof applications should nevertheless handle a "
2678 "possible error return)."
2679 msgstr ""
2680 "POSIX.1 では、\n"
2681 "B<pthread_attr_setschedparam>() について\n"
2682 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2683 "Linux では、これらの関数は常に成功する\n"
2684 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2685 "正のエラーの返り値を処理するようにすべきである)。"
2686
2687 #. type: Plain text
2688 #: build/C/man3/pthread_attr_setschedparam.3:106
2689 msgid ""
2690 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2691 "policies supported on Linux."
2692 msgstr ""
2693 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2694 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2695
2696 #. type: Plain text
2697 #: build/C/man3/pthread_attr_setschedparam.3:121
2698 msgid ""
2699 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2700 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2701 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2702 "(3), B<pthreads>(7)"
2703 msgstr ""
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
2709 #. type: TH
2710 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2711 #, no-wrap
2712 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2713 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2714
2715 #. type: Plain text
2716 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2717 msgid ""
2718 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2719 "scheduling policy attribute in thread attributes object"
2720 msgstr ""
2721 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2722 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2723
2724 #. type: Plain text
2725 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2726 #, no-wrap
2727 msgid ""
2728 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2729 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2730 msgstr ""
2731 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2732 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2733
2734 #. type: Plain text
2735 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2736 msgid ""
2737 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2738 "attribute of the thread attributes object referred to by I<attr> to the "
2739 "value specified in I<policy>.  This attribute determines the scheduling "
2740 "policy of a thread created using the thread attributes object I<attr>."
2741 msgstr ""
2742 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2743 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2744 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2745 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2746 "作成されるスレッドのスケジューリングポリシーが決定される。"
2747
2748 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2749 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2750 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2751 #. type: Plain text
2752 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2753 msgid ""
2754 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2755 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2756 msgstr ""
2757 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2758 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2759 "である。"
2760
2761 #. type: Plain text
2762 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2763 msgid ""
2764 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2765 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2766 "by I<policy>."
2767 msgstr ""
2768 "B<pthread_attr_getschedpolicy>() は、\n"
2769 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2770 "I<policy> が指すバッファに入れて返す。"
2771
2772 #. type: Plain text
2773 #: build/C/man3/pthread_attr_setschedpolicy.3:83
2774 msgid ""
2775 "In order for the policy setting made by B<pthread_attr_setschedpolicy>()  to "
2776 "have effect when calling B<pthread_create>(3), the caller must use "
2777 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2778 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2779 msgstr ""
2780 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedpolicy>() で行っ"
2781 "たポリシー設定を有効にするには、 呼び出し側で B<pthread_attr_setinheritsched>"
2782 "(3) を使って 属性オブジェクト I<attr> の inherit-scheduler 属性を "
2783 "B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければならない。"
2784
2785 #. type: Plain text
2786 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2787 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2788 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2789
2790 #. type: Plain text
2791 #: build/C/man3/pthread_attr_setschedpolicy.3:93
2792 msgid "Invalid value in I<policy>."
2793 msgstr "I<policy> に無効な値が指定された。"
2794
2795 #.  .SH VERSIONS
2796 #.  Available since glibc 2.0.
2797 #. type: Plain text
2798 #: build/C/man3/pthread_attr_setschedpolicy.3:100
2799 msgid ""
2800 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2801 "to set the attribute to an unsupported value\") for "
2802 "B<pthread_attr_setschedpolicy>()."
2803 msgstr ""
2804 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2805 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2806 "も追加で規定されている。"
2807
2808 #. type: Plain text
2809 #: build/C/man3/pthread_attr_setschedpolicy.3:116
2810 msgid ""
2811 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2812 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2813 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2814 "(3), B<pthreads>(7)"
2815 msgstr ""
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
2821 #. type: TH
2822 #: build/C/man3/pthread_attr_setscope.3:26
2823 #, no-wrap
2824 msgid "PTHREAD_ATTR_SETSCOPE"
2825 msgstr "PTHREAD_ATTR_SETSCOPE"
2826
2827 #. type: Plain text
2828 #: build/C/man3/pthread_attr_setscope.3:30
2829 msgid ""
2830 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2831 "attribute in thread attributes object"
2832 msgstr ""
2833 "pthread_attr_setscope, pthread_attr_getscope - \n"
2834 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2835
2836 #. type: Plain text
2837 #: build/C/man3/pthread_attr_setscope.3:38
2838 #, no-wrap
2839 msgid ""
2840 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2841 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2842 msgstr ""
2843 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2844 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2845
2846 #. type: Plain text
2847 #: build/C/man3/pthread_attr_setscope.3:53
2848 msgid ""
2849 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2850 "of the thread attributes object referred to by I<attr> to the value "
2851 "specified in I<scope>.  The contention scope attribute defines the set of "
2852 "threads against which a thread competes for resources such as the CPU.  "
2853 "POSIX.1-2001 specifies two possible values for I<scope>:"
2854 msgstr ""
2855 "B<pthread_attr_setscope>() 関数は、\n"
2856 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2857 "属性を I<scope> で指定された値に設定する。\n"
2858 "contention scope 属性により、\n"
2859 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2860 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2861
2862 #. type: TP
2863 #: build/C/man3/pthread_attr_setscope.3:53
2864 #, no-wrap
2865 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2866 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2867
2868 #. type: Plain text
2869 #: build/C/man3/pthread_attr_setscope.3:61
2870 msgid ""
2871 "The thread competes for resources with all other threads in all processes on "
2872 "the system that are in the same scheduling allocation domain (a group of one "
2873 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2874 "to one another according to their scheduling policy and priority."
2875 msgstr ""
2876 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2877 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2878 "スレッドとリソースを取り合う。 \n"
2879 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2880 "優先度に基づき、互いに相対的にスケジューリングされる。"
2881
2882 #. type: TP
2883 #: build/C/man3/pthread_attr_setscope.3:61
2884 #, no-wrap
2885 msgid "B<PTHREAD_SCOPE_PROCESS>"
2886 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2887
2888 #. type: Plain text
2889 #: build/C/man3/pthread_attr_setscope.3:76
2890 msgid ""
2891 "The thread competes for resources with all other threads in the same process "
2892 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2893 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2894 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2895 "leaves it unspecified how these threads contend with other threads in other "
2896 "process on the system or with other threads in the same process that were "
2897 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2898 msgstr ""
2899 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2900 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2901 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2902 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2903 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2904 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2905 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2906 "規定されないままになっている。"
2907
2908 #. type: Plain text
2909 #: build/C/man3/pthread_attr_setscope.3:83
2910 msgid ""
2911 "POSIX.1-2001 requires that an implementation support at least one of these "
2912 "contention scopes.  Linux supports B<PTHREAD_SCOPE_SYSTEM>, but not "
2913 "B<PTHREAD_SCOPE_PROCESS>."
2914 msgstr ""
2915 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention scope の"
2916 "うち少なくとも 1 つをサポートすることだけである。 Linux は "
2917 "B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、 B<PTHREAD_SCOPE_PROCESS> はサ"
2918 "ポートしていない。"
2919
2920 #. type: Plain text
2921 #: build/C/man3/pthread_attr_setscope.3:95
2922 msgid ""
2923 "On systems that support multiple contention scopes, then, in order for the "
2924 "parameter setting made by B<pthread_attr_setscope>()  to have effect when "
2925 "calling B<pthread_create>(3), the caller must use "
2926 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2927 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2928 msgstr ""
2929 "複数の contention scope をサポートしているシステムで、 B<pthread_create>(3) "
2930 "を呼び出した際に B<pthread_attr_setscope>() で行ったパラメータ設定を有効にす"
2931 "るには、 呼び出し側で B<pthread_attr_setinheritsched>(3) を使って 属性オブ"
2932 "ジェクト I<attr> の inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定"
2933 "しておかなければならない。"
2934
2935 #. type: Plain text
2936 #: build/C/man3/pthread_attr_setscope.3:103
2937 msgid ""
2938 "The B<pthread_attr_getscope>()  function returns the contention scope "
2939 "attribute of the thread attributes object referred to by I<attr> in the "
2940 "buffer pointed to by I<scope>."
2941 msgstr ""
2942 "B<pthread_attr_getscope>() は、\n"
2943 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2944 "I<scope> が指すバッファに入れて返す。"
2945
2946 #. type: Plain text
2947 #: build/C/man3/pthread_attr_setscope.3:109
2948 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2949 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2950
2951 #. type: Plain text
2952 #: build/C/man3/pthread_attr_setscope.3:113
2953 msgid "An invalid value was specified in I<scope>."
2954 msgstr "I<scope> に無効な値が指定された。"
2955
2956 #. type: TP
2957 #: build/C/man3/pthread_attr_setscope.3:113
2958 #, no-wrap
2959 msgid "B<ENOTSUP>"
2960 msgstr "B<ENOTSUP>"
2961
2962 #. type: Plain text
2963 #: build/C/man3/pthread_attr_setscope.3:119
2964 msgid ""
2965 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2966 "supported on Linux."
2967 msgstr ""
2968 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
2969 "この値は Linux でサポートされていない。"
2970
2971 #. type: Plain text
2972 #: build/C/man3/pthread_attr_setscope.3:129
2973 msgid ""
2974 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
2975 "space thread is bound directly to a single kernel-scheduling entity.  This "
2976 "is the case on Linux for the obsolete LinuxThreads implementation and the "
2977 "modern NPTL implementation, which are both 1:1 threading implementations."
2978 msgstr ""
2979 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
2980 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
2981 "直接結び付けられる。\n"
2982 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
2983 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
2984
2985 #. type: Plain text
2986 #: build/C/man3/pthread_attr_setscope.3:132
2987 msgid ""
2988 "POSIX.1-2001 specifies that the default contention scope is implementation-"
2989 "defined."
2990 msgstr ""
2991 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
2992 "実装時で定義されるものと規定されている。"
2993
2994 #. type: Plain text
2995 #: build/C/man3/pthread_attr_setscope.3:142
2996 msgid ""
2997 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2998 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2999 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3000 msgstr ""
3001 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3002 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3003 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3004
3005 #. type: TH
3006 #: build/C/man3/pthread_attr_setstack.3:26
3007 #, no-wrap
3008 msgid "PTHREAD_ATTR_SETSTACK"
3009 msgstr "PTHREAD_ATTR_SETSTACK"
3010
3011 #. type: Plain text
3012 #: build/C/man3/pthread_attr_setstack.3:30
3013 msgid ""
3014 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
3015 "thread attributes object"
3016 msgstr ""
3017 "pthread_attr_setstack, pthread_attr_getstack - \n"
3018 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
3019
3020 #. type: Plain text
3021 #: build/C/man3/pthread_attr_setstack.3:38
3022 #, no-wrap
3023 msgid ""
3024 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3025 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3026 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3027 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3028 msgstr ""
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
3034 #. type: Plain text
3035 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_sigqueue.3:41
3036 msgid ""
3037 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3038 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3039
3040 #. type: Plain text
3041 #: build/C/man3/pthread_attr_setstack.3:50
3042 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3043 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3044
3045 #. type: Plain text
3046 #: build/C/man3/pthread_attr_setstack.3:52
3047 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3048 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3049
3050 #. type: Plain text
3051 #: build/C/man3/pthread_attr_setstack.3:68
3052 msgid ""
3053 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3054 "size attributes of the thread attributes object referred to by I<attr> to "
3055 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3056 "attributes specify the location and size of the stack that should be used by "
3057 "a thread that is created using the thread attributes object I<attr>."
3058 msgstr ""
3059 "B<pthread_attr_setstack>() 関数は、\n"
3060 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3061 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3062 "指定された値に設定する。\n"
3063 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3064 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3065
3066 #. type: Plain text
3067 #: build/C/man3/pthread_attr_setstack.3:74
3068 msgid ""
3069 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3070 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3071 "allocated buffer should be both readable and writable."
3072 msgstr ""
3073 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3074 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3075 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3076 "べきである。"
3077
3078 #. type: Plain text
3079 #: build/C/man3/pthread_attr_setstack.3:85
3080 msgid ""
3081 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3082 "size attributes of the thread attributes object referred to by I<attr> in "
3083 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3084 msgstr ""
3085 "B<pthread_attr_getstack>() 関数は、\n"
3086 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3087 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3088 "指すバッファに入れて返す。"
3089
3090 #. type: Plain text
3091 #: build/C/man3/pthread_attr_setstack.3:91
3092 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3093 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3094
3095 #. type: Plain text
3096 #: build/C/man3/pthread_attr_setstack.3:102
3097 msgid ""
3098 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3099 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3100 "stacksize> is not suitably aligned."
3101 msgstr ""
3102 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3103 "システムによっては、 I<stackaddr> か\n"
3104 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3105 "このエラーが発生する。"
3106
3107 #. type: Plain text
3108 #: build/C/man3/pthread_attr_setstack.3:110
3109 msgid ""
3110 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3111 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3112 "caller."
3113 msgstr ""
3114 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3115 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3116 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3117
3118 #. type: Plain text
3119 #: build/C/man3/pthread_attr_setstack.3:112
3120 msgid "These functions are provided by glibc since version 2.2."
3121 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3122
3123 #. type: Plain text
3124 #: build/C/man3/pthread_attr_setstack.3:122
3125 msgid ""
3126 "These functions are provided for applications that must ensure that a "
3127 "thread's stack is placed in a particular location.  For most applications, "
3128 "this is not necessary, and the use of these functions should be avoided.  "
3129 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3130 "stack size other than the default.)"
3131 msgstr ""
3132 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3133 "しなければならないアプリケーションのために提供されている。\n"
3134 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3135 "これらの関数を使うのは避けるべきである。\n"
3136 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3137 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3138
3139 #. type: Plain text
3140 #: build/C/man3/pthread_attr_setstack.3:133
3141 msgid ""
3142 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3143 "responsibility of allocating the stack.  Any guard size value that was set "
3144 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3145 "is the application's responsibility to allocate a guard area (one or more "
3146 "pages protected against reading and writing)  to handle the possibility of "
3147 "stack overflow."
3148 msgstr ""
3149 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3150 "スタックの割り当てに責任を持つ必要がある。\n"
3151 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3152 "guard size の値は無視される。\n"
3153 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3154 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3155 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3156
3157 #. type: Plain text
3158 #: build/C/man3/pthread_attr_setstack.3:144
3159 msgid ""
3160 "The address specified in I<stackaddr> should be suitably aligned: for full "
3161 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3162 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3163 "should also be a multiple of the system page size."
3164 msgstr ""
3165 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3166 "完全な移植性を持たせるためには、\n"
3167 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3168 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3169 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3170
3171 #. type: Plain text
3172 #: build/C/man3/pthread_attr_setstack.3:153
3173 msgid ""
3174 "If I<attr> is used to create multiple threads, then the caller must change "
3175 "the stack address attribute between calls to B<pthread_create>(3); "
3176 "otherwise, the threads will attempt to use the same memory area for their "
3177 "stacks, and chaos will ensue."
3178 msgstr ""
3179 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3180 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3181 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3182 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3183 "使おうとするため、訳の分からない状況が発生してしまう。"
3184
3185 #. type: Plain text
3186 #: build/C/man3/pthread_attr_setstack.3:168
3187 msgid ""
3188 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3189 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3190 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3191 msgstr ""
3192 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3193 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3194 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3195
3196 #. type: TH
3197 #: build/C/man3/pthread_attr_setstackaddr.3:26
3198 #, no-wrap
3199 msgid "PTHREAD_ATTR_SETSTACKADDR"
3200 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3201
3202 #. type: Plain text
3203 #: build/C/man3/pthread_attr_setstackaddr.3:30
3204 msgid ""
3205 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3206 "attribute in thread attributes object"
3207 msgstr ""
3208 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3209 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3210
3211 #. type: Plain text
3212 #: build/C/man3/pthread_attr_setstackaddr.3:38
3213 #, no-wrap
3214 msgid ""
3215 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3216 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3217 msgstr ""
3218 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3219 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3220
3221 #. type: Plain text
3222 #: build/C/man3/pthread_attr_setstackaddr.3:49
3223 msgid ""
3224 "These functions are obsolete: B<do not use them.> Use "
3225 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3226 msgstr ""
3227 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3228 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3229 "うこと。"
3230
3231 #. type: Plain text
3232 #: build/C/man3/pthread_attr_setstackaddr.3:60
3233 msgid ""
3234 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3235 "attribute of the thread attributes object referred to by I<attr> to the "
3236 "value specified in I<stackaddr>.  This attribute specifies the location of "
3237 "the stack that should be used by a thread that is created using the thread "
3238 "attributes object I<attr>."
3239 msgstr ""
3240 "B<pthread_attr_setstackaddr>() 関数は、\n"
3241 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3242 "属性を I<stackaddr> で指定された値に設定する。\n"
3243 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3244 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3245
3246 #. type: Plain text
3247 #: build/C/man3/pthread_attr_setstackaddr.3:66
3248 msgid ""
3249 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3250 "that was allocated by the caller.  The pages of the allocated buffer should "
3251 "be both readable and writable."
3252 msgstr ""
3253 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3254 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3255 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3256 "なっているべきである。"
3257
3258 #. type: Plain text
3259 #: build/C/man3/pthread_attr_setstackaddr.3:74
3260 msgid ""
3261 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3262 "attribute of the thread attributes object referred to by I<attr> in the "
3263 "buffer pointed to by I<stackaddr>."
3264 msgstr ""
3265 "B<pthread_attr_getstackaddr>() は、\n"
3266 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3267 "I<stackaddr> が指すバッファに入れて返す。"
3268
3269 #. type: Plain text
3270 #: build/C/man3/pthread_attr_setstackaddr.3:81
3271 msgid ""
3272 "No errors are defined (but applications should nevertheless handle a "
3273 "possible error return)."
3274 msgstr ""
3275 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3276 "返り値を処理するようにすべきである)。"
3277
3278 #. type: Plain text
3279 #: build/C/man3/pthread_attr_setstackaddr.3:86
3280 msgid ""
3281 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3282 "POSIX.1-2008 removes the specification of these functions."
3283 msgstr ""
3284 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3285 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3286
3287 #. type: Plain text
3288 #: build/C/man3/pthread_attr_setstackaddr.3:110
3289 msgid ""
3290 "I<Do not use these functions!> They cannot be portably used, since they "
3291 "provide no way of specifying the direction of growth or the range of the "
3292 "stack.  For example, on architectures with a stack that grows downward, "
3293 "I<stackaddr> specifies the next address past the I<highest> address of the "
3294 "allocated stack area.  However, on architectures with a stack that grows "
3295 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3296 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3297 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3298 "in the allocated stack area (and the I<stacksize> argument specifies the "
3299 "range of the stack)."
3300 msgstr ""
3301 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3302 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3303 "かを指定する手段が提供されていないからである。\n"
3304 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3305 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3306 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3307 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3308 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3309 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3310 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3311 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3312
3313 #. type: Plain text
3314 #: build/C/man3/pthread_attr_setstackaddr.3:116
3315 msgid ""
3316 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3317 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3318 msgstr ""
3319 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3320 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3321
3322 #. type: TH
3323 #: build/C/man3/pthread_attr_setstacksize.3:26
3324 #, no-wrap
3325 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3326 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3327
3328 #. type: TH
3329 #: build/C/man3/pthread_attr_setstacksize.3:26
3330 #, no-wrap
3331 msgid "2012-03-15"
3332 msgstr "2012-03-15"
3333
3334 #. type: Plain text
3335 #: build/C/man3/pthread_attr_setstacksize.3:30
3336 msgid ""
3337 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3338 "attribute in thread attributes object"
3339 msgstr ""
3340 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3341 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3342
3343 #. type: Plain text
3344 #: build/C/man3/pthread_attr_setstacksize.3:38
3345 #, no-wrap
3346 msgid ""
3347 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3348 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3349 msgstr ""
3350 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3351 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3352
3353 #. type: Plain text
3354 #: build/C/man3/pthread_attr_setstacksize.3:49
3355 msgid ""
3356 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3357 "of the thread attributes object referred to by I<attr> to the value "
3358 "specified in I<stacksize>."
3359 msgstr ""
3360 "B<pthread_attr_setstacksize>() 関数は、\n"
3361 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3362 "属性を I<stacksize> で指定された値に設定する。"
3363
3364 #. type: Plain text
3365 #: build/C/man3/pthread_attr_setstacksize.3:53
3366 msgid ""
3367 "The stack size attribute determines the minimum size (in bytes) that will be "
3368 "allocated for threads created using the thread attributes object I<attr>."
3369 msgstr ""
3370 "スタックサイズ属性により、\n"
3371 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3372 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3373
3374 #. type: Plain text
3375 #: build/C/man3/pthread_attr_setstacksize.3:61
3376 msgid ""
3377 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3378 "attribute of the thread attributes object referred to by I<attr> in the "
3379 "buffer pointed to by I<stacksize>."
3380 msgstr ""
3381 "B<pthread_attr_getstacksize>() は、\n"
3382 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3383 "I<stacksize> が指すバッファに入れて返す。"
3384
3385 #. type: Plain text
3386 #: build/C/man3/pthread_attr_setstacksize.3:67
3387 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3388 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3389
3390 #. type: Plain text
3391 #: build/C/man3/pthread_attr_setstacksize.3:72
3392 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3393 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3394
3395 #.  e.g., MacOS
3396 #. type: Plain text
3397 #: build/C/man3/pthread_attr_setstacksize.3:81
3398 msgid ""
3399 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3400 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3401 msgstr ""
3402 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3403 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3404 "エラー B<EINVAL> で失敗する。"
3405
3406 #. type: Plain text
3407 #: build/C/man3/pthread_attr_setstacksize.3:88
3408 msgid ""
3409 "For details on the default stack size of new threads, see B<pthread_create>"
3410 "(3)."
3411 msgstr ""
3412 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3413 "B<pthread_create>(3) を参照。"
3414
3415 #. type: Plain text
3416 #: build/C/man3/pthread_attr_setstacksize.3:91
3417 msgid ""
3418 "A thread's stack size is fixed at the time of thread creation.  Only the "
3419 "main thread can dynamically grow its stack."
3420 msgstr ""
3421 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3422 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3423
3424 #. type: Plain text
3425 #: build/C/man3/pthread_attr_setstacksize.3:96
3426 msgid ""
3427 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3428 "the size and location of a caller-allocated stack that is to be used by a "
3429 "thread."
3430 msgstr ""
3431 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3432 "アプリケーションは、スレッドが使用するスタックとして、\n"
3433 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3434
3435 #. type: Plain text
3436 #: build/C/man3/pthread_attr_setstacksize.3:108
3437 msgid ""
3438 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3439 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3440 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3441 "stack will be at least I<stacksize> bytes."
3442 msgstr ""
3443 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3444 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3445 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3446 "これは POSIX.1-2001 に違反している。\n"
3447 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3448 "少なくとも I<stacksize> バイトになると書かれている。"
3449
3450 #. type: Plain text
3451 #: build/C/man3/pthread_attr_setstacksize.3:111
3452 #: build/C/man3/pthread_join.3:127
3453 msgid "See B<pthread_create>(3)."
3454 msgstr "B<pthread_create>(3) を参照。"
3455
3456 #. type: Plain text
3457 #: build/C/man3/pthread_attr_setstacksize.3:118
3458 msgid ""
3459 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3460 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3461 msgstr ""
3462 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3463 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3464
3465 #. type: TH
3466 #: build/C/man3/pthread_cancel.3:26
3467 #, no-wrap
3468 msgid "PTHREAD_CANCEL"
3469 msgstr "PTHREAD_CANCEL"
3470
3471 #. type: TH
3472 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3473 #, no-wrap
3474 msgid "2008-11-17"
3475 msgstr "2008-11-17"
3476
3477 #. type: Plain text
3478 #: build/C/man3/pthread_cancel.3:29
3479 msgid "pthread_cancel - send a cancellation request to a thread"
3480 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3481
3482 #. type: Plain text
3483 #: build/C/man3/pthread_cancel.3:34
3484 #, no-wrap
3485 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3486 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3487
3488 #. type: Plain text
3489 #: build/C/man3/pthread_cancel.3:49
3490 msgid ""
3491 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3492 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3493 "request depends on two attributes that are under the control of that thread: "
3494 "its cancelability I<state> and I<type>."
3495 msgstr ""
3496 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3497 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3498 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3499 "I<state> と I<type>により決まる。"
3500
3501 #. type: Plain text
3502 #: build/C/man3/pthread_cancel.3:61
3503 msgid ""
3504 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3505 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3506 "has disabled cancellation, then a cancellation request remains queued until "
3507 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3508 "its cancelability type determines when cancellation occurs."
3509 msgstr ""
3510 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3511 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3512 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3513 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3514 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3515 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3516
3517 #. type: Plain text
3518 #: build/C/man3/pthread_cancel.3:77
3519 msgid ""
3520 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3521 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3522 "Asynchronous cancelability means that the thread can be canceled at any time "
3523 "(usually immediately, but the system does not guarantee this).  Deferred "
3524 "cancelability means that cancellation will be delayed until the thread next "
3525 "calls a function that is a I<cancellation point>.  A list of functions that "
3526 "are or may be cancellation points is provided in I<pthreads>(7)."
3527 msgstr ""
3528 "スレッドのキャンセル種別 (cancelability type) は\n"
3529 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3530 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3531 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3532 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3533 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3534 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3535 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3536 "遅延される。取り消しポイントに設定されていたり設定\n"
3537 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3538
3539 #. type: Plain text
3540 #: build/C/man3/pthread_cancel.3:81
3541 msgid ""
3542 "When a cancellation requested is acted on, the following steps occur for "
3543 "I<thread> (in this order):"
3544 msgstr ""
3545 "キャンセル要求が実行されると、\n"
3546 "I<thread> では以下のステップが (この順序で) 行われる。"
3547
3548 #. type: IP
3549 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3550 #, no-wrap
3551 msgid "1."
3552 msgstr "1."
3553
3554 #. type: Plain text
3555 #: build/C/man3/pthread_cancel.3:86
3556 msgid ""
3557 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3558 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3559 msgstr ""
3560 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3561 "取り出され (pop され)、呼び出される。\n"
3562 "(B<pthread_cleanup_push>(3) 参照)"
3563
3564 #. type: IP
3565 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3566 #, no-wrap
3567 msgid "2."
3568 msgstr "2."
3569
3570 #. type: Plain text
3571 #: build/C/man3/pthread_cancel.3:91
3572 msgid ""
3573 "Thread-specific data destructors are called, in an unspecified order.  (See "
3574 "B<pthread_key_create>(3).)"
3575 msgstr ""
3576 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3577 "呼び出し順序は規定されていない。\n"
3578 "(B<pthread_key_create>(3) 参照)"
3579
3580 #. type: IP
3581 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3582 #, no-wrap
3583 msgid "3."
3584 msgstr "3."
3585
3586 #. type: Plain text
3587 #: build/C/man3/pthread_cancel.3:95
3588 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3589 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3590
3591 #. type: Plain text
3592 #: build/C/man3/pthread_cancel.3:103
3593 msgid ""
3594 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3595 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3596 "caller whether the cancellation request was successfully queued."
3597 msgstr ""
3598 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3599 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3600 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3601
3602 #. type: Plain text
3603 #: build/C/man3/pthread_cancel.3:112
3604 msgid ""
3605 "After a canceled thread has terminated, a join with that thread using "
3606 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3607 "status.  (Joining with a thread is the only way to know that cancellation "
3608 "has completed.)"
3609 msgstr ""
3610 "キャンセルされたスレッドが終了された後に、\n"
3611 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3612 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3613 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3614
3615 #. type: Plain text
3616 #: build/C/man3/pthread_cancel.3:117
3617 msgid ""
3618 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3619 "error number."
3620 msgstr ""
3621 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3622 "エラーの場合、0 以外のエラー番号を返す。"
3623
3624 #. type: TP
3625 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3626 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3627 #: build/C/man3/pthread_kill.3:61 build/C/man3/pthread_setaffinity_np.3:114
3628 #: build/C/man3/pthread_setschedparam.3:114
3629 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3630 #, no-wrap
3631 msgid "B<ESRCH>"
3632 msgstr "B<ESRCH>"
3633
3634 #. type: Plain text
3635 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3636 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3637 #: build/C/man3/pthread_kill.3:66 build/C/man3/pthread_setaffinity_np.3:119
3638 #: build/C/man3/pthread_setschedparam.3:119
3639 #: build/C/man3/pthread_setschedprio.3:75
3640 msgid "No thread with the ID I<thread> could be found."
3641 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3642
3643 #. type: Plain text
3644 #: build/C/man3/pthread_cancel.3:135
3645 msgid ""
3646 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3647 "threading implementation, the first real-time signal (i.e., signal 32) is "
3648 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3649 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3650 msgstr ""
3651 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3652 "は、\n"
3653 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3654 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3655 "ム\n"
3656 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3657
3658 #. type: Plain text
3659 #: build/C/man3/pthread_cancel.3:141
3660 msgid ""
3661 "The program below creates a thread and then cancels it.  The main thread "
3662 "joins with the canceled thread to check that its exit status was "
3663 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3664 "run the program:"
3665 msgstr ""
3666 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3667 "る。\n"
3668 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3669 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3670 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3671
3672 #. type: Plain text
3673 #: build/C/man3/pthread_cancel.3:149
3674 #, no-wrap
3675 msgid ""
3676 "$ ./a.out\n"
3677 "thread_func(): started; cancellation disabled\n"
3678 "main(): sending cancellation request\n"
3679 "thread_func(): about to enable cancellation\n"
3680 "main(): thread was canceled\n"
3681 msgstr ""
3682 "$ ./a.out\n"
3683 "thread_func(): started; cancellation disabled\n"
3684 "main(): sending cancellation request\n"
3685 "thread_func(): about to enable cancellation\n"
3686 "main(): thread was canceled\n"
3687
3688 #. type: Plain text
3689 #: build/C/man3/pthread_cancel.3:159
3690 #, no-wrap
3691 msgid ""
3692 "#include E<lt>pthread.hE<gt>\n"
3693 "#include E<lt>stdio.hE<gt>\n"
3694 "#include E<lt>errno.hE<gt>\n"
3695 "#include E<lt>stdlib.hE<gt>\n"
3696 "#include E<lt>unistd.hE<gt>\n"
3697 msgstr ""
3698 "#include E<lt>pthread.hE<gt>\n"
3699 "#include E<lt>stdio.hE<gt>\n"
3700 "#include E<lt>errno.hE<gt>\n"
3701 "#include E<lt>stdlib.hE<gt>\n"
3702 "#include E<lt>unistd.hE<gt>\n"
3703
3704 #. type: Plain text
3705 #: build/C/man3/pthread_cancel.3:167
3706 #, no-wrap
3707 msgid ""
3708 "static void *\n"
3709 "thread_func(void *ignored_argument)\n"
3710 "{\n"
3711 "    int s;\n"
3712 msgstr ""
3713 "static void *\n"
3714 "thread_func(void *ignored_argument)\n"
3715 "{\n"
3716 "    int s;\n"
3717
3718 #. type: Plain text
3719 #: build/C/man3/pthread_cancel.3:170
3720 #, no-wrap
3721 msgid ""
3722 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3723 "       immediately react to a cancellation request */\n"
3724 msgstr ""
3725 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3726 "       immediately react to a cancellation request */\n"
3727
3728 #. type: Plain text
3729 #: build/C/man3/pthread_cancel.3:174
3730 #, no-wrap
3731 msgid ""
3732 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3733 "    if (s != 0)\n"
3734 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3735 msgstr ""
3736 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3737 "    if (s != 0)\n"
3738 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3739
3740 #. type: Plain text
3741 #: build/C/man3/pthread_cancel.3:178
3742 #, no-wrap
3743 msgid ""
3744 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3745 "    sleep(5);\n"
3746 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3747 msgstr ""
3748 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3749 "    sleep(5);\n"
3750 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3751
3752 #. type: Plain text
3753 #: build/C/man3/pthread_cancel.3:182
3754 #, no-wrap
3755 msgid ""
3756 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3757 "    if (s != 0)\n"
3758 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3759 msgstr ""
3760 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3761 "    if (s != 0)\n"
3762 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3763
3764 #. type: Plain text
3765 #: build/C/man3/pthread_cancel.3:184
3766 #, no-wrap
3767 msgid "    /* sleep() is a cancellation point */\n"
3768 msgstr "    /* sleep() is a cancellation point */\n"
3769
3770 #. type: Plain text
3771 #: build/C/man3/pthread_cancel.3:186
3772 #, no-wrap
3773 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3774 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3775
3776 #. type: Plain text
3777 #: build/C/man3/pthread_cancel.3:188
3778 #, no-wrap
3779 msgid "    /* Should never get here */\n"
3780 msgstr "    /* Should never get here */\n"
3781
3782 #. type: Plain text
3783 #: build/C/man3/pthread_cancel.3:192
3784 #, no-wrap
3785 msgid ""
3786 "    printf(\"thread_func(): not canceled!\\en\");\n"
3787 "    return NULL;\n"
3788 "}\n"
3789 msgstr ""
3790 "    printf(\"thread_func(): not canceled!\\en\");\n"
3791 "    return NULL;\n"
3792 "}\n"
3793
3794 #. type: Plain text
3795 #: build/C/man3/pthread_cancel.3:199
3796 #, no-wrap
3797 msgid ""
3798 "int\n"
3799 "main(void)\n"
3800 "{\n"
3801 "    pthread_t thr;\n"
3802 "    void *res;\n"
3803 "    int s;\n"
3804 msgstr ""
3805 "int\n"
3806 "main(void)\n"
3807 "{\n"
3808 "    pthread_t thr;\n"
3809 "    void *res;\n"
3810 "    int s;\n"
3811
3812 #. type: Plain text
3813 #: build/C/man3/pthread_cancel.3:201
3814 #, no-wrap
3815 msgid "    /* Start a thread and then send it a cancellation request */\n"
3816 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3817
3818 #. type: Plain text
3819 #: build/C/man3/pthread_cancel.3:205
3820 #, no-wrap
3821 msgid ""
3822 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3823 "    if (s != 0)\n"
3824 "        handle_error_en(s, \"pthread_create\");\n"
3825 msgstr ""
3826 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3827 "    if (s != 0)\n"
3828 "        handle_error_en(s, \"pthread_create\");\n"
3829
3830 #. type: Plain text
3831 #: build/C/man3/pthread_cancel.3:207
3832 #, no-wrap
3833 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3834 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3835
3836 #. type: Plain text
3837 #: build/C/man3/pthread_cancel.3:212
3838 #, no-wrap
3839 msgid ""
3840 "    printf(\"main(): sending cancellation request\\en\");\n"
3841 "    s = pthread_cancel(thr);\n"
3842 "    if (s != 0)\n"
3843 "        handle_error_en(s, \"pthread_cancel\");\n"
3844 msgstr ""
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
3850 #. type: Plain text
3851 #: build/C/man3/pthread_cancel.3:214
3852 #, no-wrap
3853 msgid "    /* Join with thread to see what its exit status was */\n"
3854 msgstr "    /* Join with thread to see what its exit status was */\n"
3855
3856 #. type: Plain text
3857 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
3858 #, no-wrap
3859 msgid ""
3860 "    s = pthread_join(thr, &res);\n"
3861 "    if (s != 0)\n"
3862 "        handle_error_en(s, \"pthread_join\");\n"
3863 msgstr ""
3864 "    s = pthread_join(thr, &res);\n"
3865 "    if (s != 0)\n"
3866 "        handle_error_en(s, \"pthread_join\");\n"
3867
3868 #. type: Plain text
3869 #: build/C/man3/pthread_cancel.3:225
3870 #, no-wrap
3871 msgid ""
3872 "    if (res == PTHREAD_CANCELED)\n"
3873 "        printf(\"main(): thread was canceled\\en\");\n"
3874 "    else\n"
3875 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3876 "    exit(EXIT_SUCCESS);\n"
3877 "}\n"
3878 msgstr ""
3879 "    if (res == PTHREAD_CANCELED)\n"
3880 "        printf(\"main(): thread was canceled\\en\");\n"
3881 "    else\n"
3882 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3883 "    exit(EXIT_SUCCESS);\n"
3884 "}\n"
3885
3886 #. type: Plain text
3887 #: build/C/man3/pthread_cancel.3:238
3888 msgid ""
3889 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3890 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3891 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3892 msgstr ""
3893 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3894 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3895 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3896
3897 #. type: TH
3898 #: build/C/man3/pthread_cleanup_push.3:26
3899 #, no-wrap
3900 msgid "PTHREAD_CLEANUP_PUSH"
3901 msgstr "PTHREAD_CLEANUP_PUSH"
3902
3903 #. type: TH
3904 #: build/C/man3/pthread_cleanup_push.3:26
3905 #: build/C/man3/pthread_setcancelstate.3:26
3906 #, no-wrap
3907 msgid "2008-11-24"
3908 msgstr "2008-11-24"
3909
3910 #. type: Plain text
3911 #: build/C/man3/pthread_cleanup_push.3:30
3912 msgid ""
3913 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3914 "clean-up handlers"
3915 msgstr ""
3916 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3917 "キャンセルクリーンアップハンドラの push/pop を行う"
3918
3919 #. type: Plain text
3920 #: build/C/man3/pthread_cleanup_push.3:37
3921 #, no-wrap
3922 msgid ""
3923 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3924 "B<                          void *>I<arg>B<);>\n"
3925 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3926 msgstr ""
3927 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3928 "B<                          void *>I<arg>B<);>\n"
3929 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3930
3931 #. type: Plain text
3932 #: build/C/man3/pthread_cleanup_push.3:48
3933 msgid ""
3934 "These functions manipulate the calling thread's stack of thread-cancellation "
3935 "clean-up handlers.  A clean-up handler is a function that is automatically "
3936 "executed when a thread is canceled (or in various other circumstances "
3937 "described below); it might, for example, unlock a mutex so that it becomes "
3938 "available to other threads in the process."
3939 msgstr ""
3940 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3941 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3942 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3943 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3944 "他のスレッドが利用できるようにする関数などが考えられる。"
3945
3946 #. type: Plain text
3947 #: build/C/man3/pthread_cleanup_push.3:59
3948 msgid ""
3949 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3950 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3951 "be given I<arg> as its argument."
3952 msgstr ""
3953 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3954 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3955 "起動される際には、 I<arg> が関数の引き数と渡される。"
3956
3957 #. type: Plain text
3958 #: build/C/man3/pthread_cleanup_push.3:66
3959 msgid ""
3960 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3961 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3962 "nonzero."
3963 msgstr ""
3964 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3965 "スタックの一番上のルーチンを削除する。\n"
3966 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3967
3968 #. type: Plain text
3969 #: build/C/man3/pthread_cleanup_push.3:69
3970 msgid ""
3971 "A cancellation clean-up handler is popped from the stack and executed in the "
3972 "following circumstances:"
3973 msgstr ""
3974 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3975 "スタックから取り出され実行される。"
3976
3977 #. type: Plain text
3978 #: build/C/man3/pthread_cleanup_push.3:73
3979 msgid ""
3980 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3981 "and executed in the reverse of the order in which they were pushed onto the "
3982 "stack."
3983 msgstr ""
3984 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3985 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3986 "実行は、スタックに登録されたのと逆の順序で行われる。"
3987
3988 #. type: Plain text
3989 #: build/C/man3/pthread_cleanup_push.3:83
3990 msgid ""
3991 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
3992 "handlers are executed as described in the preceding point.  (Clean-up "
3993 "handlers are I<not> called if the thread terminates by performing a "
3994 "I<return> from the thread start function.)"
3995 msgstr ""
3996 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
3997 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
3998 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
3999 "は、クリーンアップハンドラはI<呼び出されない>。)"
4000
4001 #. type: Plain text
4002 #: build/C/man3/pthread_cleanup_push.3:89
4003 msgid ""
4004 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
4005 "argument, the top-most clean-up handler is popped and executed."
4006 msgstr ""
4007 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
4008 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
4009 "実行される。"
4010
4011 #. type: Plain text
4012 #: build/C/man3/pthread_cleanup_push.3:101
4013 msgid ""
4014 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4015 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4016 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4017 "calls to these functions are paired within the same function, and at the "
4018 "same lexical nesting level.  (In other words, a clean-up handler is "
4019 "established only during the execution of a specified section of code.)"
4020 msgstr ""
4021 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4022 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4023 "して実装することを許容している。\n"
4024 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4025 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4026 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4027 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4028
4029 #. type: Plain text
4030 #: build/C/man3/pthread_cleanup_push.3:121
4031 msgid ""
4032 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4033 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
4034 "()  without the matching call of the pair since the jump buffer was filled "
4035 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
4036 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
4037 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
4038 "(3))  inside the handler."
4039 msgstr ""
4040 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4041 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4042 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4043 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4044 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4045 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4046 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4047 "結果になるかは不定である。"
4048
4049 #. type: Plain text
4050 #: build/C/man3/pthread_cleanup_push.3:123
4051 msgid "These functions do not return a value."
4052 msgstr "これらの関数は値を返さない。"
4053
4054 #.  SH VERSIONS
4055 #.  Available since glibc 2.0
4056 #. type: Plain text
4057 #: build/C/man3/pthread_cleanup_push.3:127
4058 msgid "There are no errors."
4059 msgstr "エラーはない。"
4060
4061 #. type: Plain text
4062 #: build/C/man3/pthread_cleanup_push.3:140
4063 msgid ""
4064 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4065 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4066 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4067 "declared within the scope of paired calls to these functions will be visible "
4068 "within only that scope."
4069 msgstr ""
4070 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4071 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4072 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4073 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4074 "ということを意味している。"
4075
4076 #.  The text was actually added in the 2004 TC2
4077 #. type: Plain text
4078 #: build/C/man3/pthread_cleanup_push.3:155
4079 msgid ""
4080 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4081 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4082 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4083 "avoid doing this."
4084 msgstr ""
4085 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4086 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4087 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4088 "不定であると書かれている。\n"
4089 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4090
4091 #. type: Plain text
4092 #: build/C/man3/pthread_cleanup_push.3:170
4093 msgid ""
4094 "The program below provides a simple example of the use of the functions "
4095 "described in this page.  The program creates a thread that executes a loop "
4096 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4097 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4098 "what command-line arguments are supplied, the main thread sends the other "
4099 "thread a cancellation request, or sets a global variable that causes the "
4100 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4101 msgstr ""
4102 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4103 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4104 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4105 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4106 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4107 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4108 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4109 "設定したりする。"
4110
4111 #. type: Plain text
4112 #: build/C/man3/pthread_cleanup_push.3:173
4113 msgid ""
4114 "In the following shell session, the main thread sends a cancellation request "
4115 "to the other thread:"
4116 msgstr ""
4117 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4118 "キャンセル要求を送信する。"
4119
4120 #. type: Plain text
4121 #: build/C/man3/pthread_cleanup_push.3:183
4122 #, no-wrap
4123 msgid ""
4124 "$ B<./a.out>\n"
4125 "New thread started\n"
4126 "cnt = 0\n"
4127 "cnt = 1\n"
4128 "Canceling thread\n"
4129 "Called clean-up handler\n"
4130 "Thread was canceled; cnt = 0\n"
4131 msgstr ""
4132 "$ B<./a.out>\n"
4133 "New thread started\n"
4134 "cnt = 0\n"
4135 "cnt = 1\n"
4136 "Canceling thread\n"
4137 "Called clean-up handler\n"
4138 "Thread was canceled; cnt = 0\n"
4139
4140 #. type: Plain text
4141 #: build/C/man3/pthread_cleanup_push.3:191
4142 msgid ""
4143 "From the above, we see that the thread was canceled, and that the "
4144 "cancellation clean-up handler was called and it reset the value of the "
4145 "global variable I<cnt> to 0."
4146 msgstr ""
4147 "上記の実行例から、スレッドがキャンセルされ、\n"
4148 "キャンセルクリーンアップハンドラが呼び出され、\n"
4149 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4150
4151 #. type: Plain text
4152 #: build/C/man3/pthread_cleanup_push.3:194
4153 msgid ""
4154 "In the next run, the main program sets a global variable that causes other "
4155 "thread to terminate normally:"
4156 msgstr ""
4157 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4158 "もう一つのスレッドが正常終了するようにしている。"
4159
4160 #. type: Plain text
4161 #: build/C/man3/pthread_cleanup_push.3:202
4162 #, no-wrap
4163 msgid ""
4164 "$ B<./a.out x>\n"
4165 "New thread started\n"
4166 "cnt = 0\n"
4167 "cnt = 1\n"
4168 "Thread terminated normally; cnt = 2\n"
4169 msgstr ""
4170 "$ B<./a.out x>\n"
4171 "New thread started\n"
4172 "cnt = 0\n"
4173 "cnt = 1\n"
4174 "Thread terminated normally; cnt = 2\n"
4175
4176 #. type: Plain text
4177 #: build/C/man3/pthread_cleanup_push.3:210
4178 msgid ""
4179 "From the above, we see that the clean-up handler was not executed (because "
4180 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4181 msgstr ""
4182 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4183 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4184 "分かる。"
4185
4186 #. type: Plain text
4187 #: build/C/man3/pthread_cleanup_push.3:215
4188 msgid ""
4189 "In the next run, the main program sets a global variable that causes the "
4190 "other thread to terminate normally, and supplies a nonzero value for "
4191 "I<cleanup_pop_arg>:"
4192 msgstr ""
4193 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4194 "もう一つのスレッドが正常終了するようにし、さらに\n"
4195 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4196
4197 #. type: Plain text
4198 #: build/C/man3/pthread_cleanup_push.3:224
4199 #, no-wrap
4200 msgid ""
4201 "$ B<./a.out x 1>\n"
4202 "New thread started\n"
4203 "cnt = 0\n"
4204 "cnt = 1\n"
4205 "Called clean-up handler\n"
4206 "Thread terminated normally; cnt = 0\n"
4207 msgstr ""
4208 "$ B<./a.out x 1>\n"
4209 "New thread started\n"
4210 "cnt = 0\n"
4211 "cnt = 1\n"
4212 "Called clean-up handler\n"
4213 "Thread terminated normally; cnt = 0\n"
4214
4215 #. type: Plain text
4216 #: build/C/man3/pthread_cleanup_push.3:231
4217 msgid ""
4218 "In the above, we see that although the thread was not canceled, the clean-up "
4219 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4220 "()  was nonzero."
4221 msgstr ""
4222 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4223 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4224 "に 0 以外を渡したからである。"
4225
4226 #. type: Plain text
4227 #: build/C/man3/pthread_cleanup_push.3:240
4228 #, no-wrap
4229 msgid ""
4230 "#include E<lt>pthread.hE<gt>\n"
4231 "#include E<lt>sys/types.hE<gt>\n"
4232 "#include E<lt>stdio.hE<gt>\n"
4233 "#include E<lt>stdlib.hE<gt>\n"
4234 "#include E<lt>unistd.hE<gt>\n"
4235 "#include E<lt>errno.hE<gt>\n"
4236 msgstr ""
4237 "#include E<lt>pthread.hE<gt>\n"
4238 "#include E<lt>sys/types.hE<gt>\n"
4239 "#include E<lt>stdio.hE<gt>\n"
4240 "#include E<lt>stdlib.hE<gt>\n"
4241 "#include E<lt>unistd.hE<gt>\n"
4242 "#include E<lt>errno.hE<gt>\n"
4243
4244 #. type: Plain text
4245 #: build/C/man3/pthread_cleanup_push.3:247
4246 #, no-wrap
4247 msgid ""
4248 "static int done = 0;\n"
4249 "static int cleanup_pop_arg = 0;\n"
4250 "static int cnt = 0;\n"
4251 msgstr ""
4252 "static int done = 0;\n"
4253 "static int cleanup_pop_arg = 0;\n"
4254 "static int cnt = 0;\n"
4255
4256 #. type: Plain text
4257 #: build/C/man3/pthread_cleanup_push.3:254
4258 #, no-wrap
4259 msgid ""
4260 "static void\n"
4261 "cleanup_handler(void *arg)\n"
4262 "{\n"
4263 "    printf(\"Called clean-up handler\\en\");\n"
4264 "    cnt = 0;\n"
4265 "}\n"
4266 msgstr ""
4267 "static void\n"
4268 "cleanup_handler(void *arg)\n"
4269 "{\n"
4270 "    printf(\"Called clean-up handler\\en\");\n"
4271 "    cnt = 0;\n"
4272 "}\n"
4273
4274 #. type: Plain text
4275 #: build/C/man3/pthread_cleanup_push.3:259
4276 #, no-wrap
4277 msgid ""
4278 "static void *\n"
4279 "thread_start(void *arg)\n"
4280 "{\n"
4281 "    time_t start, curr;\n"
4282 msgstr ""
4283 "static void *\n"
4284 "thread_start(void *arg)\n"
4285 "{\n"
4286 "    time_t start, curr;\n"
4287
4288 #. type: Plain text
4289 #: build/C/man3/pthread_cleanup_push.3:261
4290 #, no-wrap
4291 msgid "    printf(\"New thread started\\en\");\n"
4292 msgstr "    printf(\"New thread started\\en\");\n"
4293
4294 #. type: Plain text
4295 #: build/C/man3/pthread_cleanup_push.3:263
4296 #, no-wrap
4297 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4298 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4299
4300 #. type: Plain text
4301 #: build/C/man3/pthread_cleanup_push.3:265
4302 #, no-wrap
4303 msgid "    curr = start = time(NULL);\n"
4304 msgstr "    curr = start = time(NULL);\n"
4305
4306 #. type: Plain text
4307 #: build/C/man3/pthread_cleanup_push.3:274
4308 #, no-wrap
4309 msgid ""
4310 "    while (!done) {\n"
4311 "        pthread_testcancel();           /* A cancellation point */\n"
4312 "        if (curr E<lt> time(NULL)) {\n"
4313 "            curr = time(NULL);\n"
4314 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4315 "            cnt++;\n"
4316 "        }\n"
4317 "    }\n"
4318 msgstr ""
4319 "    while (!done) {\n"
4320 "        pthread_testcancel();           /* A cancellation point */\n"
4321 "        if (curr E<lt> time(NULL)) {\n"
4322 "            curr = time(NULL);\n"
4323 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4324 "            cnt++;\n"
4325 "        }\n"
4326 "    }\n"
4327
4328 #. type: Plain text
4329 #: build/C/man3/pthread_cleanup_push.3:278
4330 #, no-wrap
4331 msgid ""
4332 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4333 "    return NULL;\n"
4334 "}\n"
4335 msgstr ""
4336 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4337 "    return NULL;\n"
4338 "}\n"
4339
4340 #. type: Plain text
4341 #: build/C/man3/pthread_cleanup_push.3:285
4342 #, no-wrap
4343 msgid ""
4344 "int\n"
4345 "main(int argc, char *argv[])\n"
4346 "{\n"
4347 "    pthread_t thr;\n"
4348 "    int s;\n"
4349 "    void *res;\n"
4350 msgstr ""
4351 "int\n"
4352 "main(int argc, char *argv[])\n"
4353 "{\n"
4354 "    pthread_t thr;\n"
4355 "    int s;\n"
4356 "    void *res;\n"
4357
4358 #. type: Plain text
4359 #: build/C/man3/pthread_cleanup_push.3:289
4360 #, no-wrap
4361 msgid ""
4362 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4363 "    if (s != 0)\n"
4364 "        handle_error_en(s, \"pthread_create\");\n"
4365 msgstr ""
4366 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4367 "    if (s != 0)\n"
4368 "        handle_error_en(s, \"pthread_create\");\n"
4369
4370 #. type: Plain text
4371 #: build/C/man3/pthread_cleanup_push.3:291
4372 #, no-wrap
4373 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4374 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4375
4376 #. type: Plain text
4377 #: build/C/man3/pthread_cleanup_push.3:296
4378 #, no-wrap
4379 msgid ""
4380 "    if (argc E<gt> 1) {\n"
4381 "        if (argc E<gt> 2)\n"
4382 "            cleanup_pop_arg = atoi(argv[2]);\n"
4383 "        done = 1;\n"
4384 msgstr ""
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
4390 #. type: Plain text
4391 #: build/C/man3/pthread_cleanup_push.3:303
4392 #, no-wrap
4393 msgid ""
4394 "    } else {\n"
4395 "        printf(\"Canceling thread\\en\");\n"
4396 "        s = pthread_cancel(thr);\n"
4397 "        if (s != 0)\n"
4398 "            handle_error_en(s, \"pthread_cancel\");\n"
4399 "    }\n"
4400 msgstr ""
4401 "    } else {\n"
4402 "        printf(\"Canceling thread\\en\");\n"
4403 "        s = pthread_cancel(thr);\n"
4404 "        if (s != 0)\n"
4405 "            handle_error_en(s, \"pthread_cancel\");\n"
4406 "    }\n"
4407
4408 #. type: Plain text
4409 #: build/C/man3/pthread_cleanup_push.3:314
4410 #, no-wrap
4411 msgid ""
4412 "    if (res == PTHREAD_CANCELED)\n"
4413 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4414 "    else\n"
4415 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4416 "    exit(EXIT_SUCCESS);\n"
4417 "}\n"
4418 msgstr ""
4419 "    if (res == PTHREAD_CANCELED)\n"
4420 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4421 "    else\n"
4422 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4423 "    exit(EXIT_SUCCESS);\n"
4424 "}\n"
4425
4426 #. type: Plain text
4427 #: build/C/man3/pthread_cleanup_push.3:321
4428 msgid ""
4429 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4430 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4431 msgstr ""
4432 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4433 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4434
4435 #. type: TH
4436 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4437 #, no-wrap
4438 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4439 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4440
4441 #. type: TH
4442 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4443 #, no-wrap
4444 msgid "2008-12-04"
4445 msgstr "2008-12-04"
4446
4447 #. type: Plain text
4448 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4449 msgid ""
4450 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4451 "thread cancellation clean-up handlers while saving cancelability type"
4452 msgstr ""
4453 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4454 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4455 "の push/pop を行う"
4456
4457 #. type: Plain text
4458 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4459 #, no-wrap
4460 msgid ""
4461 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4462 "B<                                   void *>I<arg>B<);>\n"
4463 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4464 msgstr ""
4465 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4466 "B<                                   void *>I<arg>B<);>\n"
4467 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4468
4469 #. type: Plain text
4470 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4471 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4472 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4473 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4474 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4475 #: build/C/man3/pthread_yield.3:37
4476 msgid "Compile and link with I<-pthread>."
4477 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4478
4479 #. type: Plain text
4480 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4481 msgid ""
4482 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4483 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4484 msgstr ""
4485 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4486 "だが、このページで説明する点が異なる。"
4487
4488 #. type: Plain text
4489 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4490 msgid ""
4491 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4492 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4493 "addition, it also saves the thread's current cancelability type, and sets "
4494 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4495 "this ensures that cancellation clean-up will occur even if the thread's "
4496 "cancelability type was \"asynchronous\" before the call."
4497 msgstr ""
4498 "B<pthread_cleanup_push>(3) と同様に、\n"
4499 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4500 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4501 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4502 "保存し、cancelability type は \"deferred\" に設定する\n"
4503 "(B<pthread_setcanceltype>(3) 参照)。\n"
4504 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4505 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4506 "が保証される。"
4507
4508 #. type: Plain text
4509 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4510 msgid ""
4511 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4512 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4513 "up handlers.  In addition, it restores the thread's cancelability type to "
4514 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4515 msgstr ""
4516 "B<pthread_cleanup_pop>(3) と同様に、\n"
4517 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4518 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4519 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4520 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4521
4522 #. type: Plain text
4523 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4524 msgid ""
4525 "The caller must ensure that calls to these functions are paired within the "
4526 "same function, and at the same lexical nesting level.  Other restrictions "
4527 "apply, as described in B<pthread_cleanup_push>(3)."
4528 msgstr ""
4529 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4530 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4531 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4532 "適用される。"
4533
4534 #. type: Plain text
4535 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4536 msgid "This sequence of calls:"
4537 msgstr "以下の一連の呼び出し"
4538
4539 #. type: Plain text
4540 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4541 #, no-wrap
4542 msgid ""
4543 "pthread_cleanup_push_defer_np(routine, arg);\n"
4544 "pthread_cleanup_pop_restore_np(execute);\n"
4545 msgstr ""
4546 "pthread_cleanup_push_defer_np(routine, arg);\n"
4547 "pthread_cleanup_pop_restore_np(execute);\n"
4548
4549 #. type: Plain text
4550 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4551 msgid "is equivalent to (but shorter and more efficient than):"
4552 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4553
4554 #. type: Plain text
4555 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4556 #, no-wrap
4557 msgid "int oldtype;\n"
4558 msgstr "int oldtype;\n"
4559
4560 #. type: Plain text
4561 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4562 #, no-wrap
4563 msgid ""
4564 "pthread_cleanup_push(routine, arg);\n"
4565 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4566 "\\&...\n"
4567 "pthread_setcanceltype(oldtype, NULL);\n"
4568 "pthread_cleanup_pop(execute);\n"
4569 msgstr ""
4570 "pthread_cleanup_push(routine, arg);\n"
4571 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4572 "\\&...\n"
4573 "pthread_setcanceltype(oldtype, NULL);\n"
4574 "pthread_cleanup_pop(execute);\n"
4575
4576 #. type: Plain text
4577 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4578 msgid ""
4579 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4580 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4581 msgstr ""
4582 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4583 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4584
4585 #. type: TH
4586 #: build/C/man3/pthread_create.3:26
4587 #, no-wrap
4588 msgid "PTHREAD_CREATE"
4589 msgstr "PTHREAD_CREATE"
4590
4591 #. type: TH
4592 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_sigmask.3:26
4593 #, no-wrap
4594 msgid "2012-08-03"
4595 msgstr "2012-08-03"
4596
4597 #. type: Plain text
4598 #: build/C/man3/pthread_create.3:29
4599 msgid "pthread_create - create a new thread"
4600 msgstr "pthread_create - 新しいスレッドを作成する"
4601
4602 #. type: Plain text
4603 #: build/C/man3/pthread_create.3:35
4604 #, no-wrap
4605 msgid ""
4606 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4607 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4608 msgstr ""
4609 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4610 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4611
4612 #. type: Plain text
4613 #: build/C/man3/pthread_create.3:47
4614 msgid ""
4615 "The B<pthread_create>()  function starts a new thread in the calling "
4616 "process.  The new thread starts execution by invoking I<start_routine>(); "
4617 "I<arg> is passed as the sole argument of I<start_routine>()."
4618 msgstr ""
4619 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4620 "る。\n"
4621 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4622 "I<start_routine>() は引き数を一つだけ取り、\n"
4623 "I<arg> が I<start_routine>() の引き数として渡される。"
4624
4625 #. type: Plain text
4626 #: build/C/man3/pthread_create.3:49
4627 msgid "The new thread terminates in one of the following ways:"
4628 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4629
4630 #. type: IP
4631 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4632 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4633 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4634 #: build/C/man3/pthread_getattr_np.3:58
4635 #, no-wrap
4636 msgid "*"
4637 msgstr "*"
4638
4639 #. type: Plain text
4640 #: build/C/man3/pthread_create.3:55
4641 msgid ""
4642 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4643 "available to another thread in the same process that calls B<pthread_join>"
4644 "(3)."
4645 msgstr ""
4646 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4647 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4648 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4649 "別のスレッドで参照できる。"
4650
4651 #. type: Plain text
4652 #: build/C/man3/pthread_create.3:63
4653 msgid ""
4654 "It returns from I<start_routine>().  This is equivalent to calling "
4655 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4656 msgstr ""
4657 "スレッドが I<start_routine>() から返る。これは、\n"
4658 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4659
4660 #. type: Plain text
4661 #: build/C/man3/pthread_create.3:66
4662 msgid "It is canceled (see B<pthread_cancel>(3))."
4663 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4664
4665 #. type: Plain text
4666 #: build/C/man3/pthread_create.3:72
4667 msgid ""
4668 "Any of the threads in the process calls B<exit>(3), or the main thread "
4669 "performs a return from I<main>().  This causes the termination of all "
4670 "threads in the process."
4671 msgstr ""
4672 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4673 "メインスレッドで I<main>() 内で return が実行される。\n"
4674 "この場合は、プロセス内の全てのスレッドが終了される。"
4675
4676 #. type: Plain text
4677 #: build/C/man3/pthread_create.3:86
4678 msgid ""
4679 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4680 "are used at thread creation time to determine attributes for the new thread; "
4681 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4682 "functions.  If I<attr> is NULL, then the thread is created with default "
4683 "attributes."
4684 msgstr ""
4685 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4686 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4687 "新しいスレッドの属性が決定される。\n"
4688 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4689 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4690
4691 #. type: Plain text
4692 #: build/C/man3/pthread_create.3:93
4693 msgid ""
4694 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4695 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4696 "used to refer to the thread in subsequent calls to other pthreads functions."
4697 msgstr ""
4698 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4699 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4700 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4701
4702 #. type: Plain text
4703 #: build/C/man3/pthread_create.3:101
4704 msgid ""
4705 "The new thread inherits a copy of the creating thread's signal mask "
4706 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4707 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4708 "thread's alternate signal stack (B<sigaltstack>(2))."
4709 msgstr ""
4710 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4711 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4712 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4713 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4714 "(B<sigaltstack>(2)) を継承しない。"
4715
4716 #. type: Plain text
4717 #: build/C/man3/pthread_create.3:104
4718 msgid ""
4719 "The new thread inherits the calling thread's floating-point environment "
4720 "(B<fenv>(3))."
4721 msgstr ""
4722 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4723 "を継承する。"
4724
4725 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4726 #. type: Plain text
4727 #: build/C/man3/pthread_create.3:109
4728 msgid ""
4729 "The initial value of the new thread's CPU-time clock is 0 (see "
4730 "B<pthread_getcpuclockid>(3))."
4731 msgstr ""
4732 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4733 "(B<pthread_getcpuclockid>(3) 参照)。"
4734
4735 #. type: SS
4736 #: build/C/man3/pthread_create.3:109
4737 #, no-wrap
4738 msgid "Linux-specific details"
4739 msgstr "Linux 固有の詳細"
4740
4741 #. type: Plain text
4742 #: build/C/man3/pthread_create.3:115
4743 msgid ""
4744 "The new thread inherits copies of the calling thread's capability sets (see "
4745 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4746 msgstr ""
4747 "新しいスレッドは、呼び出したスレッドの\n"
4748 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4749 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4750 "コピーをを継承しない。"
4751
4752 #. type: Plain text
4753 #: build/C/man3/pthread_create.3:122
4754 msgid ""
4755 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4756 "number, and the contents of I<*thread> are undefined."
4757 msgstr ""
4758 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4759 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4760
4761 #. type: TP
4762 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4763 #, no-wrap
4764 msgid "B<EAGAIN>"
4765 msgstr "B<EAGAIN>"
4766
4767 #. type: Plain text
4768 #: build/C/man3/pthread_create.3:137
4769 msgid ""
4770 "Insufficient resources to create another thread, or a system-imposed limit "
4771 "on the number of threads was encountered.  The latter case may occur in two "
4772 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4773 "which limits the number of process for a real user ID, was reached; or the "
4774 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4775 "threads-max>, was reached."
4776 msgstr ""
4777 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4778 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4779 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4780 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4781 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4782 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4783
4784 #. type: Plain text
4785 #: build/C/man3/pthread_create.3:141
4786 msgid "Invalid settings in I<attr>."
4787 msgstr "I<attr> で指定された設定が不正である。"
4788
4789 #. type: TP
4790 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4791 #: build/C/man3/pthread_setschedprio.3:66
4792 #, no-wrap
4793 msgid "B<EPERM>"
4794 msgstr "B<EPERM>"
4795
4796 #. type: Plain text
4797 #: build/C/man3/pthread_create.3:146
4798 msgid ""
4799 "No permission to set the scheduling policy and parameters specified in "
4800 "I<attr>."
4801 msgstr ""
4802 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4803 "設定する許可がない。"
4804
4805 #. type: Plain text
4806 #: build/C/man3/pthread_create.3:160
4807 msgid ""
4808 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4809 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4810 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4811 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4812 msgstr ""
4813 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4814 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4815 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4816 "B<pthread_create>() の呼び出し後に、\n"
4817 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4818 "次に実行されるかは決まっていない。"
4819
4820 #. type: Plain text
4821 #: build/C/man3/pthread_create.3:180
4822 msgid ""
4823 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4824 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4825 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4826 "has been joined are the last of its resources released back to the system.  "
4827 "When a detached thread terminates, its resources are automatically released "
4828 "back to the system: it is not possible to join with the thread in order to "
4829 "obtain its exit status.  Making a thread detached is useful for some types "
4830 "of daemon threads whose exit status the application does not need to care "
4831 "about.  By default, a new thread is created in a joinable state, unless "
4832 "I<attr> was set to create the thread in a detached state (using "
4833 "B<pthread_attr_setdetachstate>(3))."
4834 msgstr ""
4835 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4836 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4837 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4838 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4839 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4840 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4841 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4842 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4843 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4844 "デーモン (daemon) スレッドでは有用である。\n"
4845 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4846 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4847 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4848 "作成される。"
4849
4850 #.  FIXME . Perhaps some of the following detail should be in
4851 #.  a future pthread_attr_setstacksize(3) page.
4852 #. type: Plain text
4853 #: build/C/man3/pthread_create.3:196
4854 msgid ""
4855 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4856 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4857 "resource limit I<at the time the program started> has any value other than "
4858 "\"unlimited\", then it determines the default stack size of new threads.  "
4859 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4860 "explicitly set in the I<attr> argument used to create a thread, in order to "
4861 "obtain a stack size other than the default."
4862 msgstr ""
4863 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4864 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4865 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4866 "フォルトのスタックサイズとなる。\n"
4867 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4868 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4869 "デフォルト値以外のスタックサイズを得ることができる。"
4870
4871 #. type: Plain text
4872 #: build/C/man3/pthread_create.3:202
4873 msgid ""
4874 "In the obsolete LinuxThreads implementation, each of the threads in a "
4875 "process has a different process ID.  This is in violation of the POSIX "
4876 "threads specification, and is the source of many other nonconformances to "
4877 "the standard; see B<pthreads>(7)."
4878 msgstr ""
4879 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4880 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4881 "他の多くの標準非準拠の点の原因になっている。\n"
4882 "B<pthreads>(7) を参照のこと。"
4883
4884 #. type: Plain text
4885 #: build/C/man3/pthread_create.3:206
4886 msgid ""
4887 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4888 "number of other functions in the pthreads API."
4889 msgstr ""
4890 "以下のプログラムは、 B<pthread_create>() や\n"
4891 "pthreads API の他のいろいろな関数の使用例を示している。"
4892
4893 #. type: Plain text
4894 #: build/C/man3/pthread_create.3:211
4895 msgid ""
4896 "In the following run, on a system providing the NPTL threading "
4897 "implementation, the stack size defaults to the value given by the \"stack "
4898 "size\" resource limit:"
4899 msgstr ""
4900 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4901 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4902 "になる。"
4903
4904 #. type: Plain text
4905 #: build/C/man3/pthread_create.3:223
4906 #, no-wrap
4907 msgid ""
4908 "$B< ulimit -s>\n"
4909 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4910 "$B< ./a.out hola salut servus>\n"
4911 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4912 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4913 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4914 "Joined with thread 1; returned value was HOLA\n"
4915 "Joined with thread 2; returned value was SALUT\n"
4916 "Joined with thread 3; returned value was SERVUS\n"
4917 msgstr ""
4918 "$B< ulimit -s>\n"
4919 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4920 "$B< ./a.out hola salut servus>\n"
4921 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4922 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4923 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4924 "Joined with thread 1; returned value was HOLA\n"
4925 "Joined with thread 2; returned value was SALUT\n"
4926 "Joined with thread 3; returned value was SERVUS\n"
4927
4928 #. type: Plain text
4929 #: build/C/man3/pthread_create.3:229
4930 msgid ""
4931 "In the next run, the program explicitly sets a stack size of 1MB (using "
4932 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4933 msgstr ""
4934 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4935 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4936 "明示的に設定している。"
4937
4938 #. type: Plain text
4939 #: build/C/man3/pthread_create.3:239
4940 #, no-wrap
4941 msgid ""
4942 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4943 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4944 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4945 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4946 "Joined with thread 1; returned value was HOLA\n"
4947 "Joined with thread 2; returned value was SALUT\n"
4948 "Joined with thread 3; returned value was SERVUS\n"
4949 msgstr ""
4950 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4951 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4952 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4953 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4954 "Joined with thread 1; returned value was HOLA\n"
4955 "Joined with thread 2; returned value was SALUT\n"
4956 "Joined with thread 3; returned value was SERVUS\n"
4957
4958 #. type: Plain text
4959 #: build/C/man3/pthread_create.3:251
4960 #, no-wrap
4961 msgid ""
4962 "#include E<lt>pthread.hE<gt>\n"
4963 "#include E<lt>string.hE<gt>\n"
4964 "#include E<lt>stdio.hE<gt>\n"
4965 "#include E<lt>stdlib.hE<gt>\n"
4966 "#include E<lt>unistd.hE<gt>\n"
4967 "#include E<lt>errno.hE<gt>\n"
4968 "#include E<lt>ctype.hE<gt>\n"
4969 msgstr ""
4970 "#include E<lt>pthread.hE<gt>\n"
4971 "#include E<lt>string.hE<gt>\n"
4972 "#include E<lt>stdio.hE<gt>\n"
4973 "#include E<lt>stdlib.hE<gt>\n"
4974 "#include E<lt>unistd.hE<gt>\n"
4975 "#include E<lt>errno.hE<gt>\n"
4976 "#include E<lt>ctype.hE<gt>\n"
4977
4978 #. type: Plain text
4979 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:110
4980 #, no-wrap
4981 msgid ""
4982 "#define handle_error(msg) \\e\n"
4983 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4984 msgstr ""
4985 "#define handle_error(msg) \\e\n"
4986 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4987
4988 #. type: Plain text
4989 #: build/C/man3/pthread_create.3:263
4990 #, no-wrap
4991 msgid ""
4992 "struct thread_info {    /* Used as argument to thread_start() */\n"
4993 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4994 "    int       thread_num;       /* Application-defined thread # */\n"
4995 "    char     *argv_string;      /* From command-line argument */\n"
4996 "};\n"
4997 msgstr ""
4998 "struct thread_info {    /* Used as argument to thread_start() */\n"
4999 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5000 "    int       thread_num;       /* Application-defined thread # */\n"
5001 "    char     *argv_string;      /* From command-line argument */\n"
5002 "};\n"
5003
5004 #. type: Plain text
5005 #: build/C/man3/pthread_create.3:266
5006 #, no-wrap
5007 msgid ""
5008 "/* Thread start function: display address near top of our stack,\n"
5009 "   and return upper-cased copy of argv_string */\n"
5010 msgstr ""
5011 "/* Thread start function: display address near top of our stack,\n"
5012 "   and return upper-cased copy of argv_string */\n"
5013
5014 #. type: Plain text
5015 #: build/C/man3/pthread_create.3:272
5016 #, no-wrap
5017 msgid ""
5018 "static void *\n"
5019 "thread_start(void *arg)\n"
5020 "{\n"
5021 "    struct thread_info *tinfo = arg;\n"
5022 "    char *uargv, *p;\n"
5023 msgstr ""
5024 "static void *\n"
5025 "thread_start(void *arg)\n"
5026 "{\n"
5027 "    struct thread_info *tinfo = arg;\n"
5028 "    char *uargv, *p;\n"
5029
5030 #. type: Plain text
5031 #: build/C/man3/pthread_create.3:275
5032 #, no-wrap
5033 msgid ""
5034 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5035 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5036 msgstr ""
5037 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5038 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5039
5040 #. type: Plain text
5041 #: build/C/man3/pthread_create.3:279
5042 #, no-wrap
5043 msgid ""
5044 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5045 "    if (uargv == NULL)\n"
5046 "        handle_error(\"strdup\");\n"
5047 msgstr ""
5048 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5049 "    if (uargv == NULL)\n"
5050 "        handle_error(\"strdup\");\n"
5051
5052 #. type: Plain text
5053 #: build/C/man3/pthread_create.3:282
5054 #, no-wrap
5055 msgid ""
5056 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5057 "        *p = toupper(*p);\n"
5058 msgstr ""
5059 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5060 "        *p = toupper(*p);\n"
5061
5062 #. type: Plain text
5063 #: build/C/man3/pthread_create.3:285
5064 #, no-wrap
5065 msgid ""
5066 "    return uargv;\n"
5067 "}\n"
5068 msgstr ""
5069 "    return uargv;\n"
5070 "}\n"
5071
5072 #. type: Plain text
5073 #: build/C/man3/pthread_create.3:294
5074 #, no-wrap
5075 msgid ""
5076 "int\n"
5077 "main(int argc, char *argv[])\n"
5078 "{\n"
5079 "    int s, tnum, opt, num_threads;\n"
5080 "    struct thread_info *tinfo;\n"
5081 "    pthread_attr_t attr;\n"
5082 "    int stack_size;\n"
5083 "    void *res;\n"
5084 msgstr ""
5085 "int\n"
5086 "main(int argc, char *argv[])\n"
5087 "{\n"
5088 "    int s, tnum, opt, num_threads;\n"
5089 "    struct thread_info *tinfo;\n"
5090 "    pthread_attr_t attr;\n"
5091 "    int stack_size;\n"
5092 "    void *res;\n"
5093
5094 #. type: Plain text
5095 #: build/C/man3/pthread_create.3:296
5096 #, no-wrap
5097 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5098 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5099
5100 #. type: Plain text
5101 #: build/C/man3/pthread_create.3:303
5102 #, no-wrap
5103 msgid ""
5104 "    stack_size = -1;\n"
5105 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5106 "        switch (opt) {\n"
5107 "        case \\(aqs\\(aq:\n"
5108 "            stack_size = strtoul(optarg, NULL, 0);\n"
5109 "            break;\n"
5110 msgstr ""
5111 "    stack_size = -1;\n"
5112 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5113 "        switch (opt) {\n"
5114 "        case \\(aqs\\(aq:\n"
5115 "            stack_size = strtoul(optarg, NULL, 0);\n"
5116 "            break;\n"
5117
5118 #. type: Plain text
5119 #: build/C/man3/pthread_create.3:310
5120 #, no-wrap
5121 msgid ""
5122 "        default:\n"
5123 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5124 "                    argv[0]);\n"
5125 "            exit(EXIT_FAILURE);\n"
5126 "        }\n"
5127 "    }\n"
5128 msgstr ""
5129 "        default:\n"
5130 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5131 "                    argv[0]);\n"
5132 "            exit(EXIT_FAILURE);\n"
5133 "        }\n"
5134 "    }\n"
5135
5136 #. type: Plain text
5137 #: build/C/man3/pthread_create.3:312
5138 #, no-wrap
5139 msgid "    num_threads = argc - optind;\n"
5140 msgstr "    num_threads = argc - optind;\n"
5141
5142 #. type: Plain text
5143 #: build/C/man3/pthread_create.3:314
5144 #, no-wrap
5145 msgid "    /* Initialize thread creation attributes */\n"
5146 msgstr "    /* Initialize thread creation attributes */\n"
5147
5148 #. type: Plain text
5149 #: build/C/man3/pthread_create.3:318
5150 #, no-wrap
5151 msgid ""
5152 "    s = pthread_attr_init(&attr);\n"
5153 "    if (s != 0)\n"
5154 "        handle_error_en(s, \"pthread_attr_init\");\n"
5155 msgstr ""
5156 "    s = pthread_attr_init(&attr);\n"
5157 "    if (s != 0)\n"
5158 "        handle_error_en(s, \"pthread_attr_init\");\n"
5159
5160 #. type: Plain text
5161 #: build/C/man3/pthread_create.3:324
5162 #, no-wrap
5163 msgid ""
5164 "    if (stack_size E<gt> 0) {\n"
5165 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5166 "        if (s != 0)\n"
5167 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5168 "    }\n"
5169 msgstr ""
5170 "    if (stack_size E<gt> 0) {\n"
5171 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5172 "        if (s != 0)\n"
5173 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5174 "    }\n"
5175
5176 #. type: Plain text
5177 #: build/C/man3/pthread_create.3:326
5178 #, no-wrap
5179 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5180 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5181
5182 #. type: Plain text
5183 #: build/C/man3/pthread_create.3:330
5184 #, no-wrap
5185 msgid ""
5186 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5187 "    if (tinfo == NULL)\n"
5188 "        handle_error(\"calloc\");\n"
5189 msgstr ""
5190 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5191 "    if (tinfo == NULL)\n"
5192 "        handle_error(\"calloc\");\n"
5193
5194 #. type: Plain text
5195 #: build/C/man3/pthread_create.3:332
5196 #, no-wrap
5197 msgid "    /* Create one thread for each command-line argument */\n"
5198 msgstr "    /* Create one thread for each command-line argument */\n"
5199
5200 #. type: Plain text
5201 #: build/C/man3/pthread_create.3:336
5202 #, no-wrap
5203 msgid ""
5204 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5205 "        tinfo[tnum].thread_num = tnum + 1;\n"
5206 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5207 msgstr ""
5208 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5209 "        tinfo[tnum].thread_num = tnum + 1;\n"
5210 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5211
5212 #. type: Plain text
5213 #: build/C/man3/pthread_create.3:339
5214 #, no-wrap
5215 msgid ""
5216 "        /* The pthread_create() call stores the thread ID into\n"
5217 "           corresponding element of tinfo[] */\n"
5218 msgstr ""
5219 "        /* The pthread_create() call stores the thread ID into\n"
5220 "           corresponding element of tinfo[] */\n"
5221
5222 #. type: Plain text
5223 #: build/C/man3/pthread_create.3:345
5224 #, no-wrap
5225 msgid ""
5226 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5227 "                           &thread_start, &tinfo[tnum]);\n"
5228 "        if (s != 0)\n"
5229 "            handle_error_en(s, \"pthread_create\");\n"
5230 "    }\n"
5231 msgstr ""
5232 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5233 "                           &thread_start, &tinfo[tnum]);\n"
5234 "        if (s != 0)\n"
5235 "            handle_error_en(s, \"pthread_create\");\n"
5236 "    }\n"
5237
5238 #. type: Plain text
5239 #: build/C/man3/pthread_create.3:348
5240 #, no-wrap
5241 msgid ""
5242 "    /* Destroy the thread attributes object, since it is no\n"
5243 "       longer needed */\n"
5244 msgstr ""
5245 "    /* Destroy the thread attributes object, since it is no\n"
5246 "       longer needed */\n"
5247
5248 #. type: Plain text
5249 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5250 #, no-wrap
5251 msgid ""
5252 "    s = pthread_attr_destroy(&attr);\n"
5253 "    if (s != 0)\n"
5254 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5255 msgstr ""
5256 "    s = pthread_attr_destroy(&attr);\n"
5257 "    if (s != 0)\n"
5258 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5259
5260 #. type: Plain text
5261 #: build/C/man3/pthread_create.3:354
5262 #, no-wrap
5263 msgid "    /* Now join with each thread, and display its returned value */\n"
5264 msgstr "    /* Now join with each thread, and display its returned value */\n"
5265
5266 #. type: Plain text
5267 #: build/C/man3/pthread_create.3:359
5268 #, no-wrap
5269 msgid ""
5270 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5271 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5272 "        if (s != 0)\n"
5273 "            handle_error_en(s, \"pthread_join\");\n"
5274 msgstr ""
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
5280 #. type: Plain text
5281 #: build/C/man3/pthread_create.3:364
5282 #, no-wrap
5283 msgid ""
5284 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5285 "                tinfo[tnum].thread_num, (char *) res);\n"
5286 "        free(res);      /* Free memory allocated by thread */\n"
5287 "    }\n"
5288 msgstr ""
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
5294 #. type: Plain text
5295 #: build/C/man3/pthread_create.3:368
5296 #, no-wrap
5297 msgid ""
5298 "    free(tinfo);\n"
5299 "    exit(EXIT_SUCCESS);\n"
5300 "}\n"
5301 msgstr ""
5302 "    free(tinfo);\n"
5303 "    exit(EXIT_SUCCESS);\n"
5304 "}\n"
5305
5306 #. type: Plain text
5307 #: build/C/man3/pthread_create.3:382
5308 msgid ""
5309 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5310 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5311 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5312 "(7)"
5313 msgstr ""
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
5319 #. type: TH
5320 #: build/C/man3/pthread_detach.3:26
5321 #, no-wrap
5322 msgid "PTHREAD_DETACH"
5323 msgstr "PTHREAD_DETACH"
5324
5325 #. type: TH
5326 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5327 #, no-wrap
5328 msgid "2008-11-27"
5329 msgstr "2008-11-27"
5330
5331 #. type: Plain text
5332 #: build/C/man3/pthread_detach.3:29
5333 msgid "pthread_detach - detach a thread"
5334 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5335
5336 #. type: Plain text
5337 #: build/C/man3/pthread_detach.3:34
5338 #, no-wrap
5339 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5340 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5341
5342 #. type: Plain text
5343 #: build/C/man3/pthread_detach.3:46
5344 msgid ""
5345 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5346 "as detached.  When a detached thread terminates, its resources are "
5347 "automatically released back to the system without the need for another "
5348 "thread to join with the terminated thread."
5349 msgstr ""
5350 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5351 "detached (切り離された状態) という印を付ける。\n"
5352 "detached 状態のスレッドが終了すると、\n"
5353 "別のスレッドが終了されたスレッドを join しなくても、\n"
5354 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5355
5356 #. type: Plain text
5357 #: build/C/man3/pthread_detach.3:49
5358 msgid ""
5359 "Attempting to detach an already detached thread results in unspecified "
5360 "behavior."
5361 msgstr ""
5362 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5363 "どのような結果となるかは規定されていない。"
5364
5365 #. type: Plain text
5366 #: build/C/man3/pthread_detach.3:54
5367 msgid ""
5368 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5369 "number."
5370 msgstr ""
5371 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5372 "エラーの場合、エラー番号を返す。"
5373
5374 #. type: Plain text
5375 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5376 msgid "I<thread> is not a joinable thread."
5377 msgstr "I<thread> が join 可能なスレッドではない。"
5378
5379 #. type: Plain text
5380 #: build/C/man3/pthread_detach.3:70
5381 msgid ""
5382 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5383 "or be made joinable again."
5384 msgstr ""
5385 "いったんスレッドを detached 状態にすると、\n"
5386 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5387 "もう一度 join 可能にしたりすることはできない。"
5388
5389 #. type: Plain text
5390 #: build/C/man3/pthread_detach.3:77
5391 msgid ""
5392 "A new thread can be created in a detached state using "
5393 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5394 "I<attr> argument of B<pthread_create>(3)."
5395 msgstr ""
5396 "B<pthread_attr_setdetachstate>(3) を使って\n"
5397 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5398 "新しいスレッドを detached 状態で作成することができる。"
5399
5400 #. type: Plain text
5401 #: build/C/man3/pthread_detach.3:84
5402 msgid ""
5403 "The detached attribute merely determines the behavior of the system when the "
5404 "thread terminates; it does not prevent the thread from being terminated if "
5405 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5406 "thread returns)."
5407 msgstr ""
5408 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5409 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5410 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5411 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5412
5413 #. type: Plain text
5414 #: build/C/man3/pthread_detach.3:93
5415 msgid ""
5416 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5417 "thread that an application creates, so that system resources for the thread "
5418 "can be released.  (But note that the resources of all threads are freed when "
5419 "the process terminates.)"
5420 msgstr ""
5421 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5422 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5423 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5424 "終了するときには、全てのスレッドのリソースが解放される)。"
5425
5426 #. type: Plain text
5427 #: build/C/man3/pthread_detach.3:95
5428 msgid "The following statement detaches the calling thread:"
5429 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5430
5431 #. type: Plain text
5432 #: build/C/man3/pthread_detach.3:97
5433 #, no-wrap
5434 msgid "    pthread_detach(pthread_self());\n"
5435 msgstr "    pthread_detach(pthread_self());\n"
5436
5437 #. type: Plain text
5438 #: build/C/man3/pthread_detach.3:104
5439 msgid ""
5440 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5441 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5442 msgstr ""
5443 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5444 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5445
5446 #. type: TH
5447 #: build/C/man3/pthread_equal.3:26
5448 #, no-wrap
5449 msgid "PTHREAD_EQUAL"
5450 msgstr "PTHREAD_EQUAL"
5451
5452 #. type: TH
5453 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5454 #, no-wrap
5455 msgid "2009-03-30"
5456 msgstr "2009-03-30"
5457
5458 #. type: Plain text
5459 #: build/C/man3/pthread_equal.3:29
5460 msgid "pthread_equal - compare thread IDs"
5461 msgstr "pthread_equal - スレッド ID を比較する"
5462
5463 #. type: Plain text
5464 #: build/C/man3/pthread_equal.3:34
5465 #, no-wrap
5466 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5467 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5468
5469 #. type: Plain text
5470 #: build/C/man3/pthread_equal.3:41
5471 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5472 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5473
5474 #. type: Plain text
5475 #: build/C/man3/pthread_equal.3:45
5476 msgid ""
5477 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5478 "value; otherwise, it returns 0."
5479 msgstr ""
5480 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5481 "そうでなければ 0 を返す。"
5482
5483 #.  SH VERSIONS
5484 #.  Available since glibc 2.0
5485 #. type: Plain text
5486 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5487 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5488 msgid "This function always succeeds."
5489 msgstr "この関数は常に成功する。"
5490
5491 #. type: Plain text
5492 #: build/C/man3/pthread_equal.3:56
5493 msgid ""
5494 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5495 "considered opaque: there is no portable way for applications to directly "
5496 "compare two I<pthread_t> values."
5497 msgstr ""
5498 "B<pthread_equal>() 関数が必要なのは、\n"
5499 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5500 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5501 "移植性を確保できる形で比較する方法はない。"
5502
5503 #. type: Plain text
5504 #: build/C/man3/pthread_equal.3:60
5505 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5506 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5507
5508 #. type: TH
5509 #: build/C/man3/pthread_exit.3:26
5510 #, no-wrap
5511 msgid "PTHREAD_EXIT"
5512 msgstr "PTHREAD_EXIT"
5513
5514 #. type: Plain text
5515 #: build/C/man3/pthread_exit.3:29
5516 msgid "pthread_exit - terminate calling thread"
5517 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5518
5519 #. type: Plain text
5520 #: build/C/man3/pthread_exit.3:34
5521 #, no-wrap
5522 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5523 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5524
5525 #. type: Plain text
5526 #: build/C/man3/pthread_exit.3:45
5527 msgid ""
5528 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5529 "value via I<retval> that (if the thread is joinable)  is available to "
5530 "another thread in the same process that calls B<pthread_join>(3)."
5531 msgstr ""
5532 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5533 "I<retval> 経由で値を返す。\n"
5534 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5535 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5536
5537 #. type: Plain text
5538 #: build/C/man3/pthread_exit.3:55
5539 msgid ""
5540 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5541 "not yet been popped, are popped (in the reverse of the order in which they "
5542 "were pushed)  and executed.  If the thread has any thread-specific data, "
5543 "then, after the clean-up handlers have been executed, the corresponding "
5544 "destructor functions are called, in an unspecified order."
5545 msgstr ""
5546 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5547 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5548 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5549 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5550 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5551 "は規定されていない)。"
5552
5553 #. type: Plain text
5554 #: build/C/man3/pthread_exit.3:62
5555 msgid ""
5556 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5557 "variables, semaphores, and file descriptors) are not released, and functions "
5558 "registered using B<atexit>(3)  are not called."
5559 msgstr ""
5560 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5561 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5562 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5563
5564 #. type: Plain text
5565 #: build/C/man3/pthread_exit.3:71
5566 msgid ""
5567 "After the last thread in a process terminates, the process terminates as by "
5568 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5569 "resources are released and functions registered using B<atexit>(3)  are "
5570 "called."
5571 msgstr ""
5572 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5573 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5574 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5575 "が呼び出される。"
5576
5577 #. type: Plain text
5578 #: build/C/man3/pthread_exit.3:73
5579 msgid "This function does not return to the caller."
5580 msgstr "この関数は呼び出し側には返らない。"
5581
5582 #. type: Plain text
5583 #: build/C/man3/pthread_exit.3:82
5584 msgid ""
5585 "Performing a return from the start function of any thread other than the "
5586 "main thread results in an implicit call to B<pthread_exit>(), using the "
5587 "function's return value as the thread's exit status."
5588 msgstr ""
5589 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5590 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5591 "関数の返り値がスレッドの終了ステータスとして使用される。"
5592
5593 #. type: Plain text
5594 #: build/C/man3/pthread_exit.3:88
5595 msgid ""
5596 "To allow other threads to continue execution, the main thread should "
5597 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5598 msgstr ""
5599 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5600 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5601
5602 #. type: Plain text
5603 #: build/C/man3/pthread_exit.3:93
5604 msgid ""
5605 "The value pointed to by I<retval> should not be located on the calling "
5606 "thread's stack, since the contents of that stack are undefined after the "
5607 "thread terminates."
5608 msgstr ""
5609 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5610 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5611 "である。"
5612
5613 #.  Linux 2.6.27
5614 #.  FIXME . review a later kernel to see if this gets fixed
5615 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5616 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5617 #. type: Plain text
5618 #: build/C/man3/pthread_exit.3:105
5619 msgid ""
5620 "Currently, there are limitations in the kernel implementation logic for "
5621 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5622 "This can manifest in problems such as a locked terminal if a stop signal is "
5623 "sent to a foreground process whose thread group leader has already called "
5624 "B<pthread_exit>()."
5625 msgstr ""
5626 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5627 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5628 "カーネル実装の論理には制限がある。\n"
5629 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5630 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5631 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5632 "場合がある。"
5633
5634 #. type: Plain text
5635 #: build/C/man3/pthread_exit.3:109
5636 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5637 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5638
5639 #. type: TH
5640 #: build/C/man3/pthread_getattr_np.3:26
5641 #, no-wrap
5642 msgid "PTHREAD_GETATTR_NP"
5643 msgstr "PTHREAD_GETATTR_NP"
5644
5645 #. type: Plain text
5646 #: build/C/man3/pthread_getattr_np.3:29
5647 msgid "pthread_getattr_np - get attributes of created thread"
5648 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5649
5650 #. type: Plain text
5651 #: build/C/man3/pthread_getattr_np.3:35
5652 #, no-wrap
5653 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5654 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5655
5656 #. type: Plain text
5657 #: build/C/man3/pthread_getattr_np.3:45
5658 msgid ""
5659 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5660 "object referred to by I<attr> so that it contains actual attribute values "
5661 "describing the running thread I<thread>."
5662 msgstr ""
5663 "B<pthread_getattr_np>() 関数は、\n"
5664 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5665 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5666 "格納して返す。"
5667
5668 #. type: Plain text
5669 #: build/C/man3/pthread_getattr_np.3:52
5670 msgid ""
5671 "The returned attribute values may differ from the corresponding attribute "
5672 "values passed in the I<attr> object that was used to create the thread using "
5673 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5674 msgstr ""
5675 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5676 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5677 "特に、以下の属性は異なる場合がある。"
5678
5679 #. type: Plain text
5680 #: build/C/man3/pthread_getattr_np.3:55
5681 msgid ""
5682 "the detach state, since a joinable thread may have detached itself after "
5683 "creation;"
5684 msgstr ""
5685 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5686 "切り離す (detach する) ことができるからである。"
5687
5688 #. type: Plain text
5689 #: build/C/man3/pthread_getattr_np.3:58
5690 msgid ""
5691 "the stack size, which the implementation may align to a suitable boundary."
5692 msgstr ""
5693 "スタックサイズ。\n"
5694 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5695
5696 #. type: Plain text
5697 #: build/C/man3/pthread_getattr_np.3:63
5698 msgid ""
5699 "and the guard size, which the implementation may round upward to a multiple "
5700 "of the page size, or ignore (i.e., treat as 0), if the application is "
5701 "allocating its own stack."
5702 msgstr ""
5703 "guard size.\n"
5704 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5705 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5706 "(0 として扱われる) ことがあるからである。"
5707
5708 #. type: Plain text
5709 #: build/C/man3/pthread_getattr_np.3:68
5710 msgid ""
5711 "Furthermore, if the stack address attribute was not set in the thread "
5712 "attributes object used to create the thread, then the returned thread "
5713 "attributes object will report the actual stack address that the "
5714 "implementation selected for the thread."
5715 msgstr ""
5716 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5717 "スタックアドレスが設定されていなかった場合、\n"
5718 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5719 "割り当てた実際のスタックアドレスが報告される。"
5720
5721 #. type: Plain text
5722 #: build/C/man3/pthread_getattr_np.3:73
5723 msgid ""
5724 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5725 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5726 msgstr ""
5727 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5728 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5729 "そのオブジェクトを破棄すべきである。"
5730
5731 #. type: Plain text
5732 #: build/C/man3/pthread_getattr_np.3:76
5733 #: build/C/man3/pthread_getcpuclockid.3:49
5734 msgid ""
5735 "On success, this function returns 0; on error, it returns a nonzero error "
5736 "number."
5737 msgstr ""
5738 "成功すると、この関数は 0 を返す。\n"
5739 "エラーの場合、 0 以外のエラー番号を返す。"
5740
5741 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5742 #. type: Plain text
5743 #: build/C/man3/pthread_getattr_np.3:81
5744 msgid "Insufficient memory."
5745 msgstr "メモリが十分になかった。"
5746
5747 #. type: Plain text
5748 #: build/C/man3/pthread_getattr_np.3:96
5749 msgid ""
5750 "In addition, if I<thread> refers to the main thread, then "
5751 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5752 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5753 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5754 msgstr ""
5755 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5756 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5757 "エラーで失敗する可能性がある。\n"
5758 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5759 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5760 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5761
5762 #. type: Plain text
5763 #: build/C/man3/pthread_getattr_np.3:98
5764 msgid "This function is available in glibc since version 2.2.3."
5765 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5766
5767 #. type: Plain text
5768 #: build/C/man3/pthread_getattr_np.3:101
5769 #: build/C/man3/pthread_kill_other_threads_np.3:50
5770 msgid ""
5771 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5772 "\" (nonportable) in the name."
5773 msgstr ""
5774 "この関数は非標準の GNU による拡張である。\n"
5775 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5776 "付いている。"
5777
5778 #. type: Plain text
5779 #: build/C/man3/pthread_getattr_np.3:111
5780 msgid ""
5781 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5782 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5783 "and display its guard size, stack address, and stack size attributes.  "
5784 "Command-line arguments can be used to set these attributes to values other "
5785 "than the default when creating the thread.  The shell sessions below "
5786 "demonstrate the use of the program."
5787 msgstr ""
5788 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5789 "このプログラムは、スレッドを作成し、それから\n"
5790 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5791 "スタックアドレス、スタックサイズを取得し表示する。\n"
5792 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5793 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5794 "下記のシェルのセッションはこのプログラムの使用例である。"
5795
5796 #. type: Plain text
5797 #: build/C/man3/pthread_getattr_np.3:114
5798 msgid ""
5799 "In the first run, on an x86-32 system, a thread is created using default "
5800 "attributes:"
5801 msgstr ""
5802 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5803 "(x86-32 システム上で実行)。"
5804
5805 #. type: Plain text
5806 #: build/C/man3/pthread_getattr_np.3:124
5807 #, no-wrap
5808 msgid ""
5809 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5810 "unlimited\n"
5811 "$B< ./a.out>\n"
5812 "Attributes of created thread:\n"
5813 "        Guard size          = 4096 bytes\n"
5814 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5815 "        Stack size          = 0x201000 (2101248) bytes\n"
5816 msgstr ""
5817 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5818 "unlimited\n"
5819 "$B< ./a.out>\n"
5820 "Attributes of created thread:\n"
5821 "        Guard size          = 4096 bytes\n"
5822 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5823 "        Stack size          = 0x201000 (2101248) bytes\n"
5824
5825 #. type: Plain text
5826 #: build/C/man3/pthread_getattr_np.3:130
5827 msgid ""
5828 "In the following run, we see that if a guard size is specified, it is "
5829 "rounded up to the next multiple of the system page size (4096 bytes on "
5830 "x86-32):"
5831 msgstr ""
5832 "次の実行例では、guard size が指定された場合、\n"
5833 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5834 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5835
5836 #. type: Plain text
5837 #: build/C/man3/pthread_getattr_np.3:138
5838 #, no-wrap
5839 msgid ""
5840 "$B< ./a.out -g 4097>\n"
5841 "Thread attributes object after initializations:\n"
5842 "        Guard size          = 4097 bytes\n"
5843 "        Stack address       = (nil)\n"
5844 "        Stack size          = 0x0 (0) bytes\n"
5845 msgstr ""
5846 "$B< ./a.out -g 4097>\n"
5847 "Thread attributes object after initializations:\n"
5848 "        Guard size          = 4097 bytes\n"
5849 "        Stack address       = (nil)\n"
5850 "        Stack size          = 0x0 (0) bytes\n"
5851
5852 #. type: Plain text
5853 #: build/C/man3/pthread_getattr_np.3:143
5854 #, no-wrap
5855 msgid ""
5856 "Attributes of created thread:\n"
5857 "        Guard size          = 8192 bytes\n"
5858 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5859 "        Stack size          = 0x201000 (2101248) bytes\n"
5860 msgstr ""
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
5866 #. .in +4n
5867 #. .nf
5868 #. $ ./a.out \-s 0x8000
5869 #. Thread attributes object after initializations:
5870 #.         Guard size          = 4096 bytes
5871 #.         Stack address       = 0xffff8000 (EOS = (nil))
5872 #.         Stack size          = 0x8000 (32768) bytes
5873 #. Attributes of created thread:
5874 #.         Guard size          = 4096 bytes
5875 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5876 #.         Stack size          = 0x8000 (32768) bytes
5877 #. .fi
5878 #. .in
5879 #. type: Plain text
5880 #: build/C/man3/pthread_getattr_np.3:162
5881 msgid ""
5882 "In the last run, the program manually allocates a stack for the thread.  In "
5883 "this case, the guard size attribute is ignored."
5884 msgstr ""
5885 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5886 "この場合には、guard size 属性は無視される。"
5887
5888 #. type: Plain text
5889 #: build/C/man3/pthread_getattr_np.3:167
5890 #, no-wrap
5891 msgid ""
5892 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5893 "Allocated thread stack at 0x804d000\n"
5894 msgstr ""
5895 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5896 "Allocated thread stack at 0x804d000\n"
5897
5898 #. type: Plain text
5899 #: build/C/man3/pthread_getattr_np.3:172
5900 #, no-wrap
5901 msgid ""
5902 "Thread attributes object after initializations:\n"
5903 "        Guard size          = 4096 bytes\n"
5904 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5905 "        Stack size          = 0x8000 (32768) bytes\n"
5906 msgstr ""
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
5912 #. type: Plain text
5913 #: build/C/man3/pthread_getattr_np.3:177
5914 #, no-wrap
5915 msgid ""
5916 "Attributes of created thread:\n"
5917 "        Guard size          = 0 bytes\n"
5918 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5919 "        Stack size          = 0x8000 (32768) bytes\n"
5920 msgstr ""
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
5926 #. type: Plain text
5927 #: build/C/man3/pthread_getattr_np.3:198
5928 #, no-wrap
5929 msgid ""
5930 "static void\n"
5931 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5932 "{\n"
5933 "    int s;\n"
5934 "    size_t stack_size, guard_size;\n"
5935 "    void *stack_addr;\n"
5936 msgstr ""
5937 "static void\n"
5938 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5939 "{\n"
5940 "    int s;\n"
5941 "    size_t stack_size, guard_size;\n"
5942 "    void *stack_addr;\n"
5943
5944 #. type: Plain text
5945 #: build/C/man3/pthread_getattr_np.3:203
5946 #, no-wrap
5947 msgid ""
5948 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5949 "    if (s != 0)\n"
5950 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5951 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5952 msgstr ""
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
5958 #. type: Plain text
5959 #: build/C/man3/pthread_getattr_np.3:214
5960 #, no-wrap
5961 msgid ""
5962 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5963 "    if (s != 0)\n"
5964 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5965 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5966 "    if (stack_size E<gt> 0)\n"
5967 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5968 "    printf(\"\\en\");\n"
5969 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5970 "            prefix, stack_size, stack_size);\n"
5971 "}\n"
5972 msgstr ""
5973 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5974 "    if (s != 0)\n"
5975 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5976 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5977 "    if (stack_size E<gt> 0)\n"
5978 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5979 "    printf(\"\\en\");\n"
5980 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5981 "            prefix, stack_size, stack_size);\n"
5982 "}\n"
5983
5984 #. type: Plain text
5985 #: build/C/man3/pthread_getattr_np.3:220
5986 #, no-wrap
5987 msgid ""
5988 "static void\n"
5989 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5990 "{\n"
5991 "    int s;\n"
5992 "    pthread_attr_t attr;\n"
5993 msgstr ""
5994 "static void\n"
5995 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5996 "{\n"
5997 "    int s;\n"
5998 "    pthread_attr_t attr;\n"
5999
6000 #. type: Plain text
6001 #: build/C/man3/pthread_getattr_np.3:224
6002 #, no-wrap
6003 msgid ""
6004 "    s = pthread_getattr_np(thread, &attr);\n"
6005 "    if (s != 0)\n"
6006 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6007 msgstr ""
6008 "    s = pthread_getattr_np(thread, &attr);\n"
6009 "    if (s != 0)\n"
6010 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6011
6012 #. type: Plain text
6013 #: build/C/man3/pthread_getattr_np.3:226
6014 #, no-wrap
6015 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6016 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6017
6018 #. type: Plain text
6019 #: build/C/man3/pthread_getattr_np.3:231
6020 #, no-wrap
6021 msgid ""
6022 "    s = pthread_attr_destroy(&attr);\n"
6023 "    if (s != 0)\n"
6024 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6025 "}\n"
6026 msgstr ""
6027 "    s = pthread_attr_destroy(&attr);\n"
6028 "    if (s != 0)\n"
6029 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6030 "}\n"
6031
6032 #. type: Plain text
6033 #: build/C/man3/pthread_getattr_np.3:237
6034 #, no-wrap
6035 msgid ""
6036 "static void *           /* Start function for thread we create */\n"
6037 "thread_start(void *arg)\n"
6038 "{\n"
6039 "    printf(\"Attributes of created thread:\\en\");\n"
6040 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6041 msgstr ""
6042 "static void *           /* Start function for thread we create */\n"
6043 "thread_start(void *arg)\n"
6044 "{\n"
6045 "    printf(\"Attributes of created thread:\\en\");\n"
6046 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6047
6048 #. type: Plain text
6049 #: build/C/man3/pthread_getattr_np.3:251
6050 #, no-wrap
6051 msgid ""
6052 "static void\n"
6053 "usage(char *pname, char *msg)\n"
6054 "{\n"
6055 "    if (msg != NULL)\n"
6056 "        fputs(msg, stderr);\n"
6057 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6058 "            \" [-g guard-size]\\en\", pname);\n"
6059 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6060 "    exit(EXIT_FAILURE);\n"
6061 "}\n"
6062 msgstr ""
6063 "static void\n"
6064 "usage(char *pname, char *msg)\n"
6065 "{\n"
6066 "    if (msg != NULL)\n"
6067 "        fputs(msg, stderr);\n"
6068 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6069 "            \" [-g guard-size]\\en\", pname);\n"
6070 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6071 "    exit(EXIT_FAILURE);\n"
6072 "}\n"
6073
6074 #. type: Plain text
6075 #: build/C/man3/pthread_getattr_np.3:264
6076 #, no-wrap
6077 msgid ""
6078 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6079 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6080 "                              pthread_attr_t *attrp)\n"
6081 "{\n"
6082 "    int s, opt, allocate_stack;\n"
6083 "    long stack_size, guard_size;\n"
6084 "            void *stack_addr;\n"
6085 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6086 "                                           a thread attributes object */\n"
6087 "    allocate_stack = 0;\n"
6088 "    stack_size = -1;\n"
6089 "    guard_size = -1;\n"
6090 msgstr ""
6091 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6092 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6093 "                              pthread_attr_t *attrp)\n"
6094 "{\n"
6095 "    int s, opt, allocate_stack;\n"
6096 "    long stack_size, guard_size;\n"
6097 "            void *stack_addr;\n"
6098 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6099 "                                           a thread attributes object */\n"
6100 "    allocate_stack = 0;\n"
6101 "    stack_size = -1;\n"
6102 "    guard_size = -1;\n"
6103
6104 #. type: Plain text
6105 #: build/C/man3/pthread_getattr_np.3:273
6106 #, no-wrap
6107 msgid ""
6108 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6109 "        switch (opt) {\n"
6110 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6111 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6112 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6113 "        default:    usage(argv[0], NULL);\n"
6114 "        }\n"
6115 "    }\n"
6116 msgstr ""
6117 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6118 "        switch (opt) {\n"
6119 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6120 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6121 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6122 "        default:    usage(argv[0], NULL);\n"
6123 "        }\n"
6124 "    }\n"
6125
6126 #. type: Plain text
6127 #: build/C/man3/pthread_getattr_np.3:276
6128 #, no-wrap
6129 msgid ""
6130 "    if (allocate_stack && stack_size == -1)\n"
6131 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6132 msgstr ""
6133 "    if (allocate_stack && stack_size == -1)\n"
6134 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6135
6136 #. type: Plain text
6137 #: build/C/man3/pthread_getattr_np.3:279
6138 #, no-wrap
6139 msgid ""
6140 "    if (argc E<gt> optind)\n"
6141 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6142 msgstr ""
6143 "    if (argc E<gt> optind)\n"
6144 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6145
6146 #. type: Plain text
6147 #: build/C/man3/pthread_getattr_np.3:282
6148 #, no-wrap
6149 msgid ""
6150 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6151 "        ret_attrp = attrp;\n"
6152 msgstr ""
6153 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6154 "        ret_attrp = attrp;\n"
6155
6156 #. type: Plain text
6157 #: build/C/man3/pthread_getattr_np.3:287
6158 #, no-wrap
6159 msgid ""
6160 "        s = pthread_attr_init(attrp);\n"
6161 "        if (s != 0)\n"
6162 "            handle_error_en(s, \"pthread_attr_init\");\n"
6163 "    }\n"
6164 msgstr ""
6165 "        s = pthread_attr_init(attrp);\n"
6166 "        if (s != 0)\n"
6167 "            handle_error_en(s, \"pthread_attr_init\");\n"
6168 "    }\n"
6169
6170 #. type: Plain text
6171 #: build/C/man3/pthread_getattr_np.3:299
6172 #, no-wrap
6173 msgid ""
6174 "    if (stack_size E<gt>= 0) {\n"
6175 "        if (!allocate_stack) {\n"
6176 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6177 "            if (s != 0)\n"
6178 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6179 "        } else {\n"
6180 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6181 "                               stack_size);\n"
6182 "            if (s != 0)\n"
6183 "                handle_error_en(s, \"posix_memalign\");\n"
6184 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6185 msgstr ""
6186 "    if (stack_size E<gt>= 0) {\n"
6187 "        if (!allocate_stack) {\n"
6188 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6189 "            if (s != 0)\n"
6190 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6191 "        } else {\n"
6192 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6193 "                               stack_size);\n"
6194 "            if (s != 0)\n"
6195 "                handle_error_en(s, \"posix_memalign\");\n"
6196 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6197
6198 #. type: Plain text
6199 #: build/C/man3/pthread_getattr_np.3:305
6200 #, no-wrap
6201 msgid ""
6202 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6203 "            if (s != 0)\n"
6204 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6205 "        }\n"
6206 "    }\n"
6207 msgstr ""
6208 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6209 "            if (s != 0)\n"
6210 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6211 "        }\n"
6212 "    }\n"
6213
6214 #. type: Plain text
6215 #: build/C/man3/pthread_getattr_np.3:311
6216 #, no-wrap
6217 msgid ""
6218 "    if (guard_size E<gt>= 0) {\n"
6219 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6220 "        if (s != 0)\n"
6221 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6222 "    }\n"
6223 msgstr ""
6224 "    if (guard_size E<gt>= 0) {\n"
6225 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6226 "        if (s != 0)\n"
6227 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6228 "    }\n"
6229
6230 #. type: Plain text
6231 #: build/C/man3/pthread_getattr_np.3:314
6232 #, no-wrap
6233 msgid ""
6234 "    return ret_attrp;\n"
6235 "}\n"
6236 msgstr ""
6237 "    return ret_attrp;\n"
6238 "}\n"
6239
6240 #. type: Plain text
6241 #: build/C/man3/pthread_getattr_np.3:323
6242 #, no-wrap
6243 msgid ""
6244 "int\n"
6245 "main(int argc, char *argv[])\n"
6246 "{\n"
6247 "    int s;\n"
6248 "    pthread_t thr;\n"
6249 "    pthread_attr_t attr;\n"
6250 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6251 "                                        a thread attributes object */\n"
6252 msgstr ""
6253 "int\n"
6254 "main(int argc, char *argv[])\n"
6255 "{\n"
6256 "    int s;\n"
6257 "    pthread_t thr;\n"
6258 "    pthread_attr_t attr;\n"
6259 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6260 "                                        a thread attributes object */\n"
6261
6262 #. type: Plain text
6263 #: build/C/man3/pthread_getattr_np.3:325
6264 #, no-wrap
6265 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6266 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6267
6268 #. type: Plain text
6269 #: build/C/man3/pthread_getattr_np.3:331
6270 #, no-wrap
6271 msgid ""
6272 "    if (attrp != NULL) {\n"
6273 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6274 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6275 "        printf(\"\\en\");\n"
6276 "    }\n"
6277 msgstr ""
6278 "    if (attrp != NULL) {\n"
6279 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6280 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6281 "        printf(\"\\en\");\n"
6282 "    }\n"
6283
6284 #. type: Plain text
6285 #: build/C/man3/pthread_getattr_np.3:361
6286 msgid ""
6287 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6288 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6289 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6290 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6291 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6292 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6293 msgstr ""
6294 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6295 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6296 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6297 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6298 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6299 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6300
6301 #. type: TH
6302 #: build/C/man3/pthread_getcpuclockid.3:26
6303 #, no-wrap
6304 msgid "PTHREAD_GETCPUCLOCKID"
6305 msgstr "PTHREAD_GETCPUCLOCKID"
6306
6307 #. type: TH
6308 #: build/C/man3/pthread_getcpuclockid.3:26
6309 #, no-wrap
6310 msgid "2009-02-08"
6311 msgstr "2009-02-08"
6312
6313 #. type: Plain text
6314 #: build/C/man3/pthread_getcpuclockid.3:29
6315 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6316 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6317
6318 #. type: Plain text
6319 #: build/C/man3/pthread_getcpuclockid.3:33
6320 #, no-wrap
6321 msgid ""
6322 "B<#include E<lt>pthread.hE<gt>>\n"
6323 "B<#include E<lt>time.hE<gt>>\n"
6324 msgstr ""
6325 "B<#include E<lt>pthread.hE<gt>>\n"
6326 "B<#include E<lt>time.hE<gt>>\n"
6327
6328 #. type: Plain text
6329 #: build/C/man3/pthread_getcpuclockid.3:35
6330 #, no-wrap
6331 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6332 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6333
6334 #.  The clockid is constructed as follows:
6335 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6336 #.  where CLOCK_IDFIELD_SIZE is 3.
6337 #. type: Plain text
6338 #: build/C/man3/pthread_getcpuclockid.3:46
6339 msgid ""
6340 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6341 "time clock of the thread I<thread>."
6342 msgstr ""
6343 "B<pthread_getcpuclockid>() 関数は、\n"
6344 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6345
6346 #. type: TP
6347 #: build/C/man3/pthread_getcpuclockid.3:50
6348 #, no-wrap
6349 msgid "B<ENOENT>"
6350 msgstr "B<ENOENT>"
6351
6352 #.  CLOCK_THREAD_CPUTIME_ID not defined
6353 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6354 #.  be possible if kernel thread IDs took more than 29 bits (which
6355 #.  they currently cannot).
6356 #. type: Plain text
6357 #: build/C/man3/pthread_getcpuclockid.3:58
6358 msgid "Per-thread CPU time clocks are not supported by the system."
6359 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6360
6361 #. type: Plain text
6362 #: build/C/man3/pthread_getcpuclockid.3:65
6363 msgid "This function is available in glibc since version 2.2."
6364 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6365
6366 #. type: Plain text
6367 #: build/C/man3/pthread_getcpuclockid.3:78
6368 msgid ""
6369 "When I<thread> refers to the calling thread, this function returns an "
6370 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6371 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6372 msgstr ""
6373 "I<thread> が呼び出したスレッドを参照している場合、\n"
6374 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6375 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6376 "を参照する ID が返される。"
6377
6378 #. type: Plain text
6379 #: build/C/man3/pthread_getcpuclockid.3:84
6380 msgid ""
6381 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6382 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6383 "the two threads.  The following shell session shows an example run:"
6384 msgstr ""
6385 "以下のプログラムは、スレッドを作成し、それから\n"
6386 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6387 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6388 "スレッド毎の CPU 時間を取得する。\n"
6389 "下記のシェルのセッションは実行例である。"
6390
6391 #. type: Plain text
6392 #: build/C/man3/pthread_getcpuclockid.3:93
6393 #, no-wrap
6394 msgid ""
6395 "$ B<./a.out>\n"
6396 "Main thread sleeping\n"
6397 "Subthread starting infinite loop\n"
6398 "Main thread consuming some CPU time...\n"
6399 "Process total CPU time:    1.368\n"
6400 "Main thread CPU time:      0.376\n"
6401 "Subthread CPU time:        0.992\n"
6402 msgstr ""
6403 "$ B<./a.out>\n"
6404 "Main thread sleeping\n"
6405 "Subthread starting infinite loop\n"
6406 "Main thread consuming some CPU time...\n"
6407 "Process total CPU time:    1.368\n"
6408 "Main thread CPU time:      0.376\n"
6409 "Subthread CPU time:        0.992\n"
6410
6411 #. type: Plain text
6412 #: build/C/man3/pthread_getcpuclockid.3:99
6413 #, no-wrap
6414 msgid "/* Link with \"-lrt\" */\n"
6415 msgstr "/* \"-lrt\" でリンクする */\n"
6416
6417 #. type: Plain text
6418 #: build/C/man3/pthread_getcpuclockid.3:107
6419 #, no-wrap
6420 msgid ""
6421 "#include E<lt>time.hE<gt>\n"
6422 "#include E<lt>stdio.hE<gt>\n"
6423 "#include E<lt>stdlib.hE<gt>\n"
6424 "#include E<lt>unistd.hE<gt>\n"
6425 "#include E<lt>pthread.hE<gt>\n"
6426 "#include E<lt>string.hE<gt>\n"
6427 "#include E<lt>errno.hE<gt>\n"
6428 msgstr ""
6429 "#include E<lt>time.hE<gt>\n"
6430 "#include E<lt>stdio.hE<gt>\n"
6431 "#include E<lt>stdlib.hE<gt>\n"
6432 "#include E<lt>unistd.hE<gt>\n"
6433 "#include E<lt>pthread.hE<gt>\n"
6434 "#include E<lt>string.hE<gt>\n"
6435 "#include E<lt>errno.hE<gt>\n"
6436
6437 #. type: Plain text
6438 #: build/C/man3/pthread_getcpuclockid.3:121
6439 #, no-wrap
6440 msgid ""
6441 "static void *\n"
6442 "thread_start(void *arg)\n"
6443 "{\n"
6444 "    printf(\"Subthread starting infinite loop\\en\");\n"
6445 "    for (;;)\n"
6446 "        continue;\n"
6447 "}\n"
6448 msgstr ""
6449 "static void *\n"
6450 "thread_start(void *arg)\n"
6451 "{\n"
6452 "    printf(\"Subthread starting infinite loop\\en\");\n"
6453 "    for (;;)\n"
6454 "        continue;\n"
6455 "}\n"
6456
6457 #. type: Plain text
6458 #: build/C/man3/pthread_getcpuclockid.3:126
6459 #, no-wrap
6460 msgid ""
6461 "static void\n"
6462 "pclock(char *msg, clockid_t cid)\n"
6463 "{\n"
6464 "    struct timespec ts;\n"
6465 msgstr ""
6466 "static void\n"
6467 "pclock(char *msg, clockid_t cid)\n"
6468 "{\n"
6469 "    struct timespec ts;\n"
6470
6471 #. type: Plain text
6472 #: build/C/man3/pthread_getcpuclockid.3:132
6473 #, no-wrap
6474 msgid ""
6475 "    printf(\"%s\", msg);\n"
6476 "    if (clock_gettime(cid, &ts) == -1)\n"
6477 "        handle_error(\"clock_gettime\");\n"
6478 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6479 "}\n"
6480 msgstr ""
6481 "    printf(\"%s\", msg);\n"
6482 "    if (clock_gettime(cid, &ts) == -1)\n"
6483 "        handle_error(\"clock_gettime\");\n"
6484 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6485 "}\n"
6486
6487 #. type: Plain text
6488 #: build/C/man3/pthread_getcpuclockid.3:139
6489 #, no-wrap
6490 msgid ""
6491 "int\n"
6492 "main(int argc, char *argv[])\n"
6493 "{\n"
6494 "    pthread_t thread;\n"
6495 "    clockid_t cid;\n"
6496 "    int j, s;\n"
6497 msgstr ""
6498 "int\n"
6499 "main(int argc, char *argv[])\n"
6500 "{\n"
6501 "    pthread_t thread;\n"
6502 "    clockid_t cid;\n"
6503 "    int j, s;\n"
6504
6505 #. type: Plain text
6506 #: build/C/man3/pthread_getcpuclockid.3:143
6507 #, no-wrap
6508 msgid ""
6509 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6510 "    if (s != 0)\n"
6511 "        handle_error_en(s, \"pthread_create\");\n"
6512 msgstr ""
6513 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6514 "    if (s != 0)\n"
6515 "        handle_error_en(s, \"pthread_create\");\n"
6516
6517 #. type: Plain text
6518 #: build/C/man3/pthread_getcpuclockid.3:146
6519 #, no-wrap
6520 msgid ""
6521 "    printf(\"Main thread sleeping\\en\");\n"
6522 "    sleep(1);\n"
6523 msgstr ""
6524 "    printf(\"Main thread sleeping\\en\");\n"
6525 "    sleep(1);\n"
6526
6527 #. type: Plain text
6528 #: build/C/man3/pthread_getcpuclockid.3:150
6529 #, no-wrap
6530 msgid ""
6531 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6532 "    for (j = 0; j E<lt> 2000000; j++)\n"
6533 "        getppid();\n"
6534 msgstr ""
6535 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6536 "    for (j = 0; j E<lt> 2000000; j++)\n"
6537 "        getppid();\n"
6538
6539 #. type: Plain text
6540 #: build/C/man3/pthread_getcpuclockid.3:152
6541 #, no-wrap
6542 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6543 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6544
6545 #. type: Plain text
6546 #: build/C/man3/pthread_getcpuclockid.3:157
6547 #, no-wrap
6548 msgid ""
6549 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6550 "    if (s != 0)\n"
6551 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6552 "    pclock(\"Main thread CPU time:   \", cid);\n"
6553 msgstr ""
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
6559 #. type: Plain text
6560 #: build/C/man3/pthread_getcpuclockid.3:160
6561 #, no-wrap
6562 msgid ""
6563 "    /* The preceding 4 lines of code could have been replaced by:\n"
6564 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6565 msgstr ""
6566 "    /* The preceding 4 lines of code could have been replaced by:\n"
6567 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6568
6569 #. type: Plain text
6570 #: build/C/man3/pthread_getcpuclockid.3:165
6571 #, no-wrap
6572 msgid ""
6573 "    s = pthread_getcpuclockid(thread, &cid);\n"
6574 "    if (s != 0)\n"
6575 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6576 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6577 msgstr ""
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
6583 #. type: Plain text
6584 #: build/C/man3/pthread_getcpuclockid.3:168
6585 #, no-wrap
6586 msgid ""
6587 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6588 "}\n"
6589 msgstr ""
6590 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6591 "}\n"
6592
6593 #. type: Plain text
6594 #: build/C/man3/pthread_getcpuclockid.3:177
6595 msgid ""
6596 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6597 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6598 msgstr ""
6599 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6600 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6601
6602 #. type: TH
6603 #: build/C/man3/pthread_join.3:26
6604 #, no-wrap
6605 msgid "PTHREAD_JOIN"
6606 msgstr "PTHREAD_JOIN"
6607
6608 #. type: Plain text
6609 #: build/C/man3/pthread_join.3:29
6610 msgid "pthread_join - join with a terminated thread"
6611 msgstr "pthread_join - 終了したスレッドを join する"
6612
6613 #. type: Plain text
6614 #: build/C/man3/pthread_join.3:34
6615 #, no-wrap
6616 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6617 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6618
6619 #. type: Plain text
6620 #: build/C/man3/pthread_join.3:49
6621 msgid ""
6622 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6623 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6624 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6625 msgstr ""
6626 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6627 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6628 "B<pthread_join>() はすぐに返る。\n"
6629 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6630
6631 #. type: Plain text
6632 #: build/C/man3/pthread_join.3:63
6633 msgid ""
6634 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6635 "the target thread (i.e., the value that the target thread supplied to "
6636 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6637 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6638 msgstr ""
6639 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6640 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6641 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6642 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6643
6644 #. type: Plain text
6645 #: build/C/man3/pthread_join.3:70
6646 msgid ""
6647 "If multiple threads simultaneously try to join with the same thread, the "
6648 "results are undefined.  If the thread calling B<pthread_join>()  is "
6649 "canceled, then the target thread will remain joinable (i.e., it will not be "
6650 "detached)."
6651 msgstr ""
6652 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6653 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6654 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6655 "ならない)。"
6656
6657 #. type: Plain text
6658 #: build/C/man3/pthread_join.3:75
6659 msgid ""
6660 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6661 "number."
6662 msgstr ""
6663 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6664 "エラーの場合、エラー番号を返す。"
6665
6666 #. type: TP
6667 #: build/C/man3/pthread_join.3:76
6668 #, no-wrap
6669 msgid "B<EDEADLK>"
6670 msgstr "B<EDEADLK>"
6671
6672 #.  The following verified by testing on glibc 2.8/NPTL:
6673 #.  The following verified by testing on glibc 2.8/NPTL:
6674 #. type: Plain text
6675 #: build/C/man3/pthread_join.3:85
6676 msgid ""
6677 "A deadlock was detected (e.g., two threads tried to join with each other); "
6678 "or I<thread> specifies the calling thread."
6679 msgstr ""
6680 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6681 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6682
6683 #.  POSIX.1-2001 does not specify this error case.
6684 #. type: Plain text
6685 #: build/C/man3/pthread_join.3:93
6686 msgid "Another thread is already waiting to join with this thread."
6687 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6688
6689 #. type: Plain text
6690 #: build/C/man3/pthread_join.3:104
6691 msgid ""
6692 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6693 "the target thread has terminated."
6694 msgstr ""
6695 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6696 "呼び出し側には、対象スレッドが終了していることが保証される。"
6697
6698 #. type: Plain text
6699 #: build/C/man3/pthread_join.3:107
6700 msgid ""
6701 "Joining with a thread that has previously been joined results in undefined "
6702 "behavior."
6703 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6704
6705 #. type: Plain text
6706 #: build/C/man3/pthread_join.3:115
6707 msgid ""
6708 "Failure to join with a thread that is joinable (i.e., one that is not "
6709 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6710 "zombie thread consumes some system resources, and when enough zombie threads "
6711 "have accumulated, it will no longer be possible to create new threads (or "
6712 "processes)."
6713 msgstr ""
6714 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6715 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6716 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6717 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6718 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6719 "このようなことが起きるのは避けること。"
6720
6721 #. type: Plain text
6722 #: build/C/man3/pthread_join.3:121
6723 msgid ""
6724 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6725 "\"join with any terminated thread\".  If you believe you need this "
6726 "functionality, you probably need to rethink your application design."
6727 msgstr ""
6728 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6729 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6730 "この機能が必要だと思うような場合には、おそらく\n"
6731 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6732
6733 #. type: Plain text
6734 #: build/C/man3/pthread_join.3:124
6735 msgid ""
6736 "All of the threads in a process are peers: any thread can join with any "
6737 "other thread in the process."
6738 msgstr ""
6739 "プロセス内の全てのスレッドは対等であり、\n"
6740 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6741
6742 #. type: Plain text
6743 #: build/C/man3/pthread_join.3:134
6744 msgid ""
6745 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6746 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6747 msgstr ""
6748 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6749 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6750
6751 #. type: TH
6752 #: build/C/man3/pthread_kill.3:26
6753 #, no-wrap
6754 msgid "PTHREAD_KILL"
6755 msgstr "PTHREAD_KILL"
6756
6757 #. type: TH
6758 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigqueue.3:25
6759 #, no-wrap
6760 msgid "2012-08-19"
6761 msgstr "2012-08-19"
6762
6763 #. type: Plain text
6764 #: build/C/man3/pthread_kill.3:29
6765 msgid "pthread_kill - send a signal to a thread"
6766 msgstr "pthread_kill - スレッドにシグナルを送信する"
6767
6768 #. type: Plain text
6769 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6770 #, no-wrap
6771 msgid "B<#include E<lt>signal.hE<gt>>\n"
6772 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6773
6774 #. type: Plain text
6775 #: build/C/man3/pthread_kill.3:34
6776 #, no-wrap
6777 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6778 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6779
6780 #. type: Plain text
6781 #: build/C/man3/pthread_kill.3:47
6782 msgid ""
6783 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6784 "thread in the same process as the caller.  The signal is asynchronously "
6785 "directed to I<thread>."
6786 msgstr ""
6787 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6788 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6789 "シグナルは非同期に I<thread> へ直接送られる。"
6790
6791 #. type: Plain text
6792 #: build/C/man3/pthread_kill.3:52
6793 msgid ""
6794 "If I<sig> is 0, then no signal is sent, but error checking is still "
6795 "performed; this can be used to check for the existence of a thread ID."
6796 msgstr ""
6797 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6798 "エラーチェックだけは実行される。\n"
6799 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6800
6801 #. type: Plain text
6802 #: build/C/man3/pthread_kill.3:57
6803 msgid ""
6804 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6805 "number, and no signal is sent."
6806 msgstr ""
6807 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6808 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6809
6810 #. type: Plain text
6811 #: build/C/man3/pthread_kill.3:61
6812 msgid "An invalid signal was specified."
6813 msgstr "無効なシグナルが指定された。"
6814
6815 #. type: Plain text
6816 #: build/C/man3/pthread_kill.3:75
6817 msgid ""
6818 "Signal dispositions are process-wide: if a signal handler is installed, the "
6819 "handler will be invoked in the thread I<thread>, but if the disposition of "
6820 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6821 "affect the whole process."
6822 msgstr ""
6823 "シグナルの配送はプロセス全体で行われる。\n"
6824 "シグナルハンドラが設定されている場合、\n"
6825 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6826 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6827 "シグナルに対するアクションはプロセス全体に影響がある。"
6828
6829 #. type: Plain text
6830 #: build/C/man3/pthread_kill.3:84
6831 msgid ""
6832 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6833 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6834 msgstr ""
6835 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6836 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6837
6838 #. type: TH
6839 #: build/C/man3/pthread_kill_other_threads_np.3:26
6840 #, no-wrap
6841 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6842 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6843
6844 #. type: TH
6845 #: build/C/man3/pthread_kill_other_threads_np.3:26
6846 #, no-wrap
6847 msgid "2010-09-09"
6848 msgstr "2010-09-09"
6849
6850 #. type: Plain text
6851 #: build/C/man3/pthread_kill_other_threads_np.3:29
6852 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6853 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6854
6855 #. type: Plain text
6856 #: build/C/man3/pthread_kill_other_threads_np.3:34
6857 #, no-wrap
6858 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6859 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6860
6861 #.  .SH VERSIONS
6862 #.  Available since glibc 2.0
6863 #. type: Plain text
6864 #: build/C/man3/pthread_kill_other_threads_np.3:47
6865 msgid ""
6866 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
6867 "threading implementation.  On that implementation, calling this function "
6868 "causes the immediate termination of all threads in the application, except "
6869 "the calling thread.  The cancellation state and cancellation type of the to-"
6870 "be-terminated threads are ignored, and the cleanup handlers are not called "
6871 "in those threads."
6872 msgstr ""
6873 "B<pthread_kill_other_threads_np>() は、\n"
6874 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6875 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6876 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6877 "終了対象のスレッドの cancelability state と cancelability type は\n"
6878 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6879
6880 #. type: Plain text
6881 #: build/C/man3/pthread_kill_other_threads_np.3:59
6882 msgid ""
6883 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6884 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6885 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6886 "the other threads of an application are not automatically terminated (as "
6887 "POSIX.1-2001 requires) during B<execve>(2)."
6888 msgstr ""
6889 "B<pthread_kill_other_threads_np>() は、\n"
6890 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6891 "呼ばれることを目的として用意されている。\n"
6892 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6893 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6894 "終了されないという制限を解決するために設計された。"
6895
6896 #. type: Plain text
6897 #: build/C/man3/pthread_kill_other_threads_np.3:66
6898 msgid ""
6899 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6900 "exists, but does nothing.  (Nothing needs to be done, because the "
6901 "implementation does the right thing during an B<execve>(2).)"
6902 msgstr ""
6903 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6904 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6905 "何もする必要がないということだ)。"
6906
6907 #. type: Plain text
6908 #: build/C/man3/pthread_kill_other_threads_np.3:72
6909 msgid ""
6910 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6911 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6912 msgstr ""
6913 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6914 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6915
6916 #. type: TH
6917 #: build/C/man3/pthread_self.3:26
6918 #, no-wrap
6919 msgid "PTHREAD_SELF"
6920 msgstr "PTHREAD_SELF"
6921
6922 #. type: Plain text
6923 #: build/C/man3/pthread_self.3:29
6924 msgid "pthread_self - obtain ID of the calling thread"
6925 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6926
6927 #. type: Plain text
6928 #: build/C/man3/pthread_self.3:34
6929 #, no-wrap
6930 msgid "B<pthread_t pthread_self(void);>\n"
6931 msgstr "B<pthread_t pthread_self(void);>\n"
6932
6933 #. type: Plain text
6934 #: build/C/man3/pthread_self.3:46
6935 msgid ""
6936 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6937 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6938 "(3)  call that created this thread."
6939 msgstr ""
6940 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6941 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6942 "呼び出しで I<*thread> で返されるのと同じ値である。"
6943
6944 #. type: Plain text
6945 #: build/C/man3/pthread_self.3:48
6946 msgid "This function always succeeds, returning the calling thread's ID."
6947 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6948
6949 #. type: Plain text
6950 #: build/C/man3/pthread_self.3:63
6951 msgid ""
6952 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6953 "represent a thread ID; for example, representation using either an "
6954 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6955 "I<pthread_t> can't portably be compared using the C equality operator "
6956 "(B<==>); use B<pthread_equal>(3)  instead."
6957 msgstr ""
6958 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
6959 "スレッド実装が完全に自由に選択してよいことになっている。\n"
6960 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
6961 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
6962 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
6963 "代わりに B<pthread_equal>(3) を使うこと。"
6964
6965 #. type: Plain text
6966 #: build/C/man3/pthread_self.3:67
6967 msgid ""
6968 "Thread identifiers should be considered opaque: any attempt to use a thread "
6969 "ID other than in pthreads calls is nonportable and can lead to unspecified "
6970 "results."
6971 msgstr ""
6972 "スレッド識別子はその内部構造を意識すべきではない。\n"
6973 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
6974 "移植性がなくなり、どのような結果が得られるかも分からない。"
6975
6976 #. type: Plain text
6977 #: build/C/man3/pthread_self.3:71
6978 msgid ""
6979 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
6980 "may be reused after a terminated thread has been joined, or a detached "
6981 "thread has terminated."
6982 msgstr ""
6983 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
6984 "終了したスレッドが join されたり、\n"
6985 "切り離された (detached) スレッドが終了されたりした後は、\n"
6986 "そのスレッド ID は再利用されることがある。"
6987
6988 #. type: Plain text
6989 #: build/C/man3/pthread_self.3:76
6990 msgid ""
6991 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
6992 "kernel thread ID returned by a call to B<gettid>(2)."
6993 msgstr ""
6994 "B<pthread_self>() が返すスレッド ID は、\n"
6995 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
6996
6997 #. type: Plain text
6998 #: build/C/man3/pthread_self.3:80
6999 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7000 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7001
7002 #. type: TH
7003 #: build/C/man3/pthread_setaffinity_np.3:26
7004 #, no-wrap
7005 msgid "PTHREAD_SETAFFINITY_NP"
7006 msgstr "PTHREAD_SETAFFINITY_NP"
7007
7008 #. type: Plain text
7009 #: build/C/man3/pthread_setaffinity_np.3:30
7010 msgid ""
7011 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7012 "thread"
7013 msgstr ""
7014 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7015 "CPU affinity の設定/取得を行う"
7016
7017 #. type: Plain text
7018 #: build/C/man3/pthread_setaffinity_np.3:39
7019 #, no-wrap
7020 msgid ""
7021 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7022 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7023 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7024 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7025 msgstr ""
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
7031 #. type: Plain text
7032 #: build/C/man3/pthread_setaffinity_np.3:54
7033 msgid ""
7034 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7035 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7036 "successful, and the thread is not currently running on one of the CPUs in "
7037 "I<cpuset>, then it is migrated to one of those CPUs."
7038 msgstr ""
7039 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7040 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7041 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7042 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7043
7044 #. type: Plain text
7045 #: build/C/man3/pthread_setaffinity_np.3:61
7046 msgid ""
7047 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7048 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7049 msgstr ""
7050 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7051 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7052
7053 #. type: Plain text
7054 #: build/C/man3/pthread_setaffinity_np.3:77
7055 msgid ""
7056 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7057 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
7058 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
7059 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7060 msgstr ""
7061 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7062 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7063 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7064 "割り当てている場合には、別の値になることもある)。"
7065
7066 #. type: TP
7067 #: build/C/man3/pthread_setaffinity_np.3:81
7068 #, no-wrap
7069 msgid "B<EFAULT>"
7070 msgstr "B<EFAULT>"
7071
7072 #. type: Plain text
7073 #: build/C/man3/pthread_setaffinity_np.3:84
7074 msgid "A supplied memory address was invalid."
7075 msgstr "指定されたメモリアドレスが無効である。"
7076
7077 #. type: Plain text
7078 #: build/C/man3/pthread_setaffinity_np.3:93
7079 msgid ""
7080 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7081 "processors that are currently physically on the system and permitted to the "
7082 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7083 "mechanism described in B<cpuset>(7)."
7084 msgstr ""
7085 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7086 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7087 "されているプロセッサが一つも含まれていない。\n"
7088 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7089 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7090
7091 #.  FIXME . ?
7092 #.  Loic Domaigne commented: it seems that in the future the
7093 #.  kernel developers want to make cpumask_t dynamic, so
7094 #.  CONFIG_NR_CPUS might become obsolete in the future.
7095 #.  cpumask_t
7096 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7097 #.  of the cpumask_t type.
7098 #. type: Plain text
7099 #: build/C/man3/pthread_setaffinity_np.3:109
7100 msgid ""
7101 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7102 "the set supported by the kernel.  (The kernel configuration option "
7103 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7104 "type used to represent CPU sets.)"
7105 msgstr ""
7106 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7107 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7108 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7109 "データ型がサポートする CPU 集合の範囲が定義される。)"
7110
7111 #. type: Plain text
7112 #: build/C/man3/pthread_setaffinity_np.3:114
7113 msgid ""
7114 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7115 "affinity mask used by the kernel."
7116 msgstr ""
7117 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7118 "affinity マスクの大きさよりも小さい。"
7119
7120 #. type: Plain text
7121 #: build/C/man3/pthread_setaffinity_np.3:137
7122 msgid ""
7123 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7124 "thread will actually run is the intersection of the set specified in the "
7125 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7126 "system may further restrict the set of CPUs on which the thread runs if the "
7127 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7128 "restrictions on the actual set of CPUs on which the thread will run are "
7129 "silently imposed by the kernel."
7130 msgstr ""
7131 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7132 "そのスレッドが実際に実行される CPU 集合は、\n"
7133 "I<cpuset> 引き数で指定された集合と\n"
7134 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7135 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7136 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7137 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7138 "これらの制限は、カーネルにより黙って適用される。"
7139
7140 #. type: Plain text
7141 #: build/C/man3/pthread_setaffinity_np.3:143
7142 msgid ""
7143 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7144 "B<sched_getaffinity>(2)  system calls."
7145 msgstr ""
7146 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7147 "B<sched_getaffinity>(2) を使って実装されている。"
7148
7149 #. type: Plain text
7150 #: build/C/man3/pthread_setaffinity_np.3:154
7151 msgid ""
7152 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7153 "creator's CPU affinity mask."
7154 msgstr ""
7155 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7156 "作成者の CPU affinity マスクを継承する。"
7157
7158 #. type: Plain text
7159 #: build/C/man3/pthread_setaffinity_np.3:162
7160 msgid ""
7161 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7162 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7163 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7164 "check the resulting CPU affinity mask of the thread."
7165 msgstr ""
7166 "以下のプログラムでは、メインスレッドは\n"
7167 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7168 "CPU 0 から 7 が含まれるように設定し\n"
7169 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7170 "その後で B<pthread_getaffinity_np>() を使って\n"
7171 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7172
7173 #. type: Plain text
7174 #: build/C/man3/pthread_setaffinity_np.3:169
7175 #, no-wrap
7176 msgid ""
7177 "#define _GNU_SOURCE\n"
7178 "#include E<lt>pthread.hE<gt>\n"
7179 "#include E<lt>stdio.hE<gt>\n"
7180 "#include E<lt>stdlib.hE<gt>\n"
7181 "#include E<lt>errno.hE<gt>\n"
7182 msgstr ""
7183 "#define _GNU_SOURCE\n"
7184 "#include E<lt>pthread.hE<gt>\n"
7185 "#include E<lt>stdio.hE<gt>\n"
7186 "#include E<lt>stdlib.hE<gt>\n"
7187 "#include E<lt>errno.hE<gt>\n"
7188
7189 #. type: Plain text
7190 #: build/C/man3/pthread_setaffinity_np.3:179
7191 #, no-wrap
7192 msgid ""
7193 "int\n"
7194 "main(int argc, char *argv[])\n"
7195 "{\n"
7196 "    int s, j;\n"
7197 "    cpu_set_t cpuset;\n"
7198 "    pthread_t thread;\n"
7199 msgstr ""
7200 "int\n"
7201 "main(int argc, char *argv[])\n"
7202 "{\n"
7203 "    int s, j;\n"
7204 "    cpu_set_t cpuset;\n"
7205 "    pthread_t thread;\n"
7206
7207 #. type: Plain text
7208 #: build/C/man3/pthread_setaffinity_np.3:181
7209 #, no-wrap
7210 msgid "    thread = pthread_self();\n"
7211 msgstr "    thread = pthread_self();\n"
7212
7213 #. type: Plain text
7214 #: build/C/man3/pthread_setaffinity_np.3:183
7215 #, no-wrap
7216 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7217 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7218
7219 #. type: Plain text
7220 #: build/C/man3/pthread_setaffinity_np.3:187
7221 #, no-wrap
7222 msgid ""
7223 "    CPU_ZERO(&cpuset);\n"
7224 "    for (j = 0; j E<lt> 8; j++)\n"
7225 "        CPU_SET(j, &cpuset);\n"
7226 msgstr ""
7227 "    CPU_ZERO(&cpuset);\n"
7228 "    for (j = 0; j E<lt> 8; j++)\n"
7229 "        CPU_SET(j, &cpuset);\n"
7230
7231 #. type: Plain text
7232 #: build/C/man3/pthread_setaffinity_np.3:191
7233 #, no-wrap
7234 msgid ""
7235 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7236 "    if (s != 0)\n"
7237 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7238 msgstr ""
7239 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7240 "    if (s != 0)\n"
7241 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7242
7243 #. type: Plain text
7244 #: build/C/man3/pthread_setaffinity_np.3:193
7245 #, no-wrap
7246 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7247 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7248
7249 #. type: Plain text
7250 #: build/C/man3/pthread_setaffinity_np.3:197
7251 #, no-wrap
7252 msgid ""
7253 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7254 "    if (s != 0)\n"
7255 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7256 msgstr ""
7257 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7258 "    if (s != 0)\n"
7259 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7260
7261 #. type: Plain text
7262 #: build/C/man3/pthread_setaffinity_np.3:202
7263 #, no-wrap
7264 msgid ""
7265 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7266 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7267 "        if (CPU_ISSET(j, &cpuset))\n"
7268 "            printf(\"    CPU %d\\en\", j);\n"
7269 msgstr ""
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
7275 #. type: Plain text
7276 #: build/C/man3/pthread_setaffinity_np.3:205
7277 #: build/C/man3/pthread_setschedparam.3:430
7278 #, no-wrap
7279 msgid ""
7280 "    exit(EXIT_SUCCESS);\n"
7281 "}\n"
7282 msgstr ""
7283 "    exit(EXIT_SUCCESS);\n"
7284 "}\n"
7285
7286 #. type: Plain text
7287 #: build/C/man3/pthread_setaffinity_np.3:214
7288 msgid ""
7289 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7290 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7291 "B<cpuset>(7), B<pthreads>(7)"
7292 msgstr ""
7293 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7294 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7295 "B<cpuset>(7), B<pthreads>(7)"
7296
7297 #. type: TH
7298 #: build/C/man3/pthread_setcancelstate.3:26
7299 #, no-wrap
7300 msgid "PTHREAD_SETCANCELSTATE"
7301 msgstr "PTHREAD_SETCANCELSTATE"
7302
7303 #. type: Plain text
7304 #: build/C/man3/pthread_setcancelstate.3:30
7305 msgid ""
7306 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7307 "type"
7308 msgstr ""
7309 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7310 "cancelability type を設定する"
7311
7312 #. type: Plain text
7313 #: build/C/man3/pthread_setcancelstate.3:36
7314 #, no-wrap
7315 msgid ""
7316 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7317 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7318 msgstr ""
7319 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7320 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7321
7322 #. type: Plain text
7323 #: build/C/man3/pthread_setcancelstate.3:51
7324 msgid ""
7325 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7326 "thread to the value given in I<state>.  The previous cancelability state of "
7327 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7328 "I<state> argument must have one of the following values:"
7329 msgstr ""
7330 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7331 "cancelability state に I<state> で指定された\n"
7332 "値を設定する。変更前のスレッドの cancelability state は\n"
7333 "I<oldstate> が指すバッファで返される。\n"
7334 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7335
7336 #. type: TP
7337 #: build/C/man3/pthread_setcancelstate.3:51
7338 #, no-wrap
7339 msgid "B<PTHREAD_CANCEL_ENABLE>"
7340 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7341
7342 #. type: Plain text
7343 #: build/C/man3/pthread_setcancelstate.3:58
7344 msgid ""
7345 "The thread is cancelable.  This is the default cancelability state in all "
7346 "new threads, including the initial thread.  The thread's cancelability type "
7347 "determines when a cancelable thread will respond to a cancellation request."
7348 msgstr ""
7349 "スレッドは取り消し可能 (cancelable) である。\n"
7350 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7351 "cancelability state である。これには最初のスレッドも含まれる。\n"
7352 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7353 "取り消し要求にいつ反応するかが決まる。"
7354
7355 #. type: TP
7356 #: build/C/man3/pthread_setcancelstate.3:58
7357 #, no-wrap
7358 msgid "B<PTHREAD_CANCEL_DISABLE>"
7359 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7360
7361 #. type: Plain text
7362 #: build/C/man3/pthread_setcancelstate.3:63
7363 msgid ""
7364 "The thread is not cancelable.  If a cancellation request is received, it is "
7365 "blocked until cancelability is enabled."
7366 msgstr ""
7367 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7368 "取り消し可能に設定されるまでその要求はブロックされる。"
7369
7370 #. type: Plain text
7371 #: build/C/man3/pthread_setcancelstate.3:75
7372 msgid ""
7373 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7374 "thread to the value given in I<type>.  The previous cancelability type of "
7375 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7376 "argument must have one of the following values:"
7377 msgstr ""
7378 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7379 "cancelability type に I<type> で指定された値を設定する。\n"
7380 "変更前のスレッドの cancelability type は\n"
7381 "I<oldtype> が指すバッファで返される。\n"
7382 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7383
7384 #. type: TP
7385 #: build/C/man3/pthread_setcancelstate.3:75
7386 #, no-wrap
7387 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7388 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7389
7390 #. type: Plain text
7391 #: build/C/man3/pthread_setcancelstate.3:82
7392 msgid ""
7393 "A cancellation request is deferred until the thread next calls a function "
7394 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7395 "cancelability type in all new threads, including the initial thread."
7396 msgstr ""
7397 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7398 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7399 "スレッドでのデフォルトの cancelability type である。\n"
7400 "これには最初のスレッドも含まれる。"
7401
7402 #. type: TP
7403 #: build/C/man3/pthread_setcancelstate.3:82
7404 #, no-wrap
7405 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7406 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7407
7408 #. type: Plain text
7409 #: build/C/man3/pthread_setcancelstate.3:88
7410 msgid ""
7411 "The thread can be canceled at any time.  (Typically, it will be canceled "
7412 "immediately upon receiving a cancellation request, but the system doesn't "
7413 "guarantee this.)"
7414 msgstr ""
7415 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7416 "システムがそのことを保証しているわけではない)。"
7417
7418 #. type: Plain text
7419 #: build/C/man3/pthread_setcancelstate.3:92
7420 msgid ""
7421 "The set-and-get operation performed by each of these functions is atomic "
7422 "with respect to other threads in the process calling the same function."
7423 msgstr ""
7424 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7425 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7426 "アトミックに行われる。"
7427
7428 #. type: Plain text
7429 #: build/C/man3/pthread_setcancelstate.3:99
7430 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7431 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7432
7433 #. type: Plain text
7434 #: build/C/man3/pthread_setcancelstate.3:103
7435 msgid "Invalid value for I<state>."
7436 msgstr "I<state> に無効な値が指定された。"
7437
7438 #. type: Plain text
7439 #: build/C/man3/pthread_setcancelstate.3:107
7440 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7441 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7442
7443 #.  .SH VERSIONS
7444 #.  Available since glibc 2.0
7445 #. type: Plain text
7446 #: build/C/man3/pthread_setcancelstate.3:113
7447 msgid "Invalid value for I<type>."
7448 msgstr "I<type> に無効な値が指定された。"
7449
7450 #. type: Plain text
7451 #: build/C/man3/pthread_setcancelstate.3:118
7452 msgid ""
7453 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7454 "(3)."
7455 msgstr ""
7456 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7457 "B<pthread_cancel>(3) を参照。"
7458
7459 #. type: Plain text
7460 #: build/C/man3/pthread_setcancelstate.3:125
7461 msgid ""
7462 "Briefly disabling cancelability is useful if a thread performs some critical "
7463 "action that must not be interrupted by a cancellation request.  Beware of "
7464 "disabling cancelability for long periods, or around operations that may "
7465 "block for long periods, since that will render the thread unresponsive to "
7466 "cancellation requests."
7467 msgstr ""
7468 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7469 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7470 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7471 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7472 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7473 "スレッドが応答しない状態になってしまうからである。"
7474
7475 #. type: Plain text
7476 #: build/C/man3/pthread_setcancelstate.3:156
7477 msgid ""
7478 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7479 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7480 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7481 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7482 "because the application has no way of knowing what the state of these "
7483 "resources is when the thread is canceled; that is, did cancellation occur "
7484 "before the resources were reserved, while they were reserved, or after they "
7485 "were released? Furthermore, some internal data structures (e.g., the linked "
7486 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7487 "left in an inconsistent state if cancellation occurs in the middle of the "
7488 "function call.  Consequently, clean-up handlers cease to be useful.  "
7489 "Functions that can be safely asynchronously canceled are called I<async-"
7490 "cancel-safe functions>.  POSIX.1-2001 requires only that B<pthread_cancel>"
7491 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7492 "cancel-safe.  In general, other library functions can't be safely called "
7493 "from an asynchronously cancelable thread.  One of the few circumstances in "
7494 "which asynchronous cancelability is useful is for cancellation of a thread "
7495 "that is in a pure compute-bound loop."
7496 msgstr ""
7497 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7498 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7499 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7500 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7501 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7502 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7503 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7504 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7505 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7506 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7507 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7508 "が役に立たないものになってしまう。\n"
7509 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7510 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7511 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7512 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7513 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7514 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7515 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7516
7517 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7518 #. type: Plain text
7519 #: build/C/man3/pthread_setcancelstate.3:174
7520 msgid ""
7521 "The Linux threading implementations permit the I<oldstate> argument of "
7522 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7523 "the previous cancelability state is not returned to the caller.  Many other "
7524 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7525 "does not specify this point, so portable applications should always specify "
7526 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7527 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7528 msgstr ""
7529 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7530 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7531 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7532 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7533 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7534 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7535 "NULL 以外の値を指定するようにすべきである。\n"
7536 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7537 "全く同じことが言える。"
7538
7539 #. type: Plain text
7540 #: build/C/man3/pthread_setcancelstate.3:177
7541 msgid "See B<pthread_cancel>(3)."
7542 msgstr "B<pthread_cancel>(3) を参照。"
7543
7544 #. type: Plain text
7545 #: build/C/man3/pthread_setcancelstate.3:182
7546 msgid ""
7547 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7548 "B<pthreads>(7)"
7549 msgstr ""
7550 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7551 "B<pthreads>(7)"
7552
7553 #. type: TH
7554 #: build/C/man3/pthread_setconcurrency.3:25
7555 #, no-wrap
7556 msgid "PTHREAD_SETCONCURRENCY"
7557 msgstr "PTHREAD_SETCONCURRENCY"
7558
7559 #. type: TH
7560 #: build/C/man3/pthread_setconcurrency.3:25
7561 #, no-wrap
7562 msgid "2009-04-10"
7563 msgstr "2009-04-10"
7564
7565 #. type: Plain text
7566 #: build/C/man3/pthread_setconcurrency.3:29
7567 msgid ""
7568 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7569 "level"
7570 msgstr ""
7571 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7572 "行う"
7573
7574 #. type: Plain text
7575 #: build/C/man3/pthread_setconcurrency.3:35
7576 #, no-wrap
7577 msgid ""
7578 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7579 "B<int pthread_getconcurrency(void);>\n"
7580 msgstr ""
7581 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7582 "B<int pthread_getconcurrency(void);>\n"
7583
7584 #. type: Plain text
7585 #: build/C/man3/pthread_setconcurrency.3:48
7586 msgid ""
7587 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7588 "application's desired concurrency level, specified in I<new_level>.  The "
7589 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7590 "of concurrency that should be provided as a result of calling "
7591 "B<pthread_setconcurrency>()."
7592 msgstr ""
7593 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7594 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7595 "希望する並列処理レベルは I<new_level> で指定する。\n"
7596 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7597 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7598 "どのような並列度になるべきかは規定されていない。"
7599
7600 #. type: Plain text
7601 #: build/C/man3/pthread_setconcurrency.3:53
7602 msgid ""
7603 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7604 "concurrency level as it deems appropriate."
7605 msgstr ""
7606 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7607 "実装側で適切とみなしたレベルに設定するようになる。"
7608
7609 #. type: Plain text
7610 #: build/C/man3/pthread_setconcurrency.3:56
7611 msgid ""
7612 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7613 "level for this process."
7614 msgstr ""
7615 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7616 "の現在値を返す。"
7617
7618 #. type: Plain text
7619 #: build/C/man3/pthread_setconcurrency.3:61
7620 msgid ""
7621 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7622 "nonzero error number."
7623 msgstr ""
7624 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7625 "エラーの場合、 0 以外のエラー番号を返す。"
7626
7627 #. type: Plain text
7628 #: build/C/man3/pthread_setconcurrency.3:68
7629 msgid ""
7630 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7631 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7632 "B<pthread_setconcurrency>()  has not previously been called."
7633 msgstr ""
7634 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7635 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7636 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7637 "それまでに一度も呼び出されていない場合は 0 が返る。"
7638
7639 #. type: Plain text
7640 #: build/C/man3/pthread_setconcurrency.3:71
7641 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7642 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7643
7644 #. type: Plain text
7645 #: build/C/man3/pthread_setconcurrency.3:75
7646 msgid "I<new_level> is negative."
7647 msgstr "I<new_level> が負である。"
7648
7649 #. type: Plain text
7650 #: build/C/man3/pthread_setconcurrency.3:81
7651 msgid ""
7652 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7653 "I<new_level> would cause a system resource to be exceeded\")."
7654 msgstr ""
7655 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7656 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7657 "超過してしまう」)。"
7658
7659 #. type: Plain text
7660 #: build/C/man3/pthread_setconcurrency.3:83
7661 msgid "These functions are available in glibc since version 2.1."
7662 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7663
7664 #. type: Plain text
7665 #: build/C/man3/pthread_setconcurrency.3:87
7666 msgid "The default concurrency level is 0."
7667 msgstr "デフォルトの concurrency level は 0 である。"
7668
7669 #. type: Plain text
7670 #: build/C/man3/pthread_setconcurrency.3:94
7671 msgid ""
7672 "Concurrency levels are meaningful only for M:N threading implementations, "
7673 "where at any moment a subset of a process's set of user-level threads may be "
7674 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7675 "concurrency level allows the application to give the system a hint as to the "
7676 "number of kernel-scheduling entities that should be provided for efficient "
7677 "execution of the application."
7678 msgstr ""
7679 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7680 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7681 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7682 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7683 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7684 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7685 "ムに伝えることができる。"
7686
7687 #. type: Plain text
7688 #: build/C/man3/pthread_setconcurrency.3:100
7689 msgid ""
7690 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7691 "concurrency level has no meaning.  In other words, on Linux these functions "
7692 "merely exist for compatibility with other systems, and they have no effect "
7693 "on the execution of a program."
7694 msgstr ""
7695 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7696 "並列処理レベルを設定しても何の意味もない。\n"
7697 "言い換えると、 Linux では、これらの関数は、\n"
7698 "他のシステムとの互換性のためだけに存在し、\n"
7699 "プログラムの実行には何の影響も与えないということである。"
7700
7701 #. type: Plain text
7702 #: build/C/man3/pthread_setconcurrency.3:103
7703 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7704 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7705
7706 #. type: TH
7707 #: build/C/man3/pthread_setname_np.3:26
7708 #, no-wrap
7709 msgid "PTHREAD_SETNAME_NP"
7710 msgstr "PTHREAD_SETNAME_NP"
7711
7712 #. type: Plain text
7713 #: build/C/man3/pthread_setname_np.3:29
7714 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7715 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
7716
7717 #. type: Plain text
7718 #: build/C/man3/pthread_setname_np.3:36
7719 #, no-wrap
7720 msgid ""
7721 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7722 "B<#include E<lt>pthread.hE<gt>>\n"
7723 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7724 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7725 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7726 msgstr ""
7727 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7728 "B<#include E<lt>pthread.hE<gt>>\n"
7729 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7730 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7731 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7732
7733 #. type: Plain text
7734 #: build/C/man3/pthread_setname_np.3:55
7735 msgid ""
7736 "By default, all the threads created using B<pthread_create>()  inherit the "
7737 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7738 "unique name for a thread, which can be useful for debugging multithreaded "
7739 "applications.  The thread name is a meaningful C language string, whose "
7740 "length is restricted to 16 characters, including the terminating null byte "
7741 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
7742 "to be changed; I<name> specifies the new name."
7743 msgstr ""
7744 "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム"
7745 "名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定"
7746 "することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデ"
7747 "バッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さ"
7748 "は 16 文字に限定されており、 終端の NULL バイト (\\(aq\\e0\\(aq) も 16 文字に"
7749 "含まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には"
7750 "新しい名前を指定する。"
7751
7752 #. type: Plain text
7753 #: build/C/man3/pthread_setname_np.3:72
7754 msgid ""
7755 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7756 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7757 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7758 "specifies the number of bytes available in I<name>.  The buffer specified by "
7759 "I<name> should be at least 16 characters in length.  The returned thread "
7760 "name in the output buffer will be null terminated."
7761 msgstr ""
7762 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
7763 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
7764 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
7765 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
7766 "出力バッファに返されたスレッド名は NULL 終端される。"
7767
7768 #. type: Plain text
7769 #: build/C/man3/pthread_setname_np.3:79
7770 msgid ""
7771 "The B<pthread_setname_np>()  function can fail with the following error:"
7772 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7773
7774 #. type: TP
7775 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7776 #, no-wrap
7777 msgid "B<ERANGE>"
7778 msgstr "B<ERANGE>"
7779
7780 #. type: Plain text
7781 #: build/C/man3/pthread_setname_np.3:84
7782 msgid ""
7783 "The length of the string specified pointed to by I<name> exceeds the allowed "
7784 "limit."
7785 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
7786
7787 #. type: Plain text
7788 #: build/C/man3/pthread_setname_np.3:88
7789 msgid ""
7790 "The B<pthread_getname_np>()  function can fail with the following error:"
7791 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7792
7793 #. type: Plain text
7794 #: build/C/man3/pthread_setname_np.3:95
7795 msgid ""
7796 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7797 "name."
7798 msgstr ""
7799 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
7800 "る。"
7801
7802 #. type: Plain text
7803 #: build/C/man3/pthread_setname_np.3:100
7804 msgid ""
7805 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7806 "then the call may fail with one of the errors described in B<open>(2)."
7807 msgstr ""
7808 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
7809 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
7810
7811 #. type: Plain text
7812 #: build/C/man3/pthread_setname_np.3:102
7813 msgid "These functions first appeared in glibc in version 2.12."
7814 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7815
7816 #. type: Plain text
7817 #: build/C/man3/pthread_setname_np.3:104
7818 msgid "These functions are nonstandard GNU extensions."
7819 msgstr "これらの関数は非標準の GNU による拡張である。"
7820
7821 #. type: Plain text
7822 #: build/C/man3/pthread_setname_np.3:112
7823 msgid ""
7824 "B<pthread_setname_np>()  internally writes to the thread specific comm file "
7825 "under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7826 "B<pthread_getname_np>()  retrieves it from the same location."
7827 msgstr ""
7828 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
7829 "comm ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
7830 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
7831
7832 #. type: Plain text
7833 #: build/C/man3/pthread_setname_np.3:118
7834 msgid ""
7835 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7836 "B<pthread_getname_np>()."
7837 msgstr ""
7838 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7839 "の使用例を示している。"
7840
7841 #. type: Plain text
7842 #: build/C/man3/pthread_setname_np.3:120
7843 msgid "The following shell session shows a sample run of the program:"
7844 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7845
7846 #. type: Plain text
7847 #: build/C/man3/pthread_setname_np.3:136
7848 #, no-wrap
7849 msgid ""
7850 "$B< ./a.out>\n"
7851 "Created a thread. Default name is: a.out\n"
7852 "The thread name after setting it is THREADFOO.\n"
7853 "B<^Z>                           # Suspend the program\n"
7854 "[1]+  Stopped           ./a.out\n"
7855 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7856 "  PID   TID CMD                         COMMAND\n"
7857 " 5990  5990 ./a.out                     a.out\n"
7858 " 5990  5991 ./a.out                     THREADFOO\n"
7859 "$ B<cat /proc/5990/task/5990/comm>\n"
7860 "a.out\n"
7861 "$ B<cat /proc/5990/task/5991/comm>\n"
7862 "THREADFOO\n"
7863 msgstr ""
7864 "$B< ./a.out>\n"
7865 "Created a thread. Default name is: a.out\n"
7866 "The thread name after setting it is THREADFOO.\n"
7867 "B<^Z>                           # Suspend the program\n"
7868 "[1]+  Stopped           ./a.out\n"
7869 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7870 "  PID   TID CMD                         COMMAND\n"
7871 " 5990  5990 ./a.out                     a.out\n"
7872 " 5990  5991 ./a.out                     THREADFOO\n"
7873 "$ B<cat /proc/5990/task/5990/comm>\n"
7874 "a.out\n"
7875 "$ B<cat /proc/5990/task/5991/comm>\n"
7876 "THREADFOO\n"
7877
7878 #. type: Plain text
7879 #: build/C/man3/pthread_setname_np.3:148
7880 #, no-wrap
7881 msgid ""
7882 "#define _GNU_SOURCE\n"
7883 "#include E<lt>pthread.hE<gt>\n"
7884 "#include E<lt>stdio.hE<gt>\n"
7885 "#include E<lt>string.hE<gt>\n"
7886 "#include E<lt>unistd.hE<gt>\n"
7887 "#include E<lt>errno.hE<gt>\n"
7888 "#include E<lt>stdlib.hE<gt>\n"
7889 msgstr ""
7890 "#define _GNU_SOURCE\n"
7891 "#include E<lt>pthread.hE<gt>\n"
7892 "#include E<lt>stdio.hE<gt>\n"
7893 "#include E<lt>string.hE<gt>\n"
7894 "#include E<lt>unistd.hE<gt>\n"
7895 "#include E<lt>errno.hE<gt>\n"
7896 "#include E<lt>stdlib.hE<gt>\n"
7897
7898 #. type: Plain text
7899 #: build/C/man3/pthread_setname_np.3:150
7900 #, no-wrap
7901 msgid "#define NAMELEN 16\n"
7902 msgstr "#define NAMELEN 16\n"
7903
7904 #. type: Plain text
7905 #: build/C/man3/pthread_setname_np.3:154
7906 #, no-wrap
7907 msgid ""
7908 "#define errExitEN(en, msg) \\e\n"
7909 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7910 "        } while (0)\n"
7911 msgstr ""
7912 "#define errExitEN(en, msg) \\e\n"
7913 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7914 "        } while (0)\n"
7915
7916 #. type: Plain text
7917 #: build/C/man3/pthread_setname_np.3:161
7918 #, no-wrap
7919 msgid ""
7920 "static void *\n"
7921 "threadfunc(void *parm)\n"
7922 "{\n"
7923 "    sleep(5);          // allow main program to set the thread name\n"
7924 "    return NULL;\n"
7925 "}\n"
7926 msgstr ""
7927 "static void *\n"
7928 "threadfunc(void *parm)\n"
7929 "{\n"
7930 "    sleep(5);          // allow main program to set the thread name\n"
7931 "    return NULL;\n"
7932 "}\n"
7933
7934 #. type: Plain text
7935 #: build/C/man3/pthread_setname_np.3:168
7936 #, no-wrap
7937 msgid ""
7938 "int\n"
7939 "main(int argc, char **argv)\n"
7940 "{\n"
7941 "    pthread_t thread;\n"
7942 "    int rc;\n"
7943 "    char thread_name[NAMELEN];\n"
7944 msgstr ""
7945 "int\n"
7946 "main(int argc, char **argv)\n"
7947 "{\n"
7948 "    pthread_t thread;\n"
7949 "    int rc;\n"
7950 "    char thread_name[NAMELEN];\n"
7951
7952 #. type: Plain text
7953 #: build/C/man3/pthread_setname_np.3:172
7954 #, no-wrap
7955 msgid ""
7956 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7957 "    if (rc != 0)\n"
7958 "        errExitEN(rc, \"pthread_create\");\n"
7959 msgstr ""
7960 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7961 "    if (rc != 0)\n"
7962 "        errExitEN(rc, \"pthread_create\");\n"
7963
7964 #. type: Plain text
7965 #: build/C/man3/pthread_setname_np.3:176
7966 #, no-wrap
7967 msgid ""
7968 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7969 "    if (rc != 0)\n"
7970 "        errExitEN(rc, \"pthread_getname_np\");\n"
7971 msgstr ""
7972 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7973 "    if (rc != 0)\n"
7974 "        errExitEN(rc, \"pthread_getname_np\");\n"
7975
7976 #. type: Plain text
7977 #: build/C/man3/pthread_setname_np.3:181
7978 #, no-wrap
7979 msgid ""
7980 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7981 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7982 "    if (rc != 0)\n"
7983 "        errExitEN(rc, \"pthread_setname_np\");\n"
7984 msgstr ""
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
7990 #. type: Plain text
7991 #: build/C/man3/pthread_setname_np.3:183
7992 #, no-wrap
7993 msgid "    sleep(2);\n"
7994 msgstr "    sleep(2);\n"
7995
7996 #. type: Plain text
7997 #: build/C/man3/pthread_setname_np.3:189
7998 #, no-wrap
7999 msgid ""
8000 "    rc = pthread_getname_np(thread, thread_name,\n"
8001 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8002 "    if (rc != 0)\n"
8003 "        errExitEN(rc, \"pthread_getname_np\");\n"
8004 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8005 msgstr ""
8006 "    rc = pthread_getname_np(thread, thread_name,\n"
8007 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8008 "    if (rc != 0)\n"
8009 "        errExitEN(rc, \"pthread_getname_np\");\n"
8010 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8011
8012 #. type: Plain text
8013 #: build/C/man3/pthread_setname_np.3:193
8014 #, no-wrap
8015 msgid ""
8016 "    rc = pthread_join(thread, NULL);\n"
8017 "    if (rc != 0)\n"
8018 "        errExitEN(rc, \"pthread_join\");\n"
8019 msgstr ""
8020 "    rc = pthread_join(thread, NULL);\n"
8021 "    if (rc != 0)\n"
8022 "        errExitEN(rc, \"pthread_join\");\n"
8023
8024 #. type: Plain text
8025 #: build/C/man3/pthread_setname_np.3:197
8026 #, no-wrap
8027 msgid ""
8028 "    printf(\"Done\\en\");\n"
8029 "    exit(EXIT_SUCCESS);\n"
8030 "}\n"
8031 msgstr ""
8032 "    printf(\"Done\\en\");\n"
8033 "    exit(EXIT_SUCCESS);\n"
8034 "}\n"
8035
8036 #. type: Plain text
8037 #: build/C/man3/pthread_setname_np.3:204
8038 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8039 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8040
8041 #. type: TH
8042 #: build/C/man3/pthread_setschedparam.3:26
8043 #, no-wrap
8044 msgid "PTHREAD_SETSCHEDPARAM"
8045 msgstr "PTHREAD_SETSCHEDPARAM"
8046
8047 #. type: Plain text
8048 #: build/C/man3/pthread_setschedparam.3:30
8049 msgid ""
8050 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8051 "parameters of a thread"
8052 msgstr ""
8053 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8054 "スケジューリングポリシーとパラメータを設定/取得する"
8055
8056 #. type: Plain text
8057 #: build/C/man3/pthread_setschedparam.3:38
8058 #, no-wrap
8059 msgid ""
8060 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8061 "B<                      const struct sched_param *>I<param>B<);>\n"
8062 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8063 "B<                      struct sched_param *>I<param>B<);>\n"
8064 msgstr ""
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
8070 #. type: Plain text
8071 #: build/C/man3/pthread_setschedparam.3:46
8072 msgid ""
8073 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8074 "parameters of the thread I<thread>."
8075 msgstr ""
8076 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8077 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8078
8079 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8080 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8081 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8082 #. type: Plain text
8083 #: build/C/man3/pthread_setschedparam.3:57
8084 msgid ""
8085 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8086 "values for I<policy>, and their semantics, are described in "
8087 "B<sched_setscheduler>(2)."
8088 msgstr ""
8089 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8090 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8091 "説明されている。"
8092
8093 #. type: Plain text
8094 #: build/C/man3/pthread_setschedparam.3:63
8095 msgid ""
8096 "The structure pointed to by I<param> specifies the new scheduling parameters "
8097 "for I<thread>.  Scheduling parameters are maintained in the following "
8098 "structure:"
8099 msgstr ""
8100 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8101 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8102
8103 #.  FIXME . nptl/pthread_setschedparam.c has the following
8104 #.    /* If the thread should have higher priority because of some
8105 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8106 #.  Eventually (perhaps after writing the mutexattr pages), we
8107 #.  may want to add something on the topic to this page.
8108 #. type: Plain text
8109 #: build/C/man3/pthread_setschedparam.3:104
8110 msgid ""
8111 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8112 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8113 "and I<param>, respectively.  The returned priority value is that set by the "
8114 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8115 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8116 "does not reflect any temporary priority adjustments as a result of calls to "
8117 "any priority inheritance or priority ceiling functions (see, for example, "
8118 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8119 "(3))."
8120 msgstr ""
8121 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8122 "スケジューリングポリシーとパラメータを、\n"
8123 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8124 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8125 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8126 "B<pthread_create> で設定された値となる。\n"
8127 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8128 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8129 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8130 "行われる一時的な優先度の調整の影響を受けない。"
8131
8132 #. type: Plain text
8133 #: build/C/man3/pthread_setschedparam.3:112
8134 msgid ""
8135 "On success, these functions return 0; on error, they return a nonzero error "
8136 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8137 "parameters of I<thread> are not changed."
8138 msgstr ""
8139 "成功すると、これらの関数は 0 を返す。\n"
8140 "エラーの場合、0 以外のエラー番号を返す。\n"
8141 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8142 "スケジューリングポリシーとパラメータは変更されない。"
8143
8144 #. type: Plain text
8145 #: build/C/man3/pthread_setschedparam.3:114
8146 msgid "Both of these functions can fail with the following error:"
8147 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8148
8149 #. type: Plain text
8150 #: build/C/man3/pthread_setschedparam.3:122
8151 msgid ""
8152 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8153 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8154
8155 #. type: Plain text
8156 #: build/C/man3/pthread_setschedparam.3:129
8157 msgid ""
8158 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8159 "the I<policy>."
8160 msgstr ""
8161 "I<policy> が認識できないポリシーであるか、\n"
8162 "I<param> が I<policy> では意味を持たない値である。"
8163
8164 #. type: Plain text
8165 #: build/C/man3/pthread_setschedparam.3:133
8166 msgid ""
8167 "The caller does not have appropriate privileges to set the specified "
8168 "scheduling policy and parameters."
8169 msgstr ""
8170 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8171 "のに必要な特権を持たない。"
8172
8173 #.  .SH VERSIONS
8174 #.  Available since glibc 2.0
8175 #. type: Plain text
8176 #: build/C/man3/pthread_setschedparam.3:141
8177 msgid ""
8178 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8179 "policy or scheduling parameters to an unsupported value\") error for "
8180 "B<pthread_setschedparam>()."
8181 msgstr ""
8182 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8183 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8184 "パラメータに設定しようとした\") も追加で規定されている。"
8185
8186 #. type: Plain text
8187 #: build/C/man3/pthread_setschedparam.3:149
8188 msgid ""
8189 "For a description of the permissions required to, and the effect of, "
8190 "changing a thread's scheduling policy and priority, and details of the "
8191 "permitted ranges for priorities in each scheduling policy, see "
8192 "B<sched_setscheduler>(2)."
8193 msgstr ""
8194 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8195 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8196 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8197
8198 #. type: Plain text
8199 #: build/C/man3/pthread_setschedparam.3:156
8200 msgid ""
8201 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8202 "B<pthread_getschedparam>(), as well as the use of a number of other "
8203 "scheduling-related pthreads functions."
8204 msgstr ""
8205 "以下のプログラムは B<pthread_setschedparam>() と\n"
8206 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8207 "他のいろいろな関数の使用例を示すものである。"
8208
8209 #. type: Plain text
8210 #: build/C/man3/pthread_setschedparam.3:172
8211 msgid ""
8212 "In the following run, the main thread sets its scheduling policy to "
8213 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8214 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8215 "priority attribute of 20.  The program then sets (using "
8216 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8217 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8218 "created using this attributes object should take their scheduling attributes "
8219 "from the thread attributes object.  The program then creates a thread using "
8220 "the thread attributes object, and that thread displays its scheduling policy "
8221 "and priority."
8222 msgstr ""
8223 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8224 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8225 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8226 "属性 20 で初期化する。\n"
8227 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8228 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8229 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8230 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8231 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8232 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8233 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8234
8235 #. type: Plain text
8236 #: build/C/man3/pthread_setschedparam.3:180
8237 #, no-wrap
8238 msgid ""
8239 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8240 "Password:\n"
8241 "# B<./a.out -mf10 -ar20 -i e>\n"
8242 "Scheduler settings of main thread\n"
8243 "    policy=SCHED_FIFO, priority=10\n"
8244 msgstr ""
8245 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8246 "Password:\n"
8247 "# B<./a.out -mf10 -ar20 -i e>\n"
8248 "Scheduler settings of main thread\n"
8249 "    policy=SCHED_FIFO, priority=10\n"
8250
8251 #. type: Plain text
8252 #: build/C/man3/pthread_setschedparam.3:184
8253 #, no-wrap
8254 msgid ""
8255 "Scheduler settings in \\(aqattr\\(aq\n"
8256 "    policy=SCHED_RR, priority=20\n"
8257 "    inheritsched is EXPLICIT\n"
8258 msgstr ""
8259 "Scheduler settings in \\(aqattr\\(aq\n"
8260 "    policy=SCHED_RR, priority=20\n"
8261 "    inheritsched is EXPLICIT\n"
8262
8263 #. type: Plain text
8264 #: build/C/man3/pthread_setschedparam.3:187
8265 #, no-wrap
8266 msgid ""
8267 "Scheduler attributes of new thread\n"
8268 "    policy=SCHED_RR, priority=20\n"
8269 msgstr ""
8270 "Scheduler attributes of new thread\n"
8271 "    policy=SCHED_RR, priority=20\n"
8272
8273 #. type: Plain text
8274 #: build/C/man3/pthread_setschedparam.3:192
8275 msgid ""
8276 "In the above output, one can see that the scheduling policy and priority "
8277 "were taken from the values specified in the thread attributes object."
8278 msgstr ""
8279 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8280 "オブジェクトで指定された値から取られていることが分かる。"
8281
8282 #. type: Plain text
8283 #: build/C/man3/pthread_setschedparam.3:199
8284 msgid ""
8285 "The next run is the same as the previous, except that the inherit scheduler "
8286 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8287 "using the thread attributes object should ignore the scheduling attributes "
8288 "specified in the attributes object and instead take their scheduling "
8289 "attributes from the creating thread."
8290 msgstr ""
8291 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8292 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8293 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8294 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8295 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8296 "ことを意味する。"
8297
8298 #. type: Plain text
8299 #: build/C/man3/pthread_setschedparam.3:205
8300 #, no-wrap
8301 msgid ""
8302 "# B<./a.out -mf10 -ar20 -i i>\n"
8303 "Scheduler settings of main thread\n"
8304 "    policy=SCHED_FIFO, priority=10\n"
8305 msgstr ""
8306 "# B<./a.out -mf10 -ar20 -i i>\n"
8307 "Scheduler settings of main thread\n"
8308 "    policy=SCHED_FIFO, priority=10\n"
8309
8310 #. type: Plain text
8311 #: build/C/man3/pthread_setschedparam.3:209
8312 #, no-wrap
8313 msgid ""
8314 "Scheduler settings in \\(aqattr\\(aq\n"
8315 "    policy=SCHED_RR, priority=20\n"
8316 "    inheritsched is INHERIT\n"
8317 msgstr ""
8318 "Scheduler settings in \\(aqattr\\(aq\n"
8319 "    policy=SCHED_RR, priority=20\n"
8320 "    inheritsched is INHERIT\n"
8321
8322 #. type: Plain text
8323 #: build/C/man3/pthread_setschedparam.3:212
8324 #, no-wrap
8325 msgid ""
8326 "Scheduler attributes of new thread\n"
8327 "    policy=SCHED_FIFO, priority=10\n"
8328 msgstr ""
8329 "Scheduler attributes of new thread\n"
8330 "    policy=SCHED_FIFO, priority=10\n"
8331
8332 #. type: Plain text
8333 #: build/C/man3/pthread_setschedparam.3:218
8334 msgid ""
8335 "In the above output, one can see that the scheduling policy and priority "
8336 "were taken from the creating thread, rather than the thread attributes "
8337 "object."
8338 msgstr ""
8339 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8340 "スレッド属性オブジェクトからではなく、\n"
8341 "スレッドを作成したスレッドから取れれていることが分かる。"
8342
8343 #. type: Plain text
8344 #: build/C/man3/pthread_setschedparam.3:224
8345 msgid ""
8346 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8347 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8348 "scheduler attribute."
8349 msgstr ""
8350 "なお、 I<-i\\ i> を省略した場合でも、\n"
8351 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8352 "出力は同じになる。"
8353
8354 #. type: Plain text
8355 #: build/C/man3/pthread_setschedparam.3:228
8356 #, no-wrap
8357 msgid "/* pthreads_sched_test.c */\n"
8358 msgstr "/* pthreads_sched_test.c */\n"
8359
8360 #. type: Plain text
8361 #: build/C/man3/pthread_setschedparam.3:234
8362 #, no-wrap
8363 msgid ""
8364 "#include E<lt>pthread.hE<gt>\n"
8365 "#include E<lt>stdio.hE<gt>\n"
8366 "#include E<lt>stdlib.hE<gt>\n"
8367 "#include E<lt>unistd.hE<gt>\n"
8368 "#include E<lt>errno.hE<gt>\n"
8369 msgstr ""
8370 "#include E<lt>pthread.hE<gt>\n"
8371 "#include E<lt>stdio.hE<gt>\n"
8372 "#include E<lt>stdlib.hE<gt>\n"
8373 "#include E<lt>unistd.hE<gt>\n"
8374 "#include E<lt>errno.hE<gt>\n"
8375
8376 #. type: Plain text
8377 #: build/C/man3/pthread_setschedparam.3:243
8378 #, no-wrap
8379 msgid ""
8380 "static void\n"
8381 "usage(char *prog_name, char *msg)\n"
8382 "{\n"
8383 "    if (msg != NULL)\n"
8384 "        fputs(msg, stderr);\n"
8385 msgstr ""
8386 "static void\n"
8387 "usage(char *prog_name, char *msg)\n"
8388 "{\n"
8389 "    if (msg != NULL)\n"
8390 "        fputs(msg, stderr);\n"
8391
8392 #. type: Plain text
8393 #: build/C/man3/pthread_setschedparam.3:260
8394 #, no-wrap
8395 msgid ""
8396 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8397 "    fprintf(stderr, \"Options are:\\en\");\n"
8398 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8399 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8400 "    fpe(\"                 thread attributes object\\en\");\n"
8401 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8402 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8403 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8404 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8405 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8406 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8407 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8408 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8409 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8410 "    exit(EXIT_FAILURE);\n"
8411 "}\n"
8412 msgstr ""
8413 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8414 "    fprintf(stderr, \"Options are:\\en\");\n"
8415 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8416 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8417 "    fpe(\"                 thread attributes object\\en\");\n"
8418 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8419 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8420 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8421 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8422 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8423 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8424 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8425 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8426 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8427 "    exit(EXIT_FAILURE);\n"
8428 "}\n"
8429
8430 #. type: Plain text
8431 #: build/C/man3/pthread_setschedparam.3:271
8432 #, no-wrap
8433 msgid ""
8434 "static int\n"
8435 "get_policy(char p, int *policy)\n"
8436 "{\n"
8437 "    switch (p) {\n"
8438 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8439 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8440 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8441 "    default:  return 0;\n"
8442 "    }\n"
8443 "}\n"
8444 msgstr ""
8445 "static int\n"
8446 "get_policy(char p, int *policy)\n"
8447 "{\n"
8448 "    switch (p) {\n"
8449 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8450 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8451 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8452 "    default:  return 0;\n"
8453 "    }\n"
8454 "}\n"
8455
8456 #. type: Plain text
8457 #: build/C/man3/pthread_setschedparam.3:282
8458 #, no-wrap
8459 msgid ""
8460 "static void\n"
8461 "display_sched_attr(int policy, struct sched_param *param)\n"
8462 "{\n"
8463 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8464 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8465 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8466 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8467 "            \"???\",\n"
8468 "            param-E<gt>sched_priority);\n"
8469 "}\n"
8470 msgstr ""
8471 "static void\n"
8472 "display_sched_attr(int policy, struct sched_param *param)\n"
8473 "{\n"
8474 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8475 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8476 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8477 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8478 "            \"???\",\n"
8479 "            param-E<gt>sched_priority);\n"
8480 "}\n"
8481
8482 #. type: Plain text
8483 #: build/C/man3/pthread_setschedparam.3:288
8484 #, no-wrap
8485 msgid ""
8486 "static void\n"
8487 "display_thread_sched_attr(char *msg)\n"
8488 "{\n"
8489 "    int policy, s;\n"
8490 "    struct sched_param param;\n"
8491 msgstr ""
8492 "static void\n"
8493 "display_thread_sched_attr(char *msg)\n"
8494 "{\n"
8495 "    int policy, s;\n"
8496 "    struct sched_param param;\n"
8497
8498 #. type: Plain text
8499 #: build/C/man3/pthread_setschedparam.3:292
8500 #, no-wrap
8501 msgid ""
8502 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8503 "    if (s != 0)\n"
8504 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8505 msgstr ""
8506 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8507 "    if (s != 0)\n"
8508 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8509
8510 #. type: Plain text
8511 #: build/C/man3/pthread_setschedparam.3:296
8512 #, no-wrap
8513 msgid ""
8514 "    printf(\"%s\\en\", msg);\n"
8515 "    display_sched_attr(policy, &param);\n"
8516 "}\n"
8517 msgstr ""
8518 "    printf(\"%s\\en\", msg);\n"
8519 "    display_sched_attr(policy, &param);\n"
8520 "}\n"
8521
8522 #. type: Plain text
8523 #: build/C/man3/pthread_setschedparam.3:301
8524 #, no-wrap
8525 msgid ""
8526 "static void *\n"
8527 "thread_start(void *arg)\n"
8528 "{\n"
8529 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8530 msgstr ""
8531 "static void *\n"
8532 "thread_start(void *arg)\n"
8533 "{\n"
8534 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8535
8536 #. type: Plain text
8537 #: build/C/man3/pthread_setschedparam.3:304
8538 #, no-wrap
8539 msgid ""
8540 "    return NULL;\n"
8541 "}\n"
8542 msgstr ""
8543 "    return NULL;\n"
8544 "}\n"
8545
8546 #. type: Plain text
8547 #: build/C/man3/pthread_setschedparam.3:314
8548 #, no-wrap
8549 msgid ""
8550 "int\n"
8551 "main(int argc, char *argv[])\n"
8552 "{\n"
8553 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8554 "    pthread_t thread;\n"
8555 "    pthread_attr_t attr;\n"
8556 "    pthread_attr_t *attrp;\n"
8557 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8558 "    struct sched_param param;\n"
8559 msgstr ""
8560 "int\n"
8561 "main(int argc, char *argv[])\n"
8562 "{\n"
8563 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8564 "    pthread_t thread;\n"
8565 "    pthread_attr_t attr;\n"
8566 "    pthread_attr_t *attrp;\n"
8567 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8568 "    struct sched_param param;\n"
8569
8570 #. type: Plain text
8571 #: build/C/man3/pthread_setschedparam.3:316
8572 #, no-wrap
8573 msgid "    /* Process command-line options */\n"
8574 msgstr "    /* Process command-line options */\n"
8575
8576 #. type: Plain text
8577 #: build/C/man3/pthread_setschedparam.3:321
8578 #, no-wrap
8579 msgid ""
8580 "    use_null_attrib = 0;\n"
8581 "    attr_sched_str = NULL;\n"
8582 "    main_sched_str = NULL;\n"
8583 "    inheritsched_str = NULL;\n"
8584 msgstr ""
8585 "    use_null_attrib = 0;\n"
8586 "    attr_sched_str = NULL;\n"
8587 "    main_sched_str = NULL;\n"
8588 "    inheritsched_str = NULL;\n"
8589
8590 #. type: Plain text
8591 #: build/C/man3/pthread_setschedparam.3:331
8592 #, no-wrap
8593 msgid ""
8594 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8595 "        switch (opt) {\n"
8596 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8597 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8598 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8599 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8600 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8601 "        }\n"
8602 "    }\n"
8603 msgstr ""
8604 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8605 "        switch (opt) {\n"
8606 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8607 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8608 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8609 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8610 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8611 "        }\n"
8612 "    }\n"
8613
8614 #. type: Plain text
8615 #: build/C/man3/pthread_setschedparam.3:335
8616 #, no-wrap
8617 msgid ""
8618 "    if (use_null_attrib &&\n"
8619 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8620 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8621 msgstr ""
8622 "    if (use_null_attrib &&\n"
8623 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8624 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8625
8626 #. type: Plain text
8627 #: build/C/man3/pthread_setschedparam.3:338
8628 #, no-wrap
8629 msgid ""
8630 "    /* Optionally set scheduling attributes of main thread,\n"
8631 "       and display the attributes */\n"
8632 msgstr ""
8633 "    /* Optionally set scheduling attributes of main thread,\n"
8634 "       and display the attributes */\n"
8635
8636 #. type: Plain text
8637 #: build/C/man3/pthread_setschedparam.3:343
8638 #, no-wrap
8639 msgid ""
8640 "    if (main_sched_str != NULL) {\n"
8641 "        if (!get_policy(main_sched_str[0], &policy))\n"
8642 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8643 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8644 msgstr ""
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
8650 #. type: Plain text
8651 #: build/C/man3/pthread_setschedparam.3:348
8652 #, no-wrap
8653 msgid ""
8654 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8655 "        if (s != 0)\n"
8656 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8657 "    }\n"
8658 msgstr ""
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
8664 #. type: Plain text
8665 #: build/C/man3/pthread_setschedparam.3:351
8666 #, no-wrap
8667 msgid ""
8668 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8669 "    printf(\"\\en\");\n"
8670 msgstr ""
8671 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8672 "    printf(\"\\en\");\n"
8673
8674 #. type: Plain text
8675 #: build/C/man3/pthread_setschedparam.3:353
8676 #, no-wrap
8677 msgid "    /* Initialize thread attributes object according to options */\n"
8678 msgstr "    /* Initialize thread attributes object according to options */\n"
8679
8680 #. type: Plain text
8681 #: build/C/man3/pthread_setschedparam.3:362
8682 #, no-wrap
8683 msgid ""
8684 "    if (!use_null_attrib) {\n"
8685 "        s = pthread_attr_init(&attr);\n"
8686 "        if (s != 0)\n"
8687 "            handle_error_en(s, \"pthread_attr_init\");\n"
8688 "        attrp = &attr;\n"
8689 "    }\n"
8690 msgstr ""
8691 "    if (!use_null_attrib) {\n"
8692 "        s = pthread_attr_init(&attr);\n"
8693 "        if (s != 0)\n"
8694 "            handle_error_en(s, \"pthread_attr_init\");\n"
8695 "        attrp = &attr;\n"
8696 "    }\n"
8697
8698 #. type: Plain text
8699 #: build/C/man3/pthread_setschedparam.3:370
8700 #, no-wrap
8701 msgid ""
8702 "    if (inheritsched_str != NULL) {\n"
8703 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8704 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8705 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8706 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8707 "        else\n"
8708 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8709 msgstr ""
8710 "    if (inheritsched_str != NULL) {\n"
8711 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8712 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8713 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8714 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8715 "        else\n"
8716 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8717
8718 #. type: Plain text
8719 #: build/C/man3/pthread_setschedparam.3:375
8720 #, no-wrap
8721 msgid ""
8722 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8723 "        if (s != 0)\n"
8724 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8725 "    }\n"
8726 msgstr ""
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
8732 #. type: Plain text
8733 #: build/C/man3/pthread_setschedparam.3:381
8734 #, no-wrap
8735 msgid ""
8736 "    if (attr_sched_str != NULL) {\n"
8737 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8738 "            usage(argv[0],\n"
8739 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8740 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8741 msgstr ""
8742 "    if (attr_sched_str != NULL) {\n"
8743 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8744 "            usage(argv[0],\n"
8745 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8746 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8747
8748 #. type: Plain text
8749 #: build/C/man3/pthread_setschedparam.3:389
8750 #, no-wrap
8751 msgid ""
8752 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8753 "        if (s != 0)\n"
8754 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8755 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8756 "        if (s != 0)\n"
8757 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8758 "    }\n"
8759 msgstr ""
8760 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8761 "        if (s != 0)\n"
8762 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8763 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8764 "        if (s != 0)\n"
8765 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8766 "    }\n"
8767
8768 #. type: Plain text
8769 #: build/C/man3/pthread_setschedparam.3:392
8770 #, no-wrap
8771 msgid ""
8772 "    /* If we initialized a thread attributes object, display\n"
8773 "       the scheduling attributes that were set in the object */\n"
8774 msgstr ""
8775 "    /* If we initialized a thread attributes object, display\n"
8776 "       the scheduling attributes that were set in the object */\n"
8777
8778 #. type: Plain text
8779 #: build/C/man3/pthread_setschedparam.3:400
8780 #, no-wrap
8781 msgid ""
8782 "    if (attrp != NULL) {\n"
8783 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8784 "        if (s != 0)\n"
8785 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8786 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8787 "        if (s != 0)\n"
8788 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8789 msgstr ""
8790 "    if (attrp != NULL) {\n"
8791 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8792 "        if (s != 0)\n"
8793 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8794 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8795 "        if (s != 0)\n"
8796 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8797
8798 #. type: Plain text
8799 #: build/C/man3/pthread_setschedparam.3:403
8800 #, no-wrap
8801 msgid ""
8802 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8803 "        display_sched_attr(policy, &param);\n"
8804 msgstr ""
8805 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8806 "        display_sched_attr(policy, &param);\n"
8807
8808 #. type: Plain text
8809 #: build/C/man3/pthread_setschedparam.3:411
8810 #, no-wrap
8811 msgid ""
8812 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8813 "        printf(\"    inheritsched is %s\\en\",\n"
8814 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8815 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8816 "                \"???\");\n"
8817 "        printf(\"\\en\");\n"
8818 "    }\n"
8819 msgstr ""
8820 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8821 "        printf(\"    inheritsched is %s\\en\",\n"
8822 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8823 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8824 "                \"???\");\n"
8825 "        printf(\"\\en\");\n"
8826 "    }\n"
8827
8828 #. type: Plain text
8829 #: build/C/man3/pthread_setschedparam.3:413
8830 #, no-wrap
8831 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8832 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8833
8834 #. type: Plain text
8835 #: build/C/man3/pthread_setschedparam.3:417
8836 #, no-wrap
8837 msgid ""
8838 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8839 "    if (s != 0)\n"
8840 "        handle_error_en(s, \"pthread_create\");\n"
8841 msgstr ""
8842 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8843 "    if (s != 0)\n"
8844 "        handle_error_en(s, \"pthread_create\");\n"
8845
8846 #. type: Plain text
8847 #: build/C/man3/pthread_setschedparam.3:419
8848 #, no-wrap
8849 msgid "    /* Destroy unneeded thread attributes object */\n"
8850 msgstr "    /* Destroy unneeded thread attributes object */\n"
8851
8852 #. type: Plain text
8853 #: build/C/man3/pthread_setschedparam.3:427
8854 #, no-wrap
8855 msgid ""
8856 "    s = pthread_join(thread, NULL);\n"
8857 "    if (s != 0)\n"
8858 "        handle_error_en(s, \"pthread_join\");\n"
8859 msgstr ""
8860 "    s = pthread_join(thread, NULL);\n"
8861 "    if (s != 0)\n"
8862 "        handle_error_en(s, \"pthread_join\");\n"
8863
8864 #. type: Plain text
8865 #: build/C/man3/pthread_setschedparam.3:445
8866 msgid ""
8867 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8868 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8869 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8870 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8871 "B<pthreads>(7)"
8872 msgstr ""
8873 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8874 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8875 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8876 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8877 "B<pthreads>(7)"
8878
8879 #. type: TH
8880 #: build/C/man3/pthread_setschedprio.3:26
8881 #, no-wrap
8882 msgid "PTHREAD_SETSCHEDPRIO"
8883 msgstr "PTHREAD_SETSCHEDPRIO"
8884
8885 #. type: TH
8886 #: build/C/man3/pthread_setschedprio.3:26
8887 #, no-wrap
8888 msgid "2008-11-06"
8889 msgstr "2008-11-06"
8890
8891 #. type: Plain text
8892 #: build/C/man3/pthread_setschedprio.3:29
8893 msgid "pthread_setschedprio - set scheduling priority of a thread"
8894 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8895
8896 #. type: Plain text
8897 #: build/C/man3/pthread_setschedprio.3:34
8898 #, no-wrap
8899 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8900 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8901
8902 #.  FIXME . nptl/pthread_setschedprio.c has the following
8903 #.    /* If the thread should have higher priority because of some
8904 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8905 #.  Eventually (perhaps after writing the mutexattr pages), we
8906 #.  may want to add something on the topic to this page.
8907 #.  nptl/pthread_setschedparam.c has a similar case.
8908 #. type: Plain text
8909 #: build/C/man3/pthread_setschedprio.3:53
8910 msgid ""
8911 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8912 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8913 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8914 "of a thread.)"
8915 msgstr ""
8916 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8917 "優先度に I<prio> で指定された値を設定する\n"
8918 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8919 "と優先度の両方を変更する)。"
8920
8921 #. type: Plain text
8922 #: build/C/man3/pthread_setschedprio.3:61
8923 msgid ""
8924 "On success, this function returns 0; on error, it returns a nonzero error "
8925 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8926 "I<thread> is not changed."
8927 msgstr ""
8928 "成功すると、この関数は 0 を返す。\n"
8929 "エラーの場合、0 以外のエラー番号を返す。\n"
8930 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8931 "スケジューリング優先度は変更されない。"
8932
8933 #. type: Plain text
8934 #: build/C/man3/pthread_setschedprio.3:66
8935 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8936 msgstr ""
8937 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8938
8939 #. type: Plain text
8940 #: build/C/man3/pthread_setschedprio.3:70
8941 msgid ""
8942 "The caller does not have appropriate privileges to set the specified "
8943 "priority."
8944 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8945
8946 #. type: Plain text
8947 #: build/C/man3/pthread_setschedprio.3:81
8948 msgid ""
8949 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8950 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
8951 msgstr ""
8952 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
8953 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
8954 "に設定しようとした\") も追加で規定されている。"
8955
8956 #. type: Plain text
8957 #: build/C/man3/pthread_setschedprio.3:83
8958 msgid "This function is available in glibc since version 2.3.4."
8959 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
8960
8961 #. type: Plain text
8962 #: build/C/man3/pthread_setschedprio.3:91
8963 msgid ""
8964 "For a description of the permissions required to, and the effect of, "
8965 "changing a thread's scheduling priority, and details of the permitted ranges "
8966 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
8967 msgstr ""
8968 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
8969 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8970 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8971
8972 #. type: Plain text
8973 #: build/C/man3/pthread_setschedprio.3:105
8974 msgid ""
8975 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8976 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8977 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8978 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8979 "B<pthreads>(7)"
8980 msgstr ""
8981 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8982 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8983 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8984 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8985 "B<pthreads>(7)"
8986
8987 #. type: TH
8988 #: build/C/man3/pthread_sigmask.3:26
8989 #, no-wrap
8990 msgid "PTHREAD_SIGMASK"
8991 msgstr "PTHREAD_SIGMASK"
8992
8993 #. type: Plain text
8994 #: build/C/man3/pthread_sigmask.3:29
8995 msgid "pthread_sigmask - examine and change mask of blocked signals"
8996 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
8997
8998 #. type: Plain text
8999 #: build/C/man3/pthread_sigmask.3:35
9000 #, no-wrap
9001 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9002 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9003
9004 #. type: Plain text
9005 #: build/C/man3/pthread_sigmask.3:46
9006 msgid ""
9007 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9008 "difference that its use in multithreaded programs is explicitly specified by "
9009 "POSIX.1-2001.  Other differences are noted in this page."
9010 msgstr ""
9011 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9012 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9013 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9014
9015 #. type: Plain text
9016 #: build/C/man3/pthread_sigmask.3:49
9017 msgid ""
9018 "For a description of the arguments and operation of this function, see "
9019 "B<sigprocmask>(2)."
9020 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9021
9022 #. type: Plain text
9023 #: build/C/man3/pthread_sigmask.3:54
9024 msgid ""
9025 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9026 "number."
9027 msgstr ""
9028 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9029 "エラーの場合、エラー番号を返す。"
9030
9031 #. type: Plain text
9032 #: build/C/man3/pthread_sigmask.3:57
9033 msgid "See B<sigprocmask>(2)."
9034 msgstr "B<sigprocmask>(2) を参照。"
9035
9036 #. type: Plain text
9037 #: build/C/man3/pthread_sigmask.3:61
9038 msgid "A new thread inherits a copy of its creator's signal mask."
9039 msgstr ""
9040 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9041 "継承する。"
9042
9043 #. type: Plain text
9044 #: build/C/man3/pthread_sigmask.3:66
9045 msgid ""
9046 "The program below blocks some signals in the main thread, and then creates a "
9047 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9048 "shell session demonstrates its use:"
9049 msgstr ""
9050 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9051 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9052 "専用のスレッドを作成する。\n"
9053 "下記のシェルのセッションはその利用例を示したものである。"
9054
9055 #. type: Plain text
9056 #: build/C/man3/pthread_sigmask.3:77
9057 #, no-wrap
9058 msgid ""
9059 "$B< ./a.out &>\n"
9060 "[1] 5423\n"
9061 "$B< kill -QUIT %1>\n"
9062 "Signal handling thread got signal 3\n"
9063 "$B< kill -USR1 %1>\n"
9064 "Signal handling thread got signal 10\n"
9065 "$B< kill -TERM %1>\n"
9066 "[1]+  Terminated              ./a.out\n"
9067 msgstr ""
9068 "$B< ./a.out &>\n"
9069 "[1] 5423\n"
9070 "$B< kill -QUIT %1>\n"
9071 "Signal handling thread got signal 3\n"
9072 "$B< kill -USR1 %1>\n"
9073 "Signal handling thread got signal 10\n"
9074 "$B< kill -TERM %1>\n"
9075 "[1]+  Terminated              ./a.out\n"
9076
9077 #. type: Plain text
9078 #: build/C/man3/pthread_sigmask.3:88
9079 #, no-wrap
9080 msgid ""
9081 "#include E<lt>pthread.hE<gt>\n"
9082 "#include E<lt>stdio.hE<gt>\n"
9083 "#include E<lt>stdlib.hE<gt>\n"
9084 "#include E<lt>unistd.hE<gt>\n"
9085 "#include E<lt>signal.hE<gt>\n"
9086 "#include E<lt>errno.hE<gt>\n"
9087 msgstr ""
9088 "#include E<lt>pthread.hE<gt>\n"
9089 "#include E<lt>stdio.hE<gt>\n"
9090 "#include E<lt>stdlib.hE<gt>\n"
9091 "#include E<lt>unistd.hE<gt>\n"
9092 "#include E<lt>signal.hE<gt>\n"
9093 "#include E<lt>errno.hE<gt>\n"
9094
9095 #. type: Plain text
9096 #: build/C/man3/pthread_sigmask.3:90
9097 #, no-wrap
9098 msgid "/* Simple error handling functions */\n"
9099 msgstr "/* Simple error handling functions */\n"
9100
9101 #. type: Plain text
9102 #: build/C/man3/pthread_sigmask.3:99
9103 #, no-wrap
9104 msgid ""
9105 "static void *\n"
9106 "sig_thread(void *arg)\n"
9107 "{\n"
9108 "    sigset_t *set = arg;\n"
9109 "    int s, sig;\n"
9110 msgstr ""
9111 "static void *\n"
9112 "sig_thread(void *arg)\n"
9113 "{\n"
9114 "    sigset_t *set = arg;\n"
9115 "    int s, sig;\n"
9116
9117 #. type: Plain text
9118 #: build/C/man3/pthread_sigmask.3:107
9119 #, no-wrap
9120 msgid ""
9121 "    for (;;) {\n"
9122 "        s = sigwait(set, &sig);\n"
9123 "        if (s != 0)\n"
9124 "            handle_error_en(s, \"sigwait\");\n"
9125 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9126 "    }\n"
9127 "}\n"
9128 msgstr ""
9129 "    for (;;) {\n"
9130 "        s = sigwait(set, &sig);\n"
9131 "        if (s != 0)\n"
9132 "            handle_error_en(s, \"sigwait\");\n"
9133 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9134 "    }\n"
9135 "}\n"
9136
9137 #. type: Plain text
9138 #: build/C/man3/pthread_sigmask.3:114
9139 #, no-wrap
9140 msgid ""
9141 "int\n"
9142 "main(int argc, char *argv[])\n"
9143 "{\n"
9144 "    pthread_t thread;\n"
9145 "    sigset_t set;\n"
9146 "    int s;\n"
9147 msgstr ""
9148 "int\n"
9149 "main(int argc, char *argv[])\n"
9150 "{\n"
9151 "    pthread_t thread;\n"
9152 "    sigset_t set;\n"
9153 "    int s;\n"
9154
9155 #. type: Plain text
9156 #: build/C/man3/pthread_sigmask.3:117
9157 #, no-wrap
9158 msgid ""
9159 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9160 "       will inherit a copy of the signal mask. */\n"
9161 msgstr ""
9162 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9163 "       will inherit a copy of the signal mask. */\n"
9164
9165 #. type: Plain text
9166 #: build/C/man3/pthread_sigmask.3:124
9167 #, no-wrap
9168 msgid ""
9169 "    sigemptyset(&set);\n"
9170 "    sigaddset(&set, SIGQUIT);\n"
9171 "    sigaddset(&set, SIGUSR1);\n"
9172 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9173 "    if (s != 0)\n"
9174 "        handle_error_en(s, \"pthread_sigmask\");\n"
9175 msgstr ""
9176 "    sigemptyset(&set);\n"
9177 "    sigaddset(&set, SIGQUIT);\n"
9178 "    sigaddset(&set, SIGUSR1);\n"
9179 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9180 "    if (s != 0)\n"
9181 "        handle_error_en(s, \"pthread_sigmask\");\n"
9182
9183 #. type: Plain text
9184 #: build/C/man3/pthread_sigmask.3:128
9185 #, no-wrap
9186 msgid ""
9187 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9188 "    if (s != 0)\n"
9189 "        handle_error_en(s, \"pthread_create\");\n"
9190 msgstr ""
9191 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9192 "    if (s != 0)\n"
9193 "        handle_error_en(s, \"pthread_create\");\n"
9194
9195 #. type: Plain text
9196 #: build/C/man3/pthread_sigmask.3:131
9197 #, no-wrap
9198 msgid ""
9199 "    /* Main thread carries on to create other threads and/or do\n"
9200 "       other work */\n"
9201 msgstr ""
9202 "    /* Main thread carries on to create other threads and/or do\n"
9203 "       other work */\n"
9204
9205 #. type: Plain text
9206 #: build/C/man3/pthread_sigmask.3:134
9207 #, no-wrap
9208 msgid ""
9209 "    pause();            /* Dummy pause so we can test program */\n"
9210 "}\n"
9211 msgstr ""
9212 "    pause();            /* Dummy pause so we can test program */\n"
9213 "}\n"
9214
9215 #. type: Plain text
9216 #: build/C/man3/pthread_sigmask.3:144
9217 msgid ""
9218 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9219 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9220 msgstr ""
9221 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9222 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9223
9224 #. type: TH
9225 #: build/C/man3/pthread_sigqueue.3:25
9226 #, no-wrap
9227 msgid "PTHREAD_SIGQUEUE"
9228 msgstr "PTHREAD_SIGQUEUE"
9229
9230 #. type: Plain text
9231 #: build/C/man3/pthread_sigqueue.3:28
9232 msgid "pthread_sigqueue - queue a signal and data to a thread"
9233 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9234
9235 #. type: Plain text
9236 #: build/C/man3/pthread_sigqueue.3:34
9237 #, no-wrap
9238 msgid ""
9239 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9240 "B<                     const union sigval >I<value>B<);>\n"
9241 msgstr ""
9242 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9243 "B<                     const union sigval >I<value>B<);>\n"
9244
9245 #. type: Plain text
9246 #: build/C/man3/pthread_sigqueue.3:45
9247 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9248 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9249
9250 #. type: Plain text
9251 #: build/C/man3/pthread_sigqueue.3:53
9252 msgid ""
9253 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9254 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9255 "thread in the same process as the calling thread."
9256 msgstr ""
9257 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9258 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9259 "同じプロセス内のスレッドにシグナルを送信する。"
9260
9261 #. type: Plain text
9262 #: build/C/man3/pthread_sigqueue.3:65
9263 msgid ""
9264 "The I<thread> argument is the ID of a thread in the same process as the "
9265 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9266 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9267 "details."
9268 msgstr ""
9269 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9270 "I<sig> 引き数は送信するシグナルを指定する。\n"
9271 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9272 "詳細は B<sigqueue>(3) を参照。"
9273
9274 #. type: Plain text
9275 #: build/C/man3/pthread_sigqueue.3:70
9276 msgid ""
9277 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9278 "number."
9279 msgstr ""
9280 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9281 "エラーの場合、エラー番号を返す。"
9282
9283 #. type: Plain text
9284 #: build/C/man3/pthread_sigqueue.3:77
9285 msgid ""
9286 "The limit of signals which may be queued has been reached.  (See B<signal>"
9287 "(7)  for further information.)"
9288 msgstr ""
9289 "キューに入れられるシグナル数が上限に達していた\n"
9290 "(詳しい情報は (B<signal>(7) を参照)。"
9291
9292 #. type: Plain text
9293 #: build/C/man3/pthread_sigqueue.3:81
9294 msgid "I<sig> was invalid."
9295 msgstr "I<sig> が無効であった。"
9296
9297 #. type: TP
9298 #: build/C/man3/pthread_sigqueue.3:81
9299 #, no-wrap
9300 msgid "B<ENOSYS>"
9301 msgstr "B<ENOSYS>"
9302
9303 #. type: Plain text
9304 #: build/C/man3/pthread_sigqueue.3:85
9305 msgid "B<pthread_sigqueue>()  is not supported on this system."
9306 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9307
9308 #. type: Plain text
9309 #: build/C/man3/pthread_sigqueue.3:89
9310 msgid "I<thread> is not valid."
9311 msgstr "I<thread> が無効である。"
9312
9313 #. type: Plain text
9314 #: build/C/man3/pthread_sigqueue.3:93
9315 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9316 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9317
9318 #. type: Plain text
9319 #: build/C/man3/pthread_sigqueue.3:95
9320 msgid "This function is a GNU extension."
9321 msgstr "この関数は GNU による拡張である。"
9322
9323 #. type: Plain text
9324 #: build/C/man3/pthread_sigqueue.3:103
9325 msgid ""
9326 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9327 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9328 msgstr ""
9329 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9330 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9331
9332 #. type: TH
9333 #: build/C/man3/pthread_testcancel.3:26
9334 #, no-wrap
9335 msgid "PTHREAD_TESTCANCEL"
9336 msgstr "PTHREAD_TESTCANCEL"
9337
9338 #. type: TH
9339 #: build/C/man3/pthread_testcancel.3:26
9340 #, no-wrap
9341 msgid "2012-04-14"
9342 msgstr "2012-04-14"
9343
9344 #. type: Plain text
9345 #: build/C/man3/pthread_testcancel.3:29
9346 msgid ""
9347 "pthread_testcancel - request delivery of any pending cancellation request"
9348 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9349
9350 #. type: Plain text
9351 #: build/C/man3/pthread_testcancel.3:34
9352 #, no-wrap
9353 msgid "B<void pthread_testcancel(void);>\n"
9354 msgstr "B<void pthread_testcancel(void);>\n"
9355
9356 #. type: Plain text
9357 #: build/C/man3/pthread_testcancel.3:43
9358 msgid ""
9359 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9360 "calling thread, so that a thread that is otherwise executing code that "
9361 "contains no cancellation points will respond to a cancellation request."
9362 msgstr ""
9363 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9364 "ポイント (cancellation point) が作成される。\n"
9365 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9366 "いるスレッドが取り消し要求に対応することができるようになる。"
9367
9368 #. type: Plain text
9369 #: build/C/man3/pthread_testcancel.3:50
9370 msgid ""
9371 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9372 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9373 "no effect."
9374 msgstr ""
9375 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9376 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9377 "呼び出しても何の影響もない。"
9378
9379 #. type: Plain text
9380 #: build/C/man3/pthread_testcancel.3:54
9381 msgid ""
9382 "This function does not return a value.  If the calling thread is canceled as "
9383 "a consequence of a call to this function, then the function does not return."
9384 msgstr ""
9385 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9386 "キャンセルされた場合、この関数が返ることはない。"
9387
9388 #. type: Plain text
9389 #: build/C/man3/pthread_testcancel.3:63
9390 msgid "See B<pthread_cleanup_push>(3)."
9391 msgstr "B<pthread_cleanup_push>(3) を参照。"
9392
9393 #. type: Plain text
9394 #: build/C/man3/pthread_testcancel.3:68
9395 msgid ""
9396 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9397 "(3), B<pthreads>(7)"
9398 msgstr ""
9399 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9400 "(3), B<pthreads>(7)"
9401
9402 #. type: TH
9403 #: build/C/man3/pthread_tryjoin_np.3:26
9404 #, no-wrap
9405 msgid "PTHREAD_TRYJOIN_NP"
9406 msgstr "PTHREAD_TRYJOIN_NP"
9407
9408 #. type: Plain text
9409 #: build/C/man3/pthread_tryjoin_np.3:30
9410 msgid ""
9411 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9412 "thread"
9413 msgstr ""
9414 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9415 "試みる"
9416
9417 #. type: Plain text
9418 #: build/C/man3/pthread_tryjoin_np.3:36
9419 #, no-wrap
9420 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9421 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9422
9423 #. type: Plain text
9424 #: build/C/man3/pthread_tryjoin_np.3:39
9425 #, no-wrap
9426 msgid ""
9427 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9428 "B<                         const struct timespec *>I<abstime>B<);>\n"
9429 msgstr ""
9430 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9431 "B<                         const struct timespec *>I<abstime>B<);>\n"
9432
9433 #. type: Plain text
9434 #: build/C/man3/pthread_tryjoin_np.3:46
9435 msgid ""
9436 "These functions operate in the same way as B<pthread_join>(3), except for "
9437 "the differences described on this page."
9438 msgstr ""
9439 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9440 "このページで説明する違いがある。"
9441
9442 #. type: Plain text
9443 #: build/C/man3/pthread_tryjoin_np.3:58
9444 msgid ""
9445 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9446 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9447 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9448 "B<pthread_join>(3), the call returns an error."
9449 msgstr ""
9450 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9451 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9452 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9453 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9454
9455 #. type: Plain text
9456 #: build/C/man3/pthread_tryjoin_np.3:76
9457 msgid ""
9458 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9459 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9460 "specified in I<abstime>.  If the timeout expires before I<thread> "
9461 "terminates, the call returns an error.  The I<abstime> argument is a "
9462 "structure of the following form, specifying an absolute time measured since "
9463 "the Epoch (see B<time>(2)):"
9464 msgstr ""
9465 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9466 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9467 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9468 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9469 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9470
9471 #. type: Plain text
9472 #: build/C/man3/pthread_tryjoin_np.3:83
9473 #, no-wrap
9474 msgid ""
9475 "struct timespec {\n"
9476 "    time_t tv_sec;     /* seconds */\n"
9477 "    long   tv_nsec;    /* nanoseconds */\n"
9478 "};\n"
9479 msgstr ""
9480 "struct timespec {\n"
9481 "    time_t tv_sec;     /* seconds */\n"
9482 "    long   tv_nsec;    /* nanoseconds */\n"
9483 "};\n"
9484
9485 #. type: Plain text
9486 #: build/C/man3/pthread_tryjoin_np.3:89
9487 msgid ""
9488 "On success, these functions return 0; on error, they return an error number."
9489 msgstr ""
9490 "成功すると、これらの関数は 0 を返す。\n"
9491 "エラーの場合、エラー番号を返す。"
9492
9493 #. type: Plain text
9494 #: build/C/man3/pthread_tryjoin_np.3:94
9495 msgid ""
9496 "These functions can fail with the same errors as B<pthread_join>(3).  "
9497 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9498 msgstr ""
9499 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9500 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9501
9502 #. type: TP
9503 #: build/C/man3/pthread_tryjoin_np.3:94
9504 #, no-wrap
9505 msgid "B<EBUSY>"
9506 msgstr "B<EBUSY>"
9507
9508 #. type: Plain text
9509 #: build/C/man3/pthread_tryjoin_np.3:98
9510 msgid "I<thread> had not yet terminated at the time of the call."
9511 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9512
9513 #. type: Plain text
9514 #: build/C/man3/pthread_tryjoin_np.3:101
9515 msgid ""
9516 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9517 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9518
9519 #. type: TP
9520 #: build/C/man3/pthread_tryjoin_np.3:101
9521 #, no-wrap
9522 msgid "B<ETIMEDOUT>"
9523 msgstr "B<ETIMEDOUT>"
9524
9525 #. type: Plain text
9526 #: build/C/man3/pthread_tryjoin_np.3:106
9527 msgid "The call timed out before I<thread> terminated."
9528 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9529
9530 #. type: Plain text
9531 #: build/C/man3/pthread_tryjoin_np.3:110
9532 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9533 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9534
9535 #. type: Plain text
9536 #: build/C/man3/pthread_tryjoin_np.3:112
9537 msgid "These functions first appeared in glibc in version 2.3.3."
9538 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9539
9540 #. type: Plain text
9541 #: build/C/man3/pthread_tryjoin_np.3:117
9542 msgid "The following code waits to join for up to 5 seconds:"
9543 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9544
9545 #. type: Plain text
9546 #: build/C/man3/pthread_tryjoin_np.3:121
9547 #, no-wrap
9548 msgid ""
9549 "    struct timespec ts;\n"
9550 "    int s;\n"
9551 msgstr ""
9552 "    struct timespec ts;\n"
9553 "    int s;\n"
9554
9555 #. type: Plain text
9556 #: build/C/man3/pthread_tryjoin_np.3:123
9557 #, no-wrap
9558 msgid "    ...\n"
9559 msgstr "    ...\n"
9560
9561 #. type: Plain text
9562 #: build/C/man3/pthread_tryjoin_np.3:127
9563 #, no-wrap
9564 msgid ""
9565 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9566 "\t/* Handle error */\n"
9567 "    }\n"
9568 msgstr ""
9569 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9570 "\t/* Handle error */\n"
9571 "    }\n"
9572
9573 #. type: Plain text
9574 #: build/C/man3/pthread_tryjoin_np.3:129
9575 #, no-wrap
9576 msgid "    ts.tv_sec += 5;\n"
9577 msgstr "    ts.tv_sec += 5;\n"
9578
9579 #. type: Plain text
9580 #: build/C/man3/pthread_tryjoin_np.3:134
9581 #, no-wrap
9582 msgid ""
9583 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9584 "    if (s != 0) {\n"
9585 "        /* Handle error */\n"
9586 "    }\n"
9587 msgstr ""
9588 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9589 "    if (s != 0) {\n"
9590 "        /* Handle error */\n"
9591 "    }\n"
9592
9593 #. type: Plain text
9594 #: build/C/man3/pthread_tryjoin_np.3:140
9595 msgid ""
9596 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9597 msgstr ""
9598 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9599
9600 #. type: TH
9601 #: build/C/man3/pthread_yield.3:25
9602 #, no-wrap
9603 msgid "PTHREAD_YIELD"
9604 msgstr "PTHREAD_YIELD"
9605
9606 #. type: TH
9607 #: build/C/man3/pthread_yield.3:25
9608 #, no-wrap
9609 msgid "2013-03-05"
9610 msgstr "2013-03-05"
9611
9612 #. type: Plain text
9613 #: build/C/man3/pthread_yield.3:28
9614 msgid "pthread_yield - yield the processor"
9615 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9616
9617 #. type: Plain text
9618 #: build/C/man3/pthread_yield.3:34
9619 #, no-wrap
9620 msgid "B<int pthread_yield(void);>\n"
9621 msgstr "B<int pthread_yield(void);>\n"
9622
9623 #. type: Plain text
9624 #: build/C/man3/pthread_yield.3:44
9625 msgid ""
9626 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9627 "thread is placed at the end of the run queue for its static priority and "
9628 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9629 "(2)"
9630 msgstr ""
9631 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9632 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9633 "別のスレッドが実行されるようにスケジューリングされる。\n"
9634 "詳細は B<sched_yield>(2) を参照。"
9635
9636 #. type: Plain text
9637 #: build/C/man3/pthread_yield.3:49
9638 msgid ""
9639 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9640 "number."
9641 msgstr ""
9642 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9643 "エラーの場合、エラー番号を返す。"
9644
9645 #. type: Plain text
9646 #: build/C/man3/pthread_yield.3:53
9647 msgid ""
9648 "On Linux, this call always succeeds (but portable and future-proof "
9649 "applications should nevertheless handle a possible error return)."
9650 msgstr ""
9651 "Linux では、この関数の呼び出しは常に成功する\n"
9652 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9653 "正のエラーの返り値を処理するようにすべきである)。"
9654
9655 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9656 #. type: Plain text
9657 #: build/C/man3/pthread_yield.3:59
9658 msgid ""
9659 "This call is nonstandard, but present on several other systems.  Use the "
9660 "standardized B<sched_yield>(2)  instead."
9661 msgstr ""
9662 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9663 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9664
9665 #. type: Plain text
9666 #: build/C/man3/pthread_yield.3:62
9667 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9668 msgstr ""
9669 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9670
9671 #. type: Plain text
9672 #: build/C/man3/pthread_yield.3:66
9673 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9674 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9675
9676 #. type: TH
9677 #: build/C/man7/pthreads.7:26
9678 #, no-wrap
9679 msgid "PTHREADS"
9680 msgstr "PTHREADS"
9681
9682 #. type: TH
9683 #: build/C/man7/pthreads.7:26
9684 #, no-wrap
9685 msgid "2010-11-14"
9686 msgstr "2010-11-14"
9687
9688 #. type: Plain text
9689 #: build/C/man7/pthreads.7:29
9690 msgid "pthreads - POSIX threads"
9691 msgstr "pthreads - POSIX スレッド"
9692
9693 #. type: Plain text
9694 #: build/C/man7/pthreads.7:36
9695 msgid ""
9696 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9697 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9698 "can contain multiple threads, all of which are executing the same program.  "
9699 "These threads share the same global memory (data and heap segments), but "
9700 "each thread has its own stack (automatic variables)."
9701 msgstr ""
9702 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9703 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9704 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9705 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9706 "スレッドは自分専用のスタック (自動変数) を持つ。"
9707
9708 #. type: Plain text
9709 #: build/C/man7/pthreads.7:39
9710 msgid ""
9711 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9712 "these attributes are process-wide rather than per-thread):"
9713 msgstr ""
9714 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9715 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9716
9717 #. type: IP
9718 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9719 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9720 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9721 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9722 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9723 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9724 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9725 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9726 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9727 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9728 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9729 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9730 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9731 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9732 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9733 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9734 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9735 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9736 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9737 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9738 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9739 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9740 #: build/C/man7/pthreads.7:835
9741 #, no-wrap
9742 msgid "-"
9743 msgstr "-"
9744
9745 #. type: Plain text
9746 #: build/C/man7/pthreads.7:41
9747 msgid "process ID"
9748 msgstr "プロセス ID"
9749
9750 #. type: Plain text
9751 #: build/C/man7/pthreads.7:43
9752 msgid "parent process ID"
9753 msgstr "親プロセス ID"
9754
9755 #. type: Plain text
9756 #: build/C/man7/pthreads.7:45
9757 msgid "process group ID and session ID"
9758 msgstr "プロセスグループ ID とセッション ID"
9759
9760 #. type: Plain text
9761 #: build/C/man7/pthreads.7:47
9762 msgid "controlling terminal"
9763 msgstr "制御端末"
9764
9765 #. type: Plain text
9766 #: build/C/man7/pthreads.7:49
9767 msgid "user and group IDs"
9768 msgstr "ユーザ ID とグループ ID"
9769
9770 #. type: Plain text
9771 #: build/C/man7/pthreads.7:51
9772 msgid "open file descriptors"
9773 msgstr "オープンするファイルディスクリプタ"
9774
9775 #. type: Plain text
9776 #: build/C/man7/pthreads.7:54
9777 msgid "record locks (see B<fcntl>(2))"
9778 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9779
9780 #. type: Plain text
9781 #: build/C/man7/pthreads.7:56
9782 msgid "signal dispositions"
9783 msgstr "シグナルの配置"
9784
9785 #. type: Plain text
9786 #: build/C/man7/pthreads.7:59
9787 msgid "file mode creation mask (B<umask>(2))"
9788 msgstr "ファイルモード作成マスク (B<umask>(2))"
9789
9790 #. type: Plain text
9791 #: build/C/man7/pthreads.7:65
9792 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9793 msgstr ""
9794 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9795
9796 #. type: Plain text
9797 #: build/C/man7/pthreads.7:70
9798 msgid ""
9799 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9800 msgstr ""
9801 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9802
9803 #. type: Plain text
9804 #: build/C/man7/pthreads.7:73
9805 msgid "nice value (B<setpriority>(2))"
9806 msgstr "nice 値 (B<setpriority>(2))"
9807
9808 #. type: Plain text
9809 #: build/C/man7/pthreads.7:76
9810 msgid "resource limits (B<setrlimit>(2))"
9811 msgstr "リソース制限 (B<setrlimit>(2))"
9812
9813 #. type: Plain text
9814 #: build/C/man7/pthreads.7:81
9815 msgid ""
9816 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9817 "(B<getrusage>(2))"
9818 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9819
9820 #. type: Plain text
9821 #: build/C/man7/pthreads.7:84
9822 msgid ""
9823 "As well as the stack, POSIX.1 specifies that various other attributes are "
9824 "distinct for each thread, including:"
9825 msgstr ""
9826 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9827 "るかを規定している:"
9828
9829 #. type: Plain text
9830 #: build/C/man7/pthreads.7:88
9831 msgid "thread ID (the I<pthread_t> data type)"
9832 msgstr "スレッド ID (B<pthread_t> データ型)"
9833
9834 #. type: Plain text
9835 #: build/C/man7/pthreads.7:91
9836 msgid "signal mask (B<pthread_sigmask>(3))"
9837 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9838
9839 #. type: Plain text
9840 #: build/C/man7/pthreads.7:95
9841 msgid "the I<errno> variable"
9842 msgstr "I<errno> 変数"
9843
9844 #. type: Plain text
9845 #: build/C/man7/pthreads.7:98
9846 msgid "alternate signal stack (B<sigaltstack>(2))"
9847 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9848
9849 #. type: Plain text
9850 #: build/C/man7/pthreads.7:103
9851 msgid ""
9852 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9853 "B<sched_setparam>(2))"
9854 msgstr ""
9855 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9856 "と B<sched_setparam>(2))"
9857
9858 #. type: Plain text
9859 #: build/C/man7/pthreads.7:105
9860 msgid "The following Linux-specific features are also per-thread:"
9861 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9862
9863 #. type: Plain text
9864 #: build/C/man7/pthreads.7:108
9865 msgid "capabilities (see B<capabilities>(7))"
9866 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9867
9868 #. type: Plain text
9869 #: build/C/man7/pthreads.7:111
9870 msgid "CPU affinity (B<sched_setaffinity>(2))"
9871 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9872
9873 #. type: SS
9874 #: build/C/man7/pthreads.7:111
9875 #, no-wrap
9876 msgid "Pthreads function return values"
9877 msgstr "pthreads 関数の返り値"
9878
9879 #. type: Plain text
9880 #: build/C/man7/pthreads.7:118
9881 msgid ""
9882 "Most pthreads functions return 0 on success, and an error number of "
9883 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9884 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9885 "the function can never fail with the error B<EINTR>."
9886 msgstr ""
9887 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9888 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9889 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9890 "は決してないと規定している。"
9891
9892 #. type: SS
9893 #: build/C/man7/pthreads.7:118
9894 #, no-wrap
9895 msgid "Thread IDs"
9896 msgstr "スレッド ID"
9897
9898 #. type: Plain text
9899 #: build/C/man7/pthreads.7:132
9900 msgid ""
9901 "Each of the threads in a process has a unique thread identifier (stored in "
9902 "the type I<pthread_t>).  This identifier is returned to the caller of "
9903 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9904 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
9905 "within a process.  A thread ID may be reused after a terminated thread has "
9906 "been joined, or a detached thread has terminated.  In all pthreads functions "
9907 "that accept a thread ID as an argument, that ID by definition refers to a "
9908 "thread in the same process as the caller."
9909 msgstr ""
9910 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9911 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9912 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9913 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9914 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9915 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9916 "じプロセス内の一つのスレッドを参照する。"
9917
9918 #. type: SS
9919 #: build/C/man7/pthreads.7:132
9920 #, no-wrap
9921 msgid "Thread-safe functions"
9922 msgstr "スレッドセーフな関数"
9923
9924 #. type: Plain text
9925 #: build/C/man7/pthreads.7:136
9926 msgid ""
9927 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9928 "same results regardless of whether it is)  called from multiple threads at "
9929 "the same time."
9930 msgstr ""
9931 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9932 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9933
9934 #. type: Plain text
9935 #: build/C/man7/pthreads.7:140
9936 msgid ""
9937 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9938 "standard shall be thread-safe, except for the following functions:"
9939 msgstr ""
9940 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9941 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9942
9943 #. type: Plain text
9944 #: build/C/man7/pthreads.7:234
9945 #, no-wrap
9946 msgid ""
9947 "asctime()\n"
9948 "basename()\n"
9949 "catgets()\n"
9950 "crypt()\n"
9951 "ctermid() if passed a non-NULL argument\n"
9952 "ctime()\n"
9953 "dbm_clearerr()\n"
9954 "dbm_close()\n"
9955 "dbm_delete()\n"
9956 "dbm_error()\n"
9957 "dbm_fetch()\n"
9958 "dbm_firstkey()\n"
9959 "dbm_nextkey()\n"
9960 "dbm_open()\n"
9961 "dbm_store()\n"
9962 "dirname()\n"
9963 "dlerror()\n"
9964 "drand48()\n"
9965 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9966 "encrypt()\n"
9967 "endgrent()\n"
9968 "endpwent()\n"
9969 "endutxent()\n"
9970 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9971 "ftw()\n"
9972 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9973 "getc_unlocked()\n"
9974 "getchar_unlocked()\n"
9975 "getdate()\n"
9976 "getenv()\n"
9977 "getgrent()\n"
9978 "getgrgid()\n"
9979 "getgrnam()\n"
9980 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9981 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9982 "gethostent()\n"
9983 "getlogin()\n"
9984 "getnetbyaddr()\n"
9985 "getnetbyname()\n"
9986 "getnetent()\n"
9987 "getopt()\n"
9988 "getprotobyname()\n"
9989 "getprotobynumber()\n"
9990 "getprotoent()\n"
9991 "getpwent()\n"
9992 "getpwnam()\n"
9993 "getpwuid()\n"
9994 "getservbyname()\n"
9995 "getservbyport()\n"
9996 "getservent()\n"
9997 "getutxent()\n"
9998 "getutxid()\n"
9999 "getutxline()\n"
10000 "gmtime()\n"
10001 "hcreate()\n"
10002 "hdestroy()\n"
10003 "hsearch()\n"
10004 "inet_ntoa()\n"
10005 "l64a()\n"
10006 "lgamma()\n"
10007 "lgammaf()\n"
10008 "lgammal()\n"
10009 "localeconv()\n"
10010 "localtime()\n"
10011 "lrand48()\n"
10012 "mrand48()\n"
10013 "nftw()\n"
10014 "nl_langinfo()\n"
10015 "ptsname()\n"
10016 "putc_unlocked()\n"
10017 "putchar_unlocked()\n"
10018 "putenv()\n"
10019 "pututxline()\n"
10020 "rand()\n"
10021 "readdir()\n"
10022 "setenv()\n"
10023 "setgrent()\n"
10024 "setkey()\n"
10025 "setpwent()\n"
10026 "setutxent()\n"
10027 "strerror()\n"
10028 "strsignal() [Added in POSIX.1-2008]\n"
10029 "strtok()\n"
10030 "system() [Added in POSIX.1-2008]\n"
10031 "tmpnam() if passed a non-NULL argument\n"
10032 "ttyname()\n"
10033 "unsetenv()\n"
10034 "wcrtomb() if its final argument is NULL\n"
10035 "wcsrtombs() if its final argument is NULL\n"
10036 "wcstombs()\n"
10037 "wctomb()\n"
10038 msgstr ""
10039 "asctime()\n"
10040 "basename()\n"
10041 "catgets()\n"
10042 "crypt()\n"
10043 "ctermid() (NULL でない引き数を渡された場合)\n"
10044 "ctime()\n"
10045 "dbm_clearerr()\n"
10046 "dbm_close()\n"
10047 "dbm_delete()\n"
10048 "dbm_error()\n"
10049 "dbm_fetch()\n"
10050 "dbm_firstkey()\n"
10051 "dbm_nextkey()\n"
10052 "dbm_open()\n"
10053 "dbm_store()\n"
10054 "dirname()\n"
10055 "dlerror()\n"
10056 "drand48()\n"
10057 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10058 "encrypt()\n"
10059 "endgrent()\n"
10060 "endpwent()\n"
10061 "endutxent()\n"
10062 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10063 "ftw()\n"
10064 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10065 "getc_unlocked()\n"
10066 "getchar_unlocked()\n"
10067 "getdate()\n"
10068 "getenv()\n"
10069 "getgrent()\n"
10070 "getgrgid()\n"
10071 "getgrnam()\n"
10072 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10073 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10074 "gethostent()\n"
10075 "getlogin()\n"
10076 "getnetbyaddr()\n"
10077 "getnetbyname()\n"
10078 "getnetent()\n"
10079 "getopt()\n"
10080 "getprotobyname()\n"
10081 "getprotobynumber()\n"
10082 "getprotoent()\n"
10083 "getpwent()\n"
10084 "getpwnam()\n"
10085 "getpwuid()\n"
10086 "getservbyname()\n"
10087 "getservbyport()\n"
10088 "getservent()\n"
10089 "getutxent()\n"
10090 "getutxid()\n"
10091 "getutxline()\n"
10092 "gmtime()\n"
10093 "hcreate()\n"
10094 "hdestroy()\n"
10095 "hsearch()\n"
10096 "inet_ntoa()\n"
10097 "l64a()\n"
10098 "lgamma()\n"
10099 "lgammaf()\n"
10100 "lgammal()\n"
10101 "localeconv()\n"
10102 "localtime()\n"
10103 "lrand48()\n"
10104 "mrand48()\n"
10105 "nftw()\n"
10106 "nl_langinfo()\n"
10107 "ptsname()\n"
10108 "putc_unlocked()\n"
10109 "putchar_unlocked()\n"
10110 "putenv()\n"
10111 "pututxline()\n"
10112 "rand()\n"
10113 "readdir()\n"
10114 "setenv()\n"
10115 "setgrent()\n"
10116 "setkey()\n"
10117 "setpwent()\n"
10118 "setutxent()\n"
10119 "strerror()\n"
10120 "strsignal() [POSIX.1-2008 で追加された]\n"
10121 "strtok()\n"
10122 "system() [POSIX.1-2008 で追加された]\n"
10123 "tmpnam() (NULL でない引き数を渡された場合)\n"
10124 "ttyname()\n"
10125 "unsetenv()\n"
10126 "wcrtomb() (最後の引き数が NULL の場合)\n"
10127 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10128 "wcstombs()\n"
10129 "wctomb()\n"
10130
10131 #. type: SS
10132 #: build/C/man7/pthreads.7:236
10133 #, no-wrap
10134 msgid "Async-cancel-safe functions"
10135 msgstr "async-cancel-safe 関数"
10136
10137 #. type: Plain text
10138 #: build/C/man7/pthreads.7:240
10139 msgid ""
10140 "An async-cancel-safe function is one that can be safely called in an "
10141 "application where asynchronous cancelability is enabled (see "
10142 "B<pthread_setcancelstate>(3))."
10143 msgstr ""
10144 "async-cancel-safe 関数は、\n"
10145 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10146 "安全に呼び出すことができる関数のことである\n"
10147 "(B<pthread_setcancelstate>(3) を参照)。"
10148
10149 #. type: Plain text
10150 #: build/C/man7/pthreads.7:243
10151 msgid ""
10152 "Only the following functions are required to be async-cancel-safe by "
10153 "POSIX.1-2001 and POSIX.1-2008:"
10154 msgstr ""
10155 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10156 "なければならないとされている。"
10157
10158 #. type: Plain text
10159 #: build/C/man7/pthreads.7:249
10160 #, no-wrap
10161 msgid ""
10162 "pthread_cancel()\n"
10163 "pthread_setcancelstate()\n"
10164 "pthread_setcanceltype()\n"
10165 msgstr ""
10166 "pthread_cancel()\n"
10167 "pthread_setcancelstate()\n"
10168 "pthread_setcanceltype()\n"
10169
10170 #. type: SS
10171 #: build/C/man7/pthreads.7:251
10172 #, no-wrap
10173 msgid "Cancellation points"
10174 msgstr "取り消しポイント (cancellation points)"
10175
10176 #. type: Plain text
10177 #: build/C/man7/pthreads.7:258
10178 msgid ""
10179 "POSIX.1 specifies that certain functions must, and certain other functions "
10180 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10181 "type is deferred, and a cancellation request is pending for the thread, then "
10182 "the thread is canceled when it calls a function that is a cancellation point."
10183 msgstr ""
10184 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10185 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10186 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10187 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10188 "時点で、そのスレッドのキャンセルが 行われる。"
10189
10190 #. type: Plain text
10191 #: build/C/man7/pthreads.7:261
10192 msgid ""
10193 "The following functions are required to be cancellation points by "
10194 "POSIX.1-2001 and/or POSIX.1-2008:"
10195 msgstr ""
10196 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10197 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10198
10199 #. type: Plain text
10200 #: build/C/man7/pthreads.7:324
10201 #, no-wrap
10202 msgid ""
10203 "accept()\n"
10204 "aio_suspend()\n"
10205 "clock_nanosleep()\n"
10206 "close()\n"
10207 "connect()\n"
10208 "creat()\n"
10209 "fcntl() F_SETLKW\n"
10210 "fdatasync()\n"
10211 "fsync()\n"
10212 "getmsg()\n"
10213 "getpmsg()\n"
10214 "lockf() F_LOCK\n"
10215 "mq_receive()\n"
10216 "mq_send()\n"
10217 "mq_timedreceive()\n"
10218 "mq_timedsend()\n"
10219 "msgrcv()\n"
10220 "msgsnd()\n"
10221 "msync()\n"
10222 "nanosleep()\n"
10223 "open()\n"
10224 "openat() [Added in POSIX.1-2008]\n"
10225 "pause()\n"
10226 "poll()\n"
10227 "pread()\n"
10228 "pselect()\n"
10229 "pthread_cond_timedwait()\n"
10230 "pthread_cond_wait()\n"
10231 "pthread_join()\n"
10232 "pthread_testcancel()\n"
10233 "putmsg()\n"
10234 "putpmsg()\n"
10235 "pwrite()\n"
10236 "read()\n"
10237 "readv()\n"
10238 "recv()\n"
10239 "recvfrom()\n"
10240 "recvmsg()\n"
10241 "select()\n"
10242 "sem_timedwait()\n"
10243 "sem_wait()\n"
10244 "send()\n"
10245 "sendmsg()\n"
10246 "sendto()\n"
10247 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10248 "sigsuspend()\n"
10249 "sigtimedwait()\n"
10250 "sigwait()\n"
10251 "sigwaitinfo()\n"
10252 "sleep()\n"
10253 "system()\n"
10254 "tcdrain()\n"
10255 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10256 "wait()\n"
10257 "waitid()\n"
10258 "waitpid()\n"
10259 "write()\n"
10260 "writev()\n"
10261 msgstr ""
10262 "accept()\n"
10263 "aio_suspend()\n"
10264 "clock_nanosleep()\n"
10265 "close()\n"
10266 "connect()\n"
10267 "creat()\n"
10268 "fcntl() F_SETLKW\n"
10269 "fdatasync()\n"
10270 "fsync()\n"
10271 "getmsg()\n"
10272 "getpmsg()\n"
10273 "lockf() F_LOCK\n"
10274 "mq_receive()\n"
10275 "mq_send()\n"
10276 "mq_timedreceive()\n"
10277 "mq_timedsend()\n"
10278 "msgrcv()\n"
10279 "msgsnd()\n"
10280 "msync()\n"
10281 "nanosleep()\n"
10282 "open()\n"
10283 "openat() [POSIX.1-2008 で追加された]\n"
10284 "pause()\n"
10285 "poll()\n"
10286 "pread()\n"
10287 "pselect()\n"
10288 "pthread_cond_timedwait()\n"
10289 "pthread_cond_wait()\n"
10290 "pthread_join()\n"
10291 "pthread_testcancel()\n"
10292 "putmsg()\n"
10293 "putpmsg()\n"
10294 "pwrite()\n"
10295 "read()\n"
10296 "readv()\n"
10297 "recv()\n"
10298 "recvfrom()\n"
10299 "recvmsg()\n"
10300 "select()\n"
10301 "sem_timedwait()\n"
10302 "sem_wait()\n"
10303 "send()\n"
10304 "sendmsg()\n"
10305 "sendto()\n"
10306 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10307 "sigsuspend()\n"
10308 "sigtimedwait()\n"
10309 "sigwait()\n"
10310 "sigwaitinfo()\n"
10311 "sleep()\n"
10312 "system()\n"
10313 "tcdrain()\n"
10314 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10315 "wait()\n"
10316 "waitid()\n"
10317 "waitpid()\n"
10318 "write()\n"
10319 "writev()\n"
10320
10321 #. type: Plain text
10322 #: build/C/man7/pthreads.7:329
10323 msgid ""
10324 "The following functions may be cancellation points according to POSIX.1-2001 "
10325 "and/or POSIX.1-2008:"
10326 msgstr ""
10327 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10328 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10329
10330 #. type: Plain text
10331 #: build/C/man7/pthreads.7:557
10332 #, no-wrap
10333 msgid ""
10334 "access()\n"
10335 "asctime()\n"
10336 "asctime_r()\n"
10337 "catclose()\n"
10338 "catgets()\n"
10339 "catopen()\n"
10340 "chmod() [Added in POSIX.1-2008]\n"
10341 "chown() [Added in POSIX.1-2008]\n"
10342 "closedir()\n"
10343 "closelog()\n"
10344 "ctermid()\n"
10345 "ctime()\n"
10346 "ctime_r()\n"
10347 "dbm_close()\n"
10348 "dbm_delete()\n"
10349 "dbm_fetch()\n"
10350 "dbm_nextkey()\n"
10351 "dbm_open()\n"
10352 "dbm_store()\n"
10353 "dlclose()\n"
10354 "dlopen()\n"
10355 "dprintf() [Added in POSIX.1-2008]\n"
10356 "endgrent()\n"
10357 "endhostent()\n"
10358 "endnetent()\n"
10359 "endprotoent()\n"
10360 "endpwent()\n"
10361 "endservent()\n"
10362 "endutxent()\n"
10363 "faccessat() [Added in POSIX.1-2008]\n"
10364 "fchmod() [Added in POSIX.1-2008]\n"
10365 "fchmodat() [Added in POSIX.1-2008]\n"
10366 "fchown() [Added in POSIX.1-2008]\n"
10367 "fchownat() [Added in POSIX.1-2008]\n"
10368 "fclose()\n"
10369 "fcntl() (for any value of cmd argument)\n"
10370 "fflush()\n"
10371 "fgetc()\n"
10372 "fgetpos()\n"
10373 "fgets()\n"
10374 "fgetwc()\n"
10375 "fgetws()\n"
10376 "fmtmsg()\n"
10377 "fopen()\n"
10378 "fpathconf()\n"
10379 "fprintf()\n"
10380 "fputc()\n"
10381 "fputs()\n"
10382 "fputwc()\n"
10383 "fputws()\n"
10384 "fread()\n"
10385 "freopen()\n"
10386 "fscanf()\n"
10387 "fseek()\n"
10388 "fseeko()\n"
10389 "fsetpos()\n"
10390 "fstat()\n"
10391 "fstatat() [Added in POSIX.1-2008]\n"
10392 "ftell()\n"
10393 "ftello()\n"
10394 "ftw()\n"
10395 "futimens() [Added in POSIX.1-2008]\n"
10396 "fwprintf()\n"
10397 "fwrite()\n"
10398 "fwscanf()\n"
10399 "getaddrinfo()\n"
10400 "getc()\n"
10401 "getc_unlocked()\n"
10402 "getchar()\n"
10403 "getchar_unlocked()\n"
10404 "getcwd()\n"
10405 "getdate()\n"
10406 "getdelim() [Added in POSIX.1-2008]\n"
10407 "getgrent()\n"
10408 "getgrgid()\n"
10409 "getgrgid_r()\n"
10410 "getgrnam()\n"
10411 "getgrnam_r()\n"
10412 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10413 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10414 "gethostent()\n"
10415 "gethostid()\n"
10416 "gethostname()\n"
10417 "getline() [Added in POSIX.1-2008]\n"
10418 "getlogin()\n"
10419 "getlogin_r()\n"
10420 "getnameinfo()\n"
10421 "getnetbyaddr()\n"
10422 "getnetbyname()\n"
10423 "getnetent()\n"
10424 "getopt() (if opterr is nonzero)\n"
10425 "getprotobyname()\n"
10426 "getprotobynumber()\n"
10427 "getprotoent()\n"
10428 "getpwent()\n"
10429 "getpwnam()\n"
10430 "getpwnam_r()\n"
10431 "getpwuid()\n"
10432 "getpwuid_r()\n"
10433 "gets()\n"
10434 "getservbyname()\n"
10435 "getservbyport()\n"
10436 "getservent()\n"
10437 "getutxent()\n"
10438 "getutxid()\n"
10439 "getutxline()\n"
10440 "getwc()\n"
10441 "getwchar()\n"
10442 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10443 "glob()\n"
10444 "iconv_close()\n"
10445 "iconv_open()\n"
10446 "ioctl()\n"
10447 "link()\n"
10448 "linkat() [Added in POSIX.1-2008]\n"
10449 "lio_listio() [Added in POSIX.1-2008]\n"
10450 "localtime()\n"
10451 "localtime_r()\n"
10452 "lockf() [Added in POSIX.1-2008]\n"
10453 "lseek()\n"
10454 "lstat()\n"
10455 "mkdir() [Added in POSIX.1-2008]\n"
10456 "mkdirat() [Added in POSIX.1-2008]\n"
10457 "mkdtemp() [Added in POSIX.1-2008]\n"
10458 "mkfifo() [Added in POSIX.1-2008]\n"
10459 "mkfifoat() [Added in POSIX.1-2008]\n"
10460 "mknod() [Added in POSIX.1-2008]\n"
10461 "mknodat() [Added in POSIX.1-2008]\n"
10462 "mkstemp()\n"
10463 "mktime()\n"
10464 "nftw()\n"
10465 "opendir()\n"
10466 "openlog()\n"
10467 "pathconf()\n"
10468 "pclose()\n"
10469 "perror()\n"
10470 "popen()\n"
10471 "posix_fadvise()\n"
10472 "posix_fallocate()\n"
10473 "posix_madvise()\n"
10474 "posix_openpt()\n"
10475 "posix_spawn()\n"
10476 "posix_spawnp()\n"
10477 "posix_trace_clear()\n"
10478 "posix_trace_close()\n"
10479 "posix_trace_create()\n"
10480 "posix_trace_create_withlog()\n"
10481 "posix_trace_eventtypelist_getnext_id()\n"
10482 "posix_trace_eventtypelist_rewind()\n"
10483 "posix_trace_flush()\n"
10484 "posix_trace_get_attr()\n"
10485 "posix_trace_get_filter()\n"
10486 "posix_trace_get_status()\n"
10487 "posix_trace_getnext_event()\n"
10488 "posix_trace_open()\n"
10489 "posix_trace_rewind()\n"
10490 "posix_trace_set_filter()\n"
10491 "posix_trace_shutdown()\n"
10492 "posix_trace_timedgetnext_event()\n"
10493 "posix_typed_mem_open()\n"
10494 "printf()\n"
10495 "psiginfo() [Added in POSIX.1-2008]\n"
10496 "psignal() [Added in POSIX.1-2008]\n"
10497 "pthread_rwlock_rdlock()\n"
10498 "pthread_rwlock_timedrdlock()\n"
10499 "pthread_rwlock_timedwrlock()\n"
10500 "pthread_rwlock_wrlock()\n"
10501 "putc()\n"
10502 "putc_unlocked()\n"
10503 "putchar()\n"
10504 "putchar_unlocked()\n"
10505 "puts()\n"
10506 "pututxline()\n"
10507 "putwc()\n"
10508 "putwchar()\n"
10509 "readdir()\n"
10510 "readdir_r()\n"
10511 "readlink() [Added in POSIX.1-2008]\n"
10512 "readlinkat() [Added in POSIX.1-2008]\n"
10513 "remove()\n"
10514 "rename()\n"
10515 "renameat() [Added in POSIX.1-2008]\n"
10516 "rewind()\n"
10517 "rewinddir()\n"
10518 "scandir() [Added in POSIX.1-2008]\n"
10519 "scanf()\n"
10520 "seekdir()\n"
10521 "semop()\n"
10522 "setgrent()\n"
10523 "sethostent()\n"
10524 "setnetent()\n"
10525 "setprotoent()\n"
10526 "setpwent()\n"
10527 "setservent()\n"
10528 "setutxent()\n"
10529 "sigpause() [Added in POSIX.1-2008]\n"
10530 "stat()\n"
10531 "strerror()\n"
10532 "strerror_r()\n"
10533 "strftime()\n"
10534 "symlink()\n"
10535 "symlinkat() [Added in POSIX.1-2008]\n"
10536 "sync()\n"
10537 "syslog()\n"
10538 "tmpfile()\n"
10539 "tmpnam()\n"
10540 "ttyname()\n"
10541 "ttyname_r()\n"
10542 "tzset()\n"
10543 "ungetc()\n"
10544 "ungetwc()\n"
10545 "unlink()\n"
10546 "unlinkat() [Added in POSIX.1-2008]\n"
10547 "utime() [Added in POSIX.1-2008]\n"
10548 "utimensat() [Added in POSIX.1-2008]\n"
10549 "utimes() [Added in POSIX.1-2008]\n"
10550 "vdprintf() [Added in POSIX.1-2008]\n"
10551 "vfprintf()\n"
10552 "vfwprintf()\n"
10553 "vprintf()\n"
10554 "vwprintf()\n"
10555 "wcsftime()\n"
10556 "wordexp()\n"
10557 "wprintf()\n"
10558 "wscanf()\n"
10559 msgstr ""
10560 "access()\n"
10561 "asctime()\n"
10562 "asctime_r()\n"
10563 "catclose()\n"
10564 "catgets()\n"
10565 "catopen()\n"
10566 "chmod() [POSIX.1-2008 で追加された]\n"
10567 "chown() [POSIX.1-2008 で追加された]\n"
10568 "closedir()\n"
10569 "closelog()\n"
10570 "ctermid()\n"
10571 "ctime()\n"
10572 "ctime_r()\n"
10573 "dbm_close()\n"
10574 "dbm_delete()\n"
10575 "dbm_fetch()\n"
10576 "dbm_nextkey()\n"
10577 "dbm_open()\n"
10578 "dbm_store()\n"
10579 "dlclose()\n"
10580 "dlopen()\n"
10581 "dprintf() [POSIX.1-2008 で追加された]\n"
10582 "endgrent()\n"
10583 "endhostent()\n"
10584 "endnetent()\n"
10585 "endprotoent()\n"
10586 "endpwent()\n"
10587 "endservent()\n"
10588 "endutxent()\n"
10589 "faccessat() [POSIX.1-2008 で追加された]\n"
10590 "fchmod() [POSIX.1-2008 で追加された]\n"
10591 "fchmodat() [POSIX.1-2008 で追加された]\n"
10592 "fchown() [POSIX.1-2008 で追加された]\n"
10593 "fchownat() [POSIX.1-2008 で追加された]\n"
10594 "fclose()\n"
10595 "fcntl() (cmd 引き数が何であっても)\n"
10596 "fflush()\n"
10597 "fgetc()\n"
10598 "fgetpos()\n"
10599 "fgets()\n"
10600 "fgetwc()\n"
10601 "fgetws()\n"
10602 "fmtmsg()\n"
10603 "fopen()\n"
10604 "fpathconf()\n"
10605 "fprintf()\n"
10606 "fputc()\n"
10607 "fputs()\n"
10608 "fputwc()\n"
10609 "fputws()\n"
10610 "fread()\n"
10611 "freopen()\n"
10612 "fscanf()\n"
10613 "fseek()\n"
10614 "fseeko()\n"
10615 "fsetpos()\n"
10616 "fstat()\n"
10617 "fstatat() [POSIX.1-2008 で追加された]\n"
10618 "ftell()\n"
10619 "ftello()\n"
10620 "ftw()\n"
10621 "futimens() [POSIX.1-2008 で追加された]\n"
10622 "fwprintf()\n"
10623 "fwrite()\n"
10624 "fwscanf()\n"
10625 "getaddrinfo()\n"
10626 "getc()\n"
10627 "getc_unlocked()\n"
10628 "getchar()\n"
10629 "getchar_unlocked()\n"
10630 "getcwd()\n"
10631 "getdate()\n"
10632 "getdelim() [POSIX.1-2008 で追加された]\n"
10633 "getgrent()\n"
10634 "getgrgid()\n"
10635 "getgrgid_r()\n"
10636 "getgrnam()\n"
10637 "getgrnam_r()\n"
10638 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10639 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10640 "gethostent()\n"
10641 "gethostid()\n"
10642 "gethostname()\n"
10643 "getline() [POSIX.1-2008 で追加された]\n"
10644 "getlogin()\n"
10645 "getlogin_r()\n"
10646 "getnameinfo()\n"
10647 "getnetbyaddr()\n"
10648 "getnetbyname()\n"
10649 "getnetent()\n"
10650 "getopt() (opterr が 0 以外の場合)\n"
10651 "getprotobyname()\n"
10652 "getprotobynumber()\n"
10653 "getprotoent()\n"
10654 "getpwent()\n"
10655 "getpwnam()\n"
10656 "getpwnam_r()\n"
10657 "getpwuid()\n"
10658 "getpwuid_r()\n"
10659 "gets()\n"
10660 "getservbyname()\n"
10661 "getservbyport()\n"
10662 "getservent()\n"
10663 "getutxent()\n"
10664 "getutxid()\n"
10665 "getutxline()\n"
10666 "getwc()\n"
10667 "getwchar()\n"
10668 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10669 "glob()\n"
10670 "iconv_close()\n"
10671 "iconv_open()\n"
10672 "ioctl()\n"
10673 "link()\n"
10674 "linkat() [POSIX.1-2008 で追加された]\n"
10675 "lio_listio() [POSIX.1-2008 で追加された]\n"
10676 "localtime()\n"
10677 "localtime_r()\n"
10678 "lockf() [POSIX.1-2008 で追加された]\n"
10679 "lseek()\n"
10680 "lstat()\n"
10681 "mkdir() [POSIX.1-2008 で追加された]\n"
10682 "mkdirat() [POSIX.1-2008 で追加された]\n"
10683 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10684 "mkfifo() [POSIX.1-2008 で追加された]\n"
10685 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10686 "mknod() [POSIX.1-2008 で追加された]\n"
10687 "mknodat() [POSIX.1-2008 で追加された]\n"
10688 "mkstemp()\n"
10689 "mktime()\n"
10690 "nftw()\n"
10691 "opendir()\n"
10692 "openlog()\n"
10693 "pathconf()\n"
10694 "pclose()\n"
10695 "perror()\n"
10696 "popen()\n"
10697 "posix_fadvise()\n"
10698 "posix_fallocate()\n"
10699 "posix_madvise()\n"
10700 "posix_openpt()\n"
10701 "posix_spawn()\n"
10702 "posix_spawnp()\n"
10703 "posix_trace_clear()\n"
10704 "posix_trace_close()\n"
10705 "posix_trace_create()\n"
10706 "posix_trace_create_withlog()\n"
10707 "posix_trace_eventtypelist_getnext_id()\n"
10708 "posix_trace_eventtypelist_rewind()\n"
10709 "posix_trace_flush()\n"
10710 "posix_trace_get_attr()\n"
10711 "posix_trace_get_filter()\n"
10712 "posix_trace_get_status()\n"
10713 "posix_trace_getnext_event()\n"
10714 "posix_trace_open()\n"
10715 "posix_trace_rewind()\n"
10716 "posix_trace_set_filter()\n"
10717 "posix_trace_shutdown()\n"
10718 "posix_trace_timedgetnext_event()\n"
10719 "posix_typed_mem_open()\n"
10720 "printf()\n"
10721 "psiginfo() [POSIX.1-2008 で追加された]\n"
10722 "psignal() [POSIX.1-2008 で追加された]\n"
10723 "pthread_rwlock_rdlock()\n"
10724 "pthread_rwlock_timedrdlock()\n"
10725 "pthread_rwlock_timedwrlock()\n"
10726 "pthread_rwlock_wrlock()\n"
10727 "putc()\n"
10728 "putc_unlocked()\n"
10729 "putchar()\n"
10730 "putchar_unlocked()\n"
10731 "puts()\n"
10732 "pututxline()\n"
10733 "putwc()\n"
10734 "putwchar()\n"
10735 "readdir()\n"
10736 "readdir_r()\n"
10737 "readlink() [POSIX.1-2008 で追加された]\n"
10738 "readlinkat() [POSIX.1-2008 で追加された]\n"
10739 "remove()\n"
10740 "rename()\n"
10741 "renameat() [POSIX.1-2008 で追加された]\n"
10742 "rewind()\n"
10743 "rewinddir()\n"
10744 "scandir() [POSIX.1-2008 で追加された]\n"
10745 "scanf()\n"
10746 "seekdir()\n"
10747 "semop()\n"
10748 "setgrent()\n"
10749 "sethostent()\n"
10750 "setnetent()\n"
10751 "setprotoent()\n"
10752 "setpwent()\n"
10753 "setservent()\n"
10754 "setutxent()\n"
10755 "sigpause() [POSIX.1-2008 で追加された]\n"
10756 "stat()\n"
10757 "strerror()\n"
10758 "strerror_r()\n"
10759 "strftime()\n"
10760 "symlink()\n"
10761 "symlinkat() [POSIX.1-2008 で追加された]\n"
10762 "sync()\n"
10763 "syslog()\n"
10764 "tmpfile()\n"
10765 "tmpnam()\n"
10766 "ttyname()\n"
10767 "ttyname_r()\n"
10768 "tzset()\n"
10769 "ungetc()\n"
10770 "ungetwc()\n"
10771 "unlink()\n"
10772 "unlinkat() [POSIX.1-2008 で追加された]\n"
10773 "utime() [POSIX.1-2008 で追加された]\n"
10774 "utimensat() [POSIX.1-2008 で追加された]\n"
10775 "utimes() [POSIX.1-2008 で追加された]\n"
10776 "vdprintf() [POSIX.1-2008 で追加された]\n"
10777 "vfprintf()\n"
10778 "vfwprintf()\n"
10779 "vprintf()\n"
10780 "vwprintf()\n"
10781 "wcsftime()\n"
10782 "wordexp()\n"
10783 "wprintf()\n"
10784 "wscanf()\n"
10785
10786 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10787 #.  files, it looks as though at least the following nonstandard
10788 #.  functions are cancellation points:
10789 #.  endnetgrent
10790 #.  endspent
10791 #.  epoll_pwait
10792 #.  epoll_wait
10793 #.  fcloseall
10794 #.  fdopendir
10795 #.  fflush_unlocked
10796 #.  fgetc_unlocked
10797 #.  fgetgrent
10798 #.  fgetgrent_r
10799 #.  fgetpwent
10800 #.  fgetpwent_r
10801 #.  fgets_unlocked
10802 #.  fgetspent
10803 #.  fgetspent_r
10804 #.  fgetwc_unlocked
10805 #.  fgetws_unlocked
10806 #.  fputc_unlocked
10807 #.  fputs_unlocked
10808 #.  fputwc_unlocked
10809 #.  fputws_unlocked
10810 #.  fread_unlocked
10811 #.  fwrite_unlocked
10812 #.  gai_suspend
10813 #.  getaddrinfo_a
10814 #.  getdate_r
10815 #.  getgrent_r
10816 #.  getgrouplist
10817 #.  gethostbyaddr_r
10818 #.  gethostbyname2
10819 #.  gethostbyname2_r
10820 #.  gethostbyname_r
10821 #.  gethostent_r
10822 #.  getnetbyaddr_r
10823 #.  getnetbyname_r
10824 #.  getnetent_r
10825 #.  getnetgrent
10826 #.  getnetgrent_r
10827 #.  getprotobyname_r
10828 #.  getprotobynumber_r
10829 #.  getprotoent_r
10830 #.  getpw
10831 #.  getpwent_r
10832 #.  getservbyname_r
10833 #.  getservbyport_r
10834 #.  getservent_r
10835 #.  getspent
10836 #.  getspent_r
10837 #.  getspnam
10838 #.  getspnam_r
10839 #.  getutmp
10840 #.  getutmpx
10841 #.  getw
10842 #.  getwc_unlocked
10843 #.  getwchar_unlocked
10844 #.  initgroups
10845 #.  innetgr
10846 #.  mkostemp
10847 #.  mkostemp64
10848 #.  mkstemp64
10849 #.  ppoll
10850 #.  pthread_timedjoin_np
10851 #.  putgrent
10852 #.  putpwent
10853 #.  putspent
10854 #.  putw
10855 #.  putwc_unlocked
10856 #.  putwchar_unlocked
10857 #.  rcmd
10858 #.  rcmd_af
10859 #.  rexec
10860 #.  rexec_af
10861 #.  rresvport
10862 #.  rresvport_af
10863 #.  ruserok
10864 #.  ruserok_af
10865 #.  setnetgrent
10866 #.  setspent
10867 #.  sgetspent
10868 #.  sgetspent_r
10869 #.  updwtmpx
10870 #.  utmpxname
10871 #.  vfscanf
10872 #.  vfwscanf
10873 #.  vscanf
10874 #.  vsyslog
10875 #.  vwscanf
10876 #. type: Plain text
10877 #: build/C/man7/pthreads.7:655
10878 msgid ""
10879 "An implementation may also mark other functions not specified in the "
10880 "standard as cancellation points.  In particular, an implementation is likely "
10881 "to mark any nonstandard function that may block as a cancellation point.  "
10882 "(This includes most functions that can touch files.)"
10883 msgstr ""
10884 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10885 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10886 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10887 "関数がこれに含まれる)。"
10888
10889 #. type: SS
10890 #: build/C/man7/pthreads.7:655
10891 #, no-wrap
10892 msgid "Compiling on Linux"
10893 msgstr "Linux でのコンパイル"
10894
10895 #. type: Plain text
10896 #: build/C/man7/pthreads.7:658
10897 msgid ""
10898 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10899 "pthread>."
10900 msgstr ""
10901 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10902 "きである。"
10903
10904 #. type: SS
10905 #: build/C/man7/pthreads.7:658
10906 #, no-wrap
10907 msgid "Linux implementations of POSIX threads"
10908 msgstr "POSIX スレッドの Linux での実装"
10909
10910 #. type: Plain text
10911 #: build/C/man7/pthreads.7:661
10912 msgid ""
10913 "Over time, two threading implementations have been provided by the GNU C "
10914 "library on Linux:"
10915 msgstr ""
10916 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10917 "た。"
10918
10919 #. type: TP
10920 #: build/C/man7/pthreads.7:661
10921 #, no-wrap
10922 msgid "B<LinuxThreads>"
10923 msgstr "B<LinuxThreads>"
10924
10925 #. type: Plain text
10926 #: build/C/man7/pthreads.7:665
10927 msgid ""
10928 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10929 "implementation is no longer supported."
10930 msgstr ""
10931 "最初の Pthreads の実装。\n"
10932 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10933
10934 #. type: TP
10935 #: build/C/man7/pthreads.7:665
10936 #, no-wrap
10937 msgid "B<NPTL> (Native POSIX Threads Library)"
10938 msgstr "B<NPTL> (Native POSIX Threads Library)"
10939
10940 #. type: Plain text
10941 #: build/C/man7/pthreads.7:673
10942 msgid ""
10943 "This is the modern Pthreads implementation.  By comparison with "
10944 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10945 "POSIX.1 specification and better performance when creating large numbers of "
10946 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10947 "are present in the Linux 2.6 kernel."
10948 msgstr ""
10949 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
10950 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
10951 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
10952 "装されている機能が必要である。"
10953
10954 #. type: Plain text
10955 #: build/C/man7/pthreads.7:683
10956 msgid ""
10957 "Both of these are so-called 1:1 implementations, meaning that each thread "
10958 "maps to a kernel scheduling entity.  Both threading implementations employ "
10959 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
10960 "primitives (mutexes, thread joining, and so on) are implemented using the "
10961 "Linux B<futex>(2)  system call."
10962 msgstr ""
10963 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
10964 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
10965 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
10966 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
10967 "使って実装されている。"
10968
10969 #. type: SS
10970 #: build/C/man7/pthreads.7:683
10971 #, no-wrap
10972 msgid "LinuxThreads"
10973 msgstr "LinuxThreads"
10974
10975 #. type: Plain text
10976 #: build/C/man7/pthreads.7:685
10977 msgid "The notable features of this implementation are the following:"
10978 msgstr "この実装の大きな特徴は以下の通りである:"
10979
10980 #. type: Plain text
10981 #: build/C/man7/pthreads.7:692
10982 msgid ""
10983 "In addition to the main (initial) thread, and the threads that the program "
10984 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
10985 "thread.  This thread handles thread creation and termination.  (Problems can "
10986 "result if this thread is inadvertently killed.)"
10987 msgstr ""
10988 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
10989 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
10990 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
10991 "kill されると、問題が起こることがある)。"
10992
10993 #. type: Plain text
10994 #: build/C/man7/pthreads.7:704
10995 msgid ""
10996 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
10997 "the first three real-time signals are used (see also B<signal>(7)).  On "
10998 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
10999 "avoid the use of whichever set of signals is employed by the implementation."
11000 msgstr ""
11001 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11002 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11003 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11004 "用されているシグナルを どれも使わないようにしなければならない。"
11005
11006 #. type: Plain text
11007 #: build/C/man7/pthreads.7:711
11008 msgid ""
11009 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11010 "implemented as processes which share more information than usual, but which "
11011 "do not share a common process ID.)  LinuxThreads threads (including the "
11012 "manager thread)  are visible as separate processes using B<ps>(1)."
11013 msgstr ""
11014 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11015 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11016 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11017 "を使うと別のプロセスのように見える。"
11018
11019 #. type: Plain text
11020 #: build/C/man7/pthreads.7:714
11021 msgid ""
11022 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11023 "number of ways, including the following:"
11024 msgstr ""
11025 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11026 "示すような点がある:"
11027
11028 #. type: Plain text
11029 #: build/C/man7/pthreads.7:718
11030 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11031 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11032
11033 #. type: Plain text
11034 #: build/C/man7/pthreads.7:727
11035 msgid ""
11036 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11037 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11038 "should return the same value as B<getppid>(2)  in the main thread."
11039 msgstr ""
11040 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11041 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11042 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11043
11044 #. type: Plain text
11045 #: build/C/man7/pthreads.7:737
11046 msgid ""
11047 "When one thread creates a new child process using B<fork>(2), any thread "
11048 "should be able to B<wait>(2)  on the child.  However, the implementation "
11049 "only allows the thread that created the child to B<wait>(2)  on it."
11050 msgstr ""
11051 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11052 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11053 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11054 "る。"
11055
11056 #. type: Plain text
11057 #: build/C/man7/pthreads.7:744
11058 msgid ""
11059 "When a thread calls B<execve>(2), all other threads are terminated (as "
11060 "required by POSIX.1).  However, the resulting process has the same PID as "
11061 "the thread that called B<execve>(2): it should have the same PID as the main "
11062 "thread."
11063 msgstr ""
11064 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11065 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11066 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11067 "る。"
11068
11069 #. type: Plain text
11070 #: build/C/man7/pthreads.7:751
11071 msgid ""
11072 "Threads do not share user and group IDs.  This can cause complications with "
11073 "set-user-ID programs and can cause failures in Pthreads functions if an "
11074 "application changes its credentials using B<seteuid>(2)  or similar."
11075 msgstr ""
11076 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11077 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11078 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11079
11080 #. type: Plain text
11081 #: build/C/man7/pthreads.7:753
11082 msgid "Threads do not share a common session ID and process group ID."
11083 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11084
11085 #. type: Plain text
11086 #: build/C/man7/pthreads.7:756
11087 msgid "Threads do not share record locks created using B<fcntl>(2)."
11088 msgstr ""
11089 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11090
11091 #. type: Plain text
11092 #: build/C/man7/pthreads.7:762
11093 msgid ""
11094 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11095 "rather than process-wide."
11096 msgstr ""
11097 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11098 "単位の情報である。"
11099
11100 #. type: Plain text
11101 #: build/C/man7/pthreads.7:765
11102 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11103 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11104
11105 #. type: Plain text
11106 #: build/C/man7/pthreads.7:767
11107 msgid "Threads do not share interval timers."
11108 msgstr "スレッド間でインターバル・タイマを共有しない。"
11109
11110 #.  FIXME . bug report filed for NPTL nice nonconformance
11111 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11112 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11113 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11114 #.  Monitor this to see if it makes it into mainline.
11115 #. type: Plain text
11116 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11117 msgid "Threads do not share a common nice value."
11118 msgstr "スレッドは共通の nice 値を共有しない。"
11119
11120 #. type: Plain text
11121 #: build/C/man7/pthreads.7:779
11122 msgid ""
11123 "POSIX.1 distinguishes the notions of signals that are directed to the "
11124 "process as a whole and signals that are directed to individual threads.  "
11125 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11126 "example) should be handled by a single, arbitrarily selected thread within "
11127 "the process.  LinuxThreads does not support the notion of process-directed "
11128 "signals: signals may be sent only to specific threads."
11129 msgstr ""
11130 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11131 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11132 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11133 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11134 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11135 "ルは特定のスレッドにだけ送ることができる。"
11136
11137 #. type: Plain text
11138 #: build/C/man7/pthreads.7:788
11139 msgid ""
11140 "Threads have distinct alternate signal stack settings.  However, a new "
11141 "thread's alternate signal stack settings are copied from the thread that "
11142 "created it, so that the threads initially share an alternate signal stack.  "
11143 "(A new thread should start with no alternate signal stack defined.  If two "
11144 "threads handle signals on their shared alternate signal stack at the same "
11145 "time, unpredictable program failures are likely to occur.)"
11146 msgstr ""
11147 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11148 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11149 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11150 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11151 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11152 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11153
11154 #. type: SS
11155 #: build/C/man7/pthreads.7:788
11156 #, no-wrap
11157 msgid "NPTL"
11158 msgstr "NPTL"
11159
11160 #. type: Plain text
11161 #: build/C/man7/pthreads.7:797
11162 msgid ""
11163 "With NPTL, all of the threads in a process are placed in the same thread "
11164 "group; all members of a thread group share the same PID.  NPTL does not "
11165 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11166 "signals (see also B<signal>(7)); these signals cannot be used in "
11167 "applications."
11168 msgstr ""
11169 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11170 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11171 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11172 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11173 "ションでは使用できない。"
11174
11175 #. type: Plain text
11176 #: build/C/man7/pthreads.7:799
11177 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11178 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11179
11180 #. type: Plain text
11181 #: build/C/man7/pthreads.7:808
11182 msgid "Some NPTL nonconformances occur only with older kernels:"
11183 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11184
11185 #. type: Plain text
11186 #: build/C/man7/pthreads.7:814
11187 msgid ""
11188 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11189 "rather than process-wide (fixed in kernel 2.6.9)."
11190 msgstr ""
11191 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11192 "単位の情報である (カーネル 2.6.9 で修正された)。"
11193
11194 #. type: Plain text
11195 #: build/C/man7/pthreads.7:816
11196 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11197 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11198
11199 #. type: Plain text
11200 #: build/C/man7/pthreads.7:818
11201 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11202 msgstr ""
11203 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11204
11205 #. type: Plain text
11206 #: build/C/man7/pthreads.7:822
11207 msgid ""
11208 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11209 "(fixed in kernel 2.6.16)."
11210 msgstr ""
11211 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11212 "きる (カーネル 2.6.16 で修正された)。"
11213
11214 #. type: Plain text
11215 #: build/C/man7/pthreads.7:827
11216 msgid ""
11217 "Only the main thread is permitted to make the process into a process group "
11218 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11219 msgstr ""
11220 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11221 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11222
11223 #. type: Plain text
11224 #: build/C/man7/pthreads.7:833
11225 msgid ""
11226 "Threads have distinct alternate signal stack settings.  However, a new "
11227 "thread's alternate signal stack settings are copied from the thread that "
11228 "created it, so that the threads initially share an alternate signal stack "
11229 "(fixed in kernel 2.6.16)."
11230 msgstr ""
11231 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11232 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11233 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11234 "ル 2.6.16 で修正された)。"
11235
11236 #. type: Plain text
11237 #: build/C/man7/pthreads.7:835
11238 msgid "Note the following further points about the NPTL implementation:"
11239 msgstr "NPTL の実装では以下の点についても注意すること:"
11240
11241 #. type: Plain text
11242 #: build/C/man7/pthreads.7:849
11243 msgid ""
11244 "If the stack size soft resource limit (see the description of "
11245 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11246 "I<unlimited>, then this value defines the default stack size for new "
11247 "threads.  To be effective, this limit must be set before the program is "
11248 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11249 "stacksize> in the C shell)."
11250 msgstr ""
11251 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11252 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11253 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11254 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11255 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11256 "は I<limit stacksize>)  を使って設定する。"
11257
11258 #. type: SS
11259 #: build/C/man7/pthreads.7:849
11260 #, no-wrap
11261 msgid "Determining the threading implementation"
11262 msgstr "スレッド実装の判定"
11263
11264 #. type: Plain text
11265 #: build/C/man7/pthreads.7:854
11266 msgid ""
11267 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11268 "system's threading implementation, for example:"
11269 msgstr ""
11270 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11271 "装を判定することができる。 以下に例を示す:"
11272
11273 #. type: Plain text
11274 #: build/C/man7/pthreads.7:859
11275 #, no-wrap
11276 msgid ""
11277 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11278 "NPTL 2.3.4\n"
11279 msgstr ""
11280 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11281 "NPTL 2.3.4\n"
11282
11283 #. type: Plain text
11284 #: build/C/man7/pthreads.7:864
11285 msgid ""
11286 "With older glibc versions, a command such as the following should be "
11287 "sufficient to determine the default threading implementation:"
11288 msgstr ""
11289 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11290 "ド実装を判定することができる。"
11291
11292 #. type: Plain text
11293 #: build/C/man7/pthreads.7:870
11294 #, no-wrap
11295 msgid ""
11296 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11297 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11298 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11299 msgstr ""
11300 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11301 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11302 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11303
11304 #. type: SS
11305 #: build/C/man7/pthreads.7:872
11306 #, no-wrap
11307 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11308 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11309
11310 #. type: Plain text
11311 #: build/C/man7/pthreads.7:887
11312 msgid ""
11313 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11314 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11315 "override the dynamic linker's default choice of threading implementation.  "
11316 "This variable tells the dynamic linker to assume that it is running on top "
11317 "of a particular kernel version.  By specifying a kernel version that does "
11318 "not provide the support required by NPTL, we can force the use of "
11319 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11320 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11321 "For example:"
11322 msgstr ""
11323 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11324 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11325 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11326 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11327 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11328 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11329 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11330 "ン を動作させる場合だろう)。 以下に例を示す:"
11331
11332 #. type: Plain text
11333 #: build/C/man7/pthreads.7:893
11334 #, no-wrap
11335 msgid ""
11336 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11337 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11338 "        linuxthreads-0.10 by Xavier Leroy\n"
11339 msgstr ""
11340 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11341 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11342 "        linuxthreads-0.10 by Xavier Leroy\n"
11343
11344 #. type: Plain text
11345 #: build/C/man7/pthreads.7:905
11346 msgid ""
11347 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11348 "(7), B<signal>(7),"
11349 msgstr ""
11350 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11351 "B<signal>(7),"
11352
11353 #. type: Plain text
11354 #: build/C/man7/pthreads.7:929
11355 msgid ""
11356 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11357 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11358 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11359 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11360 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11361 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11362 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11363 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11364 msgstr ""
11365 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11366 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11367 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11368 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11369 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11370 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11371 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11372 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11373 "and B<pthread_testcancel>(3)"