OSDN Git Service

LDP: Update POT and ja.po to LDP v3.67
[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: 2014-06-03 01:29+0900\n"
10 "PO-Revision-Date: 2014-04-27 06:46+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 "2014-04-08"
28 msgstr "2014-04-08"
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:49
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:50
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 "る。 呼び出しに成功すると返らない。 このコンテキストは、以前に "
302 "B<getcontext>()  または 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> から返ると、 "
327 "B<makecontext>(3)  呼び出しの第一引数で指定されていた I<ucp> 構造体の "
328 "I<uc_link> メンバで継続する。 このメンバが NULL だった場合は、そのスレッドは"
329 "終了する。"
330
331 #. type: Plain text
332 #: build/C/man3/getcontext.3:142
333 msgid ""
334 "If the context was obtained by a call to a signal handler, then old standard "
335 "text says that \"program execution continues with the program instruction "
336 "following the instruction interrupted by the signal\".  However, this "
337 "sentence was removed in SUSv2, and the present verdict is \"the result is "
338 "unspecified\"."
339 msgstr ""
340 "コンテキストがシグナルハンドラの呼び出しによって得られていたものの場合は、 古"
341 "い標準によれば 「プログラムの実行はシグナルによって割り込まれた命令の次の命令"
342 "から継続される」。 しかしこの文は SUSv2 で削除されたので、 現在の判断は「結果"
343 "は定義されていない」である。"
344
345 #. type: SH
346 #: build/C/man3/getcontext.3:142 build/C/man3/makecontext.3:84
347 #: build/C/man3/pthread_attr_init.3:68
348 #: build/C/man3/pthread_attr_setaffinity_np.3:76
349 #: build/C/man3/pthread_attr_setdetachstate.3:77
350 #: build/C/man3/pthread_attr_setguardsize.3:90
351 #: build/C/man3/pthread_attr_setinheritsched.3:93
352 #: build/C/man3/pthread_attr_setschedparam.3:85
353 #: build/C/man3/pthread_attr_setschedpolicy.3:83
354 #: build/C/man3/pthread_attr_setscope.3:103
355 #: build/C/man3/pthread_attr_setstack.3:85
356 #: build/C/man3/pthread_attr_setstackaddr.3:74
357 #: build/C/man3/pthread_attr_setstacksize.3:61
358 #: build/C/man3/pthread_cancel.3:112 build/C/man3/pthread_cleanup_push.3:121
359 #: build/C/man3/pthread_create.3:115 build/C/man3/pthread_detach.3:49
360 #: build/C/man3/pthread_equal.3:41 build/C/man3/pthread_exit.3:71
361 #: build/C/man3/pthread_getattr_np.3:73
362 #: build/C/man3/pthread_getcpuclockid.3:46 build/C/man3/pthread_join.3:70
363 #: build/C/man3/pthread_kill.3:63 build/C/man3/pthread_self.3:46
364 #: build/C/man3/pthread_setaffinity_np.3:77
365 #: build/C/man3/pthread_setcancelstate.3:92
366 #: build/C/man3/pthread_setconcurrency.3:56
367 #: build/C/man3/pthread_setname_np.3:72
368 #: build/C/man3/pthread_setschedparam.3:104
369 #: build/C/man3/pthread_setschedprio.3:53 build/C/man3/pthread_sigmask.3:61
370 #: build/C/man3/pthread_sigqueue.3:65 build/C/man3/pthread_testcancel.3:50
371 #: build/C/man3/pthread_tryjoin_np.3:85 build/C/man3/pthread_yield.3:44
372 #, no-wrap
373 msgid "RETURN VALUE"
374 msgstr "返り値"
375
376 #. type: Plain text
377 #: build/C/man3/getcontext.3:151
378 msgid ""
379 "When successful, B<getcontext>()  returns 0 and B<setcontext>()  does not "
380 "return.  On error, both return -1 and set I<errno> appropriately."
381 msgstr ""
382 "成功すると、 B<getcontext>()  は 0 を返し、 B<setcontext>()  は返らない。 失"
383 "敗すると、両者とも -1 を返し、I<errno> をエラーに応じて設定する。"
384
385 #. type: SH
386 #: build/C/man3/getcontext.3:151 build/C/man3/makecontext.3:96
387 #: build/C/man3/pthread_attr_init.3:71
388 #: build/C/man3/pthread_attr_setaffinity_np.3:79
389 #: build/C/man3/pthread_attr_setdetachstate.3:80
390 #: build/C/man3/pthread_attr_setguardsize.3:93
391 #: build/C/man3/pthread_attr_setinheritsched.3:96
392 #: build/C/man3/pthread_attr_setschedparam.3:88
393 #: build/C/man3/pthread_attr_setschedpolicy.3:86
394 #: build/C/man3/pthread_attr_setscope.3:106
395 #: build/C/man3/pthread_attr_setstack.3:88
396 #: build/C/man3/pthread_attr_setstackaddr.3:77
397 #: build/C/man3/pthread_attr_setstacksize.3:64
398 #: build/C/man3/pthread_cancel.3:117 build/C/man3/pthread_cleanup_push.3:123
399 #: build/C/man3/pthread_create.3:122 build/C/man3/pthread_detach.3:54
400 #: build/C/man3/pthread_equal.3:45 build/C/man3/pthread_exit.3:73
401 #: build/C/man3/pthread_getattr_np.3:76
402 #: build/C/man3/pthread_getcpuclockid.3:49 build/C/man3/pthread_join.3:75
403 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:48
404 #: build/C/man3/pthread_setaffinity_np.3:80
405 #: build/C/man3/pthread_setcancelstate.3:95
406 #: build/C/man3/pthread_setconcurrency.3:68
407 #: build/C/man3/pthread_setname_np.3:75
408 #: build/C/man3/pthread_setschedparam.3:112
409 #: build/C/man3/pthread_setschedprio.3:61 build/C/man3/pthread_sigmask.3:66
410 #: build/C/man3/pthread_sigqueue.3:70 build/C/man3/pthread_testcancel.3:54
411 #: build/C/man3/pthread_tryjoin_np.3:89 build/C/man3/pthread_yield.3:49
412 #, no-wrap
413 msgid "ERRORS"
414 msgstr "エラー"
415
416 #. type: Plain text
417 #: build/C/man3/getcontext.3:153
418 msgid "None defined."
419 msgstr "定義されていない。"
420
421 #. type: SH
422 #: build/C/man3/getcontext.3:153 build/C/man3/makecontext.3:105
423 #: build/C/man3/pthread_attr_setdetachstate.3:87
424 #: build/C/man3/pthread_attr_setguardsize.3:106
425 #: build/C/man3/pthread_attr_setinheritsched.3:110
426 #: build/C/man3/pthread_attr_setschedparam.3:100
427 #: build/C/man3/pthread_attr_setschedpolicy.3:100
428 #: build/C/man3/pthread_attr_setscope.3:119
429 #: build/C/man3/pthread_attr_setstack.3:112
430 #: build/C/man3/pthread_attr_setstackaddr.3:83
431 #: build/C/man3/pthread_attr_setstacksize.3:83 build/C/man3/pthread_kill.3:72
432 #: build/C/man3/pthread_kill_other_threads_np.3:47
433 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_setcancelstate.3:113
434 #: build/C/man3/pthread_setschedparam.3:141
435 #: build/C/man3/pthread_setschedprio.3:83 build/C/man3/pthread_sigmask.3:69
436 #: build/C/man3/pthread_sigqueue.3:93 build/C/man3/pthread_testcancel.3:58
437 #: build/C/man3/pthread_yield.3:53
438 #, no-wrap
439 msgid "ATTRIBUTES"
440 msgstr "属性"
441
442 #. type: SS
443 #: build/C/man3/getcontext.3:154 build/C/man3/makecontext.3:106
444 #: build/C/man3/pthread_attr_setdetachstate.3:88
445 #: build/C/man3/pthread_attr_setguardsize.3:107
446 #: build/C/man3/pthread_attr_setinheritsched.3:111
447 #: build/C/man3/pthread_attr_setschedparam.3:101
448 #: build/C/man3/pthread_attr_setschedpolicy.3:101
449 #: build/C/man3/pthread_attr_setscope.3:120
450 #: build/C/man3/pthread_attr_setstack.3:113
451 #: build/C/man3/pthread_attr_setstackaddr.3:84
452 #: build/C/man3/pthread_attr_setstacksize.3:84 build/C/man3/pthread_kill.3:73
453 #: build/C/man3/pthread_kill_other_threads_np.3:48
454 #: build/C/man3/pthread_self.3:51 build/C/man3/pthread_setcancelstate.3:114
455 #: build/C/man3/pthread_setschedparam.3:142
456 #: build/C/man3/pthread_setschedprio.3:84 build/C/man3/pthread_sigmask.3:70
457 #: build/C/man3/pthread_sigqueue.3:94 build/C/man3/pthread_testcancel.3:59
458 #: build/C/man3/pthread_yield.3:54
459 #, no-wrap
460 msgid "Multithreading (see pthreads(7))"
461 msgstr "マルチスレッディング (pthreads(7) 参照)"
462
463 #. type: Plain text
464 #: build/C/man3/getcontext.3:160
465 msgid "The B<getcontext>()  and B<setcontext>()  functions are thread-safe."
466 msgstr "関数 B<getcontext>() と B<setcontext>() はスレッドセーフである。"
467
468 #. type: SH
469 #: build/C/man3/getcontext.3:160 build/C/man3/makecontext.3:112
470 #: build/C/man3/pthread_attr_init.3:79
471 #: build/C/man3/pthread_attr_setaffinity_np.3:108
472 #: build/C/man3/pthread_attr_setdetachstate.3:94
473 #: build/C/man3/pthread_attr_setguardsize.3:113
474 #: build/C/man3/pthread_attr_setinheritsched.3:117
475 #: build/C/man3/pthread_attr_setschedparam.3:107
476 #: build/C/man3/pthread_attr_setschedpolicy.3:107
477 #: build/C/man3/pthread_attr_setscope.3:126
478 #: build/C/man3/pthread_attr_setstack.3:119
479 #: build/C/man3/pthread_attr_setstackaddr.3:90
480 #: build/C/man3/pthread_attr_setstacksize.3:90
481 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_cleanup_push.3:127
482 #: build/C/man3/pthread_cleanup_push_defer_np.3:101
483 #: build/C/man3/pthread_create.3:146 build/C/man3/pthread_detach.3:64
484 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
485 #: build/C/man3/pthread_getattr_np.3:98
486 #: build/C/man3/pthread_getcpuclockid.3:65 build/C/man3/pthread_join.3:98
487 #: build/C/man3/pthread_kill.3:77
488 #: build/C/man3/pthread_kill_other_threads_np.3:52
489 #: build/C/man3/pthread_self.3:55 build/C/man3/pthread_setaffinity_np.3:121
490 #: build/C/man3/pthread_setcancelstate.3:120
491 #: build/C/man3/pthread_setconcurrency.3:83
492 #: build/C/man3/pthread_setname_np.3:102
493 #: build/C/man3/pthread_setschedparam.3:148
494 #: build/C/man3/pthread_setschedprio.3:88 build/C/man3/pthread_sigmask.3:74
495 #: build/C/man3/pthread_sigqueue.3:98 build/C/man3/pthread_testcancel.3:63
496 #: build/C/man3/pthread_tryjoin_np.3:112 build/C/man3/pthread_yield.3:58
497 #, no-wrap
498 msgid "CONFORMING TO"
499 msgstr "準拠"
500
501 #. type: Plain text
502 #: build/C/man3/getcontext.3:166
503 msgid ""
504 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specification of "
505 "B<getcontext>(), citing portability issues, and recommending that "
506 "applications be rewritten to use POSIX threads instead."
507 msgstr ""
508 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<getcontext>()  の"
509 "仕様が削除された。 代わりに、アプリケーションを POSIX スレッドを使って書き直"
510 "すことが 推奨されている。"
511
512 #. type: SH
513 #: build/C/man3/getcontext.3:166 build/C/man3/makecontext.3:120
514 #: build/C/man3/pthread_attr_init.3:81
515 #: build/C/man3/pthread_attr_setaffinity_np.3:111
516 #: build/C/man3/pthread_attr_setdetachstate.3:96
517 #: build/C/man3/pthread_attr_setguardsize.3:115
518 #: build/C/man3/pthread_attr_setschedparam.3:109
519 #: build/C/man3/pthread_attr_setscope.3:128
520 #: build/C/man3/pthread_attr_setstack.3:121
521 #: build/C/man3/pthread_attr_setstackaddr.3:93
522 #: build/C/man3/pthread_attr_setstacksize.3:92
523 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
524 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
525 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
526 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
527 #: build/C/man3/pthread_kill.3:79
528 #: build/C/man3/pthread_kill_other_threads_np.3:55
529 #: build/C/man3/pthread_self.3:57 build/C/man3/pthread_setaffinity_np.3:124
530 #: build/C/man3/pthread_setcancelstate.3:122
531 #: build/C/man3/pthread_setconcurrency.3:85
532 #: build/C/man3/pthread_setname_np.3:104
533 #: build/C/man3/pthread_setschedparam.3:150
534 #: build/C/man3/pthread_setschedprio.3:90 build/C/man3/pthread_sigmask.3:76
535 #: build/C/man3/pthread_yield.3:64
536 #, no-wrap
537 msgid "NOTES"
538 msgstr "注意"
539
540 #. type: Plain text
541 #: build/C/man3/getcontext.3:183
542 msgid ""
543 "The earliest incarnation of this mechanism was the B<setjmp>(3)/"
544 "B<longjmp>(3)  mechanism.  Since that does not define the handling of the "
545 "signal context, the next stage was the B<sigsetjmp>(3)/B<siglongjmp>(3)  "
546 "pair.  The present mechanism gives much more control.  On the other hand, "
547 "there is no easy way to detect whether a return from B<getcontext>()  is "
548 "from the first call, or via a B<setcontext>()  call.  The user has to invent "
549 "her own bookkeeping device, and a register variable won't do since registers "
550 "are restored."
551 msgstr ""
552 "このメカニズムの最古の実装は、 B<setjmp>(3)/B<longjmp>(3)  機構であった。 こ"
553 "れらにはシグナルコンテキストの取り扱いが定義されていなかったので、 次の段階で"
554 "は B<sigsetjmp>(3)/B<siglongjmp>(3)  のペアが現われた。 現在の機構ではずっと"
555 "細かな制御ができる。 一方 B<getcontext>()  から返ったとき、 これが最初の呼び"
556 "出しであったか、 それとも B<setcontext>()  呼び出しからのものであるかを 区別"
557 "する容易な方法がなくなってしまった。 ユーザは「しおり」機構を自分で作らなけれ"
558 "ばならない。 レジスタ変数は (レジスタはリストアされてしまうので) これをやって"
559 "くれない。"
560
561 #. type: Plain text
562 #: build/C/man3/getcontext.3:194
563 msgid ""
564 "When a signal occurs, the current user context is saved and a new context is "
565 "created by the kernel for the signal handler.  Do not leave the handler "
566 "using B<longjmp>(3): it is undefined what would happen with contexts.  Use "
567 "B<siglongjmp>(3)  or B<setcontext>()  instead."
568 msgstr ""
569 "シグナルが発生すると、 現在のユーザコンテキストは保存され、 シグナルハンドラ"
570 "用のコンテキストがカーネルによって生成される。 今後はハンドラに "
571 "B<longjmp>(3)  を使わせないこと: この関数のコンテキスト下での動作は定義されて"
572 "いない。 代わりに B<siglongjmp>(3)  か B<setcontext>()  を使うこと。"
573
574 #. type: SH
575 #: build/C/man3/getcontext.3:194 build/C/man3/makecontext.3:227
576 #: build/C/man3/pthread_attr_init.3:297
577 #: build/C/man3/pthread_attr_setaffinity_np.3:118
578 #: build/C/man3/pthread_attr_setdetachstate.3:118
579 #: build/C/man3/pthread_attr_setguardsize.3:165
580 #: build/C/man3/pthread_attr_setinheritsched.3:138
581 #: build/C/man3/pthread_attr_setschedparam.3:116
582 #: build/C/man3/pthread_attr_setschedpolicy.3:112
583 #: build/C/man3/pthread_attr_setscope.3:139
584 #: build/C/man3/pthread_attr_setstack.3:162
585 #: build/C/man3/pthread_attr_setstackaddr.3:117
586 #: build/C/man3/pthread_attr_setstacksize.3:118
587 #: build/C/man3/pthread_cancel.3:226 build/C/man3/pthread_cleanup_push.3:315
588 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
589 #: build/C/man3/pthread_create.3:369 build/C/man3/pthread_detach.3:97
590 #: build/C/man3/pthread_equal.3:56 build/C/man3/pthread_exit.3:105
591 #: build/C/man3/pthread_getattr_np.3:345
592 #: build/C/man3/pthread_getcpuclockid.3:170 build/C/man3/pthread_join.3:127
593 #: build/C/man3/pthread_kill.3:99
594 #: build/C/man3/pthread_kill_other_threads_np.3:71
595 #: build/C/man3/pthread_self.3:81 build/C/man3/pthread_setaffinity_np.3:206
596 #: build/C/man3/pthread_setcancelstate.3:186
597 #: build/C/man3/pthread_setconcurrency.3:100
598 #: build/C/man3/pthread_setname_np.3:200
599 #: build/C/man3/pthread_setschedparam.3:438
600 #: build/C/man3/pthread_setschedprio.3:96 build/C/man3/pthread_sigmask.3:152
601 #: build/C/man3/pthread_sigqueue.3:100 build/C/man3/pthread_testcancel.3:68
602 #: build/C/man3/pthread_tryjoin_np.3:135 build/C/man3/pthread_yield.3:67
603 #: build/C/man7/pthreads.7:893
604 #, no-wrap
605 msgid "SEE ALSO"
606 msgstr "関連項目"
607
608 #. type: Plain text
609 #: build/C/man3/getcontext.3:201
610 msgid ""
611 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
612 "B<makecontext>(3), B<sigsetjmp>(3)"
613 msgstr ""
614 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
615 "B<makecontext>(3), B<sigsetjmp>(3)"
616
617 #. type: SH
618 #: build/C/man3/getcontext.3:201 build/C/man3/makecontext.3:233
619 #: build/C/man3/pthread_attr_init.3:313
620 #: build/C/man3/pthread_attr_setaffinity_np.3:124
621 #: build/C/man3/pthread_attr_setdetachstate.3:124
622 #: build/C/man3/pthread_attr_setguardsize.3:173
623 #: build/C/man3/pthread_attr_setinheritsched.3:150
624 #: build/C/man3/pthread_attr_setschedparam.3:128
625 #: build/C/man3/pthread_attr_setschedpolicy.3:123
626 #: build/C/man3/pthread_attr_setscope.3:149
627 #: build/C/man3/pthread_attr_setstack.3:174
628 #: build/C/man3/pthread_attr_setstackaddr.3:123
629 #: build/C/man3/pthread_attr_setstacksize.3:125
630 #: build/C/man3/pthread_cancel.3:238 build/C/man3/pthread_cleanup_push.3:321
631 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
632 #: build/C/man3/pthread_create.3:382 build/C/man3/pthread_detach.3:104
633 #: build/C/man3/pthread_equal.3:60 build/C/man3/pthread_exit.3:109
634 #: build/C/man3/pthread_getattr_np.3:361
635 #: build/C/man3/pthread_getcpuclockid.3:178 build/C/man3/pthread_join.3:134
636 #: build/C/man3/pthread_kill.3:108
637 #: build/C/man3/pthread_kill_other_threads_np.3:77
638 #: build/C/man3/pthread_self.3:85 build/C/man3/pthread_setaffinity_np.3:214
639 #: build/C/man3/pthread_setcancelstate.3:191
640 #: build/C/man3/pthread_setconcurrency.3:103
641 #: build/C/man3/pthread_setname_np.3:206
642 #: build/C/man3/pthread_setschedparam.3:452
643 #: build/C/man3/pthread_setschedprio.3:110 build/C/man3/pthread_sigmask.3:161
644 #: build/C/man3/pthread_sigqueue.3:108 build/C/man3/pthread_testcancel.3:73
645 #: build/C/man3/pthread_tryjoin_np.3:140 build/C/man3/pthread_yield.3:71
646 #: build/C/man7/pthreads.7:927
647 #, no-wrap
648 msgid "COLOPHON"
649 msgstr "この文書について"
650
651 #. type: Plain text
652 #: build/C/man3/getcontext.3:209 build/C/man3/makecontext.3:241
653 #: build/C/man3/pthread_attr_init.3:321
654 #: build/C/man3/pthread_attr_setaffinity_np.3:132
655 #: build/C/man3/pthread_attr_setdetachstate.3:132
656 #: build/C/man3/pthread_attr_setguardsize.3:181
657 #: build/C/man3/pthread_attr_setinheritsched.3:158
658 #: build/C/man3/pthread_attr_setschedparam.3:136
659 #: build/C/man3/pthread_attr_setschedpolicy.3:131
660 #: build/C/man3/pthread_attr_setscope.3:157
661 #: build/C/man3/pthread_attr_setstack.3:182
662 #: build/C/man3/pthread_attr_setstackaddr.3:131
663 #: build/C/man3/pthread_attr_setstacksize.3:133
664 #: build/C/man3/pthread_cancel.3:246 build/C/man3/pthread_cleanup_push.3:329
665 #: build/C/man3/pthread_cleanup_push_defer_np.3:118
666 #: build/C/man3/pthread_create.3:390 build/C/man3/pthread_detach.3:112
667 #: build/C/man3/pthread_equal.3:68 build/C/man3/pthread_exit.3:117
668 #: build/C/man3/pthread_getattr_np.3:369
669 #: build/C/man3/pthread_getcpuclockid.3:186 build/C/man3/pthread_join.3:142
670 #: build/C/man3/pthread_kill.3:116
671 #: build/C/man3/pthread_kill_other_threads_np.3:85
672 #: build/C/man3/pthread_self.3:93 build/C/man3/pthread_setaffinity_np.3:222
673 #: build/C/man3/pthread_setcancelstate.3:199
674 #: build/C/man3/pthread_setconcurrency.3:111
675 #: build/C/man3/pthread_setname_np.3:214
676 #: build/C/man3/pthread_setschedparam.3:460
677 #: build/C/man3/pthread_setschedprio.3:118 build/C/man3/pthread_sigmask.3:169
678 #: build/C/man3/pthread_sigqueue.3:116 build/C/man3/pthread_testcancel.3:81
679 #: build/C/man3/pthread_tryjoin_np.3:148 build/C/man3/pthread_yield.3:79
680 #: build/C/man7/pthreads.7:935
681 #, fuzzy
682 #| msgid ""
683 #| "This page is part of release 3.65 of the Linux I<man-pages> project.  A "
684 #| "description of the project, and information about reporting bugs, can be "
685 #| "found at \\%http://www.kernel.org/doc/man-pages/."
686 msgid ""
687 "This page is part of release 3.67 of the Linux I<man-pages> project.  A "
688 "description of the project, information about reporting bugs, and the latest "
689 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
690 "pages/."
691 msgstr ""
692 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.65 の一部\n"
693 "である。プロジェクトの説明とバグ報告に関する情報は\n"
694 "http://www.kernel.org/doc/man-pages/ に書かれている。"
695
696 #. type: TH
697 #: build/C/man3/makecontext.3:28
698 #, no-wrap
699 msgid "MAKECONTEXT"
700 msgstr "MAKECONTEXT"
701
702 #. type: TH
703 #: build/C/man3/makecontext.3:28 build/C/man3/pthread_attr_setdetachstate.3:26
704 #: build/C/man3/pthread_attr_setguardsize.3:26
705 #, no-wrap
706 msgid "2014-04-14"
707 msgstr "2014-04-14"
708
709 #. type: TH
710 #: build/C/man3/makecontext.3:28
711 #, no-wrap
712 msgid "GNU"
713 msgstr "GNU"
714
715 #. type: Plain text
716 #: build/C/man3/makecontext.3:31
717 msgid "makecontext, swapcontext - manipulate user context"
718 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
719
720 #. type: Plain text
721 #: build/C/man3/makecontext.3:36
722 msgid ""
723 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
724 ">I<argc>B<, ...);>"
725 msgstr ""
726 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
727 ">I<argc>B<, ...);>"
728
729 #. type: Plain text
730 #: build/C/man3/makecontext.3:38
731 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
732 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
733
734 #. type: Plain text
735 #: build/C/man3/makecontext.3:49
736 msgid ""
737 "In a System V-like environment, one has the type I<ucontext_t> defined in "
738 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
739 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
740 "level context switching between multiple threads of control within a process."
741 msgstr ""
742 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
743 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
744 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
745 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
746 "ようになっている。"
747
748 #. type: Plain text
749 #: build/C/man3/makecontext.3:52
750 msgid "For the type and the first two functions, see B<getcontext>(3)."
751 msgstr ""
752 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
753
754 #. type: Plain text
755 #: build/C/man3/makecontext.3:64
756 msgid ""
757 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
758 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
759 "B<makecontext>(), the caller must allocate a new stack for this context and "
760 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
761 "and assign its address to I<ucp-E<gt>uc_link>."
762 msgstr ""
763 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
764 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
765 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
766 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
767 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
768 "らない。"
769
770 #. type: Plain text
771 #: build/C/man3/makecontext.3:78
772 msgid ""
773 "When this context is later activated (using B<setcontext>(3)  or "
774 "B<swapcontext>())  the function I<func> is called, and passed the series of "
775 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
776 "number of these arguments in I<argc>.  When this function returns, the "
777 "successor context is activated.  If the successor context pointer is NULL, "
778 "the thread exits."
779 msgstr ""
780 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
781 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
782 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
783 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
784 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
785
786 #. type: Plain text
787 #: build/C/man3/makecontext.3:84
788 msgid ""
789 "The B<swapcontext>()  function saves the current context in the structure "
790 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
791 msgstr ""
792 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
793 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
794
795 #. type: Plain text
796 #: build/C/man3/makecontext.3:96
797 msgid ""
798 "When successful, B<swapcontext>()  does not return.  (But we may return "
799 "later, in case I<oucp> is activated, in which case it looks like "
800 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
801 "sets I<errno> appropriately."
802 msgstr ""
803 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
804 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
805 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
806 "て設定する。"
807
808 #. type: TP
809 #: build/C/man3/makecontext.3:97
810 #: build/C/man3/pthread_attr_setaffinity_np.3:102
811 #: build/C/man3/pthread_getattr_np.3:77
812 #, no-wrap
813 msgid "B<ENOMEM>"
814 msgstr "B<ENOMEM>"
815
816 #. type: Plain text
817 #: build/C/man3/makecontext.3:100
818 msgid "Insufficient stack space left."
819 msgstr "スタックに割り当てる空間が残っていない。"
820
821 #. type: SH
822 #: build/C/man3/makecontext.3:100
823 #: build/C/man3/pthread_attr_setaffinity_np.3:106
824 #: build/C/man3/pthread_attr_setguardsize.3:104
825 #: build/C/man3/pthread_attr_setstack.3:110
826 #: build/C/man3/pthread_attr_setstackaddr.3:81
827 #: build/C/man3/pthread_attr_setstacksize.3:81
828 #: build/C/man3/pthread_getattr_np.3:96
829 #: build/C/man3/pthread_getcpuclockid.3:63
830 #: build/C/man3/pthread_setaffinity_np.3:119
831 #: build/C/man3/pthread_setconcurrency.3:81
832 #: build/C/man3/pthread_setname_np.3:100
833 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
834 #: build/C/man3/pthread_tryjoin_np.3:110
835 #, no-wrap
836 msgid "VERSIONS"
837 msgstr "バージョン"
838
839 #. type: Plain text
840 #: build/C/man3/makecontext.3:105
841 msgid ""
842 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
843 "2.1."
844 msgstr ""
845 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
846 "されている。"
847
848 #. type: Plain text
849 #: build/C/man3/makecontext.3:112
850 msgid "The B<makecontext>()  and B<swapcontext>()  functions are thread-safe."
851 msgstr "関数 B<makecontext>() と B<swapcontext>() はスレッドセーフである。"
852
853 #. type: Plain text
854 #: build/C/man3/makecontext.3:120
855 msgid ""
856 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
857 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
858 "recommending that applications be rewritten to use POSIX threads instead."
859 msgstr ""
860 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
861 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
862 "POSIX スレッドを使って書き直すことが 推奨されている。"
863
864 #. type: Plain text
865 #: build/C/man3/makecontext.3:128
866 msgid ""
867 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
868 "namely, this struct contains the start and length of a memory area to be "
869 "used as the stack, regardless of the direction of growth of the stack.  "
870 "Thus, it is not necessary for the user program to worry about this direction."
871 msgstr ""
872 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
873 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
874 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
875 "て、ユーザプログラムはこの件については心配しなくてよい。"
876
877 #. type: Plain text
878 #: build/C/man3/makecontext.3:144
879 msgid ""
880 "On architectures where I<int> and pointer types are the same size (e.g., "
881 "x86-32, where both types are 32 bits), you may be able to get away with "
882 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
883 "However, doing this is not guaranteed to be portable, is undefined according "
884 "to the standards, and won't work on architectures where pointers are larger "
885 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
886 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
887 "g., x86-64)."
888 msgstr ""
889 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
890 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
891 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
892 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
893 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
894 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
895 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
896 "できるようになっている。"
897
898 #. type: SH
899 #: build/C/man3/makecontext.3:144 build/C/man3/pthread_attr_init.3:87
900 #: build/C/man3/pthread_attr_setdetachstate.3:115
901 #: build/C/man3/pthread_attr_setguardsize.3:162
902 #: build/C/man3/pthread_attr_setinheritsched.3:135
903 #: build/C/man3/pthread_attr_setschedparam.3:113
904 #: build/C/man3/pthread_attr_setschedpolicy.3:109
905 #: build/C/man3/pthread_attr_setstack.3:159
906 #: build/C/man3/pthread_attr_setstacksize.3:115
907 #: build/C/man3/pthread_cancel.3:135 build/C/man3/pthread_cleanup_push.3:155
908 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
909 #: build/C/man3/pthread_getattr_np.3:101
910 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
911 #: build/C/man3/pthread_setaffinity_np.3:154
912 #: build/C/man3/pthread_setcancelstate.3:183
913 #: build/C/man3/pthread_setname_np.3:114
914 #: build/C/man3/pthread_setschedparam.3:156 build/C/man3/pthread_sigmask.3:78
915 #: build/C/man3/pthread_testcancel.3:65 build/C/man3/pthread_tryjoin_np.3:115
916 #, no-wrap
917 msgid "EXAMPLE"
918 msgstr "例"
919
920 #. type: Plain text
921 #: build/C/man3/makecontext.3:152
922 msgid ""
923 "The example program below demonstrates the use of B<getcontext>(3), "
924 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
925 "following output:"
926 msgstr ""
927 "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), "
928 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
929 "と、以下のような出力が得られる:"
930
931 #. type: Plain text
932 #: build/C/man3/makecontext.3:164
933 #, no-wrap
934 msgid ""
935 "$B< ./a.out>\n"
936 "main: swapcontext(&uctx_main, &uctx_func2)\n"
937 "func2: started\n"
938 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
939 "func1: started\n"
940 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
941 "func2: returning\n"
942 "func1: returning\n"
943 "main: exiting\n"
944 msgstr ""
945 "$B< ./a.out>\n"
946 "main: swapcontext(&uctx_main, &uctx_func2)\n"
947 "func2: started\n"
948 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
949 "func1: started\n"
950 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
951 "func2: returning\n"
952 "func1: returning\n"
953 "main: exiting\n"
954
955 #. type: SS
956 #: build/C/man3/makecontext.3:166 build/C/man3/pthread_attr_init.3:148
957 #: build/C/man3/pthread_cancel.3:151 build/C/man3/pthread_cleanup_push.3:231
958 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
959 #: build/C/man3/pthread_getcpuclockid.3:96
960 #: build/C/man3/pthread_setname_np.3:140
961 #: build/C/man3/pthread_setschedparam.3:231 build/C/man3/pthread_sigmask.3:96
962 #, no-wrap
963 msgid "Program source"
964 msgstr "プログラムのソース"
965
966 #. type: Plain text
967 #: build/C/man3/makecontext.3:172
968 #, no-wrap
969 msgid ""
970 "#include E<lt>ucontext.hE<gt>\n"
971 "#include E<lt>stdio.hE<gt>\n"
972 "#include E<lt>stdlib.hE<gt>\n"
973 msgstr ""
974 "#include E<lt>ucontext.hE<gt>\n"
975 "#include E<lt>stdio.hE<gt>\n"
976 "#include E<lt>stdlib.hE<gt>\n"
977
978 #. type: Plain text
979 #: build/C/man3/makecontext.3:174
980 #, no-wrap
981 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
982 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
983
984 #. type: Plain text
985 #: build/C/man3/makecontext.3:177
986 #, no-wrap
987 msgid ""
988 "#define handle_error(msg) \\e\n"
989 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
990 msgstr ""
991 "#define handle_error(msg) \\e\n"
992 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
993
994 #. type: Plain text
995 #: build/C/man3/makecontext.3:187
996 #, no-wrap
997 msgid ""
998 "static void\n"
999 "func1(void)\n"
1000 "{\n"
1001 "    printf(\"func1: started\\en\");\n"
1002 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
1003 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
1004 "        handle_error(\"swapcontext\");\n"
1005 "    printf(\"func1: returning\\en\");\n"
1006 "}\n"
1007 msgstr ""
1008 "static void\n"
1009 "func1(void)\n"
1010 "{\n"
1011 "    printf(\"func1: started\\en\");\n"
1012 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
1013 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
1014 "        handle_error(\"swapcontext\");\n"
1015 "    printf(\"func1: returning\\en\");\n"
1016 "}\n"
1017
1018 #. type: Plain text
1019 #: build/C/man3/makecontext.3:197
1020 #, no-wrap
1021 msgid ""
1022 "static void\n"
1023 "func2(void)\n"
1024 "{\n"
1025 "    printf(\"func2: started\\en\");\n"
1026 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
1027 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
1028 "        handle_error(\"swapcontext\");\n"
1029 "    printf(\"func2: returning\\en\");\n"
1030 "}\n"
1031 msgstr ""
1032 "static void\n"
1033 "func2(void)\n"
1034 "{\n"
1035 "    printf(\"func2: started\\en\");\n"
1036 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
1037 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
1038 "        handle_error(\"swapcontext\");\n"
1039 "    printf(\"func2: returning\\en\");\n"
1040 "}\n"
1041
1042 #. type: Plain text
1043 #: build/C/man3/makecontext.3:203
1044 #, no-wrap
1045 msgid ""
1046 "int\n"
1047 "main(int argc, char *argv[])\n"
1048 "{\n"
1049 "    char func1_stack[16384];\n"
1050 "    char func2_stack[16384];\n"
1051 msgstr ""
1052 "int\n"
1053 "main(int argc, char *argv[])\n"
1054 "{\n"
1055 "    char func1_stack[16384];\n"
1056 "    char func2_stack[16384];\n"
1057
1058 #. type: Plain text
1059 #: build/C/man3/makecontext.3:210
1060 #, no-wrap
1061 msgid ""
1062 "    if (getcontext(&uctx_func1) == -1)\n"
1063 "        handle_error(\"getcontext\");\n"
1064 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1065 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1066 "    uctx_func1.uc_link = &uctx_main;\n"
1067 "    makecontext(&uctx_func1, func1, 0);\n"
1068 msgstr ""
1069 "    if (getcontext(&uctx_func1) == -1)\n"
1070 "        handle_error(\"getcontext\");\n"
1071 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1072 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1073 "    uctx_func1.uc_link = &uctx_main;\n"
1074 "    makecontext(&uctx_func1, func1, 0);\n"
1075
1076 #. type: Plain text
1077 #: build/C/man3/makecontext.3:218
1078 #, no-wrap
1079 msgid ""
1080 "    if (getcontext(&uctx_func2) == -1)\n"
1081 "        handle_error(\"getcontext\");\n"
1082 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1083 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1084 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1085 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1086 "    makecontext(&uctx_func2, func2, 0);\n"
1087 msgstr ""
1088 "    if (getcontext(&uctx_func2) == -1)\n"
1089 "        handle_error(\"getcontext\");\n"
1090 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1091 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1092 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1093 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1094 "    makecontext(&uctx_func2, func2, 0);\n"
1095
1096 #. type: Plain text
1097 #: build/C/man3/makecontext.3:222
1098 #, no-wrap
1099 msgid ""
1100 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1101 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1102 "        handle_error(\"swapcontext\");\n"
1103 msgstr ""
1104 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1105 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1106 "        handle_error(\"swapcontext\");\n"
1107
1108 #. type: Plain text
1109 #: build/C/man3/makecontext.3:226
1110 #, no-wrap
1111 msgid ""
1112 "    printf(\"main: exiting\\en\");\n"
1113 "    exit(EXIT_SUCCESS);\n"
1114 "}\n"
1115 msgstr ""
1116 "    printf(\"main: exiting\\en\");\n"
1117 "    exit(EXIT_SUCCESS);\n"
1118 "}\n"
1119
1120 #. type: Plain text
1121 #: build/C/man3/makecontext.3:233
1122 msgid ""
1123 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1124 "B<sigsetjmp>(3)"
1125 msgstr ""
1126 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1127 "B<sigsetjmp>(3)"
1128
1129 #. type: TH
1130 #: build/C/man3/pthread_attr_init.3:26
1131 #, no-wrap
1132 msgid "PTHREAD_ATTR_INIT"
1133 msgstr "PTHREAD_ATTR_INIT"
1134
1135 #. type: TH
1136 #: build/C/man3/pthread_attr_init.3:26
1137 #, no-wrap
1138 msgid "2008-11-11"
1139 msgstr "2008-11-11"
1140
1141 #. type: Plain text
1142 #: build/C/man3/pthread_attr_init.3:30
1143 msgid ""
1144 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1145 "attributes object"
1146 msgstr ""
1147 "pthread_attr_init, pthread_attr_destroy - \n"
1148 "スレッド属性オブジェクトの初期化と破棄を行う"
1149
1150 #. type: Plain text
1151 #: build/C/man3/pthread_attr_init.3:33
1152 #: build/C/man3/pthread_attr_setdetachstate.3:33
1153 #: build/C/man3/pthread_attr_setguardsize.3:33
1154 #: build/C/man3/pthread_attr_setinheritsched.3:33
1155 #: build/C/man3/pthread_attr_setschedparam.3:33
1156 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1157 #: build/C/man3/pthread_attr_setscope.3:33
1158 #: build/C/man3/pthread_attr_setstack.3:33
1159 #: build/C/man3/pthread_attr_setstackaddr.3:33
1160 #: build/C/man3/pthread_attr_setstacksize.3:33
1161 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1162 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1163 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1164 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1165 #: build/C/man3/pthread_join.3:32
1166 #: build/C/man3/pthread_kill_other_threads_np.3:32
1167 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1168 #: build/C/man3/pthread_setconcurrency.3:32
1169 #: build/C/man3/pthread_setschedparam.3:33
1170 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1171 #: build/C/man3/pthread_testcancel.3:32
1172 #, no-wrap
1173 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1174 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1175
1176 #. type: Plain text
1177 #: build/C/man3/pthread_attr_init.3:36
1178 #, no-wrap
1179 msgid ""
1180 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1181 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1182 msgstr ""
1183 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1184 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1185
1186 #. type: Plain text
1187 #: build/C/man3/pthread_attr_init.3:38
1188 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1189 #: build/C/man3/pthread_attr_setdetachstate.3:40
1190 #: build/C/man3/pthread_attr_setguardsize.3:40
1191 #: build/C/man3/pthread_attr_setinheritsched.3:40
1192 #: build/C/man3/pthread_attr_setschedparam.3:40
1193 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1194 #: build/C/man3/pthread_attr_setscope.3:40
1195 #: build/C/man3/pthread_attr_setstack.3:40
1196 #: build/C/man3/pthread_attr_setstackaddr.3:40
1197 #: build/C/man3/pthread_attr_setstacksize.3:40
1198 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1199 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1200 #: build/C/man3/pthread_getattr_np.3:37
1201 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1202 #: build/C/man3/pthread_setaffinity_np.3:41
1203 #: build/C/man3/pthread_setcancelstate.3:38
1204 #: build/C/man3/pthread_setconcurrency.3:37
1205 #: build/C/man3/pthread_setschedparam.3:40
1206 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1207 #, no-wrap
1208 msgid "Compile and link with I<-pthread>.\n"
1209 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1210
1211 #. type: Plain text
1212 #: build/C/man3/pthread_attr_init.3:50
1213 msgid ""
1214 "The B<pthread_attr_init>()  function initializes the thread attributes "
1215 "object pointed to by I<attr> with default attribute values.  After this "
1216 "call, individual attributes of the object can be set using various related "
1217 "functions (listed under SEE ALSO), and then the object can be used in one or "
1218 "more B<pthread_create>(3)  calls that create threads."
1219 msgstr ""
1220 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1221 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1222 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1223 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1224 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1225 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1226
1227 #. type: Plain text
1228 #: build/C/man3/pthread_attr_init.3:55
1229 msgid ""
1230 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1231 "already been initialized results in undefined behavior."
1232 msgstr ""
1233 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1234 "B<pthread_attr_init>() を呼び出した場合、\n"
1235 "どのような動作になるかは不定である。"
1236
1237 #. type: Plain text
1238 #: build/C/man3/pthread_attr_init.3:62
1239 msgid ""
1240 "When a thread attributes object is no longer required, it should be "
1241 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1242 "thread attributes object has no effect on threads that were created using "
1243 "that object."
1244 msgstr ""
1245 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1246 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1247 "スレッド属性オブジェクトを破棄しても、\n"
1248 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1249
1250 #. type: Plain text
1251 #: build/C/man3/pthread_attr_init.3:68
1252 msgid ""
1253 "Once a thread attributes object has been destroyed, it can be reinitialized "
1254 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1255 "attributes object has undefined results."
1256 msgstr ""
1257 "いったん破棄したスレッド属性オブジェクトは、\n"
1258 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1259 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1260 "使った場合の結果は不定である。"
1261
1262 #. type: Plain text
1263 #: build/C/man3/pthread_attr_init.3:71
1264 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1265 #: build/C/man3/pthread_attr_setdetachstate.3:80
1266 #: build/C/man3/pthread_attr_setguardsize.3:93
1267 #: build/C/man3/pthread_attr_setinheritsched.3:96
1268 #: build/C/man3/pthread_attr_setschedparam.3:88
1269 #: build/C/man3/pthread_attr_setschedpolicy.3:86
1270 #: build/C/man3/pthread_attr_setscope.3:106
1271 #: build/C/man3/pthread_attr_setstack.3:88
1272 #: build/C/man3/pthread_attr_setstackaddr.3:77
1273 #: build/C/man3/pthread_attr_setstacksize.3:64
1274 #: build/C/man3/pthread_setaffinity_np.3:80
1275 #: build/C/man3/pthread_setcancelstate.3:95
1276 #: build/C/man3/pthread_setname_np.3:75
1277 msgid ""
1278 "On success, these functions return 0; on error, they return a nonzero error "
1279 "number."
1280 msgstr ""
1281 "成功すると、これらの関数は 0 を返す。\n"
1282 "エラーの場合、0 以外のエラー番号を返す。"
1283
1284 #. type: Plain text
1285 #: build/C/man3/pthread_attr_init.3:79
1286 msgid ""
1287 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1288 "Linux these functions always succeed (but portable and future-proof "
1289 "applications should nevertheless handle a possible error return)."
1290 msgstr ""
1291 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1292 "記載されている。\n"
1293 "Linux では、これらの関数は常に成功する\n"
1294 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1295 "正のエラーの返り値を処理するようにすべきである)。"
1296
1297 #. type: Plain text
1298 #: build/C/man3/pthread_attr_init.3:81
1299 #: build/C/man3/pthread_attr_setdetachstate.3:96
1300 #: build/C/man3/pthread_attr_setguardsize.3:115
1301 #: build/C/man3/pthread_attr_setinheritsched.3:119
1302 #: build/C/man3/pthread_attr_setschedparam.3:109
1303 #: build/C/man3/pthread_attr_setschedpolicy.3:109
1304 #: build/C/man3/pthread_attr_setscope.3:128
1305 #: build/C/man3/pthread_attr_setstack.3:121
1306 #: build/C/man3/pthread_attr_setstacksize.3:92
1307 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
1308 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1309 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1310 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1311 #: build/C/man3/pthread_self.3:57 build/C/man3/pthread_setcancelstate.3:122
1312 #: build/C/man3/pthread_setconcurrency.3:85
1313 #: build/C/man3/pthread_setschedparam.3:150
1314 #: build/C/man3/pthread_setschedprio.3:90 build/C/man3/pthread_sigmask.3:76
1315 #: build/C/man3/pthread_testcancel.3:65
1316 msgid "POSIX.1-2001."
1317 msgstr "POSIX.1-2001."
1318
1319 #. type: Plain text
1320 #: build/C/man3/pthread_attr_init.3:87
1321 msgid ""
1322 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1323 "object other than via pthreads functions is nonportable and produces "
1324 "undefined results."
1325 msgstr ""
1326 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1327 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1328 "どのような結果が得られるかも分からない。"
1329
1330 #. type: Plain text
1331 #: build/C/man3/pthread_attr_init.3:96
1332 msgid ""
1333 "The program below optionally makes use of B<pthread_attr_init>()  and "
1334 "various related functions to initialize a thread attributes object that is "
1335 "used to create a single thread.  Once created, the thread uses the "
1336 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1337 "the thread's attributes, and then displays those attributes."
1338 msgstr ""
1339 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1340 "スレッド属性オブジェクトの初期化を行い、\n"
1341 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1342 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1343 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1344 "取得した属性を表示する。"
1345
1346 #. type: Plain text
1347 #: build/C/man3/pthread_attr_init.3:105
1348 msgid ""
1349 "If the program is run with no command-line argument, then it passes NULL as "
1350 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1351 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1352 "threading implementation, we see the following:"
1353 msgstr ""
1354 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1355 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1356 "この場合、スレッドはデフォルトの属性で作成される。\n"
1357 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1358 "動作させると、以下のような出力が得られる。"
1359
1360 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1361 #. type: Plain text
1362 #: build/C/man3/pthread_attr_init.3:121
1363 #, no-wrap
1364 msgid ""
1365 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1366 "unlimited\n"
1367 "$B< ./a.out>\n"
1368 "Thread attributes:\n"
1369 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1370 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1371 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1372 "        Scheduling policy   = SCHED_OTHER\n"
1373 "        Scheduling priority = 0\n"
1374 "        Guard size          = 4096 bytes\n"
1375 "        Stack address       = 0x40196000\n"
1376 "        Stack size          = 0x201000 bytes\n"
1377 msgstr ""
1378 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1379 "unlimited\n"
1380 "$B< ./a.out>\n"
1381 "Thread attributes:\n"
1382 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1383 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1384 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1385 "        Scheduling policy   = SCHED_OTHER\n"
1386 "        Scheduling priority = 0\n"
1387 "        Guard size          = 4096 bytes\n"
1388 "        Stack address       = 0x40196000\n"
1389 "        Stack size          = 0x201000 bytes\n"
1390
1391 #. type: Plain text
1392 #: build/C/man3/pthread_attr_init.3:131
1393 msgid ""
1394 "When we supply a stack size as a command-line argument, the program "
1395 "initializes a thread attributes object, sets various attributes in that "
1396 "object, and passes a pointer to the object in the call to "
1397 "B<pthread_create>(3).  Running the program on Linux/x86-32 with the NPTL "
1398 "threading implementation, we see the following:"
1399 msgstr ""
1400 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1401 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1402 "そのオブジェクトの各種属性を設定し、\n"
1403 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1404 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1405 "動作させると、以下のような出力が得られる。"
1406
1407 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1408 #. type: Plain text
1409 #: build/C/man3/pthread_attr_init.3:146
1410 #, no-wrap
1411 msgid ""
1412 "$B< ./a.out 0x3000000>\n"
1413 "posix_memalign() allocated at 0x40197000\n"
1414 "Thread attributes:\n"
1415 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1416 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1417 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1418 "        Scheduling policy   = SCHED_OTHER\n"
1419 "        Scheduling priority = 0\n"
1420 "        Guard size          = 0 bytes\n"
1421 "        Stack address       = 0x40197000\n"
1422 "        Stack size          = 0x3000000 bytes\n"
1423 msgstr ""
1424 "$B< ./a.out 0x3000000>\n"
1425 "posix_memalign() allocated at 0x40197000\n"
1426 "Thread attributes:\n"
1427 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1428 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1429 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1430 "        Scheduling policy   = SCHED_OTHER\n"
1431 "        Scheduling priority = 0\n"
1432 "        Guard size          = 0 bytes\n"
1433 "        Stack address       = 0x40197000\n"
1434 "        Stack size          = 0x3000000 bytes\n"
1435
1436 #. type: Plain text
1437 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1438 #, no-wrap
1439 msgid ""
1440 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1441 "#include E<lt>pthread.hE<gt>\n"
1442 "#include E<lt>stdio.hE<gt>\n"
1443 "#include E<lt>stdlib.hE<gt>\n"
1444 "#include E<lt>unistd.hE<gt>\n"
1445 "#include E<lt>errno.hE<gt>\n"
1446 msgstr ""
1447 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1448 "#include E<lt>pthread.hE<gt>\n"
1449 "#include E<lt>stdio.hE<gt>\n"
1450 "#include E<lt>stdlib.hE<gt>\n"
1451 "#include E<lt>unistd.hE<gt>\n"
1452 "#include E<lt>errno.hE<gt>\n"
1453
1454 #. type: Plain text
1455 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:162
1456 #: build/C/man3/pthread_cleanup_push.3:243 build/C/man3/pthread_create.3:254
1457 #: build/C/man3/pthread_getattr_np.3:191
1458 #: build/C/man3/pthread_getcpuclockid.3:114
1459 #: build/C/man3/pthread_setaffinity_np.3:172
1460 #: build/C/man3/pthread_setschedparam.3:244 build/C/man3/pthread_sigmask.3:110
1461 #, no-wrap
1462 msgid ""
1463 "#define handle_error_en(en, msg) \\e\n"
1464 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1465 msgstr ""
1466 "#define handle_error_en(en, msg) \\e\n"
1467 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1468
1469 #. type: Plain text
1470 #: build/C/man3/pthread_attr_init.3:168
1471 #, no-wrap
1472 msgid ""
1473 "static void\n"
1474 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1475 "{\n"
1476 "    int s, i;\n"
1477 "    size_t v;\n"
1478 "    void *stkaddr;\n"
1479 "    struct sched_param sp;\n"
1480 msgstr ""
1481 "static void\n"
1482 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1483 "{\n"
1484 "    int s, i;\n"
1485 "    size_t v;\n"
1486 "    void *stkaddr;\n"
1487 "    struct sched_param sp;\n"
1488
1489 #. type: Plain text
1490 #: build/C/man3/pthread_attr_init.3:176
1491 #, no-wrap
1492 msgid ""
1493 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1494 "    if (s != 0)\n"
1495 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1496 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1497 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1498 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1499 "            \"???\");\n"
1500 msgstr ""
1501 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1502 "    if (s != 0)\n"
1503 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1504 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1505 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1506 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1507 "            \"???\");\n"
1508
1509 #. type: Plain text
1510 #: build/C/man3/pthread_attr_init.3:184
1511 #, no-wrap
1512 msgid ""
1513 "    s = pthread_attr_getscope(attr, &i);\n"
1514 "    if (s != 0)\n"
1515 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1516 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1517 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1518 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1519 "            \"???\");\n"
1520 msgstr ""
1521 "    s = pthread_attr_getscope(attr, &i);\n"
1522 "    if (s != 0)\n"
1523 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1524 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1525 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1526 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1527 "            \"???\");\n"
1528
1529 #. type: Plain text
1530 #: build/C/man3/pthread_attr_init.3:192
1531 #, no-wrap
1532 msgid ""
1533 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1534 "    if (s != 0)\n"
1535 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1536 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1537 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1538 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1539 "            \"???\");\n"
1540 msgstr ""
1541 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1542 "    if (s != 0)\n"
1543 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1544 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1545 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1546 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1547 "            \"???\");\n"
1548
1549 #. type: Plain text
1550 #: build/C/man3/pthread_attr_init.3:201
1551 #, no-wrap
1552 msgid ""
1553 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1554 "    if (s != 0)\n"
1555 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1556 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1557 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1558 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1559 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1560 "            \"???\");\n"
1561 msgstr ""
1562 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1563 "    if (s != 0)\n"
1564 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1565 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1566 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1567 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1568 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1569 "            \"???\");\n"
1570
1571 #. type: Plain text
1572 #: build/C/man3/pthread_attr_init.3:206
1573 #, no-wrap
1574 msgid ""
1575 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1576 "    if (s != 0)\n"
1577 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1578 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1579 msgstr ""
1580 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1581 "    if (s != 0)\n"
1582 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1583 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1584
1585 #. type: Plain text
1586 #: build/C/man3/pthread_attr_init.3:211
1587 #, no-wrap
1588 msgid ""
1589 "    s = pthread_attr_getguardsize(attr, &v);\n"
1590 "    if (s != 0)\n"
1591 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1592 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1593 msgstr ""
1594 "    s = pthread_attr_getguardsize(attr, &v);\n"
1595 "    if (s != 0)\n"
1596 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1597 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1598
1599 #. type: Plain text
1600 #: build/C/man3/pthread_attr_init.3:218
1601 #, no-wrap
1602 msgid ""
1603 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1604 "    if (s != 0)\n"
1605 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1606 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1607 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1608 "}\n"
1609 msgstr ""
1610 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1611 "    if (s != 0)\n"
1612 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1613 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1614 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1615 "}\n"
1616
1617 #. type: Plain text
1618 #: build/C/man3/pthread_attr_init.3:224
1619 #, no-wrap
1620 msgid ""
1621 "static void *\n"
1622 "thread_start(void *arg)\n"
1623 "{\n"
1624 "    int s;\n"
1625 "    pthread_attr_t gattr;\n"
1626 msgstr ""
1627 "static void *\n"
1628 "thread_start(void *arg)\n"
1629 "{\n"
1630 "    int s;\n"
1631 "    pthread_attr_t gattr;\n"
1632
1633 #. type: Plain text
1634 #: build/C/man3/pthread_attr_init.3:228
1635 #, no-wrap
1636 msgid ""
1637 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1638 "       retrieves the attributes of the thread specified in its\n"
1639 "       first argument */\n"
1640 msgstr ""
1641 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1642 "       retrieves the attributes of the thread specified in its\n"
1643 "       first argument */\n"
1644
1645 #. type: Plain text
1646 #: build/C/man3/pthread_attr_init.3:232
1647 #, no-wrap
1648 msgid ""
1649 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1650 "    if (s != 0)\n"
1651 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1652 msgstr ""
1653 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1654 "    if (s != 0)\n"
1655 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1656
1657 #. type: Plain text
1658 #: build/C/man3/pthread_attr_init.3:235
1659 #, no-wrap
1660 msgid ""
1661 "    printf(\"Thread attributes:\\en\");\n"
1662 "    display_pthread_attr(&gattr, \"\\et\");\n"
1663 msgstr ""
1664 "    printf(\"Thread attributes:\\en\");\n"
1665 "    display_pthread_attr(&gattr, \"\\et\");\n"
1666
1667 #. type: Plain text
1668 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1669 #, no-wrap
1670 msgid ""
1671 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1672 "}\n"
1673 msgstr ""
1674 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1675 "}\n"
1676
1677 #. type: Plain text
1678 #: build/C/man3/pthread_attr_init.3:246
1679 #, no-wrap
1680 msgid ""
1681 "int\n"
1682 "main(int argc, char *argv[])\n"
1683 "{\n"
1684 "    pthread_t thr;\n"
1685 "    pthread_attr_t attr;\n"
1686 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1687 "    int s;\n"
1688 msgstr ""
1689 "int\n"
1690 "main(int argc, char *argv[])\n"
1691 "{\n"
1692 "    pthread_t thr;\n"
1693 "    pthread_attr_t attr;\n"
1694 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1695 "    int s;\n"
1696
1697 #. type: Plain text
1698 #: build/C/man3/pthread_attr_init.3:248
1699 #: build/C/man3/pthread_setschedparam.3:362
1700 #, no-wrap
1701 msgid "    attrp = NULL;\n"
1702 msgstr "    attrp = NULL;\n"
1703
1704 #. type: Plain text
1705 #: build/C/man3/pthread_attr_init.3:252
1706 #, no-wrap
1707 msgid ""
1708 "    /* If a command-line argument was supplied, use it to set the\n"
1709 "       stack-size attribute and set a few other thread attributes,\n"
1710 "       and set attrp pointing to thread attributes object */\n"
1711 msgstr ""
1712 "    /* If a command-line argument was supplied, use it to set the\n"
1713 "       stack-size attribute and set a few other thread attributes,\n"
1714 "       and set attrp pointing to thread attributes object */\n"
1715
1716 #. type: Plain text
1717 #: build/C/man3/pthread_attr_init.3:256
1718 #, no-wrap
1719 msgid ""
1720 "    if (argc E<gt> 1) {\n"
1721 "        int stack_size;\n"
1722 "        void *sp;\n"
1723 msgstr ""
1724 "    if (argc E<gt> 1) {\n"
1725 "        int stack_size;\n"
1726 "        void *sp;\n"
1727
1728 #. type: Plain text
1729 #: build/C/man3/pthread_attr_init.3:258
1730 #, no-wrap
1731 msgid "        attrp = &attr;\n"
1732 msgstr "        attrp = &attr;\n"
1733
1734 #. type: Plain text
1735 #: build/C/man3/pthread_attr_init.3:262
1736 #, no-wrap
1737 msgid ""
1738 "        s = pthread_attr_init(&attr);\n"
1739 "        if (s != 0)\n"
1740 "            handle_error_en(s, \"pthread_attr_init\");\n"
1741 msgstr ""
1742 "        s = pthread_attr_init(&attr);\n"
1743 "        if (s != 0)\n"
1744 "            handle_error_en(s, \"pthread_attr_init\");\n"
1745
1746 #. type: Plain text
1747 #: build/C/man3/pthread_attr_init.3:266
1748 #, no-wrap
1749 msgid ""
1750 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1751 "        if (s != 0)\n"
1752 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1753 msgstr ""
1754 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1755 "        if (s != 0)\n"
1756 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1757
1758 #. type: Plain text
1759 #: build/C/man3/pthread_attr_init.3:270
1760 #, no-wrap
1761 msgid ""
1762 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1763 "        if (s != 0)\n"
1764 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1765 msgstr ""
1766 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1767 "        if (s != 0)\n"
1768 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1769
1770 #. type: Plain text
1771 #: build/C/man3/pthread_attr_init.3:272
1772 #, no-wrap
1773 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1774 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1775
1776 #. type: Plain text
1777 #: build/C/man3/pthread_attr_init.3:276
1778 #, no-wrap
1779 msgid ""
1780 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1781 "        if (s != 0)\n"
1782 "            handle_error_en(s, \"posix_memalign\");\n"
1783 msgstr ""
1784 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1785 "        if (s != 0)\n"
1786 "            handle_error_en(s, \"posix_memalign\");\n"
1787
1788 #. type: Plain text
1789 #: build/C/man3/pthread_attr_init.3:278
1790 #, no-wrap
1791 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1792 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1793
1794 #. type: Plain text
1795 #: build/C/man3/pthread_attr_init.3:283
1796 #, no-wrap
1797 msgid ""
1798 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1799 "        if (s != 0)\n"
1800 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1801 "    }\n"
1802 msgstr ""
1803 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1804 "        if (s != 0)\n"
1805 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1806 "    }\n"
1807
1808 #. type: Plain text
1809 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1810 #, no-wrap
1811 msgid ""
1812 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1813 "    if (s != 0)\n"
1814 "        handle_error_en(s, \"pthread_create\");\n"
1815 msgstr ""
1816 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1817 "    if (s != 0)\n"
1818 "        handle_error_en(s, \"pthread_create\");\n"
1819
1820 #. type: Plain text
1821 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1822 #, no-wrap
1823 msgid ""
1824 "    if (attrp != NULL) {\n"
1825 "        s = pthread_attr_destroy(attrp);\n"
1826 "        if (s != 0)\n"
1827 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1828 "    }\n"
1829 msgstr ""
1830 "    if (attrp != NULL) {\n"
1831 "        s = pthread_attr_destroy(attrp);\n"
1832 "        if (s != 0)\n"
1833 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1834 "    }\n"
1835
1836 #. type: Plain text
1837 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1838 #, no-wrap
1839 msgid ""
1840 "    pause();    /* Terminates when other thread calls exit() */\n"
1841 "}\n"
1842 msgstr ""
1843 "    pause();    /* Terminates when other thread calls exit() */\n"
1844 "}\n"
1845
1846 #. type: Plain text
1847 #: build/C/man3/pthread_attr_init.3:313
1848 msgid ""
1849 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1850 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1851 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1852 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1853 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1854 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1855 msgstr ""
1856 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1857 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1858 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1859 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1860 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1861 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1862
1863 #. type: TH
1864 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1865 #, no-wrap
1866 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1867 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1868
1869 #. type: TH
1870 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1871 #: build/C/man3/pthread_getattr_np.3:26 build/C/man3/pthread_tryjoin_np.3:26
1872 #, no-wrap
1873 msgid "2010-09-10"
1874 msgstr "2010-09-10"
1875
1876 #. type: Plain text
1877 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1878 msgid ""
1879 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1880 "affinity attribute in thread attributes object"
1881 msgstr ""
1882 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1883 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1884
1885 #. type: Plain text
1886 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1887 #: build/C/man3/pthread_getattr_np.3:33
1888 #: build/C/man3/pthread_setaffinity_np.3:34
1889 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1890 #, no-wrap
1891 msgid ""
1892 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1893 "B<#include E<lt>pthread.hE<gt>>\n"
1894 msgstr ""
1895 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1896 "B<#include E<lt>pthread.hE<gt>>\n"
1897
1898 #. type: Plain text
1899 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1900 #, no-wrap
1901 msgid ""
1902 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1903 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1904 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1905 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1906 msgstr ""
1907 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1908 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1909 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1910 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1911
1912 #. type: Plain text
1913 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1914 msgid ""
1915 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1916 "attribute of the thread attributes object referred to by I<attr> to the "
1917 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1918 "mask of a thread created using the thread attributes object I<attr>."
1919 msgstr ""
1920 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1921 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1922 "I<cpuset> で指定された値に設定する。\n"
1923 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1924 "作成されたスレッドの CPU affinity マスクが決定される。"
1925
1926 #. type: Plain text
1927 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1928 msgid ""
1929 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1930 "attribute of the thread attributes object referred to by I<attr> in the "
1931 "buffer pointed to by I<cpuset>."
1932 msgstr ""
1933 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1934 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1935 "I<cpuset> が指すバッファに入れて返す。"
1936
1937 #. type: Plain text
1938 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1939 msgid ""
1940 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1941 "by I<cpuset>.  Typically, this argument would be specified as "
1942 "I<sizeof(cpu_set_t)>."
1943 msgstr ""
1944 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1945 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1946 "指定することだろう。"
1947
1948 #. type: Plain text
1949 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1950 #: build/C/man3/pthread_setaffinity_np.3:67
1951 msgid ""
1952 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1953 "description of a set of macros that can be used to manipulate and inspect "
1954 "CPU sets, see B<CPU_SET>(3)."
1955 msgstr ""
1956 "CPU affinity マスクの詳細については、 \n"
1957 "B<sched_setaffinity>(2) を参照してほしい。\n"
1958 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1959 "B<CPU_SET>(3) を参照してほしい。"
1960
1961 #. type: TP
1962 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1963 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1964 #: build/C/man3/pthread_attr_setdetachstate.3:83
1965 #: build/C/man3/pthread_attr_setinheritsched.3:99
1966 #: build/C/man3/pthread_attr_setschedpolicy.3:89
1967 #: build/C/man3/pthread_attr_setscope.3:109
1968 #: build/C/man3/pthread_attr_setstack.3:91
1969 #: build/C/man3/pthread_attr_setstacksize.3:67
1970 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1971 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1972 #: build/C/man3/pthread_kill.3:69 build/C/man3/pthread_setaffinity_np.3:84
1973 #: build/C/man3/pthread_setaffinity_np.3:93
1974 #: build/C/man3/pthread_setaffinity_np.3:109
1975 #: build/C/man3/pthread_setcancelstate.3:99
1976 #: build/C/man3/pthread_setcancelstate.3:107
1977 #: build/C/man3/pthread_setconcurrency.3:71
1978 #: build/C/man3/pthread_setschedparam.3:122
1979 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1980 #, no-wrap
1981 msgid "B<EINVAL>"
1982 msgstr "B<EINVAL>"
1983
1984 #.  cpumask_t
1985 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1986 #.  of the cpumask_t type.
1987 #. type: Plain text
1988 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1989 msgid ""
1990 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1991 "outside the set supported by the kernel.  (The kernel configuration option "
1992 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1993 "type used to represent CPU sets.)"
1994 msgstr ""
1995 "(B<pthread_attr_setaffinity_np>())\n"
1996 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1997 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1998 "は、\n"
1999 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
2000
2001 #. type: Plain text
2002 #: build/C/man3/pthread_attr_setaffinity_np.3:102
2003 msgid ""
2004 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
2005 "attributes object referred to by I<attr> lies outside the range specified by "
2006 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
2007 msgstr ""
2008 "(B<pthread_attr_getaffinity_np>())\n"
2009 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
2010 "I<cpusetsize> により指定された範囲の中になかった\n"
2011 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
2012
2013 #. type: Plain text
2014 #: build/C/man3/pthread_attr_setaffinity_np.3:106
2015 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
2016 msgstr ""
2017 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
2018
2019 #. type: Plain text
2020 #: build/C/man3/pthread_attr_setaffinity_np.3:108
2021 #: build/C/man3/pthread_setaffinity_np.3:121
2022 msgid "These functions are provided by glibc since version 2.3.4."
2023 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
2024
2025 #. type: Plain text
2026 #: build/C/man3/pthread_attr_setaffinity_np.3:111
2027 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
2028 #: build/C/man3/pthread_setaffinity_np.3:124
2029 #: build/C/man3/pthread_tryjoin_np.3:115
2030 msgid ""
2031 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
2032 "\" (nonportable) in the names."
2033 msgstr ""
2034 "これらの関数は非標準の GNU による拡張である。\n"
2035 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
2036 "付いている。"
2037
2038 #. type: Plain text
2039 #: build/C/man3/pthread_attr_setaffinity_np.3:118
2040 #: build/C/man3/pthread_setaffinity_np.3:150
2041 msgid ""
2042 "In glibc 2.3.3 only, versions of these functions were provided that did not "
2043 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
2044 "underlying system calls was always I<sizeof(cpu_set_t)>."
2045 msgstr ""
2046 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
2047 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
2048 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
2049 "常に I<sizeof(cpu_set_t)> であった。"
2050
2051 #. type: Plain text
2052 #: build/C/man3/pthread_attr_setaffinity_np.3:124
2053 msgid ""
2054 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), "
2055 "B<pthread_setaffinity_np>(3), B<cpuset>(7), B<pthreads>(7)"
2056 msgstr ""
2057 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), "
2058 "B<pthread_setaffinity_np>(3), B<cpuset>(7), B<pthreads>(7)"
2059
2060 #. type: TH
2061 #: build/C/man3/pthread_attr_setdetachstate.3:26
2062 #, no-wrap
2063 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2064 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2065
2066 #. type: Plain text
2067 #: build/C/man3/pthread_attr_setdetachstate.3:30
2068 msgid ""
2069 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2070 "state attribute in thread attributes object"
2071 msgstr ""
2072 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2073 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2074
2075 #. type: Plain text
2076 #: build/C/man3/pthread_attr_setdetachstate.3:38
2077 #, no-wrap
2078 msgid ""
2079 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2080 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2081 msgstr ""
2082 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2083 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2084
2085 #. type: Plain text
2086 #: build/C/man3/pthread_attr_setdetachstate.3:53
2087 msgid ""
2088 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2089 "attribute of the thread attributes object referred to by I<attr> to the "
2090 "value specified in I<detachstate>.  The detach state attribute determines "
2091 "whether a thread created using the thread attributes object I<attr> will be "
2092 "created in a joinable or a detached state."
2093 msgstr ""
2094 "B<pthread_attr_setdetachstate>() 関数は、\n"
2095 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2096 "I<detachstate> で指定された値に設定する。\n"
2097 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2098 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2099 "detached (切り離された) 状態で作成されるかが決定される。"
2100
2101 #. type: Plain text
2102 #: build/C/man3/pthread_attr_setdetachstate.3:56
2103 msgid "The following values may be specified in I<detachstate>:"
2104 msgstr "I<detachstate> には以下の値を指定できる。"
2105
2106 #. type: TP
2107 #: build/C/man3/pthread_attr_setdetachstate.3:56
2108 #, no-wrap
2109 msgid "B<PTHREAD_CREATE_DETACHED>"
2110 msgstr "B<PTHREAD_CREATE_DETACHED>"
2111
2112 #. type: Plain text
2113 #: build/C/man3/pthread_attr_setdetachstate.3:61
2114 msgid ""
2115 "Threads that are created using I<attr> will be created in a detached state."
2116 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2117
2118 #. type: TP
2119 #: build/C/man3/pthread_attr_setdetachstate.3:61
2120 #, no-wrap
2121 msgid "B<PTHREAD_CREATE_JOINABLE>"
2122 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2123
2124 #. type: Plain text
2125 #: build/C/man3/pthread_attr_setdetachstate.3:66
2126 msgid ""
2127 "Threads that are created using I<attr> will be created in a joinable state."
2128 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2129
2130 #. type: Plain text
2131 #: build/C/man3/pthread_attr_setdetachstate.3:70
2132 msgid ""
2133 "The default setting of the detach state attribute in a newly initialized "
2134 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2135 msgstr ""
2136 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2137 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2138
2139 #. type: Plain text
2140 #: build/C/man3/pthread_attr_setdetachstate.3:77
2141 msgid ""
2142 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2143 "the thread attributes object I<attr> in the buffer pointed to by "
2144 "I<detachstate>."
2145 msgstr ""
2146 "B<pthread_attr_getdetachstate>() は、\n"
2147 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2148 "I<detachstate> が指すバッファに入れて返す。"
2149
2150 #. type: Plain text
2151 #: build/C/man3/pthread_attr_setdetachstate.3:83
2152 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2153 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2154
2155 #. type: Plain text
2156 #: build/C/man3/pthread_attr_setdetachstate.3:87
2157 msgid "An invalid value was specified in I<detachstate>."
2158 msgstr "無効な値が I<detachstate> で指定された。"
2159
2160 #. type: Plain text
2161 #: build/C/man3/pthread_attr_setdetachstate.3:94
2162 msgid ""
2163 "The B<pthread_attr_setdetachstate>()  and B<pthread_attr_getdetachstate>()  "
2164 "functions are thread-safe."
2165 msgstr ""
2166 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
2167 "スレッドセーフである。"
2168
2169 #. type: Plain text
2170 #: build/C/man3/pthread_attr_setdetachstate.3:100
2171 msgid ""
2172 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2173 msgstr ""
2174 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2175 "B<pthread_create>(3) を参照。"
2176
2177 #. type: Plain text
2178 #: build/C/man3/pthread_attr_setdetachstate.3:108
2179 msgid ""
2180 "A thread that is created in a joinable state should eventually either be "
2181 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2182 "B<pthread_create>(3)."
2183 msgstr ""
2184 "join 可能状態で作成されたスレッドは、最終的に\n"
2185 "B<pthread_join>(3) を使って join するか、\n"
2186 "B<pthread_detach>(3) を使って切り離すか、\n"
2187 "のどちらかを行うべきである。"
2188
2189 #. type: Plain text
2190 #: build/C/man3/pthread_attr_setdetachstate.3:115
2191 msgid ""
2192 "It is an error to specify the thread ID of a thread that was created in a "
2193 "detached state in a later call to B<pthread_detach>(3)  or "
2194 "B<pthread_join>(3)."
2195 msgstr ""
2196 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2197 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2198 "エラーである。"
2199
2200 #. type: Plain text
2201 #: build/C/man3/pthread_attr_setdetachstate.3:118
2202 #: build/C/man3/pthread_attr_setstack.3:162
2203 msgid "See B<pthread_attr_init>(3)."
2204 msgstr "B<pthread_attr_init>(3) を参照。"
2205
2206 #. type: Plain text
2207 #: build/C/man3/pthread_attr_setdetachstate.3:124
2208 msgid ""
2209 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2210 "B<pthread_join>(3), B<pthreads>(7)"
2211 msgstr ""
2212 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2213 "B<pthread_join>(3), B<pthreads>(7)"
2214
2215 #. type: TH
2216 #: build/C/man3/pthread_attr_setguardsize.3:26
2217 #, no-wrap
2218 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2219 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2220
2221 #. type: Plain text
2222 #: build/C/man3/pthread_attr_setguardsize.3:30
2223 msgid ""
2224 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2225 "attribute in thread attributes object"
2226 msgstr ""
2227 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2228 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2229
2230 #. type: Plain text
2231 #: build/C/man3/pthread_attr_setguardsize.3:38
2232 #, no-wrap
2233 msgid ""
2234 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2235 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2236 msgstr ""
2237 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2238 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2239
2240 #. type: Plain text
2241 #: build/C/man3/pthread_attr_setguardsize.3:49
2242 msgid ""
2243 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2244 "of the thread attributes object referred to by I<attr> to the value "
2245 "specified in I<guardsize>."
2246 msgstr ""
2247 "B<pthread_attr_setguardsize>() 関数は、\n"
2248 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2249 "I<guardsize> で指定された値に設定する。"
2250
2251 #. type: Plain text
2252 #: build/C/man3/pthread_attr_setguardsize.3:59
2253 msgid ""
2254 "If I<guardsize> is greater than 0, then for each new thread created using "
2255 "I<attr> the system allocates an additional region of at least I<guardsize> "
2256 "bytes at the end of the thread's stack to act as the guard area for the "
2257 "stack (but see BUGS)."
2258 msgstr ""
2259 "I<guardsize> が 0 より大きい場合、\n"
2260 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2261 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2262 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2263 "機能する (ただし「バグ」の節も参照)。"
2264
2265 #. type: Plain text
2266 #: build/C/man3/pthread_attr_setguardsize.3:65
2267 msgid ""
2268 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2269 "guard area."
2270 msgstr ""
2271 "I<guardsize> が 0 の場合、\n"
2272 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2273
2274 #. type: Plain text
2275 #: build/C/man3/pthread_attr_setguardsize.3:67
2276 msgid "The default guard size is the same as the system page size."
2277 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2278
2279 #. type: Plain text
2280 #: build/C/man3/pthread_attr_setguardsize.3:82
2281 msgid ""
2282 "If the stack address attribute has been set in I<attr> (using "
2283 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2284 "that the caller is allocating the thread's stack, then the guard size "
2285 "attribute is ignored (i.e., no guard area is created by the system): it is "
2286 "the application's responsibility to handle stack overflow (perhaps by using "
2287 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2288 "it has allocated)."
2289 msgstr ""
2290 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2291 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2292 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2293 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2294 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2295 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2296 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2297
2298 #. type: Plain text
2299 #: build/C/man3/pthread_attr_setguardsize.3:90
2300 msgid ""
2301 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2302 "attribute of the thread attributes object referred to by I<attr> in the "
2303 "buffer pointed to by I<guardsize>."
2304 msgstr ""
2305 "B<pthread_attr_getguardsize>() は、\n"
2306 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2307 "I<guardsize> が指すバッファに入れて返す。"
2308
2309 #. type: Plain text
2310 #: build/C/man3/pthread_attr_setguardsize.3:104
2311 msgid ""
2312 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2313 "invalid.  On Linux these functions always succeed (but portable and future-"
2314 "proof applications should nevertheless handle a possible error return)."
2315 msgstr ""
2316 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2317 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2318 "Linux では、これらの関数は常に成功する\n"
2319 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2320 "正のエラーの返り値を処理するようにすべきである)。"
2321
2322 #. type: Plain text
2323 #: build/C/man3/pthread_attr_setguardsize.3:106
2324 #: build/C/man3/pthread_attr_setstackaddr.3:83
2325 #: build/C/man3/pthread_attr_setstacksize.3:83
2326 msgid "These functions are provided by glibc since version 2.1."
2327 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2328
2329 #. type: Plain text
2330 #: build/C/man3/pthread_attr_setguardsize.3:113
2331 msgid ""
2332 "The B<pthread_attr_setguardsize>()  and B<pthread_attr_getguardsize>()  "
2333 "functions are thread-safe."
2334 msgstr ""
2335 "関数e B<pthread_attr_setguardsize>() と B<pthread_attr_getguardsize>() はス"
2336 "レッドセーフである。"
2337
2338 #. type: Plain text
2339 #: build/C/man3/pthread_attr_setguardsize.3:129
2340 msgid ""
2341 "A guard area consists of virtual memory pages that are protected to prevent "
2342 "read and write access.  If a thread overflows its stack into the guard area, "
2343 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2344 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2345 "guard size is internally rounded up to the system page size when creating a "
2346 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2347 "size that was set by B<pthread_attr_setguardsize>().)"
2348 msgstr ""
2349 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2350 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2351 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2352 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2353 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2354 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2355 "(その場合も B<pthread_attr_getguardsize>() では\n"
2356 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2357
2358 #. type: Plain text
2359 #: build/C/man3/pthread_attr_setguardsize.3:133
2360 msgid ""
2361 "Setting a guard size of 0 may be useful to save memory in an application "
2362 "that creates many threads and knows that stack overflow can never occur."
2363 msgstr ""
2364 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2365 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2366 "することで、メモリを節約できることもある。"
2367
2368 #. type: Plain text
2369 #: build/C/man3/pthread_attr_setguardsize.3:137
2370 msgid ""
2371 "Choosing a guard size larger than the default size may be necessary for "
2372 "detecting stack overflows if a thread allocates large data structures on the "
2373 "stack."
2374 msgstr ""
2375 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2376 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2377 "大きな guard size を選ぶ必要があるかもしれない。"
2378
2379 #. type: SH
2380 #: build/C/man3/pthread_attr_setguardsize.3:137
2381 #: build/C/man3/pthread_attr_setinheritsched.3:119
2382 #: build/C/man3/pthread_attr_setstacksize.3:103
2383 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2384 #, no-wrap
2385 msgid "BUGS"
2386 msgstr "バグ"
2387
2388 #. type: Plain text
2389 #: build/C/man3/pthread_attr_setguardsize.3:148
2390 msgid ""
2391 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2392 "within the stack size allocation, rather than allocating extra space at the "
2393 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2394 "error from B<pthread_create>(3)  if the guard size value is too large, "
2395 "leaving no space for the actual stack.)"
2396 msgstr ""
2397 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2398 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2399 "末尾に追加の領域を割り当てることが求められている。\n"
2400 "(このため、ガード領域が大きすぎて、\n"
2401 "実際のスタック用の場所がなくなってしまう場合、\n"
2402 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2403
2404 #.  glibc includes the guardsize within the allocated stack size,
2405 #.  which looks pretty clearly to be in violation of POSIX.
2406 #.  Filed bug, 22 Oct 2008:
2407 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2408 #.  Older reports:
2409 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2410 #.  Reportedly, LinuxThreads did the right thing, allocating
2411 #.  extra space at the end of the stack:
2412 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2413 #. type: Plain text
2414 #: build/C/man3/pthread_attr_setguardsize.3:162
2415 msgid ""
2416 "The obsolete LinuxThreads implementation did the right thing, allocating "
2417 "extra space at the end of the stack for the guard area."
2418 msgstr ""
2419 "廃止予定の LinuxThreads 実装では、\n"
2420 "POSIX.1 で求められている通りの動作で、\n"
2421 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2422
2423 #. type: Plain text
2424 #: build/C/man3/pthread_attr_setguardsize.3:165
2425 msgid "See B<pthread_getattr_np>(3)."
2426 msgstr "B<pthread_getattr_np>(3) を参照。"
2427
2428 #. type: Plain text
2429 #: build/C/man3/pthread_attr_setguardsize.3:173
2430 msgid ""
2431 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), "
2432 "B<pthread_attr_setstack>(3), B<pthread_attr_setstacksize>(3), "
2433 "B<pthread_create>(3), B<pthreads>(7)"
2434 msgstr ""
2435 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), "
2436 "B<pthread_attr_setstack>(3), B<pthread_attr_setstacksize>(3), "
2437 "B<pthread_create>(3), B<pthreads>(7)"
2438
2439 #. type: TH
2440 #: build/C/man3/pthread_attr_setinheritsched.3:26
2441 #, no-wrap
2442 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2443 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2444
2445 #. type: TH
2446 #: build/C/man3/pthread_attr_setinheritsched.3:26
2447 #: build/C/man3/pthread_attr_setschedparam.3:26
2448 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2449 #: build/C/man3/pthread_setaffinity_np.3:26 build/C/man7/pthreads.7:26
2450 #, fuzzy, no-wrap
2451 #| msgid "2014-04-14"
2452 msgid "2014-05-21"
2453 msgstr "2014-04-14"
2454
2455 #. type: Plain text
2456 #: build/C/man3/pthread_attr_setinheritsched.3:30
2457 msgid ""
2458 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit-"
2459 "scheduler attribute in thread attributes object"
2460 msgstr ""
2461 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - スレッド属性オブ"
2462 "ジェクトの inherit-scheduler 属性の設定/取得を行う"
2463
2464 #. type: Plain text
2465 #: build/C/man3/pthread_attr_setinheritsched.3:38
2466 #, no-wrap
2467 msgid ""
2468 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2469 "B<                                 int >I<inheritsched>B<);>\n"
2470 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2471 "B<                                 int *>I<inheritsched>B<);>\n"
2472 msgstr ""
2473 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2474 "B<                                 int >I<inheritsched>B<);>\n"
2475 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2476 "B<                                 int *>I<inheritsched>B<);>\n"
2477
2478 #. type: Plain text
2479 #: build/C/man3/pthread_attr_setinheritsched.3:55
2480 msgid ""
2481 "The B<pthread_attr_setinheritsched>()  function sets the inherit-scheduler "
2482 "attribute of the thread attributes object referred to by I<attr> to the "
2483 "value specified in I<inheritsched>.  The inherit-scheduler attribute "
2484 "determines whether a thread created using the thread attributes object "
2485 "I<attr> will inherit its scheduling attributes from the calling thread or "
2486 "whether it will take them from I<attr>."
2487 msgstr ""
2488 "B<pthread_attr_setinheritsched>() 関数は、 I<attr> が参照するスレッド属性オブ"
2489 "ジェクトの inherit-scheduler 属性を I<inheritsched> で指定された値に設定す"
2490 "る。 inherit-scheduler 属性により、スレッド属性オブジェクト I<attr> を使って"
2491 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承するか、 "
2492 "I<attr> からスケジューリング属性を取得するかが決定される。"
2493
2494 #. type: Plain text
2495 #: build/C/man3/pthread_attr_setinheritsched.3:64
2496 msgid ""
2497 "The following scheduling attributes are affected by the inherit-scheduler "
2498 "attribute: scheduling policy (B<pthread_attr_setschedpolicy>(3)), scheduling "
2499 "priority (B<pthread_attr_setschedparam>(3)), and contention scope "
2500 "(B<pthread_attr_setscope>(3))."
2501 msgstr ""
2502 "次に挙げるスケジューリング属性は inherit-scheduler 属性の影響を受ける: スケ"
2503 "ジューリングポリシー (B<pthread_attr_setschedpolicy>(3))、 スケジューリング優"
2504 "先度 (B<pthread_attr_setschedparam>(3))、 contention scope "
2505 "(B<pthread_attr_setscope>(3))。"
2506
2507 #. type: Plain text
2508 #: build/C/man3/pthread_attr_setinheritsched.3:67
2509 msgid "The following values may be specified in I<inheritsched>:"
2510 msgstr "以下の値を I<inheritsched> に指定できる。"
2511
2512 #. type: TP
2513 #: build/C/man3/pthread_attr_setinheritsched.3:67
2514 #, no-wrap
2515 msgid "B<PTHREAD_INHERIT_SCHED>"
2516 msgstr "B<PTHREAD_INHERIT_SCHED>"
2517
2518 #. type: Plain text
2519 #: build/C/man3/pthread_attr_setinheritsched.3:75
2520 msgid ""
2521 "Threads that are created using I<attr> inherit scheduling attributes from "
2522 "the creating thread; the scheduling attributes in I<attr> are ignored."
2523 msgstr ""
2524 "I<attr> を使って作成されたスレッドは、\n"
2525 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2526 "I<attr> 内のスケジューリング属性は無視される。"
2527
2528 #. type: TP
2529 #: build/C/man3/pthread_attr_setinheritsched.3:75
2530 #, no-wrap
2531 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2532 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2533
2534 #.  FIXME what are the defaults for scheduler settings?
2535 #. type: Plain text
2536 #: build/C/man3/pthread_attr_setinheritsched.3:82
2537 msgid ""
2538 "Threads that are created using I<attr> take their scheduling attributes from "
2539 "the values specified by the attributes object."
2540 msgstr ""
2541 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2542 "指定された値からスケジューリング属性を取得する。"
2543
2544 #. type: Plain text
2545 #: build/C/man3/pthread_attr_setinheritsched.3:86
2546 msgid ""
2547 "The default setting of the inherit-scheduler attribute in a newly "
2548 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2549 msgstr ""
2550 "新たに初期化されたスレッド属性オブジェクトの inherit-scheduler 属性のデフォル"
2551 "ト設定は B<PTHREAD_INHERIT_SCHED> である。"
2552
2553 #. type: Plain text
2554 #: build/C/man3/pthread_attr_setinheritsched.3:93
2555 msgid ""
2556 "The B<pthread_attr_getinheritsched>()  returns the inherit-scheduler "
2557 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2558 "by I<inheritsched>."
2559 msgstr ""
2560 "B<pthread_attr_getinheritsched>() は、 スレッド属性オブジェクト I<attr> の "
2561 "inherit-scheduler 属性を I<inheritsched> が指すバッファに入れて返す。"
2562
2563 #. type: Plain text
2564 #: build/C/man3/pthread_attr_setinheritsched.3:99
2565 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2566 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2567
2568 #. type: Plain text
2569 #: build/C/man3/pthread_attr_setinheritsched.3:103
2570 msgid "Invalid value in I<inheritsched>."
2571 msgstr "I<inheritsched> に無効な値が指定された。"
2572
2573 #.  .SH VERSIONS
2574 #.  Available since glibc 2.0.
2575 #. type: Plain text
2576 #: build/C/man3/pthread_attr_setinheritsched.3:110
2577 msgid ""
2578 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2579 "to set the attribute to an unsupported value\") for "
2580 "B<pthread_attr_setinheritsched>()."
2581 msgstr ""
2582 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2583 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2584 "も追加で規定されている。"
2585
2586 #. type: Plain text
2587 #: build/C/man3/pthread_attr_setinheritsched.3:117
2588 #, fuzzy
2589 #| msgid ""
2590 #| "The B<pthread_attr_setdetachstate>()  and "
2591 #| "B<pthread_attr_getdetachstate>()  functions are thread-safe."
2592 msgid ""
2593 "The B<pthread_attr_setinheritsched>()  and "
2594 "B<pthread_attr_getinheritsched>()  functions are thread-safe."
2595 msgstr ""
2596 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
2597 "スレッドセーフである。"
2598
2599 #.  FIXME . Track status of the following bug:
2600 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2601 #. type: Plain text
2602 #: build/C/man3/pthread_attr_setinheritsched.3:135
2603 msgid ""
2604 "As at glibc 2.8, if a thread attributes object is initialized using "
2605 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2606 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2607 "if the inherit-scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2608 "then a thread created using the attribute object wrongly inherits its "
2609 "scheduling attributes from the creating thread.  This bug does not occur if "
2610 "either the scheduling policy or scheduling priority attribute is explicitly "
2611 "set in the thread attributes object before calling B<pthread_create>(3)."
2612 msgstr ""
2613 "glibc 2.8 の時点では、スレッド属性オブジェクトが B<pthread_attr_init>(3) を"
2614 "使って初期化された場合、 スレッド属性オブジェクトのスケジューリングポリシー"
2615 "が B<SCHED_OTHER> に、 スケジューリング優先度が 0 に設定される。一方、その後 "
2616 "inherit-scheduler 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ"
2617 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するスレッド"
2618 "のスケジューリング属性が間違って継承されてしまう。 B<pthread_create>(3) を呼"
2619 "び出す前にスケジューリングポリシー属性かスケジューリング優先度属性のどちらか"
2620 "が明示的に設定された場合には、 このバグは発生しない。"
2621
2622 #. type: Plain text
2623 #: build/C/man3/pthread_attr_setinheritsched.3:138
2624 #: build/C/man3/pthread_attr_setschedparam.3:116
2625 #: build/C/man3/pthread_attr_setschedpolicy.3:112
2626 msgid "See B<pthread_setschedparam>(3)."
2627 msgstr "B<pthread_setschedparam>(3) を参照。"
2628
2629 #. type: Plain text
2630 #: build/C/man3/pthread_attr_setinheritsched.3:150
2631 #, fuzzy
2632 #| msgid ""
2633 #| "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2634 #| "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2635 #| "B<pthread_attr_setscope>(3), B<pthread_create>(3), "
2636 #| "B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2637 msgid ""
2638 "B<pthread_attr_init>(3), B<pthread_attr_setschedparam>(3), "
2639 "B<pthread_attr_setschedpolicy>(3), B<pthread_attr_setscope>(3), "
2640 "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2641 "B<pthread_setschedprio>(3), B<pthreads>,(7)  B<sched>(7)"
2642 msgstr ""
2643 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2644 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2645 "B<pthread_attr_setscope>(3), B<pthread_create>(3), "
2646 "B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2647
2648 #. type: TH
2649 #: build/C/man3/pthread_attr_setschedparam.3:26
2650 #, no-wrap
2651 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2652 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2653
2654 #. type: Plain text
2655 #: build/C/man3/pthread_attr_setschedparam.3:30
2656 msgid ""
2657 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2658 "parameter attributes in thread attributes object"
2659 msgstr ""
2660 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2661 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2662
2663 #. type: Plain text
2664 #: build/C/man3/pthread_attr_setschedparam.3:38
2665 #, no-wrap
2666 msgid ""
2667 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2668 "B<                               const struct sched_param *>I<param>B<);>\n"
2669 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2670 "B<                               struct sched_param *>I<param>B<);>\n"
2671 msgstr ""
2672 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2673 "B<                               const struct sched_param *>I<param>B<);>\n"
2674 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2675 "B<                               struct sched_param *>I<param>B<);>\n"
2676
2677 #. type: Plain text
2678 #: build/C/man3/pthread_attr_setschedparam.3:52
2679 msgid ""
2680 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2681 "attributes of the thread attributes object referred to by I<attr> to the "
2682 "values specified in the buffer pointed to by I<param>.  These attributes "
2683 "determine the scheduling parameters of a thread created using the thread "
2684 "attributes object I<attr>."
2685 msgstr ""
2686 "B<pthread_attr_setschedparam>() 関数は、\n"
2687 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2688 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2689 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2690 "作成されるスレッドのスケジューリングパラメータが決定される。"
2691
2692 #. type: Plain text
2693 #: build/C/man3/pthread_attr_setschedparam.3:59
2694 msgid ""
2695 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2696 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2697 "by I<param>."
2698 msgstr ""
2699 "B<pthread_attr_getschedparam>() は、\n"
2700 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2701 "I<param> が指すバッファに入れて返す。"
2702
2703 #. type: Plain text
2704 #: build/C/man3/pthread_attr_setschedparam.3:61
2705 msgid "Scheduling parameters are maintained in the following structure:"
2706 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2707
2708 #. type: Plain text
2709 #: build/C/man3/pthread_attr_setschedparam.3:67
2710 #: build/C/man3/pthread_setschedparam.3:69
2711 #, no-wrap
2712 msgid ""
2713 "struct sched_param {\n"
2714 "    int sched_priority;     /* Scheduling priority */\n"
2715 "};\n"
2716 msgstr ""
2717 "struct sched_param {\n"
2718 "    int sched_priority;     /* Scheduling priority */\n"
2719 "};\n"
2720
2721 #. type: Plain text
2722 #: build/C/man3/pthread_attr_setschedparam.3:74
2723 #: build/C/man3/pthread_setschedparam.3:76
2724 #, fuzzy
2725 #| msgid ""
2726 #| "As can be seen, only one scheduling parameter is supported.  For details "
2727 #| "of the permitted ranges for scheduling priorities in each scheduling "
2728 #| "policy, see B<sched_setscheduler>(2)."
2729 msgid ""
2730 "As can be seen, only one scheduling parameter is supported.  For details of "
2731 "the permitted ranges for scheduling priorities in each scheduling policy, "
2732 "see B<sched>(7)."
2733 msgstr ""
2734 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2735 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2736 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2737
2738 #. type: Plain text
2739 #: build/C/man3/pthread_attr_setschedparam.3:85
2740 msgid ""
2741 "In order for the parameter setting made by B<pthread_attr_setschedparam>()  "
2742 "to have effect when calling B<pthread_create>(3), the caller must use "
2743 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2744 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2745 msgstr ""
2746 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedparam>() で行っ"
2747 "たパラメータ設定を有効にするには、 呼び出し側で "
2748 "B<pthread_attr_setinheritsched>(3) を使って 属性オブジェクト I<attr> の "
2749 "inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければなら"
2750 "ない。"
2751
2752 #.  .SH VERSIONS
2753 #.  Available since glibc 2.0.
2754 #. type: Plain text
2755 #: build/C/man3/pthread_attr_setschedparam.3:100
2756 msgid ""
2757 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2758 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2759 "(but portable and future-proof applications should nevertheless handle a "
2760 "possible error return)."
2761 msgstr ""
2762 "POSIX.1 では、\n"
2763 "B<pthread_attr_setschedparam>() について\n"
2764 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2765 "Linux では、これらの関数は常に成功する\n"
2766 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2767 "正のエラーの返り値を処理するようにすべきである)。"
2768
2769 #. type: Plain text
2770 #: build/C/man3/pthread_attr_setschedparam.3:107
2771 #, fuzzy
2772 #| msgid ""
2773 #| "The B<pthread_attr_setdetachstate>()  and "
2774 #| "B<pthread_attr_getdetachstate>()  functions are thread-safe."
2775 msgid ""
2776 "The B<pthread_attr_setschedparam>()  and B<pthread_attr_getschedparam>()  "
2777 "functions are thread-safe."
2778 msgstr ""
2779 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
2780 "スレッドセーフである。"
2781
2782 #. type: Plain text
2783 #: build/C/man3/pthread_attr_setschedparam.3:113
2784 msgid ""
2785 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2786 "policies supported on Linux."
2787 msgstr ""
2788 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2789 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2790
2791 #. type: Plain text
2792 #: build/C/man3/pthread_attr_setschedparam.3:128
2793 #, fuzzy
2794 #| msgid ""
2795 #| "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
2796 #| "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
2797 #| "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), "
2798 #| "B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2799 msgid ""
2800 "B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
2801 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2802 "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2803 "B<pthread_setschedprio>(3), B<pthreads>(7).  B<sched>(7)"
2804 msgstr ""
2805 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
2806 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
2807 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), "
2808 "B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2809
2810 #. type: TH
2811 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2812 #, no-wrap
2813 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2814 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2815
2816 #. type: Plain text
2817 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2818 msgid ""
2819 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2820 "scheduling policy attribute in thread attributes object"
2821 msgstr ""
2822 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2823 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2824
2825 #. type: Plain text
2826 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2827 #, no-wrap
2828 msgid ""
2829 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2830 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2831 msgstr ""
2832 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2833 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2834
2835 #. type: Plain text
2836 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2837 msgid ""
2838 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2839 "attribute of the thread attributes object referred to by I<attr> to the "
2840 "value specified in I<policy>.  This attribute determines the scheduling "
2841 "policy of a thread created using the thread attributes object I<attr>."
2842 msgstr ""
2843 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2844 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2845 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2846 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2847 "作成されるスレッドのスケジューリングポリシーが決定される。"
2848
2849 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2850 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2851 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2852 #. type: Plain text
2853 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2854 #, fuzzy
2855 #| msgid ""
2856 #| "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2857 #| "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2858 msgid ""
2859 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2860 "B<SCHED_OTHER>, with the semantics described in B<sched>(7)."
2861 msgstr ""
2862 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2863 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2864 "である。"
2865
2866 #. type: Plain text
2867 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2868 msgid ""
2869 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2870 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2871 "by I<policy>."
2872 msgstr ""
2873 "B<pthread_attr_getschedpolicy>() は、\n"
2874 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2875 "I<policy> が指すバッファに入れて返す。"
2876
2877 #. type: Plain text
2878 #: build/C/man3/pthread_attr_setschedpolicy.3:83
2879 msgid ""
2880 "In order for the policy setting made by B<pthread_attr_setschedpolicy>()  to "
2881 "have effect when calling B<pthread_create>(3), the caller must use "
2882 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2883 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2884 msgstr ""
2885 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedpolicy>() で行っ"
2886 "たポリシー設定を有効にするには、 呼び出し側で "
2887 "B<pthread_attr_setinheritsched>(3) を使って 属性オブジェクト I<attr> の "
2888 "inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければなら"
2889 "ない。"
2890
2891 #. type: Plain text
2892 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2893 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2894 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2895
2896 #. type: Plain text
2897 #: build/C/man3/pthread_attr_setschedpolicy.3:93
2898 msgid "Invalid value in I<policy>."
2899 msgstr "I<policy> に無効な値が指定された。"
2900
2901 #.  .SH VERSIONS
2902 #.  Available since glibc 2.0.
2903 #. type: Plain text
2904 #: build/C/man3/pthread_attr_setschedpolicy.3:100
2905 msgid ""
2906 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2907 "to set the attribute to an unsupported value\") for "
2908 "B<pthread_attr_setschedpolicy>()."
2909 msgstr ""
2910 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2911 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2912 "も追加で規定されている。"
2913
2914 #. type: Plain text
2915 #: build/C/man3/pthread_attr_setschedpolicy.3:107
2916 #, fuzzy
2917 #| msgid ""
2918 #| "The B<pthread_attr_setdetachstate>()  and "
2919 #| "B<pthread_attr_getdetachstate>()  functions are thread-safe."
2920 msgid ""
2921 "The B<pthread_attr_setschedpolicy>()  and B<pthread_attr_getschedpolicy>()  "
2922 "functions are thread-safe."
2923 msgstr ""
2924 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
2925 "スレッドセーフである。"
2926
2927 #. type: Plain text
2928 #: build/C/man3/pthread_attr_setschedpolicy.3:123
2929 #, fuzzy
2930 #| msgid ""
2931 #| "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2932 #| "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2933 #| "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2934 #| "B<pthread_setschedprio>(3), B<pthreads>(7)"
2935 msgid ""
2936 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
2937 "B<pthread_attr_setschedparam>(3), B<pthread_create>(3), "
2938 "B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7), "
2939 "B<sched>(7)"
2940 msgstr ""
2941 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2942 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2943 "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2944 "B<pthread_setschedprio>(3), B<pthreads>(7)"
2945
2946 #. type: TH
2947 #: build/C/man3/pthread_attr_setscope.3:26
2948 #, no-wrap
2949 msgid "PTHREAD_ATTR_SETSCOPE"
2950 msgstr "PTHREAD_ATTR_SETSCOPE"
2951
2952 #. type: TH
2953 #: build/C/man3/pthread_attr_setscope.3:26
2954 #: build/C/man3/pthread_attr_setstack.3:26
2955 #, fuzzy, no-wrap
2956 #| msgid "2014-04-14"
2957 msgid "2014-04-21"
2958 msgstr "2014-04-14"
2959
2960 #. type: Plain text
2961 #: build/C/man3/pthread_attr_setscope.3:30
2962 msgid ""
2963 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2964 "attribute in thread attributes object"
2965 msgstr ""
2966 "pthread_attr_setscope, pthread_attr_getscope - \n"
2967 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2968
2969 #. type: Plain text
2970 #: build/C/man3/pthread_attr_setscope.3:38
2971 #, no-wrap
2972 msgid ""
2973 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2974 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2975 msgstr ""
2976 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2977 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2978
2979 #. type: Plain text
2980 #: build/C/man3/pthread_attr_setscope.3:53
2981 msgid ""
2982 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2983 "of the thread attributes object referred to by I<attr> to the value "
2984 "specified in I<scope>.  The contention scope attribute defines the set of "
2985 "threads against which a thread competes for resources such as the CPU.  "
2986 "POSIX.1-2001 specifies two possible values for I<scope>:"
2987 msgstr ""
2988 "B<pthread_attr_setscope>() 関数は、\n"
2989 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2990 "属性を I<scope> で指定された値に設定する。\n"
2991 "contention scope 属性により、\n"
2992 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2993 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2994
2995 #. type: TP
2996 #: build/C/man3/pthread_attr_setscope.3:53
2997 #, no-wrap
2998 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2999 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
3000
3001 #. type: Plain text
3002 #: build/C/man3/pthread_attr_setscope.3:61
3003 msgid ""
3004 "The thread competes for resources with all other threads in all processes on "
3005 "the system that are in the same scheduling allocation domain (a group of one "
3006 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
3007 "to one another according to their scheduling policy and priority."
3008 msgstr ""
3009 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
3010 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
3011 "スレッドとリソースを取り合う。 \n"
3012 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
3013 "優先度に基づき、互いに相対的にスケジューリングされる。"
3014
3015 #. type: TP
3016 #: build/C/man3/pthread_attr_setscope.3:61
3017 #, no-wrap
3018 msgid "B<PTHREAD_SCOPE_PROCESS>"
3019 msgstr "B<PTHREAD_SCOPE_PROCESS>"
3020
3021 #. type: Plain text
3022 #: build/C/man3/pthread_attr_setscope.3:76
3023 msgid ""
3024 "The thread competes for resources with all other threads in the same process "
3025 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
3026 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
3027 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
3028 "leaves it unspecified how these threads contend with other threads in other "
3029 "process on the system or with other threads in the same process that were "
3030 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
3031 msgstr ""
3032 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
3033 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
3034 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
3035 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
3036 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
3037 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
3038 "された他のスレッドとどのようにリソースを取り合うかは、\n"
3039 "規定されないままになっている。"
3040
3041 #. type: Plain text
3042 #: build/C/man3/pthread_attr_setscope.3:83
3043 msgid ""
3044 "POSIX.1-2001 requires that an implementation support at least one of these "
3045 "contention scopes.  Linux supports B<PTHREAD_SCOPE_SYSTEM>, but not "
3046 "B<PTHREAD_SCOPE_PROCESS>."
3047 msgstr ""
3048 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention scope の"
3049 "うち少なくとも 1 つをサポートすることだけである。 Linux は "
3050 "B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、 B<PTHREAD_SCOPE_PROCESS> はサ"
3051 "ポートしていない。"
3052
3053 #. type: Plain text
3054 #: build/C/man3/pthread_attr_setscope.3:95
3055 msgid ""
3056 "On systems that support multiple contention scopes, then, in order for the "
3057 "parameter setting made by B<pthread_attr_setscope>()  to have effect when "
3058 "calling B<pthread_create>(3), the caller must use "
3059 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
3060 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
3061 msgstr ""
3062 "複数の contention scope をサポートしているシステムで、 B<pthread_create>(3) "
3063 "を呼び出した際に B<pthread_attr_setscope>() で行ったパラメータ設定を有効にす"
3064 "るには、 呼び出し側で B<pthread_attr_setinheritsched>(3) を使って 属性オブ"
3065 "ジェクト I<attr> の inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定"
3066 "しておかなければならない。"
3067
3068 #. type: Plain text
3069 #: build/C/man3/pthread_attr_setscope.3:103
3070 msgid ""
3071 "The B<pthread_attr_getscope>()  function returns the contention scope "
3072 "attribute of the thread attributes object referred to by I<attr> in the "
3073 "buffer pointed to by I<scope>."
3074 msgstr ""
3075 "B<pthread_attr_getscope>() は、\n"
3076 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
3077 "I<scope> が指すバッファに入れて返す。"
3078
3079 #. type: Plain text
3080 #: build/C/man3/pthread_attr_setscope.3:109
3081 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
3082 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
3083
3084 #. type: Plain text
3085 #: build/C/man3/pthread_attr_setscope.3:113
3086 msgid "An invalid value was specified in I<scope>."
3087 msgstr "I<scope> に無効な値が指定された。"
3088
3089 #. type: TP
3090 #: build/C/man3/pthread_attr_setscope.3:113
3091 #, no-wrap
3092 msgid "B<ENOTSUP>"
3093 msgstr "B<ENOTSUP>"
3094
3095 #. type: Plain text
3096 #: build/C/man3/pthread_attr_setscope.3:119
3097 msgid ""
3098 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
3099 "supported on Linux."
3100 msgstr ""
3101 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
3102 "この値は Linux でサポートされていない。"
3103
3104 #. type: Plain text
3105 #: build/C/man3/pthread_attr_setscope.3:126
3106 #, fuzzy
3107 #| msgid ""
3108 #| "The B<pthread_attr_setguardsize>()  and B<pthread_attr_getguardsize>()  "
3109 #| "functions are thread-safe."
3110 msgid ""
3111 "The B<pthread_attr_setscope>()  and B<pthread_attr_getscope>()  functions "
3112 "are thread-safe."
3113 msgstr ""
3114 "関数e B<pthread_attr_setguardsize>() と B<pthread_attr_getguardsize>() はス"
3115 "レッドセーフである。"
3116
3117 #. type: Plain text
3118 #: build/C/man3/pthread_attr_setscope.3:136
3119 msgid ""
3120 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
3121 "space thread is bound directly to a single kernel-scheduling entity.  This "
3122 "is the case on Linux for the obsolete LinuxThreads implementation and the "
3123 "modern NPTL implementation, which are both 1:1 threading implementations."
3124 msgstr ""
3125 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
3126 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
3127 "直接結び付けられる。\n"
3128 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
3129 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
3130
3131 #. type: Plain text
3132 #: build/C/man3/pthread_attr_setscope.3:139
3133 msgid ""
3134 "POSIX.1-2001 specifies that the default contention scope is implementation-"
3135 "defined."
3136 msgstr ""
3137 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
3138 "実装時で定義されるものと規定されている。"
3139
3140 #. type: Plain text
3141 #: build/C/man3/pthread_attr_setscope.3:149
3142 msgid ""
3143 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3144 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3145 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3146 msgstr ""
3147 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3148 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3149 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3150
3151 #. type: TH
3152 #: build/C/man3/pthread_attr_setstack.3:26
3153 #, no-wrap
3154 msgid "PTHREAD_ATTR_SETSTACK"
3155 msgstr "PTHREAD_ATTR_SETSTACK"
3156
3157 #. type: Plain text
3158 #: build/C/man3/pthread_attr_setstack.3:30
3159 msgid ""
3160 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
3161 "thread attributes object"
3162 msgstr ""
3163 "pthread_attr_setstack, pthread_attr_getstack - \n"
3164 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
3165
3166 #. type: Plain text
3167 #: build/C/man3/pthread_attr_setstack.3:38
3168 #, no-wrap
3169 msgid ""
3170 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3171 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3172 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3173 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3174 msgstr ""
3175 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3176 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3177 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3178 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3179
3180 #. type: Plain text
3181 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_kill.3:41
3182 #: build/C/man3/pthread_sigmask.3:42 build/C/man3/pthread_sigqueue.3:41
3183 msgid ""
3184 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3185 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3186
3187 #. type: Plain text
3188 #: build/C/man3/pthread_attr_setstack.3:50
3189 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3190 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3191
3192 #. type: Plain text
3193 #: build/C/man3/pthread_attr_setstack.3:52
3194 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3195 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3196
3197 #. type: Plain text
3198 #: build/C/man3/pthread_attr_setstack.3:68
3199 msgid ""
3200 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3201 "size attributes of the thread attributes object referred to by I<attr> to "
3202 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3203 "attributes specify the location and size of the stack that should be used by "
3204 "a thread that is created using the thread attributes object I<attr>."
3205 msgstr ""
3206 "B<pthread_attr_setstack>() 関数は、\n"
3207 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3208 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3209 "指定された値に設定する。\n"
3210 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3211 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3212
3213 #. type: Plain text
3214 #: build/C/man3/pthread_attr_setstack.3:74
3215 msgid ""
3216 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3217 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3218 "allocated buffer should be both readable and writable."
3219 msgstr ""
3220 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3221 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3222 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3223 "べきである。"
3224
3225 #. type: Plain text
3226 #: build/C/man3/pthread_attr_setstack.3:85
3227 msgid ""
3228 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3229 "size attributes of the thread attributes object referred to by I<attr> in "
3230 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3231 msgstr ""
3232 "B<pthread_attr_getstack>() 関数は、\n"
3233 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3234 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3235 "指すバッファに入れて返す。"
3236
3237 #. type: Plain text
3238 #: build/C/man3/pthread_attr_setstack.3:91
3239 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3240 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3241
3242 #. type: Plain text
3243 #: build/C/man3/pthread_attr_setstack.3:102
3244 msgid ""
3245 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3246 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3247 "stacksize> is not suitably aligned."
3248 msgstr ""
3249 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3250 "システムによっては、 I<stackaddr> か\n"
3251 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3252 "このエラーが発生する。"
3253
3254 #. type: Plain text
3255 #: build/C/man3/pthread_attr_setstack.3:110
3256 msgid ""
3257 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3258 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3259 "caller."
3260 msgstr ""
3261 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3262 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3263 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3264
3265 #. type: Plain text
3266 #: build/C/man3/pthread_attr_setstack.3:112
3267 msgid "These functions are provided by glibc since version 2.2."
3268 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3269
3270 #. type: Plain text
3271 #: build/C/man3/pthread_attr_setstack.3:119
3272 #, fuzzy
3273 #| msgid ""
3274 #| "The B<pthread_attr_setdetachstate>()  and "
3275 #| "B<pthread_attr_getdetachstate>()  functions are thread-safe."
3276 msgid ""
3277 "The B<pthread_attr_setstack>()  and B<pthread_attr_getstack>()  functions "
3278 "are thread-safe."
3279 msgstr ""
3280 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
3281 "スレッドセーフである。"
3282
3283 #. type: Plain text
3284 #: build/C/man3/pthread_attr_setstack.3:129
3285 msgid ""
3286 "These functions are provided for applications that must ensure that a "
3287 "thread's stack is placed in a particular location.  For most applications, "
3288 "this is not necessary, and the use of these functions should be avoided.  "
3289 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3290 "stack size other than the default.)"
3291 msgstr ""
3292 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3293 "しなければならないアプリケーションのために提供されている。\n"
3294 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3295 "これらの関数を使うのは避けるべきである。\n"
3296 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3297 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3298
3299 #. type: Plain text
3300 #: build/C/man3/pthread_attr_setstack.3:140
3301 msgid ""
3302 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3303 "responsibility of allocating the stack.  Any guard size value that was set "
3304 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3305 "is the application's responsibility to allocate a guard area (one or more "
3306 "pages protected against reading and writing)  to handle the possibility of "
3307 "stack overflow."
3308 msgstr ""
3309 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3310 "スタックの割り当てに責任を持つ必要がある。\n"
3311 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3312 "guard size の値は無視される。\n"
3313 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3314 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3315 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3316
3317 #. type: Plain text
3318 #: build/C/man3/pthread_attr_setstack.3:151
3319 msgid ""
3320 "The address specified in I<stackaddr> should be suitably aligned: for full "
3321 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3322 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3323 "should also be a multiple of the system page size."
3324 msgstr ""
3325 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3326 "完全な移植性を持たせるためには、\n"
3327 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3328 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3329 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3330
3331 #. type: Plain text
3332 #: build/C/man3/pthread_attr_setstack.3:159
3333 msgid ""
3334 "If I<attr> is used to create multiple threads, then the caller must change "
3335 "the stack address attribute between calls to B<pthread_create>(3); "
3336 "otherwise, the threads will attempt to use the same memory area for their "
3337 "stacks, and chaos will ensue."
3338 msgstr ""
3339 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3340 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3341 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3342 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3343 "使おうとするため、訳の分からない状況が発生してしまう。"
3344
3345 #. type: Plain text
3346 #: build/C/man3/pthread_attr_setstack.3:174
3347 msgid ""
3348 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3349 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3350 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3351 msgstr ""
3352 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3353 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3354 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3355
3356 #. type: TH
3357 #: build/C/man3/pthread_attr_setstackaddr.3:26
3358 #, no-wrap
3359 msgid "PTHREAD_ATTR_SETSTACKADDR"
3360 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3361
3362 #. type: TH
3363 #: build/C/man3/pthread_attr_setstackaddr.3:26
3364 #: build/C/man3/pthread_attr_setstacksize.3:26
3365 #, fuzzy, no-wrap
3366 #| msgid "2014-04-08"
3367 msgid "2014-05-10"
3368 msgstr "2014-04-08"
3369
3370 #. type: Plain text
3371 #: build/C/man3/pthread_attr_setstackaddr.3:30
3372 msgid ""
3373 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3374 "attribute in thread attributes object"
3375 msgstr ""
3376 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3377 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3378
3379 #. type: Plain text
3380 #: build/C/man3/pthread_attr_setstackaddr.3:38
3381 #, no-wrap
3382 msgid ""
3383 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3384 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3385 msgstr ""
3386 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3387 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3388
3389 #. type: Plain text
3390 #: build/C/man3/pthread_attr_setstackaddr.3:49
3391 msgid ""
3392 "These functions are obsolete: B<do not use them.> Use "
3393 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3394 msgstr ""
3395 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3396 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3397 "うこと。"
3398
3399 #. type: Plain text
3400 #: build/C/man3/pthread_attr_setstackaddr.3:60
3401 msgid ""
3402 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3403 "attribute of the thread attributes object referred to by I<attr> to the "
3404 "value specified in I<stackaddr>.  This attribute specifies the location of "
3405 "the stack that should be used by a thread that is created using the thread "
3406 "attributes object I<attr>."
3407 msgstr ""
3408 "B<pthread_attr_setstackaddr>() 関数は、\n"
3409 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3410 "属性を I<stackaddr> で指定された値に設定する。\n"
3411 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3412 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3413
3414 #. type: Plain text
3415 #: build/C/man3/pthread_attr_setstackaddr.3:66
3416 msgid ""
3417 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3418 "that was allocated by the caller.  The pages of the allocated buffer should "
3419 "be both readable and writable."
3420 msgstr ""
3421 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3422 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3423 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3424 "なっているべきである。"
3425
3426 #. type: Plain text
3427 #: build/C/man3/pthread_attr_setstackaddr.3:74
3428 msgid ""
3429 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3430 "attribute of the thread attributes object referred to by I<attr> in the "
3431 "buffer pointed to by I<stackaddr>."
3432 msgstr ""
3433 "B<pthread_attr_getstackaddr>() は、\n"
3434 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3435 "I<stackaddr> が指すバッファに入れて返す。"
3436
3437 #. type: Plain text
3438 #: build/C/man3/pthread_attr_setstackaddr.3:81
3439 msgid ""
3440 "No errors are defined (but applications should nevertheless handle a "
3441 "possible error return)."
3442 msgstr ""
3443 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3444 "返り値を処理するようにすべきである)。"
3445
3446 #. type: Plain text
3447 #: build/C/man3/pthread_attr_setstackaddr.3:90
3448 #, fuzzy
3449 #| msgid ""
3450 #| "The B<pthread_attr_setdetachstate>()  and "
3451 #| "B<pthread_attr_getdetachstate>()  functions are thread-safe."
3452 msgid ""
3453 "The B<pthread_attr_setstackaddr>()  and B<pthread_attr_getstackaddr>()  "
3454 "functions are thread-safe."
3455 msgstr ""
3456 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
3457 "スレッドセーフである。"
3458
3459 #. type: Plain text
3460 #: build/C/man3/pthread_attr_setstackaddr.3:93
3461 msgid ""
3462 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3463 "POSIX.1-2008 removes the specification of these functions."
3464 msgstr ""
3465 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3466 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3467
3468 #. type: Plain text
3469 #: build/C/man3/pthread_attr_setstackaddr.3:117
3470 msgid ""
3471 "I<Do not use these functions!> They cannot be portably used, since they "
3472 "provide no way of specifying the direction of growth or the range of the "
3473 "stack.  For example, on architectures with a stack that grows downward, "
3474 "I<stackaddr> specifies the next address past the I<highest> address of the "
3475 "allocated stack area.  However, on architectures with a stack that grows "
3476 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3477 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3478 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3479 "in the allocated stack area (and the I<stacksize> argument specifies the "
3480 "range of the stack)."
3481 msgstr ""
3482 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3483 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3484 "かを指定する手段が提供されていないからである。\n"
3485 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3486 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3487 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3488 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3489 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3490 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3491 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3492 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3493
3494 #. type: Plain text
3495 #: build/C/man3/pthread_attr_setstackaddr.3:123
3496 msgid ""
3497 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3498 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3499 msgstr ""
3500 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3501 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3502
3503 #. type: TH
3504 #: build/C/man3/pthread_attr_setstacksize.3:26
3505 #, no-wrap
3506 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3507 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3508
3509 #. type: Plain text
3510 #: build/C/man3/pthread_attr_setstacksize.3:30
3511 msgid ""
3512 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3513 "attribute in thread attributes object"
3514 msgstr ""
3515 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3516 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3517
3518 #. type: Plain text
3519 #: build/C/man3/pthread_attr_setstacksize.3:38
3520 #, no-wrap
3521 msgid ""
3522 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3523 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3524 msgstr ""
3525 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3526 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3527
3528 #. type: Plain text
3529 #: build/C/man3/pthread_attr_setstacksize.3:49
3530 msgid ""
3531 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3532 "of the thread attributes object referred to by I<attr> to the value "
3533 "specified in I<stacksize>."
3534 msgstr ""
3535 "B<pthread_attr_setstacksize>() 関数は、\n"
3536 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3537 "属性を I<stacksize> で指定された値に設定する。"
3538
3539 #. type: Plain text
3540 #: build/C/man3/pthread_attr_setstacksize.3:53
3541 msgid ""
3542 "The stack size attribute determines the minimum size (in bytes) that will be "
3543 "allocated for threads created using the thread attributes object I<attr>."
3544 msgstr ""
3545 "スタックサイズ属性により、\n"
3546 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3547 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3548
3549 #. type: Plain text
3550 #: build/C/man3/pthread_attr_setstacksize.3:61
3551 msgid ""
3552 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3553 "attribute of the thread attributes object referred to by I<attr> in the "
3554 "buffer pointed to by I<stacksize>."
3555 msgstr ""
3556 "B<pthread_attr_getstacksize>() は、\n"
3557 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3558 "I<stacksize> が指すバッファに入れて返す。"
3559
3560 #. type: Plain text
3561 #: build/C/man3/pthread_attr_setstacksize.3:67
3562 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3563 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3564
3565 #. type: Plain text
3566 #: build/C/man3/pthread_attr_setstacksize.3:72
3567 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3568 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3569
3570 #.  e.g., MacOS
3571 #. type: Plain text
3572 #: build/C/man3/pthread_attr_setstacksize.3:81
3573 msgid ""
3574 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3575 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3576 msgstr ""
3577 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3578 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3579 "エラー B<EINVAL> で失敗する。"
3580
3581 #. type: Plain text
3582 #: build/C/man3/pthread_attr_setstacksize.3:90
3583 #, fuzzy
3584 #| msgid ""
3585 #| "The B<pthread_attr_setguardsize>()  and B<pthread_attr_getguardsize>()  "
3586 #| "functions are thread-safe."
3587 msgid ""
3588 "The B<pthread_attr_setstacksize>()  and B<pthread_attr_getstacksize>()  "
3589 "functions are thread-safe."
3590 msgstr ""
3591 "関数e B<pthread_attr_setguardsize>() と B<pthread_attr_getguardsize>() はス"
3592 "レッドセーフである。"
3593
3594 #. type: Plain text
3595 #: build/C/man3/pthread_attr_setstacksize.3:95
3596 msgid ""
3597 "For details on the default stack size of new threads, see "
3598 "B<pthread_create>(3)."
3599 msgstr ""
3600 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3601 "B<pthread_create>(3) を参照。"
3602
3603 #. type: Plain text
3604 #: build/C/man3/pthread_attr_setstacksize.3:98
3605 msgid ""
3606 "A thread's stack size is fixed at the time of thread creation.  Only the "
3607 "main thread can dynamically grow its stack."
3608 msgstr ""
3609 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3610 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3611
3612 #. type: Plain text
3613 #: build/C/man3/pthread_attr_setstacksize.3:103
3614 msgid ""
3615 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3616 "the size and location of a caller-allocated stack that is to be used by a "
3617 "thread."
3618 msgstr ""
3619 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3620 "アプリケーションは、スレッドが使用するスタックとして、\n"
3621 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3622
3623 #. type: Plain text
3624 #: build/C/man3/pthread_attr_setstacksize.3:115
3625 msgid ""
3626 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3627 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3628 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3629 "stack will be at least I<stacksize> bytes."
3630 msgstr ""
3631 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3632 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3633 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3634 "これは POSIX.1-2001 に違反している。\n"
3635 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3636 "少なくとも I<stacksize> バイトになると書かれている。"
3637
3638 #. type: Plain text
3639 #: build/C/man3/pthread_attr_setstacksize.3:118
3640 #: build/C/man3/pthread_join.3:127
3641 msgid "See B<pthread_create>(3)."
3642 msgstr "B<pthread_create>(3) を参照。"
3643
3644 #. type: Plain text
3645 #: build/C/man3/pthread_attr_setstacksize.3:125
3646 msgid ""
3647 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3648 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3649 msgstr ""
3650 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3651 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3652
3653 #. type: TH
3654 #: build/C/man3/pthread_cancel.3:26
3655 #, no-wrap
3656 msgid "PTHREAD_CANCEL"
3657 msgstr "PTHREAD_CANCEL"
3658
3659 #. type: TH
3660 #: build/C/man3/pthread_cancel.3:26
3661 #, no-wrap
3662 msgid "2008-11-17"
3663 msgstr "2008-11-17"
3664
3665 #. type: Plain text
3666 #: build/C/man3/pthread_cancel.3:29
3667 msgid "pthread_cancel - send a cancellation request to a thread"
3668 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3669
3670 #. type: Plain text
3671 #: build/C/man3/pthread_cancel.3:34
3672 #, no-wrap
3673 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3674 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3675
3676 #. type: Plain text
3677 #: build/C/man3/pthread_cancel.3:49
3678 msgid ""
3679 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3680 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3681 "request depends on two attributes that are under the control of that thread: "
3682 "its cancelability I<state> and I<type>."
3683 msgstr ""
3684 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3685 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3686 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3687 "I<state> と I<type>により決まる。"
3688
3689 #. type: Plain text
3690 #: build/C/man3/pthread_cancel.3:61
3691 msgid ""
3692 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3693 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3694 "has disabled cancellation, then a cancellation request remains queued until "
3695 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3696 "its cancelability type determines when cancellation occurs."
3697 msgstr ""
3698 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3699 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3700 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3701 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3702 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3703 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3704
3705 #. type: Plain text
3706 #: build/C/man3/pthread_cancel.3:77
3707 msgid ""
3708 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3709 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3710 "Asynchronous cancelability means that the thread can be canceled at any time "
3711 "(usually immediately, but the system does not guarantee this).  Deferred "
3712 "cancelability means that cancellation will be delayed until the thread next "
3713 "calls a function that is a I<cancellation point>.  A list of functions that "
3714 "are or may be cancellation points is provided in B<pthreads>(7)."
3715 msgstr ""
3716 "スレッドのキャンセル種別 (cancelability type) は\n"
3717 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3718 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3719 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3720 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3721 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3722 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3723 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3724 "遅延される。取り消しポイントに設定されていたり設定\n"
3725 "したりできる関数のリストは B<pthreads>(7) に記載している。"
3726
3727 #. type: Plain text
3728 #: build/C/man3/pthread_cancel.3:81
3729 msgid ""
3730 "When a cancellation requested is acted on, the following steps occur for "
3731 "I<thread> (in this order):"
3732 msgstr ""
3733 "キャンセル要求が実行されると、\n"
3734 "I<thread> では以下のステップが (この順序で) 行われる。"
3735
3736 #. type: IP
3737 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3738 #, no-wrap
3739 msgid "1."
3740 msgstr "1."
3741
3742 #. type: Plain text
3743 #: build/C/man3/pthread_cancel.3:86
3744 msgid ""
3745 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3746 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3747 msgstr ""
3748 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3749 "取り出され (pop され)、呼び出される。\n"
3750 "(B<pthread_cleanup_push>(3) 参照)"
3751
3752 #. type: IP
3753 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3754 #, no-wrap
3755 msgid "2."
3756 msgstr "2."
3757
3758 #. type: Plain text
3759 #: build/C/man3/pthread_cancel.3:91
3760 msgid ""
3761 "Thread-specific data destructors are called, in an unspecified order.  (See "
3762 "B<pthread_key_create>(3).)"
3763 msgstr ""
3764 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3765 "呼び出し順序は規定されていない。\n"
3766 "(B<pthread_key_create>(3) 参照)"
3767
3768 #. type: IP
3769 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3770 #, no-wrap
3771 msgid "3."
3772 msgstr "3."
3773
3774 #. type: Plain text
3775 #: build/C/man3/pthread_cancel.3:95
3776 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3777 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3778
3779 #. type: Plain text
3780 #: build/C/man3/pthread_cancel.3:103
3781 msgid ""
3782 "The above steps happen asynchronously with respect to the "
3783 "B<pthread_cancel>()  call; the return status of B<pthread_cancel>()  merely "
3784 "informs the caller whether the cancellation request was successfully queued."
3785 msgstr ""
3786 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3787 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3788 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3789
3790 #. type: Plain text
3791 #: build/C/man3/pthread_cancel.3:112
3792 msgid ""
3793 "After a canceled thread has terminated, a join with that thread using "
3794 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3795 "status.  (Joining with a thread is the only way to know that cancellation "
3796 "has completed.)"
3797 msgstr ""
3798 "キャンセルされたスレッドが終了された後に、\n"
3799 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3800 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3801 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3802
3803 #. type: Plain text
3804 #: build/C/man3/pthread_cancel.3:117
3805 msgid ""
3806 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3807 "error number."
3808 msgstr ""
3809 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3810 "エラーの場合、0 以外のエラー番号を返す。"
3811
3812 #. type: TP
3813 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3814 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3815 #: build/C/man3/pthread_setaffinity_np.3:114
3816 #: build/C/man3/pthread_setschedparam.3:114
3817 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3818 #, no-wrap
3819 msgid "B<ESRCH>"
3820 msgstr "B<ESRCH>"
3821
3822 #. type: Plain text
3823 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3824 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3825 #: build/C/man3/pthread_setaffinity_np.3:119
3826 #: build/C/man3/pthread_setschedparam.3:119
3827 #: build/C/man3/pthread_setschedprio.3:75
3828 msgid "No thread with the ID I<thread> could be found."
3829 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3830
3831 #. type: Plain text
3832 #: build/C/man3/pthread_cancel.3:135
3833 msgid ""
3834 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3835 "threading implementation, the first real-time signal (i.e., signal 32) is "
3836 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3837 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3838 msgstr ""
3839 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3840 "は、\n"
3841 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3842 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3843 "ム\n"
3844 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3845
3846 #. type: Plain text
3847 #: build/C/man3/pthread_cancel.3:141
3848 msgid ""
3849 "The program below creates a thread and then cancels it.  The main thread "
3850 "joins with the canceled thread to check that its exit status was "
3851 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3852 "run the program:"
3853 msgstr ""
3854 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3855 "る。\n"
3856 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3857 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3858 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3859
3860 #. type: Plain text
3861 #: build/C/man3/pthread_cancel.3:149
3862 #, no-wrap
3863 msgid ""
3864 "$ ./a.out\n"
3865 "thread_func(): started; cancellation disabled\n"
3866 "main(): sending cancellation request\n"
3867 "thread_func(): about to enable cancellation\n"
3868 "main(): thread was canceled\n"
3869 msgstr ""
3870 "$ ./a.out\n"
3871 "thread_func(): started; cancellation disabled\n"
3872 "main(): sending cancellation request\n"
3873 "thread_func(): about to enable cancellation\n"
3874 "main(): thread was canceled\n"
3875
3876 #. type: Plain text
3877 #: build/C/man3/pthread_cancel.3:159
3878 #, no-wrap
3879 msgid ""
3880 "#include E<lt>pthread.hE<gt>\n"
3881 "#include E<lt>stdio.hE<gt>\n"
3882 "#include E<lt>errno.hE<gt>\n"
3883 "#include E<lt>stdlib.hE<gt>\n"
3884 "#include E<lt>unistd.hE<gt>\n"
3885 msgstr ""
3886 "#include E<lt>pthread.hE<gt>\n"
3887 "#include E<lt>stdio.hE<gt>\n"
3888 "#include E<lt>errno.hE<gt>\n"
3889 "#include E<lt>stdlib.hE<gt>\n"
3890 "#include E<lt>unistd.hE<gt>\n"
3891
3892 #. type: Plain text
3893 #: build/C/man3/pthread_cancel.3:167
3894 #, no-wrap
3895 msgid ""
3896 "static void *\n"
3897 "thread_func(void *ignored_argument)\n"
3898 "{\n"
3899 "    int s;\n"
3900 msgstr ""
3901 "static void *\n"
3902 "thread_func(void *ignored_argument)\n"
3903 "{\n"
3904 "    int s;\n"
3905
3906 #. type: Plain text
3907 #: build/C/man3/pthread_cancel.3:170
3908 #, no-wrap
3909 msgid ""
3910 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3911 "       immediately react to a cancellation request */\n"
3912 msgstr ""
3913 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3914 "       immediately react to a cancellation request */\n"
3915
3916 #. type: Plain text
3917 #: build/C/man3/pthread_cancel.3:174
3918 #, no-wrap
3919 msgid ""
3920 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3921 "    if (s != 0)\n"
3922 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3923 msgstr ""
3924 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3925 "    if (s != 0)\n"
3926 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3927
3928 #. type: Plain text
3929 #: build/C/man3/pthread_cancel.3:178
3930 #, no-wrap
3931 msgid ""
3932 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3933 "    sleep(5);\n"
3934 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3935 msgstr ""
3936 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3937 "    sleep(5);\n"
3938 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3939
3940 #. type: Plain text
3941 #: build/C/man3/pthread_cancel.3:182
3942 #, no-wrap
3943 msgid ""
3944 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3945 "    if (s != 0)\n"
3946 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3947 msgstr ""
3948 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3949 "    if (s != 0)\n"
3950 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3951
3952 #. type: Plain text
3953 #: build/C/man3/pthread_cancel.3:184
3954 #, no-wrap
3955 msgid "    /* sleep() is a cancellation point */\n"
3956 msgstr "    /* sleep() is a cancellation point */\n"
3957
3958 #. type: Plain text
3959 #: build/C/man3/pthread_cancel.3:186
3960 #, no-wrap
3961 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3962 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3963
3964 #. type: Plain text
3965 #: build/C/man3/pthread_cancel.3:188
3966 #, no-wrap
3967 msgid "    /* Should never get here */\n"
3968 msgstr "    /* Should never get here */\n"
3969
3970 #. type: Plain text
3971 #: build/C/man3/pthread_cancel.3:192
3972 #, no-wrap
3973 msgid ""
3974 "    printf(\"thread_func(): not canceled!\\en\");\n"
3975 "    return NULL;\n"
3976 "}\n"
3977 msgstr ""
3978 "    printf(\"thread_func(): not canceled!\\en\");\n"
3979 "    return NULL;\n"
3980 "}\n"
3981
3982 #. type: Plain text
3983 #: build/C/man3/pthread_cancel.3:199
3984 #, no-wrap
3985 msgid ""
3986 "int\n"
3987 "main(void)\n"
3988 "{\n"
3989 "    pthread_t thr;\n"
3990 "    void *res;\n"
3991 "    int s;\n"
3992 msgstr ""
3993 "int\n"
3994 "main(void)\n"
3995 "{\n"
3996 "    pthread_t thr;\n"
3997 "    void *res;\n"
3998 "    int s;\n"
3999
4000 #. type: Plain text
4001 #: build/C/man3/pthread_cancel.3:201
4002 #, no-wrap
4003 msgid "    /* Start a thread and then send it a cancellation request */\n"
4004 msgstr "    /* Start a thread and then send it a cancellation request */\n"
4005
4006 #. type: Plain text
4007 #: build/C/man3/pthread_cancel.3:205
4008 #, no-wrap
4009 msgid ""
4010 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
4011 "    if (s != 0)\n"
4012 "        handle_error_en(s, \"pthread_create\");\n"
4013 msgstr ""
4014 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
4015 "    if (s != 0)\n"
4016 "        handle_error_en(s, \"pthread_create\");\n"
4017
4018 #. type: Plain text
4019 #: build/C/man3/pthread_cancel.3:207
4020 #, no-wrap
4021 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
4022 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
4023
4024 #. type: Plain text
4025 #: build/C/man3/pthread_cancel.3:212
4026 #, no-wrap
4027 msgid ""
4028 "    printf(\"main(): sending cancellation request\\en\");\n"
4029 "    s = pthread_cancel(thr);\n"
4030 "    if (s != 0)\n"
4031 "        handle_error_en(s, \"pthread_cancel\");\n"
4032 msgstr ""
4033 "    printf(\"main(): sending cancellation request\\en\");\n"
4034 "    s = pthread_cancel(thr);\n"
4035 "    if (s != 0)\n"
4036 "        handle_error_en(s, \"pthread_cancel\");\n"
4037
4038 #. type: Plain text
4039 #: build/C/man3/pthread_cancel.3:214
4040 #, no-wrap
4041 msgid "    /* Join with thread to see what its exit status was */\n"
4042 msgstr "    /* Join with thread to see what its exit status was */\n"
4043
4044 #. type: Plain text
4045 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
4046 #, no-wrap
4047 msgid ""
4048 "    s = pthread_join(thr, &res);\n"
4049 "    if (s != 0)\n"
4050 "        handle_error_en(s, \"pthread_join\");\n"
4051 msgstr ""
4052 "    s = pthread_join(thr, &res);\n"
4053 "    if (s != 0)\n"
4054 "        handle_error_en(s, \"pthread_join\");\n"
4055
4056 #. type: Plain text
4057 #: build/C/man3/pthread_cancel.3:225
4058 #, no-wrap
4059 msgid ""
4060 "    if (res == PTHREAD_CANCELED)\n"
4061 "        printf(\"main(): thread was canceled\\en\");\n"
4062 "    else\n"
4063 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
4064 "    exit(EXIT_SUCCESS);\n"
4065 "}\n"
4066 msgstr ""
4067 "    if (res == PTHREAD_CANCELED)\n"
4068 "        printf(\"main(): thread was canceled\\en\");\n"
4069 "    else\n"
4070 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
4071 "    exit(EXIT_SUCCESS);\n"
4072 "}\n"
4073
4074 #. type: Plain text
4075 #: build/C/man3/pthread_cancel.3:238
4076 msgid ""
4077 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
4078 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
4079 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4080 msgstr ""
4081 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
4082 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
4083 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4084
4085 #. type: TH
4086 #: build/C/man3/pthread_cleanup_push.3:26
4087 #, no-wrap
4088 msgid "PTHREAD_CLEANUP_PUSH"
4089 msgstr "PTHREAD_CLEANUP_PUSH"
4090
4091 #. type: TH
4092 #: build/C/man3/pthread_cleanup_push.3:26
4093 #, no-wrap
4094 msgid "2008-11-24"
4095 msgstr "2008-11-24"
4096
4097 #. type: Plain text
4098 #: build/C/man3/pthread_cleanup_push.3:30
4099 msgid ""
4100 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
4101 "clean-up handlers"
4102 msgstr ""
4103 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
4104 "キャンセルクリーンアップハンドラの push/pop を行う"
4105
4106 #. type: Plain text
4107 #: build/C/man3/pthread_cleanup_push.3:37
4108 #, no-wrap
4109 msgid ""
4110 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
4111 "B<                          void *>I<arg>B<);>\n"
4112 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
4113 msgstr ""
4114 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
4115 "B<                          void *>I<arg>B<);>\n"
4116 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
4117
4118 #. type: Plain text
4119 #: build/C/man3/pthread_cleanup_push.3:48
4120 msgid ""
4121 "These functions manipulate the calling thread's stack of thread-cancellation "
4122 "clean-up handlers.  A clean-up handler is a function that is automatically "
4123 "executed when a thread is canceled (or in various other circumstances "
4124 "described below); it might, for example, unlock a mutex so that it becomes "
4125 "available to other threads in the process."
4126 msgstr ""
4127 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
4128 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
4129 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
4130 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
4131 "他のスレッドが利用できるようにする関数などが考えられる。"
4132
4133 #. type: Plain text
4134 #: build/C/man3/pthread_cleanup_push.3:59
4135 msgid ""
4136 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
4137 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
4138 "be given I<arg> as its argument."
4139 msgstr ""
4140 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
4141 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
4142 "起動される際には、 I<arg> が関数の引き数と渡される。"
4143
4144 #. type: Plain text
4145 #: build/C/man3/pthread_cleanup_push.3:66
4146 msgid ""
4147 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
4148 "stack of clean-up handlers, and optionally executes it if I<execute> is "
4149 "nonzero."
4150 msgstr ""
4151 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
4152 "スタックの一番上のルーチンを削除する。\n"
4153 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
4154
4155 #. type: Plain text
4156 #: build/C/man3/pthread_cleanup_push.3:69
4157 msgid ""
4158 "A cancellation clean-up handler is popped from the stack and executed in the "
4159 "following circumstances:"
4160 msgstr ""
4161 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
4162 "スタックから取り出され実行される。"
4163
4164 #. type: Plain text
4165 #: build/C/man3/pthread_cleanup_push.3:73
4166 msgid ""
4167 "When a thread is canceled, all of the stacked clean-up handlers are popped "
4168 "and executed in the reverse of the order in which they were pushed onto the "
4169 "stack."
4170 msgstr ""
4171 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
4172 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
4173 "実行は、スタックに登録されたのと逆の順序で行われる。"
4174
4175 #. type: Plain text
4176 #: build/C/man3/pthread_cleanup_push.3:83
4177 msgid ""
4178 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
4179 "handlers are executed as described in the preceding point.  (Clean-up "
4180 "handlers are I<not> called if the thread terminates by performing a "
4181 "I<return> from the thread start function.)"
4182 msgstr ""
4183 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
4184 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
4185 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
4186 "は、クリーンアップハンドラはI<呼び出されない>。)"
4187
4188 #. type: Plain text
4189 #: build/C/man3/pthread_cleanup_push.3:89
4190 msgid ""
4191 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
4192 "argument, the top-most clean-up handler is popped and executed."
4193 msgstr ""
4194 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
4195 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
4196 "実行される。"
4197
4198 #. type: Plain text
4199 #: build/C/man3/pthread_cleanup_push.3:101
4200 msgid ""
4201 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4202 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4203 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4204 "calls to these functions are paired within the same function, and at the "
4205 "same lexical nesting level.  (In other words, a clean-up handler is "
4206 "established only during the execution of a specified section of code.)"
4207 msgstr ""
4208 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4209 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4210 "して実装することを許容している。\n"
4211 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4212 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4213 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4214 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4215
4216 #. type: Plain text
4217 #: build/C/man3/pthread_cleanup_push.3:121
4218 msgid ""
4219 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4220 "call has been made to B<pthread_cleanup_push>()  or "
4221 "B<pthread_cleanup_pop>()  without the matching call of the pair since the "
4222 "jump buffer was filled by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, "
4223 "calling B<longjmp>(3)  (B<siglongjmp>(3))  from inside a clean-up handler "
4224 "produces undefined results unless the jump buffer was also filled by "
4225 "B<setjmp>(3)  (B<sigsetjmp>(3))  inside the handler."
4226 msgstr ""
4227 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4228 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4229 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4230 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4231 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4232 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4233 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4234 "結果になるかは不定である。"
4235
4236 #. type: Plain text
4237 #: build/C/man3/pthread_cleanup_push.3:123
4238 msgid "These functions do not return a value."
4239 msgstr "これらの関数は値を返さない。"
4240
4241 #.  SH VERSIONS
4242 #.  Available since glibc 2.0
4243 #. type: Plain text
4244 #: build/C/man3/pthread_cleanup_push.3:127
4245 msgid "There are no errors."
4246 msgstr "エラーはない。"
4247
4248 #. type: Plain text
4249 #: build/C/man3/pthread_cleanup_push.3:140
4250 msgid ""
4251 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4252 "functions I<are> implemented as macros that expand to text containing "
4253 "\\(aqB<{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4254 "declared within the scope of paired calls to these functions will be visible "
4255 "within only that scope."
4256 msgstr ""
4257 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4258 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4259 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4260 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4261 "ということを意味している。"
4262
4263 #.  The text was actually added in the 2004 TC2
4264 #. type: Plain text
4265 #: build/C/man3/pthread_cleanup_push.3:155
4266 msgid ""
4267 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4268 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4269 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4270 "avoid doing this."
4271 msgstr ""
4272 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4273 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4274 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4275 "不定であると書かれている。\n"
4276 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4277
4278 #. type: Plain text
4279 #: build/C/man3/pthread_cleanup_push.3:170
4280 msgid ""
4281 "The program below provides a simple example of the use of the functions "
4282 "described in this page.  The program creates a thread that executes a loop "
4283 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4284 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4285 "what command-line arguments are supplied, the main thread sends the other "
4286 "thread a cancellation request, or sets a global variable that causes the "
4287 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4288 msgstr ""
4289 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4290 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4291 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4292 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4293 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4294 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4295 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4296 "設定したりする。"
4297
4298 #. type: Plain text
4299 #: build/C/man3/pthread_cleanup_push.3:173
4300 msgid ""
4301 "In the following shell session, the main thread sends a cancellation request "
4302 "to the other thread:"
4303 msgstr ""
4304 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4305 "キャンセル要求を送信する。"
4306
4307 #. type: Plain text
4308 #: build/C/man3/pthread_cleanup_push.3:183
4309 #, no-wrap
4310 msgid ""
4311 "$ B<./a.out>\n"
4312 "New thread started\n"
4313 "cnt = 0\n"
4314 "cnt = 1\n"
4315 "Canceling thread\n"
4316 "Called clean-up handler\n"
4317 "Thread was canceled; cnt = 0\n"
4318 msgstr ""
4319 "$ B<./a.out>\n"
4320 "New thread started\n"
4321 "cnt = 0\n"
4322 "cnt = 1\n"
4323 "Canceling thread\n"
4324 "Called clean-up handler\n"
4325 "Thread was canceled; cnt = 0\n"
4326
4327 #. type: Plain text
4328 #: build/C/man3/pthread_cleanup_push.3:191
4329 msgid ""
4330 "From the above, we see that the thread was canceled, and that the "
4331 "cancellation clean-up handler was called and it reset the value of the "
4332 "global variable I<cnt> to 0."
4333 msgstr ""
4334 "上記の実行例から、スレッドがキャンセルされ、\n"
4335 "キャンセルクリーンアップハンドラが呼び出され、\n"
4336 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4337
4338 #. type: Plain text
4339 #: build/C/man3/pthread_cleanup_push.3:194
4340 msgid ""
4341 "In the next run, the main program sets a global variable that causes other "
4342 "thread to terminate normally:"
4343 msgstr ""
4344 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4345 "もう一つのスレッドが正常終了するようにしている。"
4346
4347 #. type: Plain text
4348 #: build/C/man3/pthread_cleanup_push.3:202
4349 #, no-wrap
4350 msgid ""
4351 "$ B<./a.out x>\n"
4352 "New thread started\n"
4353 "cnt = 0\n"
4354 "cnt = 1\n"
4355 "Thread terminated normally; cnt = 2\n"
4356 msgstr ""
4357 "$ B<./a.out x>\n"
4358 "New thread started\n"
4359 "cnt = 0\n"
4360 "cnt = 1\n"
4361 "Thread terminated normally; cnt = 2\n"
4362
4363 #. type: Plain text
4364 #: build/C/man3/pthread_cleanup_push.3:210
4365 msgid ""
4366 "From the above, we see that the clean-up handler was not executed (because "
4367 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4368 msgstr ""
4369 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4370 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4371 "分かる。"
4372
4373 #. type: Plain text
4374 #: build/C/man3/pthread_cleanup_push.3:215
4375 msgid ""
4376 "In the next run, the main program sets a global variable that causes the "
4377 "other thread to terminate normally, and supplies a nonzero value for "
4378 "I<cleanup_pop_arg>:"
4379 msgstr ""
4380 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4381 "もう一つのスレッドが正常終了するようにし、さらに\n"
4382 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4383
4384 #. type: Plain text
4385 #: build/C/man3/pthread_cleanup_push.3:224
4386 #, no-wrap
4387 msgid ""
4388 "$ B<./a.out x 1>\n"
4389 "New thread started\n"
4390 "cnt = 0\n"
4391 "cnt = 1\n"
4392 "Called clean-up handler\n"
4393 "Thread terminated normally; cnt = 0\n"
4394 msgstr ""
4395 "$ B<./a.out x 1>\n"
4396 "New thread started\n"
4397 "cnt = 0\n"
4398 "cnt = 1\n"
4399 "Called clean-up handler\n"
4400 "Thread terminated normally; cnt = 0\n"
4401
4402 #. type: Plain text
4403 #: build/C/man3/pthread_cleanup_push.3:231
4404 msgid ""
4405 "In the above, we see that although the thread was not canceled, the clean-up "
4406 "handler was executed, because the argument given to "
4407 "B<pthread_cleanup_pop>()  was nonzero."
4408 msgstr ""
4409 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4410 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4411 "に 0 以外を渡したからである。"
4412
4413 #. type: Plain text
4414 #: build/C/man3/pthread_cleanup_push.3:240
4415 #, no-wrap
4416 msgid ""
4417 "#include E<lt>pthread.hE<gt>\n"
4418 "#include E<lt>sys/types.hE<gt>\n"
4419 "#include E<lt>stdio.hE<gt>\n"
4420 "#include E<lt>stdlib.hE<gt>\n"
4421 "#include E<lt>unistd.hE<gt>\n"
4422 "#include E<lt>errno.hE<gt>\n"
4423 msgstr ""
4424 "#include E<lt>pthread.hE<gt>\n"
4425 "#include E<lt>sys/types.hE<gt>\n"
4426 "#include E<lt>stdio.hE<gt>\n"
4427 "#include E<lt>stdlib.hE<gt>\n"
4428 "#include E<lt>unistd.hE<gt>\n"
4429 "#include E<lt>errno.hE<gt>\n"
4430
4431 #. type: Plain text
4432 #: build/C/man3/pthread_cleanup_push.3:247
4433 #, no-wrap
4434 msgid ""
4435 "static int done = 0;\n"
4436 "static int cleanup_pop_arg = 0;\n"
4437 "static int cnt = 0;\n"
4438 msgstr ""
4439 "static int done = 0;\n"
4440 "static int cleanup_pop_arg = 0;\n"
4441 "static int cnt = 0;\n"
4442
4443 #. type: Plain text
4444 #: build/C/man3/pthread_cleanup_push.3:254
4445 #, no-wrap
4446 msgid ""
4447 "static void\n"
4448 "cleanup_handler(void *arg)\n"
4449 "{\n"
4450 "    printf(\"Called clean-up handler\\en\");\n"
4451 "    cnt = 0;\n"
4452 "}\n"
4453 msgstr ""
4454 "static void\n"
4455 "cleanup_handler(void *arg)\n"
4456 "{\n"
4457 "    printf(\"Called clean-up handler\\en\");\n"
4458 "    cnt = 0;\n"
4459 "}\n"
4460
4461 #. type: Plain text
4462 #: build/C/man3/pthread_cleanup_push.3:259
4463 #, no-wrap
4464 msgid ""
4465 "static void *\n"
4466 "thread_start(void *arg)\n"
4467 "{\n"
4468 "    time_t start, curr;\n"
4469 msgstr ""
4470 "static void *\n"
4471 "thread_start(void *arg)\n"
4472 "{\n"
4473 "    time_t start, curr;\n"
4474
4475 #. type: Plain text
4476 #: build/C/man3/pthread_cleanup_push.3:261
4477 #, no-wrap
4478 msgid "    printf(\"New thread started\\en\");\n"
4479 msgstr "    printf(\"New thread started\\en\");\n"
4480
4481 #. type: Plain text
4482 #: build/C/man3/pthread_cleanup_push.3:263
4483 #, no-wrap
4484 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4485 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4486
4487 #. type: Plain text
4488 #: build/C/man3/pthread_cleanup_push.3:265
4489 #, no-wrap
4490 msgid "    curr = start = time(NULL);\n"
4491 msgstr "    curr = start = time(NULL);\n"
4492
4493 #. type: Plain text
4494 #: build/C/man3/pthread_cleanup_push.3:274
4495 #, no-wrap
4496 msgid ""
4497 "    while (!done) {\n"
4498 "        pthread_testcancel();           /* A cancellation point */\n"
4499 "        if (curr E<lt> time(NULL)) {\n"
4500 "            curr = time(NULL);\n"
4501 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4502 "            cnt++;\n"
4503 "        }\n"
4504 "    }\n"
4505 msgstr ""
4506 "    while (!done) {\n"
4507 "        pthread_testcancel();           /* A cancellation point */\n"
4508 "        if (curr E<lt> time(NULL)) {\n"
4509 "            curr = time(NULL);\n"
4510 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4511 "            cnt++;\n"
4512 "        }\n"
4513 "    }\n"
4514
4515 #. type: Plain text
4516 #: build/C/man3/pthread_cleanup_push.3:278
4517 #, no-wrap
4518 msgid ""
4519 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4520 "    return NULL;\n"
4521 "}\n"
4522 msgstr ""
4523 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4524 "    return NULL;\n"
4525 "}\n"
4526
4527 #. type: Plain text
4528 #: build/C/man3/pthread_cleanup_push.3:285
4529 #, no-wrap
4530 msgid ""
4531 "int\n"
4532 "main(int argc, char *argv[])\n"
4533 "{\n"
4534 "    pthread_t thr;\n"
4535 "    int s;\n"
4536 "    void *res;\n"
4537 msgstr ""
4538 "int\n"
4539 "main(int argc, char *argv[])\n"
4540 "{\n"
4541 "    pthread_t thr;\n"
4542 "    int s;\n"
4543 "    void *res;\n"
4544
4545 #. type: Plain text
4546 #: build/C/man3/pthread_cleanup_push.3:289
4547 #, no-wrap
4548 msgid ""
4549 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4550 "    if (s != 0)\n"
4551 "        handle_error_en(s, \"pthread_create\");\n"
4552 msgstr ""
4553 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4554 "    if (s != 0)\n"
4555 "        handle_error_en(s, \"pthread_create\");\n"
4556
4557 #. type: Plain text
4558 #: build/C/man3/pthread_cleanup_push.3:291
4559 #, no-wrap
4560 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4561 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4562
4563 #. type: Plain text
4564 #: build/C/man3/pthread_cleanup_push.3:296
4565 #, no-wrap
4566 msgid ""
4567 "    if (argc E<gt> 1) {\n"
4568 "        if (argc E<gt> 2)\n"
4569 "            cleanup_pop_arg = atoi(argv[2]);\n"
4570 "        done = 1;\n"
4571 msgstr ""
4572 "    if (argc E<gt> 1) {\n"
4573 "        if (argc E<gt> 2)\n"
4574 "            cleanup_pop_arg = atoi(argv[2]);\n"
4575 "        done = 1;\n"
4576
4577 #. type: Plain text
4578 #: build/C/man3/pthread_cleanup_push.3:303
4579 #, no-wrap
4580 msgid ""
4581 "    } else {\n"
4582 "        printf(\"Canceling thread\\en\");\n"
4583 "        s = pthread_cancel(thr);\n"
4584 "        if (s != 0)\n"
4585 "            handle_error_en(s, \"pthread_cancel\");\n"
4586 "    }\n"
4587 msgstr ""
4588 "    } else {\n"
4589 "        printf(\"Canceling thread\\en\");\n"
4590 "        s = pthread_cancel(thr);\n"
4591 "        if (s != 0)\n"
4592 "            handle_error_en(s, \"pthread_cancel\");\n"
4593 "    }\n"
4594
4595 #. type: Plain text
4596 #: build/C/man3/pthread_cleanup_push.3:314
4597 #, no-wrap
4598 msgid ""
4599 "    if (res == PTHREAD_CANCELED)\n"
4600 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4601 "    else\n"
4602 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4603 "    exit(EXIT_SUCCESS);\n"
4604 "}\n"
4605 msgstr ""
4606 "    if (res == PTHREAD_CANCELED)\n"
4607 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4608 "    else\n"
4609 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4610 "    exit(EXIT_SUCCESS);\n"
4611 "}\n"
4612
4613 #. type: Plain text
4614 #: build/C/man3/pthread_cleanup_push.3:321
4615 msgid ""
4616 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4617 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4618 msgstr ""
4619 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4620 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4621
4622 #. type: TH
4623 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4624 #, no-wrap
4625 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4626 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4627
4628 #. type: TH
4629 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4630 #, no-wrap
4631 msgid "2008-12-04"
4632 msgstr "2008-12-04"
4633
4634 #. type: Plain text
4635 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4636 msgid ""
4637 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4638 "thread cancellation clean-up handlers while saving cancelability type"
4639 msgstr ""
4640 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4641 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4642 "の push/pop を行う"
4643
4644 #. type: Plain text
4645 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4646 #, no-wrap
4647 msgid ""
4648 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4649 "B<                                   void *>I<arg>B<);>\n"
4650 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4651 msgstr ""
4652 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4653 "B<                                   void *>I<arg>B<);>\n"
4654 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4655
4656 #. type: Plain text
4657 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4658 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4659 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4660 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4661 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4662 #: build/C/man3/pthread_yield.3:37
4663 msgid "Compile and link with I<-pthread>."
4664 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4665
4666 #. type: Plain text
4667 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4668 msgid ""
4669 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4670 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4671 msgstr ""
4672 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4673 "だが、このページで説明する点が異なる。"
4674
4675 #. type: Plain text
4676 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4677 msgid ""
4678 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4679 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4680 "addition, it also saves the thread's current cancelability type, and sets "
4681 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4682 "this ensures that cancellation clean-up will occur even if the thread's "
4683 "cancelability type was \"asynchronous\" before the call."
4684 msgstr ""
4685 "B<pthread_cleanup_push>(3) と同様に、\n"
4686 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4687 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4688 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4689 "保存し、cancelability type は \"deferred\" に設定する\n"
4690 "(B<pthread_setcanceltype>(3) 参照)。\n"
4691 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4692 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4693 "が保証される。"
4694
4695 #. type: Plain text
4696 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4697 msgid ""
4698 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4699 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4700 "up handlers.  In addition, it restores the thread's cancelability type to "
4701 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4702 msgstr ""
4703 "B<pthread_cleanup_pop>(3) と同様に、\n"
4704 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4705 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4706 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4707 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4708
4709 #. type: Plain text
4710 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4711 msgid ""
4712 "The caller must ensure that calls to these functions are paired within the "
4713 "same function, and at the same lexical nesting level.  Other restrictions "
4714 "apply, as described in B<pthread_cleanup_push>(3)."
4715 msgstr ""
4716 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4717 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4718 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4719 "適用される。"
4720
4721 #. type: Plain text
4722 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4723 msgid "This sequence of calls:"
4724 msgstr "以下の一連の呼び出し"
4725
4726 #. type: Plain text
4727 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4728 #, no-wrap
4729 msgid ""
4730 "pthread_cleanup_push_defer_np(routine, arg);\n"
4731 "pthread_cleanup_pop_restore_np(execute);\n"
4732 msgstr ""
4733 "pthread_cleanup_push_defer_np(routine, arg);\n"
4734 "pthread_cleanup_pop_restore_np(execute);\n"
4735
4736 #. type: Plain text
4737 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4738 msgid "is equivalent to (but shorter and more efficient than):"
4739 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4740
4741 #. type: Plain text
4742 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4743 #, no-wrap
4744 msgid "int oldtype;\n"
4745 msgstr "int oldtype;\n"
4746
4747 #. type: Plain text
4748 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4749 #, no-wrap
4750 msgid ""
4751 "pthread_cleanup_push(routine, arg);\n"
4752 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4753 "\\&...\n"
4754 "pthread_setcanceltype(oldtype, NULL);\n"
4755 "pthread_cleanup_pop(execute);\n"
4756 msgstr ""
4757 "pthread_cleanup_push(routine, arg);\n"
4758 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4759 "\\&...\n"
4760 "pthread_setcanceltype(oldtype, NULL);\n"
4761 "pthread_cleanup_pop(execute);\n"
4762
4763 #. type: Plain text
4764 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4765 msgid ""
4766 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
4767 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4768 msgstr ""
4769 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
4770 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4771
4772 #. type: TH
4773 #: build/C/man3/pthread_create.3:26
4774 #, no-wrap
4775 msgid "PTHREAD_CREATE"
4776 msgstr "PTHREAD_CREATE"
4777
4778 #. type: TH
4779 #: build/C/man3/pthread_create.3:26
4780 #, no-wrap
4781 msgid "2012-08-03"
4782 msgstr "2012-08-03"
4783
4784 #. type: Plain text
4785 #: build/C/man3/pthread_create.3:29
4786 msgid "pthread_create - create a new thread"
4787 msgstr "pthread_create - 新しいスレッドを作成する"
4788
4789 #. type: Plain text
4790 #: build/C/man3/pthread_create.3:35
4791 #, no-wrap
4792 msgid ""
4793 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4794 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4795 msgstr ""
4796 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4797 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4798
4799 #. type: Plain text
4800 #: build/C/man3/pthread_create.3:47
4801 msgid ""
4802 "The B<pthread_create>()  function starts a new thread in the calling "
4803 "process.  The new thread starts execution by invoking I<start_routine>(); "
4804 "I<arg> is passed as the sole argument of I<start_routine>()."
4805 msgstr ""
4806 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4807 "る。\n"
4808 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4809 "I<start_routine>() は引き数を一つだけ取り、\n"
4810 "I<arg> が I<start_routine>() の引き数として渡される。"
4811
4812 #. type: Plain text
4813 #: build/C/man3/pthread_create.3:49
4814 msgid "The new thread terminates in one of the following ways:"
4815 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4816
4817 #. type: IP
4818 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4819 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4820 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4821 #: build/C/man3/pthread_getattr_np.3:58
4822 #, no-wrap
4823 msgid "*"
4824 msgstr "*"
4825
4826 #. type: Plain text
4827 #: build/C/man3/pthread_create.3:55
4828 msgid ""
4829 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4830 "available to another thread in the same process that calls "
4831 "B<pthread_join>(3)."
4832 msgstr ""
4833 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4834 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4835 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4836 "別のスレッドで参照できる。"
4837
4838 #. type: Plain text
4839 #: build/C/man3/pthread_create.3:63
4840 msgid ""
4841 "It returns from I<start_routine>().  This is equivalent to calling "
4842 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4843 msgstr ""
4844 "スレッドが I<start_routine>() から返る。これは、\n"
4845 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4846
4847 #. type: Plain text
4848 #: build/C/man3/pthread_create.3:66
4849 msgid "It is canceled (see B<pthread_cancel>(3))."
4850 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4851
4852 #. type: Plain text
4853 #: build/C/man3/pthread_create.3:72
4854 msgid ""
4855 "Any of the threads in the process calls B<exit>(3), or the main thread "
4856 "performs a return from I<main>().  This causes the termination of all "
4857 "threads in the process."
4858 msgstr ""
4859 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4860 "メインスレッドで I<main>() 内で return が実行される。\n"
4861 "この場合は、プロセス内の全てのスレッドが終了される。"
4862
4863 #. type: Plain text
4864 #: build/C/man3/pthread_create.3:86
4865 msgid ""
4866 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4867 "are used at thread creation time to determine attributes for the new thread; "
4868 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4869 "functions.  If I<attr> is NULL, then the thread is created with default "
4870 "attributes."
4871 msgstr ""
4872 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4873 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4874 "新しいスレッドの属性が決定される。\n"
4875 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4876 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4877
4878 #. type: Plain text
4879 #: build/C/man3/pthread_create.3:93
4880 msgid ""
4881 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4882 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4883 "used to refer to the thread in subsequent calls to other pthreads functions."
4884 msgstr ""
4885 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4886 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4887 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4888
4889 #. type: Plain text
4890 #: build/C/man3/pthread_create.3:101
4891 msgid ""
4892 "The new thread inherits a copy of the creating thread's signal mask "
4893 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4894 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4895 "thread's alternate signal stack (B<sigaltstack>(2))."
4896 msgstr ""
4897 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4898 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4899 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4900 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4901 "(B<sigaltstack>(2)) を継承しない。"
4902
4903 #. type: Plain text
4904 #: build/C/man3/pthread_create.3:104
4905 msgid ""
4906 "The new thread inherits the calling thread's floating-point environment "
4907 "(B<fenv>(3))."
4908 msgstr ""
4909 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4910 "を継承する。"
4911
4912 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4913 #. type: Plain text
4914 #: build/C/man3/pthread_create.3:109
4915 msgid ""
4916 "The initial value of the new thread's CPU-time clock is 0 (see "
4917 "B<pthread_getcpuclockid>(3))."
4918 msgstr ""
4919 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4920 "(B<pthread_getcpuclockid>(3) 参照)。"
4921
4922 #. type: SS
4923 #: build/C/man3/pthread_create.3:109
4924 #, no-wrap
4925 msgid "Linux-specific details"
4926 msgstr "Linux 固有の詳細"
4927
4928 #. type: Plain text
4929 #: build/C/man3/pthread_create.3:115
4930 msgid ""
4931 "The new thread inherits copies of the calling thread's capability sets (see "
4932 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4933 msgstr ""
4934 "新しいスレッドは、呼び出したスレッドの\n"
4935 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4936 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4937 "コピーをを継承しない。"
4938
4939 #. type: Plain text
4940 #: build/C/man3/pthread_create.3:122
4941 msgid ""
4942 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4943 "number, and the contents of I<*thread> are undefined."
4944 msgstr ""
4945 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4946 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4947
4948 #. type: TP
4949 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4950 #, no-wrap
4951 msgid "B<EAGAIN>"
4952 msgstr "B<EAGAIN>"
4953
4954 #. type: Plain text
4955 #: build/C/man3/pthread_create.3:137
4956 msgid ""
4957 "Insufficient resources to create another thread, or a system-imposed limit "
4958 "on the number of threads was encountered.  The latter case may occur in two "
4959 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4960 "which limits the number of process for a real user ID, was reached; or the "
4961 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4962 "threads-max>, was reached."
4963 msgstr ""
4964 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4965 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4966 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4967 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4968 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4969 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4970
4971 #. type: Plain text
4972 #: build/C/man3/pthread_create.3:141
4973 msgid "Invalid settings in I<attr>."
4974 msgstr "I<attr> で指定された設定が不正である。"
4975
4976 #. type: TP
4977 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4978 #: build/C/man3/pthread_setschedprio.3:66
4979 #, no-wrap
4980 msgid "B<EPERM>"
4981 msgstr "B<EPERM>"
4982
4983 #. type: Plain text
4984 #: build/C/man3/pthread_create.3:146
4985 msgid ""
4986 "No permission to set the scheduling policy and parameters specified in "
4987 "I<attr>."
4988 msgstr ""
4989 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4990 "設定する許可がない。"
4991
4992 #. type: Plain text
4993 #: build/C/man3/pthread_create.3:160
4994 msgid ""
4995 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4996 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4997 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4998 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4999 msgstr ""
5000 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
5001 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
5002 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
5003 "B<pthread_create>() の呼び出し後に、\n"
5004 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
5005 "次に実行されるかは決まっていない。"
5006
5007 #. type: Plain text
5008 #: build/C/man3/pthread_create.3:180
5009 msgid ""
5010 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
5011 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
5012 "terminate and fetch its exit status.  Only when a terminated joinable thread "
5013 "has been joined are the last of its resources released back to the system.  "
5014 "When a detached thread terminates, its resources are automatically released "
5015 "back to the system: it is not possible to join with the thread in order to "
5016 "obtain its exit status.  Making a thread detached is useful for some types "
5017 "of daemon threads whose exit status the application does not need to care "
5018 "about.  By default, a new thread is created in a joinable state, unless "
5019 "I<attr> was set to create the thread in a detached state (using "
5020 "B<pthread_attr_setdetachstate>(3))."
5021 msgstr ""
5022 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
5023 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
5024 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
5025 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
5026 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
5027 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
5028 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
5029 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
5030 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
5031 "デーモン (daemon) スレッドでは有用である。\n"
5032 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
5033 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
5034 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
5035 "作成される。"
5036
5037 #.  FIXME . Perhaps some of the following detail should be in
5038 #.  a future pthread_attr_setstacksize(3) page.
5039 #. type: Plain text
5040 #: build/C/man3/pthread_create.3:196
5041 msgid ""
5042 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
5043 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
5044 "resource limit I<at the time the program started> has any value other than "
5045 "\"unlimited\", then it determines the default stack size of new threads.  "
5046 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
5047 "explicitly set in the I<attr> argument used to create a thread, in order to "
5048 "obtain a stack size other than the default."
5049 msgstr ""
5050 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
5051 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
5052 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
5053 "フォルトのスタックサイズとなる。\n"
5054 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
5055 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
5056 "デフォルト値以外のスタックサイズを得ることができる。"
5057
5058 #. type: Plain text
5059 #: build/C/man3/pthread_create.3:202
5060 msgid ""
5061 "In the obsolete LinuxThreads implementation, each of the threads in a "
5062 "process has a different process ID.  This is in violation of the POSIX "
5063 "threads specification, and is the source of many other nonconformances to "
5064 "the standard; see B<pthreads>(7)."
5065 msgstr ""
5066 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
5067 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
5068 "他の多くの標準非準拠の点の原因になっている。\n"
5069 "B<pthreads>(7) を参照のこと。"
5070
5071 #. type: Plain text
5072 #: build/C/man3/pthread_create.3:206
5073 msgid ""
5074 "The program below demonstrates the use of B<pthread_create>(), as well as a "
5075 "number of other functions in the pthreads API."
5076 msgstr ""
5077 "以下のプログラムは、 B<pthread_create>() や\n"
5078 "pthreads API の他のいろいろな関数の使用例を示している。"
5079
5080 #. type: Plain text
5081 #: build/C/man3/pthread_create.3:211
5082 msgid ""
5083 "In the following run, on a system providing the NPTL threading "
5084 "implementation, the stack size defaults to the value given by the \"stack "
5085 "size\" resource limit:"
5086 msgstr ""
5087 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
5088 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
5089 "になる。"
5090
5091 #. type: Plain text
5092 #: build/C/man3/pthread_create.3:223
5093 #, no-wrap
5094 msgid ""
5095 "$B< ulimit -s>\n"
5096 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
5097 "$B< ./a.out hola salut servus>\n"
5098 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
5099 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
5100 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
5101 "Joined with thread 1; returned value was HOLA\n"
5102 "Joined with thread 2; returned value was SALUT\n"
5103 "Joined with thread 3; returned value was SERVUS\n"
5104 msgstr ""
5105 "$B< ulimit -s>\n"
5106 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
5107 "$B< ./a.out hola salut servus>\n"
5108 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
5109 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
5110 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
5111 "Joined with thread 1; returned value was HOLA\n"
5112 "Joined with thread 2; returned value was SALUT\n"
5113 "Joined with thread 3; returned value was SERVUS\n"
5114
5115 #. type: Plain text
5116 #: build/C/man3/pthread_create.3:229
5117 msgid ""
5118 "In the next run, the program explicitly sets a stack size of 1MB (using "
5119 "B<pthread_attr_setstacksize>(3))  for the created threads:"
5120 msgstr ""
5121 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
5122 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
5123 "明示的に設定している。"
5124
5125 #. type: Plain text
5126 #: build/C/man3/pthread_create.3:239
5127 #, no-wrap
5128 msgid ""
5129 "$B< ./a.out -s 0x100000 hola salut servus>\n"
5130 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
5131 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
5132 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
5133 "Joined with thread 1; returned value was HOLA\n"
5134 "Joined with thread 2; returned value was SALUT\n"
5135 "Joined with thread 3; returned value was SERVUS\n"
5136 msgstr ""
5137 "$B< ./a.out -s 0x100000 hola salut servus>\n"
5138 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
5139 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
5140 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
5141 "Joined with thread 1; returned value was HOLA\n"
5142 "Joined with thread 2; returned value was SALUT\n"
5143 "Joined with thread 3; returned value was SERVUS\n"
5144
5145 #. type: Plain text
5146 #: build/C/man3/pthread_create.3:251
5147 #, no-wrap
5148 msgid ""
5149 "#include E<lt>pthread.hE<gt>\n"
5150 "#include E<lt>string.hE<gt>\n"
5151 "#include E<lt>stdio.hE<gt>\n"
5152 "#include E<lt>stdlib.hE<gt>\n"
5153 "#include E<lt>unistd.hE<gt>\n"
5154 "#include E<lt>errno.hE<gt>\n"
5155 "#include E<lt>ctype.hE<gt>\n"
5156 msgstr ""
5157 "#include E<lt>pthread.hE<gt>\n"
5158 "#include E<lt>string.hE<gt>\n"
5159 "#include E<lt>stdio.hE<gt>\n"
5160 "#include E<lt>stdlib.hE<gt>\n"
5161 "#include E<lt>unistd.hE<gt>\n"
5162 "#include E<lt>errno.hE<gt>\n"
5163 "#include E<lt>ctype.hE<gt>\n"
5164
5165 #. type: Plain text
5166 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:111
5167 #, no-wrap
5168 msgid ""
5169 "#define handle_error(msg) \\e\n"
5170 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5171 msgstr ""
5172 "#define handle_error(msg) \\e\n"
5173 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
5174
5175 #. type: Plain text
5176 #: build/C/man3/pthread_create.3:263
5177 #, no-wrap
5178 msgid ""
5179 "struct thread_info {    /* Used as argument to thread_start() */\n"
5180 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5181 "    int       thread_num;       /* Application-defined thread # */\n"
5182 "    char     *argv_string;      /* From command-line argument */\n"
5183 "};\n"
5184 msgstr ""
5185 "struct thread_info {    /* Used as argument to thread_start() */\n"
5186 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5187 "    int       thread_num;       /* Application-defined thread # */\n"
5188 "    char     *argv_string;      /* From command-line argument */\n"
5189 "};\n"
5190
5191 #. type: Plain text
5192 #: build/C/man3/pthread_create.3:266
5193 #, no-wrap
5194 msgid ""
5195 "/* Thread start function: display address near top of our stack,\n"
5196 "   and return upper-cased copy of argv_string */\n"
5197 msgstr ""
5198 "/* Thread start function: display address near top of our stack,\n"
5199 "   and return upper-cased copy of argv_string */\n"
5200
5201 #. type: Plain text
5202 #: build/C/man3/pthread_create.3:272
5203 #, no-wrap
5204 msgid ""
5205 "static void *\n"
5206 "thread_start(void *arg)\n"
5207 "{\n"
5208 "    struct thread_info *tinfo = arg;\n"
5209 "    char *uargv, *p;\n"
5210 msgstr ""
5211 "static void *\n"
5212 "thread_start(void *arg)\n"
5213 "{\n"
5214 "    struct thread_info *tinfo = arg;\n"
5215 "    char *uargv, *p;\n"
5216
5217 #. type: Plain text
5218 #: build/C/man3/pthread_create.3:275
5219 #, no-wrap
5220 msgid ""
5221 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5222 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5223 msgstr ""
5224 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5225 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5226
5227 #. type: Plain text
5228 #: build/C/man3/pthread_create.3:279
5229 #, no-wrap
5230 msgid ""
5231 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5232 "    if (uargv == NULL)\n"
5233 "        handle_error(\"strdup\");\n"
5234 msgstr ""
5235 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5236 "    if (uargv == NULL)\n"
5237 "        handle_error(\"strdup\");\n"
5238
5239 #. type: Plain text
5240 #: build/C/man3/pthread_create.3:282
5241 #, no-wrap
5242 msgid ""
5243 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5244 "        *p = toupper(*p);\n"
5245 msgstr ""
5246 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5247 "        *p = toupper(*p);\n"
5248
5249 #. type: Plain text
5250 #: build/C/man3/pthread_create.3:285
5251 #, no-wrap
5252 msgid ""
5253 "    return uargv;\n"
5254 "}\n"
5255 msgstr ""
5256 "    return uargv;\n"
5257 "}\n"
5258
5259 #. type: Plain text
5260 #: build/C/man3/pthread_create.3:294
5261 #, no-wrap
5262 msgid ""
5263 "int\n"
5264 "main(int argc, char *argv[])\n"
5265 "{\n"
5266 "    int s, tnum, opt, num_threads;\n"
5267 "    struct thread_info *tinfo;\n"
5268 "    pthread_attr_t attr;\n"
5269 "    int stack_size;\n"
5270 "    void *res;\n"
5271 msgstr ""
5272 "int\n"
5273 "main(int argc, char *argv[])\n"
5274 "{\n"
5275 "    int s, tnum, opt, num_threads;\n"
5276 "    struct thread_info *tinfo;\n"
5277 "    pthread_attr_t attr;\n"
5278 "    int stack_size;\n"
5279 "    void *res;\n"
5280
5281 #. type: Plain text
5282 #: build/C/man3/pthread_create.3:296
5283 #, no-wrap
5284 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5285 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5286
5287 #. type: Plain text
5288 #: build/C/man3/pthread_create.3:303
5289 #, no-wrap
5290 msgid ""
5291 "    stack_size = -1;\n"
5292 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5293 "        switch (opt) {\n"
5294 "        case \\(aqs\\(aq:\n"
5295 "            stack_size = strtoul(optarg, NULL, 0);\n"
5296 "            break;\n"
5297 msgstr ""
5298 "    stack_size = -1;\n"
5299 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5300 "        switch (opt) {\n"
5301 "        case \\(aqs\\(aq:\n"
5302 "            stack_size = strtoul(optarg, NULL, 0);\n"
5303 "            break;\n"
5304
5305 #. type: Plain text
5306 #: build/C/man3/pthread_create.3:310
5307 #, no-wrap
5308 msgid ""
5309 "        default:\n"
5310 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5311 "                    argv[0]);\n"
5312 "            exit(EXIT_FAILURE);\n"
5313 "        }\n"
5314 "    }\n"
5315 msgstr ""
5316 "        default:\n"
5317 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5318 "                    argv[0]);\n"
5319 "            exit(EXIT_FAILURE);\n"
5320 "        }\n"
5321 "    }\n"
5322
5323 #. type: Plain text
5324 #: build/C/man3/pthread_create.3:312
5325 #, no-wrap
5326 msgid "    num_threads = argc - optind;\n"
5327 msgstr "    num_threads = argc - optind;\n"
5328
5329 #. type: Plain text
5330 #: build/C/man3/pthread_create.3:314
5331 #, no-wrap
5332 msgid "    /* Initialize thread creation attributes */\n"
5333 msgstr "    /* Initialize thread creation attributes */\n"
5334
5335 #. type: Plain text
5336 #: build/C/man3/pthread_create.3:318
5337 #, no-wrap
5338 msgid ""
5339 "    s = pthread_attr_init(&attr);\n"
5340 "    if (s != 0)\n"
5341 "        handle_error_en(s, \"pthread_attr_init\");\n"
5342 msgstr ""
5343 "    s = pthread_attr_init(&attr);\n"
5344 "    if (s != 0)\n"
5345 "        handle_error_en(s, \"pthread_attr_init\");\n"
5346
5347 #. type: Plain text
5348 #: build/C/man3/pthread_create.3:324
5349 #, no-wrap
5350 msgid ""
5351 "    if (stack_size E<gt> 0) {\n"
5352 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5353 "        if (s != 0)\n"
5354 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5355 "    }\n"
5356 msgstr ""
5357 "    if (stack_size E<gt> 0) {\n"
5358 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5359 "        if (s != 0)\n"
5360 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5361 "    }\n"
5362
5363 #. type: Plain text
5364 #: build/C/man3/pthread_create.3:326
5365 #, no-wrap
5366 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5367 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5368
5369 #. type: Plain text
5370 #: build/C/man3/pthread_create.3:330
5371 #, no-wrap
5372 msgid ""
5373 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5374 "    if (tinfo == NULL)\n"
5375 "        handle_error(\"calloc\");\n"
5376 msgstr ""
5377 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5378 "    if (tinfo == NULL)\n"
5379 "        handle_error(\"calloc\");\n"
5380
5381 #. type: Plain text
5382 #: build/C/man3/pthread_create.3:332
5383 #, no-wrap
5384 msgid "    /* Create one thread for each command-line argument */\n"
5385 msgstr "    /* Create one thread for each command-line argument */\n"
5386
5387 #. type: Plain text
5388 #: build/C/man3/pthread_create.3:336
5389 #, no-wrap
5390 msgid ""
5391 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5392 "        tinfo[tnum].thread_num = tnum + 1;\n"
5393 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5394 msgstr ""
5395 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5396 "        tinfo[tnum].thread_num = tnum + 1;\n"
5397 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5398
5399 #. type: Plain text
5400 #: build/C/man3/pthread_create.3:339
5401 #, no-wrap
5402 msgid ""
5403 "        /* The pthread_create() call stores the thread ID into\n"
5404 "           corresponding element of tinfo[] */\n"
5405 msgstr ""
5406 "        /* The pthread_create() call stores the thread ID into\n"
5407 "           corresponding element of tinfo[] */\n"
5408
5409 #. type: Plain text
5410 #: build/C/man3/pthread_create.3:345
5411 #, no-wrap
5412 msgid ""
5413 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5414 "                           &thread_start, &tinfo[tnum]);\n"
5415 "        if (s != 0)\n"
5416 "            handle_error_en(s, \"pthread_create\");\n"
5417 "    }\n"
5418 msgstr ""
5419 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5420 "                           &thread_start, &tinfo[tnum]);\n"
5421 "        if (s != 0)\n"
5422 "            handle_error_en(s, \"pthread_create\");\n"
5423 "    }\n"
5424
5425 #. type: Plain text
5426 #: build/C/man3/pthread_create.3:348
5427 #, no-wrap
5428 msgid ""
5429 "    /* Destroy the thread attributes object, since it is no\n"
5430 "       longer needed */\n"
5431 msgstr ""
5432 "    /* Destroy the thread attributes object, since it is no\n"
5433 "       longer needed */\n"
5434
5435 #. type: Plain text
5436 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:430
5437 #, no-wrap
5438 msgid ""
5439 "    s = pthread_attr_destroy(&attr);\n"
5440 "    if (s != 0)\n"
5441 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5442 msgstr ""
5443 "    s = pthread_attr_destroy(&attr);\n"
5444 "    if (s != 0)\n"
5445 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5446
5447 #. type: Plain text
5448 #: build/C/man3/pthread_create.3:354
5449 #, no-wrap
5450 msgid "    /* Now join with each thread, and display its returned value */\n"
5451 msgstr "    /* Now join with each thread, and display its returned value */\n"
5452
5453 #. type: Plain text
5454 #: build/C/man3/pthread_create.3:359
5455 #, no-wrap
5456 msgid ""
5457 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5458 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5459 "        if (s != 0)\n"
5460 "            handle_error_en(s, \"pthread_join\");\n"
5461 msgstr ""
5462 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5463 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5464 "        if (s != 0)\n"
5465 "            handle_error_en(s, \"pthread_join\");\n"
5466
5467 #. type: Plain text
5468 #: build/C/man3/pthread_create.3:364
5469 #, no-wrap
5470 msgid ""
5471 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5472 "                tinfo[tnum].thread_num, (char *) res);\n"
5473 "        free(res);      /* Free memory allocated by thread */\n"
5474 "    }\n"
5475 msgstr ""
5476 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5477 "                tinfo[tnum].thread_num, (char *) res);\n"
5478 "        free(res);      /* Free memory allocated by thread */\n"
5479 "    }\n"
5480
5481 #. type: Plain text
5482 #: build/C/man3/pthread_create.3:368
5483 #, no-wrap
5484 msgid ""
5485 "    free(tinfo);\n"
5486 "    exit(EXIT_SUCCESS);\n"
5487 "}\n"
5488 msgstr ""
5489 "    free(tinfo);\n"
5490 "    exit(EXIT_SUCCESS);\n"
5491 "}\n"
5492
5493 #. type: Plain text
5494 #: build/C/man3/pthread_create.3:382
5495 msgid ""
5496 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5497 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5498 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), "
5499 "B<pthreads>(7)"
5500 msgstr ""
5501 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5502 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5503 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), "
5504 "B<pthreads>(7)"
5505
5506 #. type: TH
5507 #: build/C/man3/pthread_detach.3:26
5508 #, no-wrap
5509 msgid "PTHREAD_DETACH"
5510 msgstr "PTHREAD_DETACH"
5511
5512 #. type: TH
5513 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5514 #, no-wrap
5515 msgid "2008-11-27"
5516 msgstr "2008-11-27"
5517
5518 #. type: Plain text
5519 #: build/C/man3/pthread_detach.3:29
5520 msgid "pthread_detach - detach a thread"
5521 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5522
5523 #. type: Plain text
5524 #: build/C/man3/pthread_detach.3:34
5525 #, no-wrap
5526 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5527 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5528
5529 #. type: Plain text
5530 #: build/C/man3/pthread_detach.3:46
5531 msgid ""
5532 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5533 "as detached.  When a detached thread terminates, its resources are "
5534 "automatically released back to the system without the need for another "
5535 "thread to join with the terminated thread."
5536 msgstr ""
5537 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5538 "detached (切り離された状態) という印を付ける。\n"
5539 "detached 状態のスレッドが終了すると、\n"
5540 "別のスレッドが終了されたスレッドを join しなくても、\n"
5541 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5542
5543 #. type: Plain text
5544 #: build/C/man3/pthread_detach.3:49
5545 msgid ""
5546 "Attempting to detach an already detached thread results in unspecified "
5547 "behavior."
5548 msgstr ""
5549 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5550 "どのような結果となるかは規定されていない。"
5551
5552 #. type: Plain text
5553 #: build/C/man3/pthread_detach.3:54
5554 msgid ""
5555 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5556 "number."
5557 msgstr ""
5558 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5559 "エラーの場合、エラー番号を返す。"
5560
5561 #. type: Plain text
5562 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5563 msgid "I<thread> is not a joinable thread."
5564 msgstr "I<thread> が join 可能なスレッドではない。"
5565
5566 #. type: Plain text
5567 #: build/C/man3/pthread_detach.3:70
5568 msgid ""
5569 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5570 "or be made joinable again."
5571 msgstr ""
5572 "いったんスレッドを detached 状態にすると、\n"
5573 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5574 "もう一度 join 可能にしたりすることはできない。"
5575
5576 #. type: Plain text
5577 #: build/C/man3/pthread_detach.3:77
5578 msgid ""
5579 "A new thread can be created in a detached state using "
5580 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5581 "I<attr> argument of B<pthread_create>(3)."
5582 msgstr ""
5583 "B<pthread_attr_setdetachstate>(3) を使って\n"
5584 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5585 "新しいスレッドを detached 状態で作成することができる。"
5586
5587 #. type: Plain text
5588 #: build/C/man3/pthread_detach.3:84
5589 msgid ""
5590 "The detached attribute merely determines the behavior of the system when the "
5591 "thread terminates; it does not prevent the thread from being terminated if "
5592 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5593 "thread returns)."
5594 msgstr ""
5595 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5596 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5597 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5598 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5599
5600 #. type: Plain text
5601 #: build/C/man3/pthread_detach.3:93
5602 msgid ""
5603 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5604 "thread that an application creates, so that system resources for the thread "
5605 "can be released.  (But note that the resources of all threads are freed when "
5606 "the process terminates.)"
5607 msgstr ""
5608 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5609 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5610 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5611 "終了するときには、全てのスレッドのリソースが解放される)。"
5612
5613 #. type: Plain text
5614 #: build/C/man3/pthread_detach.3:95
5615 msgid "The following statement detaches the calling thread:"
5616 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5617
5618 #. type: Plain text
5619 #: build/C/man3/pthread_detach.3:97
5620 #, no-wrap
5621 msgid "    pthread_detach(pthread_self());\n"
5622 msgstr "    pthread_detach(pthread_self());\n"
5623
5624 #. type: Plain text
5625 #: build/C/man3/pthread_detach.3:104
5626 msgid ""
5627 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), "
5628 "B<pthread_create>(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5629 msgstr ""
5630 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), "
5631 "B<pthread_create>(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5632
5633 #. type: TH
5634 #: build/C/man3/pthread_equal.3:26
5635 #, no-wrap
5636 msgid "PTHREAD_EQUAL"
5637 msgstr "PTHREAD_EQUAL"
5638
5639 #. type: TH
5640 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5641 #, no-wrap
5642 msgid "2009-03-30"
5643 msgstr "2009-03-30"
5644
5645 #. type: Plain text
5646 #: build/C/man3/pthread_equal.3:29
5647 msgid "pthread_equal - compare thread IDs"
5648 msgstr "pthread_equal - スレッド ID を比較する"
5649
5650 #. type: Plain text
5651 #: build/C/man3/pthread_equal.3:34
5652 #, no-wrap
5653 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5654 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5655
5656 #. type: Plain text
5657 #: build/C/man3/pthread_equal.3:41
5658 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5659 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5660
5661 #. type: Plain text
5662 #: build/C/man3/pthread_equal.3:45
5663 msgid ""
5664 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5665 "value; otherwise, it returns 0."
5666 msgstr ""
5667 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5668 "そうでなければ 0 を返す。"
5669
5670 #.  SH VERSIONS
5671 #.  Available since glibc 2.0
5672 #. type: Plain text
5673 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5674 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5675 msgid "This function always succeeds."
5676 msgstr "この関数は常に成功する。"
5677
5678 #. type: Plain text
5679 #: build/C/man3/pthread_equal.3:56
5680 msgid ""
5681 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5682 "considered opaque: there is no portable way for applications to directly "
5683 "compare two I<pthread_t> values."
5684 msgstr ""
5685 "B<pthread_equal>() 関数が必要なのは、\n"
5686 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5687 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5688 "移植性を確保できる形で比較する方法はない。"
5689
5690 #. type: Plain text
5691 #: build/C/man3/pthread_equal.3:60
5692 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5693 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5694
5695 #. type: TH
5696 #: build/C/man3/pthread_exit.3:26
5697 #, no-wrap
5698 msgid "PTHREAD_EXIT"
5699 msgstr "PTHREAD_EXIT"
5700
5701 #. type: Plain text
5702 #: build/C/man3/pthread_exit.3:29
5703 msgid "pthread_exit - terminate calling thread"
5704 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5705
5706 #. type: Plain text
5707 #: build/C/man3/pthread_exit.3:34
5708 #, no-wrap
5709 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5710 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5711
5712 #. type: Plain text
5713 #: build/C/man3/pthread_exit.3:45
5714 msgid ""
5715 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5716 "value via I<retval> that (if the thread is joinable)  is available to "
5717 "another thread in the same process that calls B<pthread_join>(3)."
5718 msgstr ""
5719 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5720 "I<retval> 経由で値を返す。\n"
5721 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5722 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5723
5724 #. type: Plain text
5725 #: build/C/man3/pthread_exit.3:55
5726 msgid ""
5727 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5728 "not yet been popped, are popped (in the reverse of the order in which they "
5729 "were pushed)  and executed.  If the thread has any thread-specific data, "
5730 "then, after the clean-up handlers have been executed, the corresponding "
5731 "destructor functions are called, in an unspecified order."
5732 msgstr ""
5733 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5734 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5735 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5736 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5737 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5738 "は規定されていない)。"
5739
5740 #. type: Plain text
5741 #: build/C/man3/pthread_exit.3:62
5742 msgid ""
5743 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5744 "variables, semaphores, and file descriptors) are not released, and functions "
5745 "registered using B<atexit>(3)  are not called."
5746 msgstr ""
5747 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5748 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5749 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5750
5751 #. type: Plain text
5752 #: build/C/man3/pthread_exit.3:71
5753 msgid ""
5754 "After the last thread in a process terminates, the process terminates as by "
5755 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5756 "resources are released and functions registered using B<atexit>(3)  are "
5757 "called."
5758 msgstr ""
5759 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5760 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5761 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5762 "が呼び出される。"
5763
5764 #. type: Plain text
5765 #: build/C/man3/pthread_exit.3:73
5766 msgid "This function does not return to the caller."
5767 msgstr "この関数は呼び出し側には返らない。"
5768
5769 #. type: Plain text
5770 #: build/C/man3/pthread_exit.3:82
5771 msgid ""
5772 "Performing a return from the start function of any thread other than the "
5773 "main thread results in an implicit call to B<pthread_exit>(), using the "
5774 "function's return value as the thread's exit status."
5775 msgstr ""
5776 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5777 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5778 "関数の返り値がスレッドの終了ステータスとして使用される。"
5779
5780 #. type: Plain text
5781 #: build/C/man3/pthread_exit.3:88
5782 msgid ""
5783 "To allow other threads to continue execution, the main thread should "
5784 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5785 msgstr ""
5786 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5787 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5788
5789 #. type: Plain text
5790 #: build/C/man3/pthread_exit.3:93
5791 msgid ""
5792 "The value pointed to by I<retval> should not be located on the calling "
5793 "thread's stack, since the contents of that stack are undefined after the "
5794 "thread terminates."
5795 msgstr ""
5796 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5797 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5798 "である。"
5799
5800 #.  Linux 2.6.27
5801 #.  FIXME . review a later kernel to see if this gets fixed
5802 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5803 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5804 #. type: Plain text
5805 #: build/C/man3/pthread_exit.3:105
5806 msgid ""
5807 "Currently, there are limitations in the kernel implementation logic for "
5808 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5809 "This can manifest in problems such as a locked terminal if a stop signal is "
5810 "sent to a foreground process whose thread group leader has already called "
5811 "B<pthread_exit>()."
5812 msgstr ""
5813 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5814 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5815 "カーネル実装の論理には制限がある。\n"
5816 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5817 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5818 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5819 "場合がある。"
5820
5821 #. type: Plain text
5822 #: build/C/man3/pthread_exit.3:109
5823 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5824 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5825
5826 #. type: TH
5827 #: build/C/man3/pthread_getattr_np.3:26
5828 #, no-wrap
5829 msgid "PTHREAD_GETATTR_NP"
5830 msgstr "PTHREAD_GETATTR_NP"
5831
5832 #. type: Plain text
5833 #: build/C/man3/pthread_getattr_np.3:29
5834 msgid "pthread_getattr_np - get attributes of created thread"
5835 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5836
5837 #. type: Plain text
5838 #: build/C/man3/pthread_getattr_np.3:35
5839 #, no-wrap
5840 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5841 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5842
5843 #. type: Plain text
5844 #: build/C/man3/pthread_getattr_np.3:45
5845 msgid ""
5846 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5847 "object referred to by I<attr> so that it contains actual attribute values "
5848 "describing the running thread I<thread>."
5849 msgstr ""
5850 "B<pthread_getattr_np>() 関数は、\n"
5851 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5852 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5853 "格納して返す。"
5854
5855 #. type: Plain text
5856 #: build/C/man3/pthread_getattr_np.3:52
5857 msgid ""
5858 "The returned attribute values may differ from the corresponding attribute "
5859 "values passed in the I<attr> object that was used to create the thread using "
5860 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5861 msgstr ""
5862 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5863 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5864 "特に、以下の属性は異なる場合がある。"
5865
5866 #. type: Plain text
5867 #: build/C/man3/pthread_getattr_np.3:55
5868 msgid ""
5869 "the detach state, since a joinable thread may have detached itself after "
5870 "creation;"
5871 msgstr ""
5872 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5873 "切り離す (detach する) ことができるからである。"
5874
5875 #. type: Plain text
5876 #: build/C/man3/pthread_getattr_np.3:58
5877 msgid ""
5878 "the stack size, which the implementation may align to a suitable boundary."
5879 msgstr ""
5880 "スタックサイズ。\n"
5881 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5882
5883 #. type: Plain text
5884 #: build/C/man3/pthread_getattr_np.3:63
5885 msgid ""
5886 "and the guard size, which the implementation may round upward to a multiple "
5887 "of the page size, or ignore (i.e., treat as 0), if the application is "
5888 "allocating its own stack."
5889 msgstr ""
5890 "guard size.\n"
5891 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5892 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5893 "(0 として扱われる) ことがあるからである。"
5894
5895 #. type: Plain text
5896 #: build/C/man3/pthread_getattr_np.3:68
5897 msgid ""
5898 "Furthermore, if the stack address attribute was not set in the thread "
5899 "attributes object used to create the thread, then the returned thread "
5900 "attributes object will report the actual stack address that the "
5901 "implementation selected for the thread."
5902 msgstr ""
5903 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5904 "スタックアドレスが設定されていなかった場合、\n"
5905 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5906 "割り当てた実際のスタックアドレスが報告される。"
5907
5908 #. type: Plain text
5909 #: build/C/man3/pthread_getattr_np.3:73
5910 msgid ""
5911 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5912 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5913 msgstr ""
5914 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5915 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5916 "そのオブジェクトを破棄すべきである。"
5917
5918 #. type: Plain text
5919 #: build/C/man3/pthread_getattr_np.3:76
5920 #: build/C/man3/pthread_getcpuclockid.3:49
5921 msgid ""
5922 "On success, this function returns 0; on error, it returns a nonzero error "
5923 "number."
5924 msgstr ""
5925 "成功すると、この関数は 0 を返す。\n"
5926 "エラーの場合、 0 以外のエラー番号を返す。"
5927
5928 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5929 #. type: Plain text
5930 #: build/C/man3/pthread_getattr_np.3:81
5931 msgid "Insufficient memory."
5932 msgstr "メモリが十分になかった。"
5933
5934 #. type: Plain text
5935 #: build/C/man3/pthread_getattr_np.3:96
5936 msgid ""
5937 "In addition, if I<thread> refers to the main thread, then "
5938 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5939 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and "
5940 "B<getrlimit>(2), if the B<RLIMIT_STACK> resource limit is not supported."
5941 msgstr ""
5942 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5943 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5944 "エラーで失敗する可能性がある。\n"
5945 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5946 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5947 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5948
5949 #. type: Plain text
5950 #: build/C/man3/pthread_getattr_np.3:98
5951 msgid "This function is available in glibc since version 2.2.3."
5952 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5953
5954 #. type: Plain text
5955 #: build/C/man3/pthread_getattr_np.3:101
5956 #: build/C/man3/pthread_kill_other_threads_np.3:55
5957 msgid ""
5958 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5959 "\" (nonportable) in the name."
5960 msgstr ""
5961 "この関数は非標準の GNU による拡張である。\n"
5962 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5963 "付いている。"
5964
5965 #. type: Plain text
5966 #: build/C/man3/pthread_getattr_np.3:111
5967 msgid ""
5968 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5969 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5970 "and display its guard size, stack address, and stack size attributes.  "
5971 "Command-line arguments can be used to set these attributes to values other "
5972 "than the default when creating the thread.  The shell sessions below "
5973 "demonstrate the use of the program."
5974 msgstr ""
5975 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5976 "このプログラムは、スレッドを作成し、それから\n"
5977 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5978 "スタックアドレス、スタックサイズを取得し表示する。\n"
5979 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5980 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5981 "下記のシェルのセッションはこのプログラムの使用例である。"
5982
5983 #. type: Plain text
5984 #: build/C/man3/pthread_getattr_np.3:114
5985 msgid ""
5986 "In the first run, on an x86-32 system, a thread is created using default "
5987 "attributes:"
5988 msgstr ""
5989 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5990 "(x86-32 システム上で実行)。"
5991
5992 #. type: Plain text
5993 #: build/C/man3/pthread_getattr_np.3:124
5994 #, no-wrap
5995 msgid ""
5996 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5997 "unlimited\n"
5998 "$B< ./a.out>\n"
5999 "Attributes of created thread:\n"
6000 "        Guard size          = 4096 bytes\n"
6001 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6002 "        Stack size          = 0x201000 (2101248) bytes\n"
6003 msgstr ""
6004 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
6005 "unlimited\n"
6006 "$B< ./a.out>\n"
6007 "Attributes of created thread:\n"
6008 "        Guard size          = 4096 bytes\n"
6009 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6010 "        Stack size          = 0x201000 (2101248) bytes\n"
6011
6012 #. type: Plain text
6013 #: build/C/man3/pthread_getattr_np.3:130
6014 msgid ""
6015 "In the following run, we see that if a guard size is specified, it is "
6016 "rounded up to the next multiple of the system page size (4096 bytes on "
6017 "x86-32):"
6018 msgstr ""
6019 "次の実行例では、guard size が指定された場合、\n"
6020 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
6021 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
6022
6023 #. type: Plain text
6024 #: build/C/man3/pthread_getattr_np.3:138
6025 #, no-wrap
6026 msgid ""
6027 "$B< ./a.out -g 4097>\n"
6028 "Thread attributes object after initializations:\n"
6029 "        Guard size          = 4097 bytes\n"
6030 "        Stack address       = (nil)\n"
6031 "        Stack size          = 0x0 (0) bytes\n"
6032 msgstr ""
6033 "$B< ./a.out -g 4097>\n"
6034 "Thread attributes object after initializations:\n"
6035 "        Guard size          = 4097 bytes\n"
6036 "        Stack address       = (nil)\n"
6037 "        Stack size          = 0x0 (0) bytes\n"
6038
6039 #. type: Plain text
6040 #: build/C/man3/pthread_getattr_np.3:143
6041 #, no-wrap
6042 msgid ""
6043 "Attributes of created thread:\n"
6044 "        Guard size          = 8192 bytes\n"
6045 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6046 "        Stack size          = 0x201000 (2101248) bytes\n"
6047 msgstr ""
6048 "Attributes of created thread:\n"
6049 "        Guard size          = 8192 bytes\n"
6050 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6051 "        Stack size          = 0x201000 (2101248) bytes\n"
6052
6053 #. .in +4n
6054 #. .nf
6055 #. $ ./a.out \-s 0x8000
6056 #. Thread attributes object after initializations:
6057 #.         Guard size          = 4096 bytes
6058 #.         Stack address       = 0xffff8000 (EOS = (nil))
6059 #.         Stack size          = 0x8000 (32768) bytes
6060 #. Attributes of created thread:
6061 #.         Guard size          = 4096 bytes
6062 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
6063 #.         Stack size          = 0x8000 (32768) bytes
6064 #. .fi
6065 #. .in
6066 #. type: Plain text
6067 #: build/C/man3/pthread_getattr_np.3:162
6068 msgid ""
6069 "In the last run, the program manually allocates a stack for the thread.  In "
6070 "this case, the guard size attribute is ignored."
6071 msgstr ""
6072 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
6073 "この場合には、guard size 属性は無視される。"
6074
6075 #. type: Plain text
6076 #: build/C/man3/pthread_getattr_np.3:167
6077 #, no-wrap
6078 msgid ""
6079 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
6080 "Allocated thread stack at 0x804d000\n"
6081 msgstr ""
6082 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
6083 "Allocated thread stack at 0x804d000\n"
6084
6085 #. type: Plain text
6086 #: build/C/man3/pthread_getattr_np.3:172
6087 #, no-wrap
6088 msgid ""
6089 "Thread attributes object after initializations:\n"
6090 "        Guard size          = 4096 bytes\n"
6091 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6092 "        Stack size          = 0x8000 (32768) bytes\n"
6093 msgstr ""
6094 "Thread attributes object after initializations:\n"
6095 "        Guard size          = 4096 bytes\n"
6096 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6097 "        Stack size          = 0x8000 (32768) bytes\n"
6098
6099 #. type: Plain text
6100 #: build/C/man3/pthread_getattr_np.3:177
6101 #, no-wrap
6102 msgid ""
6103 "Attributes of created thread:\n"
6104 "        Guard size          = 0 bytes\n"
6105 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6106 "        Stack size          = 0x8000 (32768) bytes\n"
6107 msgstr ""
6108 "Attributes of created thread:\n"
6109 "        Guard size          = 0 bytes\n"
6110 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6111 "        Stack size          = 0x8000 (32768) bytes\n"
6112
6113 #. type: Plain text
6114 #: build/C/man3/pthread_getattr_np.3:198
6115 #, no-wrap
6116 msgid ""
6117 "static void\n"
6118 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
6119 "{\n"
6120 "    int s;\n"
6121 "    size_t stack_size, guard_size;\n"
6122 "    void *stack_addr;\n"
6123 msgstr ""
6124 "static void\n"
6125 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
6126 "{\n"
6127 "    int s;\n"
6128 "    size_t stack_size, guard_size;\n"
6129 "    void *stack_addr;\n"
6130
6131 #. type: Plain text
6132 #: build/C/man3/pthread_getattr_np.3:203
6133 #, no-wrap
6134 msgid ""
6135 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
6136 "    if (s != 0)\n"
6137 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
6138 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
6139 msgstr ""
6140 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
6141 "    if (s != 0)\n"
6142 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
6143 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
6144
6145 #. type: Plain text
6146 #: build/C/man3/pthread_getattr_np.3:214
6147 #, no-wrap
6148 msgid ""
6149 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
6150 "    if (s != 0)\n"
6151 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
6152 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
6153 "    if (stack_size E<gt> 0)\n"
6154 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
6155 "    printf(\"\\en\");\n"
6156 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
6157 "            prefix, stack_size, stack_size);\n"
6158 "}\n"
6159 msgstr ""
6160 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
6161 "    if (s != 0)\n"
6162 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
6163 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
6164 "    if (stack_size E<gt> 0)\n"
6165 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
6166 "    printf(\"\\en\");\n"
6167 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
6168 "            prefix, stack_size, stack_size);\n"
6169 "}\n"
6170
6171 #. type: Plain text
6172 #: build/C/man3/pthread_getattr_np.3:220
6173 #, no-wrap
6174 msgid ""
6175 "static void\n"
6176 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6177 "{\n"
6178 "    int s;\n"
6179 "    pthread_attr_t attr;\n"
6180 msgstr ""
6181 "static void\n"
6182 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6183 "{\n"
6184 "    int s;\n"
6185 "    pthread_attr_t attr;\n"
6186
6187 #. type: Plain text
6188 #: build/C/man3/pthread_getattr_np.3:224
6189 #, no-wrap
6190 msgid ""
6191 "    s = pthread_getattr_np(thread, &attr);\n"
6192 "    if (s != 0)\n"
6193 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6194 msgstr ""
6195 "    s = pthread_getattr_np(thread, &attr);\n"
6196 "    if (s != 0)\n"
6197 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6198
6199 #. type: Plain text
6200 #: build/C/man3/pthread_getattr_np.3:226
6201 #, no-wrap
6202 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6203 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6204
6205 #. type: Plain text
6206 #: build/C/man3/pthread_getattr_np.3:231
6207 #, no-wrap
6208 msgid ""
6209 "    s = pthread_attr_destroy(&attr);\n"
6210 "    if (s != 0)\n"
6211 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6212 "}\n"
6213 msgstr ""
6214 "    s = pthread_attr_destroy(&attr);\n"
6215 "    if (s != 0)\n"
6216 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6217 "}\n"
6218
6219 #. type: Plain text
6220 #: build/C/man3/pthread_getattr_np.3:237
6221 #, no-wrap
6222 msgid ""
6223 "static void *           /* Start function for thread we create */\n"
6224 "thread_start(void *arg)\n"
6225 "{\n"
6226 "    printf(\"Attributes of created thread:\\en\");\n"
6227 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6228 msgstr ""
6229 "static void *           /* Start function for thread we create */\n"
6230 "thread_start(void *arg)\n"
6231 "{\n"
6232 "    printf(\"Attributes of created thread:\\en\");\n"
6233 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6234
6235 #. type: Plain text
6236 #: build/C/man3/pthread_getattr_np.3:251
6237 #, no-wrap
6238 msgid ""
6239 "static void\n"
6240 "usage(char *pname, char *msg)\n"
6241 "{\n"
6242 "    if (msg != NULL)\n"
6243 "        fputs(msg, stderr);\n"
6244 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6245 "            \" [-g guard-size]\\en\", pname);\n"
6246 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6247 "    exit(EXIT_FAILURE);\n"
6248 "}\n"
6249 msgstr ""
6250 "static void\n"
6251 "usage(char *pname, char *msg)\n"
6252 "{\n"
6253 "    if (msg != NULL)\n"
6254 "        fputs(msg, stderr);\n"
6255 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6256 "            \" [-g guard-size]\\en\", pname);\n"
6257 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6258 "    exit(EXIT_FAILURE);\n"
6259 "}\n"
6260
6261 #. type: Plain text
6262 #: build/C/man3/pthread_getattr_np.3:264
6263 #, no-wrap
6264 msgid ""
6265 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6266 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6267 "                              pthread_attr_t *attrp)\n"
6268 "{\n"
6269 "    int s, opt, allocate_stack;\n"
6270 "    long stack_size, guard_size;\n"
6271 "            void *stack_addr;\n"
6272 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6273 "                                           a thread attributes object */\n"
6274 "    allocate_stack = 0;\n"
6275 "    stack_size = -1;\n"
6276 "    guard_size = -1;\n"
6277 msgstr ""
6278 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6279 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6280 "                              pthread_attr_t *attrp)\n"
6281 "{\n"
6282 "    int s, opt, allocate_stack;\n"
6283 "    long stack_size, guard_size;\n"
6284 "            void *stack_addr;\n"
6285 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6286 "                                           a thread attributes object */\n"
6287 "    allocate_stack = 0;\n"
6288 "    stack_size = -1;\n"
6289 "    guard_size = -1;\n"
6290
6291 #. type: Plain text
6292 #: build/C/man3/pthread_getattr_np.3:273
6293 #, no-wrap
6294 msgid ""
6295 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6296 "        switch (opt) {\n"
6297 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6298 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6299 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6300 "        default:    usage(argv[0], NULL);\n"
6301 "        }\n"
6302 "    }\n"
6303 msgstr ""
6304 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6305 "        switch (opt) {\n"
6306 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6307 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6308 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6309 "        default:    usage(argv[0], NULL);\n"
6310 "        }\n"
6311 "    }\n"
6312
6313 #. type: Plain text
6314 #: build/C/man3/pthread_getattr_np.3:276
6315 #, no-wrap
6316 msgid ""
6317 "    if (allocate_stack && stack_size == -1)\n"
6318 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6319 msgstr ""
6320 "    if (allocate_stack && stack_size == -1)\n"
6321 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6322
6323 #. type: Plain text
6324 #: build/C/man3/pthread_getattr_np.3:279
6325 #, no-wrap
6326 msgid ""
6327 "    if (argc E<gt> optind)\n"
6328 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6329 msgstr ""
6330 "    if (argc E<gt> optind)\n"
6331 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6332
6333 #. type: Plain text
6334 #: build/C/man3/pthread_getattr_np.3:282
6335 #, no-wrap
6336 msgid ""
6337 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6338 "        ret_attrp = attrp;\n"
6339 msgstr ""
6340 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6341 "        ret_attrp = attrp;\n"
6342
6343 #. type: Plain text
6344 #: build/C/man3/pthread_getattr_np.3:287
6345 #, no-wrap
6346 msgid ""
6347 "        s = pthread_attr_init(attrp);\n"
6348 "        if (s != 0)\n"
6349 "            handle_error_en(s, \"pthread_attr_init\");\n"
6350 "    }\n"
6351 msgstr ""
6352 "        s = pthread_attr_init(attrp);\n"
6353 "        if (s != 0)\n"
6354 "            handle_error_en(s, \"pthread_attr_init\");\n"
6355 "    }\n"
6356
6357 #. type: Plain text
6358 #: build/C/man3/pthread_getattr_np.3:299
6359 #, no-wrap
6360 msgid ""
6361 "    if (stack_size E<gt>= 0) {\n"
6362 "        if (!allocate_stack) {\n"
6363 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6364 "            if (s != 0)\n"
6365 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6366 "        } else {\n"
6367 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6368 "                               stack_size);\n"
6369 "            if (s != 0)\n"
6370 "                handle_error_en(s, \"posix_memalign\");\n"
6371 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6372 msgstr ""
6373 "    if (stack_size E<gt>= 0) {\n"
6374 "        if (!allocate_stack) {\n"
6375 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6376 "            if (s != 0)\n"
6377 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6378 "        } else {\n"
6379 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6380 "                               stack_size);\n"
6381 "            if (s != 0)\n"
6382 "                handle_error_en(s, \"posix_memalign\");\n"
6383 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6384
6385 #. type: Plain text
6386 #: build/C/man3/pthread_getattr_np.3:305
6387 #, no-wrap
6388 msgid ""
6389 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6390 "            if (s != 0)\n"
6391 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6392 "        }\n"
6393 "    }\n"
6394 msgstr ""
6395 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6396 "            if (s != 0)\n"
6397 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6398 "        }\n"
6399 "    }\n"
6400
6401 #. type: Plain text
6402 #: build/C/man3/pthread_getattr_np.3:311
6403 #, no-wrap
6404 msgid ""
6405 "    if (guard_size E<gt>= 0) {\n"
6406 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6407 "        if (s != 0)\n"
6408 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6409 "    }\n"
6410 msgstr ""
6411 "    if (guard_size E<gt>= 0) {\n"
6412 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6413 "        if (s != 0)\n"
6414 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6415 "    }\n"
6416
6417 #. type: Plain text
6418 #: build/C/man3/pthread_getattr_np.3:314
6419 #, no-wrap
6420 msgid ""
6421 "    return ret_attrp;\n"
6422 "}\n"
6423 msgstr ""
6424 "    return ret_attrp;\n"
6425 "}\n"
6426
6427 #. type: Plain text
6428 #: build/C/man3/pthread_getattr_np.3:323
6429 #, no-wrap
6430 msgid ""
6431 "int\n"
6432 "main(int argc, char *argv[])\n"
6433 "{\n"
6434 "    int s;\n"
6435 "    pthread_t thr;\n"
6436 "    pthread_attr_t attr;\n"
6437 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6438 "                                        a thread attributes object */\n"
6439 msgstr ""
6440 "int\n"
6441 "main(int argc, char *argv[])\n"
6442 "{\n"
6443 "    int s;\n"
6444 "    pthread_t thr;\n"
6445 "    pthread_attr_t attr;\n"
6446 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6447 "                                        a thread attributes object */\n"
6448
6449 #. type: Plain text
6450 #: build/C/man3/pthread_getattr_np.3:325
6451 #, no-wrap
6452 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6453 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6454
6455 #. type: Plain text
6456 #: build/C/man3/pthread_getattr_np.3:331
6457 #, no-wrap
6458 msgid ""
6459 "    if (attrp != NULL) {\n"
6460 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6461 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6462 "        printf(\"\\en\");\n"
6463 "    }\n"
6464 msgstr ""
6465 "    if (attrp != NULL) {\n"
6466 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6467 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6468 "        printf(\"\\en\");\n"
6469 "    }\n"
6470
6471 #. type: Plain text
6472 #: build/C/man3/pthread_getattr_np.3:361
6473 msgid ""
6474 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6475 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6476 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6477 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6478 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6479 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6480 msgstr ""
6481 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6482 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6483 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6484 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6485 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6486 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6487
6488 #. type: TH
6489 #: build/C/man3/pthread_getcpuclockid.3:26
6490 #, no-wrap
6491 msgid "PTHREAD_GETCPUCLOCKID"
6492 msgstr "PTHREAD_GETCPUCLOCKID"
6493
6494 #. type: TH
6495 #: build/C/man3/pthread_getcpuclockid.3:26
6496 #, no-wrap
6497 msgid "2009-02-08"
6498 msgstr "2009-02-08"
6499
6500 #. type: Plain text
6501 #: build/C/man3/pthread_getcpuclockid.3:29
6502 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6503 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6504
6505 #. type: Plain text
6506 #: build/C/man3/pthread_getcpuclockid.3:33
6507 #, no-wrap
6508 msgid ""
6509 "B<#include E<lt>pthread.hE<gt>>\n"
6510 "B<#include E<lt>time.hE<gt>>\n"
6511 msgstr ""
6512 "B<#include E<lt>pthread.hE<gt>>\n"
6513 "B<#include E<lt>time.hE<gt>>\n"
6514
6515 #. type: Plain text
6516 #: build/C/man3/pthread_getcpuclockid.3:35
6517 #, no-wrap
6518 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6519 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6520
6521 #.  The clockid is constructed as follows:
6522 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6523 #.  where CLOCK_IDFIELD_SIZE is 3.
6524 #. type: Plain text
6525 #: build/C/man3/pthread_getcpuclockid.3:46
6526 msgid ""
6527 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6528 "time clock of the thread I<thread>."
6529 msgstr ""
6530 "B<pthread_getcpuclockid>() 関数は、\n"
6531 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6532
6533 #. type: TP
6534 #: build/C/man3/pthread_getcpuclockid.3:50
6535 #, no-wrap
6536 msgid "B<ENOENT>"
6537 msgstr "B<ENOENT>"
6538
6539 #.  CLOCK_THREAD_CPUTIME_ID not defined
6540 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6541 #.  be possible if kernel thread IDs took more than 29 bits (which
6542 #.  they currently cannot).
6543 #. type: Plain text
6544 #: build/C/man3/pthread_getcpuclockid.3:58
6545 msgid "Per-thread CPU time clocks are not supported by the system."
6546 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6547
6548 #. type: Plain text
6549 #: build/C/man3/pthread_getcpuclockid.3:65
6550 msgid "This function is available in glibc since version 2.2."
6551 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6552
6553 #. type: Plain text
6554 #: build/C/man3/pthread_getcpuclockid.3:78
6555 msgid ""
6556 "When I<thread> refers to the calling thread, this function returns an "
6557 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6558 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6559 msgstr ""
6560 "I<thread> が呼び出したスレッドを参照している場合、\n"
6561 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6562 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6563 "を参照する ID が返される。"
6564
6565 #. type: Plain text
6566 #: build/C/man3/pthread_getcpuclockid.3:84
6567 msgid ""
6568 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6569 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6570 "the two threads.  The following shell session shows an example run:"
6571 msgstr ""
6572 "以下のプログラムは、スレッドを作成し、それから\n"
6573 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6574 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6575 "スレッド毎の CPU 時間を取得する。\n"
6576 "下記のシェルのセッションは実行例である。"
6577
6578 #. type: Plain text
6579 #: build/C/man3/pthread_getcpuclockid.3:94
6580 #, no-wrap
6581 msgid ""
6582 "$ B<./a.out>\n"
6583 "Main thread sleeping\n"
6584 "Subthread starting infinite loop\n"
6585 "Main thread consuming some CPU time...\n"
6586 "Process total CPU time:    1.368\n"
6587 "Main thread CPU time:      0.376\n"
6588 "Subthread CPU time:        0.992\n"
6589 msgstr ""
6590 "$ B<./a.out>\n"
6591 "Main thread sleeping\n"
6592 "Subthread starting infinite loop\n"
6593 "Main thread consuming some CPU time...\n"
6594 "Process total CPU time:    1.368\n"
6595 "Main thread CPU time:      0.376\n"
6596 "Subthread CPU time:        0.992\n"
6597
6598 #. type: Plain text
6599 #: build/C/man3/pthread_getcpuclockid.3:100
6600 #, no-wrap
6601 msgid "/* Link with \"-lrt\" */\n"
6602 msgstr "/* \"-lrt\" でリンクする */\n"
6603
6604 #. type: Plain text
6605 #: build/C/man3/pthread_getcpuclockid.3:108
6606 #, no-wrap
6607 msgid ""
6608 "#include E<lt>time.hE<gt>\n"
6609 "#include E<lt>stdio.hE<gt>\n"
6610 "#include E<lt>stdlib.hE<gt>\n"
6611 "#include E<lt>unistd.hE<gt>\n"
6612 "#include E<lt>pthread.hE<gt>\n"
6613 "#include E<lt>string.hE<gt>\n"
6614 "#include E<lt>errno.hE<gt>\n"
6615 msgstr ""
6616 "#include E<lt>time.hE<gt>\n"
6617 "#include E<lt>stdio.hE<gt>\n"
6618 "#include E<lt>stdlib.hE<gt>\n"
6619 "#include E<lt>unistd.hE<gt>\n"
6620 "#include E<lt>pthread.hE<gt>\n"
6621 "#include E<lt>string.hE<gt>\n"
6622 "#include E<lt>errno.hE<gt>\n"
6623
6624 #. type: Plain text
6625 #: build/C/man3/pthread_getcpuclockid.3:122
6626 #, no-wrap
6627 msgid ""
6628 "static void *\n"
6629 "thread_start(void *arg)\n"
6630 "{\n"
6631 "    printf(\"Subthread starting infinite loop\\en\");\n"
6632 "    for (;;)\n"
6633 "        continue;\n"
6634 "}\n"
6635 msgstr ""
6636 "static void *\n"
6637 "thread_start(void *arg)\n"
6638 "{\n"
6639 "    printf(\"Subthread starting infinite loop\\en\");\n"
6640 "    for (;;)\n"
6641 "        continue;\n"
6642 "}\n"
6643
6644 #. type: Plain text
6645 #: build/C/man3/pthread_getcpuclockid.3:127
6646 #, no-wrap
6647 msgid ""
6648 "static void\n"
6649 "pclock(char *msg, clockid_t cid)\n"
6650 "{\n"
6651 "    struct timespec ts;\n"
6652 msgstr ""
6653 "static void\n"
6654 "pclock(char *msg, clockid_t cid)\n"
6655 "{\n"
6656 "    struct timespec ts;\n"
6657
6658 #. type: Plain text
6659 #: build/C/man3/pthread_getcpuclockid.3:133
6660 #, no-wrap
6661 msgid ""
6662 "    printf(\"%s\", msg);\n"
6663 "    if (clock_gettime(cid, &ts) == -1)\n"
6664 "        handle_error(\"clock_gettime\");\n"
6665 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6666 "}\n"
6667 msgstr ""
6668 "    printf(\"%s\", msg);\n"
6669 "    if (clock_gettime(cid, &ts) == -1)\n"
6670 "        handle_error(\"clock_gettime\");\n"
6671 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6672 "}\n"
6673
6674 #. type: Plain text
6675 #: build/C/man3/pthread_getcpuclockid.3:140
6676 #, no-wrap
6677 msgid ""
6678 "int\n"
6679 "main(int argc, char *argv[])\n"
6680 "{\n"
6681 "    pthread_t thread;\n"
6682 "    clockid_t cid;\n"
6683 "    int j, s;\n"
6684 msgstr ""
6685 "int\n"
6686 "main(int argc, char *argv[])\n"
6687 "{\n"
6688 "    pthread_t thread;\n"
6689 "    clockid_t cid;\n"
6690 "    int j, s;\n"
6691
6692 #. type: Plain text
6693 #: build/C/man3/pthread_getcpuclockid.3:144
6694 #, no-wrap
6695 msgid ""
6696 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6697 "    if (s != 0)\n"
6698 "        handle_error_en(s, \"pthread_create\");\n"
6699 msgstr ""
6700 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6701 "    if (s != 0)\n"
6702 "        handle_error_en(s, \"pthread_create\");\n"
6703
6704 #. type: Plain text
6705 #: build/C/man3/pthread_getcpuclockid.3:147
6706 #, no-wrap
6707 msgid ""
6708 "    printf(\"Main thread sleeping\\en\");\n"
6709 "    sleep(1);\n"
6710 msgstr ""
6711 "    printf(\"Main thread sleeping\\en\");\n"
6712 "    sleep(1);\n"
6713
6714 #. type: Plain text
6715 #: build/C/man3/pthread_getcpuclockid.3:151
6716 #, no-wrap
6717 msgid ""
6718 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6719 "    for (j = 0; j E<lt> 2000000; j++)\n"
6720 "        getppid();\n"
6721 msgstr ""
6722 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6723 "    for (j = 0; j E<lt> 2000000; j++)\n"
6724 "        getppid();\n"
6725
6726 #. type: Plain text
6727 #: build/C/man3/pthread_getcpuclockid.3:153
6728 #, no-wrap
6729 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6730 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6731
6732 #. type: Plain text
6733 #: build/C/man3/pthread_getcpuclockid.3:158
6734 #, no-wrap
6735 msgid ""
6736 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6737 "    if (s != 0)\n"
6738 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6739 "    pclock(\"Main thread CPU time:   \", cid);\n"
6740 msgstr ""
6741 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6742 "    if (s != 0)\n"
6743 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6744 "    pclock(\"Main thread CPU time:   \", cid);\n"
6745
6746 #. type: Plain text
6747 #: build/C/man3/pthread_getcpuclockid.3:161
6748 #, no-wrap
6749 msgid ""
6750 "    /* The preceding 4 lines of code could have been replaced by:\n"
6751 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6752 msgstr ""
6753 "    /* The preceding 4 lines of code could have been replaced by:\n"
6754 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6755
6756 #. type: Plain text
6757 #: build/C/man3/pthread_getcpuclockid.3:166
6758 #, no-wrap
6759 msgid ""
6760 "    s = pthread_getcpuclockid(thread, &cid);\n"
6761 "    if (s != 0)\n"
6762 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6763 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6764 msgstr ""
6765 "    s = pthread_getcpuclockid(thread, &cid);\n"
6766 "    if (s != 0)\n"
6767 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6768 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6769
6770 #. type: Plain text
6771 #: build/C/man3/pthread_getcpuclockid.3:169
6772 #, no-wrap
6773 msgid ""
6774 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6775 "}\n"
6776 msgstr ""
6777 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6778 "}\n"
6779
6780 #. type: Plain text
6781 #: build/C/man3/pthread_getcpuclockid.3:178
6782 msgid ""
6783 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6784 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6785 msgstr ""
6786 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6787 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6788
6789 #. type: TH
6790 #: build/C/man3/pthread_join.3:26
6791 #, no-wrap
6792 msgid "PTHREAD_JOIN"
6793 msgstr "PTHREAD_JOIN"
6794
6795 #. type: Plain text
6796 #: build/C/man3/pthread_join.3:29
6797 msgid "pthread_join - join with a terminated thread"
6798 msgstr "pthread_join - 終了したスレッドを join する"
6799
6800 #. type: Plain text
6801 #: build/C/man3/pthread_join.3:34
6802 #, no-wrap
6803 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6804 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6805
6806 #. type: Plain text
6807 #: build/C/man3/pthread_join.3:49
6808 msgid ""
6809 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6810 "to terminate.  If that thread has already terminated, then "
6811 "B<pthread_join>()  returns immediately.  The thread specified by I<thread> "
6812 "must be joinable."
6813 msgstr ""
6814 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6815 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6816 "B<pthread_join>() はすぐに返る。\n"
6817 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6818
6819 #. type: Plain text
6820 #: build/C/man3/pthread_join.3:63
6821 msgid ""
6822 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6823 "the target thread (i.e., the value that the target thread supplied to "
6824 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6825 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6826 msgstr ""
6827 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6828 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6829 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6830 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6831
6832 #. type: Plain text
6833 #: build/C/man3/pthread_join.3:70
6834 msgid ""
6835 "If multiple threads simultaneously try to join with the same thread, the "
6836 "results are undefined.  If the thread calling B<pthread_join>()  is "
6837 "canceled, then the target thread will remain joinable (i.e., it will not be "
6838 "detached)."
6839 msgstr ""
6840 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6841 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6842 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6843 "ならない)。"
6844
6845 #. type: Plain text
6846 #: build/C/man3/pthread_join.3:75
6847 msgid ""
6848 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6849 "number."
6850 msgstr ""
6851 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6852 "エラーの場合、エラー番号を返す。"
6853
6854 #. type: TP
6855 #: build/C/man3/pthread_join.3:76
6856 #, no-wrap
6857 msgid "B<EDEADLK>"
6858 msgstr "B<EDEADLK>"
6859
6860 #.  The following verified by testing on glibc 2.8/NPTL:
6861 #.  The following verified by testing on glibc 2.8/NPTL:
6862 #. type: Plain text
6863 #: build/C/man3/pthread_join.3:85
6864 msgid ""
6865 "A deadlock was detected (e.g., two threads tried to join with each other); "
6866 "or I<thread> specifies the calling thread."
6867 msgstr ""
6868 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6869 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6870
6871 #.  POSIX.1-2001 does not specify this error case.
6872 #. type: Plain text
6873 #: build/C/man3/pthread_join.3:93
6874 msgid "Another thread is already waiting to join with this thread."
6875 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6876
6877 #. type: Plain text
6878 #: build/C/man3/pthread_join.3:104
6879 msgid ""
6880 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6881 "the target thread has terminated."
6882 msgstr ""
6883 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6884 "呼び出し側には、対象スレッドが終了していることが保証される。"
6885
6886 #. type: Plain text
6887 #: build/C/man3/pthread_join.3:107
6888 msgid ""
6889 "Joining with a thread that has previously been joined results in undefined "
6890 "behavior."
6891 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6892
6893 #. type: Plain text
6894 #: build/C/man3/pthread_join.3:115
6895 msgid ""
6896 "Failure to join with a thread that is joinable (i.e., one that is not "
6897 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6898 "zombie thread consumes some system resources, and when enough zombie threads "
6899 "have accumulated, it will no longer be possible to create new threads (or "
6900 "processes)."
6901 msgstr ""
6902 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6903 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6904 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6905 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6906 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6907 "このようなことが起きるのは避けること。"
6908
6909 #. type: Plain text
6910 #: build/C/man3/pthread_join.3:121
6911 msgid ""
6912 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6913 "\"join with any terminated thread\".  If you believe you need this "
6914 "functionality, you probably need to rethink your application design."
6915 msgstr ""
6916 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6917 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6918 "この機能が必要だと思うような場合には、おそらく\n"
6919 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6920
6921 #. type: Plain text
6922 #: build/C/man3/pthread_join.3:124
6923 msgid ""
6924 "All of the threads in a process are peers: any thread can join with any "
6925 "other thread in the process."
6926 msgstr ""
6927 "プロセス内の全てのスレッドは対等であり、\n"
6928 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6929
6930 #. type: Plain text
6931 #: build/C/man3/pthread_join.3:134
6932 msgid ""
6933 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6934 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6935 msgstr ""
6936 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6937 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6938
6939 #. type: TH
6940 #: build/C/man3/pthread_kill.3:26
6941 #, no-wrap
6942 msgid "PTHREAD_KILL"
6943 msgstr "PTHREAD_KILL"
6944
6945 #. type: TH
6946 #: build/C/man3/pthread_kill.3:26
6947 #: build/C/man3/pthread_kill_other_threads_np.3:26
6948 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setcancelstate.3:26
6949 #: build/C/man3/pthread_yield.3:25
6950 #, fuzzy, no-wrap
6951 #| msgid "2014-04-14"
6952 msgid "2014-05-13"
6953 msgstr "2014-04-14"
6954
6955 #. type: Plain text
6956 #: build/C/man3/pthread_kill.3:29
6957 msgid "pthread_kill - send a signal to a thread"
6958 msgstr "pthread_kill - スレッドにシグナルを送信する"
6959
6960 #. type: Plain text
6961 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6962 #, no-wrap
6963 msgid "B<#include E<lt>signal.hE<gt>>\n"
6964 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6965
6966 #. type: Plain text
6967 #: build/C/man3/pthread_kill.3:34
6968 #, no-wrap
6969 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6970 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6971
6972 #. type: Plain text
6973 #: build/C/man3/pthread_kill.3:45
6974 msgid "B<pthread_kill>():"
6975 msgstr "B<pthread_kill>():"
6976
6977 #. type: Plain text
6978 #: build/C/man3/pthread_kill.3:47 build/C/man3/pthread_sigmask.3:48
6979 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 199506L || _XOPEN_SOURCE\\ E<gt>=\\ 500"
6980 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 199506L || _XOPEN_SOURCE\\ E<gt>=\\ 500"
6981
6982 #. type: Plain text
6983 #: build/C/man3/pthread_kill.3:59
6984 msgid ""
6985 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6986 "thread in the same process as the caller.  The signal is asynchronously "
6987 "directed to I<thread>."
6988 msgstr ""
6989 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6990 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6991 "シグナルは非同期に I<thread> へ直接送られる。"
6992
6993 #. type: Plain text
6994 #: build/C/man3/pthread_kill.3:63
6995 msgid ""
6996 "If I<sig> is 0, then no signal is sent, but error checking is still "
6997 "performed."
6998 msgstr ""
6999 "I<sig> が 0 の場合、シグナルは送信されないが、エラーチェックだけは実行され"
7000 "る。"
7001
7002 #. type: Plain text
7003 #: build/C/man3/pthread_kill.3:68
7004 msgid ""
7005 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
7006 "number, and no signal is sent."
7007 msgstr ""
7008 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
7009 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
7010
7011 #. type: Plain text
7012 #: build/C/man3/pthread_kill.3:72
7013 msgid "An invalid signal was specified."
7014 msgstr "無効なシグナルが指定された。"
7015
7016 #. type: Plain text
7017 #: build/C/man3/pthread_kill.3:77
7018 #, fuzzy
7019 #| msgid "The B<pthread_equal>()  function compares two thread identifiers."
7020 msgid "The B<pthread_kill>()  function is thread-safe."
7021 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
7022
7023 #. type: Plain text
7024 #: build/C/man3/pthread_kill.3:79
7025 msgid "POSIX.1-2008."
7026 msgstr "POSIX.1-2008."
7027
7028 #. type: Plain text
7029 #: build/C/man3/pthread_kill.3:86
7030 msgid ""
7031 "Signal dispositions are process-wide: if a signal handler is installed, the "
7032 "handler will be invoked in the thread I<thread>, but if the disposition of "
7033 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
7034 "affect the whole process."
7035 msgstr ""
7036 "シグナルの配送はプロセス全体で行われる。\n"
7037 "シグナルハンドラが設定されている場合、\n"
7038 "そのハンドラがスレッド I<thread> で起動されるが、\n"
7039 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
7040 "シグナルに対するアクションはプロセス全体に影響がある。"
7041
7042 #. type: Plain text
7043 #: build/C/man3/pthread_kill.3:99
7044 msgid ""
7045 "POSIX.1-2008 recommends that if an implementation detects the use of a "
7046 "thread ID after the end of its lifetime, B<pthread_kill>()  should return "
7047 "the error B<ESRCH>.  The glibc implementation returns this error in the "
7048 "cases where an invalid thread ID can be detected.  But note also that POSIX "
7049 "says that an attempt to use a thread ID whose lifetime has ended produces "
7050 "undefined behavior, and an attempt to use an invalid thread ID in a call to "
7051 "B<pthread_kill>()  can, for example, cause a segmentation fault."
7052 msgstr ""
7053 "POSIX.1-2008 では、 スレッドが終了した後にそのスレッド ID が使用されたことを"
7054 "検出した場合に、 B<pthread_kill>() はエラー B<ESRCH> を返すことを推奨されてい"
7055 "る。 glibc の実装では、無効なスレッド ID を検出できる場合にはこのエラーを返"
7056 "す。 しかし、 POSIX では、 終了したスレッド ID を使おうとした場合の動作は不定"
7057 "であり、 B<pthread_kill>() で無効なスレッド ID を使おうとした場合には、 例え"
7058 "ば、 セグメンテーションフォールトになる可能性もある点に注意すること。"
7059
7060 #. type: Plain text
7061 #: build/C/man3/pthread_kill.3:108
7062 msgid ""
7063 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
7064 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
7065 msgstr ""
7066 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
7067 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
7068
7069 #. type: TH
7070 #: build/C/man3/pthread_kill_other_threads_np.3:26
7071 #, no-wrap
7072 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
7073 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
7074
7075 #. type: Plain text
7076 #: build/C/man3/pthread_kill_other_threads_np.3:29
7077 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
7078 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
7079
7080 #. type: Plain text
7081 #: build/C/man3/pthread_kill_other_threads_np.3:34
7082 #, no-wrap
7083 msgid "B<void pthread_kill_other_threads_np(void);>\n"
7084 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
7085
7086 #.  .SH VERSIONS
7087 #.  Available since glibc 2.0
7088 #. type: Plain text
7089 #: build/C/man3/pthread_kill_other_threads_np.3:47
7090 msgid ""
7091 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
7092 "threading implementation.  On that implementation, calling this function "
7093 "causes the immediate termination of all threads in the application, except "
7094 "the calling thread.  The cancellation state and cancellation type of the to-"
7095 "be-terminated threads are ignored, and the cleanup handlers are not called "
7096 "in those threads."
7097 msgstr ""
7098 "B<pthread_kill_other_threads_np>() は、\n"
7099 "LinuxThreads スレッド実装においてのみ効果がある。\n"
7100 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
7101 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
7102 "終了対象のスレッドの cancelability state と cancelability type は\n"
7103 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
7104
7105 #. type: Plain text
7106 #: build/C/man3/pthread_kill_other_threads_np.3:52
7107 #, fuzzy
7108 #| msgid ""
7109 #| "pthread_kill_other_threads_np - terminate all other threads in process"
7110 msgid "The B<pthread_kill_other_threads_np>()  function is thread-safe."
7111 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
7112
7113 #. type: Plain text
7114 #: build/C/man3/pthread_kill_other_threads_np.3:64
7115 msgid ""
7116 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
7117 "thread calls B<execve>(2)  or a similar function.  This function is designed "
7118 "to address a limitation in the obsolete LinuxThreads implementation whereby "
7119 "the other threads of an application are not automatically terminated (as "
7120 "POSIX.1-2001 requires) during B<execve>(2)."
7121 msgstr ""
7122 "B<pthread_kill_other_threads_np>() は、\n"
7123 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
7124 "呼ばれることを目的として用意されている。\n"
7125 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
7126 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
7127 "終了されないという制限を解決するために設計された。"
7128
7129 #. type: Plain text
7130 #: build/C/man3/pthread_kill_other_threads_np.3:71
7131 msgid ""
7132 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
7133 "exists, but does nothing.  (Nothing needs to be done, because the "
7134 "implementation does the right thing during an B<execve>(2).)"
7135 msgstr ""
7136 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
7137 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
7138 "何もする必要がないということだ)。"
7139
7140 #. type: Plain text
7141 #: build/C/man3/pthread_kill_other_threads_np.3:77
7142 msgid ""
7143 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
7144 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
7145 msgstr ""
7146 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
7147 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
7148
7149 #. type: TH
7150 #: build/C/man3/pthread_self.3:26
7151 #, no-wrap
7152 msgid "PTHREAD_SELF"
7153 msgstr "PTHREAD_SELF"
7154
7155 #. type: Plain text
7156 #: build/C/man3/pthread_self.3:29
7157 msgid "pthread_self - obtain ID of the calling thread"
7158 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
7159
7160 #. type: Plain text
7161 #: build/C/man3/pthread_self.3:34
7162 #, no-wrap
7163 msgid "B<pthread_t pthread_self(void);>\n"
7164 msgstr "B<pthread_t pthread_self(void);>\n"
7165
7166 #. type: Plain text
7167 #: build/C/man3/pthread_self.3:46
7168 msgid ""
7169 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
7170 "is the same value that is returned in I<*thread> in the "
7171 "B<pthread_create>(3)  call that created this thread."
7172 msgstr ""
7173 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
7174 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
7175 "呼び出しで I<*thread> で返されるのと同じ値である。"
7176
7177 #. type: Plain text
7178 #: build/C/man3/pthread_self.3:48
7179 msgid "This function always succeeds, returning the calling thread's ID."
7180 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
7181
7182 #. type: Plain text
7183 #: build/C/man3/pthread_self.3:55
7184 #, fuzzy
7185 #| msgid "The B<pthread_equal>()  function compares two thread identifiers."
7186 msgid "The B<pthread_self>()  function is thread-safe."
7187 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
7188
7189 #. type: Plain text
7190 #: build/C/man3/pthread_self.3:68
7191 msgid ""
7192 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
7193 "represent a thread ID; for example, representation using either an "
7194 "arithmetic type or a structure is permitted.  Therefore, variables of type "
7195 "I<pthread_t> can't portably be compared using the C equality operator "
7196 "(B<==>); use B<pthread_equal>(3)  instead."
7197 msgstr ""
7198 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
7199 "スレッド実装が完全に自由に選択してよいことになっている。\n"
7200 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
7201 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
7202 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
7203 "代わりに B<pthread_equal>(3) を使うこと。"
7204
7205 #. type: Plain text
7206 #: build/C/man3/pthread_self.3:72
7207 msgid ""
7208 "Thread identifiers should be considered opaque: any attempt to use a thread "
7209 "ID other than in pthreads calls is nonportable and can lead to unspecified "
7210 "results."
7211 msgstr ""
7212 "スレッド識別子はその内部構造を意識すべきではない。\n"
7213 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
7214 "移植性がなくなり、どのような結果が得られるかも分からない。"
7215
7216 #. type: Plain text
7217 #: build/C/man3/pthread_self.3:76
7218 msgid ""
7219 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
7220 "may be reused after a terminated thread has been joined, or a detached "
7221 "thread has terminated."
7222 msgstr ""
7223 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
7224 "終了したスレッドが join されたり、\n"
7225 "切り離された (detached) スレッドが終了されたりした後は、\n"
7226 "そのスレッド ID は再利用されることがある。"
7227
7228 #. type: Plain text
7229 #: build/C/man3/pthread_self.3:81
7230 msgid ""
7231 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
7232 "kernel thread ID returned by a call to B<gettid>(2)."
7233 msgstr ""
7234 "B<pthread_self>() が返すスレッド ID は、\n"
7235 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
7236
7237 #. type: Plain text
7238 #: build/C/man3/pthread_self.3:85
7239 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7240 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7241
7242 #. type: TH
7243 #: build/C/man3/pthread_setaffinity_np.3:26
7244 #, no-wrap
7245 msgid "PTHREAD_SETAFFINITY_NP"
7246 msgstr "PTHREAD_SETAFFINITY_NP"
7247
7248 #. type: Plain text
7249 #: build/C/man3/pthread_setaffinity_np.3:30
7250 msgid ""
7251 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7252 "thread"
7253 msgstr ""
7254 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7255 "CPU affinity の設定/取得を行う"
7256
7257 #. type: Plain text
7258 #: build/C/man3/pthread_setaffinity_np.3:39
7259 #, no-wrap
7260 msgid ""
7261 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7262 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7263 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7264 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7265 msgstr ""
7266 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7267 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7268 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7269 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7270
7271 #. type: Plain text
7272 #: build/C/man3/pthread_setaffinity_np.3:54
7273 msgid ""
7274 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7275 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7276 "successful, and the thread is not currently running on one of the CPUs in "
7277 "I<cpuset>, then it is migrated to one of those CPUs."
7278 msgstr ""
7279 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7280 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7281 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7282 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7283
7284 #. type: Plain text
7285 #: build/C/man3/pthread_setaffinity_np.3:61
7286 msgid ""
7287 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7288 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7289 msgstr ""
7290 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7291 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7292
7293 #. type: Plain text
7294 #: build/C/man3/pthread_setaffinity_np.3:77
7295 msgid ""
7296 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7297 "by I<cpuset>.  Typically, this argument would be specified as "
7298 "I<sizeof(cpu_set_t)>.  (It may be some other value, if using the macros "
7299 "described in B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7300 msgstr ""
7301 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7302 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7303 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7304 "割り当てている場合には、別の値になることもある)。"
7305
7306 #. type: TP
7307 #: build/C/man3/pthread_setaffinity_np.3:81
7308 #, no-wrap
7309 msgid "B<EFAULT>"
7310 msgstr "B<EFAULT>"
7311
7312 #. type: Plain text
7313 #: build/C/man3/pthread_setaffinity_np.3:84
7314 msgid "A supplied memory address was invalid."
7315 msgstr "指定されたメモリアドレスが無効である。"
7316
7317 #. type: Plain text
7318 #: build/C/man3/pthread_setaffinity_np.3:93
7319 msgid ""
7320 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7321 "processors that are currently physically on the system and permitted to the "
7322 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7323 "mechanism described in B<cpuset>(7)."
7324 msgstr ""
7325 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7326 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7327 "されているプロセッサが一つも含まれていない。\n"
7328 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7329 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7330
7331 #.  FIXME . ?
7332 #.  Loic Domaigne commented: it seems that in the future the
7333 #.  kernel developers want to make cpumask_t dynamic, so
7334 #.  CONFIG_NR_CPUS might become obsolete in the future.
7335 #.  cpumask_t
7336 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7337 #.  of the cpumask_t type.
7338 #. type: Plain text
7339 #: build/C/man3/pthread_setaffinity_np.3:109
7340 msgid ""
7341 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7342 "the set supported by the kernel.  (The kernel configuration option "
7343 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7344 "type used to represent CPU sets.)"
7345 msgstr ""
7346 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7347 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7348 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7349 "データ型がサポートする CPU 集合の範囲が定義される。)"
7350
7351 #. type: Plain text
7352 #: build/C/man3/pthread_setaffinity_np.3:114
7353 msgid ""
7354 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7355 "affinity mask used by the kernel."
7356 msgstr ""
7357 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7358 "affinity マスクの大きさよりも小さい。"
7359
7360 #. type: Plain text
7361 #: build/C/man3/pthread_setaffinity_np.3:137
7362 msgid ""
7363 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7364 "thread will actually run is the intersection of the set specified in the "
7365 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7366 "system may further restrict the set of CPUs on which the thread runs if the "
7367 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7368 "restrictions on the actual set of CPUs on which the thread will run are "
7369 "silently imposed by the kernel."
7370 msgstr ""
7371 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7372 "そのスレッドが実際に実行される CPU 集合は、\n"
7373 "I<cpuset> 引き数で指定された集合と\n"
7374 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7375 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7376 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7377 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7378 "これらの制限は、カーネルにより黙って適用される。"
7379
7380 #. type: Plain text
7381 #: build/C/man3/pthread_setaffinity_np.3:143
7382 msgid ""
7383 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7384 "B<sched_getaffinity>(2)  system calls."
7385 msgstr ""
7386 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7387 "B<sched_getaffinity>(2) を使って実装されている。"
7388
7389 #. type: Plain text
7390 #: build/C/man3/pthread_setaffinity_np.3:154
7391 msgid ""
7392 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7393 "creator's CPU affinity mask."
7394 msgstr ""
7395 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7396 "作成者の CPU affinity マスクを継承する。"
7397
7398 #. type: Plain text
7399 #: build/C/man3/pthread_setaffinity_np.3:162
7400 msgid ""
7401 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7402 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7403 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7404 "check the resulting CPU affinity mask of the thread."
7405 msgstr ""
7406 "以下のプログラムでは、メインスレッドは\n"
7407 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7408 "CPU 0 から 7 が含まれるように設定し\n"
7409 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7410 "その後で B<pthread_getaffinity_np>() を使って\n"
7411 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7412
7413 #. type: Plain text
7414 #: build/C/man3/pthread_setaffinity_np.3:169
7415 #, no-wrap
7416 msgid ""
7417 "#define _GNU_SOURCE\n"
7418 "#include E<lt>pthread.hE<gt>\n"
7419 "#include E<lt>stdio.hE<gt>\n"
7420 "#include E<lt>stdlib.hE<gt>\n"
7421 "#include E<lt>errno.hE<gt>\n"
7422 msgstr ""
7423 "#define _GNU_SOURCE\n"
7424 "#include E<lt>pthread.hE<gt>\n"
7425 "#include E<lt>stdio.hE<gt>\n"
7426 "#include E<lt>stdlib.hE<gt>\n"
7427 "#include E<lt>errno.hE<gt>\n"
7428
7429 #. type: Plain text
7430 #: build/C/man3/pthread_setaffinity_np.3:179
7431 #, no-wrap
7432 msgid ""
7433 "int\n"
7434 "main(int argc, char *argv[])\n"
7435 "{\n"
7436 "    int s, j;\n"
7437 "    cpu_set_t cpuset;\n"
7438 "    pthread_t thread;\n"
7439 msgstr ""
7440 "int\n"
7441 "main(int argc, char *argv[])\n"
7442 "{\n"
7443 "    int s, j;\n"
7444 "    cpu_set_t cpuset;\n"
7445 "    pthread_t thread;\n"
7446
7447 #. type: Plain text
7448 #: build/C/man3/pthread_setaffinity_np.3:181
7449 #, no-wrap
7450 msgid "    thread = pthread_self();\n"
7451 msgstr "    thread = pthread_self();\n"
7452
7453 #. type: Plain text
7454 #: build/C/man3/pthread_setaffinity_np.3:183
7455 #, no-wrap
7456 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7457 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7458
7459 #. type: Plain text
7460 #: build/C/man3/pthread_setaffinity_np.3:187
7461 #, no-wrap
7462 msgid ""
7463 "    CPU_ZERO(&cpuset);\n"
7464 "    for (j = 0; j E<lt> 8; j++)\n"
7465 "        CPU_SET(j, &cpuset);\n"
7466 msgstr ""
7467 "    CPU_ZERO(&cpuset);\n"
7468 "    for (j = 0; j E<lt> 8; j++)\n"
7469 "        CPU_SET(j, &cpuset);\n"
7470
7471 #. type: Plain text
7472 #: build/C/man3/pthread_setaffinity_np.3:191
7473 #, no-wrap
7474 msgid ""
7475 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7476 "    if (s != 0)\n"
7477 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7478 msgstr ""
7479 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7480 "    if (s != 0)\n"
7481 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7482
7483 #. type: Plain text
7484 #: build/C/man3/pthread_setaffinity_np.3:193
7485 #, no-wrap
7486 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7487 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7488
7489 #. type: Plain text
7490 #: build/C/man3/pthread_setaffinity_np.3:197
7491 #, no-wrap
7492 msgid ""
7493 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7494 "    if (s != 0)\n"
7495 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7496 msgstr ""
7497 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7498 "    if (s != 0)\n"
7499 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7500
7501 #. type: Plain text
7502 #: build/C/man3/pthread_setaffinity_np.3:202
7503 #, no-wrap
7504 msgid ""
7505 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7506 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7507 "        if (CPU_ISSET(j, &cpuset))\n"
7508 "            printf(\"    CPU %d\\en\", j);\n"
7509 msgstr ""
7510 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7511 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7512 "        if (CPU_ISSET(j, &cpuset))\n"
7513 "            printf(\"    CPU %d\\en\", j);\n"
7514
7515 #. type: Plain text
7516 #: build/C/man3/pthread_setaffinity_np.3:205
7517 #: build/C/man3/pthread_setschedparam.3:437
7518 #, no-wrap
7519 msgid ""
7520 "    exit(EXIT_SUCCESS);\n"
7521 "}\n"
7522 msgstr ""
7523 "    exit(EXIT_SUCCESS);\n"
7524 "}\n"
7525
7526 #. type: Plain text
7527 #: build/C/man3/pthread_setaffinity_np.3:214
7528 #, fuzzy
7529 #| msgid ""
7530 #| "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7531 #| "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), "
7532 #| "B<sched_getcpu>(3), B<cpuset>(7), B<pthreads>(7)"
7533 msgid ""
7534 "B<sched_setaffinity>(2), B<pthread_attr_setaffinity_np>(3), "
7535 "B<pthread_self>(3), B<sched_getcpu>(3), B<cpuset>(7), B<pthreads>(7), "
7536 "B<sched>(7)"
7537 msgstr ""
7538 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7539 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7540 "B<cpuset>(7), B<pthreads>(7)"
7541
7542 #. type: TH
7543 #: build/C/man3/pthread_setcancelstate.3:26
7544 #, no-wrap
7545 msgid "PTHREAD_SETCANCELSTATE"
7546 msgstr "PTHREAD_SETCANCELSTATE"
7547
7548 #. type: Plain text
7549 #: build/C/man3/pthread_setcancelstate.3:30
7550 msgid ""
7551 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7552 "type"
7553 msgstr ""
7554 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7555 "cancelability type を設定する"
7556
7557 #. type: Plain text
7558 #: build/C/man3/pthread_setcancelstate.3:36
7559 #, no-wrap
7560 msgid ""
7561 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7562 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7563 msgstr ""
7564 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7565 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7566
7567 #. type: Plain text
7568 #: build/C/man3/pthread_setcancelstate.3:51
7569 msgid ""
7570 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7571 "thread to the value given in I<state>.  The previous cancelability state of "
7572 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7573 "I<state> argument must have one of the following values:"
7574 msgstr ""
7575 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7576 "cancelability state に I<state> で指定された\n"
7577 "値を設定する。変更前のスレッドの cancelability state は\n"
7578 "I<oldstate> が指すバッファで返される。\n"
7579 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7580
7581 #. type: TP
7582 #: build/C/man3/pthread_setcancelstate.3:51
7583 #, no-wrap
7584 msgid "B<PTHREAD_CANCEL_ENABLE>"
7585 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7586
7587 #. type: Plain text
7588 #: build/C/man3/pthread_setcancelstate.3:58
7589 msgid ""
7590 "The thread is cancelable.  This is the default cancelability state in all "
7591 "new threads, including the initial thread.  The thread's cancelability type "
7592 "determines when a cancelable thread will respond to a cancellation request."
7593 msgstr ""
7594 "スレッドは取り消し可能 (cancelable) である。\n"
7595 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7596 "cancelability state である。これには最初のスレッドも含まれる。\n"
7597 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7598 "取り消し要求にいつ反応するかが決まる。"
7599
7600 #. type: TP
7601 #: build/C/man3/pthread_setcancelstate.3:58
7602 #, no-wrap
7603 msgid "B<PTHREAD_CANCEL_DISABLE>"
7604 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7605
7606 #. type: Plain text
7607 #: build/C/man3/pthread_setcancelstate.3:63
7608 msgid ""
7609 "The thread is not cancelable.  If a cancellation request is received, it is "
7610 "blocked until cancelability is enabled."
7611 msgstr ""
7612 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7613 "取り消し可能に設定されるまでその要求はブロックされる。"
7614
7615 #. type: Plain text
7616 #: build/C/man3/pthread_setcancelstate.3:75
7617 msgid ""
7618 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7619 "thread to the value given in I<type>.  The previous cancelability type of "
7620 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7621 "argument must have one of the following values:"
7622 msgstr ""
7623 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7624 "cancelability type に I<type> で指定された値を設定する。\n"
7625 "変更前のスレッドの cancelability type は\n"
7626 "I<oldtype> が指すバッファで返される。\n"
7627 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7628
7629 #. type: TP
7630 #: build/C/man3/pthread_setcancelstate.3:75
7631 #, no-wrap
7632 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7633 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7634
7635 #. type: Plain text
7636 #: build/C/man3/pthread_setcancelstate.3:82
7637 msgid ""
7638 "A cancellation request is deferred until the thread next calls a function "
7639 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7640 "cancelability type in all new threads, including the initial thread."
7641 msgstr ""
7642 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7643 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7644 "スレッドでのデフォルトの cancelability type である。\n"
7645 "これには最初のスレッドも含まれる。"
7646
7647 #. type: TP
7648 #: build/C/man3/pthread_setcancelstate.3:82
7649 #, no-wrap
7650 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7651 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7652
7653 #. type: Plain text
7654 #: build/C/man3/pthread_setcancelstate.3:88
7655 msgid ""
7656 "The thread can be canceled at any time.  (Typically, it will be canceled "
7657 "immediately upon receiving a cancellation request, but the system doesn't "
7658 "guarantee this.)"
7659 msgstr ""
7660 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7661 "システムがそのことを保証しているわけではない)。"
7662
7663 #. type: Plain text
7664 #: build/C/man3/pthread_setcancelstate.3:92
7665 msgid ""
7666 "The set-and-get operation performed by each of these functions is atomic "
7667 "with respect to other threads in the process calling the same function."
7668 msgstr ""
7669 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7670 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7671 "アトミックに行われる。"
7672
7673 #. type: Plain text
7674 #: build/C/man3/pthread_setcancelstate.3:99
7675 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7676 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7677
7678 #. type: Plain text
7679 #: build/C/man3/pthread_setcancelstate.3:103
7680 msgid "Invalid value for I<state>."
7681 msgstr "I<state> に無効な値が指定された。"
7682
7683 #. type: Plain text
7684 #: build/C/man3/pthread_setcancelstate.3:107
7685 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7686 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7687
7688 #.  .SH VERSIONS
7689 #.  Available since glibc 2.0
7690 #. type: Plain text
7691 #: build/C/man3/pthread_setcancelstate.3:113
7692 msgid "Invalid value for I<type>."
7693 msgstr "I<type> に無効な値が指定された。"
7694
7695 #. type: Plain text
7696 #: build/C/man3/pthread_setcancelstate.3:120
7697 #, fuzzy
7698 #| msgid ""
7699 #| "The B<pthread_attr_setdetachstate>()  and "
7700 #| "B<pthread_attr_getdetachstate>()  functions are thread-safe."
7701 msgid ""
7702 "The B<pthread_setcancelstate>()  and B<pthread_setcanceltype>()  functions "
7703 "are thread-safe."
7704 msgstr ""
7705 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
7706 "スレッドセーフである。"
7707
7708 #. type: Plain text
7709 #: build/C/man3/pthread_setcancelstate.3:125
7710 msgid ""
7711 "For details of what happens when a thread is canceled, see "
7712 "B<pthread_cancel>(3)."
7713 msgstr ""
7714 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7715 "B<pthread_cancel>(3) を参照。"
7716
7717 #. type: Plain text
7718 #: build/C/man3/pthread_setcancelstate.3:132
7719 msgid ""
7720 "Briefly disabling cancelability is useful if a thread performs some critical "
7721 "action that must not be interrupted by a cancellation request.  Beware of "
7722 "disabling cancelability for long periods, or around operations that may "
7723 "block for long periods, since that will render the thread unresponsive to "
7724 "cancellation requests."
7725 msgstr ""
7726 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7727 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7728 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7729 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7730 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7731 "スレッドが応答しない状態になってしまうからである。"
7732
7733 #. type: SS
7734 #: build/C/man3/pthread_setcancelstate.3:132
7735 #, no-wrap
7736 msgid "Asynchronous cancelability"
7737 msgstr ""
7738
7739 #. type: Plain text
7740 #: build/C/man3/pthread_setcancelstate.3:151
7741 #, fuzzy
7742 #| msgid ""
7743 #| "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is "
7744 #| "rarely useful.  Since the thread could be canceled at I<any> time, it "
7745 #| "cannot safely reserve resources (e.g., allocating memory with "
7746 #| "B<malloc>(3)), acquire mutexes, semaphores, or locks, and so on.  "
7747 #| "Reserving resources is unsafe because the application has no way of "
7748 #| "knowing what the state of these resources is when the thread is canceled; "
7749 #| "that is, did cancellation occur before the resources were reserved, while "
7750 #| "they were reserved, or after they were released? Furthermore, some "
7751 #| "internal data structures (e.g., the linked list of free blocks managed by "
7752 #| "the B<malloc>(3)  family of functions) may be left in an inconsistent "
7753 #| "state if cancellation occurs in the middle of the function call.  "
7754 #| "Consequently, clean-up handlers cease to be useful.  Functions that can "
7755 #| "be safely asynchronously canceled are called I<async-cancel-safe "
7756 #| "functions>.  POSIX.1-2001 requires only that B<pthread_cancel>(3), "
7757 #| "B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7758 #| "cancel-safe.  In general, other library functions can't be safely called "
7759 #| "from an asynchronously cancelable thread.  One of the few circumstances "
7760 #| "in which asynchronous cancelability is useful is for cancellation of a "
7761 #| "thread that is in a pure compute-bound loop."
7762 msgid ""
7763 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7764 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7765 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7766 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7767 "because the application has no way of knowing what the state of these "
7768 "resources is when the thread is canceled; that is, did cancellation occur "
7769 "before the resources were reserved, while they were reserved, or after they "
7770 "were released? Furthermore, some internal data structures (e.g., the linked "
7771 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7772 "left in an inconsistent state if cancellation occurs in the middle of the "
7773 "function call.  Consequently, clean-up handlers cease to be useful."
7774 msgstr ""
7775 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7776 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7777 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7778 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7779 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7780 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7781 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7782 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7783 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7784 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7785 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7786 "が役に立たないものになってしまう。\n"
7787 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7788 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7789 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7790 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7791 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7792 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7793 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7794
7795 #. type: Plain text
7796 #: build/C/man3/pthread_setcancelstate.3:162
7797 msgid ""
7798 "Functions that can be safely asynchronously canceled are called I<async-"
7799 "cancel-safe functions>.  POSIX.1-2001 requires only that "
7800 "B<pthread_cancel>(3), B<pthread_setcancelstate>(), and "
7801 "B<pthread_setcanceltype>()  be async-cancel-safe.  In general, other library "
7802 "functions can't be safely called from an asynchronously cancelable thread."
7803 msgstr ""
7804
7805 #. type: Plain text
7806 #: build/C/man3/pthread_setcancelstate.3:165
7807 msgid ""
7808 "One of the few circumstances in which asynchronous cancelability is useful "
7809 "is for cancellation of a thread that is in a pure compute-bound loop."
7810 msgstr ""
7811
7812 #. type: SS
7813 #: build/C/man3/pthread_setcancelstate.3:165
7814 #, no-wrap
7815 msgid "Portability notes"
7816 msgstr ""
7817
7818 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7819 #. type: Plain text
7820 #: build/C/man3/pthread_setcancelstate.3:183
7821 msgid ""
7822 "The Linux threading implementations permit the I<oldstate> argument of "
7823 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7824 "the previous cancelability state is not returned to the caller.  Many other "
7825 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7826 "does not specify this point, so portable applications should always specify "
7827 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7828 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7829 msgstr ""
7830 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7831 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7832 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7833 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7834 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7835 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7836 "NULL 以外の値を指定するようにすべきである。\n"
7837 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7838 "全く同じことが言える。"
7839
7840 #. type: Plain text
7841 #: build/C/man3/pthread_setcancelstate.3:186
7842 msgid "See B<pthread_cancel>(3)."
7843 msgstr "B<pthread_cancel>(3) を参照。"
7844
7845 #. type: Plain text
7846 #: build/C/man3/pthread_setcancelstate.3:191
7847 msgid ""
7848 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7849 "B<pthreads>(7)"
7850 msgstr ""
7851 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7852 "B<pthreads>(7)"
7853
7854 #. type: TH
7855 #: build/C/man3/pthread_setconcurrency.3:25
7856 #, no-wrap
7857 msgid "PTHREAD_SETCONCURRENCY"
7858 msgstr "PTHREAD_SETCONCURRENCY"
7859
7860 #. type: TH
7861 #: build/C/man3/pthread_setconcurrency.3:25
7862 #, no-wrap
7863 msgid "2009-04-10"
7864 msgstr "2009-04-10"
7865
7866 #. type: Plain text
7867 #: build/C/man3/pthread_setconcurrency.3:29
7868 msgid ""
7869 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7870 "level"
7871 msgstr ""
7872 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7873 "行う"
7874
7875 #. type: Plain text
7876 #: build/C/man3/pthread_setconcurrency.3:35
7877 #, no-wrap
7878 msgid ""
7879 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7880 "B<int pthread_getconcurrency(void);>\n"
7881 msgstr ""
7882 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7883 "B<int pthread_getconcurrency(void);>\n"
7884
7885 #. type: Plain text
7886 #: build/C/man3/pthread_setconcurrency.3:48
7887 msgid ""
7888 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7889 "application's desired concurrency level, specified in I<new_level>.  The "
7890 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7891 "of concurrency that should be provided as a result of calling "
7892 "B<pthread_setconcurrency>()."
7893 msgstr ""
7894 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7895 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7896 "希望する並列処理レベルは I<new_level> で指定する。\n"
7897 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7898 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7899 "どのような並列度になるべきかは規定されていない。"
7900
7901 #. type: Plain text
7902 #: build/C/man3/pthread_setconcurrency.3:53
7903 msgid ""
7904 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7905 "concurrency level as it deems appropriate."
7906 msgstr ""
7907 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7908 "実装側で適切とみなしたレベルに設定するようになる。"
7909
7910 #. type: Plain text
7911 #: build/C/man3/pthread_setconcurrency.3:56
7912 msgid ""
7913 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7914 "level for this process."
7915 msgstr ""
7916 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7917 "の現在値を返す。"
7918
7919 #. type: Plain text
7920 #: build/C/man3/pthread_setconcurrency.3:61
7921 msgid ""
7922 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7923 "nonzero error number."
7924 msgstr ""
7925 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7926 "エラーの場合、 0 以外のエラー番号を返す。"
7927
7928 #. type: Plain text
7929 #: build/C/man3/pthread_setconcurrency.3:68
7930 msgid ""
7931 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7932 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7933 "B<pthread_setconcurrency>()  has not previously been called."
7934 msgstr ""
7935 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7936 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7937 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7938 "それまでに一度も呼び出されていない場合は 0 が返る。"
7939
7940 #. type: Plain text
7941 #: build/C/man3/pthread_setconcurrency.3:71
7942 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7943 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7944
7945 #. type: Plain text
7946 #: build/C/man3/pthread_setconcurrency.3:75
7947 msgid "I<new_level> is negative."
7948 msgstr "I<new_level> が負である。"
7949
7950 #. type: Plain text
7951 #: build/C/man3/pthread_setconcurrency.3:81
7952 msgid ""
7953 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7954 "I<new_level> would cause a system resource to be exceeded\")."
7955 msgstr ""
7956 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7957 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7958 "超過してしまう」)。"
7959
7960 #. type: Plain text
7961 #: build/C/man3/pthread_setconcurrency.3:83
7962 msgid "These functions are available in glibc since version 2.1."
7963 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7964
7965 #. type: Plain text
7966 #: build/C/man3/pthread_setconcurrency.3:87
7967 msgid "The default concurrency level is 0."
7968 msgstr "デフォルトの concurrency level は 0 である。"
7969
7970 #. type: Plain text
7971 #: build/C/man3/pthread_setconcurrency.3:94
7972 msgid ""
7973 "Concurrency levels are meaningful only for M:N threading implementations, "
7974 "where at any moment a subset of a process's set of user-level threads may be "
7975 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7976 "concurrency level allows the application to give the system a hint as to the "
7977 "number of kernel-scheduling entities that should be provided for efficient "
7978 "execution of the application."
7979 msgstr ""
7980 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7981 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7982 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7983 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7984 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7985 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7986 "ムに伝えることができる。"
7987
7988 #. type: Plain text
7989 #: build/C/man3/pthread_setconcurrency.3:100
7990 msgid ""
7991 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7992 "concurrency level has no meaning.  In other words, on Linux these functions "
7993 "merely exist for compatibility with other systems, and they have no effect "
7994 "on the execution of a program."
7995 msgstr ""
7996 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7997 "並列処理レベルを設定しても何の意味もない。\n"
7998 "言い換えると、 Linux では、これらの関数は、\n"
7999 "他のシステムとの互換性のためだけに存在し、\n"
8000 "プログラムの実行には何の影響も与えないということである。"
8001
8002 #. type: Plain text
8003 #: build/C/man3/pthread_setconcurrency.3:103
8004 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
8005 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
8006
8007 #. type: TH
8008 #: build/C/man3/pthread_setname_np.3:26
8009 #, no-wrap
8010 msgid "PTHREAD_SETNAME_NP"
8011 msgstr "PTHREAD_SETNAME_NP"
8012
8013 #. type: TH
8014 #: build/C/man3/pthread_setname_np.3:26
8015 #, no-wrap
8016 msgid "2013-06-21"
8017 msgstr "2013-06-21"
8018
8019 #. type: Plain text
8020 #: build/C/man3/pthread_setname_np.3:29
8021 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
8022 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
8023
8024 #. type: Plain text
8025 #: build/C/man3/pthread_setname_np.3:36
8026 #, no-wrap
8027 msgid ""
8028 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
8029 "B<#include E<lt>pthread.hE<gt>>\n"
8030 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
8031 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
8032 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
8033 msgstr ""
8034 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
8035 "B<#include E<lt>pthread.hE<gt>>\n"
8036 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
8037 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
8038 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
8039
8040 #. type: Plain text
8041 #: build/C/man3/pthread_setname_np.3:55
8042 msgid ""
8043 "By default, all the threads created using B<pthread_create>()  inherit the "
8044 "program name.  The B<pthread_setname_np>()  function can be used to set a "
8045 "unique name for a thread, which can be useful for debugging multithreaded "
8046 "applications.  The thread name is a meaningful C language string, whose "
8047 "length is restricted to 16 characters, including the terminating null byte "
8048 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
8049 "to be changed; I<name> specifies the new name."
8050 msgstr ""
8051 "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム"
8052 "名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定"
8053 "することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデ"
8054 "バッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さ"
8055 "は 16 文字に限定されており、 終端のヌルバイト (\\(aq\\e0\\(aq) も 16 文字に含"
8056 "まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には新"
8057 "しい名前を指定する。"
8058
8059 #. type: Plain text
8060 #: build/C/man3/pthread_setname_np.3:72
8061 msgid ""
8062 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
8063 "the thread.  The I<thread> argument specifies the thread whose name is to be "
8064 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
8065 "specifies the number of bytes available in I<name>.  The buffer specified by "
8066 "I<name> should be at least 16 characters in length.  The returned thread "
8067 "name in the output buffer will be null terminated."
8068 msgstr ""
8069 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
8070 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
8071 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
8072 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
8073 "出力バッファに返されたスレッド名はヌル終端される。"
8074
8075 #. type: Plain text
8076 #: build/C/man3/pthread_setname_np.3:79
8077 msgid ""
8078 "The B<pthread_setname_np>()  function can fail with the following error:"
8079 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
8080
8081 #. type: TP
8082 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
8083 #, no-wrap
8084 msgid "B<ERANGE>"
8085 msgstr "B<ERANGE>"
8086
8087 #. type: Plain text
8088 #: build/C/man3/pthread_setname_np.3:84
8089 msgid ""
8090 "The length of the string specified pointed to by I<name> exceeds the allowed "
8091 "limit."
8092 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
8093
8094 #. type: Plain text
8095 #: build/C/man3/pthread_setname_np.3:88
8096 msgid ""
8097 "The B<pthread_getname_np>()  function can fail with the following error:"
8098 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
8099
8100 #. type: Plain text
8101 #: build/C/man3/pthread_setname_np.3:95
8102 msgid ""
8103 "The buffer specified by I<name> and I<len> is too small to hold the thread "
8104 "name."
8105 msgstr ""
8106 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
8107 "る。"
8108
8109 #. type: Plain text
8110 #: build/C/man3/pthread_setname_np.3:100
8111 msgid ""
8112 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
8113 "then the call may fail with one of the errors described in B<open>(2)."
8114 msgstr ""
8115 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
8116 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
8117
8118 #. type: Plain text
8119 #: build/C/man3/pthread_setname_np.3:102
8120 msgid "These functions first appeared in glibc in version 2.12."
8121 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
8122
8123 #. type: Plain text
8124 #: build/C/man3/pthread_setname_np.3:104
8125 msgid "These functions are nonstandard GNU extensions."
8126 msgstr "これらの関数は非標準の GNU による拡張である。"
8127
8128 #. type: Plain text
8129 #: build/C/man3/pthread_setname_np.3:114
8130 msgid ""
8131 "B<pthread_setname_np>()  internally writes to the thread-specific I<comm> "
8132 "file under the I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
8133 "B<pthread_getname_np>()  retrieves it from the same location."
8134 msgstr ""
8135 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
8136 "I<comm> ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
8137 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
8138
8139 #. type: Plain text
8140 #: build/C/man3/pthread_setname_np.3:120
8141 msgid ""
8142 "The program below demonstrates the use of B<pthread_setname_np>()  and "
8143 "B<pthread_getname_np>()."
8144 msgstr ""
8145 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
8146 "の使用例を示している。"
8147
8148 #. type: Plain text
8149 #: build/C/man3/pthread_setname_np.3:122
8150 msgid "The following shell session shows a sample run of the program:"
8151 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
8152
8153 #. type: Plain text
8154 #: build/C/man3/pthread_setname_np.3:138
8155 #, no-wrap
8156 msgid ""
8157 "$B< ./a.out>\n"
8158 "Created a thread. Default name is: a.out\n"
8159 "The thread name after setting it is THREADFOO.\n"
8160 "B<^Z>                           # Suspend the program\n"
8161 "[1]+  Stopped           ./a.out\n"
8162 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
8163 "  PID   TID CMD                         COMMAND\n"
8164 " 5990  5990 ./a.out                     a.out\n"
8165 " 5990  5991 ./a.out                     THREADFOO\n"
8166 "$ B<cat /proc/5990/task/5990/comm>\n"
8167 "a.out\n"
8168 "$ B<cat /proc/5990/task/5991/comm>\n"
8169 "THREADFOO\n"
8170 msgstr ""
8171 "$B< ./a.out>\n"
8172 "Created a thread. Default name is: a.out\n"
8173 "The thread name after setting it is THREADFOO.\n"
8174 "B<^Z>                           # Suspend the program\n"
8175 "[1]+  Stopped           ./a.out\n"
8176 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
8177 "  PID   TID CMD                         COMMAND\n"
8178 " 5990  5990 ./a.out                     a.out\n"
8179 " 5990  5991 ./a.out                     THREADFOO\n"
8180 "$ B<cat /proc/5990/task/5990/comm>\n"
8181 "a.out\n"
8182 "$ B<cat /proc/5990/task/5991/comm>\n"
8183 "THREADFOO\n"
8184
8185 #. type: Plain text
8186 #: build/C/man3/pthread_setname_np.3:150
8187 #, no-wrap
8188 msgid ""
8189 "#define _GNU_SOURCE\n"
8190 "#include E<lt>pthread.hE<gt>\n"
8191 "#include E<lt>stdio.hE<gt>\n"
8192 "#include E<lt>string.hE<gt>\n"
8193 "#include E<lt>unistd.hE<gt>\n"
8194 "#include E<lt>errno.hE<gt>\n"
8195 "#include E<lt>stdlib.hE<gt>\n"
8196 msgstr ""
8197 "#define _GNU_SOURCE\n"
8198 "#include E<lt>pthread.hE<gt>\n"
8199 "#include E<lt>stdio.hE<gt>\n"
8200 "#include E<lt>string.hE<gt>\n"
8201 "#include E<lt>unistd.hE<gt>\n"
8202 "#include E<lt>errno.hE<gt>\n"
8203 "#include E<lt>stdlib.hE<gt>\n"
8204
8205 #. type: Plain text
8206 #: build/C/man3/pthread_setname_np.3:152
8207 #, no-wrap
8208 msgid "#define NAMELEN 16\n"
8209 msgstr "#define NAMELEN 16\n"
8210
8211 #. type: Plain text
8212 #: build/C/man3/pthread_setname_np.3:156
8213 #, no-wrap
8214 msgid ""
8215 "#define errExitEN(en, msg) \\e\n"
8216 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
8217 "        } while (0)\n"
8218 msgstr ""
8219 "#define errExitEN(en, msg) \\e\n"
8220 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
8221 "        } while (0)\n"
8222
8223 #. type: Plain text
8224 #: build/C/man3/pthread_setname_np.3:163
8225 #, no-wrap
8226 msgid ""
8227 "static void *\n"
8228 "threadfunc(void *parm)\n"
8229 "{\n"
8230 "    sleep(5);          // allow main program to set the thread name\n"
8231 "    return NULL;\n"
8232 "}\n"
8233 msgstr ""
8234 "static void *\n"
8235 "threadfunc(void *parm)\n"
8236 "{\n"
8237 "    sleep(5);          // allow main program to set the thread name\n"
8238 "    return NULL;\n"
8239 "}\n"
8240
8241 #. type: Plain text
8242 #: build/C/man3/pthread_setname_np.3:170
8243 #, no-wrap
8244 msgid ""
8245 "int\n"
8246 "main(int argc, char **argv)\n"
8247 "{\n"
8248 "    pthread_t thread;\n"
8249 "    int rc;\n"
8250 "    char thread_name[NAMELEN];\n"
8251 msgstr ""
8252 "int\n"
8253 "main(int argc, char **argv)\n"
8254 "{\n"
8255 "    pthread_t thread;\n"
8256 "    int rc;\n"
8257 "    char thread_name[NAMELEN];\n"
8258
8259 #. type: Plain text
8260 #: build/C/man3/pthread_setname_np.3:174
8261 #, no-wrap
8262 msgid ""
8263 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8264 "    if (rc != 0)\n"
8265 "        errExitEN(rc, \"pthread_create\");\n"
8266 msgstr ""
8267 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8268 "    if (rc != 0)\n"
8269 "        errExitEN(rc, \"pthread_create\");\n"
8270
8271 #. type: Plain text
8272 #: build/C/man3/pthread_setname_np.3:178
8273 #, no-wrap
8274 msgid ""
8275 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8276 "    if (rc != 0)\n"
8277 "        errExitEN(rc, \"pthread_getname_np\");\n"
8278 msgstr ""
8279 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8280 "    if (rc != 0)\n"
8281 "        errExitEN(rc, \"pthread_getname_np\");\n"
8282
8283 #. type: Plain text
8284 #: build/C/man3/pthread_setname_np.3:183
8285 #, no-wrap
8286 msgid ""
8287 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8288 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8289 "    if (rc != 0)\n"
8290 "        errExitEN(rc, \"pthread_setname_np\");\n"
8291 msgstr ""
8292 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8293 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8294 "    if (rc != 0)\n"
8295 "        errExitEN(rc, \"pthread_setname_np\");\n"
8296
8297 #. type: Plain text
8298 #: build/C/man3/pthread_setname_np.3:185
8299 #, no-wrap
8300 msgid "    sleep(2);\n"
8301 msgstr "    sleep(2);\n"
8302
8303 #. type: Plain text
8304 #: build/C/man3/pthread_setname_np.3:191
8305 #, no-wrap
8306 msgid ""
8307 "    rc = pthread_getname_np(thread, thread_name,\n"
8308 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8309 "    if (rc != 0)\n"
8310 "        errExitEN(rc, \"pthread_getname_np\");\n"
8311 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8312 msgstr ""
8313 "    rc = pthread_getname_np(thread, thread_name,\n"
8314 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8315 "    if (rc != 0)\n"
8316 "        errExitEN(rc, \"pthread_getname_np\");\n"
8317 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8318
8319 #. type: Plain text
8320 #: build/C/man3/pthread_setname_np.3:195
8321 #, no-wrap
8322 msgid ""
8323 "    rc = pthread_join(thread, NULL);\n"
8324 "    if (rc != 0)\n"
8325 "        errExitEN(rc, \"pthread_join\");\n"
8326 msgstr ""
8327 "    rc = pthread_join(thread, NULL);\n"
8328 "    if (rc != 0)\n"
8329 "        errExitEN(rc, \"pthread_join\");\n"
8330
8331 #. type: Plain text
8332 #: build/C/man3/pthread_setname_np.3:199
8333 #, no-wrap
8334 msgid ""
8335 "    printf(\"Done\\en\");\n"
8336 "    exit(EXIT_SUCCESS);\n"
8337 "}\n"
8338 msgstr ""
8339 "    printf(\"Done\\en\");\n"
8340 "    exit(EXIT_SUCCESS);\n"
8341 "}\n"
8342
8343 #. type: Plain text
8344 #: build/C/man3/pthread_setname_np.3:206
8345 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8346 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8347
8348 #. type: TH
8349 #: build/C/man3/pthread_setschedparam.3:26
8350 #, no-wrap
8351 msgid "PTHREAD_SETSCHEDPARAM"
8352 msgstr "PTHREAD_SETSCHEDPARAM"
8353
8354 #. type: TH
8355 #: build/C/man3/pthread_setschedparam.3:26
8356 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
8357 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
8358 #, fuzzy, no-wrap
8359 #| msgid "2014-04-14"
8360 msgid "2014-05-19"
8361 msgstr "2014-04-14"
8362
8363 #. type: Plain text
8364 #: build/C/man3/pthread_setschedparam.3:30
8365 msgid ""
8366 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8367 "parameters of a thread"
8368 msgstr ""
8369 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8370 "スケジューリングポリシーとパラメータを設定/取得する"
8371
8372 #. type: Plain text
8373 #: build/C/man3/pthread_setschedparam.3:38
8374 #, no-wrap
8375 msgid ""
8376 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8377 "B<                      const struct sched_param *>I<param>B<);>\n"
8378 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8379 "B<                      struct sched_param *>I<param>B<);>\n"
8380 msgstr ""
8381 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8382 "B<                      const struct sched_param *>I<param>B<);>\n"
8383 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8384 "B<                      struct sched_param *>I<param>B<);>\n"
8385
8386 #. type: Plain text
8387 #: build/C/man3/pthread_setschedparam.3:46
8388 msgid ""
8389 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8390 "parameters of the thread I<thread>."
8391 msgstr ""
8392 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8393 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8394
8395 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8396 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8397 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8398 #. type: Plain text
8399 #: build/C/man3/pthread_setschedparam.3:57
8400 #, fuzzy
8401 #| msgid ""
8402 #| "I<policy> specifies the new scheduling policy for I<thread>.  The "
8403 #| "supported values for I<policy>, and their semantics, are described in "
8404 #| "B<sched_setscheduler>(2)."
8405 msgid ""
8406 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8407 "values for I<policy>, and their semantics, are described in B<sched>(7)."
8408 msgstr ""
8409 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8410 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8411 "説明されている。"
8412
8413 #. type: Plain text
8414 #: build/C/man3/pthread_setschedparam.3:63
8415 msgid ""
8416 "The structure pointed to by I<param> specifies the new scheduling parameters "
8417 "for I<thread>.  Scheduling parameters are maintained in the following "
8418 "structure:"
8419 msgstr ""
8420 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8421 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8422
8423 #.  FIXME . nptl/pthread_setschedparam.c has the following
8424 #.    /* If the thread should have higher priority because of some
8425 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8426 #.  Eventually (perhaps after writing the mutexattr pages), we
8427 #.  may want to add something on the topic to this page.
8428 #. type: Plain text
8429 #: build/C/man3/pthread_setschedparam.3:104
8430 msgid ""
8431 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8432 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8433 "and I<param>, respectively.  The returned priority value is that set by the "
8434 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8435 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8436 "does not reflect any temporary priority adjustments as a result of calls to "
8437 "any priority inheritance or priority ceiling functions (see, for example, "
8438 "B<pthread_mutexattr_setprioceiling>(3)  and "
8439 "B<pthread_mutexattr_setprotocol>(3))."
8440 msgstr ""
8441 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8442 "スケジューリングポリシーとパラメータを、\n"
8443 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8444 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8445 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8446 "B<pthread_create> で設定された値となる。\n"
8447 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8448 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8449 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8450 "行われる一時的な優先度の調整の影響を受けない。"
8451
8452 #. type: Plain text
8453 #: build/C/man3/pthread_setschedparam.3:112
8454 msgid ""
8455 "On success, these functions return 0; on error, they return a nonzero error "
8456 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8457 "parameters of I<thread> are not changed."
8458 msgstr ""
8459 "成功すると、これらの関数は 0 を返す。\n"
8460 "エラーの場合、0 以外のエラー番号を返す。\n"
8461 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8462 "スケジューリングポリシーとパラメータは変更されない。"
8463
8464 #. type: Plain text
8465 #: build/C/man3/pthread_setschedparam.3:114
8466 msgid "Both of these functions can fail with the following error:"
8467 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8468
8469 #. type: Plain text
8470 #: build/C/man3/pthread_setschedparam.3:122
8471 msgid ""
8472 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8473 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8474
8475 #. type: Plain text
8476 #: build/C/man3/pthread_setschedparam.3:129
8477 msgid ""
8478 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8479 "the I<policy>."
8480 msgstr ""
8481 "I<policy> が認識できないポリシーであるか、\n"
8482 "I<param> が I<policy> では意味を持たない値である。"
8483
8484 #. type: Plain text
8485 #: build/C/man3/pthread_setschedparam.3:133
8486 msgid ""
8487 "The caller does not have appropriate privileges to set the specified "
8488 "scheduling policy and parameters."
8489 msgstr ""
8490 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8491 "のに必要な特権を持たない。"
8492
8493 #.  .SH VERSIONS
8494 #.  Available since glibc 2.0
8495 #. type: Plain text
8496 #: build/C/man3/pthread_setschedparam.3:141
8497 msgid ""
8498 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8499 "policy or scheduling parameters to an unsupported value\") error for "
8500 "B<pthread_setschedparam>()."
8501 msgstr ""
8502 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8503 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8504 "パラメータに設定しようとした\") も追加で規定されている。"
8505
8506 #. type: Plain text
8507 #: build/C/man3/pthread_setschedparam.3:148
8508 #, fuzzy
8509 #| msgid ""
8510 #| "The B<pthread_attr_setdetachstate>()  and "
8511 #| "B<pthread_attr_getdetachstate>()  functions are thread-safe."
8512 msgid ""
8513 "The B<pthread_setschedparam>()  and B<pthread_getschedparam>()  functions "
8514 "are thread-safe."
8515 msgstr ""
8516 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
8517 "スレッドセーフである。"
8518
8519 #. type: Plain text
8520 #: build/C/man3/pthread_setschedparam.3:156
8521 #, fuzzy
8522 #| msgid ""
8523 #| "For a description of the permissions required to, and the effect of, "
8524 #| "changing a thread's scheduling policy and priority, and details of the "
8525 #| "permitted ranges for priorities in each scheduling policy, see "
8526 #| "B<sched_setscheduler>(2)."
8527 msgid ""
8528 "For a description of the permissions required to, and the effect of, "
8529 "changing a thread's scheduling policy and priority, and details of the "
8530 "permitted ranges for priorities in each scheduling policy, see B<sched>(7)."
8531 msgstr ""
8532 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8533 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8534 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8535
8536 #. type: Plain text
8537 #: build/C/man3/pthread_setschedparam.3:163
8538 msgid ""
8539 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8540 "B<pthread_getschedparam>(), as well as the use of a number of other "
8541 "scheduling-related pthreads functions."
8542 msgstr ""
8543 "以下のプログラムは B<pthread_setschedparam>() と\n"
8544 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8545 "他のいろいろな関数の使用例を示すものである。"
8546
8547 #. type: Plain text
8548 #: build/C/man3/pthread_setschedparam.3:179
8549 msgid ""
8550 "In the following run, the main thread sets its scheduling policy to "
8551 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8552 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8553 "priority attribute of 20.  The program then sets (using "
8554 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8555 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8556 "created using this attributes object should take their scheduling attributes "
8557 "from the thread attributes object.  The program then creates a thread using "
8558 "the thread attributes object, and that thread displays its scheduling policy "
8559 "and priority."
8560 msgstr ""
8561 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8562 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8563 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8564 "属性 20 で初期化する。\n"
8565 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8566 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8567 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8568 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8569 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8570 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8571 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8572
8573 #. type: Plain text
8574 #: build/C/man3/pthread_setschedparam.3:187
8575 #, no-wrap
8576 msgid ""
8577 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8578 "Password:\n"
8579 "# B<./a.out -mf10 -ar20 -i e>\n"
8580 "Scheduler settings of main thread\n"
8581 "    policy=SCHED_FIFO, priority=10\n"
8582 msgstr ""
8583 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8584 "Password:\n"
8585 "# B<./a.out -mf10 -ar20 -i e>\n"
8586 "Scheduler settings of main thread\n"
8587 "    policy=SCHED_FIFO, priority=10\n"
8588
8589 #. type: Plain text
8590 #: build/C/man3/pthread_setschedparam.3:191
8591 #, no-wrap
8592 msgid ""
8593 "Scheduler settings in \\(aqattr\\(aq\n"
8594 "    policy=SCHED_RR, priority=20\n"
8595 "    inheritsched is EXPLICIT\n"
8596 msgstr ""
8597 "Scheduler settings in \\(aqattr\\(aq\n"
8598 "    policy=SCHED_RR, priority=20\n"
8599 "    inheritsched is EXPLICIT\n"
8600
8601 #. type: Plain text
8602 #: build/C/man3/pthread_setschedparam.3:194
8603 #, no-wrap
8604 msgid ""
8605 "Scheduler attributes of new thread\n"
8606 "    policy=SCHED_RR, priority=20\n"
8607 msgstr ""
8608 "Scheduler attributes of new thread\n"
8609 "    policy=SCHED_RR, priority=20\n"
8610
8611 #. type: Plain text
8612 #: build/C/man3/pthread_setschedparam.3:199
8613 msgid ""
8614 "In the above output, one can see that the scheduling policy and priority "
8615 "were taken from the values specified in the thread attributes object."
8616 msgstr ""
8617 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8618 "オブジェクトで指定された値から取られていることが分かる。"
8619
8620 #. type: Plain text
8621 #: build/C/man3/pthread_setschedparam.3:206
8622 msgid ""
8623 "The next run is the same as the previous, except that the inherit scheduler "
8624 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8625 "using the thread attributes object should ignore the scheduling attributes "
8626 "specified in the attributes object and instead take their scheduling "
8627 "attributes from the creating thread."
8628 msgstr ""
8629 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8630 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8631 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8632 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8633 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8634 "ことを意味する。"
8635
8636 #. type: Plain text
8637 #: build/C/man3/pthread_setschedparam.3:212
8638 #, no-wrap
8639 msgid ""
8640 "# B<./a.out -mf10 -ar20 -i i>\n"
8641 "Scheduler settings of main thread\n"
8642 "    policy=SCHED_FIFO, priority=10\n"
8643 msgstr ""
8644 "# B<./a.out -mf10 -ar20 -i i>\n"
8645 "Scheduler settings of main thread\n"
8646 "    policy=SCHED_FIFO, priority=10\n"
8647
8648 #. type: Plain text
8649 #: build/C/man3/pthread_setschedparam.3:216
8650 #, no-wrap
8651 msgid ""
8652 "Scheduler settings in \\(aqattr\\(aq\n"
8653 "    policy=SCHED_RR, priority=20\n"
8654 "    inheritsched is INHERIT\n"
8655 msgstr ""
8656 "Scheduler settings in \\(aqattr\\(aq\n"
8657 "    policy=SCHED_RR, priority=20\n"
8658 "    inheritsched is INHERIT\n"
8659
8660 #. type: Plain text
8661 #: build/C/man3/pthread_setschedparam.3:219
8662 #, no-wrap
8663 msgid ""
8664 "Scheduler attributes of new thread\n"
8665 "    policy=SCHED_FIFO, priority=10\n"
8666 msgstr ""
8667 "Scheduler attributes of new thread\n"
8668 "    policy=SCHED_FIFO, priority=10\n"
8669
8670 #. type: Plain text
8671 #: build/C/man3/pthread_setschedparam.3:225
8672 msgid ""
8673 "In the above output, one can see that the scheduling policy and priority "
8674 "were taken from the creating thread, rather than the thread attributes "
8675 "object."
8676 msgstr ""
8677 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8678 "スレッド属性オブジェクトからではなく、\n"
8679 "スレッドを作成したスレッドから取れれていることが分かる。"
8680
8681 #. type: Plain text
8682 #: build/C/man3/pthread_setschedparam.3:231
8683 msgid ""
8684 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8685 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8686 "scheduler attribute."
8687 msgstr ""
8688 "なお、 I<-i\\ i> を省略した場合でも、\n"
8689 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8690 "出力は同じになる。"
8691
8692 #. type: Plain text
8693 #: build/C/man3/pthread_setschedparam.3:235
8694 #, no-wrap
8695 msgid "/* pthreads_sched_test.c */\n"
8696 msgstr "/* pthreads_sched_test.c */\n"
8697
8698 #. type: Plain text
8699 #: build/C/man3/pthread_setschedparam.3:241
8700 #, no-wrap
8701 msgid ""
8702 "#include E<lt>pthread.hE<gt>\n"
8703 "#include E<lt>stdio.hE<gt>\n"
8704 "#include E<lt>stdlib.hE<gt>\n"
8705 "#include E<lt>unistd.hE<gt>\n"
8706 "#include E<lt>errno.hE<gt>\n"
8707 msgstr ""
8708 "#include E<lt>pthread.hE<gt>\n"
8709 "#include E<lt>stdio.hE<gt>\n"
8710 "#include E<lt>stdlib.hE<gt>\n"
8711 "#include E<lt>unistd.hE<gt>\n"
8712 "#include E<lt>errno.hE<gt>\n"
8713
8714 #. type: Plain text
8715 #: build/C/man3/pthread_setschedparam.3:250
8716 #, no-wrap
8717 msgid ""
8718 "static void\n"
8719 "usage(char *prog_name, char *msg)\n"
8720 "{\n"
8721 "    if (msg != NULL)\n"
8722 "        fputs(msg, stderr);\n"
8723 msgstr ""
8724 "static void\n"
8725 "usage(char *prog_name, char *msg)\n"
8726 "{\n"
8727 "    if (msg != NULL)\n"
8728 "        fputs(msg, stderr);\n"
8729
8730 #. type: Plain text
8731 #: build/C/man3/pthread_setschedparam.3:267
8732 #, no-wrap
8733 msgid ""
8734 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8735 "    fprintf(stderr, \"Options are:\\en\");\n"
8736 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8737 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8738 "    fpe(\"                 thread attributes object\\en\");\n"
8739 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8740 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8741 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8742 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8743 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8744 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8745 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8746 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8747 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8748 "    exit(EXIT_FAILURE);\n"
8749 "}\n"
8750 msgstr ""
8751 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8752 "    fprintf(stderr, \"Options are:\\en\");\n"
8753 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8754 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8755 "    fpe(\"                 thread attributes object\\en\");\n"
8756 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8757 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8758 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8759 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8760 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8761 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8762 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8763 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8764 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8765 "    exit(EXIT_FAILURE);\n"
8766 "}\n"
8767
8768 #. type: Plain text
8769 #: build/C/man3/pthread_setschedparam.3:278
8770 #, no-wrap
8771 msgid ""
8772 "static int\n"
8773 "get_policy(char p, int *policy)\n"
8774 "{\n"
8775 "    switch (p) {\n"
8776 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8777 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8778 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8779 "    default:  return 0;\n"
8780 "    }\n"
8781 "}\n"
8782 msgstr ""
8783 "static int\n"
8784 "get_policy(char p, int *policy)\n"
8785 "{\n"
8786 "    switch (p) {\n"
8787 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8788 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8789 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8790 "    default:  return 0;\n"
8791 "    }\n"
8792 "}\n"
8793
8794 #. type: Plain text
8795 #: build/C/man3/pthread_setschedparam.3:289
8796 #, no-wrap
8797 msgid ""
8798 "static void\n"
8799 "display_sched_attr(int policy, struct sched_param *param)\n"
8800 "{\n"
8801 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8802 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8803 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8804 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8805 "            \"???\",\n"
8806 "            param-E<gt>sched_priority);\n"
8807 "}\n"
8808 msgstr ""
8809 "static void\n"
8810 "display_sched_attr(int policy, struct sched_param *param)\n"
8811 "{\n"
8812 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8813 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8814 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8815 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8816 "            \"???\",\n"
8817 "            param-E<gt>sched_priority);\n"
8818 "}\n"
8819
8820 #. type: Plain text
8821 #: build/C/man3/pthread_setschedparam.3:295
8822 #, no-wrap
8823 msgid ""
8824 "static void\n"
8825 "display_thread_sched_attr(char *msg)\n"
8826 "{\n"
8827 "    int policy, s;\n"
8828 "    struct sched_param param;\n"
8829 msgstr ""
8830 "static void\n"
8831 "display_thread_sched_attr(char *msg)\n"
8832 "{\n"
8833 "    int policy, s;\n"
8834 "    struct sched_param param;\n"
8835
8836 #. type: Plain text
8837 #: build/C/man3/pthread_setschedparam.3:299
8838 #, no-wrap
8839 msgid ""
8840 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8841 "    if (s != 0)\n"
8842 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8843 msgstr ""
8844 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8845 "    if (s != 0)\n"
8846 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8847
8848 #. type: Plain text
8849 #: build/C/man3/pthread_setschedparam.3:303
8850 #, no-wrap
8851 msgid ""
8852 "    printf(\"%s\\en\", msg);\n"
8853 "    display_sched_attr(policy, &param);\n"
8854 "}\n"
8855 msgstr ""
8856 "    printf(\"%s\\en\", msg);\n"
8857 "    display_sched_attr(policy, &param);\n"
8858 "}\n"
8859
8860 #. type: Plain text
8861 #: build/C/man3/pthread_setschedparam.3:308
8862 #, no-wrap
8863 msgid ""
8864 "static void *\n"
8865 "thread_start(void *arg)\n"
8866 "{\n"
8867 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8868 msgstr ""
8869 "static void *\n"
8870 "thread_start(void *arg)\n"
8871 "{\n"
8872 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8873
8874 #. type: Plain text
8875 #: build/C/man3/pthread_setschedparam.3:311
8876 #, no-wrap
8877 msgid ""
8878 "    return NULL;\n"
8879 "}\n"
8880 msgstr ""
8881 "    return NULL;\n"
8882 "}\n"
8883
8884 #. type: Plain text
8885 #: build/C/man3/pthread_setschedparam.3:321
8886 #, no-wrap
8887 msgid ""
8888 "int\n"
8889 "main(int argc, char *argv[])\n"
8890 "{\n"
8891 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8892 "    pthread_t thread;\n"
8893 "    pthread_attr_t attr;\n"
8894 "    pthread_attr_t *attrp;\n"
8895 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8896 "    struct sched_param param;\n"
8897 msgstr ""
8898 "int\n"
8899 "main(int argc, char *argv[])\n"
8900 "{\n"
8901 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8902 "    pthread_t thread;\n"
8903 "    pthread_attr_t attr;\n"
8904 "    pthread_attr_t *attrp;\n"
8905 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8906 "    struct sched_param param;\n"
8907
8908 #. type: Plain text
8909 #: build/C/man3/pthread_setschedparam.3:323
8910 #, no-wrap
8911 msgid "    /* Process command-line options */\n"
8912 msgstr "    /* Process command-line options */\n"
8913
8914 #. type: Plain text
8915 #: build/C/man3/pthread_setschedparam.3:328
8916 #, no-wrap
8917 msgid ""
8918 "    use_null_attrib = 0;\n"
8919 "    attr_sched_str = NULL;\n"
8920 "    main_sched_str = NULL;\n"
8921 "    inheritsched_str = NULL;\n"
8922 msgstr ""
8923 "    use_null_attrib = 0;\n"
8924 "    attr_sched_str = NULL;\n"
8925 "    main_sched_str = NULL;\n"
8926 "    inheritsched_str = NULL;\n"
8927
8928 #. type: Plain text
8929 #: build/C/man3/pthread_setschedparam.3:338
8930 #, no-wrap
8931 msgid ""
8932 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8933 "        switch (opt) {\n"
8934 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8935 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8936 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8937 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8938 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8939 "        }\n"
8940 "    }\n"
8941 msgstr ""
8942 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8943 "        switch (opt) {\n"
8944 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8945 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8946 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8947 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8948 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8949 "        }\n"
8950 "    }\n"
8951
8952 #. type: Plain text
8953 #: build/C/man3/pthread_setschedparam.3:342
8954 #, no-wrap
8955 msgid ""
8956 "    if (use_null_attrib &&\n"
8957 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8958 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8959 msgstr ""
8960 "    if (use_null_attrib &&\n"
8961 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8962 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8963
8964 #. type: Plain text
8965 #: build/C/man3/pthread_setschedparam.3:345
8966 #, no-wrap
8967 msgid ""
8968 "    /* Optionally set scheduling attributes of main thread,\n"
8969 "       and display the attributes */\n"
8970 msgstr ""
8971 "    /* Optionally set scheduling attributes of main thread,\n"
8972 "       and display the attributes */\n"
8973
8974 #. type: Plain text
8975 #: build/C/man3/pthread_setschedparam.3:350
8976 #, no-wrap
8977 msgid ""
8978 "    if (main_sched_str != NULL) {\n"
8979 "        if (!get_policy(main_sched_str[0], &policy))\n"
8980 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8981 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8982 msgstr ""
8983 "    if (main_sched_str != NULL) {\n"
8984 "        if (!get_policy(main_sched_str[0], &policy))\n"
8985 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8986 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8987
8988 #. type: Plain text
8989 #: build/C/man3/pthread_setschedparam.3:355
8990 #, no-wrap
8991 msgid ""
8992 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8993 "        if (s != 0)\n"
8994 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8995 "    }\n"
8996 msgstr ""
8997 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8998 "        if (s != 0)\n"
8999 "            handle_error_en(s, \"pthread_setschedparam\");\n"
9000 "    }\n"
9001
9002 #. type: Plain text
9003 #: build/C/man3/pthread_setschedparam.3:358
9004 #, no-wrap
9005 msgid ""
9006 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
9007 "    printf(\"\\en\");\n"
9008 msgstr ""
9009 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
9010 "    printf(\"\\en\");\n"
9011
9012 #. type: Plain text
9013 #: build/C/man3/pthread_setschedparam.3:360
9014 #, no-wrap
9015 msgid "    /* Initialize thread attributes object according to options */\n"
9016 msgstr "    /* Initialize thread attributes object according to options */\n"
9017
9018 #. type: Plain text
9019 #: build/C/man3/pthread_setschedparam.3:369
9020 #, no-wrap
9021 msgid ""
9022 "    if (!use_null_attrib) {\n"
9023 "        s = pthread_attr_init(&attr);\n"
9024 "        if (s != 0)\n"
9025 "            handle_error_en(s, \"pthread_attr_init\");\n"
9026 "        attrp = &attr;\n"
9027 "    }\n"
9028 msgstr ""
9029 "    if (!use_null_attrib) {\n"
9030 "        s = pthread_attr_init(&attr);\n"
9031 "        if (s != 0)\n"
9032 "            handle_error_en(s, \"pthread_attr_init\");\n"
9033 "        attrp = &attr;\n"
9034 "    }\n"
9035
9036 #. type: Plain text
9037 #: build/C/man3/pthread_setschedparam.3:377
9038 #, no-wrap
9039 msgid ""
9040 "    if (inheritsched_str != NULL) {\n"
9041 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
9042 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
9043 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
9044 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
9045 "        else\n"
9046 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
9047 msgstr ""
9048 "    if (inheritsched_str != NULL) {\n"
9049 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
9050 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
9051 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
9052 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
9053 "        else\n"
9054 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
9055
9056 #. type: Plain text
9057 #: build/C/man3/pthread_setschedparam.3:382
9058 #, no-wrap
9059 msgid ""
9060 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
9061 "        if (s != 0)\n"
9062 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
9063 "    }\n"
9064 msgstr ""
9065 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
9066 "        if (s != 0)\n"
9067 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
9068 "    }\n"
9069
9070 #. type: Plain text
9071 #: build/C/man3/pthread_setschedparam.3:388
9072 #, no-wrap
9073 msgid ""
9074 "    if (attr_sched_str != NULL) {\n"
9075 "        if (!get_policy(attr_sched_str[0], &policy))\n"
9076 "            usage(argv[0],\n"
9077 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
9078 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
9079 msgstr ""
9080 "    if (attr_sched_str != NULL) {\n"
9081 "        if (!get_policy(attr_sched_str[0], &policy))\n"
9082 "            usage(argv[0],\n"
9083 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
9084 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
9085
9086 #. type: Plain text
9087 #: build/C/man3/pthread_setschedparam.3:396
9088 #, no-wrap
9089 msgid ""
9090 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
9091 "        if (s != 0)\n"
9092 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
9093 "        s = pthread_attr_setschedparam(&attr, &param);\n"
9094 "        if (s != 0)\n"
9095 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
9096 "    }\n"
9097 msgstr ""
9098 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
9099 "        if (s != 0)\n"
9100 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
9101 "        s = pthread_attr_setschedparam(&attr, &param);\n"
9102 "        if (s != 0)\n"
9103 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
9104 "    }\n"
9105
9106 #. type: Plain text
9107 #: build/C/man3/pthread_setschedparam.3:399
9108 #, no-wrap
9109 msgid ""
9110 "    /* If we initialized a thread attributes object, display\n"
9111 "       the scheduling attributes that were set in the object */\n"
9112 msgstr ""
9113 "    /* If we initialized a thread attributes object, display\n"
9114 "       the scheduling attributes that were set in the object */\n"
9115
9116 #. type: Plain text
9117 #: build/C/man3/pthread_setschedparam.3:407
9118 #, no-wrap
9119 msgid ""
9120 "    if (attrp != NULL) {\n"
9121 "        s = pthread_attr_getschedparam(&attr, &param);\n"
9122 "        if (s != 0)\n"
9123 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
9124 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
9125 "        if (s != 0)\n"
9126 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
9127 msgstr ""
9128 "    if (attrp != NULL) {\n"
9129 "        s = pthread_attr_getschedparam(&attr, &param);\n"
9130 "        if (s != 0)\n"
9131 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
9132 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
9133 "        if (s != 0)\n"
9134 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
9135
9136 #. type: Plain text
9137 #: build/C/man3/pthread_setschedparam.3:410
9138 #, no-wrap
9139 msgid ""
9140 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
9141 "        display_sched_attr(policy, &param);\n"
9142 msgstr ""
9143 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
9144 "        display_sched_attr(policy, &param);\n"
9145
9146 #. type: Plain text
9147 #: build/C/man3/pthread_setschedparam.3:418
9148 #, no-wrap
9149 msgid ""
9150 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
9151 "        printf(\"    inheritsched is %s\\en\",\n"
9152 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
9153 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
9154 "                \"???\");\n"
9155 "        printf(\"\\en\");\n"
9156 "    }\n"
9157 msgstr ""
9158 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
9159 "        printf(\"    inheritsched is %s\\en\",\n"
9160 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
9161 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
9162 "                \"???\");\n"
9163 "        printf(\"\\en\");\n"
9164 "    }\n"
9165
9166 #. type: Plain text
9167 #: build/C/man3/pthread_setschedparam.3:420
9168 #, no-wrap
9169 msgid "    /* Create a thread that will display its scheduling attributes */\n"
9170 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
9171
9172 #. type: Plain text
9173 #: build/C/man3/pthread_setschedparam.3:424
9174 #, no-wrap
9175 msgid ""
9176 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
9177 "    if (s != 0)\n"
9178 "        handle_error_en(s, \"pthread_create\");\n"
9179 msgstr ""
9180 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
9181 "    if (s != 0)\n"
9182 "        handle_error_en(s, \"pthread_create\");\n"
9183
9184 #. type: Plain text
9185 #: build/C/man3/pthread_setschedparam.3:426
9186 #, no-wrap
9187 msgid "    /* Destroy unneeded thread attributes object */\n"
9188 msgstr "    /* Destroy unneeded thread attributes object */\n"
9189
9190 #. type: Plain text
9191 #: build/C/man3/pthread_setschedparam.3:434
9192 #, no-wrap
9193 msgid ""
9194 "    s = pthread_join(thread, NULL);\n"
9195 "    if (s != 0)\n"
9196 "        handle_error_en(s, \"pthread_join\");\n"
9197 msgstr ""
9198 "    s = pthread_join(thread, NULL);\n"
9199 "    if (s != 0)\n"
9200 "        handle_error_en(s, \"pthread_join\");\n"
9201
9202 #. type: Plain text
9203 #: build/C/man3/pthread_setschedparam.3:452
9204 #, fuzzy
9205 #| msgid ""
9206 #| "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9207 #| "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9208 #| "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9209 #| "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
9210 #| "B<pthreads>(7)"
9211 msgid ""
9212 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
9213 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
9214 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthread_self>(3), "
9215 "B<pthread_setschedprio>(3), B<pthreads>(7), B<sched>(7)"
9216 msgstr ""
9217 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9218 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9219 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9220 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
9221 "B<pthreads>(7)"
9222
9223 #. type: TH
9224 #: build/C/man3/pthread_setschedprio.3:26
9225 #, no-wrap
9226 msgid "PTHREAD_SETSCHEDPRIO"
9227 msgstr "PTHREAD_SETSCHEDPRIO"
9228
9229 #. type: Plain text
9230 #: build/C/man3/pthread_setschedprio.3:29
9231 msgid "pthread_setschedprio - set scheduling priority of a thread"
9232 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
9233
9234 #. type: Plain text
9235 #: build/C/man3/pthread_setschedprio.3:34
9236 #, no-wrap
9237 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
9238 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
9239
9240 #.  FIXME . nptl/pthread_setschedprio.c has the following
9241 #.    /* If the thread should have higher priority because of some
9242 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
9243 #.  Eventually (perhaps after writing the mutexattr pages), we
9244 #.  may want to add something on the topic to this page.
9245 #.  nptl/pthread_setschedparam.c has a similar case.
9246 #. type: Plain text
9247 #: build/C/man3/pthread_setschedprio.3:53
9248 msgid ""
9249 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
9250 "thread I<thread> to the value specified in I<prio>.  (By contrast "
9251 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
9252 "of a thread.)"
9253 msgstr ""
9254 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
9255 "優先度に I<prio> で指定された値を設定する\n"
9256 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
9257 "と優先度の両方を変更する)。"
9258
9259 #. type: Plain text
9260 #: build/C/man3/pthread_setschedprio.3:61
9261 msgid ""
9262 "On success, this function returns 0; on error, it returns a nonzero error "
9263 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
9264 "I<thread> is not changed."
9265 msgstr ""
9266 "成功すると、この関数は 0 を返す。\n"
9267 "エラーの場合、0 以外のエラー番号を返す。\n"
9268 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
9269 "スケジューリング優先度は変更されない。"
9270
9271 #. type: Plain text
9272 #: build/C/man3/pthread_setschedprio.3:66
9273 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
9274 msgstr ""
9275 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
9276
9277 #. type: Plain text
9278 #: build/C/man3/pthread_setschedprio.3:70
9279 msgid ""
9280 "The caller does not have appropriate privileges to set the specified "
9281 "priority."
9282 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
9283
9284 #. type: Plain text
9285 #: build/C/man3/pthread_setschedprio.3:81
9286 msgid ""
9287 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
9288 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
9289 msgstr ""
9290 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
9291 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
9292 "に設定しようとした\") も追加で規定されている。"
9293
9294 #. type: Plain text
9295 #: build/C/man3/pthread_setschedprio.3:83
9296 msgid "This function is available in glibc since version 2.3.4."
9297 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
9298
9299 #. type: Plain text
9300 #: build/C/man3/pthread_setschedprio.3:88
9301 #, fuzzy
9302 #| msgid "The B<getcontext>()  and B<setcontext>()  functions are thread-safe."
9303 msgid "The B<pthread_setschedprio>()  function is thread-safe."
9304 msgstr "関数 B<getcontext>() と B<setcontext>() はスレッドセーフである。"
9305
9306 #. type: Plain text
9307 #: build/C/man3/pthread_setschedprio.3:96
9308 #, fuzzy
9309 #| msgid ""
9310 #| "For a description of the permissions required to, and the effect of, "
9311 #| "changing a thread's scheduling priority, and details of the permitted "
9312 #| "ranges for priorities in each scheduling policy, see "
9313 #| "B<sched_setscheduler>(2)."
9314 msgid ""
9315 "For a description of the permissions required to, and the effect of, "
9316 "changing a thread's scheduling priority, and details of the permitted ranges "
9317 "for priorities in each scheduling policy, see B<sched>(7)."
9318 msgstr ""
9319 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
9320 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
9321 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
9322
9323 #. type: Plain text
9324 #: build/C/man3/pthread_setschedprio.3:110
9325 #, fuzzy
9326 #| msgid ""
9327 #| "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9328 #| "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9329 #| "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9330 #| "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9331 #| "B<pthreads>(7)"
9332 msgid ""
9333 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
9334 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
9335 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthread_self>(3), "
9336 "B<pthread_setschedparam>(3), B<pthreads>(7), B<sched>(7)"
9337 msgstr ""
9338 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9339 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9340 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9341 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9342 "B<pthreads>(7)"
9343
9344 #. type: TH
9345 #: build/C/man3/pthread_sigmask.3:26
9346 #, no-wrap
9347 msgid "PTHREAD_SIGMASK"
9348 msgstr "PTHREAD_SIGMASK"
9349
9350 #. type: Plain text
9351 #: build/C/man3/pthread_sigmask.3:29
9352 msgid "pthread_sigmask - examine and change mask of blocked signals"
9353 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
9354
9355 #. type: Plain text
9356 #: build/C/man3/pthread_sigmask.3:35
9357 #, no-wrap
9358 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9359 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9360
9361 #. type: Plain text
9362 #: build/C/man3/pthread_sigmask.3:46
9363 msgid "B<pthread_sigmask>():"
9364 msgstr "B<pthread_sigmask>():"
9365
9366 #. type: Plain text
9367 #: build/C/man3/pthread_sigmask.3:58
9368 msgid ""
9369 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9370 "difference that its use in multithreaded programs is explicitly specified by "
9371 "POSIX.1-2001.  Other differences are noted in this page."
9372 msgstr ""
9373 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9374 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9375 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9376
9377 #. type: Plain text
9378 #: build/C/man3/pthread_sigmask.3:61
9379 msgid ""
9380 "For a description of the arguments and operation of this function, see "
9381 "B<sigprocmask>(2)."
9382 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9383
9384 #. type: Plain text
9385 #: build/C/man3/pthread_sigmask.3:66
9386 msgid ""
9387 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9388 "number."
9389 msgstr ""
9390 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9391 "エラーの場合、エラー番号を返す。"
9392
9393 #. type: Plain text
9394 #: build/C/man3/pthread_sigmask.3:69
9395 msgid "See B<sigprocmask>(2)."
9396 msgstr "B<sigprocmask>(2) を参照。"
9397
9398 #. type: Plain text
9399 #: build/C/man3/pthread_sigmask.3:74
9400 #, fuzzy
9401 #| msgid "The B<pthread_equal>()  function compares two thread identifiers."
9402 msgid "The B<pthread_sigmask>()  function is thread-safe."
9403 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
9404
9405 #. type: Plain text
9406 #: build/C/man3/pthread_sigmask.3:78
9407 msgid "A new thread inherits a copy of its creator's signal mask."
9408 msgstr ""
9409 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9410 "継承する。"
9411
9412 #. type: Plain text
9413 #: build/C/man3/pthread_sigmask.3:83
9414 msgid ""
9415 "The program below blocks some signals in the main thread, and then creates a "
9416 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9417 "shell session demonstrates its use:"
9418 msgstr ""
9419 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9420 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9421 "専用のスレッドを作成する。\n"
9422 "下記のシェルのセッションはその利用例を示したものである。"
9423
9424 #. type: Plain text
9425 #: build/C/man3/pthread_sigmask.3:94
9426 #, no-wrap
9427 msgid ""
9428 "$B< ./a.out &>\n"
9429 "[1] 5423\n"
9430 "$B< kill -QUIT %1>\n"
9431 "Signal handling thread got signal 3\n"
9432 "$B< kill -USR1 %1>\n"
9433 "Signal handling thread got signal 10\n"
9434 "$B< kill -TERM %1>\n"
9435 "[1]+  Terminated              ./a.out\n"
9436 msgstr ""
9437 "$B< ./a.out &>\n"
9438 "[1] 5423\n"
9439 "$B< kill -QUIT %1>\n"
9440 "Signal handling thread got signal 3\n"
9441 "$B< kill -USR1 %1>\n"
9442 "Signal handling thread got signal 10\n"
9443 "$B< kill -TERM %1>\n"
9444 "[1]+  Terminated              ./a.out\n"
9445
9446 #. type: Plain text
9447 #: build/C/man3/pthread_sigmask.3:105
9448 #, no-wrap
9449 msgid ""
9450 "#include E<lt>pthread.hE<gt>\n"
9451 "#include E<lt>stdio.hE<gt>\n"
9452 "#include E<lt>stdlib.hE<gt>\n"
9453 "#include E<lt>unistd.hE<gt>\n"
9454 "#include E<lt>signal.hE<gt>\n"
9455 "#include E<lt>errno.hE<gt>\n"
9456 msgstr ""
9457 "#include E<lt>pthread.hE<gt>\n"
9458 "#include E<lt>stdio.hE<gt>\n"
9459 "#include E<lt>stdlib.hE<gt>\n"
9460 "#include E<lt>unistd.hE<gt>\n"
9461 "#include E<lt>signal.hE<gt>\n"
9462 "#include E<lt>errno.hE<gt>\n"
9463
9464 #. type: Plain text
9465 #: build/C/man3/pthread_sigmask.3:107
9466 #, no-wrap
9467 msgid "/* Simple error handling functions */\n"
9468 msgstr "/* Simple error handling functions */\n"
9469
9470 #. type: Plain text
9471 #: build/C/man3/pthread_sigmask.3:116
9472 #, no-wrap
9473 msgid ""
9474 "static void *\n"
9475 "sig_thread(void *arg)\n"
9476 "{\n"
9477 "    sigset_t *set = arg;\n"
9478 "    int s, sig;\n"
9479 msgstr ""
9480 "static void *\n"
9481 "sig_thread(void *arg)\n"
9482 "{\n"
9483 "    sigset_t *set = arg;\n"
9484 "    int s, sig;\n"
9485
9486 #. type: Plain text
9487 #: build/C/man3/pthread_sigmask.3:124
9488 #, no-wrap
9489 msgid ""
9490 "    for (;;) {\n"
9491 "        s = sigwait(set, &sig);\n"
9492 "        if (s != 0)\n"
9493 "            handle_error_en(s, \"sigwait\");\n"
9494 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9495 "    }\n"
9496 "}\n"
9497 msgstr ""
9498 "    for (;;) {\n"
9499 "        s = sigwait(set, &sig);\n"
9500 "        if (s != 0)\n"
9501 "            handle_error_en(s, \"sigwait\");\n"
9502 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9503 "    }\n"
9504 "}\n"
9505
9506 #. type: Plain text
9507 #: build/C/man3/pthread_sigmask.3:131
9508 #, no-wrap
9509 msgid ""
9510 "int\n"
9511 "main(int argc, char *argv[])\n"
9512 "{\n"
9513 "    pthread_t thread;\n"
9514 "    sigset_t set;\n"
9515 "    int s;\n"
9516 msgstr ""
9517 "int\n"
9518 "main(int argc, char *argv[])\n"
9519 "{\n"
9520 "    pthread_t thread;\n"
9521 "    sigset_t set;\n"
9522 "    int s;\n"
9523
9524 #. type: Plain text
9525 #: build/C/man3/pthread_sigmask.3:134
9526 #, no-wrap
9527 msgid ""
9528 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9529 "       will inherit a copy of the signal mask. */\n"
9530 msgstr ""
9531 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9532 "       will inherit a copy of the signal mask. */\n"
9533
9534 #. type: Plain text
9535 #: build/C/man3/pthread_sigmask.3:141
9536 #, no-wrap
9537 msgid ""
9538 "    sigemptyset(&set);\n"
9539 "    sigaddset(&set, SIGQUIT);\n"
9540 "    sigaddset(&set, SIGUSR1);\n"
9541 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9542 "    if (s != 0)\n"
9543 "        handle_error_en(s, \"pthread_sigmask\");\n"
9544 msgstr ""
9545 "    sigemptyset(&set);\n"
9546 "    sigaddset(&set, SIGQUIT);\n"
9547 "    sigaddset(&set, SIGUSR1);\n"
9548 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9549 "    if (s != 0)\n"
9550 "        handle_error_en(s, \"pthread_sigmask\");\n"
9551
9552 #. type: Plain text
9553 #: build/C/man3/pthread_sigmask.3:145
9554 #, no-wrap
9555 msgid ""
9556 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9557 "    if (s != 0)\n"
9558 "        handle_error_en(s, \"pthread_create\");\n"
9559 msgstr ""
9560 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9561 "    if (s != 0)\n"
9562 "        handle_error_en(s, \"pthread_create\");\n"
9563
9564 #. type: Plain text
9565 #: build/C/man3/pthread_sigmask.3:148
9566 #, no-wrap
9567 msgid ""
9568 "    /* Main thread carries on to create other threads and/or do\n"
9569 "       other work */\n"
9570 msgstr ""
9571 "    /* Main thread carries on to create other threads and/or do\n"
9572 "       other work */\n"
9573
9574 #. type: Plain text
9575 #: build/C/man3/pthread_sigmask.3:151
9576 #, no-wrap
9577 msgid ""
9578 "    pause();            /* Dummy pause so we can test program */\n"
9579 "}\n"
9580 msgstr ""
9581 "    pause();            /* Dummy pause so we can test program */\n"
9582 "}\n"
9583
9584 #. type: Plain text
9585 #: build/C/man3/pthread_sigmask.3:161
9586 msgid ""
9587 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9588 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9589 msgstr ""
9590 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9591 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9592
9593 #. type: TH
9594 #: build/C/man3/pthread_sigqueue.3:25
9595 #, no-wrap
9596 msgid "PTHREAD_SIGQUEUE"
9597 msgstr "PTHREAD_SIGQUEUE"
9598
9599 #. type: Plain text
9600 #: build/C/man3/pthread_sigqueue.3:28
9601 msgid "pthread_sigqueue - queue a signal and data to a thread"
9602 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9603
9604 #. type: Plain text
9605 #: build/C/man3/pthread_sigqueue.3:34
9606 #, no-wrap
9607 msgid ""
9608 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9609 "B<                     const union sigval >I<value>B<);>\n"
9610 msgstr ""
9611 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9612 "B<                     const union sigval >I<value>B<);>\n"
9613
9614 #. type: Plain text
9615 #: build/C/man3/pthread_sigqueue.3:45
9616 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9617 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9618
9619 #. type: Plain text
9620 #: build/C/man3/pthread_sigqueue.3:53
9621 msgid ""
9622 "The B<pthread_sigqueue>()  function performs a similar task to "
9623 "B<sigqueue>(3), but, rather than sending a signal to a process, it sends a "
9624 "signal to a thread in the same process as the calling thread."
9625 msgstr ""
9626 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9627 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9628 "同じプロセス内のスレッドにシグナルを送信する。"
9629
9630 #. type: Plain text
9631 #: build/C/man3/pthread_sigqueue.3:65
9632 msgid ""
9633 "The I<thread> argument is the ID of a thread in the same process as the "
9634 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9635 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9636 "details."
9637 msgstr ""
9638 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9639 "I<sig> 引き数は送信するシグナルを指定する。\n"
9640 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9641 "詳細は B<sigqueue>(3) を参照。"
9642
9643 #. type: Plain text
9644 #: build/C/man3/pthread_sigqueue.3:70
9645 msgid ""
9646 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9647 "number."
9648 msgstr ""
9649 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9650 "エラーの場合、エラー番号を返す。"
9651
9652 #. type: Plain text
9653 #: build/C/man3/pthread_sigqueue.3:77
9654 msgid ""
9655 "The limit of signals which may be queued has been reached.  (See "
9656 "B<signal>(7)  for further information.)"
9657 msgstr ""
9658 "キューに入れられるシグナル数が上限に達していた\n"
9659 "(詳しい情報は (B<signal>(7) を参照)。"
9660
9661 #. type: Plain text
9662 #: build/C/man3/pthread_sigqueue.3:81
9663 msgid "I<sig> was invalid."
9664 msgstr "I<sig> が無効であった。"
9665
9666 #. type: TP
9667 #: build/C/man3/pthread_sigqueue.3:81
9668 #, no-wrap
9669 msgid "B<ENOSYS>"
9670 msgstr "B<ENOSYS>"
9671
9672 #. type: Plain text
9673 #: build/C/man3/pthread_sigqueue.3:85
9674 msgid "B<pthread_sigqueue>()  is not supported on this system."
9675 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9676
9677 #. type: Plain text
9678 #: build/C/man3/pthread_sigqueue.3:89
9679 msgid "I<thread> is not valid."
9680 msgstr "I<thread> が無効である。"
9681
9682 #. type: Plain text
9683 #: build/C/man3/pthread_sigqueue.3:93
9684 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9685 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9686
9687 #. type: Plain text
9688 #: build/C/man3/pthread_sigqueue.3:98
9689 #, fuzzy
9690 #| msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9691 msgid "The B<pthread_sigqueue>()  function is thread-safe."
9692 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9693
9694 #. type: Plain text
9695 #: build/C/man3/pthread_sigqueue.3:100
9696 msgid "This function is a GNU extension."
9697 msgstr "この関数は GNU による拡張である。"
9698
9699 #. type: Plain text
9700 #: build/C/man3/pthread_sigqueue.3:108
9701 msgid ""
9702 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), "
9703 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9704 msgstr ""
9705 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9706 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9707
9708 #. type: TH
9709 #: build/C/man3/pthread_testcancel.3:26
9710 #, no-wrap
9711 msgid "PTHREAD_TESTCANCEL"
9712 msgstr "PTHREAD_TESTCANCEL"
9713
9714 #. type: Plain text
9715 #: build/C/man3/pthread_testcancel.3:29
9716 msgid ""
9717 "pthread_testcancel - request delivery of any pending cancellation request"
9718 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9719
9720 #. type: Plain text
9721 #: build/C/man3/pthread_testcancel.3:34
9722 #, no-wrap
9723 msgid "B<void pthread_testcancel(void);>\n"
9724 msgstr "B<void pthread_testcancel(void);>\n"
9725
9726 #. type: Plain text
9727 #: build/C/man3/pthread_testcancel.3:43
9728 msgid ""
9729 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9730 "calling thread, so that a thread that is otherwise executing code that "
9731 "contains no cancellation points will respond to a cancellation request."
9732 msgstr ""
9733 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9734 "ポイント (cancellation point) が作成される。\n"
9735 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9736 "いるスレッドが取り消し要求に対応することができるようになる。"
9737
9738 #. type: Plain text
9739 #: build/C/man3/pthread_testcancel.3:50
9740 msgid ""
9741 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9742 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9743 "no effect."
9744 msgstr ""
9745 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9746 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9747 "呼び出しても何の影響もない。"
9748
9749 #. type: Plain text
9750 #: build/C/man3/pthread_testcancel.3:54
9751 msgid ""
9752 "This function does not return a value.  If the calling thread is canceled as "
9753 "a consequence of a call to this function, then the function does not return."
9754 msgstr ""
9755 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9756 "キャンセルされた場合、この関数が返ることはない。"
9757
9758 #. type: Plain text
9759 #: build/C/man3/pthread_testcancel.3:63
9760 #, fuzzy
9761 #| msgid "The B<pthread_equal>()  function compares two thread identifiers."
9762 msgid "The B<pthread_testcancel>()  function is thread-safe."
9763 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
9764
9765 #. type: Plain text
9766 #: build/C/man3/pthread_testcancel.3:68
9767 msgid "See B<pthread_cleanup_push>(3)."
9768 msgstr "B<pthread_cleanup_push>(3) を参照。"
9769
9770 #. type: Plain text
9771 #: build/C/man3/pthread_testcancel.3:73
9772 msgid ""
9773 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
9774 "B<pthread_setcancelstate>(3), B<pthreads>(7)"
9775 msgstr ""
9776 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
9777 "B<pthread_setcancelstate>(3), B<pthreads>(7)"
9778
9779 #. type: TH
9780 #: build/C/man3/pthread_tryjoin_np.3:26
9781 #, no-wrap
9782 msgid "PTHREAD_TRYJOIN_NP"
9783 msgstr "PTHREAD_TRYJOIN_NP"
9784
9785 #. type: Plain text
9786 #: build/C/man3/pthread_tryjoin_np.3:30
9787 msgid ""
9788 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9789 "thread"
9790 msgstr ""
9791 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9792 "試みる"
9793
9794 #. type: Plain text
9795 #: build/C/man3/pthread_tryjoin_np.3:36
9796 #, no-wrap
9797 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9798 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9799
9800 #. type: Plain text
9801 #: build/C/man3/pthread_tryjoin_np.3:39
9802 #, no-wrap
9803 msgid ""
9804 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9805 "B<                         const struct timespec *>I<abstime>B<);>\n"
9806 msgstr ""
9807 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9808 "B<                         const struct timespec *>I<abstime>B<);>\n"
9809
9810 #. type: Plain text
9811 #: build/C/man3/pthread_tryjoin_np.3:46
9812 msgid ""
9813 "These functions operate in the same way as B<pthread_join>(3), except for "
9814 "the differences described on this page."
9815 msgstr ""
9816 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9817 "このページで説明する違いがある。"
9818
9819 #. type: Plain text
9820 #: build/C/man3/pthread_tryjoin_np.3:58
9821 msgid ""
9822 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9823 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9824 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9825 "B<pthread_join>(3), the call returns an error."
9826 msgstr ""
9827 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9828 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9829 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9830 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9831
9832 #. type: Plain text
9833 #: build/C/man3/pthread_tryjoin_np.3:76
9834 msgid ""
9835 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9836 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9837 "specified in I<abstime>.  If the timeout expires before I<thread> "
9838 "terminates, the call returns an error.  The I<abstime> argument is a "
9839 "structure of the following form, specifying an absolute time measured since "
9840 "the Epoch (see B<time>(2)):"
9841 msgstr ""
9842 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9843 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9844 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9845 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9846 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9847
9848 #. type: Plain text
9849 #: build/C/man3/pthread_tryjoin_np.3:83
9850 #, no-wrap
9851 msgid ""
9852 "struct timespec {\n"
9853 "    time_t tv_sec;     /* seconds */\n"
9854 "    long   tv_nsec;    /* nanoseconds */\n"
9855 "};\n"
9856 msgstr ""
9857 "struct timespec {\n"
9858 "    time_t tv_sec;     /* seconds */\n"
9859 "    long   tv_nsec;    /* nanoseconds */\n"
9860 "};\n"
9861
9862 #. type: Plain text
9863 #: build/C/man3/pthread_tryjoin_np.3:89
9864 msgid ""
9865 "On success, these functions return 0; on error, they return an error number."
9866 msgstr ""
9867 "成功すると、これらの関数は 0 を返す。\n"
9868 "エラーの場合、エラー番号を返す。"
9869
9870 #. type: Plain text
9871 #: build/C/man3/pthread_tryjoin_np.3:94
9872 msgid ""
9873 "These functions can fail with the same errors as B<pthread_join>(3).  "
9874 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9875 msgstr ""
9876 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9877 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9878
9879 #. type: TP
9880 #: build/C/man3/pthread_tryjoin_np.3:94
9881 #, no-wrap
9882 msgid "B<EBUSY>"
9883 msgstr "B<EBUSY>"
9884
9885 #. type: Plain text
9886 #: build/C/man3/pthread_tryjoin_np.3:98
9887 msgid "I<thread> had not yet terminated at the time of the call."
9888 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9889
9890 #. type: Plain text
9891 #: build/C/man3/pthread_tryjoin_np.3:101
9892 msgid ""
9893 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9894 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9895
9896 #. type: TP
9897 #: build/C/man3/pthread_tryjoin_np.3:101
9898 #, no-wrap
9899 msgid "B<ETIMEDOUT>"
9900 msgstr "B<ETIMEDOUT>"
9901
9902 #. type: Plain text
9903 #: build/C/man3/pthread_tryjoin_np.3:106
9904 msgid "The call timed out before I<thread> terminated."
9905 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9906
9907 #. type: Plain text
9908 #: build/C/man3/pthread_tryjoin_np.3:110
9909 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9910 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9911
9912 #. type: Plain text
9913 #: build/C/man3/pthread_tryjoin_np.3:112
9914 msgid "These functions first appeared in glibc in version 2.3.3."
9915 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9916
9917 #. type: Plain text
9918 #: build/C/man3/pthread_tryjoin_np.3:117
9919 msgid "The following code waits to join for up to 5 seconds:"
9920 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9921
9922 #. type: Plain text
9923 #: build/C/man3/pthread_tryjoin_np.3:121
9924 #, no-wrap
9925 msgid ""
9926 "    struct timespec ts;\n"
9927 "    int s;\n"
9928 msgstr ""
9929 "    struct timespec ts;\n"
9930 "    int s;\n"
9931
9932 #. type: Plain text
9933 #: build/C/man3/pthread_tryjoin_np.3:123
9934 #, no-wrap
9935 msgid "    ...\n"
9936 msgstr "    ...\n"
9937
9938 #. type: Plain text
9939 #: build/C/man3/pthread_tryjoin_np.3:127
9940 #, no-wrap
9941 msgid ""
9942 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9943 "\t/* Handle error */\n"
9944 "    }\n"
9945 msgstr ""
9946 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9947 "\t/* Handle error */\n"
9948 "    }\n"
9949
9950 #. type: Plain text
9951 #: build/C/man3/pthread_tryjoin_np.3:129
9952 #, no-wrap
9953 msgid "    ts.tv_sec += 5;\n"
9954 msgstr "    ts.tv_sec += 5;\n"
9955
9956 #. type: Plain text
9957 #: build/C/man3/pthread_tryjoin_np.3:134
9958 #, no-wrap
9959 msgid ""
9960 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9961 "    if (s != 0) {\n"
9962 "        /* Handle error */\n"
9963 "    }\n"
9964 msgstr ""
9965 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9966 "    if (s != 0) {\n"
9967 "        /* Handle error */\n"
9968 "    }\n"
9969
9970 #. type: Plain text
9971 #: build/C/man3/pthread_tryjoin_np.3:140
9972 msgid ""
9973 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9974 msgstr ""
9975 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9976
9977 #. type: TH
9978 #: build/C/man3/pthread_yield.3:25
9979 #, no-wrap
9980 msgid "PTHREAD_YIELD"
9981 msgstr "PTHREAD_YIELD"
9982
9983 #. type: Plain text
9984 #: build/C/man3/pthread_yield.3:28
9985 msgid "pthread_yield - yield the processor"
9986 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9987
9988 #. type: Plain text
9989 #: build/C/man3/pthread_yield.3:34
9990 #, no-wrap
9991 msgid "B<int pthread_yield(void);>\n"
9992 msgstr "B<int pthread_yield(void);>\n"
9993
9994 #. type: Plain text
9995 #: build/C/man3/pthread_yield.3:44
9996 msgid ""
9997 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9998 "thread is placed at the end of the run queue for its static priority and "
9999 "another thread is scheduled to run.  For further details, see "
10000 "B<sched_yield>(2)"
10001 msgstr ""
10002 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
10003 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
10004 "別のスレッドが実行されるようにスケジューリングされる。\n"
10005 "詳細は B<sched_yield>(2) を参照。"
10006
10007 #. type: Plain text
10008 #: build/C/man3/pthread_yield.3:49
10009 msgid ""
10010 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
10011 "number."
10012 msgstr ""
10013 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
10014 "エラーの場合、エラー番号を返す。"
10015
10016 #. type: Plain text
10017 #: build/C/man3/pthread_yield.3:53
10018 msgid ""
10019 "On Linux, this call always succeeds (but portable and future-proof "
10020 "applications should nevertheless handle a possible error return)."
10021 msgstr ""
10022 "Linux では、この関数の呼び出しは常に成功する\n"
10023 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
10024 "正のエラーの返り値を処理するようにすべきである)。"
10025
10026 #. type: Plain text
10027 #: build/C/man3/pthread_yield.3:58
10028 #, fuzzy
10029 #| msgid "The B<pthread_equal>()  function compares two thread identifiers."
10030 msgid "The B<pthread_yield>()  function is thread-safe."
10031 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
10032
10033 #.  e.g., the BSDs, Tru64, AIX, and Irix.
10034 #. type: Plain text
10035 #: build/C/man3/pthread_yield.3:64
10036 msgid ""
10037 "This call is nonstandard, but present on several other systems.  Use the "
10038 "standardized B<sched_yield>(2)  instead."
10039 msgstr ""
10040 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
10041 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
10042
10043 #. type: Plain text
10044 #: build/C/man3/pthread_yield.3:67
10045 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
10046 msgstr ""
10047 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
10048
10049 #. type: Plain text
10050 #: build/C/man3/pthread_yield.3:71
10051 #, fuzzy
10052 #| msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
10053 msgid "B<sched_yield>(2), B<pthreads>(7), B<sched>(7)"
10054 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
10055
10056 #. type: TH
10057 #: build/C/man7/pthreads.7:26
10058 #, no-wrap
10059 msgid "PTHREADS"
10060 msgstr "PTHREADS"
10061
10062 #. type: Plain text
10063 #: build/C/man7/pthreads.7:29
10064 msgid "pthreads - POSIX threads"
10065 msgstr "pthreads - POSIX スレッド"
10066
10067 #. type: Plain text
10068 #: build/C/man7/pthreads.7:36
10069 msgid ""
10070 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
10071 "programming commonly known as POSIX threads, or Pthreads.  A single process "
10072 "can contain multiple threads, all of which are executing the same program.  "
10073 "These threads share the same global memory (data and heap segments), but "
10074 "each thread has its own stack (automatic variables)."
10075 msgstr ""
10076 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
10077 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
10078 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
10079 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
10080 "スレッドは自分専用のスタック (自動変数) を持つ。"
10081
10082 #. type: Plain text
10083 #: build/C/man7/pthreads.7:39
10084 msgid ""
10085 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
10086 "these attributes are process-wide rather than per-thread):"
10087 msgstr ""
10088 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
10089 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
10090
10091 #. type: IP
10092 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
10093 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
10094 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
10095 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
10096 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
10097 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
10098 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
10099 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
10100 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
10101 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:103
10102 #: build/C/man7/pthreads.7:106 build/C/man7/pthreads.7:683
10103 #: build/C/man7/pthreads.7:690 build/C/man7/pthreads.7:702
10104 #: build/C/man7/pthreads.7:712 build/C/man7/pthreads.7:716
10105 #: build/C/man7/pthreads.7:725 build/C/man7/pthreads.7:735
10106 #: build/C/man7/pthreads.7:742 build/C/man7/pthreads.7:749
10107 #: build/C/man7/pthreads.7:751 build/C/man7/pthreads.7:754
10108 #: build/C/man7/pthreads.7:760 build/C/man7/pthreads.7:763
10109 #: build/C/man7/pthreads.7:765 build/C/man7/pthreads.7:767
10110 #: build/C/man7/pthreads.7:777 build/C/man7/pthreads.7:797
10111 #: build/C/man7/pthreads.7:806 build/C/man7/pthreads.7:812
10112 #: build/C/man7/pthreads.7:814 build/C/man7/pthreads.7:816
10113 #: build/C/man7/pthreads.7:820 build/C/man7/pthreads.7:825
10114 #: build/C/man7/pthreads.7:833
10115 #, no-wrap
10116 msgid "-"
10117 msgstr "-"
10118
10119 #. type: Plain text
10120 #: build/C/man7/pthreads.7:41
10121 msgid "process ID"
10122 msgstr "プロセス ID"
10123
10124 #. type: Plain text
10125 #: build/C/man7/pthreads.7:43
10126 msgid "parent process ID"
10127 msgstr "親プロセス ID"
10128
10129 #. type: Plain text
10130 #: build/C/man7/pthreads.7:45
10131 msgid "process group ID and session ID"
10132 msgstr "プロセスグループ ID とセッション ID"
10133
10134 #. type: Plain text
10135 #: build/C/man7/pthreads.7:47
10136 msgid "controlling terminal"
10137 msgstr "制御端末"
10138
10139 #. type: Plain text
10140 #: build/C/man7/pthreads.7:49
10141 msgid "user and group IDs"
10142 msgstr "ユーザ ID とグループ ID"
10143
10144 #. type: Plain text
10145 #: build/C/man7/pthreads.7:51
10146 msgid "open file descriptors"
10147 msgstr "オープンするファイルディスクリプタ"
10148
10149 #. type: Plain text
10150 #: build/C/man7/pthreads.7:54
10151 msgid "record locks (see B<fcntl>(2))"
10152 msgstr "レコードのロック (B<fcntl>(3)  参照)"
10153
10154 #. type: Plain text
10155 #: build/C/man7/pthreads.7:56
10156 msgid "signal dispositions"
10157 msgstr "シグナルの配置"
10158
10159 #. type: Plain text
10160 #: build/C/man7/pthreads.7:59
10161 msgid "file mode creation mask (B<umask>(2))"
10162 msgstr "ファイルモード作成マスク (B<umask>(2))"
10163
10164 #. type: Plain text
10165 #: build/C/man7/pthreads.7:65
10166 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
10167 msgstr ""
10168 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
10169
10170 #. type: Plain text
10171 #: build/C/man7/pthreads.7:70
10172 msgid ""
10173 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
10174 msgstr ""
10175 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
10176
10177 #. type: Plain text
10178 #: build/C/man7/pthreads.7:73
10179 msgid "nice value (B<setpriority>(2))"
10180 msgstr "nice 値 (B<setpriority>(2))"
10181
10182 #. type: Plain text
10183 #: build/C/man7/pthreads.7:76
10184 msgid "resource limits (B<setrlimit>(2))"
10185 msgstr "リソース制限 (B<setrlimit>(2))"
10186
10187 #. type: Plain text
10188 #: build/C/man7/pthreads.7:81
10189 msgid ""
10190 "measurements of the consumption of CPU time (B<times>(2))  and resources "
10191 "(B<getrusage>(2))"
10192 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
10193
10194 #. type: Plain text
10195 #: build/C/man7/pthreads.7:84
10196 msgid ""
10197 "As well as the stack, POSIX.1 specifies that various other attributes are "
10198 "distinct for each thread, including:"
10199 msgstr ""
10200 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
10201 "るかを規定している:"
10202
10203 #. type: Plain text
10204 #: build/C/man7/pthreads.7:88
10205 msgid "thread ID (the I<pthread_t> data type)"
10206 msgstr "スレッド ID (B<pthread_t> データ型)"
10207
10208 #. type: Plain text
10209 #: build/C/man7/pthreads.7:91
10210 msgid "signal mask (B<pthread_sigmask>(3))"
10211 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
10212
10213 #. type: Plain text
10214 #: build/C/man7/pthreads.7:95
10215 msgid "the I<errno> variable"
10216 msgstr "I<errno> 変数"
10217
10218 #. type: Plain text
10219 #: build/C/man7/pthreads.7:98
10220 msgid "alternate signal stack (B<sigaltstack>(2))"
10221 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
10222
10223 #. type: Plain text
10224 #: build/C/man7/pthreads.7:101
10225 #, fuzzy
10226 #| msgid ""
10227 #| "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
10228 #| "B<sched_setparam>(2))"
10229 msgid "real-time scheduling policy and priority (B<sched>(7))"
10230 msgstr ""
10231 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
10232 "と B<sched_setparam>(2))"
10233
10234 #. type: Plain text
10235 #: build/C/man7/pthreads.7:103
10236 msgid "The following Linux-specific features are also per-thread:"
10237 msgstr "以下の Linux 特有の機能もスレッド単位である:"
10238
10239 #. type: Plain text
10240 #: build/C/man7/pthreads.7:106
10241 msgid "capabilities (see B<capabilities>(7))"
10242 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
10243
10244 #. type: Plain text
10245 #: build/C/man7/pthreads.7:109
10246 msgid "CPU affinity (B<sched_setaffinity>(2))"
10247 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
10248
10249 #. type: SS
10250 #: build/C/man7/pthreads.7:109
10251 #, no-wrap
10252 msgid "Pthreads function return values"
10253 msgstr "pthreads 関数の返り値"
10254
10255 #. type: Plain text
10256 #: build/C/man7/pthreads.7:116
10257 msgid ""
10258 "Most pthreads functions return 0 on success, and an error number of "
10259 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
10260 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
10261 "the function can never fail with the error B<EINTR>."
10262 msgstr ""
10263 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
10264 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
10265 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
10266 "は決してないと規定している。"
10267
10268 #. type: SS
10269 #: build/C/man7/pthreads.7:116
10270 #, no-wrap
10271 msgid "Thread IDs"
10272 msgstr "スレッド ID"
10273
10274 #. type: Plain text
10275 #: build/C/man7/pthreads.7:130
10276 msgid ""
10277 "Each of the threads in a process has a unique thread identifier (stored in "
10278 "the type I<pthread_t>).  This identifier is returned to the caller of "
10279 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
10280 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
10281 "within a process.  A thread ID may be reused after a terminated thread has "
10282 "been joined, or a detached thread has terminated.  In all pthreads functions "
10283 "that accept a thread ID as an argument, that ID by definition refers to a "
10284 "thread in the same process as the caller."
10285 msgstr ""
10286 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
10287 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
10288 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
10289 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
10290 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
10291 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
10292 "じプロセス内の一つのスレッドを参照する。"
10293
10294 #. type: SS
10295 #: build/C/man7/pthreads.7:130
10296 #, no-wrap
10297 msgid "Thread-safe functions"
10298 msgstr "スレッドセーフな関数"
10299
10300 #. type: Plain text
10301 #: build/C/man7/pthreads.7:134
10302 msgid ""
10303 "A thread-safe function is one that can be safely (i.e., it will deliver the "
10304 "same results regardless of whether it is)  called from multiple threads at "
10305 "the same time."
10306 msgstr ""
10307 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
10308 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
10309
10310 #. type: Plain text
10311 #: build/C/man7/pthreads.7:138
10312 msgid ""
10313 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
10314 "standard shall be thread-safe, except for the following functions:"
10315 msgstr ""
10316 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
10317 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
10318
10319 #. type: Plain text
10320 #: build/C/man7/pthreads.7:232
10321 #, no-wrap
10322 msgid ""
10323 "asctime()\n"
10324 "basename()\n"
10325 "catgets()\n"
10326 "crypt()\n"
10327 "ctermid() if passed a non-NULL argument\n"
10328 "ctime()\n"
10329 "dbm_clearerr()\n"
10330 "dbm_close()\n"
10331 "dbm_delete()\n"
10332 "dbm_error()\n"
10333 "dbm_fetch()\n"
10334 "dbm_firstkey()\n"
10335 "dbm_nextkey()\n"
10336 "dbm_open()\n"
10337 "dbm_store()\n"
10338 "dirname()\n"
10339 "dlerror()\n"
10340 "drand48()\n"
10341 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10342 "encrypt()\n"
10343 "endgrent()\n"
10344 "endpwent()\n"
10345 "endutxent()\n"
10346 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10347 "ftw()\n"
10348 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10349 "getc_unlocked()\n"
10350 "getchar_unlocked()\n"
10351 "getdate()\n"
10352 "getenv()\n"
10353 "getgrent()\n"
10354 "getgrgid()\n"
10355 "getgrnam()\n"
10356 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10357 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10358 "gethostent()\n"
10359 "getlogin()\n"
10360 "getnetbyaddr()\n"
10361 "getnetbyname()\n"
10362 "getnetent()\n"
10363 "getopt()\n"
10364 "getprotobyname()\n"
10365 "getprotobynumber()\n"
10366 "getprotoent()\n"
10367 "getpwent()\n"
10368 "getpwnam()\n"
10369 "getpwuid()\n"
10370 "getservbyname()\n"
10371 "getservbyport()\n"
10372 "getservent()\n"
10373 "getutxent()\n"
10374 "getutxid()\n"
10375 "getutxline()\n"
10376 "gmtime()\n"
10377 "hcreate()\n"
10378 "hdestroy()\n"
10379 "hsearch()\n"
10380 "inet_ntoa()\n"
10381 "l64a()\n"
10382 "lgamma()\n"
10383 "lgammaf()\n"
10384 "lgammal()\n"
10385 "localeconv()\n"
10386 "localtime()\n"
10387 "lrand48()\n"
10388 "mrand48()\n"
10389 "nftw()\n"
10390 "nl_langinfo()\n"
10391 "ptsname()\n"
10392 "putc_unlocked()\n"
10393 "putchar_unlocked()\n"
10394 "putenv()\n"
10395 "pututxline()\n"
10396 "rand()\n"
10397 "readdir()\n"
10398 "setenv()\n"
10399 "setgrent()\n"
10400 "setkey()\n"
10401 "setpwent()\n"
10402 "setutxent()\n"
10403 "strerror()\n"
10404 "strsignal() [Added in POSIX.1-2008]\n"
10405 "strtok()\n"
10406 "system() [Added in POSIX.1-2008]\n"
10407 "tmpnam() if passed a non-NULL argument\n"
10408 "ttyname()\n"
10409 "unsetenv()\n"
10410 "wcrtomb() if its final argument is NULL\n"
10411 "wcsrtombs() if its final argument is NULL\n"
10412 "wcstombs()\n"
10413 "wctomb()\n"
10414 msgstr ""
10415 "asctime()\n"
10416 "basename()\n"
10417 "catgets()\n"
10418 "crypt()\n"
10419 "ctermid() (NULL でない引き数を渡された場合)\n"
10420 "ctime()\n"
10421 "dbm_clearerr()\n"
10422 "dbm_close()\n"
10423 "dbm_delete()\n"
10424 "dbm_error()\n"
10425 "dbm_fetch()\n"
10426 "dbm_firstkey()\n"
10427 "dbm_nextkey()\n"
10428 "dbm_open()\n"
10429 "dbm_store()\n"
10430 "dirname()\n"
10431 "dlerror()\n"
10432 "drand48()\n"
10433 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10434 "encrypt()\n"
10435 "endgrent()\n"
10436 "endpwent()\n"
10437 "endutxent()\n"
10438 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10439 "ftw()\n"
10440 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10441 "getc_unlocked()\n"
10442 "getchar_unlocked()\n"
10443 "getdate()\n"
10444 "getenv()\n"
10445 "getgrent()\n"
10446 "getgrgid()\n"
10447 "getgrnam()\n"
10448 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10449 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10450 "gethostent()\n"
10451 "getlogin()\n"
10452 "getnetbyaddr()\n"
10453 "getnetbyname()\n"
10454 "getnetent()\n"
10455 "getopt()\n"
10456 "getprotobyname()\n"
10457 "getprotobynumber()\n"
10458 "getprotoent()\n"
10459 "getpwent()\n"
10460 "getpwnam()\n"
10461 "getpwuid()\n"
10462 "getservbyname()\n"
10463 "getservbyport()\n"
10464 "getservent()\n"
10465 "getutxent()\n"
10466 "getutxid()\n"
10467 "getutxline()\n"
10468 "gmtime()\n"
10469 "hcreate()\n"
10470 "hdestroy()\n"
10471 "hsearch()\n"
10472 "inet_ntoa()\n"
10473 "l64a()\n"
10474 "lgamma()\n"
10475 "lgammaf()\n"
10476 "lgammal()\n"
10477 "localeconv()\n"
10478 "localtime()\n"
10479 "lrand48()\n"
10480 "mrand48()\n"
10481 "nftw()\n"
10482 "nl_langinfo()\n"
10483 "ptsname()\n"
10484 "putc_unlocked()\n"
10485 "putchar_unlocked()\n"
10486 "putenv()\n"
10487 "pututxline()\n"
10488 "rand()\n"
10489 "readdir()\n"
10490 "setenv()\n"
10491 "setgrent()\n"
10492 "setkey()\n"
10493 "setpwent()\n"
10494 "setutxent()\n"
10495 "strerror()\n"
10496 "strsignal() [POSIX.1-2008 で追加された]\n"
10497 "strtok()\n"
10498 "system() [POSIX.1-2008 で追加された]\n"
10499 "tmpnam() (NULL でない引き数を渡された場合)\n"
10500 "ttyname()\n"
10501 "unsetenv()\n"
10502 "wcrtomb() (最後の引き数が NULL の場合)\n"
10503 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10504 "wcstombs()\n"
10505 "wctomb()\n"
10506
10507 #. type: SS
10508 #: build/C/man7/pthreads.7:234
10509 #, no-wrap
10510 msgid "Async-cancel-safe functions"
10511 msgstr "async-cancel-safe 関数"
10512
10513 #. type: Plain text
10514 #: build/C/man7/pthreads.7:238
10515 msgid ""
10516 "An async-cancel-safe function is one that can be safely called in an "
10517 "application where asynchronous cancelability is enabled (see "
10518 "B<pthread_setcancelstate>(3))."
10519 msgstr ""
10520 "async-cancel-safe 関数は、\n"
10521 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10522 "安全に呼び出すことができる関数のことである\n"
10523 "(B<pthread_setcancelstate>(3) を参照)。"
10524
10525 #. type: Plain text
10526 #: build/C/man7/pthreads.7:241
10527 msgid ""
10528 "Only the following functions are required to be async-cancel-safe by "
10529 "POSIX.1-2001 and POSIX.1-2008:"
10530 msgstr ""
10531 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10532 "なければならないとされている。"
10533
10534 #. type: Plain text
10535 #: build/C/man7/pthreads.7:247
10536 #, no-wrap
10537 msgid ""
10538 "pthread_cancel()\n"
10539 "pthread_setcancelstate()\n"
10540 "pthread_setcanceltype()\n"
10541 msgstr ""
10542 "pthread_cancel()\n"
10543 "pthread_setcancelstate()\n"
10544 "pthread_setcanceltype()\n"
10545
10546 #. type: SS
10547 #: build/C/man7/pthreads.7:249
10548 #, no-wrap
10549 msgid "Cancellation points"
10550 msgstr "取り消しポイント (cancellation points)"
10551
10552 #. type: Plain text
10553 #: build/C/man7/pthreads.7:256
10554 msgid ""
10555 "POSIX.1 specifies that certain functions must, and certain other functions "
10556 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10557 "type is deferred, and a cancellation request is pending for the thread, then "
10558 "the thread is canceled when it calls a function that is a cancellation point."
10559 msgstr ""
10560 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10561 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10562 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10563 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10564 "時点で、そのスレッドのキャンセルが 行われる。"
10565
10566 #. type: Plain text
10567 #: build/C/man7/pthreads.7:259
10568 msgid ""
10569 "The following functions are required to be cancellation points by "
10570 "POSIX.1-2001 and/or POSIX.1-2008:"
10571 msgstr ""
10572 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10573 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10574
10575 #. type: Plain text
10576 #: build/C/man7/pthreads.7:322
10577 #, no-wrap
10578 msgid ""
10579 "accept()\n"
10580 "aio_suspend()\n"
10581 "clock_nanosleep()\n"
10582 "close()\n"
10583 "connect()\n"
10584 "creat()\n"
10585 "fcntl() F_SETLKW\n"
10586 "fdatasync()\n"
10587 "fsync()\n"
10588 "getmsg()\n"
10589 "getpmsg()\n"
10590 "lockf() F_LOCK\n"
10591 "mq_receive()\n"
10592 "mq_send()\n"
10593 "mq_timedreceive()\n"
10594 "mq_timedsend()\n"
10595 "msgrcv()\n"
10596 "msgsnd()\n"
10597 "msync()\n"
10598 "nanosleep()\n"
10599 "open()\n"
10600 "openat() [Added in POSIX.1-2008]\n"
10601 "pause()\n"
10602 "poll()\n"
10603 "pread()\n"
10604 "pselect()\n"
10605 "pthread_cond_timedwait()\n"
10606 "pthread_cond_wait()\n"
10607 "pthread_join()\n"
10608 "pthread_testcancel()\n"
10609 "putmsg()\n"
10610 "putpmsg()\n"
10611 "pwrite()\n"
10612 "read()\n"
10613 "readv()\n"
10614 "recv()\n"
10615 "recvfrom()\n"
10616 "recvmsg()\n"
10617 "select()\n"
10618 "sem_timedwait()\n"
10619 "sem_wait()\n"
10620 "send()\n"
10621 "sendmsg()\n"
10622 "sendto()\n"
10623 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10624 "sigsuspend()\n"
10625 "sigtimedwait()\n"
10626 "sigwait()\n"
10627 "sigwaitinfo()\n"
10628 "sleep()\n"
10629 "system()\n"
10630 "tcdrain()\n"
10631 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10632 "wait()\n"
10633 "waitid()\n"
10634 "waitpid()\n"
10635 "write()\n"
10636 "writev()\n"
10637 msgstr ""
10638 "accept()\n"
10639 "aio_suspend()\n"
10640 "clock_nanosleep()\n"
10641 "close()\n"
10642 "connect()\n"
10643 "creat()\n"
10644 "fcntl() F_SETLKW\n"
10645 "fdatasync()\n"
10646 "fsync()\n"
10647 "getmsg()\n"
10648 "getpmsg()\n"
10649 "lockf() F_LOCK\n"
10650 "mq_receive()\n"
10651 "mq_send()\n"
10652 "mq_timedreceive()\n"
10653 "mq_timedsend()\n"
10654 "msgrcv()\n"
10655 "msgsnd()\n"
10656 "msync()\n"
10657 "nanosleep()\n"
10658 "open()\n"
10659 "openat() [POSIX.1-2008 で追加された]\n"
10660 "pause()\n"
10661 "poll()\n"
10662 "pread()\n"
10663 "pselect()\n"
10664 "pthread_cond_timedwait()\n"
10665 "pthread_cond_wait()\n"
10666 "pthread_join()\n"
10667 "pthread_testcancel()\n"
10668 "putmsg()\n"
10669 "putpmsg()\n"
10670 "pwrite()\n"
10671 "read()\n"
10672 "readv()\n"
10673 "recv()\n"
10674 "recvfrom()\n"
10675 "recvmsg()\n"
10676 "select()\n"
10677 "sem_timedwait()\n"
10678 "sem_wait()\n"
10679 "send()\n"
10680 "sendmsg()\n"
10681 "sendto()\n"
10682 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10683 "sigsuspend()\n"
10684 "sigtimedwait()\n"
10685 "sigwait()\n"
10686 "sigwaitinfo()\n"
10687 "sleep()\n"
10688 "system()\n"
10689 "tcdrain()\n"
10690 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10691 "wait()\n"
10692 "waitid()\n"
10693 "waitpid()\n"
10694 "write()\n"
10695 "writev()\n"
10696
10697 #. type: Plain text
10698 #: build/C/man7/pthreads.7:327
10699 msgid ""
10700 "The following functions may be cancellation points according to POSIX.1-2001 "
10701 "and/or POSIX.1-2008:"
10702 msgstr ""
10703 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10704 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10705
10706 #. type: Plain text
10707 #: build/C/man7/pthreads.7:555
10708 #, no-wrap
10709 msgid ""
10710 "access()\n"
10711 "asctime()\n"
10712 "asctime_r()\n"
10713 "catclose()\n"
10714 "catgets()\n"
10715 "catopen()\n"
10716 "chmod() [Added in POSIX.1-2008]\n"
10717 "chown() [Added in POSIX.1-2008]\n"
10718 "closedir()\n"
10719 "closelog()\n"
10720 "ctermid()\n"
10721 "ctime()\n"
10722 "ctime_r()\n"
10723 "dbm_close()\n"
10724 "dbm_delete()\n"
10725 "dbm_fetch()\n"
10726 "dbm_nextkey()\n"
10727 "dbm_open()\n"
10728 "dbm_store()\n"
10729 "dlclose()\n"
10730 "dlopen()\n"
10731 "dprintf() [Added in POSIX.1-2008]\n"
10732 "endgrent()\n"
10733 "endhostent()\n"
10734 "endnetent()\n"
10735 "endprotoent()\n"
10736 "endpwent()\n"
10737 "endservent()\n"
10738 "endutxent()\n"
10739 "faccessat() [Added in POSIX.1-2008]\n"
10740 "fchmod() [Added in POSIX.1-2008]\n"
10741 "fchmodat() [Added in POSIX.1-2008]\n"
10742 "fchown() [Added in POSIX.1-2008]\n"
10743 "fchownat() [Added in POSIX.1-2008]\n"
10744 "fclose()\n"
10745 "fcntl() (for any value of cmd argument)\n"
10746 "fflush()\n"
10747 "fgetc()\n"
10748 "fgetpos()\n"
10749 "fgets()\n"
10750 "fgetwc()\n"
10751 "fgetws()\n"
10752 "fmtmsg()\n"
10753 "fopen()\n"
10754 "fpathconf()\n"
10755 "fprintf()\n"
10756 "fputc()\n"
10757 "fputs()\n"
10758 "fputwc()\n"
10759 "fputws()\n"
10760 "fread()\n"
10761 "freopen()\n"
10762 "fscanf()\n"
10763 "fseek()\n"
10764 "fseeko()\n"
10765 "fsetpos()\n"
10766 "fstat()\n"
10767 "fstatat() [Added in POSIX.1-2008]\n"
10768 "ftell()\n"
10769 "ftello()\n"
10770 "ftw()\n"
10771 "futimens() [Added in POSIX.1-2008]\n"
10772 "fwprintf()\n"
10773 "fwrite()\n"
10774 "fwscanf()\n"
10775 "getaddrinfo()\n"
10776 "getc()\n"
10777 "getc_unlocked()\n"
10778 "getchar()\n"
10779 "getchar_unlocked()\n"
10780 "getcwd()\n"
10781 "getdate()\n"
10782 "getdelim() [Added in POSIX.1-2008]\n"
10783 "getgrent()\n"
10784 "getgrgid()\n"
10785 "getgrgid_r()\n"
10786 "getgrnam()\n"
10787 "getgrnam_r()\n"
10788 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10789 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10790 "gethostent()\n"
10791 "gethostid()\n"
10792 "gethostname()\n"
10793 "getline() [Added in POSIX.1-2008]\n"
10794 "getlogin()\n"
10795 "getlogin_r()\n"
10796 "getnameinfo()\n"
10797 "getnetbyaddr()\n"
10798 "getnetbyname()\n"
10799 "getnetent()\n"
10800 "getopt() (if opterr is nonzero)\n"
10801 "getprotobyname()\n"
10802 "getprotobynumber()\n"
10803 "getprotoent()\n"
10804 "getpwent()\n"
10805 "getpwnam()\n"
10806 "getpwnam_r()\n"
10807 "getpwuid()\n"
10808 "getpwuid_r()\n"
10809 "gets()\n"
10810 "getservbyname()\n"
10811 "getservbyport()\n"
10812 "getservent()\n"
10813 "getutxent()\n"
10814 "getutxid()\n"
10815 "getutxline()\n"
10816 "getwc()\n"
10817 "getwchar()\n"
10818 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10819 "glob()\n"
10820 "iconv_close()\n"
10821 "iconv_open()\n"
10822 "ioctl()\n"
10823 "link()\n"
10824 "linkat() [Added in POSIX.1-2008]\n"
10825 "lio_listio() [Added in POSIX.1-2008]\n"
10826 "localtime()\n"
10827 "localtime_r()\n"
10828 "lockf() [Added in POSIX.1-2008]\n"
10829 "lseek()\n"
10830 "lstat()\n"
10831 "mkdir() [Added in POSIX.1-2008]\n"
10832 "mkdirat() [Added in POSIX.1-2008]\n"
10833 "mkdtemp() [Added in POSIX.1-2008]\n"
10834 "mkfifo() [Added in POSIX.1-2008]\n"
10835 "mkfifoat() [Added in POSIX.1-2008]\n"
10836 "mknod() [Added in POSIX.1-2008]\n"
10837 "mknodat() [Added in POSIX.1-2008]\n"
10838 "mkstemp()\n"
10839 "mktime()\n"
10840 "nftw()\n"
10841 "opendir()\n"
10842 "openlog()\n"
10843 "pathconf()\n"
10844 "pclose()\n"
10845 "perror()\n"
10846 "popen()\n"
10847 "posix_fadvise()\n"
10848 "posix_fallocate()\n"
10849 "posix_madvise()\n"
10850 "posix_openpt()\n"
10851 "posix_spawn()\n"
10852 "posix_spawnp()\n"
10853 "posix_trace_clear()\n"
10854 "posix_trace_close()\n"
10855 "posix_trace_create()\n"
10856 "posix_trace_create_withlog()\n"
10857 "posix_trace_eventtypelist_getnext_id()\n"
10858 "posix_trace_eventtypelist_rewind()\n"
10859 "posix_trace_flush()\n"
10860 "posix_trace_get_attr()\n"
10861 "posix_trace_get_filter()\n"
10862 "posix_trace_get_status()\n"
10863 "posix_trace_getnext_event()\n"
10864 "posix_trace_open()\n"
10865 "posix_trace_rewind()\n"
10866 "posix_trace_set_filter()\n"
10867 "posix_trace_shutdown()\n"
10868 "posix_trace_timedgetnext_event()\n"
10869 "posix_typed_mem_open()\n"
10870 "printf()\n"
10871 "psiginfo() [Added in POSIX.1-2008]\n"
10872 "psignal() [Added in POSIX.1-2008]\n"
10873 "pthread_rwlock_rdlock()\n"
10874 "pthread_rwlock_timedrdlock()\n"
10875 "pthread_rwlock_timedwrlock()\n"
10876 "pthread_rwlock_wrlock()\n"
10877 "putc()\n"
10878 "putc_unlocked()\n"
10879 "putchar()\n"
10880 "putchar_unlocked()\n"
10881 "puts()\n"
10882 "pututxline()\n"
10883 "putwc()\n"
10884 "putwchar()\n"
10885 "readdir()\n"
10886 "readdir_r()\n"
10887 "readlink() [Added in POSIX.1-2008]\n"
10888 "readlinkat() [Added in POSIX.1-2008]\n"
10889 "remove()\n"
10890 "rename()\n"
10891 "renameat() [Added in POSIX.1-2008]\n"
10892 "rewind()\n"
10893 "rewinddir()\n"
10894 "scandir() [Added in POSIX.1-2008]\n"
10895 "scanf()\n"
10896 "seekdir()\n"
10897 "semop()\n"
10898 "setgrent()\n"
10899 "sethostent()\n"
10900 "setnetent()\n"
10901 "setprotoent()\n"
10902 "setpwent()\n"
10903 "setservent()\n"
10904 "setutxent()\n"
10905 "sigpause() [Added in POSIX.1-2008]\n"
10906 "stat()\n"
10907 "strerror()\n"
10908 "strerror_r()\n"
10909 "strftime()\n"
10910 "symlink()\n"
10911 "symlinkat() [Added in POSIX.1-2008]\n"
10912 "sync()\n"
10913 "syslog()\n"
10914 "tmpfile()\n"
10915 "tmpnam()\n"
10916 "ttyname()\n"
10917 "ttyname_r()\n"
10918 "tzset()\n"
10919 "ungetc()\n"
10920 "ungetwc()\n"
10921 "unlink()\n"
10922 "unlinkat() [Added in POSIX.1-2008]\n"
10923 "utime() [Added in POSIX.1-2008]\n"
10924 "utimensat() [Added in POSIX.1-2008]\n"
10925 "utimes() [Added in POSIX.1-2008]\n"
10926 "vdprintf() [Added in POSIX.1-2008]\n"
10927 "vfprintf()\n"
10928 "vfwprintf()\n"
10929 "vprintf()\n"
10930 "vwprintf()\n"
10931 "wcsftime()\n"
10932 "wordexp()\n"
10933 "wprintf()\n"
10934 "wscanf()\n"
10935 msgstr ""
10936 "access()\n"
10937 "asctime()\n"
10938 "asctime_r()\n"
10939 "catclose()\n"
10940 "catgets()\n"
10941 "catopen()\n"
10942 "chmod() [POSIX.1-2008 で追加された]\n"
10943 "chown() [POSIX.1-2008 で追加された]\n"
10944 "closedir()\n"
10945 "closelog()\n"
10946 "ctermid()\n"
10947 "ctime()\n"
10948 "ctime_r()\n"
10949 "dbm_close()\n"
10950 "dbm_delete()\n"
10951 "dbm_fetch()\n"
10952 "dbm_nextkey()\n"
10953 "dbm_open()\n"
10954 "dbm_store()\n"
10955 "dlclose()\n"
10956 "dlopen()\n"
10957 "dprintf() [POSIX.1-2008 で追加された]\n"
10958 "endgrent()\n"
10959 "endhostent()\n"
10960 "endnetent()\n"
10961 "endprotoent()\n"
10962 "endpwent()\n"
10963 "endservent()\n"
10964 "endutxent()\n"
10965 "faccessat() [POSIX.1-2008 で追加された]\n"
10966 "fchmod() [POSIX.1-2008 で追加された]\n"
10967 "fchmodat() [POSIX.1-2008 で追加された]\n"
10968 "fchown() [POSIX.1-2008 で追加された]\n"
10969 "fchownat() [POSIX.1-2008 で追加された]\n"
10970 "fclose()\n"
10971 "fcntl() (cmd 引き数が何であっても)\n"
10972 "fflush()\n"
10973 "fgetc()\n"
10974 "fgetpos()\n"
10975 "fgets()\n"
10976 "fgetwc()\n"
10977 "fgetws()\n"
10978 "fmtmsg()\n"
10979 "fopen()\n"
10980 "fpathconf()\n"
10981 "fprintf()\n"
10982 "fputc()\n"
10983 "fputs()\n"
10984 "fputwc()\n"
10985 "fputws()\n"
10986 "fread()\n"
10987 "freopen()\n"
10988 "fscanf()\n"
10989 "fseek()\n"
10990 "fseeko()\n"
10991 "fsetpos()\n"
10992 "fstat()\n"
10993 "fstatat() [POSIX.1-2008 で追加された]\n"
10994 "ftell()\n"
10995 "ftello()\n"
10996 "ftw()\n"
10997 "futimens() [POSIX.1-2008 で追加された]\n"
10998 "fwprintf()\n"
10999 "fwrite()\n"
11000 "fwscanf()\n"
11001 "getaddrinfo()\n"
11002 "getc()\n"
11003 "getc_unlocked()\n"
11004 "getchar()\n"
11005 "getchar_unlocked()\n"
11006 "getcwd()\n"
11007 "getdate()\n"
11008 "getdelim() [POSIX.1-2008 で追加された]\n"
11009 "getgrent()\n"
11010 "getgrgid()\n"
11011 "getgrgid_r()\n"
11012 "getgrnam()\n"
11013 "getgrnam_r()\n"
11014 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
11015 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
11016 "gethostent()\n"
11017 "gethostid()\n"
11018 "gethostname()\n"
11019 "getline() [POSIX.1-2008 で追加された]\n"
11020 "getlogin()\n"
11021 "getlogin_r()\n"
11022 "getnameinfo()\n"
11023 "getnetbyaddr()\n"
11024 "getnetbyname()\n"
11025 "getnetent()\n"
11026 "getopt() (opterr が 0 以外の場合)\n"
11027 "getprotobyname()\n"
11028 "getprotobynumber()\n"
11029 "getprotoent()\n"
11030 "getpwent()\n"
11031 "getpwnam()\n"
11032 "getpwnam_r()\n"
11033 "getpwuid()\n"
11034 "getpwuid_r()\n"
11035 "gets()\n"
11036 "getservbyname()\n"
11037 "getservbyport()\n"
11038 "getservent()\n"
11039 "getutxent()\n"
11040 "getutxid()\n"
11041 "getutxline()\n"
11042 "getwc()\n"
11043 "getwchar()\n"
11044 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
11045 "glob()\n"
11046 "iconv_close()\n"
11047 "iconv_open()\n"
11048 "ioctl()\n"
11049 "link()\n"
11050 "linkat() [POSIX.1-2008 で追加された]\n"
11051 "lio_listio() [POSIX.1-2008 で追加された]\n"
11052 "localtime()\n"
11053 "localtime_r()\n"
11054 "lockf() [POSIX.1-2008 で追加された]\n"
11055 "lseek()\n"
11056 "lstat()\n"
11057 "mkdir() [POSIX.1-2008 で追加された]\n"
11058 "mkdirat() [POSIX.1-2008 で追加された]\n"
11059 "mkdtemp() [POSIX.1-2008 で追加された]\n"
11060 "mkfifo() [POSIX.1-2008 で追加された]\n"
11061 "mkfifoat() [POSIX.1-2008 で追加された]\n"
11062 "mknod() [POSIX.1-2008 で追加された]\n"
11063 "mknodat() [POSIX.1-2008 で追加された]\n"
11064 "mkstemp()\n"
11065 "mktime()\n"
11066 "nftw()\n"
11067 "opendir()\n"
11068 "openlog()\n"
11069 "pathconf()\n"
11070 "pclose()\n"
11071 "perror()\n"
11072 "popen()\n"
11073 "posix_fadvise()\n"
11074 "posix_fallocate()\n"
11075 "posix_madvise()\n"
11076 "posix_openpt()\n"
11077 "posix_spawn()\n"
11078 "posix_spawnp()\n"
11079 "posix_trace_clear()\n"
11080 "posix_trace_close()\n"
11081 "posix_trace_create()\n"
11082 "posix_trace_create_withlog()\n"
11083 "posix_trace_eventtypelist_getnext_id()\n"
11084 "posix_trace_eventtypelist_rewind()\n"
11085 "posix_trace_flush()\n"
11086 "posix_trace_get_attr()\n"
11087 "posix_trace_get_filter()\n"
11088 "posix_trace_get_status()\n"
11089 "posix_trace_getnext_event()\n"
11090 "posix_trace_open()\n"
11091 "posix_trace_rewind()\n"
11092 "posix_trace_set_filter()\n"
11093 "posix_trace_shutdown()\n"
11094 "posix_trace_timedgetnext_event()\n"
11095 "posix_typed_mem_open()\n"
11096 "printf()\n"
11097 "psiginfo() [POSIX.1-2008 で追加された]\n"
11098 "psignal() [POSIX.1-2008 で追加された]\n"
11099 "pthread_rwlock_rdlock()\n"
11100 "pthread_rwlock_timedrdlock()\n"
11101 "pthread_rwlock_timedwrlock()\n"
11102 "pthread_rwlock_wrlock()\n"
11103 "putc()\n"
11104 "putc_unlocked()\n"
11105 "putchar()\n"
11106 "putchar_unlocked()\n"
11107 "puts()\n"
11108 "pututxline()\n"
11109 "putwc()\n"
11110 "putwchar()\n"
11111 "readdir()\n"
11112 "readdir_r()\n"
11113 "readlink() [POSIX.1-2008 で追加された]\n"
11114 "readlinkat() [POSIX.1-2008 で追加された]\n"
11115 "remove()\n"
11116 "rename()\n"
11117 "renameat() [POSIX.1-2008 で追加された]\n"
11118 "rewind()\n"
11119 "rewinddir()\n"
11120 "scandir() [POSIX.1-2008 で追加された]\n"
11121 "scanf()\n"
11122 "seekdir()\n"
11123 "semop()\n"
11124 "setgrent()\n"
11125 "sethostent()\n"
11126 "setnetent()\n"
11127 "setprotoent()\n"
11128 "setpwent()\n"
11129 "setservent()\n"
11130 "setutxent()\n"
11131 "sigpause() [POSIX.1-2008 で追加された]\n"
11132 "stat()\n"
11133 "strerror()\n"
11134 "strerror_r()\n"
11135 "strftime()\n"
11136 "symlink()\n"
11137 "symlinkat() [POSIX.1-2008 で追加された]\n"
11138 "sync()\n"
11139 "syslog()\n"
11140 "tmpfile()\n"
11141 "tmpnam()\n"
11142 "ttyname()\n"
11143 "ttyname_r()\n"
11144 "tzset()\n"
11145 "ungetc()\n"
11146 "ungetwc()\n"
11147 "unlink()\n"
11148 "unlinkat() [POSIX.1-2008 で追加された]\n"
11149 "utime() [POSIX.1-2008 で追加された]\n"
11150 "utimensat() [POSIX.1-2008 で追加された]\n"
11151 "utimes() [POSIX.1-2008 で追加された]\n"
11152 "vdprintf() [POSIX.1-2008 で追加された]\n"
11153 "vfprintf()\n"
11154 "vfwprintf()\n"
11155 "vprintf()\n"
11156 "vwprintf()\n"
11157 "wcsftime()\n"
11158 "wordexp()\n"
11159 "wprintf()\n"
11160 "wscanf()\n"
11161
11162 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
11163 #.  files, it looks as though at least the following nonstandard
11164 #.  functions are cancellation points:
11165 #.  endnetgrent
11166 #.  endspent
11167 #.  epoll_pwait
11168 #.  epoll_wait
11169 #.  fcloseall
11170 #.  fdopendir
11171 #.  fflush_unlocked
11172 #.  fgetc_unlocked
11173 #.  fgetgrent
11174 #.  fgetgrent_r
11175 #.  fgetpwent
11176 #.  fgetpwent_r
11177 #.  fgets_unlocked
11178 #.  fgetspent
11179 #.  fgetspent_r
11180 #.  fgetwc_unlocked
11181 #.  fgetws_unlocked
11182 #.  fputc_unlocked
11183 #.  fputs_unlocked
11184 #.  fputwc_unlocked
11185 #.  fputws_unlocked
11186 #.  fread_unlocked
11187 #.  fwrite_unlocked
11188 #.  gai_suspend
11189 #.  getaddrinfo_a
11190 #.  getdate_r
11191 #.  getgrent_r
11192 #.  getgrouplist
11193 #.  gethostbyaddr_r
11194 #.  gethostbyname2
11195 #.  gethostbyname2_r
11196 #.  gethostbyname_r
11197 #.  gethostent_r
11198 #.  getnetbyaddr_r
11199 #.  getnetbyname_r
11200 #.  getnetent_r
11201 #.  getnetgrent
11202 #.  getnetgrent_r
11203 #.  getprotobyname_r
11204 #.  getprotobynumber_r
11205 #.  getprotoent_r
11206 #.  getpw
11207 #.  getpwent_r
11208 #.  getservbyname_r
11209 #.  getservbyport_r
11210 #.  getservent_r
11211 #.  getspent
11212 #.  getspent_r
11213 #.  getspnam
11214 #.  getspnam_r
11215 #.  getutmp
11216 #.  getutmpx
11217 #.  getw
11218 #.  getwc_unlocked
11219 #.  getwchar_unlocked
11220 #.  initgroups
11221 #.  innetgr
11222 #.  mkostemp
11223 #.  mkostemp64
11224 #.  mkstemp64
11225 #.  ppoll
11226 #.  pthread_timedjoin_np
11227 #.  putgrent
11228 #.  putpwent
11229 #.  putspent
11230 #.  putw
11231 #.  putwc_unlocked
11232 #.  putwchar_unlocked
11233 #.  rcmd
11234 #.  rcmd_af
11235 #.  rexec
11236 #.  rexec_af
11237 #.  rresvport
11238 #.  rresvport_af
11239 #.  ruserok
11240 #.  ruserok_af
11241 #.  setnetgrent
11242 #.  setspent
11243 #.  sgetspent
11244 #.  sgetspent_r
11245 #.  updwtmpx
11246 #.  utmpxname
11247 #.  vfscanf
11248 #.  vfwscanf
11249 #.  vscanf
11250 #.  vsyslog
11251 #.  vwscanf
11252 #. type: Plain text
11253 #: build/C/man7/pthreads.7:653
11254 msgid ""
11255 "An implementation may also mark other functions not specified in the "
11256 "standard as cancellation points.  In particular, an implementation is likely "
11257 "to mark any nonstandard function that may block as a cancellation point.  "
11258 "(This includes most functions that can touch files.)"
11259 msgstr ""
11260 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
11261 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
11262 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
11263 "関数がこれに含まれる)。"
11264
11265 #. type: SS
11266 #: build/C/man7/pthreads.7:653
11267 #, no-wrap
11268 msgid "Compiling on Linux"
11269 msgstr "Linux でのコンパイル"
11270
11271 #. type: Plain text
11272 #: build/C/man7/pthreads.7:656
11273 msgid ""
11274 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
11275 "pthread>."
11276 msgstr ""
11277 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
11278 "きである。"
11279
11280 #. type: SS
11281 #: build/C/man7/pthreads.7:656
11282 #, no-wrap
11283 msgid "Linux implementations of POSIX threads"
11284 msgstr "POSIX スレッドの Linux での実装"
11285
11286 #. type: Plain text
11287 #: build/C/man7/pthreads.7:659
11288 msgid ""
11289 "Over time, two threading implementations have been provided by the GNU C "
11290 "library on Linux:"
11291 msgstr ""
11292 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
11293 "た。"
11294
11295 #. type: TP
11296 #: build/C/man7/pthreads.7:659
11297 #, no-wrap
11298 msgid "B<LinuxThreads>"
11299 msgstr "B<LinuxThreads>"
11300
11301 #. type: Plain text
11302 #: build/C/man7/pthreads.7:663
11303 msgid ""
11304 "This is the original Pthreads implementation.  Since glibc 2.4, this "
11305 "implementation is no longer supported."
11306 msgstr ""
11307 "最初の Pthreads の実装。\n"
11308 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
11309
11310 #. type: TP
11311 #: build/C/man7/pthreads.7:663
11312 #, no-wrap
11313 msgid "B<NPTL> (Native POSIX Threads Library)"
11314 msgstr "B<NPTL> (Native POSIX Threads Library)"
11315
11316 #. type: Plain text
11317 #: build/C/man7/pthreads.7:671
11318 msgid ""
11319 "This is the modern Pthreads implementation.  By comparison with "
11320 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
11321 "POSIX.1 specification and better performance when creating large numbers of "
11322 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
11323 "are present in the Linux 2.6 kernel."
11324 msgstr ""
11325 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
11326 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
11327 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
11328 "装されている機能が必要である。"
11329
11330 #. type: Plain text
11331 #: build/C/man7/pthreads.7:681
11332 msgid ""
11333 "Both of these are so-called 1:1 implementations, meaning that each thread "
11334 "maps to a kernel scheduling entity.  Both threading implementations employ "
11335 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
11336 "primitives (mutexes, thread joining, and so on) are implemented using the "
11337 "Linux B<futex>(2)  system call."
11338 msgstr ""
11339 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
11340 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
11341 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
11342 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
11343 "使って実装されている。"
11344
11345 #. type: SS
11346 #: build/C/man7/pthreads.7:681
11347 #, no-wrap
11348 msgid "LinuxThreads"
11349 msgstr "LinuxThreads"
11350
11351 #. type: Plain text
11352 #: build/C/man7/pthreads.7:683
11353 msgid "The notable features of this implementation are the following:"
11354 msgstr "この実装の大きな特徴は以下の通りである:"
11355
11356 #. type: Plain text
11357 #: build/C/man7/pthreads.7:690
11358 msgid ""
11359 "In addition to the main (initial) thread, and the threads that the program "
11360 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
11361 "thread.  This thread handles thread creation and termination.  (Problems can "
11362 "result if this thread is inadvertently killed.)"
11363 msgstr ""
11364 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
11365 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
11366 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
11367 "kill されると、問題が起こることがある)。"
11368
11369 #. type: Plain text
11370 #: build/C/man7/pthreads.7:702
11371 msgid ""
11372 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
11373 "the first three real-time signals are used (see also B<signal>(7)).  On "
11374 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
11375 "avoid the use of whichever set of signals is employed by the implementation."
11376 msgstr ""
11377 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11378 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11379 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11380 "用されているシグナルを どれも使わないようにしなければならない。"
11381
11382 #. type: Plain text
11383 #: build/C/man7/pthreads.7:709
11384 msgid ""
11385 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11386 "implemented as processes which share more information than usual, but which "
11387 "do not share a common process ID.)  LinuxThreads threads (including the "
11388 "manager thread)  are visible as separate processes using B<ps>(1)."
11389 msgstr ""
11390 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11391 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11392 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11393 "を使うと別のプロセスのように見える。"
11394
11395 #. type: Plain text
11396 #: build/C/man7/pthreads.7:712
11397 msgid ""
11398 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11399 "number of ways, including the following:"
11400 msgstr ""
11401 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11402 "示すような点がある:"
11403
11404 #. type: Plain text
11405 #: build/C/man7/pthreads.7:716
11406 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11407 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11408
11409 #. type: Plain text
11410 #: build/C/man7/pthreads.7:725
11411 msgid ""
11412 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11413 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11414 "should return the same value as B<getppid>(2)  in the main thread."
11415 msgstr ""
11416 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11417 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11418 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11419
11420 #. type: Plain text
11421 #: build/C/man7/pthreads.7:735
11422 msgid ""
11423 "When one thread creates a new child process using B<fork>(2), any thread "
11424 "should be able to B<wait>(2)  on the child.  However, the implementation "
11425 "only allows the thread that created the child to B<wait>(2)  on it."
11426 msgstr ""
11427 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11428 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11429 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11430 "る。"
11431
11432 #. type: Plain text
11433 #: build/C/man7/pthreads.7:742
11434 msgid ""
11435 "When a thread calls B<execve>(2), all other threads are terminated (as "
11436 "required by POSIX.1).  However, the resulting process has the same PID as "
11437 "the thread that called B<execve>(2): it should have the same PID as the main "
11438 "thread."
11439 msgstr ""
11440 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11441 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11442 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11443 "る。"
11444
11445 #. type: Plain text
11446 #: build/C/man7/pthreads.7:749
11447 msgid ""
11448 "Threads do not share user and group IDs.  This can cause complications with "
11449 "set-user-ID programs and can cause failures in Pthreads functions if an "
11450 "application changes its credentials using B<seteuid>(2)  or similar."
11451 msgstr ""
11452 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11453 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11454 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11455
11456 #. type: Plain text
11457 #: build/C/man7/pthreads.7:751
11458 msgid "Threads do not share a common session ID and process group ID."
11459 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11460
11461 #. type: Plain text
11462 #: build/C/man7/pthreads.7:754
11463 msgid "Threads do not share record locks created using B<fcntl>(2)."
11464 msgstr ""
11465 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11466
11467 #. type: Plain text
11468 #: build/C/man7/pthreads.7:760
11469 msgid ""
11470 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11471 "rather than process-wide."
11472 msgstr ""
11473 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11474 "単位の情報である。"
11475
11476 #. type: Plain text
11477 #: build/C/man7/pthreads.7:763
11478 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11479 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11480
11481 #. type: Plain text
11482 #: build/C/man7/pthreads.7:765
11483 msgid "Threads do not share interval timers."
11484 msgstr "スレッド間でインターバル・タイマを共有しない。"
11485
11486 #.  FIXME . bug report filed for NPTL nice nonconformance
11487 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11488 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11489 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11490 #.  Monitor this to see if it makes it into mainline.
11491 #. type: Plain text
11492 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:804
11493 msgid "Threads do not share a common nice value."
11494 msgstr "スレッドは共通の nice 値を共有しない。"
11495
11496 #. type: Plain text
11497 #: build/C/man7/pthreads.7:777
11498 msgid ""
11499 "POSIX.1 distinguishes the notions of signals that are directed to the "
11500 "process as a whole and signals that are directed to individual threads.  "
11501 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11502 "example) should be handled by a single, arbitrarily selected thread within "
11503 "the process.  LinuxThreads does not support the notion of process-directed "
11504 "signals: signals may be sent only to specific threads."
11505 msgstr ""
11506 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11507 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11508 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11509 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11510 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11511 "ルは特定のスレッドにだけ送ることができる。"
11512
11513 #. type: Plain text
11514 #: build/C/man7/pthreads.7:786
11515 msgid ""
11516 "Threads have distinct alternate signal stack settings.  However, a new "
11517 "thread's alternate signal stack settings are copied from the thread that "
11518 "created it, so that the threads initially share an alternate signal stack.  "
11519 "(A new thread should start with no alternate signal stack defined.  If two "
11520 "threads handle signals on their shared alternate signal stack at the same "
11521 "time, unpredictable program failures are likely to occur.)"
11522 msgstr ""
11523 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11524 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11525 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11526 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11527 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11528 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11529
11530 #. type: SS
11531 #: build/C/man7/pthreads.7:786
11532 #, no-wrap
11533 msgid "NPTL"
11534 msgstr "NPTL"
11535
11536 #. type: Plain text
11537 #: build/C/man7/pthreads.7:795
11538 msgid ""
11539 "With NPTL, all of the threads in a process are placed in the same thread "
11540 "group; all members of a thread group share the same PID.  NPTL does not "
11541 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11542 "signals (see also B<signal>(7)); these signals cannot be used in "
11543 "applications."
11544 msgstr ""
11545 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11546 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11547 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11548 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11549 "ションでは使用できない。"
11550
11551 #. type: Plain text
11552 #: build/C/man7/pthreads.7:797
11553 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11554 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11555
11556 #. type: Plain text
11557 #: build/C/man7/pthreads.7:806
11558 msgid "Some NPTL nonconformances occur only with older kernels:"
11559 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11560
11561 #. type: Plain text
11562 #: build/C/man7/pthreads.7:812
11563 msgid ""
11564 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11565 "rather than process-wide (fixed in kernel 2.6.9)."
11566 msgstr ""
11567 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11568 "単位の情報である (カーネル 2.6.9 で修正された)。"
11569
11570 #. type: Plain text
11571 #: build/C/man7/pthreads.7:814
11572 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11573 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11574
11575 #. type: Plain text
11576 #: build/C/man7/pthreads.7:816
11577 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11578 msgstr ""
11579 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11580
11581 #. type: Plain text
11582 #: build/C/man7/pthreads.7:820
11583 msgid ""
11584 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11585 "(fixed in kernel 2.6.16)."
11586 msgstr ""
11587 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11588 "きる (カーネル 2.6.16 で修正された)。"
11589
11590 #. type: Plain text
11591 #: build/C/man7/pthreads.7:825
11592 msgid ""
11593 "Only the main thread is permitted to make the process into a process group "
11594 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11595 msgstr ""
11596 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11597 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11598
11599 #. type: Plain text
11600 #: build/C/man7/pthreads.7:831
11601 msgid ""
11602 "Threads have distinct alternate signal stack settings.  However, a new "
11603 "thread's alternate signal stack settings are copied from the thread that "
11604 "created it, so that the threads initially share an alternate signal stack "
11605 "(fixed in kernel 2.6.16)."
11606 msgstr ""
11607 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11608 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11609 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11610 "ル 2.6.16 で修正された)。"
11611
11612 #. type: Plain text
11613 #: build/C/man7/pthreads.7:833
11614 msgid "Note the following further points about the NPTL implementation:"
11615 msgstr "NPTL の実装では以下の点についても注意すること:"
11616
11617 #. type: Plain text
11618 #: build/C/man7/pthreads.7:847
11619 msgid ""
11620 "If the stack size soft resource limit (see the description of "
11621 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11622 "I<unlimited>, then this value defines the default stack size for new "
11623 "threads.  To be effective, this limit must be set before the program is "
11624 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11625 "stacksize> in the C shell)."
11626 msgstr ""
11627 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11628 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11629 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11630 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11631 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11632 "は I<limit stacksize>)  を使って設定する。"
11633
11634 #. type: SS
11635 #: build/C/man7/pthreads.7:847
11636 #, no-wrap
11637 msgid "Determining the threading implementation"
11638 msgstr "スレッド実装の判定"
11639
11640 #. type: Plain text
11641 #: build/C/man7/pthreads.7:852
11642 msgid ""
11643 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11644 "system's threading implementation, for example:"
11645 msgstr ""
11646 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11647 "装を判定することができる。 以下に例を示す:"
11648
11649 #. type: Plain text
11650 #: build/C/man7/pthreads.7:857
11651 #, no-wrap
11652 msgid ""
11653 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11654 "NPTL 2.3.4\n"
11655 msgstr ""
11656 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11657 "NPTL 2.3.4\n"
11658
11659 #. type: Plain text
11660 #: build/C/man7/pthreads.7:862
11661 msgid ""
11662 "With older glibc versions, a command such as the following should be "
11663 "sufficient to determine the default threading implementation:"
11664 msgstr ""
11665 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11666 "ド実装を判定することができる。"
11667
11668 #. type: Plain text
11669 #: build/C/man7/pthreads.7:868
11670 #, no-wrap
11671 msgid ""
11672 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11673 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11674 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11675 msgstr ""
11676 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11677 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11678 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11679
11680 #. type: SS
11681 #: build/C/man7/pthreads.7:870
11682 #, no-wrap
11683 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11684 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11685
11686 #. type: Plain text
11687 #: build/C/man7/pthreads.7:885
11688 msgid ""
11689 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11690 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11691 "override the dynamic linker's default choice of threading implementation.  "
11692 "This variable tells the dynamic linker to assume that it is running on top "
11693 "of a particular kernel version.  By specifying a kernel version that does "
11694 "not provide the support required by NPTL, we can force the use of "
11695 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11696 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11697 "For example:"
11698 msgstr ""
11699 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11700 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11701 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11702 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11703 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11704 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11705 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11706 "ン を動作させる場合だろう)。 以下に例を示す:"
11707
11708 #. type: Plain text
11709 #: build/C/man7/pthreads.7:891
11710 #, no-wrap
11711 msgid ""
11712 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11713 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11714 "        linuxthreads-0.10 by Xavier Leroy\n"
11715 msgstr ""
11716 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11717 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11718 "        linuxthreads-0.10 by Xavier Leroy\n"
11719
11720 #. type: Plain text
11721 #: build/C/man7/pthreads.7:903
11722 msgid ""
11723 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), "
11724 "B<sigevent>(7), B<signal>(7),"
11725 msgstr ""
11726 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11727 "B<signal>(7),"
11728
11729 #. type: Plain text
11730 #: build/C/man7/pthreads.7:927
11731 msgid ""
11732 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11733 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11734 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11735 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11736 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11737 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), "
11738 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3), "
11739 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3), "
11740 "and B<pthread_testcancel>(3)"
11741 msgstr ""
11742 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11743 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11744 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11745 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11746 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11747 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11748 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11749 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11750 "and B<pthread_testcancel>(3)"
11751
11752 #~ msgid "2013-04-19"
11753 #~ msgstr "2013-04-19"
11754
11755 #~ msgid "2008-10-24"
11756 #~ msgstr "2008-10-24"
11757
11758 #~ msgid "2012-03-15"
11759 #~ msgstr "2012-03-15"
11760
11761 #~ msgid "2014-02-04"
11762 #~ msgstr "2014-02-04"
11763
11764 #~ msgid "2010-09-09"
11765 #~ msgstr "2010-09-09"
11766
11767 #~ msgid "2008-11-06"
11768 #~ msgstr "2008-11-06"
11769
11770 #~ msgid "2012-08-19"
11771 #~ msgstr "2012-08-19"
11772
11773 #~ msgid "2012-04-14"
11774 #~ msgstr "2012-04-14"
11775
11776 #~ msgid "2013-03-05"
11777 #~ msgstr "2013-03-05"
11778
11779 #~ msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
11780 #~ msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
11781
11782 #~ msgid "2010-11-14"
11783 #~ msgstr "2010-11-14"