OSDN Git Service

LDP: Update POT and ja.po to LDP v3.68
[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-08 01:30+0900\n"
10 "PO-Revision-Date: 2014-06-06 01:02+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:53
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:46 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:66 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:71 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_equal.3:47
432 #: build/C/man3/pthread_exit.3:75 build/C/man3/pthread_getcpuclockid.3:65
433 #: build/C/man3/pthread_kill.3:72
434 #: build/C/man3/pthread_kill_other_threads_np.3:47
435 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_setaffinity_np.3:121
436 #: build/C/man3/pthread_setcancelstate.3:113
437 #: build/C/man3/pthread_setconcurrency.3:83
438 #: build/C/man3/pthread_setschedparam.3:141
439 #: build/C/man3/pthread_setschedprio.3:83 build/C/man3/pthread_sigmask.3:69
440 #: build/C/man3/pthread_sigqueue.3:94 build/C/man3/pthread_testcancel.3:58
441 #: build/C/man3/pthread_yield.3:53
442 #, no-wrap
443 msgid "ATTRIBUTES"
444 msgstr "属性"
445
446 #. type: SS
447 #: build/C/man3/getcontext.3:154 build/C/man3/makecontext.3:106
448 #: build/C/man3/pthread_attr_setdetachstate.3:88
449 #: build/C/man3/pthread_attr_setguardsize.3:107
450 #: build/C/man3/pthread_attr_setinheritsched.3:111
451 #: build/C/man3/pthread_attr_setschedparam.3:101
452 #: build/C/man3/pthread_attr_setschedpolicy.3:101
453 #: build/C/man3/pthread_attr_setscope.3:120
454 #: build/C/man3/pthread_attr_setstack.3:113
455 #: build/C/man3/pthread_attr_setstackaddr.3:84
456 #: build/C/man3/pthread_attr_setstacksize.3:84 build/C/man3/pthread_equal.3:48
457 #: build/C/man3/pthread_exit.3:76 build/C/man3/pthread_getcpuclockid.3:66
458 #: build/C/man3/pthread_kill.3:73
459 #: build/C/man3/pthread_kill_other_threads_np.3:48
460 #: build/C/man3/pthread_self.3:51 build/C/man3/pthread_setaffinity_np.3:122
461 #: build/C/man3/pthread_setcancelstate.3:114
462 #: build/C/man3/pthread_setconcurrency.3:84
463 #: build/C/man3/pthread_setschedparam.3:142
464 #: build/C/man3/pthread_setschedprio.3:84 build/C/man3/pthread_sigmask.3:70
465 #: build/C/man3/pthread_sigqueue.3:95 build/C/man3/pthread_testcancel.3:59
466 #: build/C/man3/pthread_yield.3:54
467 #, no-wrap
468 msgid "Multithreading (see pthreads(7))"
469 msgstr "マルチスレッディング (pthreads(7) 参照)"
470
471 #. type: Plain text
472 #: build/C/man3/getcontext.3:160
473 msgid "The B<getcontext>()  and B<setcontext>()  functions are thread-safe."
474 msgstr "関数 B<getcontext>() と B<setcontext>() はスレッドセーフである。"
475
476 #. type: SH
477 #: build/C/man3/getcontext.3:160 build/C/man3/makecontext.3:112
478 #: build/C/man3/pthread_attr_init.3:79
479 #: build/C/man3/pthread_attr_setaffinity_np.3:108
480 #: build/C/man3/pthread_attr_setdetachstate.3:94
481 #: build/C/man3/pthread_attr_setguardsize.3:113
482 #: build/C/man3/pthread_attr_setinheritsched.3:117
483 #: build/C/man3/pthread_attr_setschedparam.3:107
484 #: build/C/man3/pthread_attr_setschedpolicy.3:107
485 #: build/C/man3/pthread_attr_setscope.3:126
486 #: build/C/man3/pthread_attr_setstack.3:119
487 #: build/C/man3/pthread_attr_setstackaddr.3:90
488 #: build/C/man3/pthread_attr_setstacksize.3:90
489 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_cleanup_push.3:127
490 #: build/C/man3/pthread_cleanup_push_defer_np.3:114
491 #: build/C/man3/pthread_create.3:153 build/C/man3/pthread_detach.3:64
492 #: build/C/man3/pthread_equal.3:52 build/C/man3/pthread_exit.3:80
493 #: build/C/man3/pthread_getattr_np.3:98
494 #: build/C/man3/pthread_getcpuclockid.3:70 build/C/man3/pthread_join.3:98
495 #: build/C/man3/pthread_kill.3:77
496 #: build/C/man3/pthread_kill_other_threads_np.3:52
497 #: build/C/man3/pthread_self.3:55 build/C/man3/pthread_setaffinity_np.3:128
498 #: build/C/man3/pthread_setcancelstate.3:120
499 #: build/C/man3/pthread_setconcurrency.3:90
500 #: build/C/man3/pthread_setname_np.3:102
501 #: build/C/man3/pthread_setschedparam.3:148
502 #: build/C/man3/pthread_setschedprio.3:88 build/C/man3/pthread_sigmask.3:74
503 #: build/C/man3/pthread_sigqueue.3:99 build/C/man3/pthread_testcancel.3:63
504 #: build/C/man3/pthread_tryjoin_np.3:112 build/C/man3/pthread_yield.3:58
505 #, no-wrap
506 msgid "CONFORMING TO"
507 msgstr "準拠"
508
509 #. type: Plain text
510 #: build/C/man3/getcontext.3:166
511 msgid ""
512 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specification of "
513 "B<getcontext>(), citing portability issues, and recommending that "
514 "applications be rewritten to use POSIX threads instead."
515 msgstr ""
516 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<getcontext>()  の"
517 "仕様が削除された。 代わりに、アプリケーションを POSIX スレッドを使って書き直"
518 "すことが 推奨されている。"
519
520 #. type: SH
521 #: build/C/man3/getcontext.3:166 build/C/man3/makecontext.3:120
522 #: build/C/man3/pthread_attr_init.3:81
523 #: build/C/man3/pthread_attr_setaffinity_np.3:111
524 #: build/C/man3/pthread_attr_setdetachstate.3:96
525 #: build/C/man3/pthread_attr_setguardsize.3:115
526 #: build/C/man3/pthread_attr_setschedparam.3:109
527 #: build/C/man3/pthread_attr_setscope.3:128
528 #: build/C/man3/pthread_attr_setstack.3:121
529 #: build/C/man3/pthread_attr_setstackaddr.3:93
530 #: build/C/man3/pthread_attr_setstacksize.3:92
531 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
532 #: build/C/man3/pthread_create.3:155 build/C/man3/pthread_detach.3:66
533 #: build/C/man3/pthread_equal.3:54 build/C/man3/pthread_exit.3:82
534 #: build/C/man3/pthread_getcpuclockid.3:72 build/C/man3/pthread_join.3:100
535 #: build/C/man3/pthread_kill.3:79
536 #: build/C/man3/pthread_kill_other_threads_np.3:55
537 #: build/C/man3/pthread_self.3:57 build/C/man3/pthread_setaffinity_np.3:131
538 #: build/C/man3/pthread_setcancelstate.3:122
539 #: build/C/man3/pthread_setconcurrency.3:92
540 #: build/C/man3/pthread_setname_np.3:104
541 #: build/C/man3/pthread_setschedparam.3:150
542 #: build/C/man3/pthread_setschedprio.3:90 build/C/man3/pthread_sigmask.3:76
543 #: build/C/man3/pthread_yield.3:64
544 #, no-wrap
545 msgid "NOTES"
546 msgstr "注意"
547
548 #. type: Plain text
549 #: build/C/man3/getcontext.3:183
550 msgid ""
551 "The earliest incarnation of this mechanism was the B<setjmp>(3)/"
552 "B<longjmp>(3)  mechanism.  Since that does not define the handling of the "
553 "signal context, the next stage was the B<sigsetjmp>(3)/B<siglongjmp>(3)  "
554 "pair.  The present mechanism gives much more control.  On the other hand, "
555 "there is no easy way to detect whether a return from B<getcontext>()  is "
556 "from the first call, or via a B<setcontext>()  call.  The user has to invent "
557 "her own bookkeeping device, and a register variable won't do since registers "
558 "are restored."
559 msgstr ""
560 "このメカニズムの最古の実装は、 B<setjmp>(3)/B<longjmp>(3)  機構であった。 こ"
561 "れらにはシグナルコンテキストの取り扱いが定義されていなかったので、 次の段階で"
562 "は B<sigsetjmp>(3)/B<siglongjmp>(3)  のペアが現われた。 現在の機構ではずっと"
563 "細かな制御ができる。 一方 B<getcontext>()  から返ったとき、 これが最初の呼び"
564 "出しであったか、 それとも B<setcontext>()  呼び出しからのものであるかを 区別"
565 "する容易な方法がなくなってしまった。 ユーザは「しおり」機構を自分で作らなけれ"
566 "ばならない。 レジスタ変数は (レジスタはリストアされてしまうので) これをやって"
567 "くれない。"
568
569 #. type: Plain text
570 #: build/C/man3/getcontext.3:194
571 msgid ""
572 "When a signal occurs, the current user context is saved and a new context is "
573 "created by the kernel for the signal handler.  Do not leave the handler "
574 "using B<longjmp>(3): it is undefined what would happen with contexts.  Use "
575 "B<siglongjmp>(3)  or B<setcontext>()  instead."
576 msgstr ""
577 "シグナルが発生すると、 現在のユーザコンテキストは保存され、 シグナルハンドラ"
578 "用のコンテキストがカーネルによって生成される。 今後はハンドラに "
579 "B<longjmp>(3)  を使わせないこと: この関数のコンテキスト下での動作は定義されて"
580 "いない。 代わりに B<siglongjmp>(3)  か B<setcontext>()  を使うこと。"
581
582 #. type: SH
583 #: build/C/man3/getcontext.3:194 build/C/man3/makecontext.3:227
584 #: build/C/man3/pthread_attr_init.3:297
585 #: build/C/man3/pthread_attr_setaffinity_np.3:118
586 #: build/C/man3/pthread_attr_setdetachstate.3:118
587 #: build/C/man3/pthread_attr_setguardsize.3:165
588 #: build/C/man3/pthread_attr_setinheritsched.3:138
589 #: build/C/man3/pthread_attr_setschedparam.3:116
590 #: build/C/man3/pthread_attr_setschedpolicy.3:112
591 #: build/C/man3/pthread_attr_setscope.3:139
592 #: build/C/man3/pthread_attr_setstack.3:162
593 #: build/C/man3/pthread_attr_setstackaddr.3:117
594 #: build/C/man3/pthread_attr_setstacksize.3:118
595 #: build/C/man3/pthread_cancel.3:226 build/C/man3/pthread_cleanup_push.3:315
596 #: build/C/man3/pthread_cleanup_push_defer_np.3:117
597 #: build/C/man3/pthread_create.3:376 build/C/man3/pthread_detach.3:97
598 #: build/C/man3/pthread_equal.3:61 build/C/man3/pthread_exit.3:110
599 #: build/C/man3/pthread_getattr_np.3:345
600 #: build/C/man3/pthread_getcpuclockid.3:175 build/C/man3/pthread_join.3:127
601 #: build/C/man3/pthread_kill.3:99
602 #: build/C/man3/pthread_kill_other_threads_np.3:71
603 #: build/C/man3/pthread_self.3:81 build/C/man3/pthread_setaffinity_np.3:213
604 #: build/C/man3/pthread_setcancelstate.3:186
605 #: build/C/man3/pthread_setconcurrency.3:107
606 #: build/C/man3/pthread_setname_np.3:200
607 #: build/C/man3/pthread_setschedparam.3:438
608 #: build/C/man3/pthread_setschedprio.3:96 build/C/man3/pthread_sigmask.3:152
609 #: build/C/man3/pthread_sigqueue.3:101 build/C/man3/pthread_testcancel.3:68
610 #: build/C/man3/pthread_tryjoin_np.3:135 build/C/man3/pthread_yield.3:67
611 #: build/C/man7/pthreads.7:893
612 #, no-wrap
613 msgid "SEE ALSO"
614 msgstr "関連項目"
615
616 #. type: Plain text
617 #: build/C/man3/getcontext.3:201
618 msgid ""
619 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
620 "B<makecontext>(3), B<sigsetjmp>(3)"
621 msgstr ""
622 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
623 "B<makecontext>(3), B<sigsetjmp>(3)"
624
625 #. type: SH
626 #: build/C/man3/getcontext.3:201 build/C/man3/makecontext.3:233
627 #: build/C/man3/pthread_attr_init.3:313
628 #: build/C/man3/pthread_attr_setaffinity_np.3:124
629 #: build/C/man3/pthread_attr_setdetachstate.3:124
630 #: build/C/man3/pthread_attr_setguardsize.3:173
631 #: build/C/man3/pthread_attr_setinheritsched.3:150
632 #: build/C/man3/pthread_attr_setschedparam.3:128
633 #: build/C/man3/pthread_attr_setschedpolicy.3:123
634 #: build/C/man3/pthread_attr_setscope.3:149
635 #: build/C/man3/pthread_attr_setstack.3:174
636 #: build/C/man3/pthread_attr_setstackaddr.3:123
637 #: build/C/man3/pthread_attr_setstacksize.3:125
638 #: build/C/man3/pthread_cancel.3:238 build/C/man3/pthread_cleanup_push.3:321
639 #: build/C/man3/pthread_cleanup_push_defer_np.3:123
640 #: build/C/man3/pthread_create.3:389 build/C/man3/pthread_detach.3:104
641 #: build/C/man3/pthread_equal.3:65 build/C/man3/pthread_exit.3:114
642 #: build/C/man3/pthread_getattr_np.3:361
643 #: build/C/man3/pthread_getcpuclockid.3:183 build/C/man3/pthread_join.3:134
644 #: build/C/man3/pthread_kill.3:108
645 #: build/C/man3/pthread_kill_other_threads_np.3:77
646 #: build/C/man3/pthread_self.3:85 build/C/man3/pthread_setaffinity_np.3:221
647 #: build/C/man3/pthread_setcancelstate.3:191
648 #: build/C/man3/pthread_setconcurrency.3:110
649 #: build/C/man3/pthread_setname_np.3:206
650 #: build/C/man3/pthread_setschedparam.3:452
651 #: build/C/man3/pthread_setschedprio.3:110 build/C/man3/pthread_sigmask.3:161
652 #: build/C/man3/pthread_sigqueue.3:109 build/C/man3/pthread_testcancel.3:73
653 #: build/C/man3/pthread_tryjoin_np.3:140 build/C/man3/pthread_yield.3:71
654 #: build/C/man7/pthreads.7:927
655 #, no-wrap
656 msgid "COLOPHON"
657 msgstr "この文書について"
658
659 #. type: Plain text
660 #: build/C/man3/getcontext.3:209 build/C/man3/makecontext.3:241
661 #: build/C/man3/pthread_attr_init.3:321
662 #: build/C/man3/pthread_attr_setaffinity_np.3:132
663 #: build/C/man3/pthread_attr_setdetachstate.3:132
664 #: build/C/man3/pthread_attr_setguardsize.3:181
665 #: build/C/man3/pthread_attr_setinheritsched.3:158
666 #: build/C/man3/pthread_attr_setschedparam.3:136
667 #: build/C/man3/pthread_attr_setschedpolicy.3:131
668 #: build/C/man3/pthread_attr_setscope.3:157
669 #: build/C/man3/pthread_attr_setstack.3:182
670 #: build/C/man3/pthread_attr_setstackaddr.3:131
671 #: build/C/man3/pthread_attr_setstacksize.3:133
672 #: build/C/man3/pthread_cancel.3:246 build/C/man3/pthread_cleanup_push.3:329
673 #: build/C/man3/pthread_cleanup_push_defer_np.3:131
674 #: build/C/man3/pthread_create.3:397 build/C/man3/pthread_detach.3:112
675 #: build/C/man3/pthread_equal.3:73 build/C/man3/pthread_exit.3:122
676 #: build/C/man3/pthread_getattr_np.3:369
677 #: build/C/man3/pthread_getcpuclockid.3:191 build/C/man3/pthread_join.3:142
678 #: build/C/man3/pthread_kill.3:116
679 #: build/C/man3/pthread_kill_other_threads_np.3:85
680 #: build/C/man3/pthread_self.3:93 build/C/man3/pthread_setaffinity_np.3:229
681 #: build/C/man3/pthread_setcancelstate.3:199
682 #: build/C/man3/pthread_setconcurrency.3:118
683 #: build/C/man3/pthread_setname_np.3:214
684 #: build/C/man3/pthread_setschedparam.3:460
685 #: build/C/man3/pthread_setschedprio.3:118 build/C/man3/pthread_sigmask.3:169
686 #: build/C/man3/pthread_sigqueue.3:117 build/C/man3/pthread_testcancel.3:81
687 #: build/C/man3/pthread_tryjoin_np.3:148 build/C/man3/pthread_yield.3:79
688 #: build/C/man7/pthreads.7:935
689 #, fuzzy
690 #| msgid ""
691 #| "This page is part of release 3.67 of the Linux I<man-pages> project.  A "
692 #| "description of the project, information about reporting bugs, and the "
693 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
694 #| "man-pages/."
695 msgid ""
696 "This page is part of release 3.68 of the Linux I<man-pages> project.  A "
697 "description of the project, information about reporting bugs, and the latest "
698 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
699 "pages/."
700 msgstr ""
701 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.67 の一部\n"
702 "である。プロジェクトの説明とバグ報告に関する情報は\n"
703 "http://www.kernel.org/doc/man-pages/ に書かれている。"
704
705 #. type: TH
706 #: build/C/man3/makecontext.3:28
707 #, no-wrap
708 msgid "MAKECONTEXT"
709 msgstr "MAKECONTEXT"
710
711 #. type: TH
712 #: build/C/man3/makecontext.3:28 build/C/man3/pthread_attr_setaffinity_np.3:26
713 #: build/C/man3/pthread_attr_setdetachstate.3:26
714 #: build/C/man3/pthread_attr_setguardsize.3:26
715 #: build/C/man3/pthread_attr_setscope.3:26
716 #: build/C/man3/pthread_attr_setstack.3:26
717 #: build/C/man3/pthread_attr_setstackaddr.3:26
718 #: build/C/man3/pthread_attr_setstacksize.3:26
719 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
720 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_setname_np.3:26
721 #: build/C/man3/pthread_setschedparam.3:26
722 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigqueue.3:25
723 #, fuzzy, no-wrap
724 #| msgid "2014-05-21"
725 msgid "2014-05-28"
726 msgstr "2014-05-21"
727
728 #. type: TH
729 #: build/C/man3/makecontext.3:28
730 #, no-wrap
731 msgid "GNU"
732 msgstr "GNU"
733
734 #. type: Plain text
735 #: build/C/man3/makecontext.3:31
736 msgid "makecontext, swapcontext - manipulate user context"
737 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
738
739 #. type: Plain text
740 #: build/C/man3/makecontext.3:36
741 msgid ""
742 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
743 ">I<argc>B<, ...);>"
744 msgstr ""
745 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
746 ">I<argc>B<, ...);>"
747
748 #. type: Plain text
749 #: build/C/man3/makecontext.3:38
750 #, fuzzy
751 #| msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
752 msgid ""
753 "B<int swapcontext(ucontext_t *>I<oucp>B<, const ucontext_t *>I<ucp>B<);>"
754 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
755
756 #. type: Plain text
757 #: build/C/man3/makecontext.3:49
758 msgid ""
759 "In a System V-like environment, one has the type I<ucontext_t> defined in "
760 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
761 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
762 "level context switching between multiple threads of control within a process."
763 msgstr ""
764 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
765 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
766 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
767 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
768 "ようになっている。"
769
770 #. type: Plain text
771 #: build/C/man3/makecontext.3:52
772 msgid "For the type and the first two functions, see B<getcontext>(3)."
773 msgstr ""
774 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
775
776 #. type: Plain text
777 #: build/C/man3/makecontext.3:64
778 msgid ""
779 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
780 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
781 "B<makecontext>(), the caller must allocate a new stack for this context and "
782 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
783 "and assign its address to I<ucp-E<gt>uc_link>."
784 msgstr ""
785 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
786 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
787 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
788 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
789 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
790 "らない。"
791
792 #. type: Plain text
793 #: build/C/man3/makecontext.3:78
794 msgid ""
795 "When this context is later activated (using B<setcontext>(3)  or "
796 "B<swapcontext>())  the function I<func> is called, and passed the series of "
797 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
798 "number of these arguments in I<argc>.  When this function returns, the "
799 "successor context is activated.  If the successor context pointer is NULL, "
800 "the thread exits."
801 msgstr ""
802 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
803 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
804 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
805 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
806 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
807
808 #. type: Plain text
809 #: build/C/man3/makecontext.3:84
810 msgid ""
811 "The B<swapcontext>()  function saves the current context in the structure "
812 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
813 msgstr ""
814 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
815 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
816
817 #. type: Plain text
818 #: build/C/man3/makecontext.3:96
819 msgid ""
820 "When successful, B<swapcontext>()  does not return.  (But we may return "
821 "later, in case I<oucp> is activated, in which case it looks like "
822 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
823 "sets I<errno> appropriately."
824 msgstr ""
825 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
826 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
827 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
828 "て設定する。"
829
830 #. type: TP
831 #: build/C/man3/makecontext.3:97
832 #: build/C/man3/pthread_attr_setaffinity_np.3:102
833 #: build/C/man3/pthread_getattr_np.3:77
834 #, no-wrap
835 msgid "B<ENOMEM>"
836 msgstr "B<ENOMEM>"
837
838 #. type: Plain text
839 #: build/C/man3/makecontext.3:100
840 msgid "Insufficient stack space left."
841 msgstr "スタックに割り当てる空間が残っていない。"
842
843 #. type: SH
844 #: build/C/man3/makecontext.3:100
845 #: build/C/man3/pthread_attr_setaffinity_np.3:106
846 #: build/C/man3/pthread_attr_setguardsize.3:104
847 #: build/C/man3/pthread_attr_setstack.3:110
848 #: build/C/man3/pthread_attr_setstackaddr.3:81
849 #: build/C/man3/pthread_attr_setstacksize.3:81
850 #: build/C/man3/pthread_getattr_np.3:96
851 #: build/C/man3/pthread_getcpuclockid.3:63
852 #: build/C/man3/pthread_setaffinity_np.3:119
853 #: build/C/man3/pthread_setconcurrency.3:81
854 #: build/C/man3/pthread_setname_np.3:100
855 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:90
856 #: build/C/man3/pthread_tryjoin_np.3:110
857 #, no-wrap
858 msgid "VERSIONS"
859 msgstr "バージョン"
860
861 #. type: Plain text
862 #: build/C/man3/makecontext.3:105
863 msgid ""
864 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
865 "2.1."
866 msgstr ""
867 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
868 "されている。"
869
870 #. type: Plain text
871 #: build/C/man3/makecontext.3:112
872 msgid "The B<makecontext>()  and B<swapcontext>()  functions are thread-safe."
873 msgstr "関数 B<makecontext>() と B<swapcontext>() はスレッドセーフである。"
874
875 #. type: Plain text
876 #: build/C/man3/makecontext.3:120
877 msgid ""
878 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
879 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
880 "recommending that applications be rewritten to use POSIX threads instead."
881 msgstr ""
882 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
883 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
884 "POSIX スレッドを使って書き直すことが 推奨されている。"
885
886 #. type: Plain text
887 #: build/C/man3/makecontext.3:128
888 msgid ""
889 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
890 "namely, this struct contains the start and length of a memory area to be "
891 "used as the stack, regardless of the direction of growth of the stack.  "
892 "Thus, it is not necessary for the user program to worry about this direction."
893 msgstr ""
894 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
895 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
896 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
897 "て、ユーザプログラムはこの件については心配しなくてよい。"
898
899 #. type: Plain text
900 #: build/C/man3/makecontext.3:144
901 msgid ""
902 "On architectures where I<int> and pointer types are the same size (e.g., "
903 "x86-32, where both types are 32 bits), you may be able to get away with "
904 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
905 "However, doing this is not guaranteed to be portable, is undefined according "
906 "to the standards, and won't work on architectures where pointers are larger "
907 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
908 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
909 "g., x86-64)."
910 msgstr ""
911 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
912 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
913 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
914 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
915 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
916 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
917 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
918 "できるようになっている。"
919
920 #. type: SH
921 #: build/C/man3/makecontext.3:144 build/C/man3/pthread_attr_init.3:87
922 #: build/C/man3/pthread_attr_setdetachstate.3:115
923 #: build/C/man3/pthread_attr_setguardsize.3:162
924 #: build/C/man3/pthread_attr_setinheritsched.3:135
925 #: build/C/man3/pthread_attr_setschedparam.3:113
926 #: build/C/man3/pthread_attr_setschedpolicy.3:109
927 #: build/C/man3/pthread_attr_setstack.3:159
928 #: build/C/man3/pthread_attr_setstacksize.3:115
929 #: build/C/man3/pthread_cancel.3:135 build/C/man3/pthread_cleanup_push.3:155
930 #: build/C/man3/pthread_create.3:209 build/C/man3/pthread_detach.3:93
931 #: build/C/man3/pthread_getattr_np.3:101
932 #: build/C/man3/pthread_getcpuclockid.3:83 build/C/man3/pthread_join.3:124
933 #: build/C/man3/pthread_setaffinity_np.3:161
934 #: build/C/man3/pthread_setcancelstate.3:183
935 #: build/C/man3/pthread_setname_np.3:114
936 #: build/C/man3/pthread_setschedparam.3:156 build/C/man3/pthread_sigmask.3:78
937 #: build/C/man3/pthread_testcancel.3:65 build/C/man3/pthread_tryjoin_np.3:115
938 #, no-wrap
939 msgid "EXAMPLE"
940 msgstr "例"
941
942 #. type: Plain text
943 #: build/C/man3/makecontext.3:152
944 msgid ""
945 "The example program below demonstrates the use of B<getcontext>(3), "
946 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
947 "following output:"
948 msgstr ""
949 "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), "
950 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
951 "と、以下のような出力が得られる:"
952
953 #. type: Plain text
954 #: build/C/man3/makecontext.3:164
955 #, no-wrap
956 msgid ""
957 "$B< ./a.out>\n"
958 "main: swapcontext(&uctx_main, &uctx_func2)\n"
959 "func2: started\n"
960 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
961 "func1: started\n"
962 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
963 "func2: returning\n"
964 "func1: returning\n"
965 "main: exiting\n"
966 msgstr ""
967 "$B< ./a.out>\n"
968 "main: swapcontext(&uctx_main, &uctx_func2)\n"
969 "func2: started\n"
970 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
971 "func1: started\n"
972 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
973 "func2: returning\n"
974 "func1: returning\n"
975 "main: exiting\n"
976
977 #. type: SS
978 #: build/C/man3/makecontext.3:166 build/C/man3/pthread_attr_init.3:148
979 #: build/C/man3/pthread_cancel.3:151 build/C/man3/pthread_cleanup_push.3:231
980 #: build/C/man3/pthread_create.3:248 build/C/man3/pthread_getattr_np.3:179
981 #: build/C/man3/pthread_getcpuclockid.3:101
982 #: build/C/man3/pthread_setname_np.3:140
983 #: build/C/man3/pthread_setschedparam.3:231 build/C/man3/pthread_sigmask.3:96
984 #, no-wrap
985 msgid "Program source"
986 msgstr "プログラムのソース"
987
988 #. type: Plain text
989 #: build/C/man3/makecontext.3:172
990 #, no-wrap
991 msgid ""
992 "#include E<lt>ucontext.hE<gt>\n"
993 "#include E<lt>stdio.hE<gt>\n"
994 "#include E<lt>stdlib.hE<gt>\n"
995 msgstr ""
996 "#include E<lt>ucontext.hE<gt>\n"
997 "#include E<lt>stdio.hE<gt>\n"
998 "#include E<lt>stdlib.hE<gt>\n"
999
1000 #. type: Plain text
1001 #: build/C/man3/makecontext.3:174
1002 #, no-wrap
1003 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
1004 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
1005
1006 #. type: Plain text
1007 #: build/C/man3/makecontext.3:177
1008 #, no-wrap
1009 msgid ""
1010 "#define handle_error(msg) \\e\n"
1011 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1012 msgstr ""
1013 "#define handle_error(msg) \\e\n"
1014 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1015
1016 #. type: Plain text
1017 #: build/C/man3/makecontext.3:187
1018 #, no-wrap
1019 msgid ""
1020 "static void\n"
1021 "func1(void)\n"
1022 "{\n"
1023 "    printf(\"func1: started\\en\");\n"
1024 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
1025 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
1026 "        handle_error(\"swapcontext\");\n"
1027 "    printf(\"func1: returning\\en\");\n"
1028 "}\n"
1029 msgstr ""
1030 "static void\n"
1031 "func1(void)\n"
1032 "{\n"
1033 "    printf(\"func1: started\\en\");\n"
1034 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
1035 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
1036 "        handle_error(\"swapcontext\");\n"
1037 "    printf(\"func1: returning\\en\");\n"
1038 "}\n"
1039
1040 #. type: Plain text
1041 #: build/C/man3/makecontext.3:197
1042 #, no-wrap
1043 msgid ""
1044 "static void\n"
1045 "func2(void)\n"
1046 "{\n"
1047 "    printf(\"func2: started\\en\");\n"
1048 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
1049 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
1050 "        handle_error(\"swapcontext\");\n"
1051 "    printf(\"func2: returning\\en\");\n"
1052 "}\n"
1053 msgstr ""
1054 "static void\n"
1055 "func2(void)\n"
1056 "{\n"
1057 "    printf(\"func2: started\\en\");\n"
1058 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
1059 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
1060 "        handle_error(\"swapcontext\");\n"
1061 "    printf(\"func2: returning\\en\");\n"
1062 "}\n"
1063
1064 #. type: Plain text
1065 #: build/C/man3/makecontext.3:203
1066 #, no-wrap
1067 msgid ""
1068 "int\n"
1069 "main(int argc, char *argv[])\n"
1070 "{\n"
1071 "    char func1_stack[16384];\n"
1072 "    char func2_stack[16384];\n"
1073 msgstr ""
1074 "int\n"
1075 "main(int argc, char *argv[])\n"
1076 "{\n"
1077 "    char func1_stack[16384];\n"
1078 "    char func2_stack[16384];\n"
1079
1080 #. type: Plain text
1081 #: build/C/man3/makecontext.3:210
1082 #, no-wrap
1083 msgid ""
1084 "    if (getcontext(&uctx_func1) == -1)\n"
1085 "        handle_error(\"getcontext\");\n"
1086 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1087 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1088 "    uctx_func1.uc_link = &uctx_main;\n"
1089 "    makecontext(&uctx_func1, func1, 0);\n"
1090 msgstr ""
1091 "    if (getcontext(&uctx_func1) == -1)\n"
1092 "        handle_error(\"getcontext\");\n"
1093 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1094 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1095 "    uctx_func1.uc_link = &uctx_main;\n"
1096 "    makecontext(&uctx_func1, func1, 0);\n"
1097
1098 #. type: Plain text
1099 #: build/C/man3/makecontext.3:218
1100 #, no-wrap
1101 msgid ""
1102 "    if (getcontext(&uctx_func2) == -1)\n"
1103 "        handle_error(\"getcontext\");\n"
1104 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1105 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1106 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1107 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1108 "    makecontext(&uctx_func2, func2, 0);\n"
1109 msgstr ""
1110 "    if (getcontext(&uctx_func2) == -1)\n"
1111 "        handle_error(\"getcontext\");\n"
1112 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1113 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1114 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1115 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1116 "    makecontext(&uctx_func2, func2, 0);\n"
1117
1118 #. type: Plain text
1119 #: build/C/man3/makecontext.3:222
1120 #, no-wrap
1121 msgid ""
1122 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1123 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1124 "        handle_error(\"swapcontext\");\n"
1125 msgstr ""
1126 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1127 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1128 "        handle_error(\"swapcontext\");\n"
1129
1130 #. type: Plain text
1131 #: build/C/man3/makecontext.3:226
1132 #, no-wrap
1133 msgid ""
1134 "    printf(\"main: exiting\\en\");\n"
1135 "    exit(EXIT_SUCCESS);\n"
1136 "}\n"
1137 msgstr ""
1138 "    printf(\"main: exiting\\en\");\n"
1139 "    exit(EXIT_SUCCESS);\n"
1140 "}\n"
1141
1142 #. type: Plain text
1143 #: build/C/man3/makecontext.3:233
1144 msgid ""
1145 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1146 "B<sigsetjmp>(3)"
1147 msgstr ""
1148 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1149 "B<sigsetjmp>(3)"
1150
1151 #. type: TH
1152 #: build/C/man3/pthread_attr_init.3:26
1153 #, no-wrap
1154 msgid "PTHREAD_ATTR_INIT"
1155 msgstr "PTHREAD_ATTR_INIT"
1156
1157 #. type: TH
1158 #: build/C/man3/pthread_attr_init.3:26
1159 #, no-wrap
1160 msgid "2008-11-11"
1161 msgstr "2008-11-11"
1162
1163 #. type: Plain text
1164 #: build/C/man3/pthread_attr_init.3:30
1165 msgid ""
1166 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1167 "attributes object"
1168 msgstr ""
1169 "pthread_attr_init, pthread_attr_destroy - \n"
1170 "スレッド属性オブジェクトの初期化と破棄を行う"
1171
1172 #. type: Plain text
1173 #: build/C/man3/pthread_attr_init.3:33
1174 #: build/C/man3/pthread_attr_setdetachstate.3:33
1175 #: build/C/man3/pthread_attr_setguardsize.3:33
1176 #: build/C/man3/pthread_attr_setinheritsched.3:33
1177 #: build/C/man3/pthread_attr_setschedparam.3:33
1178 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1179 #: build/C/man3/pthread_attr_setscope.3:33
1180 #: build/C/man3/pthread_attr_setstack.3:33
1181 #: build/C/man3/pthread_attr_setstackaddr.3:33
1182 #: build/C/man3/pthread_attr_setstacksize.3:33
1183 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1184 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1185 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1186 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1187 #: build/C/man3/pthread_join.3:32
1188 #: build/C/man3/pthread_kill_other_threads_np.3:32
1189 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1190 #: build/C/man3/pthread_setconcurrency.3:32
1191 #: build/C/man3/pthread_setschedparam.3:33
1192 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_testcancel.3:32
1193 #, no-wrap
1194 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1195 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1196
1197 #. type: Plain text
1198 #: build/C/man3/pthread_attr_init.3:36
1199 #, no-wrap
1200 msgid ""
1201 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1202 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1203 msgstr ""
1204 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1205 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1206
1207 #. type: Plain text
1208 #: build/C/man3/pthread_attr_init.3:38
1209 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1210 #: build/C/man3/pthread_attr_setdetachstate.3:40
1211 #: build/C/man3/pthread_attr_setguardsize.3:40
1212 #: build/C/man3/pthread_attr_setinheritsched.3:40
1213 #: build/C/man3/pthread_attr_setschedparam.3:40
1214 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1215 #: build/C/man3/pthread_attr_setscope.3:40
1216 #: build/C/man3/pthread_attr_setstack.3:40
1217 #: build/C/man3/pthread_attr_setstackaddr.3:40
1218 #: build/C/man3/pthread_attr_setstacksize.3:40
1219 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1220 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1221 #: build/C/man3/pthread_getattr_np.3:37
1222 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1223 #: build/C/man3/pthread_setaffinity_np.3:41
1224 #: build/C/man3/pthread_setcancelstate.3:38
1225 #: build/C/man3/pthread_setconcurrency.3:37
1226 #: build/C/man3/pthread_setschedparam.3:40
1227 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1228 #, no-wrap
1229 msgid "Compile and link with I<-pthread>.\n"
1230 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1231
1232 #. type: Plain text
1233 #: build/C/man3/pthread_attr_init.3:50
1234 msgid ""
1235 "The B<pthread_attr_init>()  function initializes the thread attributes "
1236 "object pointed to by I<attr> with default attribute values.  After this "
1237 "call, individual attributes of the object can be set using various related "
1238 "functions (listed under SEE ALSO), and then the object can be used in one or "
1239 "more B<pthread_create>(3)  calls that create threads."
1240 msgstr ""
1241 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1242 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1243 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1244 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1245 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1246 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1247
1248 #. type: Plain text
1249 #: build/C/man3/pthread_attr_init.3:55
1250 msgid ""
1251 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1252 "already been initialized results in undefined behavior."
1253 msgstr ""
1254 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1255 "B<pthread_attr_init>() を呼び出した場合、\n"
1256 "どのような動作になるかは不定である。"
1257
1258 #. type: Plain text
1259 #: build/C/man3/pthread_attr_init.3:62
1260 msgid ""
1261 "When a thread attributes object is no longer required, it should be "
1262 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1263 "thread attributes object has no effect on threads that were created using "
1264 "that object."
1265 msgstr ""
1266 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1267 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1268 "スレッド属性オブジェクトを破棄しても、\n"
1269 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1270
1271 #. type: Plain text
1272 #: build/C/man3/pthread_attr_init.3:68
1273 msgid ""
1274 "Once a thread attributes object has been destroyed, it can be reinitialized "
1275 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1276 "attributes object has undefined results."
1277 msgstr ""
1278 "いったん破棄したスレッド属性オブジェクトは、\n"
1279 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1280 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1281 "使った場合の結果は不定である。"
1282
1283 #. type: Plain text
1284 #: build/C/man3/pthread_attr_init.3:71
1285 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1286 #: build/C/man3/pthread_attr_setdetachstate.3:80
1287 #: build/C/man3/pthread_attr_setguardsize.3:93
1288 #: build/C/man3/pthread_attr_setinheritsched.3:96
1289 #: build/C/man3/pthread_attr_setschedparam.3:88
1290 #: build/C/man3/pthread_attr_setschedpolicy.3:86
1291 #: build/C/man3/pthread_attr_setscope.3:106
1292 #: build/C/man3/pthread_attr_setstack.3:88
1293 #: build/C/man3/pthread_attr_setstackaddr.3:77
1294 #: build/C/man3/pthread_attr_setstacksize.3:64
1295 #: build/C/man3/pthread_setaffinity_np.3:80
1296 #: build/C/man3/pthread_setcancelstate.3:95
1297 #: build/C/man3/pthread_setname_np.3:75
1298 msgid ""
1299 "On success, these functions return 0; on error, they return a nonzero error "
1300 "number."
1301 msgstr ""
1302 "成功すると、これらの関数は 0 を返す。\n"
1303 "エラーの場合、0 以外のエラー番号を返す。"
1304
1305 #. type: Plain text
1306 #: build/C/man3/pthread_attr_init.3:79
1307 msgid ""
1308 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1309 "Linux these functions always succeed (but portable and future-proof "
1310 "applications should nevertheless handle a possible error return)."
1311 msgstr ""
1312 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1313 "記載されている。\n"
1314 "Linux では、これらの関数は常に成功する\n"
1315 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1316 "正のエラーの返り値を処理するようにすべきである)。"
1317
1318 #. type: Plain text
1319 #: build/C/man3/pthread_attr_init.3:81
1320 #: build/C/man3/pthread_attr_setdetachstate.3:96
1321 #: build/C/man3/pthread_attr_setguardsize.3:115
1322 #: build/C/man3/pthread_attr_setinheritsched.3:119
1323 #: build/C/man3/pthread_attr_setschedparam.3:109
1324 #: build/C/man3/pthread_attr_setschedpolicy.3:109
1325 #: build/C/man3/pthread_attr_setscope.3:128
1326 #: build/C/man3/pthread_attr_setstack.3:121
1327 #: build/C/man3/pthread_attr_setstacksize.3:92
1328 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
1329 #: build/C/man3/pthread_create.3:155 build/C/man3/pthread_detach.3:66
1330 #: build/C/man3/pthread_equal.3:54 build/C/man3/pthread_exit.3:82
1331 #: build/C/man3/pthread_getcpuclockid.3:72 build/C/man3/pthread_join.3:100
1332 #: build/C/man3/pthread_self.3:57 build/C/man3/pthread_setcancelstate.3:122
1333 #: build/C/man3/pthread_setconcurrency.3:92
1334 #: build/C/man3/pthread_setschedparam.3:150
1335 #: build/C/man3/pthread_setschedprio.3:90 build/C/man3/pthread_sigmask.3:76
1336 #: build/C/man3/pthread_testcancel.3:65
1337 msgid "POSIX.1-2001."
1338 msgstr "POSIX.1-2001."
1339
1340 #. type: Plain text
1341 #: build/C/man3/pthread_attr_init.3:87
1342 msgid ""
1343 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1344 "object other than via pthreads functions is nonportable and produces "
1345 "undefined results."
1346 msgstr ""
1347 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1348 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1349 "どのような結果が得られるかも分からない。"
1350
1351 #. type: Plain text
1352 #: build/C/man3/pthread_attr_init.3:96
1353 msgid ""
1354 "The program below optionally makes use of B<pthread_attr_init>()  and "
1355 "various related functions to initialize a thread attributes object that is "
1356 "used to create a single thread.  Once created, the thread uses the "
1357 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1358 "the thread's attributes, and then displays those attributes."
1359 msgstr ""
1360 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1361 "スレッド属性オブジェクトの初期化を行い、\n"
1362 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1363 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1364 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1365 "取得した属性を表示する。"
1366
1367 #. type: Plain text
1368 #: build/C/man3/pthread_attr_init.3:105
1369 msgid ""
1370 "If the program is run with no command-line argument, then it passes NULL as "
1371 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1372 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1373 "threading implementation, we see the following:"
1374 msgstr ""
1375 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1376 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1377 "この場合、スレッドはデフォルトの属性で作成される。\n"
1378 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1379 "動作させると、以下のような出力が得られる。"
1380
1381 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1382 #. type: Plain text
1383 #: build/C/man3/pthread_attr_init.3:121
1384 #, no-wrap
1385 msgid ""
1386 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1387 "unlimited\n"
1388 "$B< ./a.out>\n"
1389 "Thread attributes:\n"
1390 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1391 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1392 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1393 "        Scheduling policy   = SCHED_OTHER\n"
1394 "        Scheduling priority = 0\n"
1395 "        Guard size          = 4096 bytes\n"
1396 "        Stack address       = 0x40196000\n"
1397 "        Stack size          = 0x201000 bytes\n"
1398 msgstr ""
1399 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1400 "unlimited\n"
1401 "$B< ./a.out>\n"
1402 "Thread attributes:\n"
1403 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1404 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1405 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1406 "        Scheduling policy   = SCHED_OTHER\n"
1407 "        Scheduling priority = 0\n"
1408 "        Guard size          = 4096 bytes\n"
1409 "        Stack address       = 0x40196000\n"
1410 "        Stack size          = 0x201000 bytes\n"
1411
1412 #. type: Plain text
1413 #: build/C/man3/pthread_attr_init.3:131
1414 msgid ""
1415 "When we supply a stack size as a command-line argument, the program "
1416 "initializes a thread attributes object, sets various attributes in that "
1417 "object, and passes a pointer to the object in the call to "
1418 "B<pthread_create>(3).  Running the program on Linux/x86-32 with the NPTL "
1419 "threading implementation, we see the following:"
1420 msgstr ""
1421 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1422 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1423 "そのオブジェクトの各種属性を設定し、\n"
1424 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1425 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1426 "動作させると、以下のような出力が得られる。"
1427
1428 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1429 #. type: Plain text
1430 #: build/C/man3/pthread_attr_init.3:146
1431 #, no-wrap
1432 msgid ""
1433 "$B< ./a.out 0x3000000>\n"
1434 "posix_memalign() allocated at 0x40197000\n"
1435 "Thread attributes:\n"
1436 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1437 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1438 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1439 "        Scheduling policy   = SCHED_OTHER\n"
1440 "        Scheduling priority = 0\n"
1441 "        Guard size          = 0 bytes\n"
1442 "        Stack address       = 0x40197000\n"
1443 "        Stack size          = 0x3000000 bytes\n"
1444 msgstr ""
1445 "$B< ./a.out 0x3000000>\n"
1446 "posix_memalign() allocated at 0x40197000\n"
1447 "Thread attributes:\n"
1448 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1449 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1450 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1451 "        Scheduling policy   = SCHED_OTHER\n"
1452 "        Scheduling priority = 0\n"
1453 "        Guard size          = 0 bytes\n"
1454 "        Stack address       = 0x40197000\n"
1455 "        Stack size          = 0x3000000 bytes\n"
1456
1457 #. type: Plain text
1458 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1459 #, no-wrap
1460 msgid ""
1461 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1462 "#include E<lt>pthread.hE<gt>\n"
1463 "#include E<lt>stdio.hE<gt>\n"
1464 "#include E<lt>stdlib.hE<gt>\n"
1465 "#include E<lt>unistd.hE<gt>\n"
1466 "#include E<lt>errno.hE<gt>\n"
1467 msgstr ""
1468 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1469 "#include E<lt>pthread.hE<gt>\n"
1470 "#include E<lt>stdio.hE<gt>\n"
1471 "#include E<lt>stdlib.hE<gt>\n"
1472 "#include E<lt>unistd.hE<gt>\n"
1473 "#include E<lt>errno.hE<gt>\n"
1474
1475 #. type: Plain text
1476 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:162
1477 #: build/C/man3/pthread_cleanup_push.3:243 build/C/man3/pthread_create.3:261
1478 #: build/C/man3/pthread_getattr_np.3:191
1479 #: build/C/man3/pthread_getcpuclockid.3:119
1480 #: build/C/man3/pthread_setaffinity_np.3:179
1481 #: build/C/man3/pthread_setschedparam.3:244 build/C/man3/pthread_sigmask.3:110
1482 #, no-wrap
1483 msgid ""
1484 "#define handle_error_en(en, msg) \\e\n"
1485 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1486 msgstr ""
1487 "#define handle_error_en(en, msg) \\e\n"
1488 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1489
1490 #. type: Plain text
1491 #: build/C/man3/pthread_attr_init.3:168
1492 #, no-wrap
1493 msgid ""
1494 "static void\n"
1495 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1496 "{\n"
1497 "    int s, i;\n"
1498 "    size_t v;\n"
1499 "    void *stkaddr;\n"
1500 "    struct sched_param sp;\n"
1501 msgstr ""
1502 "static void\n"
1503 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1504 "{\n"
1505 "    int s, i;\n"
1506 "    size_t v;\n"
1507 "    void *stkaddr;\n"
1508 "    struct sched_param sp;\n"
1509
1510 #. type: Plain text
1511 #: build/C/man3/pthread_attr_init.3:176
1512 #, no-wrap
1513 msgid ""
1514 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1515 "    if (s != 0)\n"
1516 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1517 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1518 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1519 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1520 "            \"???\");\n"
1521 msgstr ""
1522 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1523 "    if (s != 0)\n"
1524 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1525 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1526 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1527 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1528 "            \"???\");\n"
1529
1530 #. type: Plain text
1531 #: build/C/man3/pthread_attr_init.3:184
1532 #, no-wrap
1533 msgid ""
1534 "    s = pthread_attr_getscope(attr, &i);\n"
1535 "    if (s != 0)\n"
1536 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1537 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1538 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1539 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1540 "            \"???\");\n"
1541 msgstr ""
1542 "    s = pthread_attr_getscope(attr, &i);\n"
1543 "    if (s != 0)\n"
1544 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1545 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1546 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1547 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1548 "            \"???\");\n"
1549
1550 #. type: Plain text
1551 #: build/C/man3/pthread_attr_init.3:192
1552 #, no-wrap
1553 msgid ""
1554 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1555 "    if (s != 0)\n"
1556 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1557 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1558 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1559 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1560 "            \"???\");\n"
1561 msgstr ""
1562 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1563 "    if (s != 0)\n"
1564 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1565 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1566 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1567 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1568 "            \"???\");\n"
1569
1570 #. type: Plain text
1571 #: build/C/man3/pthread_attr_init.3:201
1572 #, no-wrap
1573 msgid ""
1574 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1575 "    if (s != 0)\n"
1576 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1577 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1578 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1579 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1580 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1581 "            \"???\");\n"
1582 msgstr ""
1583 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1584 "    if (s != 0)\n"
1585 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1586 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1587 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1588 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1589 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1590 "            \"???\");\n"
1591
1592 #. type: Plain text
1593 #: build/C/man3/pthread_attr_init.3:206
1594 #, no-wrap
1595 msgid ""
1596 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1597 "    if (s != 0)\n"
1598 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1599 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1600 msgstr ""
1601 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1602 "    if (s != 0)\n"
1603 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1604 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1605
1606 #. type: Plain text
1607 #: build/C/man3/pthread_attr_init.3:211
1608 #, no-wrap
1609 msgid ""
1610 "    s = pthread_attr_getguardsize(attr, &v);\n"
1611 "    if (s != 0)\n"
1612 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1613 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1614 msgstr ""
1615 "    s = pthread_attr_getguardsize(attr, &v);\n"
1616 "    if (s != 0)\n"
1617 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1618 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1619
1620 #. type: Plain text
1621 #: build/C/man3/pthread_attr_init.3:218
1622 #, no-wrap
1623 msgid ""
1624 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1625 "    if (s != 0)\n"
1626 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1627 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1628 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1629 "}\n"
1630 msgstr ""
1631 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1632 "    if (s != 0)\n"
1633 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1634 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1635 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1636 "}\n"
1637
1638 #. type: Plain text
1639 #: build/C/man3/pthread_attr_init.3:224
1640 #, no-wrap
1641 msgid ""
1642 "static void *\n"
1643 "thread_start(void *arg)\n"
1644 "{\n"
1645 "    int s;\n"
1646 "    pthread_attr_t gattr;\n"
1647 msgstr ""
1648 "static void *\n"
1649 "thread_start(void *arg)\n"
1650 "{\n"
1651 "    int s;\n"
1652 "    pthread_attr_t gattr;\n"
1653
1654 #. type: Plain text
1655 #: build/C/man3/pthread_attr_init.3:228
1656 #, no-wrap
1657 msgid ""
1658 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1659 "       retrieves the attributes of the thread specified in its\n"
1660 "       first argument */\n"
1661 msgstr ""
1662 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1663 "       retrieves the attributes of the thread specified in its\n"
1664 "       first argument */\n"
1665
1666 #. type: Plain text
1667 #: build/C/man3/pthread_attr_init.3:232
1668 #, no-wrap
1669 msgid ""
1670 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1671 "    if (s != 0)\n"
1672 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1673 msgstr ""
1674 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1675 "    if (s != 0)\n"
1676 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1677
1678 #. type: Plain text
1679 #: build/C/man3/pthread_attr_init.3:235
1680 #, no-wrap
1681 msgid ""
1682 "    printf(\"Thread attributes:\\en\");\n"
1683 "    display_pthread_attr(&gattr, \"\\et\");\n"
1684 msgstr ""
1685 "    printf(\"Thread attributes:\\en\");\n"
1686 "    display_pthread_attr(&gattr, \"\\et\");\n"
1687
1688 #. type: Plain text
1689 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1690 #, no-wrap
1691 msgid ""
1692 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1693 "}\n"
1694 msgstr ""
1695 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1696 "}\n"
1697
1698 #. type: Plain text
1699 #: build/C/man3/pthread_attr_init.3:246
1700 #, no-wrap
1701 msgid ""
1702 "int\n"
1703 "main(int argc, char *argv[])\n"
1704 "{\n"
1705 "    pthread_t thr;\n"
1706 "    pthread_attr_t attr;\n"
1707 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1708 "    int s;\n"
1709 msgstr ""
1710 "int\n"
1711 "main(int argc, char *argv[])\n"
1712 "{\n"
1713 "    pthread_t thr;\n"
1714 "    pthread_attr_t attr;\n"
1715 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1716 "    int s;\n"
1717
1718 #. type: Plain text
1719 #: build/C/man3/pthread_attr_init.3:248
1720 #: build/C/man3/pthread_setschedparam.3:362
1721 #, no-wrap
1722 msgid "    attrp = NULL;\n"
1723 msgstr "    attrp = NULL;\n"
1724
1725 #. type: Plain text
1726 #: build/C/man3/pthread_attr_init.3:252
1727 #, no-wrap
1728 msgid ""
1729 "    /* If a command-line argument was supplied, use it to set the\n"
1730 "       stack-size attribute and set a few other thread attributes,\n"
1731 "       and set attrp pointing to thread attributes object */\n"
1732 msgstr ""
1733 "    /* If a command-line argument was supplied, use it to set the\n"
1734 "       stack-size attribute and set a few other thread attributes,\n"
1735 "       and set attrp pointing to thread attributes object */\n"
1736
1737 #. type: Plain text
1738 #: build/C/man3/pthread_attr_init.3:256
1739 #, no-wrap
1740 msgid ""
1741 "    if (argc E<gt> 1) {\n"
1742 "        int stack_size;\n"
1743 "        void *sp;\n"
1744 msgstr ""
1745 "    if (argc E<gt> 1) {\n"
1746 "        int stack_size;\n"
1747 "        void *sp;\n"
1748
1749 #. type: Plain text
1750 #: build/C/man3/pthread_attr_init.3:258
1751 #, no-wrap
1752 msgid "        attrp = &attr;\n"
1753 msgstr "        attrp = &attr;\n"
1754
1755 #. type: Plain text
1756 #: build/C/man3/pthread_attr_init.3:262
1757 #, no-wrap
1758 msgid ""
1759 "        s = pthread_attr_init(&attr);\n"
1760 "        if (s != 0)\n"
1761 "            handle_error_en(s, \"pthread_attr_init\");\n"
1762 msgstr ""
1763 "        s = pthread_attr_init(&attr);\n"
1764 "        if (s != 0)\n"
1765 "            handle_error_en(s, \"pthread_attr_init\");\n"
1766
1767 #. type: Plain text
1768 #: build/C/man3/pthread_attr_init.3:266
1769 #, no-wrap
1770 msgid ""
1771 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1772 "        if (s != 0)\n"
1773 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1774 msgstr ""
1775 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1776 "        if (s != 0)\n"
1777 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1778
1779 #. type: Plain text
1780 #: build/C/man3/pthread_attr_init.3:270
1781 #, no-wrap
1782 msgid ""
1783 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1784 "        if (s != 0)\n"
1785 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1786 msgstr ""
1787 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1788 "        if (s != 0)\n"
1789 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1790
1791 #. type: Plain text
1792 #: build/C/man3/pthread_attr_init.3:272
1793 #, no-wrap
1794 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1795 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1796
1797 #. type: Plain text
1798 #: build/C/man3/pthread_attr_init.3:276
1799 #, no-wrap
1800 msgid ""
1801 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1802 "        if (s != 0)\n"
1803 "            handle_error_en(s, \"posix_memalign\");\n"
1804 msgstr ""
1805 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1806 "        if (s != 0)\n"
1807 "            handle_error_en(s, \"posix_memalign\");\n"
1808
1809 #. type: Plain text
1810 #: build/C/man3/pthread_attr_init.3:278
1811 #, no-wrap
1812 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1813 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1814
1815 #. type: Plain text
1816 #: build/C/man3/pthread_attr_init.3:283
1817 #, no-wrap
1818 msgid ""
1819 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1820 "        if (s != 0)\n"
1821 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1822 "    }\n"
1823 msgstr ""
1824 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1825 "        if (s != 0)\n"
1826 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1827 "    }\n"
1828
1829 #. type: Plain text
1830 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1831 #, no-wrap
1832 msgid ""
1833 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1834 "    if (s != 0)\n"
1835 "        handle_error_en(s, \"pthread_create\");\n"
1836 msgstr ""
1837 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1838 "    if (s != 0)\n"
1839 "        handle_error_en(s, \"pthread_create\");\n"
1840
1841 #. type: Plain text
1842 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1843 #, no-wrap
1844 msgid ""
1845 "    if (attrp != NULL) {\n"
1846 "        s = pthread_attr_destroy(attrp);\n"
1847 "        if (s != 0)\n"
1848 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1849 "    }\n"
1850 msgstr ""
1851 "    if (attrp != NULL) {\n"
1852 "        s = pthread_attr_destroy(attrp);\n"
1853 "        if (s != 0)\n"
1854 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1855 "    }\n"
1856
1857 #. type: Plain text
1858 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1859 #, no-wrap
1860 msgid ""
1861 "    pause();    /* Terminates when other thread calls exit() */\n"
1862 "}\n"
1863 msgstr ""
1864 "    pause();    /* Terminates when other thread calls exit() */\n"
1865 "}\n"
1866
1867 #. type: Plain text
1868 #: build/C/man3/pthread_attr_init.3:313
1869 msgid ""
1870 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1871 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1872 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1873 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1874 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1875 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1876 msgstr ""
1877 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1878 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1879 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1880 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1881 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1882 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1883
1884 #. type: TH
1885 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1886 #, no-wrap
1887 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1888 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1889
1890 #. type: Plain text
1891 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1892 msgid ""
1893 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1894 "affinity attribute in thread attributes object"
1895 msgstr ""
1896 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1897 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1898
1899 #. type: Plain text
1900 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1901 #: build/C/man3/pthread_getattr_np.3:33
1902 #: build/C/man3/pthread_setaffinity_np.3:34
1903 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1904 #, no-wrap
1905 msgid ""
1906 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1907 "B<#include E<lt>pthread.hE<gt>>\n"
1908 msgstr ""
1909 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1910 "B<#include E<lt>pthread.hE<gt>>\n"
1911
1912 #. type: Plain text
1913 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1914 #, fuzzy, no-wrap
1915 #| msgid ""
1916 #| "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1917 #| "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1918 #| "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1919 #| "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1920 msgid ""
1921 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1922 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1923 "B<int pthread_attr_getaffinity_np(const pthread_attr_t *>I<attr>B<,>\n"
1924 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1925 msgstr ""
1926 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1927 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1928 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1929 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1930
1931 #. type: Plain text
1932 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1933 msgid ""
1934 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1935 "attribute of the thread attributes object referred to by I<attr> to the "
1936 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1937 "mask of a thread created using the thread attributes object I<attr>."
1938 msgstr ""
1939 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1940 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1941 "I<cpuset> で指定された値に設定する。\n"
1942 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1943 "作成されたスレッドの CPU affinity マスクが決定される。"
1944
1945 #. type: Plain text
1946 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1947 msgid ""
1948 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1949 "attribute of the thread attributes object referred to by I<attr> in the "
1950 "buffer pointed to by I<cpuset>."
1951 msgstr ""
1952 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1953 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1954 "I<cpuset> が指すバッファに入れて返す。"
1955
1956 #. type: Plain text
1957 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1958 msgid ""
1959 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1960 "by I<cpuset>.  Typically, this argument would be specified as "
1961 "I<sizeof(cpu_set_t)>."
1962 msgstr ""
1963 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1964 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1965 "指定することだろう。"
1966
1967 #. type: Plain text
1968 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1969 #: build/C/man3/pthread_setaffinity_np.3:67
1970 msgid ""
1971 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1972 "description of a set of macros that can be used to manipulate and inspect "
1973 "CPU sets, see B<CPU_SET>(3)."
1974 msgstr ""
1975 "CPU affinity マスクの詳細については、 \n"
1976 "B<sched_setaffinity>(2) を参照してほしい。\n"
1977 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1978 "B<CPU_SET>(3) を参照してほしい。"
1979
1980 #. type: TP
1981 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1982 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1983 #: build/C/man3/pthread_attr_setdetachstate.3:83
1984 #: build/C/man3/pthread_attr_setinheritsched.3:99
1985 #: build/C/man3/pthread_attr_setschedpolicy.3:89
1986 #: build/C/man3/pthread_attr_setscope.3:109
1987 #: build/C/man3/pthread_attr_setstack.3:91
1988 #: build/C/man3/pthread_attr_setstacksize.3:67
1989 #: build/C/man3/pthread_create.3:144 build/C/man3/pthread_detach.3:55
1990 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1991 #: build/C/man3/pthread_kill.3:69 build/C/man3/pthread_setaffinity_np.3:84
1992 #: build/C/man3/pthread_setaffinity_np.3:93
1993 #: build/C/man3/pthread_setaffinity_np.3:109
1994 #: build/C/man3/pthread_setcancelstate.3:99
1995 #: build/C/man3/pthread_setcancelstate.3:107
1996 #: build/C/man3/pthread_setconcurrency.3:71
1997 #: build/C/man3/pthread_setschedparam.3:122
1998 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:78
1999 #, no-wrap
2000 msgid "B<EINVAL>"
2001 msgstr "B<EINVAL>"
2002
2003 #.  cpumask_t
2004 #.  The raw sched_getaffinity() system call returns the size (in bytes)
2005 #.  of the cpumask_t type.
2006 #. type: Plain text
2007 #: build/C/man3/pthread_attr_setaffinity_np.3:92
2008 msgid ""
2009 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
2010 "outside the set supported by the kernel.  (The kernel configuration option "
2011 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
2012 "type used to represent CPU sets.)"
2013 msgstr ""
2014 "(B<pthread_attr_setaffinity_np>())\n"
2015 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
2016 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
2017 "は、\n"
2018 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
2019
2020 #. type: Plain text
2021 #: build/C/man3/pthread_attr_setaffinity_np.3:102
2022 msgid ""
2023 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
2024 "attributes object referred to by I<attr> lies outside the range specified by "
2025 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
2026 msgstr ""
2027 "(B<pthread_attr_getaffinity_np>())\n"
2028 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
2029 "I<cpusetsize> により指定された範囲の中になかった\n"
2030 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
2031
2032 #. type: Plain text
2033 #: build/C/man3/pthread_attr_setaffinity_np.3:106
2034 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
2035 msgstr ""
2036 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
2037
2038 #. type: Plain text
2039 #: build/C/man3/pthread_attr_setaffinity_np.3:108
2040 #: build/C/man3/pthread_setaffinity_np.3:121
2041 msgid "These functions are provided by glibc since version 2.3.4."
2042 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
2043
2044 #. type: Plain text
2045 #: build/C/man3/pthread_attr_setaffinity_np.3:111
2046 #: build/C/man3/pthread_cleanup_push_defer_np.3:117
2047 #: build/C/man3/pthread_setaffinity_np.3:131
2048 #: build/C/man3/pthread_tryjoin_np.3:115
2049 msgid ""
2050 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
2051 "\" (nonportable) in the names."
2052 msgstr ""
2053 "これらの関数は非標準の GNU による拡張である。\n"
2054 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
2055 "付いている。"
2056
2057 #. type: Plain text
2058 #: build/C/man3/pthread_attr_setaffinity_np.3:118
2059 #: build/C/man3/pthread_setaffinity_np.3:157
2060 msgid ""
2061 "In glibc 2.3.3 only, versions of these functions were provided that did not "
2062 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
2063 "underlying system calls was always I<sizeof(cpu_set_t)>."
2064 msgstr ""
2065 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
2066 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
2067 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
2068 "常に I<sizeof(cpu_set_t)> であった。"
2069
2070 #. type: Plain text
2071 #: build/C/man3/pthread_attr_setaffinity_np.3:124
2072 msgid ""
2073 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), "
2074 "B<pthread_setaffinity_np>(3), B<cpuset>(7), B<pthreads>(7)"
2075 msgstr ""
2076 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), "
2077 "B<pthread_setaffinity_np>(3), B<cpuset>(7), B<pthreads>(7)"
2078
2079 #. type: TH
2080 #: build/C/man3/pthread_attr_setdetachstate.3:26
2081 #, no-wrap
2082 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2083 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2084
2085 #. type: Plain text
2086 #: build/C/man3/pthread_attr_setdetachstate.3:30
2087 msgid ""
2088 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2089 "state attribute in thread attributes object"
2090 msgstr ""
2091 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2092 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2093
2094 #. type: Plain text
2095 #: build/C/man3/pthread_attr_setdetachstate.3:38
2096 #, fuzzy, no-wrap
2097 #| msgid ""
2098 #| "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2099 #| "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2100 msgid ""
2101 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2102 "B<int pthread_attr_getdetachstate(const pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2103 msgstr ""
2104 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2105 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2106
2107 #. type: Plain text
2108 #: build/C/man3/pthread_attr_setdetachstate.3:53
2109 msgid ""
2110 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2111 "attribute of the thread attributes object referred to by I<attr> to the "
2112 "value specified in I<detachstate>.  The detach state attribute determines "
2113 "whether a thread created using the thread attributes object I<attr> will be "
2114 "created in a joinable or a detached state."
2115 msgstr ""
2116 "B<pthread_attr_setdetachstate>() 関数は、\n"
2117 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2118 "I<detachstate> で指定された値に設定する。\n"
2119 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2120 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2121 "detached (切り離された) 状態で作成されるかが決定される。"
2122
2123 #. type: Plain text
2124 #: build/C/man3/pthread_attr_setdetachstate.3:56
2125 msgid "The following values may be specified in I<detachstate>:"
2126 msgstr "I<detachstate> には以下の値を指定できる。"
2127
2128 #. type: TP
2129 #: build/C/man3/pthread_attr_setdetachstate.3:56
2130 #, no-wrap
2131 msgid "B<PTHREAD_CREATE_DETACHED>"
2132 msgstr "B<PTHREAD_CREATE_DETACHED>"
2133
2134 #. type: Plain text
2135 #: build/C/man3/pthread_attr_setdetachstate.3:61
2136 msgid ""
2137 "Threads that are created using I<attr> will be created in a detached state."
2138 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2139
2140 #. type: TP
2141 #: build/C/man3/pthread_attr_setdetachstate.3:61
2142 #, no-wrap
2143 msgid "B<PTHREAD_CREATE_JOINABLE>"
2144 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2145
2146 #. type: Plain text
2147 #: build/C/man3/pthread_attr_setdetachstate.3:66
2148 msgid ""
2149 "Threads that are created using I<attr> will be created in a joinable state."
2150 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2151
2152 #. type: Plain text
2153 #: build/C/man3/pthread_attr_setdetachstate.3:70
2154 msgid ""
2155 "The default setting of the detach state attribute in a newly initialized "
2156 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2157 msgstr ""
2158 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2159 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2160
2161 #. type: Plain text
2162 #: build/C/man3/pthread_attr_setdetachstate.3:77
2163 msgid ""
2164 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2165 "the thread attributes object I<attr> in the buffer pointed to by "
2166 "I<detachstate>."
2167 msgstr ""
2168 "B<pthread_attr_getdetachstate>() は、\n"
2169 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2170 "I<detachstate> が指すバッファに入れて返す。"
2171
2172 #. type: Plain text
2173 #: build/C/man3/pthread_attr_setdetachstate.3:83
2174 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2175 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2176
2177 #. type: Plain text
2178 #: build/C/man3/pthread_attr_setdetachstate.3:87
2179 msgid "An invalid value was specified in I<detachstate>."
2180 msgstr "無効な値が I<detachstate> で指定された。"
2181
2182 #. type: Plain text
2183 #: build/C/man3/pthread_attr_setdetachstate.3:94
2184 msgid ""
2185 "The B<pthread_attr_setdetachstate>()  and B<pthread_attr_getdetachstate>()  "
2186 "functions are thread-safe."
2187 msgstr ""
2188 "関数 B<pthread_attr_setdetachstate>() と B<pthread_attr_getdetachstate>() は"
2189 "スレッドセーフである。"
2190
2191 #. type: Plain text
2192 #: build/C/man3/pthread_attr_setdetachstate.3:100
2193 msgid ""
2194 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2195 msgstr ""
2196 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2197 "B<pthread_create>(3) を参照。"
2198
2199 #. type: Plain text
2200 #: build/C/man3/pthread_attr_setdetachstate.3:108
2201 msgid ""
2202 "A thread that is created in a joinable state should eventually either be "
2203 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2204 "B<pthread_create>(3)."
2205 msgstr ""
2206 "join 可能状態で作成されたスレッドは、最終的に\n"
2207 "B<pthread_join>(3) を使って join するか、\n"
2208 "B<pthread_detach>(3) を使って切り離すか、\n"
2209 "のどちらかを行うべきである。"
2210
2211 #. type: Plain text
2212 #: build/C/man3/pthread_attr_setdetachstate.3:115
2213 msgid ""
2214 "It is an error to specify the thread ID of a thread that was created in a "
2215 "detached state in a later call to B<pthread_detach>(3)  or "
2216 "B<pthread_join>(3)."
2217 msgstr ""
2218 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2219 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2220 "エラーである。"
2221
2222 #. type: Plain text
2223 #: build/C/man3/pthread_attr_setdetachstate.3:118
2224 #: build/C/man3/pthread_attr_setstack.3:162
2225 msgid "See B<pthread_attr_init>(3)."
2226 msgstr "B<pthread_attr_init>(3) を参照。"
2227
2228 #. type: Plain text
2229 #: build/C/man3/pthread_attr_setdetachstate.3:124
2230 msgid ""
2231 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2232 "B<pthread_join>(3), B<pthreads>(7)"
2233 msgstr ""
2234 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2235 "B<pthread_join>(3), B<pthreads>(7)"
2236
2237 #. type: TH
2238 #: build/C/man3/pthread_attr_setguardsize.3:26
2239 #, no-wrap
2240 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2241 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2242
2243 #. type: Plain text
2244 #: build/C/man3/pthread_attr_setguardsize.3:30
2245 msgid ""
2246 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2247 "attribute in thread attributes object"
2248 msgstr ""
2249 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2250 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2251
2252 #. type: Plain text
2253 #: build/C/man3/pthread_attr_setguardsize.3:38
2254 #, fuzzy, no-wrap
2255 #| msgid ""
2256 #| "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2257 #| "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2258 msgid ""
2259 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2260 "B<int pthread_attr_getguardsize(const pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2261 msgstr ""
2262 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2263 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2264
2265 #. type: Plain text
2266 #: build/C/man3/pthread_attr_setguardsize.3:49
2267 msgid ""
2268 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2269 "of the thread attributes object referred to by I<attr> to the value "
2270 "specified in I<guardsize>."
2271 msgstr ""
2272 "B<pthread_attr_setguardsize>() 関数は、\n"
2273 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2274 "I<guardsize> で指定された値に設定する。"
2275
2276 #. type: Plain text
2277 #: build/C/man3/pthread_attr_setguardsize.3:59
2278 msgid ""
2279 "If I<guardsize> is greater than 0, then for each new thread created using "
2280 "I<attr> the system allocates an additional region of at least I<guardsize> "
2281 "bytes at the end of the thread's stack to act as the guard area for the "
2282 "stack (but see BUGS)."
2283 msgstr ""
2284 "I<guardsize> が 0 より大きい場合、\n"
2285 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2286 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2287 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2288 "機能する (ただし「バグ」の節も参照)。"
2289
2290 #. type: Plain text
2291 #: build/C/man3/pthread_attr_setguardsize.3:65
2292 msgid ""
2293 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2294 "guard area."
2295 msgstr ""
2296 "I<guardsize> が 0 の場合、\n"
2297 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2298
2299 #. type: Plain text
2300 #: build/C/man3/pthread_attr_setguardsize.3:67
2301 msgid "The default guard size is the same as the system page size."
2302 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2303
2304 #. type: Plain text
2305 #: build/C/man3/pthread_attr_setguardsize.3:82
2306 msgid ""
2307 "If the stack address attribute has been set in I<attr> (using "
2308 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2309 "that the caller is allocating the thread's stack, then the guard size "
2310 "attribute is ignored (i.e., no guard area is created by the system): it is "
2311 "the application's responsibility to handle stack overflow (perhaps by using "
2312 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2313 "it has allocated)."
2314 msgstr ""
2315 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2316 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2317 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2318 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2319 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2320 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2321 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2322
2323 #. type: Plain text
2324 #: build/C/man3/pthread_attr_setguardsize.3:90
2325 msgid ""
2326 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2327 "attribute of the thread attributes object referred to by I<attr> in the "
2328 "buffer pointed to by I<guardsize>."
2329 msgstr ""
2330 "B<pthread_attr_getguardsize>() は、\n"
2331 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2332 "I<guardsize> が指すバッファに入れて返す。"
2333
2334 #. type: Plain text
2335 #: build/C/man3/pthread_attr_setguardsize.3:104
2336 msgid ""
2337 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2338 "invalid.  On Linux these functions always succeed (but portable and future-"
2339 "proof applications should nevertheless handle a possible error return)."
2340 msgstr ""
2341 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2342 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2343 "Linux では、これらの関数は常に成功する\n"
2344 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2345 "正のエラーの返り値を処理するようにすべきである)。"
2346
2347 #. type: Plain text
2348 #: build/C/man3/pthread_attr_setguardsize.3:106
2349 #: build/C/man3/pthread_attr_setstackaddr.3:83
2350 #: build/C/man3/pthread_attr_setstacksize.3:83
2351 msgid "These functions are provided by glibc since version 2.1."
2352 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2353
2354 #. type: Plain text
2355 #: build/C/man3/pthread_attr_setguardsize.3:113
2356 msgid ""
2357 "The B<pthread_attr_setguardsize>()  and B<pthread_attr_getguardsize>()  "
2358 "functions are thread-safe."
2359 msgstr ""
2360 "関数 B<pthread_attr_setguardsize>() と B<pthread_attr_getguardsize>() はス"
2361 "レッドセーフである。"
2362
2363 #. type: Plain text
2364 #: build/C/man3/pthread_attr_setguardsize.3:129
2365 msgid ""
2366 "A guard area consists of virtual memory pages that are protected to prevent "
2367 "read and write access.  If a thread overflows its stack into the guard area, "
2368 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2369 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2370 "guard size is internally rounded up to the system page size when creating a "
2371 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2372 "size that was set by B<pthread_attr_setguardsize>().)"
2373 msgstr ""
2374 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2375 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2376 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2377 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2378 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2379 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2380 "(その場合も B<pthread_attr_getguardsize>() では\n"
2381 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2382
2383 #. type: Plain text
2384 #: build/C/man3/pthread_attr_setguardsize.3:133
2385 msgid ""
2386 "Setting a guard size of 0 may be useful to save memory in an application "
2387 "that creates many threads and knows that stack overflow can never occur."
2388 msgstr ""
2389 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2390 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2391 "することで、メモリを節約できることもある。"
2392
2393 #. type: Plain text
2394 #: build/C/man3/pthread_attr_setguardsize.3:137
2395 msgid ""
2396 "Choosing a guard size larger than the default size may be necessary for "
2397 "detecting stack overflows if a thread allocates large data structures on the "
2398 "stack."
2399 msgstr ""
2400 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2401 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2402 "大きな guard size を選ぶ必要があるかもしれない。"
2403
2404 #. type: SH
2405 #: build/C/man3/pthread_attr_setguardsize.3:137
2406 #: build/C/man3/pthread_attr_setinheritsched.3:119
2407 #: build/C/man3/pthread_attr_setstacksize.3:103
2408 #: build/C/man3/pthread_create.3:203 build/C/man3/pthread_exit.3:98
2409 #, no-wrap
2410 msgid "BUGS"
2411 msgstr "バグ"
2412
2413 #. type: Plain text
2414 #: build/C/man3/pthread_attr_setguardsize.3:148
2415 msgid ""
2416 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2417 "within the stack size allocation, rather than allocating extra space at the "
2418 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2419 "error from B<pthread_create>(3)  if the guard size value is too large, "
2420 "leaving no space for the actual stack.)"
2421 msgstr ""
2422 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2423 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2424 "末尾に追加の領域を割り当てることが求められている。\n"
2425 "(このため、ガード領域が大きすぎて、\n"
2426 "実際のスタック用の場所がなくなってしまう場合、\n"
2427 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2428
2429 #.  glibc includes the guardsize within the allocated stack size,
2430 #.  which looks pretty clearly to be in violation of POSIX.
2431 #.  Filed bug, 22 Oct 2008:
2432 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2433 #.  Older reports:
2434 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2435 #.  Reportedly, LinuxThreads did the right thing, allocating
2436 #.  extra space at the end of the stack:
2437 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2438 #. type: Plain text
2439 #: build/C/man3/pthread_attr_setguardsize.3:162
2440 msgid ""
2441 "The obsolete LinuxThreads implementation did the right thing, allocating "
2442 "extra space at the end of the stack for the guard area."
2443 msgstr ""
2444 "廃止予定の LinuxThreads 実装では、\n"
2445 "POSIX.1 で求められている通りの動作で、\n"
2446 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2447
2448 #. type: Plain text
2449 #: build/C/man3/pthread_attr_setguardsize.3:165
2450 msgid "See B<pthread_getattr_np>(3)."
2451 msgstr "B<pthread_getattr_np>(3) を参照。"
2452
2453 #. type: Plain text
2454 #: build/C/man3/pthread_attr_setguardsize.3:173
2455 msgid ""
2456 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), "
2457 "B<pthread_attr_setstack>(3), B<pthread_attr_setstacksize>(3), "
2458 "B<pthread_create>(3), B<pthreads>(7)"
2459 msgstr ""
2460 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), "
2461 "B<pthread_attr_setstack>(3), B<pthread_attr_setstacksize>(3), "
2462 "B<pthread_create>(3), B<pthreads>(7)"
2463
2464 #. type: TH
2465 #: build/C/man3/pthread_attr_setinheritsched.3:26
2466 #, no-wrap
2467 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2468 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2469
2470 #. type: TH
2471 #: build/C/man3/pthread_attr_setinheritsched.3:26
2472 #: build/C/man3/pthread_attr_setschedparam.3:26
2473 #: build/C/man3/pthread_attr_setschedpolicy.3:26 build/C/man7/pthreads.7:26
2474 #, no-wrap
2475 msgid "2014-05-21"
2476 msgstr "2014-05-21"
2477
2478 #. type: Plain text
2479 #: build/C/man3/pthread_attr_setinheritsched.3:30
2480 msgid ""
2481 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit-"
2482 "scheduler attribute in thread attributes object"
2483 msgstr ""
2484 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - スレッド属性オブ"
2485 "ジェクトの inherit-scheduler 属性の設定/取得を行う"
2486
2487 #. type: Plain text
2488 #: build/C/man3/pthread_attr_setinheritsched.3:38
2489 #, fuzzy, no-wrap
2490 #| msgid ""
2491 #| "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2492 #| "B<                                 int >I<inheritsched>B<);>\n"
2493 #| "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2494 #| "B<                                 int *>I<inheritsched>B<);>\n"
2495 msgid ""
2496 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2497 "B<                                 int >I<inheritsched>B<);>\n"
2498 "B<int pthread_attr_getinheritsched(const pthread_attr_t *>I<attr>B<,>\n"
2499 "B<                                 int *>I<inheritsched>B<);>\n"
2500 msgstr ""
2501 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2502 "B<                                 int >I<inheritsched>B<);>\n"
2503 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2504 "B<                                 int *>I<inheritsched>B<);>\n"
2505
2506 #. type: Plain text
2507 #: build/C/man3/pthread_attr_setinheritsched.3:55
2508 msgid ""
2509 "The B<pthread_attr_setinheritsched>()  function sets the inherit-scheduler "
2510 "attribute of the thread attributes object referred to by I<attr> to the "
2511 "value specified in I<inheritsched>.  The inherit-scheduler attribute "
2512 "determines whether a thread created using the thread attributes object "
2513 "I<attr> will inherit its scheduling attributes from the calling thread or "
2514 "whether it will take them from I<attr>."
2515 msgstr ""
2516 "B<pthread_attr_setinheritsched>() 関数は、 I<attr> が参照するスレッド属性オブ"
2517 "ジェクトの inherit-scheduler 属性を I<inheritsched> で指定された値に設定す"
2518 "る。 inherit-scheduler 属性により、スレッド属性オブジェクト I<attr> を使って"
2519 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承するか、 "
2520 "I<attr> からスケジューリング属性を取得するかが決定される。"
2521
2522 #. type: Plain text
2523 #: build/C/man3/pthread_attr_setinheritsched.3:64
2524 msgid ""
2525 "The following scheduling attributes are affected by the inherit-scheduler "
2526 "attribute: scheduling policy (B<pthread_attr_setschedpolicy>(3)), scheduling "
2527 "priority (B<pthread_attr_setschedparam>(3)), and contention scope "
2528 "(B<pthread_attr_setscope>(3))."
2529 msgstr ""
2530 "次に挙げるスケジューリング属性は inherit-scheduler 属性の影響を受ける: スケ"
2531 "ジューリングポリシー (B<pthread_attr_setschedpolicy>(3))、 スケジューリング優"
2532 "先度 (B<pthread_attr_setschedparam>(3))、 contention scope "
2533 "(B<pthread_attr_setscope>(3))。"
2534
2535 #. type: Plain text
2536 #: build/C/man3/pthread_attr_setinheritsched.3:67
2537 msgid "The following values may be specified in I<inheritsched>:"
2538 msgstr "以下の値を I<inheritsched> に指定できる。"
2539
2540 #. type: TP
2541 #: build/C/man3/pthread_attr_setinheritsched.3:67
2542 #, no-wrap
2543 msgid "B<PTHREAD_INHERIT_SCHED>"
2544 msgstr "B<PTHREAD_INHERIT_SCHED>"
2545
2546 #. type: Plain text
2547 #: build/C/man3/pthread_attr_setinheritsched.3:75
2548 msgid ""
2549 "Threads that are created using I<attr> inherit scheduling attributes from "
2550 "the creating thread; the scheduling attributes in I<attr> are ignored."
2551 msgstr ""
2552 "I<attr> を使って作成されたスレッドは、\n"
2553 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2554 "I<attr> 内のスケジューリング属性は無視される。"
2555
2556 #. type: TP
2557 #: build/C/man3/pthread_attr_setinheritsched.3:75
2558 #, no-wrap
2559 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2560 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2561
2562 #.  FIXME what are the defaults for scheduler settings?
2563 #. type: Plain text
2564 #: build/C/man3/pthread_attr_setinheritsched.3:82
2565 msgid ""
2566 "Threads that are created using I<attr> take their scheduling attributes from "
2567 "the values specified by the attributes object."
2568 msgstr ""
2569 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2570 "指定された値からスケジューリング属性を取得する。"
2571
2572 #. type: Plain text
2573 #: build/C/man3/pthread_attr_setinheritsched.3:86
2574 msgid ""
2575 "The default setting of the inherit-scheduler attribute in a newly "
2576 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2577 msgstr ""
2578 "新たに初期化されたスレッド属性オブジェクトの inherit-scheduler 属性のデフォル"
2579 "ト設定は B<PTHREAD_INHERIT_SCHED> である。"
2580
2581 #. type: Plain text
2582 #: build/C/man3/pthread_attr_setinheritsched.3:93
2583 msgid ""
2584 "The B<pthread_attr_getinheritsched>()  returns the inherit-scheduler "
2585 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2586 "by I<inheritsched>."
2587 msgstr ""
2588 "B<pthread_attr_getinheritsched>() は、 スレッド属性オブジェクト I<attr> の "
2589 "inherit-scheduler 属性を I<inheritsched> が指すバッファに入れて返す。"
2590
2591 #. type: Plain text
2592 #: build/C/man3/pthread_attr_setinheritsched.3:99
2593 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2594 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2595
2596 #. type: Plain text
2597 #: build/C/man3/pthread_attr_setinheritsched.3:103
2598 msgid "Invalid value in I<inheritsched>."
2599 msgstr "I<inheritsched> に無効な値が指定された。"
2600
2601 #.  .SH VERSIONS
2602 #.  Available since glibc 2.0.
2603 #. type: Plain text
2604 #: build/C/man3/pthread_attr_setinheritsched.3:110
2605 msgid ""
2606 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2607 "to set the attribute to an unsupported value\") for "
2608 "B<pthread_attr_setinheritsched>()."
2609 msgstr ""
2610 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2611 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2612 "も追加で規定されている。"
2613
2614 #. type: Plain text
2615 #: build/C/man3/pthread_attr_setinheritsched.3:117
2616 msgid ""
2617 "The B<pthread_attr_setinheritsched>()  and "
2618 "B<pthread_attr_getinheritsched>()  functions are thread-safe."
2619 msgstr ""
2620 "関数 B<pthread_attr_setinheritsched>() と B<pthread_attr_getinheritsched>() "
2621 "はスレッドセーフである。"
2622
2623 #.  FIXME . Track status of the following bug:
2624 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2625 #. type: Plain text
2626 #: build/C/man3/pthread_attr_setinheritsched.3:135
2627 msgid ""
2628 "As at glibc 2.8, if a thread attributes object is initialized using "
2629 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2630 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2631 "if the inherit-scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2632 "then a thread created using the attribute object wrongly inherits its "
2633 "scheduling attributes from the creating thread.  This bug does not occur if "
2634 "either the scheduling policy or scheduling priority attribute is explicitly "
2635 "set in the thread attributes object before calling B<pthread_create>(3)."
2636 msgstr ""
2637 "glibc 2.8 の時点では、スレッド属性オブジェクトが B<pthread_attr_init>(3) を"
2638 "使って初期化された場合、 スレッド属性オブジェクトのスケジューリングポリシー"
2639 "が B<SCHED_OTHER> に、 スケジューリング優先度が 0 に設定される。一方、その後 "
2640 "inherit-scheduler 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ"
2641 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するスレッド"
2642 "のスケジューリング属性が間違って継承されてしまう。 B<pthread_create>(3) を呼"
2643 "び出す前にスケジューリングポリシー属性かスケジューリング優先度属性のどちらか"
2644 "が明示的に設定された場合には、 このバグは発生しない。"
2645
2646 #. type: Plain text
2647 #: build/C/man3/pthread_attr_setinheritsched.3:138
2648 #: build/C/man3/pthread_attr_setschedparam.3:116
2649 #: build/C/man3/pthread_attr_setschedpolicy.3:112
2650 msgid "See B<pthread_setschedparam>(3)."
2651 msgstr "B<pthread_setschedparam>(3) を参照。"
2652
2653 #. type: Plain text
2654 #: build/C/man3/pthread_attr_setinheritsched.3:150
2655 msgid ""
2656 "B<pthread_attr_init>(3), B<pthread_attr_setschedparam>(3), "
2657 "B<pthread_attr_setschedpolicy>(3), B<pthread_attr_setscope>(3), "
2658 "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2659 "B<pthread_setschedprio>(3), B<pthreads>,(7)  B<sched>(7)"
2660 msgstr ""
2661 "B<pthread_attr_init>(3), B<pthread_attr_setschedparam>(3), "
2662 "B<pthread_attr_setschedpolicy>(3), B<pthread_attr_setscope>(3), "
2663 "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2664 "B<pthread_setschedprio>(3), B<pthreads>,(7)  B<sched>(7)"
2665
2666 #. type: TH
2667 #: build/C/man3/pthread_attr_setschedparam.3:26
2668 #, no-wrap
2669 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2670 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2671
2672 #. type: Plain text
2673 #: build/C/man3/pthread_attr_setschedparam.3:30
2674 msgid ""
2675 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2676 "parameter attributes in thread attributes object"
2677 msgstr ""
2678 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2679 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2680
2681 #. type: Plain text
2682 #: build/C/man3/pthread_attr_setschedparam.3:38
2683 #, fuzzy, no-wrap
2684 #| msgid ""
2685 #| "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2686 #| "B<                               const struct sched_param *>I<param>B<);>\n"
2687 #| "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2688 #| "B<                               struct sched_param *>I<param>B<);>\n"
2689 msgid ""
2690 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2691 "B<                               const struct sched_param *>I<param>B<);>\n"
2692 "B<int pthread_attr_getschedparam(const pthread_attr_t *>I<attr>B<,>\n"
2693 "B<                               struct sched_param *>I<param>B<);>\n"
2694 msgstr ""
2695 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2696 "B<                               const struct sched_param *>I<param>B<);>\n"
2697 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2698 "B<                               struct sched_param *>I<param>B<);>\n"
2699
2700 #. type: Plain text
2701 #: build/C/man3/pthread_attr_setschedparam.3:52
2702 msgid ""
2703 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2704 "attributes of the thread attributes object referred to by I<attr> to the "
2705 "values specified in the buffer pointed to by I<param>.  These attributes "
2706 "determine the scheduling parameters of a thread created using the thread "
2707 "attributes object I<attr>."
2708 msgstr ""
2709 "B<pthread_attr_setschedparam>() 関数は、\n"
2710 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2711 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2712 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2713 "作成されるスレッドのスケジューリングパラメータが決定される。"
2714
2715 #. type: Plain text
2716 #: build/C/man3/pthread_attr_setschedparam.3:59
2717 msgid ""
2718 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2719 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2720 "by I<param>."
2721 msgstr ""
2722 "B<pthread_attr_getschedparam>() は、\n"
2723 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2724 "I<param> が指すバッファに入れて返す。"
2725
2726 #. type: Plain text
2727 #: build/C/man3/pthread_attr_setschedparam.3:61
2728 msgid "Scheduling parameters are maintained in the following structure:"
2729 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2730
2731 #. type: Plain text
2732 #: build/C/man3/pthread_attr_setschedparam.3:67
2733 #: build/C/man3/pthread_setschedparam.3:69
2734 #, no-wrap
2735 msgid ""
2736 "struct sched_param {\n"
2737 "    int sched_priority;     /* Scheduling priority */\n"
2738 "};\n"
2739 msgstr ""
2740 "struct sched_param {\n"
2741 "    int sched_priority;     /* Scheduling priority */\n"
2742 "};\n"
2743
2744 #. type: Plain text
2745 #: build/C/man3/pthread_attr_setschedparam.3:74
2746 #: build/C/man3/pthread_setschedparam.3:76
2747 msgid ""
2748 "As can be seen, only one scheduling parameter is supported.  For details of "
2749 "the permitted ranges for scheduling priorities in each scheduling policy, "
2750 "see B<sched>(7)."
2751 msgstr ""
2752 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけであ"
2753 "る。各スケジューリングポリシーで許可されるスケジューリング優先度の詳細につい"
2754 "ては、B<sched>(7) を参照のこと。"
2755
2756 #. type: Plain text
2757 #: build/C/man3/pthread_attr_setschedparam.3:85
2758 msgid ""
2759 "In order for the parameter setting made by B<pthread_attr_setschedparam>()  "
2760 "to have effect when calling B<pthread_create>(3), the caller must use "
2761 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2762 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2763 msgstr ""
2764 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedparam>() で行っ"
2765 "たパラメータ設定を有効にするには、 呼び出し側で "
2766 "B<pthread_attr_setinheritsched>(3) を使って 属性オブジェクト I<attr> の "
2767 "inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければなら"
2768 "ない。"
2769
2770 #.  .SH VERSIONS
2771 #.  Available since glibc 2.0.
2772 #. type: Plain text
2773 #: build/C/man3/pthread_attr_setschedparam.3:100
2774 msgid ""
2775 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2776 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2777 "(but portable and future-proof applications should nevertheless handle a "
2778 "possible error return)."
2779 msgstr ""
2780 "POSIX.1 では、\n"
2781 "B<pthread_attr_setschedparam>() について\n"
2782 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2783 "Linux では、これらの関数は常に成功する\n"
2784 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2785 "正のエラーの返り値を処理するようにすべきである)。"
2786
2787 #. type: Plain text
2788 #: build/C/man3/pthread_attr_setschedparam.3:107
2789 msgid ""
2790 "The B<pthread_attr_setschedparam>()  and B<pthread_attr_getschedparam>()  "
2791 "functions are thread-safe."
2792 msgstr ""
2793 "関数 B<pthread_attr_setschedparam>() と B<pthread_attr_getschedparam>() はス"
2794 "レッドセーフである。"
2795
2796 #. type: Plain text
2797 #: build/C/man3/pthread_attr_setschedparam.3:113
2798 msgid ""
2799 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2800 "policies supported on Linux."
2801 msgstr ""
2802 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2803 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2804
2805 #. type: Plain text
2806 #: build/C/man3/pthread_attr_setschedparam.3:128
2807 msgid ""
2808 "B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
2809 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2810 "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2811 "B<pthread_setschedprio>(3), B<pthreads>(7).  B<sched>(7)"
2812 msgstr ""
2813 "B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
2814 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2815 "B<pthread_create>(3), B<pthread_setschedparam>(3), "
2816 "B<pthread_setschedprio>(3), B<pthreads>(7).  B<sched>(7)"
2817
2818 #. type: TH
2819 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2820 #, no-wrap
2821 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2822 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2823
2824 #. type: Plain text
2825 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2826 msgid ""
2827 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2828 "scheduling policy attribute in thread attributes object"
2829 msgstr ""
2830 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2831 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2832
2833 #. type: Plain text
2834 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2835 #, fuzzy, no-wrap
2836 #| msgid ""
2837 #| "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2838 #| "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2839 msgid ""
2840 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2841 "B<int pthread_attr_getschedpolicy(const pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2842 msgstr ""
2843 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2844 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2845
2846 #. type: Plain text
2847 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2848 msgid ""
2849 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2850 "attribute of the thread attributes object referred to by I<attr> to the "
2851 "value specified in I<policy>.  This attribute determines the scheduling "
2852 "policy of a thread created using the thread attributes object I<attr>."
2853 msgstr ""
2854 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2855 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2856 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2857 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2858 "作成されるスレッドのスケジューリングポリシーが決定される。"
2859
2860 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2861 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2862 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2863 #. type: Plain text
2864 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2865 msgid ""
2866 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2867 "B<SCHED_OTHER>, with the semantics described in B<sched>(7)."
2868 msgstr ""
2869 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER> であ"
2870 "る。それぞれの意味は B<sched>(7) で説明している通りである。"
2871
2872 #. type: Plain text
2873 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2874 msgid ""
2875 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2876 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2877 "by I<policy>."
2878 msgstr ""
2879 "B<pthread_attr_getschedpolicy>() は、\n"
2880 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2881 "I<policy> が指すバッファに入れて返す。"
2882
2883 #. type: Plain text
2884 #: build/C/man3/pthread_attr_setschedpolicy.3:83
2885 msgid ""
2886 "In order for the policy setting made by B<pthread_attr_setschedpolicy>()  to "
2887 "have effect when calling B<pthread_create>(3), the caller must use "
2888 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2889 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2890 msgstr ""
2891 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedpolicy>() で行っ"
2892 "たポリシー設定を有効にするには、 呼び出し側で "
2893 "B<pthread_attr_setinheritsched>(3) を使って 属性オブジェクト I<attr> の "
2894 "inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければなら"
2895 "ない。"
2896
2897 #. type: Plain text
2898 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2899 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2900 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2901
2902 #. type: Plain text
2903 #: build/C/man3/pthread_attr_setschedpolicy.3:93
2904 msgid "Invalid value in I<policy>."
2905 msgstr "I<policy> に無効な値が指定された。"
2906
2907 #.  .SH VERSIONS
2908 #.  Available since glibc 2.0.
2909 #. type: Plain text
2910 #: build/C/man3/pthread_attr_setschedpolicy.3:100
2911 msgid ""
2912 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2913 "to set the attribute to an unsupported value\") for "
2914 "B<pthread_attr_setschedpolicy>()."
2915 msgstr ""
2916 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2917 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2918 "も追加で規定されている。"
2919
2920 #. type: Plain text
2921 #: build/C/man3/pthread_attr_setschedpolicy.3:107
2922 msgid ""
2923 "The B<pthread_attr_setschedpolicy>()  and B<pthread_attr_getschedpolicy>()  "
2924 "functions are thread-safe."
2925 msgstr ""
2926 "関数 B<pthread_attr_setschedpolicy>() と B<pthread_attr_getschedpolicy>() は"
2927 "スレッドセーフである。"
2928
2929 #. type: Plain text
2930 #: build/C/man3/pthread_attr_setschedpolicy.3:123
2931 msgid ""
2932 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
2933 "B<pthread_attr_setschedparam>(3), B<pthread_create>(3), "
2934 "B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7), "
2935 "B<sched>(7)"
2936 msgstr ""
2937 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
2938 "B<pthread_attr_setschedparam>(3), B<pthread_create>(3), "
2939 "B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7), "
2940 "B<sched>(7)"
2941
2942 #. type: TH
2943 #: build/C/man3/pthread_attr_setscope.3:26
2944 #, no-wrap
2945 msgid "PTHREAD_ATTR_SETSCOPE"
2946 msgstr "PTHREAD_ATTR_SETSCOPE"
2947
2948 #. type: Plain text
2949 #: build/C/man3/pthread_attr_setscope.3:30
2950 msgid ""
2951 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2952 "attribute in thread attributes object"
2953 msgstr ""
2954 "pthread_attr_setscope, pthread_attr_getscope - \n"
2955 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2956
2957 #. type: Plain text
2958 #: build/C/man3/pthread_attr_setscope.3:38
2959 #, fuzzy, no-wrap
2960 #| msgid ""
2961 #| "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2962 #| "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2963 msgid ""
2964 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2965 "B<int pthread_attr_getscope(const pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2966 msgstr ""
2967 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2968 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2969
2970 #. type: Plain text
2971 #: build/C/man3/pthread_attr_setscope.3:53
2972 msgid ""
2973 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2974 "of the thread attributes object referred to by I<attr> to the value "
2975 "specified in I<scope>.  The contention scope attribute defines the set of "
2976 "threads against which a thread competes for resources such as the CPU.  "
2977 "POSIX.1-2001 specifies two possible values for I<scope>:"
2978 msgstr ""
2979 "B<pthread_attr_setscope>() 関数は、\n"
2980 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2981 "属性を I<scope> で指定された値に設定する。\n"
2982 "contention scope 属性により、\n"
2983 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2984 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2985
2986 #. type: TP
2987 #: build/C/man3/pthread_attr_setscope.3:53
2988 #, no-wrap
2989 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2990 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2991
2992 #. type: Plain text
2993 #: build/C/man3/pthread_attr_setscope.3:61
2994 msgid ""
2995 "The thread competes for resources with all other threads in all processes on "
2996 "the system that are in the same scheduling allocation domain (a group of one "
2997 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2998 "to one another according to their scheduling policy and priority."
2999 msgstr ""
3000 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
3001 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
3002 "スレッドとリソースを取り合う。 \n"
3003 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
3004 "優先度に基づき、互いに相対的にスケジューリングされる。"
3005
3006 #. type: TP
3007 #: build/C/man3/pthread_attr_setscope.3:61
3008 #, no-wrap
3009 msgid "B<PTHREAD_SCOPE_PROCESS>"
3010 msgstr "B<PTHREAD_SCOPE_PROCESS>"
3011
3012 #. type: Plain text
3013 #: build/C/man3/pthread_attr_setscope.3:76
3014 msgid ""
3015 "The thread competes for resources with all other threads in the same process "
3016 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
3017 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
3018 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
3019 "leaves it unspecified how these threads contend with other threads in other "
3020 "process on the system or with other threads in the same process that were "
3021 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
3022 msgstr ""
3023 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
3024 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
3025 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
3026 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
3027 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
3028 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
3029 "された他のスレッドとどのようにリソースを取り合うかは、\n"
3030 "規定されないままになっている。"
3031
3032 #. type: Plain text
3033 #: build/C/man3/pthread_attr_setscope.3:83
3034 msgid ""
3035 "POSIX.1-2001 requires that an implementation support at least one of these "
3036 "contention scopes.  Linux supports B<PTHREAD_SCOPE_SYSTEM>, but not "
3037 "B<PTHREAD_SCOPE_PROCESS>."
3038 msgstr ""
3039 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention scope の"
3040 "うち少なくとも 1 つをサポートすることだけである。 Linux は "
3041 "B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、 B<PTHREAD_SCOPE_PROCESS> はサ"
3042 "ポートしていない。"
3043
3044 #. type: Plain text
3045 #: build/C/man3/pthread_attr_setscope.3:95
3046 msgid ""
3047 "On systems that support multiple contention scopes, then, in order for the "
3048 "parameter setting made by B<pthread_attr_setscope>()  to have effect when "
3049 "calling B<pthread_create>(3), the caller must use "
3050 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
3051 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
3052 msgstr ""
3053 "複数の contention scope をサポートしているシステムで、 B<pthread_create>(3) "
3054 "を呼び出した際に B<pthread_attr_setscope>() で行ったパラメータ設定を有効にす"
3055 "るには、 呼び出し側で B<pthread_attr_setinheritsched>(3) を使って 属性オブ"
3056 "ジェクト I<attr> の inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定"
3057 "しておかなければならない。"
3058
3059 #. type: Plain text
3060 #: build/C/man3/pthread_attr_setscope.3:103
3061 msgid ""
3062 "The B<pthread_attr_getscope>()  function returns the contention scope "
3063 "attribute of the thread attributes object referred to by I<attr> in the "
3064 "buffer pointed to by I<scope>."
3065 msgstr ""
3066 "B<pthread_attr_getscope>() は、\n"
3067 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
3068 "I<scope> が指すバッファに入れて返す。"
3069
3070 #. type: Plain text
3071 #: build/C/man3/pthread_attr_setscope.3:109
3072 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
3073 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
3074
3075 #. type: Plain text
3076 #: build/C/man3/pthread_attr_setscope.3:113
3077 msgid "An invalid value was specified in I<scope>."
3078 msgstr "I<scope> に無効な値が指定された。"
3079
3080 #. type: TP
3081 #: build/C/man3/pthread_attr_setscope.3:113
3082 #, no-wrap
3083 msgid "B<ENOTSUP>"
3084 msgstr "B<ENOTSUP>"
3085
3086 #. type: Plain text
3087 #: build/C/man3/pthread_attr_setscope.3:119
3088 msgid ""
3089 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
3090 "supported on Linux."
3091 msgstr ""
3092 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
3093 "この値は Linux でサポートされていない。"
3094
3095 #. type: Plain text
3096 #: build/C/man3/pthread_attr_setscope.3:126
3097 msgid ""
3098 "The B<pthread_attr_setscope>()  and B<pthread_attr_getscope>()  functions "
3099 "are thread-safe."
3100 msgstr ""
3101 "関数 B<pthread_attr_setscope>() と B<pthread_attr_getscope>() はスレッドセー"
3102 "フである。"
3103
3104 #. type: Plain text
3105 #: build/C/man3/pthread_attr_setscope.3:136
3106 msgid ""
3107 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
3108 "space thread is bound directly to a single kernel-scheduling entity.  This "
3109 "is the case on Linux for the obsolete LinuxThreads implementation and the "
3110 "modern NPTL implementation, which are both 1:1 threading implementations."
3111 msgstr ""
3112 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
3113 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
3114 "直接結び付けられる。\n"
3115 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
3116 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
3117
3118 #. type: Plain text
3119 #: build/C/man3/pthread_attr_setscope.3:139
3120 msgid ""
3121 "POSIX.1-2001 specifies that the default contention scope is implementation-"
3122 "defined."
3123 msgstr ""
3124 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
3125 "実装時で定義されるものと規定されている。"
3126
3127 #. type: Plain text
3128 #: build/C/man3/pthread_attr_setscope.3:149
3129 msgid ""
3130 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3131 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3132 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3133 msgstr ""
3134 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3135 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3136 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3137
3138 #. type: TH
3139 #: build/C/man3/pthread_attr_setstack.3:26
3140 #, no-wrap
3141 msgid "PTHREAD_ATTR_SETSTACK"
3142 msgstr "PTHREAD_ATTR_SETSTACK"
3143
3144 #. type: Plain text
3145 #: build/C/man3/pthread_attr_setstack.3:30
3146 msgid ""
3147 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
3148 "thread attributes object"
3149 msgstr ""
3150 "pthread_attr_setstack, pthread_attr_getstack - \n"
3151 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
3152
3153 #. type: Plain text
3154 #: build/C/man3/pthread_attr_setstack.3:38
3155 #, fuzzy, no-wrap
3156 #| msgid ""
3157 #| "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3158 #| "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3159 #| "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3160 #| "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3161 msgid ""
3162 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3163 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3164 "B<int pthread_attr_getstack(const pthread_attr_t *>I<attr>B<,>\n"
3165 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3166 msgstr ""
3167 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3168 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3169 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3170 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3171
3172 #. type: Plain text
3173 #: build/C/man3/pthread_attr_setstack.3:45
3174 #: build/C/man3/pthread_cleanup_push_defer_np.3:44
3175 #: build/C/man3/pthread_kill.3:41 build/C/man3/pthread_sigmask.3:42
3176 #: build/C/man3/pthread_sigqueue.3:42
3177 msgid ""
3178 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3179 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3180
3181 #. type: Plain text
3182 #: build/C/man3/pthread_attr_setstack.3:50
3183 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3184 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3185
3186 #. type: Plain text
3187 #: build/C/man3/pthread_attr_setstack.3:52
3188 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3189 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3190
3191 #. type: Plain text
3192 #: build/C/man3/pthread_attr_setstack.3:68
3193 msgid ""
3194 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3195 "size attributes of the thread attributes object referred to by I<attr> to "
3196 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3197 "attributes specify the location and size of the stack that should be used by "
3198 "a thread that is created using the thread attributes object I<attr>."
3199 msgstr ""
3200 "B<pthread_attr_setstack>() 関数は、\n"
3201 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3202 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3203 "指定された値に設定する。\n"
3204 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3205 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3206
3207 #. type: Plain text
3208 #: build/C/man3/pthread_attr_setstack.3:74
3209 msgid ""
3210 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3211 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3212 "allocated buffer should be both readable and writable."
3213 msgstr ""
3214 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3215 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3216 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3217 "べきである。"
3218
3219 #. type: Plain text
3220 #: build/C/man3/pthread_attr_setstack.3:85
3221 msgid ""
3222 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3223 "size attributes of the thread attributes object referred to by I<attr> in "
3224 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3225 msgstr ""
3226 "B<pthread_attr_getstack>() 関数は、\n"
3227 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3228 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3229 "指すバッファに入れて返す。"
3230
3231 #. type: Plain text
3232 #: build/C/man3/pthread_attr_setstack.3:91
3233 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3234 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3235
3236 #. type: Plain text
3237 #: build/C/man3/pthread_attr_setstack.3:102
3238 msgid ""
3239 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3240 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3241 "stacksize> is not suitably aligned."
3242 msgstr ""
3243 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3244 "システムによっては、 I<stackaddr> か\n"
3245 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3246 "このエラーが発生する。"
3247
3248 #. type: Plain text
3249 #: build/C/man3/pthread_attr_setstack.3:110
3250 msgid ""
3251 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3252 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3253 "caller."
3254 msgstr ""
3255 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3256 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3257 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3258
3259 #. type: Plain text
3260 #: build/C/man3/pthread_attr_setstack.3:112
3261 msgid "These functions are provided by glibc since version 2.2."
3262 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3263
3264 #. type: Plain text
3265 #: build/C/man3/pthread_attr_setstack.3:119
3266 msgid ""
3267 "The B<pthread_attr_setstack>()  and B<pthread_attr_getstack>()  functions "
3268 "are thread-safe."
3269 msgstr ""
3270 "関数 B<pthread_attr_setstack>() と B<pthread_attr_getstack>() はスレッドセー"
3271 "フである。"
3272
3273 #. type: Plain text
3274 #: build/C/man3/pthread_attr_setstack.3:129
3275 msgid ""
3276 "These functions are provided for applications that must ensure that a "
3277 "thread's stack is placed in a particular location.  For most applications, "
3278 "this is not necessary, and the use of these functions should be avoided.  "
3279 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3280 "stack size other than the default.)"
3281 msgstr ""
3282 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3283 "しなければならないアプリケーションのために提供されている。\n"
3284 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3285 "これらの関数を使うのは避けるべきである。\n"
3286 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3287 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3288
3289 #. type: Plain text
3290 #: build/C/man3/pthread_attr_setstack.3:140
3291 msgid ""
3292 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3293 "responsibility of allocating the stack.  Any guard size value that was set "
3294 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3295 "is the application's responsibility to allocate a guard area (one or more "
3296 "pages protected against reading and writing)  to handle the possibility of "
3297 "stack overflow."
3298 msgstr ""
3299 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3300 "スタックの割り当てに責任を持つ必要がある。\n"
3301 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3302 "guard size の値は無視される。\n"
3303 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3304 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3305 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3306
3307 #. type: Plain text
3308 #: build/C/man3/pthread_attr_setstack.3:151
3309 msgid ""
3310 "The address specified in I<stackaddr> should be suitably aligned: for full "
3311 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3312 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3313 "should also be a multiple of the system page size."
3314 msgstr ""
3315 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3316 "完全な移植性を持たせるためには、\n"
3317 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3318 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3319 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3320
3321 #. type: Plain text
3322 #: build/C/man3/pthread_attr_setstack.3:159
3323 msgid ""
3324 "If I<attr> is used to create multiple threads, then the caller must change "
3325 "the stack address attribute between calls to B<pthread_create>(3); "
3326 "otherwise, the threads will attempt to use the same memory area for their "
3327 "stacks, and chaos will ensue."
3328 msgstr ""
3329 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3330 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3331 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3332 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3333 "使おうとするため、訳の分からない状況が発生してしまう。"
3334
3335 #. type: Plain text
3336 #: build/C/man3/pthread_attr_setstack.3:174
3337 msgid ""
3338 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3339 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3340 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3341 msgstr ""
3342 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3343 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3344 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3345
3346 #. type: TH
3347 #: build/C/man3/pthread_attr_setstackaddr.3:26
3348 #, no-wrap
3349 msgid "PTHREAD_ATTR_SETSTACKADDR"
3350 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3351
3352 #. type: Plain text
3353 #: build/C/man3/pthread_attr_setstackaddr.3:30
3354 msgid ""
3355 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3356 "attribute in thread attributes object"
3357 msgstr ""
3358 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3359 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3360
3361 #. type: Plain text
3362 #: build/C/man3/pthread_attr_setstackaddr.3:38
3363 #, fuzzy, no-wrap
3364 #| msgid ""
3365 #| "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3366 #| "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3367 msgid ""
3368 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3369 "B<int pthread_attr_getstackaddr(const pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3370 msgstr ""
3371 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3372 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3373
3374 #. type: Plain text
3375 #: build/C/man3/pthread_attr_setstackaddr.3:49
3376 msgid ""
3377 "These functions are obsolete: B<do not use them.> Use "
3378 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3379 msgstr ""
3380 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3381 "代わりに B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使うこ"
3382 "と。"
3383
3384 #. type: Plain text
3385 #: build/C/man3/pthread_attr_setstackaddr.3:60
3386 msgid ""
3387 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3388 "attribute of the thread attributes object referred to by I<attr> to the "
3389 "value specified in I<stackaddr>.  This attribute specifies the location of "
3390 "the stack that should be used by a thread that is created using the thread "
3391 "attributes object I<attr>."
3392 msgstr ""
3393 "B<pthread_attr_setstackaddr>() 関数は、\n"
3394 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3395 "属性を I<stackaddr> で指定された値に設定する。\n"
3396 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3397 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3398
3399 #. type: Plain text
3400 #: build/C/man3/pthread_attr_setstackaddr.3:66
3401 msgid ""
3402 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3403 "that was allocated by the caller.  The pages of the allocated buffer should "
3404 "be both readable and writable."
3405 msgstr ""
3406 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3407 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3408 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3409 "なっているべきである。"
3410
3411 #. type: Plain text
3412 #: build/C/man3/pthread_attr_setstackaddr.3:74
3413 msgid ""
3414 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3415 "attribute of the thread attributes object referred to by I<attr> in the "
3416 "buffer pointed to by I<stackaddr>."
3417 msgstr ""
3418 "B<pthread_attr_getstackaddr>() は、\n"
3419 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3420 "I<stackaddr> が指すバッファに入れて返す。"
3421
3422 #. type: Plain text
3423 #: build/C/man3/pthread_attr_setstackaddr.3:81
3424 msgid ""
3425 "No errors are defined (but applications should nevertheless handle a "
3426 "possible error return)."
3427 msgstr ""
3428 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3429 "返り値を処理するようにすべきである)。"
3430
3431 #. type: Plain text
3432 #: build/C/man3/pthread_attr_setstackaddr.3:90
3433 msgid ""
3434 "The B<pthread_attr_setstackaddr>()  and B<pthread_attr_getstackaddr>()  "
3435 "functions are thread-safe."
3436 msgstr ""
3437 "関数 B<pthread_attr_setstackaddr>() と B<pthread_attr_getstackaddr>() はス"
3438 "レッドセーフである。"
3439
3440 #. type: Plain text
3441 #: build/C/man3/pthread_attr_setstackaddr.3:93
3442 msgid ""
3443 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3444 "POSIX.1-2008 removes the specification of these functions."
3445 msgstr ""
3446 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3447 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3448
3449 #. type: Plain text
3450 #: build/C/man3/pthread_attr_setstackaddr.3:117
3451 msgid ""
3452 "I<Do not use these functions!> They cannot be portably used, since they "
3453 "provide no way of specifying the direction of growth or the range of the "
3454 "stack.  For example, on architectures with a stack that grows downward, "
3455 "I<stackaddr> specifies the next address past the I<highest> address of the "
3456 "allocated stack area.  However, on architectures with a stack that grows "
3457 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3458 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3459 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3460 "in the allocated stack area (and the I<stacksize> argument specifies the "
3461 "range of the stack)."
3462 msgstr ""
3463 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3464 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3465 "かを指定する手段が提供されていないからである。\n"
3466 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3467 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3468 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3469 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3470 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3471 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3472 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3473 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3474
3475 #. type: Plain text
3476 #: build/C/man3/pthread_attr_setstackaddr.3:123
3477 msgid ""
3478 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3479 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3480 msgstr ""
3481 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3482 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3483
3484 #. type: TH
3485 #: build/C/man3/pthread_attr_setstacksize.3:26
3486 #, no-wrap
3487 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3488 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3489
3490 #. type: Plain text
3491 #: build/C/man3/pthread_attr_setstacksize.3:30
3492 msgid ""
3493 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3494 "attribute in thread attributes object"
3495 msgstr ""
3496 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3497 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3498
3499 #. type: Plain text
3500 #: build/C/man3/pthread_attr_setstacksize.3:38
3501 #, fuzzy, no-wrap
3502 #| msgid ""
3503 #| "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3504 #| "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3505 msgid ""
3506 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3507 "B<int pthread_attr_getstacksize(const pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3508 msgstr ""
3509 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3510 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3511
3512 #. type: Plain text
3513 #: build/C/man3/pthread_attr_setstacksize.3:49
3514 msgid ""
3515 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3516 "of the thread attributes object referred to by I<attr> to the value "
3517 "specified in I<stacksize>."
3518 msgstr ""
3519 "B<pthread_attr_setstacksize>() 関数は、\n"
3520 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3521 "属性を I<stacksize> で指定された値に設定する。"
3522
3523 #. type: Plain text
3524 #: build/C/man3/pthread_attr_setstacksize.3:53
3525 msgid ""
3526 "The stack size attribute determines the minimum size (in bytes) that will be "
3527 "allocated for threads created using the thread attributes object I<attr>."
3528 msgstr ""
3529 "スタックサイズ属性により、\n"
3530 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3531 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3532
3533 #. type: Plain text
3534 #: build/C/man3/pthread_attr_setstacksize.3:61
3535 msgid ""
3536 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3537 "attribute of the thread attributes object referred to by I<attr> in the "
3538 "buffer pointed to by I<stacksize>."
3539 msgstr ""
3540 "B<pthread_attr_getstacksize>() は、\n"
3541 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3542 "I<stacksize> が指すバッファに入れて返す。"
3543
3544 #. type: Plain text
3545 #: build/C/man3/pthread_attr_setstacksize.3:67
3546 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3547 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3548
3549 #. type: Plain text
3550 #: build/C/man3/pthread_attr_setstacksize.3:72
3551 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3552 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3553
3554 #.  e.g., MacOS
3555 #. type: Plain text
3556 #: build/C/man3/pthread_attr_setstacksize.3:81
3557 msgid ""
3558 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3559 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3560 msgstr ""
3561 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3562 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3563 "エラー B<EINVAL> で失敗する。"
3564
3565 #. type: Plain text
3566 #: build/C/man3/pthread_attr_setstacksize.3:90
3567 msgid ""
3568 "The B<pthread_attr_setstacksize>()  and B<pthread_attr_getstacksize>()  "
3569 "functions are thread-safe."
3570 msgstr ""
3571 "関数 B<pthread_attr_setstacksize>() と B<pthread_attr_getstacksize>() はス"
3572 "レッドセーフである。"
3573
3574 #. type: Plain text
3575 #: build/C/man3/pthread_attr_setstacksize.3:95
3576 msgid ""
3577 "For details on the default stack size of new threads, see "
3578 "B<pthread_create>(3)."
3579 msgstr ""
3580 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3581 "B<pthread_create>(3) を参照。"
3582
3583 #. type: Plain text
3584 #: build/C/man3/pthread_attr_setstacksize.3:98
3585 msgid ""
3586 "A thread's stack size is fixed at the time of thread creation.  Only the "
3587 "main thread can dynamically grow its stack."
3588 msgstr ""
3589 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3590 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3591
3592 #. type: Plain text
3593 #: build/C/man3/pthread_attr_setstacksize.3:103
3594 msgid ""
3595 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3596 "the size and location of a caller-allocated stack that is to be used by a "
3597 "thread."
3598 msgstr ""
3599 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3600 "アプリケーションは、スレッドが使用するスタックとして、\n"
3601 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3602
3603 #. type: Plain text
3604 #: build/C/man3/pthread_attr_setstacksize.3:115
3605 msgid ""
3606 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3607 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3608 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3609 "stack will be at least I<stacksize> bytes."
3610 msgstr ""
3611 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3612 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3613 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3614 "これは POSIX.1-2001 に違反している。\n"
3615 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3616 "少なくとも I<stacksize> バイトになると書かれている。"
3617
3618 #. type: Plain text
3619 #: build/C/man3/pthread_attr_setstacksize.3:118
3620 #: build/C/man3/pthread_join.3:127
3621 msgid "See B<pthread_create>(3)."
3622 msgstr "B<pthread_create>(3) を参照。"
3623
3624 #. type: Plain text
3625 #: build/C/man3/pthread_attr_setstacksize.3:125
3626 msgid ""
3627 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3628 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3629 msgstr ""
3630 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3631 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3632
3633 #. type: TH
3634 #: build/C/man3/pthread_cancel.3:26
3635 #, no-wrap
3636 msgid "PTHREAD_CANCEL"
3637 msgstr "PTHREAD_CANCEL"
3638
3639 #. type: TH
3640 #: build/C/man3/pthread_cancel.3:26
3641 #, no-wrap
3642 msgid "2008-11-17"
3643 msgstr "2008-11-17"
3644
3645 #. type: Plain text
3646 #: build/C/man3/pthread_cancel.3:29
3647 msgid "pthread_cancel - send a cancellation request to a thread"
3648 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3649
3650 #. type: Plain text
3651 #: build/C/man3/pthread_cancel.3:34
3652 #, no-wrap
3653 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3654 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3655
3656 #. type: Plain text
3657 #: build/C/man3/pthread_cancel.3:49
3658 msgid ""
3659 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3660 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3661 "request depends on two attributes that are under the control of that thread: "
3662 "its cancelability I<state> and I<type>."
3663 msgstr ""
3664 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3665 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3666 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3667 "I<state> と I<type>により決まる。"
3668
3669 #. type: Plain text
3670 #: build/C/man3/pthread_cancel.3:61
3671 msgid ""
3672 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3673 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3674 "has disabled cancellation, then a cancellation request remains queued until "
3675 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3676 "its cancelability type determines when cancellation occurs."
3677 msgstr ""
3678 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3679 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3680 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3681 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3682 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3683 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3684
3685 #. type: Plain text
3686 #: build/C/man3/pthread_cancel.3:77
3687 msgid ""
3688 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3689 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3690 "Asynchronous cancelability means that the thread can be canceled at any time "
3691 "(usually immediately, but the system does not guarantee this).  Deferred "
3692 "cancelability means that cancellation will be delayed until the thread next "
3693 "calls a function that is a I<cancellation point>.  A list of functions that "
3694 "are or may be cancellation points is provided in B<pthreads>(7)."
3695 msgstr ""
3696 "スレッドのキャンセル種別 (cancelability type) は\n"
3697 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3698 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3699 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3700 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3701 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3702 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3703 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3704 "遅延される。取り消しポイントに設定されていたり設定\n"
3705 "したりできる関数のリストは B<pthreads>(7) に記載している。"
3706
3707 #. type: Plain text
3708 #: build/C/man3/pthread_cancel.3:81
3709 msgid ""
3710 "When a cancellation requested is acted on, the following steps occur for "
3711 "I<thread> (in this order):"
3712 msgstr ""
3713 "キャンセル要求が実行されると、\n"
3714 "I<thread> では以下のステップが (この順序で) 行われる。"
3715
3716 #. type: IP
3717 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3718 #, no-wrap
3719 msgid "1."
3720 msgstr "1."
3721
3722 #. type: Plain text
3723 #: build/C/man3/pthread_cancel.3:86
3724 msgid ""
3725 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3726 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3727 msgstr ""
3728 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3729 "取り出され (pop され)、呼び出される。\n"
3730 "(B<pthread_cleanup_push>(3) 参照)"
3731
3732 #. type: IP
3733 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3734 #, no-wrap
3735 msgid "2."
3736 msgstr "2."
3737
3738 #. type: Plain text
3739 #: build/C/man3/pthread_cancel.3:91
3740 msgid ""
3741 "Thread-specific data destructors are called, in an unspecified order.  (See "
3742 "B<pthread_key_create>(3).)"
3743 msgstr ""
3744 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3745 "呼び出し順序は規定されていない。\n"
3746 "(B<pthread_key_create>(3) 参照)"
3747
3748 #. type: IP
3749 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3750 #, no-wrap
3751 msgid "3."
3752 msgstr "3."
3753
3754 #. type: Plain text
3755 #: build/C/man3/pthread_cancel.3:95
3756 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3757 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3758
3759 #. type: Plain text
3760 #: build/C/man3/pthread_cancel.3:103
3761 msgid ""
3762 "The above steps happen asynchronously with respect to the "
3763 "B<pthread_cancel>()  call; the return status of B<pthread_cancel>()  merely "
3764 "informs the caller whether the cancellation request was successfully queued."
3765 msgstr ""
3766 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3767 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3768 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3769
3770 #. type: Plain text
3771 #: build/C/man3/pthread_cancel.3:112
3772 msgid ""
3773 "After a canceled thread has terminated, a join with that thread using "
3774 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3775 "status.  (Joining with a thread is the only way to know that cancellation "
3776 "has completed.)"
3777 msgstr ""
3778 "キャンセルされたスレッドが終了された後に、\n"
3779 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3780 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3781 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3782
3783 #. type: Plain text
3784 #: build/C/man3/pthread_cancel.3:117
3785 msgid ""
3786 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3787 "error number."
3788 msgstr ""
3789 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3790 "エラーの場合、0 以外のエラー番号を返す。"
3791
3792 #. type: TP
3793 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3794 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3795 #: build/C/man3/pthread_setaffinity_np.3:114
3796 #: build/C/man3/pthread_setschedparam.3:114
3797 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:86
3798 #, no-wrap
3799 msgid "B<ESRCH>"
3800 msgstr "B<ESRCH>"
3801
3802 #. type: Plain text
3803 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3804 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3805 #: build/C/man3/pthread_setaffinity_np.3:119
3806 #: build/C/man3/pthread_setschedparam.3:119
3807 #: build/C/man3/pthread_setschedprio.3:75
3808 msgid "No thread with the ID I<thread> could be found."
3809 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3810
3811 #. type: Plain text
3812 #: build/C/man3/pthread_cancel.3:135
3813 msgid ""
3814 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3815 "threading implementation, the first real-time signal (i.e., signal 32) is "
3816 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3817 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3818 msgstr ""
3819 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3820 "は、\n"
3821 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3822 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3823 "ム\n"
3824 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3825
3826 #. type: Plain text
3827 #: build/C/man3/pthread_cancel.3:141
3828 msgid ""
3829 "The program below creates a thread and then cancels it.  The main thread "
3830 "joins with the canceled thread to check that its exit status was "
3831 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3832 "run the program:"
3833 msgstr ""
3834 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3835 "る。\n"
3836 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3837 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3838 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3839
3840 #. type: Plain text
3841 #: build/C/man3/pthread_cancel.3:149
3842 #, no-wrap
3843 msgid ""
3844 "$ ./a.out\n"
3845 "thread_func(): started; cancellation disabled\n"
3846 "main(): sending cancellation request\n"
3847 "thread_func(): about to enable cancellation\n"
3848 "main(): thread was canceled\n"
3849 msgstr ""
3850 "$ ./a.out\n"
3851 "thread_func(): started; cancellation disabled\n"
3852 "main(): sending cancellation request\n"
3853 "thread_func(): about to enable cancellation\n"
3854 "main(): thread was canceled\n"
3855
3856 #. type: Plain text
3857 #: build/C/man3/pthread_cancel.3:159
3858 #, no-wrap
3859 msgid ""
3860 "#include E<lt>pthread.hE<gt>\n"
3861 "#include E<lt>stdio.hE<gt>\n"
3862 "#include E<lt>errno.hE<gt>\n"
3863 "#include E<lt>stdlib.hE<gt>\n"
3864 "#include E<lt>unistd.hE<gt>\n"
3865 msgstr ""
3866 "#include E<lt>pthread.hE<gt>\n"
3867 "#include E<lt>stdio.hE<gt>\n"
3868 "#include E<lt>errno.hE<gt>\n"
3869 "#include E<lt>stdlib.hE<gt>\n"
3870 "#include E<lt>unistd.hE<gt>\n"
3871
3872 #. type: Plain text
3873 #: build/C/man3/pthread_cancel.3:167
3874 #, no-wrap
3875 msgid ""
3876 "static void *\n"
3877 "thread_func(void *ignored_argument)\n"
3878 "{\n"
3879 "    int s;\n"
3880 msgstr ""
3881 "static void *\n"
3882 "thread_func(void *ignored_argument)\n"
3883 "{\n"
3884 "    int s;\n"
3885
3886 #. type: Plain text
3887 #: build/C/man3/pthread_cancel.3:170
3888 #, no-wrap
3889 msgid ""
3890 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3891 "       immediately react to a cancellation request */\n"
3892 msgstr ""
3893 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3894 "       immediately react to a cancellation request */\n"
3895
3896 #. type: Plain text
3897 #: build/C/man3/pthread_cancel.3:174
3898 #, no-wrap
3899 msgid ""
3900 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3901 "    if (s != 0)\n"
3902 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3903 msgstr ""
3904 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3905 "    if (s != 0)\n"
3906 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3907
3908 #. type: Plain text
3909 #: build/C/man3/pthread_cancel.3:178
3910 #, no-wrap
3911 msgid ""
3912 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3913 "    sleep(5);\n"
3914 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3915 msgstr ""
3916 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3917 "    sleep(5);\n"
3918 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3919
3920 #. type: Plain text
3921 #: build/C/man3/pthread_cancel.3:182
3922 #, no-wrap
3923 msgid ""
3924 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3925 "    if (s != 0)\n"
3926 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3927 msgstr ""
3928 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3929 "    if (s != 0)\n"
3930 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3931
3932 #. type: Plain text
3933 #: build/C/man3/pthread_cancel.3:184
3934 #, no-wrap
3935 msgid "    /* sleep() is a cancellation point */\n"
3936 msgstr "    /* sleep() is a cancellation point */\n"
3937
3938 #. type: Plain text
3939 #: build/C/man3/pthread_cancel.3:186
3940 #, no-wrap
3941 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3942 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3943
3944 #. type: Plain text
3945 #: build/C/man3/pthread_cancel.3:188
3946 #, no-wrap
3947 msgid "    /* Should never get here */\n"
3948 msgstr "    /* Should never get here */\n"
3949
3950 #. type: Plain text
3951 #: build/C/man3/pthread_cancel.3:192
3952 #, no-wrap
3953 msgid ""
3954 "    printf(\"thread_func(): not canceled!\\en\");\n"
3955 "    return NULL;\n"
3956 "}\n"
3957 msgstr ""
3958 "    printf(\"thread_func(): not canceled!\\en\");\n"
3959 "    return NULL;\n"
3960 "}\n"
3961
3962 #. type: Plain text
3963 #: build/C/man3/pthread_cancel.3:199
3964 #, no-wrap
3965 msgid ""
3966 "int\n"
3967 "main(void)\n"
3968 "{\n"
3969 "    pthread_t thr;\n"
3970 "    void *res;\n"
3971 "    int s;\n"
3972 msgstr ""
3973 "int\n"
3974 "main(void)\n"
3975 "{\n"
3976 "    pthread_t thr;\n"
3977 "    void *res;\n"
3978 "    int s;\n"
3979
3980 #. type: Plain text
3981 #: build/C/man3/pthread_cancel.3:201
3982 #, no-wrap
3983 msgid "    /* Start a thread and then send it a cancellation request */\n"
3984 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3985
3986 #. type: Plain text
3987 #: build/C/man3/pthread_cancel.3:205
3988 #, no-wrap
3989 msgid ""
3990 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3991 "    if (s != 0)\n"
3992 "        handle_error_en(s, \"pthread_create\");\n"
3993 msgstr ""
3994 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3995 "    if (s != 0)\n"
3996 "        handle_error_en(s, \"pthread_create\");\n"
3997
3998 #. type: Plain text
3999 #: build/C/man3/pthread_cancel.3:207
4000 #, no-wrap
4001 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
4002 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
4003
4004 #. type: Plain text
4005 #: build/C/man3/pthread_cancel.3:212
4006 #, no-wrap
4007 msgid ""
4008 "    printf(\"main(): sending cancellation request\\en\");\n"
4009 "    s = pthread_cancel(thr);\n"
4010 "    if (s != 0)\n"
4011 "        handle_error_en(s, \"pthread_cancel\");\n"
4012 msgstr ""
4013 "    printf(\"main(): sending cancellation request\\en\");\n"
4014 "    s = pthread_cancel(thr);\n"
4015 "    if (s != 0)\n"
4016 "        handle_error_en(s, \"pthread_cancel\");\n"
4017
4018 #. type: Plain text
4019 #: build/C/man3/pthread_cancel.3:214
4020 #, no-wrap
4021 msgid "    /* Join with thread to see what its exit status was */\n"
4022 msgstr "    /* Join with thread to see what its exit status was */\n"
4023
4024 #. type: Plain text
4025 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
4026 #, no-wrap
4027 msgid ""
4028 "    s = pthread_join(thr, &res);\n"
4029 "    if (s != 0)\n"
4030 "        handle_error_en(s, \"pthread_join\");\n"
4031 msgstr ""
4032 "    s = pthread_join(thr, &res);\n"
4033 "    if (s != 0)\n"
4034 "        handle_error_en(s, \"pthread_join\");\n"
4035
4036 #. type: Plain text
4037 #: build/C/man3/pthread_cancel.3:225
4038 #, no-wrap
4039 msgid ""
4040 "    if (res == PTHREAD_CANCELED)\n"
4041 "        printf(\"main(): thread was canceled\\en\");\n"
4042 "    else\n"
4043 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
4044 "    exit(EXIT_SUCCESS);\n"
4045 "}\n"
4046 msgstr ""
4047 "    if (res == PTHREAD_CANCELED)\n"
4048 "        printf(\"main(): thread was canceled\\en\");\n"
4049 "    else\n"
4050 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
4051 "    exit(EXIT_SUCCESS);\n"
4052 "}\n"
4053
4054 #. type: Plain text
4055 #: build/C/man3/pthread_cancel.3:238
4056 msgid ""
4057 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
4058 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
4059 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4060 msgstr ""
4061 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
4062 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
4063 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4064
4065 #. type: TH
4066 #: build/C/man3/pthread_cleanup_push.3:26
4067 #, no-wrap
4068 msgid "PTHREAD_CLEANUP_PUSH"
4069 msgstr "PTHREAD_CLEANUP_PUSH"
4070
4071 #. type: TH
4072 #: build/C/man3/pthread_cleanup_push.3:26
4073 #, no-wrap
4074 msgid "2008-11-24"
4075 msgstr "2008-11-24"
4076
4077 #. type: Plain text
4078 #: build/C/man3/pthread_cleanup_push.3:30
4079 msgid ""
4080 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
4081 "clean-up handlers"
4082 msgstr ""
4083 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
4084 "キャンセルクリーンアップハンドラの push/pop を行う"
4085
4086 #. type: Plain text
4087 #: build/C/man3/pthread_cleanup_push.3:37
4088 #, no-wrap
4089 msgid ""
4090 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
4091 "B<                          void *>I<arg>B<);>\n"
4092 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
4093 msgstr ""
4094 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
4095 "B<                          void *>I<arg>B<);>\n"
4096 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
4097
4098 #. type: Plain text
4099 #: build/C/man3/pthread_cleanup_push.3:48
4100 msgid ""
4101 "These functions manipulate the calling thread's stack of thread-cancellation "
4102 "clean-up handlers.  A clean-up handler is a function that is automatically "
4103 "executed when a thread is canceled (or in various other circumstances "
4104 "described below); it might, for example, unlock a mutex so that it becomes "
4105 "available to other threads in the process."
4106 msgstr ""
4107 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
4108 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
4109 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
4110 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
4111 "他のスレッドが利用できるようにする関数などが考えられる。"
4112
4113 #. type: Plain text
4114 #: build/C/man3/pthread_cleanup_push.3:59
4115 msgid ""
4116 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
4117 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
4118 "be given I<arg> as its argument."
4119 msgstr ""
4120 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
4121 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
4122 "起動される際には、 I<arg> が関数の引き数と渡される。"
4123
4124 #. type: Plain text
4125 #: build/C/man3/pthread_cleanup_push.3:66
4126 msgid ""
4127 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
4128 "stack of clean-up handlers, and optionally executes it if I<execute> is "
4129 "nonzero."
4130 msgstr ""
4131 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
4132 "スタックの一番上のルーチンを削除する。\n"
4133 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
4134
4135 #. type: Plain text
4136 #: build/C/man3/pthread_cleanup_push.3:69
4137 msgid ""
4138 "A cancellation clean-up handler is popped from the stack and executed in the "
4139 "following circumstances:"
4140 msgstr ""
4141 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
4142 "スタックから取り出され実行される。"
4143
4144 #. type: Plain text
4145 #: build/C/man3/pthread_cleanup_push.3:73
4146 msgid ""
4147 "When a thread is canceled, all of the stacked clean-up handlers are popped "
4148 "and executed in the reverse of the order in which they were pushed onto the "
4149 "stack."
4150 msgstr ""
4151 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
4152 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
4153 "実行は、スタックに登録されたのと逆の順序で行われる。"
4154
4155 #. type: Plain text
4156 #: build/C/man3/pthread_cleanup_push.3:83
4157 msgid ""
4158 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
4159 "handlers are executed as described in the preceding point.  (Clean-up "
4160 "handlers are I<not> called if the thread terminates by performing a "
4161 "I<return> from the thread start function.)"
4162 msgstr ""
4163 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
4164 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
4165 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
4166 "は、クリーンアップハンドラはI<呼び出されない>。)"
4167
4168 #. type: Plain text
4169 #: build/C/man3/pthread_cleanup_push.3:89
4170 msgid ""
4171 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
4172 "argument, the top-most clean-up handler is popped and executed."
4173 msgstr ""
4174 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
4175 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
4176 "実行される。"
4177
4178 #. type: Plain text
4179 #: build/C/man3/pthread_cleanup_push.3:101
4180 msgid ""
4181 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4182 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4183 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4184 "calls to these functions are paired within the same function, and at the "
4185 "same lexical nesting level.  (In other words, a clean-up handler is "
4186 "established only during the execution of a specified section of code.)"
4187 msgstr ""
4188 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4189 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4190 "して実装することを許容している。\n"
4191 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4192 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4193 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4194 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4195
4196 #. type: Plain text
4197 #: build/C/man3/pthread_cleanup_push.3:121
4198 msgid ""
4199 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4200 "call has been made to B<pthread_cleanup_push>()  or "
4201 "B<pthread_cleanup_pop>()  without the matching call of the pair since the "
4202 "jump buffer was filled by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, "
4203 "calling B<longjmp>(3)  (B<siglongjmp>(3))  from inside a clean-up handler "
4204 "produces undefined results unless the jump buffer was also filled by "
4205 "B<setjmp>(3)  (B<sigsetjmp>(3))  inside the handler."
4206 msgstr ""
4207 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4208 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4209 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4210 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4211 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4212 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4213 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4214 "結果になるかは不定である。"
4215
4216 #. type: Plain text
4217 #: build/C/man3/pthread_cleanup_push.3:123
4218 msgid "These functions do not return a value."
4219 msgstr "これらの関数は値を返さない。"
4220
4221 #.  SH VERSIONS
4222 #.  Available since glibc 2.0
4223 #. type: Plain text
4224 #: build/C/man3/pthread_cleanup_push.3:127
4225 msgid "There are no errors."
4226 msgstr "エラーはない。"
4227
4228 #. type: Plain text
4229 #: build/C/man3/pthread_cleanup_push.3:140
4230 msgid ""
4231 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4232 "functions I<are> implemented as macros that expand to text containing "
4233 "\\(aqB<{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4234 "declared within the scope of paired calls to these functions will be visible "
4235 "within only that scope."
4236 msgstr ""
4237 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4238 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4239 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4240 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4241 "ということを意味している。"
4242
4243 #.  The text was actually added in the 2004 TC2
4244 #. type: Plain text
4245 #: build/C/man3/pthread_cleanup_push.3:155
4246 msgid ""
4247 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4248 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4249 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4250 "avoid doing this."
4251 msgstr ""
4252 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4253 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4254 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4255 "不定であると書かれている。\n"
4256 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4257
4258 #. type: Plain text
4259 #: build/C/man3/pthread_cleanup_push.3:170
4260 msgid ""
4261 "The program below provides a simple example of the use of the functions "
4262 "described in this page.  The program creates a thread that executes a loop "
4263 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4264 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4265 "what command-line arguments are supplied, the main thread sends the other "
4266 "thread a cancellation request, or sets a global variable that causes the "
4267 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4268 msgstr ""
4269 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4270 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4271 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4272 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4273 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4274 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4275 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4276 "設定したりする。"
4277
4278 #. type: Plain text
4279 #: build/C/man3/pthread_cleanup_push.3:173
4280 msgid ""
4281 "In the following shell session, the main thread sends a cancellation request "
4282 "to the other thread:"
4283 msgstr ""
4284 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4285 "キャンセル要求を送信する。"
4286
4287 #. type: Plain text
4288 #: build/C/man3/pthread_cleanup_push.3:183
4289 #, no-wrap
4290 msgid ""
4291 "$ B<./a.out>\n"
4292 "New thread started\n"
4293 "cnt = 0\n"
4294 "cnt = 1\n"
4295 "Canceling thread\n"
4296 "Called clean-up handler\n"
4297 "Thread was canceled; cnt = 0\n"
4298 msgstr ""
4299 "$ B<./a.out>\n"
4300 "New thread started\n"
4301 "cnt = 0\n"
4302 "cnt = 1\n"
4303 "Canceling thread\n"
4304 "Called clean-up handler\n"
4305 "Thread was canceled; cnt = 0\n"
4306
4307 #. type: Plain text
4308 #: build/C/man3/pthread_cleanup_push.3:191
4309 msgid ""
4310 "From the above, we see that the thread was canceled, and that the "
4311 "cancellation clean-up handler was called and it reset the value of the "
4312 "global variable I<cnt> to 0."
4313 msgstr ""
4314 "上記の実行例から、スレッドがキャンセルされ、\n"
4315 "キャンセルクリーンアップハンドラが呼び出され、\n"
4316 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4317
4318 #. type: Plain text
4319 #: build/C/man3/pthread_cleanup_push.3:194
4320 msgid ""
4321 "In the next run, the main program sets a global variable that causes other "
4322 "thread to terminate normally:"
4323 msgstr ""
4324 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4325 "もう一つのスレッドが正常終了するようにしている。"
4326
4327 #. type: Plain text
4328 #: build/C/man3/pthread_cleanup_push.3:202
4329 #, no-wrap
4330 msgid ""
4331 "$ B<./a.out x>\n"
4332 "New thread started\n"
4333 "cnt = 0\n"
4334 "cnt = 1\n"
4335 "Thread terminated normally; cnt = 2\n"
4336 msgstr ""
4337 "$ B<./a.out x>\n"
4338 "New thread started\n"
4339 "cnt = 0\n"
4340 "cnt = 1\n"
4341 "Thread terminated normally; cnt = 2\n"
4342
4343 #. type: Plain text
4344 #: build/C/man3/pthread_cleanup_push.3:210
4345 msgid ""
4346 "From the above, we see that the clean-up handler was not executed (because "
4347 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4348 msgstr ""
4349 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4350 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4351 "分かる。"
4352
4353 #. type: Plain text
4354 #: build/C/man3/pthread_cleanup_push.3:215
4355 msgid ""
4356 "In the next run, the main program sets a global variable that causes the "
4357 "other thread to terminate normally, and supplies a nonzero value for "
4358 "I<cleanup_pop_arg>:"
4359 msgstr ""
4360 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4361 "もう一つのスレッドが正常終了するようにし、さらに\n"
4362 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4363
4364 #. type: Plain text
4365 #: build/C/man3/pthread_cleanup_push.3:224
4366 #, no-wrap
4367 msgid ""
4368 "$ B<./a.out x 1>\n"
4369 "New thread started\n"
4370 "cnt = 0\n"
4371 "cnt = 1\n"
4372 "Called clean-up handler\n"
4373 "Thread terminated normally; cnt = 0\n"
4374 msgstr ""
4375 "$ B<./a.out x 1>\n"
4376 "New thread started\n"
4377 "cnt = 0\n"
4378 "cnt = 1\n"
4379 "Called clean-up handler\n"
4380 "Thread terminated normally; cnt = 0\n"
4381
4382 #. type: Plain text
4383 #: build/C/man3/pthread_cleanup_push.3:231
4384 msgid ""
4385 "In the above, we see that although the thread was not canceled, the clean-up "
4386 "handler was executed, because the argument given to "
4387 "B<pthread_cleanup_pop>()  was nonzero."
4388 msgstr ""
4389 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4390 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4391 "に 0 以外を渡したからである。"
4392
4393 #. type: Plain text
4394 #: build/C/man3/pthread_cleanup_push.3:240
4395 #, no-wrap
4396 msgid ""
4397 "#include E<lt>pthread.hE<gt>\n"
4398 "#include E<lt>sys/types.hE<gt>\n"
4399 "#include E<lt>stdio.hE<gt>\n"
4400 "#include E<lt>stdlib.hE<gt>\n"
4401 "#include E<lt>unistd.hE<gt>\n"
4402 "#include E<lt>errno.hE<gt>\n"
4403 msgstr ""
4404 "#include E<lt>pthread.hE<gt>\n"
4405 "#include E<lt>sys/types.hE<gt>\n"
4406 "#include E<lt>stdio.hE<gt>\n"
4407 "#include E<lt>stdlib.hE<gt>\n"
4408 "#include E<lt>unistd.hE<gt>\n"
4409 "#include E<lt>errno.hE<gt>\n"
4410
4411 #. type: Plain text
4412 #: build/C/man3/pthread_cleanup_push.3:247
4413 #, no-wrap
4414 msgid ""
4415 "static int done = 0;\n"
4416 "static int cleanup_pop_arg = 0;\n"
4417 "static int cnt = 0;\n"
4418 msgstr ""
4419 "static int done = 0;\n"
4420 "static int cleanup_pop_arg = 0;\n"
4421 "static int cnt = 0;\n"
4422
4423 #. type: Plain text
4424 #: build/C/man3/pthread_cleanup_push.3:254
4425 #, no-wrap
4426 msgid ""
4427 "static void\n"
4428 "cleanup_handler(void *arg)\n"
4429 "{\n"
4430 "    printf(\"Called clean-up handler\\en\");\n"
4431 "    cnt = 0;\n"
4432 "}\n"
4433 msgstr ""
4434 "static void\n"
4435 "cleanup_handler(void *arg)\n"
4436 "{\n"
4437 "    printf(\"Called clean-up handler\\en\");\n"
4438 "    cnt = 0;\n"
4439 "}\n"
4440
4441 #. type: Plain text
4442 #: build/C/man3/pthread_cleanup_push.3:259
4443 #, no-wrap
4444 msgid ""
4445 "static void *\n"
4446 "thread_start(void *arg)\n"
4447 "{\n"
4448 "    time_t start, curr;\n"
4449 msgstr ""
4450 "static void *\n"
4451 "thread_start(void *arg)\n"
4452 "{\n"
4453 "    time_t start, curr;\n"
4454
4455 #. type: Plain text
4456 #: build/C/man3/pthread_cleanup_push.3:261
4457 #, no-wrap
4458 msgid "    printf(\"New thread started\\en\");\n"
4459 msgstr "    printf(\"New thread started\\en\");\n"
4460
4461 #. type: Plain text
4462 #: build/C/man3/pthread_cleanup_push.3:263
4463 #, no-wrap
4464 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4465 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4466
4467 #. type: Plain text
4468 #: build/C/man3/pthread_cleanup_push.3:265
4469 #, no-wrap
4470 msgid "    curr = start = time(NULL);\n"
4471 msgstr "    curr = start = time(NULL);\n"
4472
4473 #. type: Plain text
4474 #: build/C/man3/pthread_cleanup_push.3:274
4475 #, no-wrap
4476 msgid ""
4477 "    while (!done) {\n"
4478 "        pthread_testcancel();           /* A cancellation point */\n"
4479 "        if (curr E<lt> time(NULL)) {\n"
4480 "            curr = time(NULL);\n"
4481 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4482 "            cnt++;\n"
4483 "        }\n"
4484 "    }\n"
4485 msgstr ""
4486 "    while (!done) {\n"
4487 "        pthread_testcancel();           /* A cancellation point */\n"
4488 "        if (curr E<lt> time(NULL)) {\n"
4489 "            curr = time(NULL);\n"
4490 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4491 "            cnt++;\n"
4492 "        }\n"
4493 "    }\n"
4494
4495 #. type: Plain text
4496 #: build/C/man3/pthread_cleanup_push.3:278
4497 #, no-wrap
4498 msgid ""
4499 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4500 "    return NULL;\n"
4501 "}\n"
4502 msgstr ""
4503 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4504 "    return NULL;\n"
4505 "}\n"
4506
4507 #. type: Plain text
4508 #: build/C/man3/pthread_cleanup_push.3:285
4509 #, no-wrap
4510 msgid ""
4511 "int\n"
4512 "main(int argc, char *argv[])\n"
4513 "{\n"
4514 "    pthread_t thr;\n"
4515 "    int s;\n"
4516 "    void *res;\n"
4517 msgstr ""
4518 "int\n"
4519 "main(int argc, char *argv[])\n"
4520 "{\n"
4521 "    pthread_t thr;\n"
4522 "    int s;\n"
4523 "    void *res;\n"
4524
4525 #. type: Plain text
4526 #: build/C/man3/pthread_cleanup_push.3:289
4527 #, no-wrap
4528 msgid ""
4529 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4530 "    if (s != 0)\n"
4531 "        handle_error_en(s, \"pthread_create\");\n"
4532 msgstr ""
4533 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4534 "    if (s != 0)\n"
4535 "        handle_error_en(s, \"pthread_create\");\n"
4536
4537 #. type: Plain text
4538 #: build/C/man3/pthread_cleanup_push.3:291
4539 #, no-wrap
4540 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4541 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4542
4543 #. type: Plain text
4544 #: build/C/man3/pthread_cleanup_push.3:296
4545 #, no-wrap
4546 msgid ""
4547 "    if (argc E<gt> 1) {\n"
4548 "        if (argc E<gt> 2)\n"
4549 "            cleanup_pop_arg = atoi(argv[2]);\n"
4550 "        done = 1;\n"
4551 msgstr ""
4552 "    if (argc E<gt> 1) {\n"
4553 "        if (argc E<gt> 2)\n"
4554 "            cleanup_pop_arg = atoi(argv[2]);\n"
4555 "        done = 1;\n"
4556
4557 #. type: Plain text
4558 #: build/C/man3/pthread_cleanup_push.3:303
4559 #, no-wrap
4560 msgid ""
4561 "    } else {\n"
4562 "        printf(\"Canceling thread\\en\");\n"
4563 "        s = pthread_cancel(thr);\n"
4564 "        if (s != 0)\n"
4565 "            handle_error_en(s, \"pthread_cancel\");\n"
4566 "    }\n"
4567 msgstr ""
4568 "    } else {\n"
4569 "        printf(\"Canceling thread\\en\");\n"
4570 "        s = pthread_cancel(thr);\n"
4571 "        if (s != 0)\n"
4572 "            handle_error_en(s, \"pthread_cancel\");\n"
4573 "    }\n"
4574
4575 #. type: Plain text
4576 #: build/C/man3/pthread_cleanup_push.3:314
4577 #, no-wrap
4578 msgid ""
4579 "    if (res == PTHREAD_CANCELED)\n"
4580 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4581 "    else\n"
4582 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4583 "    exit(EXIT_SUCCESS);\n"
4584 "}\n"
4585 msgstr ""
4586 "    if (res == PTHREAD_CANCELED)\n"
4587 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4588 "    else\n"
4589 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4590 "    exit(EXIT_SUCCESS);\n"
4591 "}\n"
4592
4593 #. type: Plain text
4594 #: build/C/man3/pthread_cleanup_push.3:321
4595 msgid ""
4596 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4597 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4598 msgstr ""
4599 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4600 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4601
4602 #. type: TH
4603 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4604 #, no-wrap
4605 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4606 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4607
4608 #. type: Plain text
4609 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4610 msgid ""
4611 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4612 "thread cancellation clean-up handlers while saving cancelability type"
4613 msgstr ""
4614 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4615 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4616 "の push/pop を行う"
4617
4618 #. type: Plain text
4619 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4620 #, no-wrap
4621 msgid ""
4622 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4623 "B<                                   void *>I<arg>B<);>\n"
4624 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4625 msgstr ""
4626 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4627 "B<                                   void *>I<arg>B<);>\n"
4628 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4629
4630 #. type: Plain text
4631 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4632 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4633 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4634 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4635 #: build/C/man3/pthread_sigqueue.3:38 build/C/man3/pthread_tryjoin_np.3:42
4636 #: build/C/man3/pthread_yield.3:37
4637 msgid "Compile and link with I<-pthread>."
4638 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4639
4640 #. type: Plain text
4641 #: build/C/man3/pthread_cleanup_push_defer_np.3:49
4642 #, fuzzy
4643 #| msgid ""
4644 #| "pthread_cleanup_push_defer_np(routine, arg);\n"
4645 #| "pthread_cleanup_pop_restore_np(execute);\n"
4646 msgid "B<pthread_cleanup_push_defer_np>(), B<pthread_cleanup_pop_defer_np>():"
4647 msgstr ""
4648 "pthread_cleanup_push_defer_np(routine, arg);\n"
4649 "pthread_cleanup_pop_restore_np(execute);\n"
4650
4651 #. type: Plain text
4652 #: build/C/man3/pthread_cleanup_push_defer_np.3:51
4653 msgid "_GNU_SOURCE"
4654 msgstr ""
4655
4656 #. type: Plain text
4657 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4658 msgid ""
4659 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4660 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4661 msgstr ""
4662 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4663 "だが、このページで説明する点が異なる。"
4664
4665 #. type: Plain text
4666 #: build/C/man3/pthread_cleanup_push_defer_np.3:72
4667 msgid ""
4668 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4669 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4670 "addition, it also saves the thread's current cancelability type, and sets "
4671 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4672 "this ensures that cancellation clean-up will occur even if the thread's "
4673 "cancelability type was \"asynchronous\" before the call."
4674 msgstr ""
4675 "B<pthread_cleanup_push>(3) と同様に、\n"
4676 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4677 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4678 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4679 "保存し、cancelability type は \"deferred\" に設定する\n"
4680 "(B<pthread_setcanceltype>(3) 参照)。\n"
4681 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4682 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4683 "が保証される。"
4684
4685 #. type: Plain text
4686 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4687 msgid ""
4688 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4689 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4690 "up handlers.  In addition, it restores the thread's cancelability type to "
4691 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4692 msgstr ""
4693 "B<pthread_cleanup_pop>(3) と同様に、\n"
4694 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4695 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4696 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4697 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4698
4699 #. type: Plain text
4700 #: build/C/man3/pthread_cleanup_push_defer_np.3:87
4701 msgid ""
4702 "The caller must ensure that calls to these functions are paired within the "
4703 "same function, and at the same lexical nesting level.  Other restrictions "
4704 "apply, as described in B<pthread_cleanup_push>(3)."
4705 msgstr ""
4706 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4707 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4708 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4709 "適用される。"
4710
4711 #. type: Plain text
4712 #: build/C/man3/pthread_cleanup_push_defer_np.3:89
4713 msgid "This sequence of calls:"
4714 msgstr "以下の一連の呼び出し"
4715
4716 #. type: Plain text
4717 #: build/C/man3/pthread_cleanup_push_defer_np.3:94
4718 #, no-wrap
4719 msgid ""
4720 "pthread_cleanup_push_defer_np(routine, arg);\n"
4721 "pthread_cleanup_pop_restore_np(execute);\n"
4722 msgstr ""
4723 "pthread_cleanup_push_defer_np(routine, arg);\n"
4724 "pthread_cleanup_pop_restore_np(execute);\n"
4725
4726 #. type: Plain text
4727 #: build/C/man3/pthread_cleanup_push_defer_np.3:98
4728 msgid "is equivalent to (but shorter and more efficient than):"
4729 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4730
4731 #. type: Plain text
4732 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
4733 #, no-wrap
4734 msgid "int oldtype;\n"
4735 msgstr "int oldtype;\n"
4736
4737 #. type: Plain text
4738 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4739 #, no-wrap
4740 msgid ""
4741 "pthread_cleanup_push(routine, arg);\n"
4742 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4743 "\\&...\n"
4744 "pthread_setcanceltype(oldtype, NULL);\n"
4745 "pthread_cleanup_pop(execute);\n"
4746 msgstr ""
4747 "pthread_cleanup_push(routine, arg);\n"
4748 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4749 "\\&...\n"
4750 "pthread_setcanceltype(oldtype, NULL);\n"
4751 "pthread_cleanup_pop(execute);\n"
4752
4753 #. type: Plain text
4754 #: build/C/man3/pthread_cleanup_push_defer_np.3:123
4755 msgid ""
4756 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
4757 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4758 msgstr ""
4759 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
4760 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4761
4762 #. type: TH
4763 #: build/C/man3/pthread_create.3:26
4764 #, no-wrap
4765 msgid "PTHREAD_CREATE"
4766 msgstr "PTHREAD_CREATE"
4767
4768 #. type: Plain text
4769 #: build/C/man3/pthread_create.3:29
4770 msgid "pthread_create - create a new thread"
4771 msgstr "pthread_create - 新しいスレッドを作成する"
4772
4773 #. type: Plain text
4774 #: build/C/man3/pthread_create.3:35
4775 #, no-wrap
4776 msgid ""
4777 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4778 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4779 msgstr ""
4780 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4781 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4782
4783 #. type: Plain text
4784 #: build/C/man3/pthread_create.3:47
4785 msgid ""
4786 "The B<pthread_create>()  function starts a new thread in the calling "
4787 "process.  The new thread starts execution by invoking I<start_routine>(); "
4788 "I<arg> is passed as the sole argument of I<start_routine>()."
4789 msgstr ""
4790 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4791 "る。\n"
4792 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4793 "I<start_routine>() は引き数を一つだけ取り、\n"
4794 "I<arg> が I<start_routine>() の引き数として渡される。"
4795
4796 #. type: Plain text
4797 #: build/C/man3/pthread_create.3:49
4798 msgid "The new thread terminates in one of the following ways:"
4799 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4800
4801 #. type: IP
4802 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4803 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4804 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4805 #: build/C/man3/pthread_getattr_np.3:58
4806 #, no-wrap
4807 msgid "*"
4808 msgstr "*"
4809
4810 #. type: Plain text
4811 #: build/C/man3/pthread_create.3:55
4812 msgid ""
4813 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4814 "available to another thread in the same process that calls "
4815 "B<pthread_join>(3)."
4816 msgstr ""
4817 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4818 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4819 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4820 "別のスレッドで参照できる。"
4821
4822 #. type: Plain text
4823 #: build/C/man3/pthread_create.3:63
4824 msgid ""
4825 "It returns from I<start_routine>().  This is equivalent to calling "
4826 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4827 msgstr ""
4828 "スレッドが I<start_routine>() から返る。これは、\n"
4829 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4830
4831 #. type: Plain text
4832 #: build/C/man3/pthread_create.3:66
4833 msgid "It is canceled (see B<pthread_cancel>(3))."
4834 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4835
4836 #. type: Plain text
4837 #: build/C/man3/pthread_create.3:72
4838 msgid ""
4839 "Any of the threads in the process calls B<exit>(3), or the main thread "
4840 "performs a return from I<main>().  This causes the termination of all "
4841 "threads in the process."
4842 msgstr ""
4843 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4844 "メインスレッドで I<main>() 内で return が実行される。\n"
4845 "この場合は、プロセス内の全てのスレッドが終了される。"
4846
4847 #. type: Plain text
4848 #: build/C/man3/pthread_create.3:86
4849 msgid ""
4850 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4851 "are used at thread creation time to determine attributes for the new thread; "
4852 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4853 "functions.  If I<attr> is NULL, then the thread is created with default "
4854 "attributes."
4855 msgstr ""
4856 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4857 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4858 "新しいスレッドの属性が決定される。\n"
4859 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4860 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4861
4862 #. type: Plain text
4863 #: build/C/man3/pthread_create.3:93
4864 msgid ""
4865 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4866 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4867 "used to refer to the thread in subsequent calls to other pthreads functions."
4868 msgstr ""
4869 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4870 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4871 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4872
4873 #. type: Plain text
4874 #: build/C/man3/pthread_create.3:101
4875 msgid ""
4876 "The new thread inherits a copy of the creating thread's signal mask "
4877 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4878 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4879 "thread's alternate signal stack (B<sigaltstack>(2))."
4880 msgstr ""
4881 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4882 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4883 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4884 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4885 "(B<sigaltstack>(2)) を継承しない。"
4886
4887 #. type: Plain text
4888 #: build/C/man3/pthread_create.3:104
4889 msgid ""
4890 "The new thread inherits the calling thread's floating-point environment "
4891 "(B<fenv>(3))."
4892 msgstr ""
4893 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4894 "を継承する。"
4895
4896 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4897 #. type: Plain text
4898 #: build/C/man3/pthread_create.3:109
4899 msgid ""
4900 "The initial value of the new thread's CPU-time clock is 0 (see "
4901 "B<pthread_getcpuclockid>(3))."
4902 msgstr ""
4903 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4904 "(B<pthread_getcpuclockid>(3) 参照)。"
4905
4906 #. type: SS
4907 #: build/C/man3/pthread_create.3:109
4908 #, no-wrap
4909 msgid "Linux-specific details"
4910 msgstr "Linux 固有の詳細"
4911
4912 #. type: Plain text
4913 #: build/C/man3/pthread_create.3:115
4914 msgid ""
4915 "The new thread inherits copies of the calling thread's capability sets (see "
4916 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4917 msgstr ""
4918 "新しいスレッドは、呼び出したスレッドの\n"
4919 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4920 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4921 "コピーをを継承しない。"
4922
4923 #. type: Plain text
4924 #: build/C/man3/pthread_create.3:122
4925 msgid ""
4926 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4927 "number, and the contents of I<*thread> are undefined."
4928 msgstr ""
4929 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4930 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4931
4932 #. type: TP
4933 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_create.3:126
4934 #: build/C/man3/pthread_sigqueue.3:72
4935 #, no-wrap
4936 msgid "B<EAGAIN>"
4937 msgstr "B<EAGAIN>"
4938
4939 #. type: Plain text
4940 #: build/C/man3/pthread_create.3:126
4941 msgid "Insufficient resources to create another thread."
4942 msgstr ""
4943
4944 #.  NOTE! The following should match the description in fork(2)
4945 #. type: Plain text
4946 #: build/C/man3/pthread_create.3:144
4947 #, fuzzy
4948 #| msgid ""
4949 #| "Insufficient resources to create another thread, or a system-imposed "
4950 #| "limit on the number of threads was encountered.  The latter case may "
4951 #| "occur in two ways: the B<RLIMIT_NPROC> soft resource limit (set via "
4952 #| "B<setrlimit>(2)), which limits the number of process for a real user ID, "
4953 #| "was reached; or the kernel's system-wide limit on the number of threads, "
4954 #| "I</proc/sys/kernel/threads-max>, was reached."
4955 msgid ""
4956 "A system-imposed limit on the number of threads was encountered.  There are "
4957 "a number of limits that may trigger this error: the B<RLIMIT_NPROC> soft "
4958 "resource limit (set via B<setrlimit>(2)), which limits the number of "
4959 "processes and threads for a real user ID, was reached; the kernel's system-"
4960 "wide limit on the number of processes threads, I</proc/sys/kernel/threads-"
4961 "max>, was reached (see B<proc>(5)); or the maximum number of PIDs, I</proc/"
4962 "sys/kernel/pid_max>, was reached (see B<proc>(5))."
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:148
4973 msgid "Invalid settings in I<attr>."
4974 msgstr "I<attr> で指定された設定が不正である。"
4975
4976 #. type: TP
4977 #: build/C/man3/pthread_create.3:148 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:153
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:167
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:187
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:203
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:209
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:213
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:218
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:230
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:236
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:246
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:258
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:264 build/C/man3/pthread_getcpuclockid.3:116
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:270
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:273
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:279
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:282
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:286
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:289
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:292
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:301
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:303
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:310
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:317
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:319
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:321
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:325
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:331
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:333
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:337
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:339
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:343
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:346
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:352
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:355
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:359 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:361
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:366
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:371
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:375
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:389
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 #: build/C/man3/pthread_getcpuclockid.3:26
5642 #: build/C/man3/pthread_setaffinity_np.3:26
5643 #: build/C/man3/pthread_setconcurrency.3:25
5644 #, fuzzy, no-wrap
5645 #| msgid "2014-05-21"
5646 msgid "2014-05-23"
5647 msgstr "2014-05-21"
5648
5649 #. type: Plain text
5650 #: build/C/man3/pthread_equal.3:29
5651 msgid "pthread_equal - compare thread IDs"
5652 msgstr "pthread_equal - スレッド ID を比較する"
5653
5654 #. type: Plain text
5655 #: build/C/man3/pthread_equal.3:34
5656 #, no-wrap
5657 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5658 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5659
5660 #. type: Plain text
5661 #: build/C/man3/pthread_equal.3:41
5662 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5663 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5664
5665 #. type: Plain text
5666 #: build/C/man3/pthread_equal.3:45
5667 msgid ""
5668 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5669 "value; otherwise, it returns 0."
5670 msgstr ""
5671 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5672 "そうでなければ 0 を返す。"
5673
5674 #.  SH VERSIONS
5675 #.  Available since glibc 2.0
5676 #. type: Plain text
5677 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5678 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5679 msgid "This function always succeeds."
5680 msgstr "この関数は常に成功する。"
5681
5682 #. type: Plain text
5683 #: build/C/man3/pthread_equal.3:52
5684 #, fuzzy
5685 #| msgid "The B<pthread_self>()  function is thread-safe."
5686 msgid "The B<pthread_equal>()  function is thread-safe."
5687 msgstr "B<pthread_self>() 関数はスレッドセーフである。"
5688
5689 #. type: Plain text
5690 #: build/C/man3/pthread_equal.3:61
5691 msgid ""
5692 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5693 "considered opaque: there is no portable way for applications to directly "
5694 "compare two I<pthread_t> values."
5695 msgstr ""
5696 "B<pthread_equal>() 関数が必要なのは、\n"
5697 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5698 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5699 "移植性を確保できる形で比較する方法はない。"
5700
5701 #. type: Plain text
5702 #: build/C/man3/pthread_equal.3:65
5703 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5704 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5705
5706 #. type: TH
5707 #: build/C/man3/pthread_exit.3:26
5708 #, no-wrap
5709 msgid "PTHREAD_EXIT"
5710 msgstr "PTHREAD_EXIT"
5711
5712 #. type: Plain text
5713 #: build/C/man3/pthread_exit.3:29
5714 msgid "pthread_exit - terminate calling thread"
5715 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5716
5717 #. type: Plain text
5718 #: build/C/man3/pthread_exit.3:34
5719 #, no-wrap
5720 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5721 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5722
5723 #. type: Plain text
5724 #: build/C/man3/pthread_exit.3:45
5725 msgid ""
5726 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5727 "value via I<retval> that (if the thread is joinable)  is available to "
5728 "another thread in the same process that calls B<pthread_join>(3)."
5729 msgstr ""
5730 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5731 "I<retval> 経由で値を返す。\n"
5732 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5733 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5734
5735 #. type: Plain text
5736 #: build/C/man3/pthread_exit.3:55
5737 msgid ""
5738 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5739 "not yet been popped, are popped (in the reverse of the order in which they "
5740 "were pushed)  and executed.  If the thread has any thread-specific data, "
5741 "then, after the clean-up handlers have been executed, the corresponding "
5742 "destructor functions are called, in an unspecified order."
5743 msgstr ""
5744 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5745 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5746 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5747 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5748 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5749 "は規定されていない)。"
5750
5751 #. type: Plain text
5752 #: build/C/man3/pthread_exit.3:62
5753 msgid ""
5754 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5755 "variables, semaphores, and file descriptors) are not released, and functions "
5756 "registered using B<atexit>(3)  are not called."
5757 msgstr ""
5758 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5759 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5760 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5761
5762 #. type: Plain text
5763 #: build/C/man3/pthread_exit.3:71
5764 msgid ""
5765 "After the last thread in a process terminates, the process terminates as by "
5766 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5767 "resources are released and functions registered using B<atexit>(3)  are "
5768 "called."
5769 msgstr ""
5770 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5771 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5772 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5773 "が呼び出される。"
5774
5775 #. type: Plain text
5776 #: build/C/man3/pthread_exit.3:73
5777 msgid "This function does not return to the caller."
5778 msgstr "この関数は呼び出し側には返らない。"
5779
5780 #. type: Plain text
5781 #: build/C/man3/pthread_exit.3:80
5782 #, fuzzy
5783 #| msgid "The B<pthread_kill>()  function is thread-safe."
5784 msgid "The B<pthread_exit>()  function is thread-safe."
5785 msgstr "B<pthread_kill>() 関数はスレッドセーフである。"
5786
5787 #. type: Plain text
5788 #: build/C/man3/pthread_exit.3:87
5789 msgid ""
5790 "Performing a return from the start function of any thread other than the "
5791 "main thread results in an implicit call to B<pthread_exit>(), using the "
5792 "function's return value as the thread's exit status."
5793 msgstr ""
5794 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5795 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5796 "関数の返り値がスレッドの終了ステータスとして使用される。"
5797
5798 #. type: Plain text
5799 #: build/C/man3/pthread_exit.3:93
5800 msgid ""
5801 "To allow other threads to continue execution, the main thread should "
5802 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5803 msgstr ""
5804 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5805 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5806
5807 #. type: Plain text
5808 #: build/C/man3/pthread_exit.3:98
5809 msgid ""
5810 "The value pointed to by I<retval> should not be located on the calling "
5811 "thread's stack, since the contents of that stack are undefined after the "
5812 "thread terminates."
5813 msgstr ""
5814 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5815 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5816 "である。"
5817
5818 #.  Linux 2.6.27
5819 #.  FIXME . review a later kernel to see if this gets fixed
5820 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5821 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5822 #. type: Plain text
5823 #: build/C/man3/pthread_exit.3:110
5824 msgid ""
5825 "Currently, there are limitations in the kernel implementation logic for "
5826 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5827 "This can manifest in problems such as a locked terminal if a stop signal is "
5828 "sent to a foreground process whose thread group leader has already called "
5829 "B<pthread_exit>()."
5830 msgstr ""
5831 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5832 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5833 "カーネル実装の論理には制限がある。\n"
5834 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5835 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5836 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5837 "場合がある。"
5838
5839 #. type: Plain text
5840 #: build/C/man3/pthread_exit.3:114
5841 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5842 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5843
5844 #. type: TH
5845 #: build/C/man3/pthread_getattr_np.3:26
5846 #, no-wrap
5847 msgid "PTHREAD_GETATTR_NP"
5848 msgstr "PTHREAD_GETATTR_NP"
5849
5850 #. type: TH
5851 #: build/C/man3/pthread_getattr_np.3:26 build/C/man3/pthread_tryjoin_np.3:26
5852 #, no-wrap
5853 msgid "2010-09-10"
5854 msgstr "2010-09-10"
5855
5856 #. type: Plain text
5857 #: build/C/man3/pthread_getattr_np.3:29
5858 msgid "pthread_getattr_np - get attributes of created thread"
5859 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5860
5861 #. type: Plain text
5862 #: build/C/man3/pthread_getattr_np.3:35
5863 #, no-wrap
5864 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5865 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5866
5867 #. type: Plain text
5868 #: build/C/man3/pthread_getattr_np.3:45
5869 msgid ""
5870 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5871 "object referred to by I<attr> so that it contains actual attribute values "
5872 "describing the running thread I<thread>."
5873 msgstr ""
5874 "B<pthread_getattr_np>() 関数は、\n"
5875 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5876 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5877 "格納して返す。"
5878
5879 #. type: Plain text
5880 #: build/C/man3/pthread_getattr_np.3:52
5881 msgid ""
5882 "The returned attribute values may differ from the corresponding attribute "
5883 "values passed in the I<attr> object that was used to create the thread using "
5884 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5885 msgstr ""
5886 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5887 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5888 "特に、以下の属性は異なる場合がある。"
5889
5890 #. type: Plain text
5891 #: build/C/man3/pthread_getattr_np.3:55
5892 msgid ""
5893 "the detach state, since a joinable thread may have detached itself after "
5894 "creation;"
5895 msgstr ""
5896 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5897 "切り離す (detach する) ことができるからである。"
5898
5899 #. type: Plain text
5900 #: build/C/man3/pthread_getattr_np.3:58
5901 msgid ""
5902 "the stack size, which the implementation may align to a suitable boundary."
5903 msgstr ""
5904 "スタックサイズ。\n"
5905 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5906
5907 #. type: Plain text
5908 #: build/C/man3/pthread_getattr_np.3:63
5909 msgid ""
5910 "and the guard size, which the implementation may round upward to a multiple "
5911 "of the page size, or ignore (i.e., treat as 0), if the application is "
5912 "allocating its own stack."
5913 msgstr ""
5914 "guard size.\n"
5915 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5916 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5917 "(0 として扱われる) ことがあるからである。"
5918
5919 #. type: Plain text
5920 #: build/C/man3/pthread_getattr_np.3:68
5921 msgid ""
5922 "Furthermore, if the stack address attribute was not set in the thread "
5923 "attributes object used to create the thread, then the returned thread "
5924 "attributes object will report the actual stack address that the "
5925 "implementation selected for the thread."
5926 msgstr ""
5927 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5928 "スタックアドレスが設定されていなかった場合、\n"
5929 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5930 "割り当てた実際のスタックアドレスが報告される。"
5931
5932 #. type: Plain text
5933 #: build/C/man3/pthread_getattr_np.3:73
5934 msgid ""
5935 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5936 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5937 msgstr ""
5938 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5939 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5940 "そのオブジェクトを破棄すべきである。"
5941
5942 #. type: Plain text
5943 #: build/C/man3/pthread_getattr_np.3:76
5944 #: build/C/man3/pthread_getcpuclockid.3:49
5945 msgid ""
5946 "On success, this function returns 0; on error, it returns a nonzero error "
5947 "number."
5948 msgstr ""
5949 "成功すると、この関数は 0 を返す。\n"
5950 "エラーの場合、 0 以外のエラー番号を返す。"
5951
5952 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5953 #. type: Plain text
5954 #: build/C/man3/pthread_getattr_np.3:81
5955 msgid "Insufficient memory."
5956 msgstr "メモリが十分になかった。"
5957
5958 #. type: Plain text
5959 #: build/C/man3/pthread_getattr_np.3:96
5960 msgid ""
5961 "In addition, if I<thread> refers to the main thread, then "
5962 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5963 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and "
5964 "B<getrlimit>(2), if the B<RLIMIT_STACK> resource limit is not supported."
5965 msgstr ""
5966 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5967 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5968 "エラーで失敗する可能性がある。\n"
5969 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5970 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5971 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5972
5973 #. type: Plain text
5974 #: build/C/man3/pthread_getattr_np.3:98
5975 msgid "This function is available in glibc since version 2.2.3."
5976 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5977
5978 #. type: Plain text
5979 #: build/C/man3/pthread_getattr_np.3:101
5980 #: build/C/man3/pthread_kill_other_threads_np.3:55
5981 msgid ""
5982 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5983 "\" (nonportable) in the name."
5984 msgstr ""
5985 "この関数は非標準の GNU による拡張である。\n"
5986 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5987 "付いている。"
5988
5989 #. type: Plain text
5990 #: build/C/man3/pthread_getattr_np.3:111
5991 msgid ""
5992 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5993 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5994 "and display its guard size, stack address, and stack size attributes.  "
5995 "Command-line arguments can be used to set these attributes to values other "
5996 "than the default when creating the thread.  The shell sessions below "
5997 "demonstrate the use of the program."
5998 msgstr ""
5999 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
6000 "このプログラムは、スレッドを作成し、それから\n"
6001 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
6002 "スタックアドレス、スタックサイズを取得し表示する。\n"
6003 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
6004 "上記の属性にデフォルト値以外の値を設定することができる。\n"
6005 "下記のシェルのセッションはこのプログラムの使用例である。"
6006
6007 #. type: Plain text
6008 #: build/C/man3/pthread_getattr_np.3:114
6009 msgid ""
6010 "In the first run, on an x86-32 system, a thread is created using default "
6011 "attributes:"
6012 msgstr ""
6013 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
6014 "(x86-32 システム上で実行)。"
6015
6016 #. type: Plain text
6017 #: build/C/man3/pthread_getattr_np.3:124
6018 #, no-wrap
6019 msgid ""
6020 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
6021 "unlimited\n"
6022 "$B< ./a.out>\n"
6023 "Attributes of created thread:\n"
6024 "        Guard size          = 4096 bytes\n"
6025 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6026 "        Stack size          = 0x201000 (2101248) bytes\n"
6027 msgstr ""
6028 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
6029 "unlimited\n"
6030 "$B< ./a.out>\n"
6031 "Attributes of created thread:\n"
6032 "        Guard size          = 4096 bytes\n"
6033 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6034 "        Stack size          = 0x201000 (2101248) bytes\n"
6035
6036 #. type: Plain text
6037 #: build/C/man3/pthread_getattr_np.3:130
6038 msgid ""
6039 "In the following run, we see that if a guard size is specified, it is "
6040 "rounded up to the next multiple of the system page size (4096 bytes on "
6041 "x86-32):"
6042 msgstr ""
6043 "次の実行例では、guard size が指定された場合、\n"
6044 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
6045 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
6046
6047 #. type: Plain text
6048 #: build/C/man3/pthread_getattr_np.3:138
6049 #, no-wrap
6050 msgid ""
6051 "$B< ./a.out -g 4097>\n"
6052 "Thread attributes object after initializations:\n"
6053 "        Guard size          = 4097 bytes\n"
6054 "        Stack address       = (nil)\n"
6055 "        Stack size          = 0x0 (0) bytes\n"
6056 msgstr ""
6057 "$B< ./a.out -g 4097>\n"
6058 "Thread attributes object after initializations:\n"
6059 "        Guard size          = 4097 bytes\n"
6060 "        Stack address       = (nil)\n"
6061 "        Stack size          = 0x0 (0) bytes\n"
6062
6063 #. type: Plain text
6064 #: build/C/man3/pthread_getattr_np.3:143
6065 #, no-wrap
6066 msgid ""
6067 "Attributes of created thread:\n"
6068 "        Guard size          = 8192 bytes\n"
6069 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6070 "        Stack size          = 0x201000 (2101248) bytes\n"
6071 msgstr ""
6072 "Attributes of created thread:\n"
6073 "        Guard size          = 8192 bytes\n"
6074 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
6075 "        Stack size          = 0x201000 (2101248) bytes\n"
6076
6077 #. .in +4n
6078 #. .nf
6079 #. $ ./a.out \-s 0x8000
6080 #. Thread attributes object after initializations:
6081 #.         Guard size          = 4096 bytes
6082 #.         Stack address       = 0xffff8000 (EOS = (nil))
6083 #.         Stack size          = 0x8000 (32768) bytes
6084 #. Attributes of created thread:
6085 #.         Guard size          = 4096 bytes
6086 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
6087 #.         Stack size          = 0x8000 (32768) bytes
6088 #. .fi
6089 #. .in
6090 #. type: Plain text
6091 #: build/C/man3/pthread_getattr_np.3:162
6092 msgid ""
6093 "In the last run, the program manually allocates a stack for the thread.  In "
6094 "this case, the guard size attribute is ignored."
6095 msgstr ""
6096 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
6097 "この場合には、guard size 属性は無視される。"
6098
6099 #. type: Plain text
6100 #: build/C/man3/pthread_getattr_np.3:167
6101 #, no-wrap
6102 msgid ""
6103 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
6104 "Allocated thread stack at 0x804d000\n"
6105 msgstr ""
6106 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
6107 "Allocated thread stack at 0x804d000\n"
6108
6109 #. type: Plain text
6110 #: build/C/man3/pthread_getattr_np.3:172
6111 #, no-wrap
6112 msgid ""
6113 "Thread attributes object after initializations:\n"
6114 "        Guard size          = 4096 bytes\n"
6115 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6116 "        Stack size          = 0x8000 (32768) bytes\n"
6117 msgstr ""
6118 "Thread attributes object after initializations:\n"
6119 "        Guard size          = 4096 bytes\n"
6120 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6121 "        Stack size          = 0x8000 (32768) bytes\n"
6122
6123 #. type: Plain text
6124 #: build/C/man3/pthread_getattr_np.3:177
6125 #, no-wrap
6126 msgid ""
6127 "Attributes of created thread:\n"
6128 "        Guard size          = 0 bytes\n"
6129 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6130 "        Stack size          = 0x8000 (32768) bytes\n"
6131 msgstr ""
6132 "Attributes of created thread:\n"
6133 "        Guard size          = 0 bytes\n"
6134 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
6135 "        Stack size          = 0x8000 (32768) bytes\n"
6136
6137 #. type: Plain text
6138 #: build/C/man3/pthread_getattr_np.3:198
6139 #, no-wrap
6140 msgid ""
6141 "static void\n"
6142 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
6143 "{\n"
6144 "    int s;\n"
6145 "    size_t stack_size, guard_size;\n"
6146 "    void *stack_addr;\n"
6147 msgstr ""
6148 "static void\n"
6149 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
6150 "{\n"
6151 "    int s;\n"
6152 "    size_t stack_size, guard_size;\n"
6153 "    void *stack_addr;\n"
6154
6155 #. type: Plain text
6156 #: build/C/man3/pthread_getattr_np.3:203
6157 #, no-wrap
6158 msgid ""
6159 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
6160 "    if (s != 0)\n"
6161 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
6162 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
6163 msgstr ""
6164 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
6165 "    if (s != 0)\n"
6166 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
6167 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
6168
6169 #. type: Plain text
6170 #: build/C/man3/pthread_getattr_np.3:214
6171 #, no-wrap
6172 msgid ""
6173 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
6174 "    if (s != 0)\n"
6175 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
6176 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
6177 "    if (stack_size E<gt> 0)\n"
6178 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
6179 "    printf(\"\\en\");\n"
6180 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
6181 "            prefix, stack_size, stack_size);\n"
6182 "}\n"
6183 msgstr ""
6184 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
6185 "    if (s != 0)\n"
6186 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
6187 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
6188 "    if (stack_size E<gt> 0)\n"
6189 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
6190 "    printf(\"\\en\");\n"
6191 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
6192 "            prefix, stack_size, stack_size);\n"
6193 "}\n"
6194
6195 #. type: Plain text
6196 #: build/C/man3/pthread_getattr_np.3:220
6197 #, no-wrap
6198 msgid ""
6199 "static void\n"
6200 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6201 "{\n"
6202 "    int s;\n"
6203 "    pthread_attr_t attr;\n"
6204 msgstr ""
6205 "static void\n"
6206 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6207 "{\n"
6208 "    int s;\n"
6209 "    pthread_attr_t attr;\n"
6210
6211 #. type: Plain text
6212 #: build/C/man3/pthread_getattr_np.3:224
6213 #, no-wrap
6214 msgid ""
6215 "    s = pthread_getattr_np(thread, &attr);\n"
6216 "    if (s != 0)\n"
6217 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6218 msgstr ""
6219 "    s = pthread_getattr_np(thread, &attr);\n"
6220 "    if (s != 0)\n"
6221 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6222
6223 #. type: Plain text
6224 #: build/C/man3/pthread_getattr_np.3:226
6225 #, no-wrap
6226 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6227 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6228
6229 #. type: Plain text
6230 #: build/C/man3/pthread_getattr_np.3:231
6231 #, no-wrap
6232 msgid ""
6233 "    s = pthread_attr_destroy(&attr);\n"
6234 "    if (s != 0)\n"
6235 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6236 "}\n"
6237 msgstr ""
6238 "    s = pthread_attr_destroy(&attr);\n"
6239 "    if (s != 0)\n"
6240 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6241 "}\n"
6242
6243 #. type: Plain text
6244 #: build/C/man3/pthread_getattr_np.3:237
6245 #, no-wrap
6246 msgid ""
6247 "static void *           /* Start function for thread we create */\n"
6248 "thread_start(void *arg)\n"
6249 "{\n"
6250 "    printf(\"Attributes of created thread:\\en\");\n"
6251 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6252 msgstr ""
6253 "static void *           /* Start function for thread we create */\n"
6254 "thread_start(void *arg)\n"
6255 "{\n"
6256 "    printf(\"Attributes of created thread:\\en\");\n"
6257 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6258
6259 #. type: Plain text
6260 #: build/C/man3/pthread_getattr_np.3:251
6261 #, no-wrap
6262 msgid ""
6263 "static void\n"
6264 "usage(char *pname, char *msg)\n"
6265 "{\n"
6266 "    if (msg != NULL)\n"
6267 "        fputs(msg, stderr);\n"
6268 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6269 "            \" [-g guard-size]\\en\", pname);\n"
6270 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6271 "    exit(EXIT_FAILURE);\n"
6272 "}\n"
6273 msgstr ""
6274 "static void\n"
6275 "usage(char *pname, char *msg)\n"
6276 "{\n"
6277 "    if (msg != NULL)\n"
6278 "        fputs(msg, stderr);\n"
6279 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6280 "            \" [-g guard-size]\\en\", pname);\n"
6281 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6282 "    exit(EXIT_FAILURE);\n"
6283 "}\n"
6284
6285 #. type: Plain text
6286 #: build/C/man3/pthread_getattr_np.3:264
6287 #, no-wrap
6288 msgid ""
6289 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6290 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6291 "                              pthread_attr_t *attrp)\n"
6292 "{\n"
6293 "    int s, opt, allocate_stack;\n"
6294 "    long stack_size, guard_size;\n"
6295 "            void *stack_addr;\n"
6296 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6297 "                                           a thread attributes object */\n"
6298 "    allocate_stack = 0;\n"
6299 "    stack_size = -1;\n"
6300 "    guard_size = -1;\n"
6301 msgstr ""
6302 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6303 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6304 "                              pthread_attr_t *attrp)\n"
6305 "{\n"
6306 "    int s, opt, allocate_stack;\n"
6307 "    long stack_size, guard_size;\n"
6308 "            void *stack_addr;\n"
6309 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6310 "                                           a thread attributes object */\n"
6311 "    allocate_stack = 0;\n"
6312 "    stack_size = -1;\n"
6313 "    guard_size = -1;\n"
6314
6315 #. type: Plain text
6316 #: build/C/man3/pthread_getattr_np.3:273
6317 #, no-wrap
6318 msgid ""
6319 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6320 "        switch (opt) {\n"
6321 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6322 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6323 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6324 "        default:    usage(argv[0], NULL);\n"
6325 "        }\n"
6326 "    }\n"
6327 msgstr ""
6328 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6329 "        switch (opt) {\n"
6330 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6331 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6332 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6333 "        default:    usage(argv[0], NULL);\n"
6334 "        }\n"
6335 "    }\n"
6336
6337 #. type: Plain text
6338 #: build/C/man3/pthread_getattr_np.3:276
6339 #, no-wrap
6340 msgid ""
6341 "    if (allocate_stack && stack_size == -1)\n"
6342 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6343 msgstr ""
6344 "    if (allocate_stack && stack_size == -1)\n"
6345 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6346
6347 #. type: Plain text
6348 #: build/C/man3/pthread_getattr_np.3:279
6349 #, no-wrap
6350 msgid ""
6351 "    if (argc E<gt> optind)\n"
6352 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6353 msgstr ""
6354 "    if (argc E<gt> optind)\n"
6355 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6356
6357 #. type: Plain text
6358 #: build/C/man3/pthread_getattr_np.3:282
6359 #, no-wrap
6360 msgid ""
6361 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6362 "        ret_attrp = attrp;\n"
6363 msgstr ""
6364 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6365 "        ret_attrp = attrp;\n"
6366
6367 #. type: Plain text
6368 #: build/C/man3/pthread_getattr_np.3:287
6369 #, no-wrap
6370 msgid ""
6371 "        s = pthread_attr_init(attrp);\n"
6372 "        if (s != 0)\n"
6373 "            handle_error_en(s, \"pthread_attr_init\");\n"
6374 "    }\n"
6375 msgstr ""
6376 "        s = pthread_attr_init(attrp);\n"
6377 "        if (s != 0)\n"
6378 "            handle_error_en(s, \"pthread_attr_init\");\n"
6379 "    }\n"
6380
6381 #. type: Plain text
6382 #: build/C/man3/pthread_getattr_np.3:299
6383 #, no-wrap
6384 msgid ""
6385 "    if (stack_size E<gt>= 0) {\n"
6386 "        if (!allocate_stack) {\n"
6387 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6388 "            if (s != 0)\n"
6389 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6390 "        } else {\n"
6391 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6392 "                               stack_size);\n"
6393 "            if (s != 0)\n"
6394 "                handle_error_en(s, \"posix_memalign\");\n"
6395 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6396 msgstr ""
6397 "    if (stack_size E<gt>= 0) {\n"
6398 "        if (!allocate_stack) {\n"
6399 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6400 "            if (s != 0)\n"
6401 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6402 "        } else {\n"
6403 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6404 "                               stack_size);\n"
6405 "            if (s != 0)\n"
6406 "                handle_error_en(s, \"posix_memalign\");\n"
6407 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6408
6409 #. type: Plain text
6410 #: build/C/man3/pthread_getattr_np.3:305
6411 #, no-wrap
6412 msgid ""
6413 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6414 "            if (s != 0)\n"
6415 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6416 "        }\n"
6417 "    }\n"
6418 msgstr ""
6419 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6420 "            if (s != 0)\n"
6421 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6422 "        }\n"
6423 "    }\n"
6424
6425 #. type: Plain text
6426 #: build/C/man3/pthread_getattr_np.3:311
6427 #, no-wrap
6428 msgid ""
6429 "    if (guard_size E<gt>= 0) {\n"
6430 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6431 "        if (s != 0)\n"
6432 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6433 "    }\n"
6434 msgstr ""
6435 "    if (guard_size E<gt>= 0) {\n"
6436 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6437 "        if (s != 0)\n"
6438 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6439 "    }\n"
6440
6441 #. type: Plain text
6442 #: build/C/man3/pthread_getattr_np.3:314
6443 #, no-wrap
6444 msgid ""
6445 "    return ret_attrp;\n"
6446 "}\n"
6447 msgstr ""
6448 "    return ret_attrp;\n"
6449 "}\n"
6450
6451 #. type: Plain text
6452 #: build/C/man3/pthread_getattr_np.3:323
6453 #, no-wrap
6454 msgid ""
6455 "int\n"
6456 "main(int argc, char *argv[])\n"
6457 "{\n"
6458 "    int s;\n"
6459 "    pthread_t thr;\n"
6460 "    pthread_attr_t attr;\n"
6461 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6462 "                                        a thread attributes object */\n"
6463 msgstr ""
6464 "int\n"
6465 "main(int argc, char *argv[])\n"
6466 "{\n"
6467 "    int s;\n"
6468 "    pthread_t thr;\n"
6469 "    pthread_attr_t attr;\n"
6470 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6471 "                                        a thread attributes object */\n"
6472
6473 #. type: Plain text
6474 #: build/C/man3/pthread_getattr_np.3:325
6475 #, no-wrap
6476 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6477 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6478
6479 #. type: Plain text
6480 #: build/C/man3/pthread_getattr_np.3:331
6481 #, no-wrap
6482 msgid ""
6483 "    if (attrp != NULL) {\n"
6484 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6485 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6486 "        printf(\"\\en\");\n"
6487 "    }\n"
6488 msgstr ""
6489 "    if (attrp != NULL) {\n"
6490 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6491 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6492 "        printf(\"\\en\");\n"
6493 "    }\n"
6494
6495 #. type: Plain text
6496 #: build/C/man3/pthread_getattr_np.3:361
6497 msgid ""
6498 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6499 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6500 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6501 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6502 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6503 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6504 msgstr ""
6505 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6506 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6507 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6508 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6509 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6510 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6511
6512 #. type: TH
6513 #: build/C/man3/pthread_getcpuclockid.3:26
6514 #, no-wrap
6515 msgid "PTHREAD_GETCPUCLOCKID"
6516 msgstr "PTHREAD_GETCPUCLOCKID"
6517
6518 #. type: Plain text
6519 #: build/C/man3/pthread_getcpuclockid.3:29
6520 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6521 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6522
6523 #. type: Plain text
6524 #: build/C/man3/pthread_getcpuclockid.3:33
6525 #, no-wrap
6526 msgid ""
6527 "B<#include E<lt>pthread.hE<gt>>\n"
6528 "B<#include E<lt>time.hE<gt>>\n"
6529 msgstr ""
6530 "B<#include E<lt>pthread.hE<gt>>\n"
6531 "B<#include E<lt>time.hE<gt>>\n"
6532
6533 #. type: Plain text
6534 #: build/C/man3/pthread_getcpuclockid.3:35
6535 #, no-wrap
6536 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6537 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6538
6539 #.  The clockid is constructed as follows:
6540 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6541 #.  where CLOCK_IDFIELD_SIZE is 3.
6542 #. type: Plain text
6543 #: build/C/man3/pthread_getcpuclockid.3:46
6544 msgid ""
6545 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6546 "time clock of the thread I<thread>."
6547 msgstr ""
6548 "B<pthread_getcpuclockid>() 関数は、\n"
6549 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6550
6551 #. type: TP
6552 #: build/C/man3/pthread_getcpuclockid.3:50
6553 #, no-wrap
6554 msgid "B<ENOENT>"
6555 msgstr "B<ENOENT>"
6556
6557 #.  CLOCK_THREAD_CPUTIME_ID not defined
6558 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6559 #.  be possible if kernel thread IDs took more than 29 bits (which
6560 #.  they currently cannot).
6561 #. type: Plain text
6562 #: build/C/man3/pthread_getcpuclockid.3:58
6563 msgid "Per-thread CPU time clocks are not supported by the system."
6564 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6565
6566 #. type: Plain text
6567 #: build/C/man3/pthread_getcpuclockid.3:65
6568 msgid "This function is available in glibc since version 2.2."
6569 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6570
6571 #. type: Plain text
6572 #: build/C/man3/pthread_getcpuclockid.3:70
6573 #, fuzzy
6574 #| msgid "The B<pthread_yield>()  function is thread-safe."
6575 msgid "The B<pthread_getcpuclockid>()  function is thread-safe."
6576 msgstr "B<pthread_yield>() 関数はスレッドセーフである。"
6577
6578 #. type: Plain text
6579 #: build/C/man3/pthread_getcpuclockid.3:83
6580 msgid ""
6581 "When I<thread> refers to the calling thread, this function returns an "
6582 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6583 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6584 msgstr ""
6585 "I<thread> が呼び出したスレッドを参照している場合、\n"
6586 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6587 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6588 "を参照する ID が返される。"
6589
6590 #. type: Plain text
6591 #: build/C/man3/pthread_getcpuclockid.3:89
6592 msgid ""
6593 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6594 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6595 "the two threads.  The following shell session shows an example run:"
6596 msgstr ""
6597 "以下のプログラムは、スレッドを作成し、それから\n"
6598 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6599 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6600 "スレッド毎の CPU 時間を取得する。\n"
6601 "下記のシェルのセッションは実行例である。"
6602
6603 #. type: Plain text
6604 #: build/C/man3/pthread_getcpuclockid.3:99
6605 #, no-wrap
6606 msgid ""
6607 "$ B<./a.out>\n"
6608 "Main thread sleeping\n"
6609 "Subthread starting infinite loop\n"
6610 "Main thread consuming some CPU time...\n"
6611 "Process total CPU time:    1.368\n"
6612 "Main thread CPU time:      0.376\n"
6613 "Subthread CPU time:        0.992\n"
6614 msgstr ""
6615 "$ B<./a.out>\n"
6616 "Main thread sleeping\n"
6617 "Subthread starting infinite loop\n"
6618 "Main thread consuming some CPU time...\n"
6619 "Process total CPU time:    1.368\n"
6620 "Main thread CPU time:      0.376\n"
6621 "Subthread CPU time:        0.992\n"
6622
6623 #. type: Plain text
6624 #: build/C/man3/pthread_getcpuclockid.3:105
6625 #, no-wrap
6626 msgid "/* Link with \"-lrt\" */\n"
6627 msgstr "/* \"-lrt\" でリンクする */\n"
6628
6629 #. type: Plain text
6630 #: build/C/man3/pthread_getcpuclockid.3:113
6631 #, no-wrap
6632 msgid ""
6633 "#include E<lt>time.hE<gt>\n"
6634 "#include E<lt>stdio.hE<gt>\n"
6635 "#include E<lt>stdlib.hE<gt>\n"
6636 "#include E<lt>unistd.hE<gt>\n"
6637 "#include E<lt>pthread.hE<gt>\n"
6638 "#include E<lt>string.hE<gt>\n"
6639 "#include E<lt>errno.hE<gt>\n"
6640 msgstr ""
6641 "#include E<lt>time.hE<gt>\n"
6642 "#include E<lt>stdio.hE<gt>\n"
6643 "#include E<lt>stdlib.hE<gt>\n"
6644 "#include E<lt>unistd.hE<gt>\n"
6645 "#include E<lt>pthread.hE<gt>\n"
6646 "#include E<lt>string.hE<gt>\n"
6647 "#include E<lt>errno.hE<gt>\n"
6648
6649 #. type: Plain text
6650 #: build/C/man3/pthread_getcpuclockid.3:127
6651 #, no-wrap
6652 msgid ""
6653 "static void *\n"
6654 "thread_start(void *arg)\n"
6655 "{\n"
6656 "    printf(\"Subthread starting infinite loop\\en\");\n"
6657 "    for (;;)\n"
6658 "        continue;\n"
6659 "}\n"
6660 msgstr ""
6661 "static void *\n"
6662 "thread_start(void *arg)\n"
6663 "{\n"
6664 "    printf(\"Subthread starting infinite loop\\en\");\n"
6665 "    for (;;)\n"
6666 "        continue;\n"
6667 "}\n"
6668
6669 #. type: Plain text
6670 #: build/C/man3/pthread_getcpuclockid.3:132
6671 #, no-wrap
6672 msgid ""
6673 "static void\n"
6674 "pclock(char *msg, clockid_t cid)\n"
6675 "{\n"
6676 "    struct timespec ts;\n"
6677 msgstr ""
6678 "static void\n"
6679 "pclock(char *msg, clockid_t cid)\n"
6680 "{\n"
6681 "    struct timespec ts;\n"
6682
6683 #. type: Plain text
6684 #: build/C/man3/pthread_getcpuclockid.3:138
6685 #, no-wrap
6686 msgid ""
6687 "    printf(\"%s\", msg);\n"
6688 "    if (clock_gettime(cid, &ts) == -1)\n"
6689 "        handle_error(\"clock_gettime\");\n"
6690 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6691 "}\n"
6692 msgstr ""
6693 "    printf(\"%s\", msg);\n"
6694 "    if (clock_gettime(cid, &ts) == -1)\n"
6695 "        handle_error(\"clock_gettime\");\n"
6696 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6697 "}\n"
6698
6699 #. type: Plain text
6700 #: build/C/man3/pthread_getcpuclockid.3:145
6701 #, no-wrap
6702 msgid ""
6703 "int\n"
6704 "main(int argc, char *argv[])\n"
6705 "{\n"
6706 "    pthread_t thread;\n"
6707 "    clockid_t cid;\n"
6708 "    int j, s;\n"
6709 msgstr ""
6710 "int\n"
6711 "main(int argc, char *argv[])\n"
6712 "{\n"
6713 "    pthread_t thread;\n"
6714 "    clockid_t cid;\n"
6715 "    int j, s;\n"
6716
6717 #. type: Plain text
6718 #: build/C/man3/pthread_getcpuclockid.3:149
6719 #, no-wrap
6720 msgid ""
6721 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6722 "    if (s != 0)\n"
6723 "        handle_error_en(s, \"pthread_create\");\n"
6724 msgstr ""
6725 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6726 "    if (s != 0)\n"
6727 "        handle_error_en(s, \"pthread_create\");\n"
6728
6729 #. type: Plain text
6730 #: build/C/man3/pthread_getcpuclockid.3:152
6731 #, no-wrap
6732 msgid ""
6733 "    printf(\"Main thread sleeping\\en\");\n"
6734 "    sleep(1);\n"
6735 msgstr ""
6736 "    printf(\"Main thread sleeping\\en\");\n"
6737 "    sleep(1);\n"
6738
6739 #. type: Plain text
6740 #: build/C/man3/pthread_getcpuclockid.3:156
6741 #, no-wrap
6742 msgid ""
6743 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6744 "    for (j = 0; j E<lt> 2000000; j++)\n"
6745 "        getppid();\n"
6746 msgstr ""
6747 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6748 "    for (j = 0; j E<lt> 2000000; j++)\n"
6749 "        getppid();\n"
6750
6751 #. type: Plain text
6752 #: build/C/man3/pthread_getcpuclockid.3:158
6753 #, no-wrap
6754 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6755 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6756
6757 #. type: Plain text
6758 #: build/C/man3/pthread_getcpuclockid.3:163
6759 #, no-wrap
6760 msgid ""
6761 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6762 "    if (s != 0)\n"
6763 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6764 "    pclock(\"Main thread CPU time:   \", cid);\n"
6765 msgstr ""
6766 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6767 "    if (s != 0)\n"
6768 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6769 "    pclock(\"Main thread CPU time:   \", cid);\n"
6770
6771 #. type: Plain text
6772 #: build/C/man3/pthread_getcpuclockid.3:166
6773 #, no-wrap
6774 msgid ""
6775 "    /* The preceding 4 lines of code could have been replaced by:\n"
6776 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6777 msgstr ""
6778 "    /* The preceding 4 lines of code could have been replaced by:\n"
6779 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6780
6781 #. type: Plain text
6782 #: build/C/man3/pthread_getcpuclockid.3:171
6783 #, no-wrap
6784 msgid ""
6785 "    s = pthread_getcpuclockid(thread, &cid);\n"
6786 "    if (s != 0)\n"
6787 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6788 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6789 msgstr ""
6790 "    s = pthread_getcpuclockid(thread, &cid);\n"
6791 "    if (s != 0)\n"
6792 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6793 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6794
6795 #. type: Plain text
6796 #: build/C/man3/pthread_getcpuclockid.3:174
6797 #, no-wrap
6798 msgid ""
6799 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6800 "}\n"
6801 msgstr ""
6802 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6803 "}\n"
6804
6805 #. type: Plain text
6806 #: build/C/man3/pthread_getcpuclockid.3:183
6807 msgid ""
6808 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6809 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6810 msgstr ""
6811 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6812 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6813
6814 #. type: TH
6815 #: build/C/man3/pthread_join.3:26
6816 #, no-wrap
6817 msgid "PTHREAD_JOIN"
6818 msgstr "PTHREAD_JOIN"
6819
6820 #. type: Plain text
6821 #: build/C/man3/pthread_join.3:29
6822 msgid "pthread_join - join with a terminated thread"
6823 msgstr "pthread_join - 終了したスレッドを join する"
6824
6825 #. type: Plain text
6826 #: build/C/man3/pthread_join.3:34
6827 #, no-wrap
6828 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6829 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6830
6831 #. type: Plain text
6832 #: build/C/man3/pthread_join.3:49
6833 msgid ""
6834 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6835 "to terminate.  If that thread has already terminated, then "
6836 "B<pthread_join>()  returns immediately.  The thread specified by I<thread> "
6837 "must be joinable."
6838 msgstr ""
6839 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6840 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6841 "B<pthread_join>() はすぐに返る。\n"
6842 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6843
6844 #. type: Plain text
6845 #: build/C/man3/pthread_join.3:63
6846 msgid ""
6847 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6848 "the target thread (i.e., the value that the target thread supplied to "
6849 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6850 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6851 msgstr ""
6852 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6853 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6854 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6855 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6856
6857 #. type: Plain text
6858 #: build/C/man3/pthread_join.3:70
6859 msgid ""
6860 "If multiple threads simultaneously try to join with the same thread, the "
6861 "results are undefined.  If the thread calling B<pthread_join>()  is "
6862 "canceled, then the target thread will remain joinable (i.e., it will not be "
6863 "detached)."
6864 msgstr ""
6865 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6866 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6867 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6868 "ならない)。"
6869
6870 #. type: Plain text
6871 #: build/C/man3/pthread_join.3:75
6872 msgid ""
6873 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6874 "number."
6875 msgstr ""
6876 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6877 "エラーの場合、エラー番号を返す。"
6878
6879 #. type: TP
6880 #: build/C/man3/pthread_join.3:76
6881 #, no-wrap
6882 msgid "B<EDEADLK>"
6883 msgstr "B<EDEADLK>"
6884
6885 #.  The following verified by testing on glibc 2.8/NPTL:
6886 #.  The following verified by testing on glibc 2.8/NPTL:
6887 #. type: Plain text
6888 #: build/C/man3/pthread_join.3:85
6889 msgid ""
6890 "A deadlock was detected (e.g., two threads tried to join with each other); "
6891 "or I<thread> specifies the calling thread."
6892 msgstr ""
6893 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6894 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6895
6896 #.  POSIX.1-2001 does not specify this error case.
6897 #. type: Plain text
6898 #: build/C/man3/pthread_join.3:93
6899 msgid "Another thread is already waiting to join with this thread."
6900 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6901
6902 #. type: Plain text
6903 #: build/C/man3/pthread_join.3:104
6904 msgid ""
6905 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6906 "the target thread has terminated."
6907 msgstr ""
6908 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6909 "呼び出し側には、対象スレッドが終了していることが保証される。"
6910
6911 #. type: Plain text
6912 #: build/C/man3/pthread_join.3:107
6913 msgid ""
6914 "Joining with a thread that has previously been joined results in undefined "
6915 "behavior."
6916 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6917
6918 #. type: Plain text
6919 #: build/C/man3/pthread_join.3:115
6920 msgid ""
6921 "Failure to join with a thread that is joinable (i.e., one that is not "
6922 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6923 "zombie thread consumes some system resources, and when enough zombie threads "
6924 "have accumulated, it will no longer be possible to create new threads (or "
6925 "processes)."
6926 msgstr ""
6927 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6928 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6929 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6930 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6931 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6932 "このようなことが起きるのは避けること。"
6933
6934 #. type: Plain text
6935 #: build/C/man3/pthread_join.3:121
6936 msgid ""
6937 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6938 "\"join with any terminated thread\".  If you believe you need this "
6939 "functionality, you probably need to rethink your application design."
6940 msgstr ""
6941 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6942 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6943 "この機能が必要だと思うような場合には、おそらく\n"
6944 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6945
6946 #. type: Plain text
6947 #: build/C/man3/pthread_join.3:124
6948 msgid ""
6949 "All of the threads in a process are peers: any thread can join with any "
6950 "other thread in the process."
6951 msgstr ""
6952 "プロセス内の全てのスレッドは対等であり、\n"
6953 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6954
6955 #. type: Plain text
6956 #: build/C/man3/pthread_join.3:134
6957 msgid ""
6958 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6959 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6960 msgstr ""
6961 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6962 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6963
6964 #. type: TH
6965 #: build/C/man3/pthread_kill.3:26
6966 #, no-wrap
6967 msgid "PTHREAD_KILL"
6968 msgstr "PTHREAD_KILL"
6969
6970 #. type: TH
6971 #: build/C/man3/pthread_kill.3:26
6972 #: build/C/man3/pthread_kill_other_threads_np.3:26
6973 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setcancelstate.3:26
6974 #: build/C/man3/pthread_yield.3:25
6975 #, no-wrap
6976 msgid "2014-05-13"
6977 msgstr "2014-05-13"
6978
6979 #. type: Plain text
6980 #: build/C/man3/pthread_kill.3:29
6981 msgid "pthread_kill - send a signal to a thread"
6982 msgstr "pthread_kill - スレッドにシグナルを送信する"
6983
6984 #. type: Plain text
6985 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6986 #, no-wrap
6987 msgid "B<#include E<lt>signal.hE<gt>>\n"
6988 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6989
6990 #. type: Plain text
6991 #: build/C/man3/pthread_kill.3:34
6992 #, no-wrap
6993 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6994 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6995
6996 #. type: Plain text
6997 #: build/C/man3/pthread_kill.3:45
6998 msgid "B<pthread_kill>():"
6999 msgstr "B<pthread_kill>():"
7000
7001 #. type: Plain text
7002 #: build/C/man3/pthread_kill.3:47 build/C/man3/pthread_sigmask.3:48
7003 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 199506L || _XOPEN_SOURCE\\ E<gt>=\\ 500"
7004 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 199506L || _XOPEN_SOURCE\\ E<gt>=\\ 500"
7005
7006 #. type: Plain text
7007 #: build/C/man3/pthread_kill.3:59
7008 msgid ""
7009 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
7010 "thread in the same process as the caller.  The signal is asynchronously "
7011 "directed to I<thread>."
7012 msgstr ""
7013 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
7014 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
7015 "シグナルは非同期に I<thread> へ直接送られる。"
7016
7017 #. type: Plain text
7018 #: build/C/man3/pthread_kill.3:63
7019 msgid ""
7020 "If I<sig> is 0, then no signal is sent, but error checking is still "
7021 "performed."
7022 msgstr ""
7023 "I<sig> が 0 の場合、シグナルは送信されないが、エラーチェックだけは実行され"
7024 "る。"
7025
7026 #. type: Plain text
7027 #: build/C/man3/pthread_kill.3:68
7028 msgid ""
7029 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
7030 "number, and no signal is sent."
7031 msgstr ""
7032 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
7033 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
7034
7035 #. type: Plain text
7036 #: build/C/man3/pthread_kill.3:72
7037 msgid "An invalid signal was specified."
7038 msgstr "無効なシグナルが指定された。"
7039
7040 #. type: Plain text
7041 #: build/C/man3/pthread_kill.3:77
7042 msgid "The B<pthread_kill>()  function is thread-safe."
7043 msgstr "B<pthread_kill>() 関数はスレッドセーフである。"
7044
7045 #. type: Plain text
7046 #: build/C/man3/pthread_kill.3:79
7047 msgid "POSIX.1-2008."
7048 msgstr "POSIX.1-2008."
7049
7050 #. type: Plain text
7051 #: build/C/man3/pthread_kill.3:86
7052 msgid ""
7053 "Signal dispositions are process-wide: if a signal handler is installed, the "
7054 "handler will be invoked in the thread I<thread>, but if the disposition of "
7055 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
7056 "affect the whole process."
7057 msgstr ""
7058 "シグナルの配送はプロセス全体で行われる。\n"
7059 "シグナルハンドラが設定されている場合、\n"
7060 "そのハンドラがスレッド I<thread> で起動されるが、\n"
7061 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
7062 "シグナルに対するアクションはプロセス全体に影響がある。"
7063
7064 #. type: Plain text
7065 #: build/C/man3/pthread_kill.3:99
7066 msgid ""
7067 "POSIX.1-2008 recommends that if an implementation detects the use of a "
7068 "thread ID after the end of its lifetime, B<pthread_kill>()  should return "
7069 "the error B<ESRCH>.  The glibc implementation returns this error in the "
7070 "cases where an invalid thread ID can be detected.  But note also that POSIX "
7071 "says that an attempt to use a thread ID whose lifetime has ended produces "
7072 "undefined behavior, and an attempt to use an invalid thread ID in a call to "
7073 "B<pthread_kill>()  can, for example, cause a segmentation fault."
7074 msgstr ""
7075 "POSIX.1-2008 では、 スレッドが終了した後にそのスレッド ID が使用されたことを"
7076 "検出した場合に、 B<pthread_kill>() はエラー B<ESRCH> を返すことを推奨されてい"
7077 "る。 glibc の実装では、無効なスレッド ID を検出できる場合にはこのエラーを返"
7078 "す。 しかし、 POSIX では、 終了したスレッド ID を使おうとした場合の動作は不定"
7079 "であり、 B<pthread_kill>() で無効なスレッド ID を使おうとした場合には、 例え"
7080 "ば、 セグメンテーションフォールトになる可能性もある点に注意すること。"
7081
7082 #. type: Plain text
7083 #: build/C/man3/pthread_kill.3:108
7084 msgid ""
7085 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
7086 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
7087 msgstr ""
7088 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
7089 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
7090
7091 #. type: TH
7092 #: build/C/man3/pthread_kill_other_threads_np.3:26
7093 #, no-wrap
7094 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
7095 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
7096
7097 #. type: Plain text
7098 #: build/C/man3/pthread_kill_other_threads_np.3:29
7099 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
7100 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
7101
7102 #. type: Plain text
7103 #: build/C/man3/pthread_kill_other_threads_np.3:34
7104 #, no-wrap
7105 msgid "B<void pthread_kill_other_threads_np(void);>\n"
7106 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
7107
7108 #.  .SH VERSIONS
7109 #.  Available since glibc 2.0
7110 #. type: Plain text
7111 #: build/C/man3/pthread_kill_other_threads_np.3:47
7112 msgid ""
7113 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
7114 "threading implementation.  On that implementation, calling this function "
7115 "causes the immediate termination of all threads in the application, except "
7116 "the calling thread.  The cancellation state and cancellation type of the to-"
7117 "be-terminated threads are ignored, and the cleanup handlers are not called "
7118 "in those threads."
7119 msgstr ""
7120 "B<pthread_kill_other_threads_np>() は、\n"
7121 "LinuxThreads スレッド実装においてのみ効果がある。\n"
7122 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
7123 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
7124 "終了対象のスレッドの cancelability state と cancelability type は\n"
7125 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
7126
7127 #. type: Plain text
7128 #: build/C/man3/pthread_kill_other_threads_np.3:52
7129 msgid "The B<pthread_kill_other_threads_np>()  function is thread-safe."
7130 msgstr "B<pthread_kill_other_threads_np>() 関数はスレッドセーフである。"
7131
7132 #. type: Plain text
7133 #: build/C/man3/pthread_kill_other_threads_np.3:64
7134 msgid ""
7135 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
7136 "thread calls B<execve>(2)  or a similar function.  This function is designed "
7137 "to address a limitation in the obsolete LinuxThreads implementation whereby "
7138 "the other threads of an application are not automatically terminated (as "
7139 "POSIX.1-2001 requires) during B<execve>(2)."
7140 msgstr ""
7141 "B<pthread_kill_other_threads_np>() は、\n"
7142 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
7143 "呼ばれることを目的として用意されている。\n"
7144 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
7145 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
7146 "終了されないという制限を解決するために設計された。"
7147
7148 #. type: Plain text
7149 #: build/C/man3/pthread_kill_other_threads_np.3:71
7150 msgid ""
7151 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
7152 "exists, but does nothing.  (Nothing needs to be done, because the "
7153 "implementation does the right thing during an B<execve>(2).)"
7154 msgstr ""
7155 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
7156 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
7157 "何もする必要がないということだ)。"
7158
7159 #. type: Plain text
7160 #: build/C/man3/pthread_kill_other_threads_np.3:77
7161 msgid ""
7162 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
7163 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
7164 msgstr ""
7165 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
7166 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
7167
7168 #. type: TH
7169 #: build/C/man3/pthread_self.3:26
7170 #, no-wrap
7171 msgid "PTHREAD_SELF"
7172 msgstr "PTHREAD_SELF"
7173
7174 #. type: Plain text
7175 #: build/C/man3/pthread_self.3:29
7176 msgid "pthread_self - obtain ID of the calling thread"
7177 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
7178
7179 #. type: Plain text
7180 #: build/C/man3/pthread_self.3:34
7181 #, no-wrap
7182 msgid "B<pthread_t pthread_self(void);>\n"
7183 msgstr "B<pthread_t pthread_self(void);>\n"
7184
7185 #. type: Plain text
7186 #: build/C/man3/pthread_self.3:46
7187 msgid ""
7188 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
7189 "is the same value that is returned in I<*thread> in the "
7190 "B<pthread_create>(3)  call that created this thread."
7191 msgstr ""
7192 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
7193 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
7194 "呼び出しで I<*thread> で返されるのと同じ値である。"
7195
7196 #. type: Plain text
7197 #: build/C/man3/pthread_self.3:48
7198 msgid "This function always succeeds, returning the calling thread's ID."
7199 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
7200
7201 #. type: Plain text
7202 #: build/C/man3/pthread_self.3:55
7203 msgid "The B<pthread_self>()  function is thread-safe."
7204 msgstr "B<pthread_self>() 関数はスレッドセーフである。"
7205
7206 #. type: Plain text
7207 #: build/C/man3/pthread_self.3:68
7208 msgid ""
7209 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
7210 "represent a thread ID; for example, representation using either an "
7211 "arithmetic type or a structure is permitted.  Therefore, variables of type "
7212 "I<pthread_t> can't portably be compared using the C equality operator "
7213 "(B<==>); use B<pthread_equal>(3)  instead."
7214 msgstr ""
7215 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
7216 "スレッド実装が完全に自由に選択してよいことになっている。\n"
7217 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
7218 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
7219 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
7220 "代わりに B<pthread_equal>(3) を使うこと。"
7221
7222 #. type: Plain text
7223 #: build/C/man3/pthread_self.3:72
7224 msgid ""
7225 "Thread identifiers should be considered opaque: any attempt to use a thread "
7226 "ID other than in pthreads calls is nonportable and can lead to unspecified "
7227 "results."
7228 msgstr ""
7229 "スレッド識別子はその内部構造を意識すべきではない。\n"
7230 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
7231 "移植性がなくなり、どのような結果が得られるかも分からない。"
7232
7233 #. type: Plain text
7234 #: build/C/man3/pthread_self.3:76
7235 msgid ""
7236 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
7237 "may be reused after a terminated thread has been joined, or a detached "
7238 "thread has terminated."
7239 msgstr ""
7240 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
7241 "終了したスレッドが join されたり、\n"
7242 "切り離された (detached) スレッドが終了されたりした後は、\n"
7243 "そのスレッド ID は再利用されることがある。"
7244
7245 #. type: Plain text
7246 #: build/C/man3/pthread_self.3:81
7247 msgid ""
7248 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
7249 "kernel thread ID returned by a call to B<gettid>(2)."
7250 msgstr ""
7251 "B<pthread_self>() が返すスレッド ID は、\n"
7252 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
7253
7254 #. type: Plain text
7255 #: build/C/man3/pthread_self.3:85
7256 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7257 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7258
7259 #. type: TH
7260 #: build/C/man3/pthread_setaffinity_np.3:26
7261 #, no-wrap
7262 msgid "PTHREAD_SETAFFINITY_NP"
7263 msgstr "PTHREAD_SETAFFINITY_NP"
7264
7265 #. type: Plain text
7266 #: build/C/man3/pthread_setaffinity_np.3:30
7267 msgid ""
7268 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7269 "thread"
7270 msgstr ""
7271 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7272 "CPU affinity の設定/取得を行う"
7273
7274 #. type: Plain text
7275 #: build/C/man3/pthread_setaffinity_np.3:39
7276 #, no-wrap
7277 msgid ""
7278 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7279 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7280 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7281 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7282 msgstr ""
7283 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7284 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7285 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7286 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7287
7288 #. type: Plain text
7289 #: build/C/man3/pthread_setaffinity_np.3:54
7290 msgid ""
7291 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7292 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7293 "successful, and the thread is not currently running on one of the CPUs in "
7294 "I<cpuset>, then it is migrated to one of those CPUs."
7295 msgstr ""
7296 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7297 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7298 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7299 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7300
7301 #. type: Plain text
7302 #: build/C/man3/pthread_setaffinity_np.3:61
7303 msgid ""
7304 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7305 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7306 msgstr ""
7307 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7308 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7309
7310 #. type: Plain text
7311 #: build/C/man3/pthread_setaffinity_np.3:77
7312 msgid ""
7313 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7314 "by I<cpuset>.  Typically, this argument would be specified as "
7315 "I<sizeof(cpu_set_t)>.  (It may be some other value, if using the macros "
7316 "described in B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7317 msgstr ""
7318 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7319 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7320 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7321 "割り当てている場合には、別の値になることもある)。"
7322
7323 #. type: TP
7324 #: build/C/man3/pthread_setaffinity_np.3:81
7325 #, no-wrap
7326 msgid "B<EFAULT>"
7327 msgstr "B<EFAULT>"
7328
7329 #. type: Plain text
7330 #: build/C/man3/pthread_setaffinity_np.3:84
7331 msgid "A supplied memory address was invalid."
7332 msgstr "指定されたメモリアドレスが無効である。"
7333
7334 #. type: Plain text
7335 #: build/C/man3/pthread_setaffinity_np.3:93
7336 msgid ""
7337 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7338 "processors that are currently physically on the system and permitted to the "
7339 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7340 "mechanism described in B<cpuset>(7)."
7341 msgstr ""
7342 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7343 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7344 "されているプロセッサが一つも含まれていない。\n"
7345 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7346 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7347
7348 #.  FIXME . ?
7349 #.  Loic Domaigne commented: it seems that in the future the
7350 #.  kernel developers want to make cpumask_t dynamic, so
7351 #.  CONFIG_NR_CPUS might become obsolete in the future.
7352 #.  cpumask_t
7353 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7354 #.  of the cpumask_t type.
7355 #. type: Plain text
7356 #: build/C/man3/pthread_setaffinity_np.3:109
7357 msgid ""
7358 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7359 "the set supported by the kernel.  (The kernel configuration option "
7360 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7361 "type used to represent CPU sets.)"
7362 msgstr ""
7363 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7364 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7365 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7366 "データ型がサポートする CPU 集合の範囲が定義される。)"
7367
7368 #. type: Plain text
7369 #: build/C/man3/pthread_setaffinity_np.3:114
7370 msgid ""
7371 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7372 "affinity mask used by the kernel."
7373 msgstr ""
7374 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7375 "affinity マスクの大きさよりも小さい。"
7376
7377 #. type: Plain text
7378 #: build/C/man3/pthread_setaffinity_np.3:128
7379 #, fuzzy
7380 #| msgid ""
7381 #| "The B<pthread_setcancelstate>()  and B<pthread_setcanceltype>()  "
7382 #| "functions are thread-safe."
7383 msgid ""
7384 "The B<pthread_setaffinity_np>()  and B<pthread_getaffinity_np>()  functions "
7385 "are thread-safe."
7386 msgstr ""
7387 "関数 B<pthread_setcancelstate>() と B<pthread_setcanceltype>() はスレッドセー"
7388 "フである。"
7389
7390 #. type: Plain text
7391 #: build/C/man3/pthread_setaffinity_np.3:144
7392 msgid ""
7393 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7394 "thread will actually run is the intersection of the set specified in the "
7395 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7396 "system may further restrict the set of CPUs on which the thread runs if the "
7397 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7398 "restrictions on the actual set of CPUs on which the thread will run are "
7399 "silently imposed by the kernel."
7400 msgstr ""
7401 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7402 "そのスレッドが実際に実行される CPU 集合は、\n"
7403 "I<cpuset> 引き数で指定された集合と\n"
7404 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7405 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7406 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7407 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7408 "これらの制限は、カーネルにより黙って適用される。"
7409
7410 #. type: Plain text
7411 #: build/C/man3/pthread_setaffinity_np.3:150
7412 msgid ""
7413 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7414 "B<sched_getaffinity>(2)  system calls."
7415 msgstr ""
7416 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7417 "B<sched_getaffinity>(2) を使って実装されている。"
7418
7419 #. type: Plain text
7420 #: build/C/man3/pthread_setaffinity_np.3:161
7421 msgid ""
7422 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7423 "creator's CPU affinity mask."
7424 msgstr ""
7425 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7426 "作成者の CPU affinity マスクを継承する。"
7427
7428 #. type: Plain text
7429 #: build/C/man3/pthread_setaffinity_np.3:169
7430 msgid ""
7431 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7432 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7433 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7434 "check the resulting CPU affinity mask of the thread."
7435 msgstr ""
7436 "以下のプログラムでは、メインスレッドは\n"
7437 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7438 "CPU 0 から 7 が含まれるように設定し\n"
7439 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7440 "その後で B<pthread_getaffinity_np>() を使って\n"
7441 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7442
7443 #. type: Plain text
7444 #: build/C/man3/pthread_setaffinity_np.3:176
7445 #, no-wrap
7446 msgid ""
7447 "#define _GNU_SOURCE\n"
7448 "#include E<lt>pthread.hE<gt>\n"
7449 "#include E<lt>stdio.hE<gt>\n"
7450 "#include E<lt>stdlib.hE<gt>\n"
7451 "#include E<lt>errno.hE<gt>\n"
7452 msgstr ""
7453 "#define _GNU_SOURCE\n"
7454 "#include E<lt>pthread.hE<gt>\n"
7455 "#include E<lt>stdio.hE<gt>\n"
7456 "#include E<lt>stdlib.hE<gt>\n"
7457 "#include E<lt>errno.hE<gt>\n"
7458
7459 #. type: Plain text
7460 #: build/C/man3/pthread_setaffinity_np.3:186
7461 #, no-wrap
7462 msgid ""
7463 "int\n"
7464 "main(int argc, char *argv[])\n"
7465 "{\n"
7466 "    int s, j;\n"
7467 "    cpu_set_t cpuset;\n"
7468 "    pthread_t thread;\n"
7469 msgstr ""
7470 "int\n"
7471 "main(int argc, char *argv[])\n"
7472 "{\n"
7473 "    int s, j;\n"
7474 "    cpu_set_t cpuset;\n"
7475 "    pthread_t thread;\n"
7476
7477 #. type: Plain text
7478 #: build/C/man3/pthread_setaffinity_np.3:188
7479 #, no-wrap
7480 msgid "    thread = pthread_self();\n"
7481 msgstr "    thread = pthread_self();\n"
7482
7483 #. type: Plain text
7484 #: build/C/man3/pthread_setaffinity_np.3:190
7485 #, no-wrap
7486 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7487 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7488
7489 #. type: Plain text
7490 #: build/C/man3/pthread_setaffinity_np.3:194
7491 #, no-wrap
7492 msgid ""
7493 "    CPU_ZERO(&cpuset);\n"
7494 "    for (j = 0; j E<lt> 8; j++)\n"
7495 "        CPU_SET(j, &cpuset);\n"
7496 msgstr ""
7497 "    CPU_ZERO(&cpuset);\n"
7498 "    for (j = 0; j E<lt> 8; j++)\n"
7499 "        CPU_SET(j, &cpuset);\n"
7500
7501 #. type: Plain text
7502 #: build/C/man3/pthread_setaffinity_np.3:198
7503 #, no-wrap
7504 msgid ""
7505 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7506 "    if (s != 0)\n"
7507 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7508 msgstr ""
7509 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7510 "    if (s != 0)\n"
7511 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7512
7513 #. type: Plain text
7514 #: build/C/man3/pthread_setaffinity_np.3:200
7515 #, no-wrap
7516 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7517 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7518
7519 #. type: Plain text
7520 #: build/C/man3/pthread_setaffinity_np.3:204
7521 #, no-wrap
7522 msgid ""
7523 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7524 "    if (s != 0)\n"
7525 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7526 msgstr ""
7527 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7528 "    if (s != 0)\n"
7529 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7530
7531 #. type: Plain text
7532 #: build/C/man3/pthread_setaffinity_np.3:209
7533 #, no-wrap
7534 msgid ""
7535 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7536 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7537 "        if (CPU_ISSET(j, &cpuset))\n"
7538 "            printf(\"    CPU %d\\en\", j);\n"
7539 msgstr ""
7540 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7541 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7542 "        if (CPU_ISSET(j, &cpuset))\n"
7543 "            printf(\"    CPU %d\\en\", j);\n"
7544
7545 #. type: Plain text
7546 #: build/C/man3/pthread_setaffinity_np.3:212
7547 #: build/C/man3/pthread_setschedparam.3:437
7548 #, no-wrap
7549 msgid ""
7550 "    exit(EXIT_SUCCESS);\n"
7551 "}\n"
7552 msgstr ""
7553 "    exit(EXIT_SUCCESS);\n"
7554 "}\n"
7555
7556 #. type: Plain text
7557 #: build/C/man3/pthread_setaffinity_np.3:221
7558 msgid ""
7559 "B<sched_setaffinity>(2), B<pthread_attr_setaffinity_np>(3), "
7560 "B<pthread_self>(3), B<sched_getcpu>(3), B<cpuset>(7), B<pthreads>(7), "
7561 "B<sched>(7)"
7562 msgstr ""
7563 "B<sched_setaffinity>(2), B<pthread_attr_setaffinity_np>(3), "
7564 "B<pthread_self>(3), B<sched_getcpu>(3), B<cpuset>(7), B<pthreads>(7), "
7565 "B<sched>(7)"
7566
7567 #. type: TH
7568 #: build/C/man3/pthread_setcancelstate.3:26
7569 #, no-wrap
7570 msgid "PTHREAD_SETCANCELSTATE"
7571 msgstr "PTHREAD_SETCANCELSTATE"
7572
7573 #. type: Plain text
7574 #: build/C/man3/pthread_setcancelstate.3:30
7575 msgid ""
7576 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7577 "type"
7578 msgstr ""
7579 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7580 "cancelability type を設定する"
7581
7582 #. type: Plain text
7583 #: build/C/man3/pthread_setcancelstate.3:36
7584 #, no-wrap
7585 msgid ""
7586 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7587 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7588 msgstr ""
7589 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7590 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7591
7592 #. type: Plain text
7593 #: build/C/man3/pthread_setcancelstate.3:51
7594 msgid ""
7595 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7596 "thread to the value given in I<state>.  The previous cancelability state of "
7597 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7598 "I<state> argument must have one of the following values:"
7599 msgstr ""
7600 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7601 "cancelability state に I<state> で指定された\n"
7602 "値を設定する。変更前のスレッドの cancelability state は\n"
7603 "I<oldstate> が指すバッファで返される。\n"
7604 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7605
7606 #. type: TP
7607 #: build/C/man3/pthread_setcancelstate.3:51
7608 #, no-wrap
7609 msgid "B<PTHREAD_CANCEL_ENABLE>"
7610 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7611
7612 #. type: Plain text
7613 #: build/C/man3/pthread_setcancelstate.3:58
7614 msgid ""
7615 "The thread is cancelable.  This is the default cancelability state in all "
7616 "new threads, including the initial thread.  The thread's cancelability type "
7617 "determines when a cancelable thread will respond to a cancellation request."
7618 msgstr ""
7619 "スレッドは取り消し可能 (cancelable) である。\n"
7620 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7621 "cancelability state である。これには最初のスレッドも含まれる。\n"
7622 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7623 "取り消し要求にいつ反応するかが決まる。"
7624
7625 #. type: TP
7626 #: build/C/man3/pthread_setcancelstate.3:58
7627 #, no-wrap
7628 msgid "B<PTHREAD_CANCEL_DISABLE>"
7629 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7630
7631 #. type: Plain text
7632 #: build/C/man3/pthread_setcancelstate.3:63
7633 msgid ""
7634 "The thread is not cancelable.  If a cancellation request is received, it is "
7635 "blocked until cancelability is enabled."
7636 msgstr ""
7637 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7638 "取り消し可能に設定されるまでその要求はブロックされる。"
7639
7640 #. type: Plain text
7641 #: build/C/man3/pthread_setcancelstate.3:75
7642 msgid ""
7643 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7644 "thread to the value given in I<type>.  The previous cancelability type of "
7645 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7646 "argument must have one of the following values:"
7647 msgstr ""
7648 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7649 "cancelability type に I<type> で指定された値を設定する。\n"
7650 "変更前のスレッドの cancelability type は\n"
7651 "I<oldtype> が指すバッファで返される。\n"
7652 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7653
7654 #. type: TP
7655 #: build/C/man3/pthread_setcancelstate.3:75
7656 #, no-wrap
7657 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7658 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7659
7660 #. type: Plain text
7661 #: build/C/man3/pthread_setcancelstate.3:82
7662 msgid ""
7663 "A cancellation request is deferred until the thread next calls a function "
7664 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7665 "cancelability type in all new threads, including the initial thread."
7666 msgstr ""
7667 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7668 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7669 "スレッドでのデフォルトの cancelability type である。\n"
7670 "これには最初のスレッドも含まれる。"
7671
7672 #. type: TP
7673 #: build/C/man3/pthread_setcancelstate.3:82
7674 #, no-wrap
7675 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7676 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7677
7678 #. type: Plain text
7679 #: build/C/man3/pthread_setcancelstate.3:88
7680 msgid ""
7681 "The thread can be canceled at any time.  (Typically, it will be canceled "
7682 "immediately upon receiving a cancellation request, but the system doesn't "
7683 "guarantee this.)"
7684 msgstr ""
7685 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7686 "システムがそのことを保証しているわけではない)。"
7687
7688 #. type: Plain text
7689 #: build/C/man3/pthread_setcancelstate.3:92
7690 msgid ""
7691 "The set-and-get operation performed by each of these functions is atomic "
7692 "with respect to other threads in the process calling the same function."
7693 msgstr ""
7694 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7695 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7696 "アトミックに行われる。"
7697
7698 #. type: Plain text
7699 #: build/C/man3/pthread_setcancelstate.3:99
7700 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7701 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7702
7703 #. type: Plain text
7704 #: build/C/man3/pthread_setcancelstate.3:103
7705 msgid "Invalid value for I<state>."
7706 msgstr "I<state> に無効な値が指定された。"
7707
7708 #. type: Plain text
7709 #: build/C/man3/pthread_setcancelstate.3:107
7710 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7711 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7712
7713 #.  .SH VERSIONS
7714 #.  Available since glibc 2.0
7715 #. type: Plain text
7716 #: build/C/man3/pthread_setcancelstate.3:113
7717 msgid "Invalid value for I<type>."
7718 msgstr "I<type> に無効な値が指定された。"
7719
7720 #. type: Plain text
7721 #: build/C/man3/pthread_setcancelstate.3:120
7722 msgid ""
7723 "The B<pthread_setcancelstate>()  and B<pthread_setcanceltype>()  functions "
7724 "are thread-safe."
7725 msgstr ""
7726 "関数 B<pthread_setcancelstate>() と B<pthread_setcanceltype>() はスレッドセー"
7727 "フである。"
7728
7729 #. type: Plain text
7730 #: build/C/man3/pthread_setcancelstate.3:125
7731 msgid ""
7732 "For details of what happens when a thread is canceled, see "
7733 "B<pthread_cancel>(3)."
7734 msgstr ""
7735 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7736 "B<pthread_cancel>(3) を参照。"
7737
7738 #. type: Plain text
7739 #: build/C/man3/pthread_setcancelstate.3:132
7740 msgid ""
7741 "Briefly disabling cancelability is useful if a thread performs some critical "
7742 "action that must not be interrupted by a cancellation request.  Beware of "
7743 "disabling cancelability for long periods, or around operations that may "
7744 "block for long periods, since that will render the thread unresponsive to "
7745 "cancellation requests."
7746 msgstr ""
7747 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7748 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7749 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7750 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7751 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7752 "スレッドが応答しない状態になってしまうからである。"
7753
7754 #. type: SS
7755 #: build/C/man3/pthread_setcancelstate.3:132
7756 #, no-wrap
7757 msgid "Asynchronous cancelability"
7758 msgstr "非同期キャンセル"
7759
7760 #. type: Plain text
7761 #: build/C/man3/pthread_setcancelstate.3:151
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> に設定して役に立つことは"
7776 "めったにない。スレッドはI<いつでも>キャンセルすることができることになるので、"
7777 "スレッドが安全にリソースの確保 (例えば B<malloc>(3) でメモリを割り当てる) や "
7778 "mutex、セマフォ、ロックなどの獲得を行うことができない。アプリケーションは、ス"
7779 "レッドがキャンセルされる際に、これらのリソースがどのような状態にあるかを知る"
7780 "術はないので、リソースの確保が安全ではなくなる。つまり、キャンセルが起こった"
7781 "のが、リソースの確保前なのか、確保中なのか、確保後なのかが分からない。さら"
7782 "に、関数呼び出しの最中にキャンセルが発生すると、いくつかの内部データ構造 (例"
7783 "えば、B<malloc>(3) 関連の関数が管理している未使用ブロックのリンクリスト) が一"
7784 "貫性のない状態のままになってしまう可能性がある。その結果、クリーンアップハン"
7785 "ドラが役に立たないものになってしまう。"
7786
7787 #. type: Plain text
7788 #: build/C/man3/pthread_setcancelstate.3:162
7789 msgid ""
7790 "Functions that can be safely asynchronously canceled are called I<async-"
7791 "cancel-safe functions>.  POSIX.1-2001 requires only that "
7792 "B<pthread_cancel>(3), B<pthread_setcancelstate>(), and "
7793 "B<pthread_setcanceltype>()  be async-cancel-safe.  In general, other library "
7794 "functions can't be safely called from an asynchronously cancelable thread."
7795 msgstr ""
7796 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と呼ばれ"
7797 "る。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求められている関数"
7798 "は B<pthread_cancel>(3), B<pthread_setcancelstate>(), "
7799 "B<pthread_setcanceltype>() だけである。 一般的には、それ以外のライブラリ関数"
7800 "は、非同期にキャンセルできるスレッドから安全に呼び出すことはできない。"
7801
7802 #. type: Plain text
7803 #: build/C/man3/pthread_setcancelstate.3:165
7804 msgid ""
7805 "One of the few circumstances in which asynchronous cancelability is useful "
7806 "is for cancellation of a thread that is in a pure compute-bound loop."
7807 msgstr ""
7808 "非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを行うループ"
7809 "に入っているスレッドをキャンセルするといった場面がある。"
7810
7811 #. type: SS
7812 #: build/C/man3/pthread_setcancelstate.3:165
7813 #, no-wrap
7814 msgid "Portability notes"
7815 msgstr "移植性に関する注意"
7816
7817 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7818 #. type: Plain text
7819 #: build/C/man3/pthread_setcancelstate.3:183
7820 msgid ""
7821 "The Linux threading implementations permit the I<oldstate> argument of "
7822 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7823 "the previous cancelability state is not returned to the caller.  Many other "
7824 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7825 "does not specify this point, so portable applications should always specify "
7826 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7827 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7828 msgstr ""
7829 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7830 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7831 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7832 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7833 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7834 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7835 "NULL 以外の値を指定するようにすべきである。\n"
7836 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7837 "全く同じことが言える。"
7838
7839 #. type: Plain text
7840 #: build/C/man3/pthread_setcancelstate.3:186
7841 msgid "See B<pthread_cancel>(3)."
7842 msgstr "B<pthread_cancel>(3) を参照。"
7843
7844 #. type: Plain text
7845 #: build/C/man3/pthread_setcancelstate.3:191
7846 msgid ""
7847 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7848 "B<pthreads>(7)"
7849 msgstr ""
7850 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7851 "B<pthreads>(7)"
7852
7853 #. type: TH
7854 #: build/C/man3/pthread_setconcurrency.3:25
7855 #, no-wrap
7856 msgid "PTHREAD_SETCONCURRENCY"
7857 msgstr "PTHREAD_SETCONCURRENCY"
7858
7859 #. type: Plain text
7860 #: build/C/man3/pthread_setconcurrency.3:29
7861 msgid ""
7862 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7863 "level"
7864 msgstr ""
7865 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7866 "行う"
7867
7868 #. type: Plain text
7869 #: build/C/man3/pthread_setconcurrency.3:35
7870 #, no-wrap
7871 msgid ""
7872 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7873 "B<int pthread_getconcurrency(void);>\n"
7874 msgstr ""
7875 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7876 "B<int pthread_getconcurrency(void);>\n"
7877
7878 #. type: Plain text
7879 #: build/C/man3/pthread_setconcurrency.3:48
7880 msgid ""
7881 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7882 "application's desired concurrency level, specified in I<new_level>.  The "
7883 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7884 "of concurrency that should be provided as a result of calling "
7885 "B<pthread_setconcurrency>()."
7886 msgstr ""
7887 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7888 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7889 "希望する並列処理レベルは I<new_level> で指定する。\n"
7890 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7891 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7892 "どのような並列度になるべきかは規定されていない。"
7893
7894 #. type: Plain text
7895 #: build/C/man3/pthread_setconcurrency.3:53
7896 msgid ""
7897 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7898 "concurrency level as it deems appropriate."
7899 msgstr ""
7900 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7901 "実装側で適切とみなしたレベルに設定するようになる。"
7902
7903 #. type: Plain text
7904 #: build/C/man3/pthread_setconcurrency.3:56
7905 msgid ""
7906 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7907 "level for this process."
7908 msgstr ""
7909 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7910 "の現在値を返す。"
7911
7912 #. type: Plain text
7913 #: build/C/man3/pthread_setconcurrency.3:61
7914 msgid ""
7915 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7916 "nonzero error number."
7917 msgstr ""
7918 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7919 "エラーの場合、 0 以外のエラー番号を返す。"
7920
7921 #. type: Plain text
7922 #: build/C/man3/pthread_setconcurrency.3:68
7923 msgid ""
7924 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7925 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7926 "B<pthread_setconcurrency>()  has not previously been called."
7927 msgstr ""
7928 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7929 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7930 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7931 "それまでに一度も呼び出されていない場合は 0 が返る。"
7932
7933 #. type: Plain text
7934 #: build/C/man3/pthread_setconcurrency.3:71
7935 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7936 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7937
7938 #. type: Plain text
7939 #: build/C/man3/pthread_setconcurrency.3:75
7940 msgid "I<new_level> is negative."
7941 msgstr "I<new_level> が負である。"
7942
7943 #. type: Plain text
7944 #: build/C/man3/pthread_setconcurrency.3:81
7945 msgid ""
7946 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7947 "I<new_level> would cause a system resource to be exceeded\")."
7948 msgstr ""
7949 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7950 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7951 "超過してしまう」)。"
7952
7953 #. type: Plain text
7954 #: build/C/man3/pthread_setconcurrency.3:83
7955 msgid "These functions are available in glibc since version 2.1."
7956 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7957
7958 #. type: Plain text
7959 #: build/C/man3/pthread_setconcurrency.3:90
7960 #, fuzzy
7961 #| msgid ""
7962 #| "The B<pthread_setcancelstate>()  and B<pthread_setcanceltype>()  "
7963 #| "functions are thread-safe."
7964 msgid ""
7965 "The B<pthread_setconcurrency>()  and B<pthread_getconcurrency>()  functions "
7966 "are thread-safe."
7967 msgstr ""
7968 "関数 B<pthread_setcancelstate>() と B<pthread_setcanceltype>() はスレッドセー"
7969 "フである。"
7970
7971 #. type: Plain text
7972 #: build/C/man3/pthread_setconcurrency.3:94
7973 msgid "The default concurrency level is 0."
7974 msgstr "デフォルトの concurrency level は 0 である。"
7975
7976 #. type: Plain text
7977 #: build/C/man3/pthread_setconcurrency.3:101
7978 msgid ""
7979 "Concurrency levels are meaningful only for M:N threading implementations, "
7980 "where at any moment a subset of a process's set of user-level threads may be "
7981 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7982 "concurrency level allows the application to give the system a hint as to the "
7983 "number of kernel-scheduling entities that should be provided for efficient "
7984 "execution of the application."
7985 msgstr ""
7986 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7987 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7988 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7989 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7990 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7991 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7992 "ムに伝えることができる。"
7993
7994 #. type: Plain text
7995 #: build/C/man3/pthread_setconcurrency.3:107
7996 msgid ""
7997 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7998 "concurrency level has no meaning.  In other words, on Linux these functions "
7999 "merely exist for compatibility with other systems, and they have no effect "
8000 "on the execution of a program."
8001 msgstr ""
8002 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
8003 "並列処理レベルを設定しても何の意味もない。\n"
8004 "言い換えると、 Linux では、これらの関数は、\n"
8005 "他のシステムとの互換性のためだけに存在し、\n"
8006 "プログラムの実行には何の影響も与えないということである。"
8007
8008 #. type: Plain text
8009 #: build/C/man3/pthread_setconcurrency.3:110
8010 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
8011 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
8012
8013 #. type: TH
8014 #: build/C/man3/pthread_setname_np.3:26
8015 #, no-wrap
8016 msgid "PTHREAD_SETNAME_NP"
8017 msgstr "PTHREAD_SETNAME_NP"
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 #, fuzzy, 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 msgid ""
8034 "B<#define _GNU_SOURCE>             /* See 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<                       char *>I<name>B<, size_t >I<len>B<);>\n"
8039 msgstr ""
8040 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
8041 "B<#include E<lt>pthread.hE<gt>>\n"
8042 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
8043 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
8044 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
8045
8046 #. type: Plain text
8047 #: build/C/man3/pthread_setname_np.3:55
8048 msgid ""
8049 "By default, all the threads created using B<pthread_create>()  inherit the "
8050 "program name.  The B<pthread_setname_np>()  function can be used to set a "
8051 "unique name for a thread, which can be useful for debugging multithreaded "
8052 "applications.  The thread name is a meaningful C language string, whose "
8053 "length is restricted to 16 characters, including the terminating null byte "
8054 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
8055 "to be changed; I<name> specifies the new name."
8056 msgstr ""
8057 "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム"
8058 "名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定"
8059 "することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデ"
8060 "バッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さ"
8061 "は 16 文字に限定されており、 終端のヌルバイト (\\(aq\\e0\\(aq) も 16 文字に含"
8062 "まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には新"
8063 "しい名前を指定する。"
8064
8065 #. type: Plain text
8066 #: build/C/man3/pthread_setname_np.3:72
8067 msgid ""
8068 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
8069 "the thread.  The I<thread> argument specifies the thread whose name is to be "
8070 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
8071 "specifies the number of bytes available in I<name>.  The buffer specified by "
8072 "I<name> should be at least 16 characters in length.  The returned thread "
8073 "name in the output buffer will be null terminated."
8074 msgstr ""
8075 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
8076 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
8077 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
8078 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
8079 "出力バッファに返されたスレッド名はヌル終端される。"
8080
8081 #. type: Plain text
8082 #: build/C/man3/pthread_setname_np.3:79
8083 msgid ""
8084 "The B<pthread_setname_np>()  function can fail with the following error:"
8085 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
8086
8087 #. type: TP
8088 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
8089 #, no-wrap
8090 msgid "B<ERANGE>"
8091 msgstr "B<ERANGE>"
8092
8093 #. type: Plain text
8094 #: build/C/man3/pthread_setname_np.3:84
8095 msgid ""
8096 "The length of the string specified pointed to by I<name> exceeds the allowed "
8097 "limit."
8098 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
8099
8100 #. type: Plain text
8101 #: build/C/man3/pthread_setname_np.3:88
8102 msgid ""
8103 "The B<pthread_getname_np>()  function can fail with the following error:"
8104 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
8105
8106 #. type: Plain text
8107 #: build/C/man3/pthread_setname_np.3:95
8108 msgid ""
8109 "The buffer specified by I<name> and I<len> is too small to hold the thread "
8110 "name."
8111 msgstr ""
8112 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
8113 "る。"
8114
8115 #. type: Plain text
8116 #: build/C/man3/pthread_setname_np.3:100
8117 msgid ""
8118 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
8119 "then the call may fail with one of the errors described in B<open>(2)."
8120 msgstr ""
8121 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
8122 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
8123
8124 #. type: Plain text
8125 #: build/C/man3/pthread_setname_np.3:102
8126 msgid "These functions first appeared in glibc in version 2.12."
8127 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
8128
8129 #. type: Plain text
8130 #: build/C/man3/pthread_setname_np.3:104
8131 msgid "These functions are nonstandard GNU extensions."
8132 msgstr "これらの関数は非標準の GNU による拡張である。"
8133
8134 #. type: Plain text
8135 #: build/C/man3/pthread_setname_np.3:114
8136 msgid ""
8137 "B<pthread_setname_np>()  internally writes to the thread-specific I<comm> "
8138 "file under the I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
8139 "B<pthread_getname_np>()  retrieves it from the same location."
8140 msgstr ""
8141 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
8142 "I<comm> ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
8143 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
8144
8145 #. type: Plain text
8146 #: build/C/man3/pthread_setname_np.3:120
8147 msgid ""
8148 "The program below demonstrates the use of B<pthread_setname_np>()  and "
8149 "B<pthread_getname_np>()."
8150 msgstr ""
8151 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
8152 "の使用例を示している。"
8153
8154 #. type: Plain text
8155 #: build/C/man3/pthread_setname_np.3:122
8156 msgid "The following shell session shows a sample run of the program:"
8157 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
8158
8159 #. type: Plain text
8160 #: build/C/man3/pthread_setname_np.3:138
8161 #, no-wrap
8162 msgid ""
8163 "$B< ./a.out>\n"
8164 "Created a thread. Default name is: a.out\n"
8165 "The thread name after setting it is THREADFOO.\n"
8166 "B<^Z>                           # Suspend the program\n"
8167 "[1]+  Stopped           ./a.out\n"
8168 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
8169 "  PID   TID CMD                         COMMAND\n"
8170 " 5990  5990 ./a.out                     a.out\n"
8171 " 5990  5991 ./a.out                     THREADFOO\n"
8172 "$ B<cat /proc/5990/task/5990/comm>\n"
8173 "a.out\n"
8174 "$ B<cat /proc/5990/task/5991/comm>\n"
8175 "THREADFOO\n"
8176 msgstr ""
8177 "$B< ./a.out>\n"
8178 "Created a thread. Default name is: a.out\n"
8179 "The thread name after setting it is THREADFOO.\n"
8180 "B<^Z>                           # Suspend the program\n"
8181 "[1]+  Stopped           ./a.out\n"
8182 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
8183 "  PID   TID CMD                         COMMAND\n"
8184 " 5990  5990 ./a.out                     a.out\n"
8185 " 5990  5991 ./a.out                     THREADFOO\n"
8186 "$ B<cat /proc/5990/task/5990/comm>\n"
8187 "a.out\n"
8188 "$ B<cat /proc/5990/task/5991/comm>\n"
8189 "THREADFOO\n"
8190
8191 #. type: Plain text
8192 #: build/C/man3/pthread_setname_np.3:150
8193 #, no-wrap
8194 msgid ""
8195 "#define _GNU_SOURCE\n"
8196 "#include E<lt>pthread.hE<gt>\n"
8197 "#include E<lt>stdio.hE<gt>\n"
8198 "#include E<lt>string.hE<gt>\n"
8199 "#include E<lt>unistd.hE<gt>\n"
8200 "#include E<lt>errno.hE<gt>\n"
8201 "#include E<lt>stdlib.hE<gt>\n"
8202 msgstr ""
8203 "#define _GNU_SOURCE\n"
8204 "#include E<lt>pthread.hE<gt>\n"
8205 "#include E<lt>stdio.hE<gt>\n"
8206 "#include E<lt>string.hE<gt>\n"
8207 "#include E<lt>unistd.hE<gt>\n"
8208 "#include E<lt>errno.hE<gt>\n"
8209 "#include E<lt>stdlib.hE<gt>\n"
8210
8211 #. type: Plain text
8212 #: build/C/man3/pthread_setname_np.3:152
8213 #, no-wrap
8214 msgid "#define NAMELEN 16\n"
8215 msgstr "#define NAMELEN 16\n"
8216
8217 #. type: Plain text
8218 #: build/C/man3/pthread_setname_np.3:156
8219 #, no-wrap
8220 msgid ""
8221 "#define errExitEN(en, msg) \\e\n"
8222 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
8223 "        } while (0)\n"
8224 msgstr ""
8225 "#define errExitEN(en, msg) \\e\n"
8226 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
8227 "        } while (0)\n"
8228
8229 #. type: Plain text
8230 #: build/C/man3/pthread_setname_np.3:163
8231 #, no-wrap
8232 msgid ""
8233 "static void *\n"
8234 "threadfunc(void *parm)\n"
8235 "{\n"
8236 "    sleep(5);          // allow main program to set the thread name\n"
8237 "    return NULL;\n"
8238 "}\n"
8239 msgstr ""
8240 "static void *\n"
8241 "threadfunc(void *parm)\n"
8242 "{\n"
8243 "    sleep(5);          // allow main program to set the thread name\n"
8244 "    return NULL;\n"
8245 "}\n"
8246
8247 #. type: Plain text
8248 #: build/C/man3/pthread_setname_np.3:170
8249 #, no-wrap
8250 msgid ""
8251 "int\n"
8252 "main(int argc, char **argv)\n"
8253 "{\n"
8254 "    pthread_t thread;\n"
8255 "    int rc;\n"
8256 "    char thread_name[NAMELEN];\n"
8257 msgstr ""
8258 "int\n"
8259 "main(int argc, char **argv)\n"
8260 "{\n"
8261 "    pthread_t thread;\n"
8262 "    int rc;\n"
8263 "    char thread_name[NAMELEN];\n"
8264
8265 #. type: Plain text
8266 #: build/C/man3/pthread_setname_np.3:174
8267 #, no-wrap
8268 msgid ""
8269 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8270 "    if (rc != 0)\n"
8271 "        errExitEN(rc, \"pthread_create\");\n"
8272 msgstr ""
8273 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8274 "    if (rc != 0)\n"
8275 "        errExitEN(rc, \"pthread_create\");\n"
8276
8277 #. type: Plain text
8278 #: build/C/man3/pthread_setname_np.3:178
8279 #, no-wrap
8280 msgid ""
8281 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8282 "    if (rc != 0)\n"
8283 "        errExitEN(rc, \"pthread_getname_np\");\n"
8284 msgstr ""
8285 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8286 "    if (rc != 0)\n"
8287 "        errExitEN(rc, \"pthread_getname_np\");\n"
8288
8289 #. type: Plain text
8290 #: build/C/man3/pthread_setname_np.3:183
8291 #, no-wrap
8292 msgid ""
8293 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8294 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8295 "    if (rc != 0)\n"
8296 "        errExitEN(rc, \"pthread_setname_np\");\n"
8297 msgstr ""
8298 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8299 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8300 "    if (rc != 0)\n"
8301 "        errExitEN(rc, \"pthread_setname_np\");\n"
8302
8303 #. type: Plain text
8304 #: build/C/man3/pthread_setname_np.3:185
8305 #, no-wrap
8306 msgid "    sleep(2);\n"
8307 msgstr "    sleep(2);\n"
8308
8309 #. type: Plain text
8310 #: build/C/man3/pthread_setname_np.3:191
8311 #, no-wrap
8312 msgid ""
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 msgstr ""
8319 "    rc = pthread_getname_np(thread, thread_name,\n"
8320 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8321 "    if (rc != 0)\n"
8322 "        errExitEN(rc, \"pthread_getname_np\");\n"
8323 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8324
8325 #. type: Plain text
8326 #: build/C/man3/pthread_setname_np.3:195
8327 #, no-wrap
8328 msgid ""
8329 "    rc = pthread_join(thread, NULL);\n"
8330 "    if (rc != 0)\n"
8331 "        errExitEN(rc, \"pthread_join\");\n"
8332 msgstr ""
8333 "    rc = pthread_join(thread, NULL);\n"
8334 "    if (rc != 0)\n"
8335 "        errExitEN(rc, \"pthread_join\");\n"
8336
8337 #. type: Plain text
8338 #: build/C/man3/pthread_setname_np.3:199
8339 #, no-wrap
8340 msgid ""
8341 "    printf(\"Done\\en\");\n"
8342 "    exit(EXIT_SUCCESS);\n"
8343 "}\n"
8344 msgstr ""
8345 "    printf(\"Done\\en\");\n"
8346 "    exit(EXIT_SUCCESS);\n"
8347 "}\n"
8348
8349 #. type: Plain text
8350 #: build/C/man3/pthread_setname_np.3:206
8351 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8352 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8353
8354 #. type: TH
8355 #: build/C/man3/pthread_setschedparam.3:26
8356 #, no-wrap
8357 msgid "PTHREAD_SETSCHEDPARAM"
8358 msgstr "PTHREAD_SETSCHEDPARAM"
8359
8360 #. type: Plain text
8361 #: build/C/man3/pthread_setschedparam.3:30
8362 msgid ""
8363 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8364 "parameters of a thread"
8365 msgstr ""
8366 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8367 "スケジューリングポリシーとパラメータを設定/取得する"
8368
8369 #. type: Plain text
8370 #: build/C/man3/pthread_setschedparam.3:38
8371 #, fuzzy, no-wrap
8372 #| msgid ""
8373 #| "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8374 #| "B<                      const struct sched_param *>I<param>B<);>\n"
8375 #| "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8376 #| "B<                      struct sched_param *>I<param>B<);>\n"
8377 msgid ""
8378 "B<int pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8379 "B<                          const struct sched_param *>I<param>B<);>\n"
8380 "B<int pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8381 "B<                          struct sched_param *>I<param>B<);>\n"
8382 msgstr ""
8383 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8384 "B<                      const struct sched_param *>I<param>B<);>\n"
8385 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8386 "B<                      struct sched_param *>I<param>B<);>\n"
8387
8388 #. type: Plain text
8389 #: build/C/man3/pthread_setschedparam.3:46
8390 msgid ""
8391 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8392 "parameters of the thread I<thread>."
8393 msgstr ""
8394 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8395 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8396
8397 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8398 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8399 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8400 #. type: Plain text
8401 #: build/C/man3/pthread_setschedparam.3:57
8402 msgid ""
8403 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8404 "values for I<policy>, and their semantics, are described in B<sched>(7)."
8405 msgstr ""
8406 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。 "
8407 "I<policy> に指定できる値とその意味は B<sched>(7) で説明されている。"
8408
8409 #. type: Plain text
8410 #: build/C/man3/pthread_setschedparam.3:63
8411 msgid ""
8412 "The structure pointed to by I<param> specifies the new scheduling parameters "
8413 "for I<thread>.  Scheduling parameters are maintained in the following "
8414 "structure:"
8415 msgstr ""
8416 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8417 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8418
8419 #.  FIXME . nptl/pthread_setschedparam.c has the following
8420 #.    /* If the thread should have higher priority because of some
8421 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8422 #.  Eventually (perhaps after writing the mutexattr pages), we
8423 #.  may want to add something on the topic to this page.
8424 #. type: Plain text
8425 #: build/C/man3/pthread_setschedparam.3:104
8426 msgid ""
8427 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8428 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8429 "and I<param>, respectively.  The returned priority value is that set by the "
8430 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8431 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8432 "does not reflect any temporary priority adjustments as a result of calls to "
8433 "any priority inheritance or priority ceiling functions (see, for example, "
8434 "B<pthread_mutexattr_setprioceiling>(3)  and "
8435 "B<pthread_mutexattr_setprotocol>(3))."
8436 msgstr ""
8437 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8438 "スケジューリングポリシーとパラメータを、\n"
8439 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8440 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8441 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8442 "B<pthread_create> で設定された値となる。\n"
8443 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8444 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8445 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8446 "行われる一時的な優先度の調整の影響を受けない。"
8447
8448 #. type: Plain text
8449 #: build/C/man3/pthread_setschedparam.3:112
8450 msgid ""
8451 "On success, these functions return 0; on error, they return a nonzero error "
8452 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8453 "parameters of I<thread> are not changed."
8454 msgstr ""
8455 "成功すると、これらの関数は 0 を返す。\n"
8456 "エラーの場合、0 以外のエラー番号を返す。\n"
8457 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8458 "スケジューリングポリシーとパラメータは変更されない。"
8459
8460 #. type: Plain text
8461 #: build/C/man3/pthread_setschedparam.3:114
8462 msgid "Both of these functions can fail with the following error:"
8463 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8464
8465 #. type: Plain text
8466 #: build/C/man3/pthread_setschedparam.3:122
8467 msgid ""
8468 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8469 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8470
8471 #. type: Plain text
8472 #: build/C/man3/pthread_setschedparam.3:129
8473 msgid ""
8474 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8475 "the I<policy>."
8476 msgstr ""
8477 "I<policy> が認識できないポリシーであるか、\n"
8478 "I<param> が I<policy> では意味を持たない値である。"
8479
8480 #. type: Plain text
8481 #: build/C/man3/pthread_setschedparam.3:133
8482 msgid ""
8483 "The caller does not have appropriate privileges to set the specified "
8484 "scheduling policy and parameters."
8485 msgstr ""
8486 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8487 "のに必要な特権を持たない。"
8488
8489 #.  .SH VERSIONS
8490 #.  Available since glibc 2.0
8491 #. type: Plain text
8492 #: build/C/man3/pthread_setschedparam.3:141
8493 msgid ""
8494 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8495 "policy or scheduling parameters to an unsupported value\") error for "
8496 "B<pthread_setschedparam>()."
8497 msgstr ""
8498 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8499 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8500 "パラメータに設定しようとした\") も追加で規定されている。"
8501
8502 #. type: Plain text
8503 #: build/C/man3/pthread_setschedparam.3:148
8504 msgid ""
8505 "The B<pthread_setschedparam>()  and B<pthread_getschedparam>()  functions "
8506 "are thread-safe."
8507 msgstr ""
8508 "関数 B<pthread_setschedparam>() と B<pthread_getschedparam>() はスレッドセー"
8509 "フである。"
8510
8511 #. type: Plain text
8512 #: build/C/man3/pthread_setschedparam.3:156
8513 msgid ""
8514 "For a description of the permissions required to, and the effect of, "
8515 "changing a thread's scheduling policy and priority, and details of the "
8516 "permitted ranges for priorities in each scheduling policy, see B<sched>(7)."
8517 msgstr ""
8518 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や変更し"
8519 "た場合の影響、および各スケジューリングポリシーで認められる優先度の範囲の詳細"
8520 "については、 B<sched>(7) を参照。"
8521
8522 #. type: Plain text
8523 #: build/C/man3/pthread_setschedparam.3:163
8524 msgid ""
8525 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8526 "B<pthread_getschedparam>(), as well as the use of a number of other "
8527 "scheduling-related pthreads functions."
8528 msgstr ""
8529 "以下のプログラムは B<pthread_setschedparam>() と\n"
8530 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8531 "他のいろいろな関数の使用例を示すものである。"
8532
8533 #. type: Plain text
8534 #: build/C/man3/pthread_setschedparam.3:179
8535 msgid ""
8536 "In the following run, the main thread sets its scheduling policy to "
8537 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8538 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8539 "priority attribute of 20.  The program then sets (using "
8540 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8541 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8542 "created using this attributes object should take their scheduling attributes "
8543 "from the thread attributes object.  The program then creates a thread using "
8544 "the thread attributes object, and that thread displays its scheduling policy "
8545 "and priority."
8546 msgstr ""
8547 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8548 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8549 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8550 "属性 20 で初期化する。\n"
8551 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8552 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8553 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8554 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8555 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8556 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8557 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8558
8559 #. type: Plain text
8560 #: build/C/man3/pthread_setschedparam.3:187
8561 #, no-wrap
8562 msgid ""
8563 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8564 "Password:\n"
8565 "# B<./a.out -mf10 -ar20 -i e>\n"
8566 "Scheduler settings of main thread\n"
8567 "    policy=SCHED_FIFO, priority=10\n"
8568 msgstr ""
8569 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8570 "Password:\n"
8571 "# B<./a.out -mf10 -ar20 -i e>\n"
8572 "Scheduler settings of main thread\n"
8573 "    policy=SCHED_FIFO, priority=10\n"
8574
8575 #. type: Plain text
8576 #: build/C/man3/pthread_setschedparam.3:191
8577 #, no-wrap
8578 msgid ""
8579 "Scheduler settings in \\(aqattr\\(aq\n"
8580 "    policy=SCHED_RR, priority=20\n"
8581 "    inheritsched is EXPLICIT\n"
8582 msgstr ""
8583 "Scheduler settings in \\(aqattr\\(aq\n"
8584 "    policy=SCHED_RR, priority=20\n"
8585 "    inheritsched is EXPLICIT\n"
8586
8587 #. type: Plain text
8588 #: build/C/man3/pthread_setschedparam.3:194
8589 #, no-wrap
8590 msgid ""
8591 "Scheduler attributes of new thread\n"
8592 "    policy=SCHED_RR, priority=20\n"
8593 msgstr ""
8594 "Scheduler attributes of new thread\n"
8595 "    policy=SCHED_RR, priority=20\n"
8596
8597 #. type: Plain text
8598 #: build/C/man3/pthread_setschedparam.3:199
8599 msgid ""
8600 "In the above output, one can see that the scheduling policy and priority "
8601 "were taken from the values specified in the thread attributes object."
8602 msgstr ""
8603 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8604 "オブジェクトで指定された値から取られていることが分かる。"
8605
8606 #. type: Plain text
8607 #: build/C/man3/pthread_setschedparam.3:206
8608 msgid ""
8609 "The next run is the same as the previous, except that the inherit scheduler "
8610 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8611 "using the thread attributes object should ignore the scheduling attributes "
8612 "specified in the attributes object and instead take their scheduling "
8613 "attributes from the creating thread."
8614 msgstr ""
8615 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8616 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8617 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8618 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8619 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8620 "ことを意味する。"
8621
8622 #. type: Plain text
8623 #: build/C/man3/pthread_setschedparam.3:212
8624 #, no-wrap
8625 msgid ""
8626 "# B<./a.out -mf10 -ar20 -i i>\n"
8627 "Scheduler settings of main thread\n"
8628 "    policy=SCHED_FIFO, priority=10\n"
8629 msgstr ""
8630 "# B<./a.out -mf10 -ar20 -i i>\n"
8631 "Scheduler settings of main thread\n"
8632 "    policy=SCHED_FIFO, priority=10\n"
8633
8634 #. type: Plain text
8635 #: build/C/man3/pthread_setschedparam.3:216
8636 #, no-wrap
8637 msgid ""
8638 "Scheduler settings in \\(aqattr\\(aq\n"
8639 "    policy=SCHED_RR, priority=20\n"
8640 "    inheritsched is INHERIT\n"
8641 msgstr ""
8642 "Scheduler settings in \\(aqattr\\(aq\n"
8643 "    policy=SCHED_RR, priority=20\n"
8644 "    inheritsched is INHERIT\n"
8645
8646 #. type: Plain text
8647 #: build/C/man3/pthread_setschedparam.3:219
8648 #, no-wrap
8649 msgid ""
8650 "Scheduler attributes of new thread\n"
8651 "    policy=SCHED_FIFO, priority=10\n"
8652 msgstr ""
8653 "Scheduler attributes of new thread\n"
8654 "    policy=SCHED_FIFO, priority=10\n"
8655
8656 #. type: Plain text
8657 #: build/C/man3/pthread_setschedparam.3:225
8658 msgid ""
8659 "In the above output, one can see that the scheduling policy and priority "
8660 "were taken from the creating thread, rather than the thread attributes "
8661 "object."
8662 msgstr ""
8663 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8664 "スレッド属性オブジェクトからではなく、\n"
8665 "スレッドを作成したスレッドから取れれていることが分かる。"
8666
8667 #. type: Plain text
8668 #: build/C/man3/pthread_setschedparam.3:231
8669 msgid ""
8670 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8671 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8672 "scheduler attribute."
8673 msgstr ""
8674 "なお、 I<-i\\ i> を省略した場合でも、\n"
8675 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8676 "出力は同じになる。"
8677
8678 #. type: Plain text
8679 #: build/C/man3/pthread_setschedparam.3:235
8680 #, no-wrap
8681 msgid "/* pthreads_sched_test.c */\n"
8682 msgstr "/* pthreads_sched_test.c */\n"
8683
8684 #. type: Plain text
8685 #: build/C/man3/pthread_setschedparam.3:241
8686 #, no-wrap
8687 msgid ""
8688 "#include E<lt>pthread.hE<gt>\n"
8689 "#include E<lt>stdio.hE<gt>\n"
8690 "#include E<lt>stdlib.hE<gt>\n"
8691 "#include E<lt>unistd.hE<gt>\n"
8692 "#include E<lt>errno.hE<gt>\n"
8693 msgstr ""
8694 "#include E<lt>pthread.hE<gt>\n"
8695 "#include E<lt>stdio.hE<gt>\n"
8696 "#include E<lt>stdlib.hE<gt>\n"
8697 "#include E<lt>unistd.hE<gt>\n"
8698 "#include E<lt>errno.hE<gt>\n"
8699
8700 #. type: Plain text
8701 #: build/C/man3/pthread_setschedparam.3:250
8702 #, no-wrap
8703 msgid ""
8704 "static void\n"
8705 "usage(char *prog_name, char *msg)\n"
8706 "{\n"
8707 "    if (msg != NULL)\n"
8708 "        fputs(msg, stderr);\n"
8709 msgstr ""
8710 "static void\n"
8711 "usage(char *prog_name, char *msg)\n"
8712 "{\n"
8713 "    if (msg != NULL)\n"
8714 "        fputs(msg, stderr);\n"
8715
8716 #. type: Plain text
8717 #: build/C/man3/pthread_setschedparam.3:267
8718 #, no-wrap
8719 msgid ""
8720 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8721 "    fprintf(stderr, \"Options are:\\en\");\n"
8722 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8723 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8724 "    fpe(\"                 thread attributes object\\en\");\n"
8725 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8726 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8727 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8728 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8729 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8730 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8731 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8732 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8733 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8734 "    exit(EXIT_FAILURE);\n"
8735 "}\n"
8736 msgstr ""
8737 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8738 "    fprintf(stderr, \"Options are:\\en\");\n"
8739 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8740 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8741 "    fpe(\"                 thread attributes object\\en\");\n"
8742 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8743 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8744 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8745 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8746 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8747 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8748 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8749 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8750 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8751 "    exit(EXIT_FAILURE);\n"
8752 "}\n"
8753
8754 #. type: Plain text
8755 #: build/C/man3/pthread_setschedparam.3:278
8756 #, no-wrap
8757 msgid ""
8758 "static int\n"
8759 "get_policy(char p, int *policy)\n"
8760 "{\n"
8761 "    switch (p) {\n"
8762 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8763 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8764 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8765 "    default:  return 0;\n"
8766 "    }\n"
8767 "}\n"
8768 msgstr ""
8769 "static int\n"
8770 "get_policy(char p, int *policy)\n"
8771 "{\n"
8772 "    switch (p) {\n"
8773 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8774 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8775 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8776 "    default:  return 0;\n"
8777 "    }\n"
8778 "}\n"
8779
8780 #. type: Plain text
8781 #: build/C/man3/pthread_setschedparam.3:289
8782 #, no-wrap
8783 msgid ""
8784 "static void\n"
8785 "display_sched_attr(int policy, struct sched_param *param)\n"
8786 "{\n"
8787 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8788 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8789 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8790 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8791 "            \"???\",\n"
8792 "            param-E<gt>sched_priority);\n"
8793 "}\n"
8794 msgstr ""
8795 "static void\n"
8796 "display_sched_attr(int policy, struct sched_param *param)\n"
8797 "{\n"
8798 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8799 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8800 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8801 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8802 "            \"???\",\n"
8803 "            param-E<gt>sched_priority);\n"
8804 "}\n"
8805
8806 #. type: Plain text
8807 #: build/C/man3/pthread_setschedparam.3:295
8808 #, no-wrap
8809 msgid ""
8810 "static void\n"
8811 "display_thread_sched_attr(char *msg)\n"
8812 "{\n"
8813 "    int policy, s;\n"
8814 "    struct sched_param param;\n"
8815 msgstr ""
8816 "static void\n"
8817 "display_thread_sched_attr(char *msg)\n"
8818 "{\n"
8819 "    int policy, s;\n"
8820 "    struct sched_param param;\n"
8821
8822 #. type: Plain text
8823 #: build/C/man3/pthread_setschedparam.3:299
8824 #, no-wrap
8825 msgid ""
8826 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8827 "    if (s != 0)\n"
8828 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8829 msgstr ""
8830 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8831 "    if (s != 0)\n"
8832 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8833
8834 #. type: Plain text
8835 #: build/C/man3/pthread_setschedparam.3:303
8836 #, no-wrap
8837 msgid ""
8838 "    printf(\"%s\\en\", msg);\n"
8839 "    display_sched_attr(policy, &param);\n"
8840 "}\n"
8841 msgstr ""
8842 "    printf(\"%s\\en\", msg);\n"
8843 "    display_sched_attr(policy, &param);\n"
8844 "}\n"
8845
8846 #. type: Plain text
8847 #: build/C/man3/pthread_setschedparam.3:308
8848 #, no-wrap
8849 msgid ""
8850 "static void *\n"
8851 "thread_start(void *arg)\n"
8852 "{\n"
8853 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8854 msgstr ""
8855 "static void *\n"
8856 "thread_start(void *arg)\n"
8857 "{\n"
8858 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8859
8860 #. type: Plain text
8861 #: build/C/man3/pthread_setschedparam.3:311
8862 #, no-wrap
8863 msgid ""
8864 "    return NULL;\n"
8865 "}\n"
8866 msgstr ""
8867 "    return NULL;\n"
8868 "}\n"
8869
8870 #. type: Plain text
8871 #: build/C/man3/pthread_setschedparam.3:321
8872 #, no-wrap
8873 msgid ""
8874 "int\n"
8875 "main(int argc, char *argv[])\n"
8876 "{\n"
8877 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8878 "    pthread_t thread;\n"
8879 "    pthread_attr_t attr;\n"
8880 "    pthread_attr_t *attrp;\n"
8881 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8882 "    struct sched_param param;\n"
8883 msgstr ""
8884 "int\n"
8885 "main(int argc, char *argv[])\n"
8886 "{\n"
8887 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8888 "    pthread_t thread;\n"
8889 "    pthread_attr_t attr;\n"
8890 "    pthread_attr_t *attrp;\n"
8891 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8892 "    struct sched_param param;\n"
8893
8894 #. type: Plain text
8895 #: build/C/man3/pthread_setschedparam.3:323
8896 #, no-wrap
8897 msgid "    /* Process command-line options */\n"
8898 msgstr "    /* Process command-line options */\n"
8899
8900 #. type: Plain text
8901 #: build/C/man3/pthread_setschedparam.3:328
8902 #, no-wrap
8903 msgid ""
8904 "    use_null_attrib = 0;\n"
8905 "    attr_sched_str = NULL;\n"
8906 "    main_sched_str = NULL;\n"
8907 "    inheritsched_str = NULL;\n"
8908 msgstr ""
8909 "    use_null_attrib = 0;\n"
8910 "    attr_sched_str = NULL;\n"
8911 "    main_sched_str = NULL;\n"
8912 "    inheritsched_str = NULL;\n"
8913
8914 #. type: Plain text
8915 #: build/C/man3/pthread_setschedparam.3:338
8916 #, no-wrap
8917 msgid ""
8918 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8919 "        switch (opt) {\n"
8920 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8921 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8922 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8923 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8924 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8925 "        }\n"
8926 "    }\n"
8927 msgstr ""
8928 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8929 "        switch (opt) {\n"
8930 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8931 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8932 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8933 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8934 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8935 "        }\n"
8936 "    }\n"
8937
8938 #. type: Plain text
8939 #: build/C/man3/pthread_setschedparam.3:342
8940 #, no-wrap
8941 msgid ""
8942 "    if (use_null_attrib &&\n"
8943 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8944 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8945 msgstr ""
8946 "    if (use_null_attrib &&\n"
8947 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8948 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8949
8950 #. type: Plain text
8951 #: build/C/man3/pthread_setschedparam.3:345
8952 #, no-wrap
8953 msgid ""
8954 "    /* Optionally set scheduling attributes of main thread,\n"
8955 "       and display the attributes */\n"
8956 msgstr ""
8957 "    /* Optionally set scheduling attributes of main thread,\n"
8958 "       and display the attributes */\n"
8959
8960 #. type: Plain text
8961 #: build/C/man3/pthread_setschedparam.3:350
8962 #, no-wrap
8963 msgid ""
8964 "    if (main_sched_str != NULL) {\n"
8965 "        if (!get_policy(main_sched_str[0], &policy))\n"
8966 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8967 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8968 msgstr ""
8969 "    if (main_sched_str != NULL) {\n"
8970 "        if (!get_policy(main_sched_str[0], &policy))\n"
8971 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8972 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8973
8974 #. type: Plain text
8975 #: build/C/man3/pthread_setschedparam.3:355
8976 #, no-wrap
8977 msgid ""
8978 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8979 "        if (s != 0)\n"
8980 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8981 "    }\n"
8982 msgstr ""
8983 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8984 "        if (s != 0)\n"
8985 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8986 "    }\n"
8987
8988 #. type: Plain text
8989 #: build/C/man3/pthread_setschedparam.3:358
8990 #, no-wrap
8991 msgid ""
8992 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8993 "    printf(\"\\en\");\n"
8994 msgstr ""
8995 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8996 "    printf(\"\\en\");\n"
8997
8998 #. type: Plain text
8999 #: build/C/man3/pthread_setschedparam.3:360
9000 #, no-wrap
9001 msgid "    /* Initialize thread attributes object according to options */\n"
9002 msgstr "    /* Initialize thread attributes object according to options */\n"
9003
9004 #. type: Plain text
9005 #: build/C/man3/pthread_setschedparam.3:369
9006 #, no-wrap
9007 msgid ""
9008 "    if (!use_null_attrib) {\n"
9009 "        s = pthread_attr_init(&attr);\n"
9010 "        if (s != 0)\n"
9011 "            handle_error_en(s, \"pthread_attr_init\");\n"
9012 "        attrp = &attr;\n"
9013 "    }\n"
9014 msgstr ""
9015 "    if (!use_null_attrib) {\n"
9016 "        s = pthread_attr_init(&attr);\n"
9017 "        if (s != 0)\n"
9018 "            handle_error_en(s, \"pthread_attr_init\");\n"
9019 "        attrp = &attr;\n"
9020 "    }\n"
9021
9022 #. type: Plain text
9023 #: build/C/man3/pthread_setschedparam.3:377
9024 #, no-wrap
9025 msgid ""
9026 "    if (inheritsched_str != NULL) {\n"
9027 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
9028 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
9029 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
9030 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
9031 "        else\n"
9032 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
9033 msgstr ""
9034 "    if (inheritsched_str != NULL) {\n"
9035 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
9036 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
9037 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
9038 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
9039 "        else\n"
9040 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
9041
9042 #. type: Plain text
9043 #: build/C/man3/pthread_setschedparam.3:382
9044 #, no-wrap
9045 msgid ""
9046 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
9047 "        if (s != 0)\n"
9048 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
9049 "    }\n"
9050 msgstr ""
9051 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
9052 "        if (s != 0)\n"
9053 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
9054 "    }\n"
9055
9056 #. type: Plain text
9057 #: build/C/man3/pthread_setschedparam.3:388
9058 #, no-wrap
9059 msgid ""
9060 "    if (attr_sched_str != NULL) {\n"
9061 "        if (!get_policy(attr_sched_str[0], &policy))\n"
9062 "            usage(argv[0],\n"
9063 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
9064 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
9065 msgstr ""
9066 "    if (attr_sched_str != NULL) {\n"
9067 "        if (!get_policy(attr_sched_str[0], &policy))\n"
9068 "            usage(argv[0],\n"
9069 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
9070 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
9071
9072 #. type: Plain text
9073 #: build/C/man3/pthread_setschedparam.3:396
9074 #, no-wrap
9075 msgid ""
9076 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
9077 "        if (s != 0)\n"
9078 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
9079 "        s = pthread_attr_setschedparam(&attr, &param);\n"
9080 "        if (s != 0)\n"
9081 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
9082 "    }\n"
9083 msgstr ""
9084 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
9085 "        if (s != 0)\n"
9086 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
9087 "        s = pthread_attr_setschedparam(&attr, &param);\n"
9088 "        if (s != 0)\n"
9089 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
9090 "    }\n"
9091
9092 #. type: Plain text
9093 #: build/C/man3/pthread_setschedparam.3:399
9094 #, no-wrap
9095 msgid ""
9096 "    /* If we initialized a thread attributes object, display\n"
9097 "       the scheduling attributes that were set in the object */\n"
9098 msgstr ""
9099 "    /* If we initialized a thread attributes object, display\n"
9100 "       the scheduling attributes that were set in the object */\n"
9101
9102 #. type: Plain text
9103 #: build/C/man3/pthread_setschedparam.3:407
9104 #, no-wrap
9105 msgid ""
9106 "    if (attrp != NULL) {\n"
9107 "        s = pthread_attr_getschedparam(&attr, &param);\n"
9108 "        if (s != 0)\n"
9109 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
9110 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
9111 "        if (s != 0)\n"
9112 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
9113 msgstr ""
9114 "    if (attrp != NULL) {\n"
9115 "        s = pthread_attr_getschedparam(&attr, &param);\n"
9116 "        if (s != 0)\n"
9117 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
9118 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
9119 "        if (s != 0)\n"
9120 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
9121
9122 #. type: Plain text
9123 #: build/C/man3/pthread_setschedparam.3:410
9124 #, no-wrap
9125 msgid ""
9126 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
9127 "        display_sched_attr(policy, &param);\n"
9128 msgstr ""
9129 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
9130 "        display_sched_attr(policy, &param);\n"
9131
9132 #. type: Plain text
9133 #: build/C/man3/pthread_setschedparam.3:418
9134 #, no-wrap
9135 msgid ""
9136 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
9137 "        printf(\"    inheritsched is %s\\en\",\n"
9138 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
9139 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
9140 "                \"???\");\n"
9141 "        printf(\"\\en\");\n"
9142 "    }\n"
9143 msgstr ""
9144 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
9145 "        printf(\"    inheritsched is %s\\en\",\n"
9146 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
9147 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
9148 "                \"???\");\n"
9149 "        printf(\"\\en\");\n"
9150 "    }\n"
9151
9152 #. type: Plain text
9153 #: build/C/man3/pthread_setschedparam.3:420
9154 #, no-wrap
9155 msgid "    /* Create a thread that will display its scheduling attributes */\n"
9156 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
9157
9158 #. type: Plain text
9159 #: build/C/man3/pthread_setschedparam.3:424
9160 #, no-wrap
9161 msgid ""
9162 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
9163 "    if (s != 0)\n"
9164 "        handle_error_en(s, \"pthread_create\");\n"
9165 msgstr ""
9166 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
9167 "    if (s != 0)\n"
9168 "        handle_error_en(s, \"pthread_create\");\n"
9169
9170 #. type: Plain text
9171 #: build/C/man3/pthread_setschedparam.3:426
9172 #, no-wrap
9173 msgid "    /* Destroy unneeded thread attributes object */\n"
9174 msgstr "    /* Destroy unneeded thread attributes object */\n"
9175
9176 #. type: Plain text
9177 #: build/C/man3/pthread_setschedparam.3:434
9178 #, no-wrap
9179 msgid ""
9180 "    s = pthread_join(thread, NULL);\n"
9181 "    if (s != 0)\n"
9182 "        handle_error_en(s, \"pthread_join\");\n"
9183 msgstr ""
9184 "    s = pthread_join(thread, NULL);\n"
9185 "    if (s != 0)\n"
9186 "        handle_error_en(s, \"pthread_join\");\n"
9187
9188 #. type: Plain text
9189 #: build/C/man3/pthread_setschedparam.3:452
9190 msgid ""
9191 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
9192 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
9193 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthread_self>(3), "
9194 "B<pthread_setschedprio>(3), B<pthreads>(7), B<sched>(7)"
9195 msgstr ""
9196 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
9197 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
9198 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthread_self>(3), "
9199 "B<pthread_setschedprio>(3), B<pthreads>(7), B<sched>(7)"
9200
9201 #. type: TH
9202 #: build/C/man3/pthread_setschedprio.3:26
9203 #, no-wrap
9204 msgid "PTHREAD_SETSCHEDPRIO"
9205 msgstr "PTHREAD_SETSCHEDPRIO"
9206
9207 #. type: Plain text
9208 #: build/C/man3/pthread_setschedprio.3:29
9209 msgid "pthread_setschedprio - set scheduling priority of a thread"
9210 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
9211
9212 #. type: Plain text
9213 #: build/C/man3/pthread_setschedprio.3:34
9214 #, fuzzy, no-wrap
9215 #| msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
9216 msgid "B<int pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
9217 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
9218
9219 #.  FIXME . nptl/pthread_setschedprio.c has the following
9220 #.    /* If the thread should have higher priority because of some
9221 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
9222 #.  Eventually (perhaps after writing the mutexattr pages), we
9223 #.  may want to add something on the topic to this page.
9224 #.  nptl/pthread_setschedparam.c has a similar case.
9225 #. type: Plain text
9226 #: build/C/man3/pthread_setschedprio.3:53
9227 msgid ""
9228 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
9229 "thread I<thread> to the value specified in I<prio>.  (By contrast "
9230 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
9231 "of a thread.)"
9232 msgstr ""
9233 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
9234 "優先度に I<prio> で指定された値を設定する\n"
9235 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
9236 "と優先度の両方を変更する)。"
9237
9238 #. type: Plain text
9239 #: build/C/man3/pthread_setschedprio.3:61
9240 msgid ""
9241 "On success, this function returns 0; on error, it returns a nonzero error "
9242 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
9243 "I<thread> is not changed."
9244 msgstr ""
9245 "成功すると、この関数は 0 を返す。\n"
9246 "エラーの場合、0 以外のエラー番号を返す。\n"
9247 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
9248 "スケジューリング優先度は変更されない。"
9249
9250 #. type: Plain text
9251 #: build/C/man3/pthread_setschedprio.3:66
9252 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
9253 msgstr ""
9254 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
9255
9256 #. type: Plain text
9257 #: build/C/man3/pthread_setschedprio.3:70
9258 msgid ""
9259 "The caller does not have appropriate privileges to set the specified "
9260 "priority."
9261 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
9262
9263 #. type: Plain text
9264 #: build/C/man3/pthread_setschedprio.3:81
9265 msgid ""
9266 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
9267 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
9268 msgstr ""
9269 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
9270 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
9271 "に設定しようとした\") も追加で規定されている。"
9272
9273 #. type: Plain text
9274 #: build/C/man3/pthread_setschedprio.3:83
9275 msgid "This function is available in glibc since version 2.3.4."
9276 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
9277
9278 #. type: Plain text
9279 #: build/C/man3/pthread_setschedprio.3:88
9280 msgid "The B<pthread_setschedprio>()  function is thread-safe."
9281 msgstr "B<pthread_setschedprio>() 関数はスレッドセーフである。"
9282
9283 #. type: Plain text
9284 #: build/C/man3/pthread_setschedprio.3:96
9285 msgid ""
9286 "For a description of the permissions required to, and the effect of, "
9287 "changing a thread's scheduling priority, and details of the permitted ranges "
9288 "for priorities in each scheduling policy, see B<sched>(7)."
9289 msgstr ""
9290 "スレッドのスケジューリング優先度を変更するために必要な許可や変更した場合の影"
9291 "響、および各スケジューリングポリシーで認められる優先度の範囲の詳細について"
9292 "は、 B<sched>(7) を参照。"
9293
9294 #. type: Plain text
9295 #: build/C/man3/pthread_setschedprio.3:110
9296 msgid ""
9297 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
9298 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
9299 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthread_self>(3), "
9300 "B<pthread_setschedparam>(3), B<pthreads>(7), B<sched>(7)"
9301 msgstr ""
9302 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<pthread_attr_init>(3), "
9303 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
9304 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthread_self>(3), "
9305 "B<pthread_setschedparam>(3), B<pthreads>(7), B<sched>(7)"
9306
9307 #. type: TH
9308 #: build/C/man3/pthread_sigmask.3:26
9309 #, no-wrap
9310 msgid "PTHREAD_SIGMASK"
9311 msgstr "PTHREAD_SIGMASK"
9312
9313 #. type: TH
9314 #: build/C/man3/pthread_sigmask.3:26 build/C/man3/pthread_testcancel.3:26
9315 #, no-wrap
9316 msgid "2014-05-19"
9317 msgstr "2014-05-19"
9318
9319 #. type: Plain text
9320 #: build/C/man3/pthread_sigmask.3:29
9321 msgid "pthread_sigmask - examine and change mask of blocked signals"
9322 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
9323
9324 #. type: Plain text
9325 #: build/C/man3/pthread_sigmask.3:35
9326 #, no-wrap
9327 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9328 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9329
9330 #. type: Plain text
9331 #: build/C/man3/pthread_sigmask.3:46
9332 msgid "B<pthread_sigmask>():"
9333 msgstr "B<pthread_sigmask>():"
9334
9335 #. type: Plain text
9336 #: build/C/man3/pthread_sigmask.3:58
9337 msgid ""
9338 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9339 "difference that its use in multithreaded programs is explicitly specified by "
9340 "POSIX.1-2001.  Other differences are noted in this page."
9341 msgstr ""
9342 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9343 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9344 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9345
9346 #. type: Plain text
9347 #: build/C/man3/pthread_sigmask.3:61
9348 msgid ""
9349 "For a description of the arguments and operation of this function, see "
9350 "B<sigprocmask>(2)."
9351 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9352
9353 #. type: Plain text
9354 #: build/C/man3/pthread_sigmask.3:66
9355 msgid ""
9356 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9357 "number."
9358 msgstr ""
9359 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9360 "エラーの場合、エラー番号を返す。"
9361
9362 #. type: Plain text
9363 #: build/C/man3/pthread_sigmask.3:69
9364 msgid "See B<sigprocmask>(2)."
9365 msgstr "B<sigprocmask>(2) を参照。"
9366
9367 #. type: Plain text
9368 #: build/C/man3/pthread_sigmask.3:74
9369 msgid "The B<pthread_sigmask>()  function is thread-safe."
9370 msgstr "B<pthread_sigmask>() 関数はスレッドセーフである。"
9371
9372 #. type: Plain text
9373 #: build/C/man3/pthread_sigmask.3:78
9374 msgid "A new thread inherits a copy of its creator's signal mask."
9375 msgstr ""
9376 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9377 "継承する。"
9378
9379 #. type: Plain text
9380 #: build/C/man3/pthread_sigmask.3:83
9381 msgid ""
9382 "The program below blocks some signals in the main thread, and then creates a "
9383 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9384 "shell session demonstrates its use:"
9385 msgstr ""
9386 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9387 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9388 "専用のスレッドを作成する。\n"
9389 "下記のシェルのセッションはその利用例を示したものである。"
9390
9391 #. type: Plain text
9392 #: build/C/man3/pthread_sigmask.3:94
9393 #, no-wrap
9394 msgid ""
9395 "$B< ./a.out &>\n"
9396 "[1] 5423\n"
9397 "$B< kill -QUIT %1>\n"
9398 "Signal handling thread got signal 3\n"
9399 "$B< kill -USR1 %1>\n"
9400 "Signal handling thread got signal 10\n"
9401 "$B< kill -TERM %1>\n"
9402 "[1]+  Terminated              ./a.out\n"
9403 msgstr ""
9404 "$B< ./a.out &>\n"
9405 "[1] 5423\n"
9406 "$B< kill -QUIT %1>\n"
9407 "Signal handling thread got signal 3\n"
9408 "$B< kill -USR1 %1>\n"
9409 "Signal handling thread got signal 10\n"
9410 "$B< kill -TERM %1>\n"
9411 "[1]+  Terminated              ./a.out\n"
9412
9413 #. type: Plain text
9414 #: build/C/man3/pthread_sigmask.3:105
9415 #, no-wrap
9416 msgid ""
9417 "#include E<lt>pthread.hE<gt>\n"
9418 "#include E<lt>stdio.hE<gt>\n"
9419 "#include E<lt>stdlib.hE<gt>\n"
9420 "#include E<lt>unistd.hE<gt>\n"
9421 "#include E<lt>signal.hE<gt>\n"
9422 "#include E<lt>errno.hE<gt>\n"
9423 msgstr ""
9424 "#include E<lt>pthread.hE<gt>\n"
9425 "#include E<lt>stdio.hE<gt>\n"
9426 "#include E<lt>stdlib.hE<gt>\n"
9427 "#include E<lt>unistd.hE<gt>\n"
9428 "#include E<lt>signal.hE<gt>\n"
9429 "#include E<lt>errno.hE<gt>\n"
9430
9431 #. type: Plain text
9432 #: build/C/man3/pthread_sigmask.3:107
9433 #, no-wrap
9434 msgid "/* Simple error handling functions */\n"
9435 msgstr "/* Simple error handling functions */\n"
9436
9437 #. type: Plain text
9438 #: build/C/man3/pthread_sigmask.3:116
9439 #, no-wrap
9440 msgid ""
9441 "static void *\n"
9442 "sig_thread(void *arg)\n"
9443 "{\n"
9444 "    sigset_t *set = arg;\n"
9445 "    int s, sig;\n"
9446 msgstr ""
9447 "static void *\n"
9448 "sig_thread(void *arg)\n"
9449 "{\n"
9450 "    sigset_t *set = arg;\n"
9451 "    int s, sig;\n"
9452
9453 #. type: Plain text
9454 #: build/C/man3/pthread_sigmask.3:124
9455 #, no-wrap
9456 msgid ""
9457 "    for (;;) {\n"
9458 "        s = sigwait(set, &sig);\n"
9459 "        if (s != 0)\n"
9460 "            handle_error_en(s, \"sigwait\");\n"
9461 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9462 "    }\n"
9463 "}\n"
9464 msgstr ""
9465 "    for (;;) {\n"
9466 "        s = sigwait(set, &sig);\n"
9467 "        if (s != 0)\n"
9468 "            handle_error_en(s, \"sigwait\");\n"
9469 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9470 "    }\n"
9471 "}\n"
9472
9473 #. type: Plain text
9474 #: build/C/man3/pthread_sigmask.3:131
9475 #, no-wrap
9476 msgid ""
9477 "int\n"
9478 "main(int argc, char *argv[])\n"
9479 "{\n"
9480 "    pthread_t thread;\n"
9481 "    sigset_t set;\n"
9482 "    int s;\n"
9483 msgstr ""
9484 "int\n"
9485 "main(int argc, char *argv[])\n"
9486 "{\n"
9487 "    pthread_t thread;\n"
9488 "    sigset_t set;\n"
9489 "    int s;\n"
9490
9491 #. type: Plain text
9492 #: build/C/man3/pthread_sigmask.3:134
9493 #, no-wrap
9494 msgid ""
9495 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9496 "       will inherit a copy of the signal mask. */\n"
9497 msgstr ""
9498 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9499 "       will inherit a copy of the signal mask. */\n"
9500
9501 #. type: Plain text
9502 #: build/C/man3/pthread_sigmask.3:141
9503 #, no-wrap
9504 msgid ""
9505 "    sigemptyset(&set);\n"
9506 "    sigaddset(&set, SIGQUIT);\n"
9507 "    sigaddset(&set, SIGUSR1);\n"
9508 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9509 "    if (s != 0)\n"
9510 "        handle_error_en(s, \"pthread_sigmask\");\n"
9511 msgstr ""
9512 "    sigemptyset(&set);\n"
9513 "    sigaddset(&set, SIGQUIT);\n"
9514 "    sigaddset(&set, SIGUSR1);\n"
9515 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9516 "    if (s != 0)\n"
9517 "        handle_error_en(s, \"pthread_sigmask\");\n"
9518
9519 #. type: Plain text
9520 #: build/C/man3/pthread_sigmask.3:145
9521 #, no-wrap
9522 msgid ""
9523 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9524 "    if (s != 0)\n"
9525 "        handle_error_en(s, \"pthread_create\");\n"
9526 msgstr ""
9527 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9528 "    if (s != 0)\n"
9529 "        handle_error_en(s, \"pthread_create\");\n"
9530
9531 #. type: Plain text
9532 #: build/C/man3/pthread_sigmask.3:148
9533 #, no-wrap
9534 msgid ""
9535 "    /* Main thread carries on to create other threads and/or do\n"
9536 "       other work */\n"
9537 msgstr ""
9538 "    /* Main thread carries on to create other threads and/or do\n"
9539 "       other work */\n"
9540
9541 #. type: Plain text
9542 #: build/C/man3/pthread_sigmask.3:151
9543 #, no-wrap
9544 msgid ""
9545 "    pause();            /* Dummy pause so we can test program */\n"
9546 "}\n"
9547 msgstr ""
9548 "    pause();            /* Dummy pause so we can test program */\n"
9549 "}\n"
9550
9551 #. type: Plain text
9552 #: build/C/man3/pthread_sigmask.3:161
9553 msgid ""
9554 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9555 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9556 msgstr ""
9557 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9558 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9559
9560 #. type: TH
9561 #: build/C/man3/pthread_sigqueue.3:25
9562 #, no-wrap
9563 msgid "PTHREAD_SIGQUEUE"
9564 msgstr "PTHREAD_SIGQUEUE"
9565
9566 #. type: Plain text
9567 #: build/C/man3/pthread_sigqueue.3:28
9568 msgid "pthread_sigqueue - queue a signal and data to a thread"
9569 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9570
9571 #. type: Plain text
9572 #: build/C/man3/pthread_sigqueue.3:32
9573 #, fuzzy, no-wrap
9574 #| msgid ""
9575 #| "B<#include E<lt>pthread.hE<gt>>\n"
9576 #| "B<#include E<lt>time.hE<gt>>\n"
9577 msgid ""
9578 "B<#include E<lt>signal.hE<gt>>\n"
9579 "B<#include E<lt>pthread.hE<gt>>\n"
9580 msgstr ""
9581 "B<#include E<lt>pthread.hE<gt>>\n"
9582 "B<#include E<lt>time.hE<gt>>\n"
9583
9584 #. type: Plain text
9585 #: build/C/man3/pthread_sigqueue.3:35
9586 #, no-wrap
9587 msgid ""
9588 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9589 "B<                     const union sigval >I<value>B<);>\n"
9590 msgstr ""
9591 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9592 "B<                     const union sigval >I<value>B<);>\n"
9593
9594 #. type: Plain text
9595 #: build/C/man3/pthread_sigqueue.3:46
9596 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9597 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9598
9599 #. type: Plain text
9600 #: build/C/man3/pthread_sigqueue.3:54
9601 msgid ""
9602 "The B<pthread_sigqueue>()  function performs a similar task to "
9603 "B<sigqueue>(3), but, rather than sending a signal to a process, it sends a "
9604 "signal to a thread in the same process as the calling thread."
9605 msgstr ""
9606 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9607 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9608 "同じプロセス内のスレッドにシグナルを送信する。"
9609
9610 #. type: Plain text
9611 #: build/C/man3/pthread_sigqueue.3:66
9612 msgid ""
9613 "The I<thread> argument is the ID of a thread in the same process as the "
9614 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9615 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9616 "details."
9617 msgstr ""
9618 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9619 "I<sig> 引き数は送信するシグナルを指定する。\n"
9620 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9621 "詳細は B<sigqueue>(3) を参照。"
9622
9623 #. type: Plain text
9624 #: build/C/man3/pthread_sigqueue.3:71
9625 msgid ""
9626 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9627 "number."
9628 msgstr ""
9629 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9630 "エラーの場合、エラー番号を返す。"
9631
9632 #. type: Plain text
9633 #: build/C/man3/pthread_sigqueue.3:78
9634 msgid ""
9635 "The limit of signals which may be queued has been reached.  (See "
9636 "B<signal>(7)  for further information.)"
9637 msgstr ""
9638 "キューに入れられるシグナル数が上限に達していた\n"
9639 "(詳しい情報は (B<signal>(7) を参照)。"
9640
9641 #. type: Plain text
9642 #: build/C/man3/pthread_sigqueue.3:82
9643 msgid "I<sig> was invalid."
9644 msgstr "I<sig> が無効であった。"
9645
9646 #. type: TP
9647 #: build/C/man3/pthread_sigqueue.3:82
9648 #, no-wrap
9649 msgid "B<ENOSYS>"
9650 msgstr "B<ENOSYS>"
9651
9652 #. type: Plain text
9653 #: build/C/man3/pthread_sigqueue.3:86
9654 msgid "B<pthread_sigqueue>()  is not supported on this system."
9655 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9656
9657 #. type: Plain text
9658 #: build/C/man3/pthread_sigqueue.3:90
9659 msgid "I<thread> is not valid."
9660 msgstr "I<thread> が無効である。"
9661
9662 #. type: Plain text
9663 #: build/C/man3/pthread_sigqueue.3:94
9664 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9665 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9666
9667 #. type: Plain text
9668 #: build/C/man3/pthread_sigqueue.3:99
9669 msgid "The B<pthread_sigqueue>()  function is thread-safe."
9670 msgstr "B<pthread_sigqueue>() 関数はスレッドセーフである。"
9671
9672 #. type: Plain text
9673 #: build/C/man3/pthread_sigqueue.3:101
9674 msgid "This function is a GNU extension."
9675 msgstr "この関数は GNU による拡張である。"
9676
9677 #. type: Plain text
9678 #: build/C/man3/pthread_sigqueue.3:109
9679 msgid ""
9680 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), "
9681 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9682 msgstr ""
9683 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9684 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9685
9686 #. type: TH
9687 #: build/C/man3/pthread_testcancel.3:26
9688 #, no-wrap
9689 msgid "PTHREAD_TESTCANCEL"
9690 msgstr "PTHREAD_TESTCANCEL"
9691
9692 #. type: Plain text
9693 #: build/C/man3/pthread_testcancel.3:29
9694 msgid ""
9695 "pthread_testcancel - request delivery of any pending cancellation request"
9696 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9697
9698 #. type: Plain text
9699 #: build/C/man3/pthread_testcancel.3:34
9700 #, no-wrap
9701 msgid "B<void pthread_testcancel(void);>\n"
9702 msgstr "B<void pthread_testcancel(void);>\n"
9703
9704 #. type: Plain text
9705 #: build/C/man3/pthread_testcancel.3:43
9706 msgid ""
9707 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9708 "calling thread, so that a thread that is otherwise executing code that "
9709 "contains no cancellation points will respond to a cancellation request."
9710 msgstr ""
9711 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9712 "ポイント (cancellation point) が作成される。\n"
9713 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9714 "いるスレッドが取り消し要求に対応することができるようになる。"
9715
9716 #. type: Plain text
9717 #: build/C/man3/pthread_testcancel.3:50
9718 msgid ""
9719 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9720 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9721 "no effect."
9722 msgstr ""
9723 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9724 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9725 "呼び出しても何の影響もない。"
9726
9727 #. type: Plain text
9728 #: build/C/man3/pthread_testcancel.3:54
9729 msgid ""
9730 "This function does not return a value.  If the calling thread is canceled as "
9731 "a consequence of a call to this function, then the function does not return."
9732 msgstr ""
9733 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9734 "キャンセルされた場合、この関数が返ることはない。"
9735
9736 #. type: Plain text
9737 #: build/C/man3/pthread_testcancel.3:63
9738 msgid "The B<pthread_testcancel>()  function is thread-safe."
9739 msgstr "B<pthread_testcancel>() 関数はスレッドセーフである。"
9740
9741 #. type: Plain text
9742 #: build/C/man3/pthread_testcancel.3:68
9743 msgid "See B<pthread_cleanup_push>(3)."
9744 msgstr "B<pthread_cleanup_push>(3) を参照。"
9745
9746 #. type: Plain text
9747 #: build/C/man3/pthread_testcancel.3:73
9748 msgid ""
9749 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
9750 "B<pthread_setcancelstate>(3), B<pthreads>(7)"
9751 msgstr ""
9752 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
9753 "B<pthread_setcancelstate>(3), B<pthreads>(7)"
9754
9755 #. type: TH
9756 #: build/C/man3/pthread_tryjoin_np.3:26
9757 #, no-wrap
9758 msgid "PTHREAD_TRYJOIN_NP"
9759 msgstr "PTHREAD_TRYJOIN_NP"
9760
9761 #. type: Plain text
9762 #: build/C/man3/pthread_tryjoin_np.3:30
9763 msgid ""
9764 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9765 "thread"
9766 msgstr ""
9767 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9768 "試みる"
9769
9770 #. type: Plain text
9771 #: build/C/man3/pthread_tryjoin_np.3:36
9772 #, no-wrap
9773 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9774 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9775
9776 #. type: Plain text
9777 #: build/C/man3/pthread_tryjoin_np.3:39
9778 #, no-wrap
9779 msgid ""
9780 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9781 "B<                         const struct timespec *>I<abstime>B<);>\n"
9782 msgstr ""
9783 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9784 "B<                         const struct timespec *>I<abstime>B<);>\n"
9785
9786 #. type: Plain text
9787 #: build/C/man3/pthread_tryjoin_np.3:46
9788 msgid ""
9789 "These functions operate in the same way as B<pthread_join>(3), except for "
9790 "the differences described on this page."
9791 msgstr ""
9792 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9793 "このページで説明する違いがある。"
9794
9795 #. type: Plain text
9796 #: build/C/man3/pthread_tryjoin_np.3:58
9797 msgid ""
9798 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9799 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9800 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9801 "B<pthread_join>(3), the call returns an error."
9802 msgstr ""
9803 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9804 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9805 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9806 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9807
9808 #. type: Plain text
9809 #: build/C/man3/pthread_tryjoin_np.3:76
9810 msgid ""
9811 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9812 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9813 "specified in I<abstime>.  If the timeout expires before I<thread> "
9814 "terminates, the call returns an error.  The I<abstime> argument is a "
9815 "structure of the following form, specifying an absolute time measured since "
9816 "the Epoch (see B<time>(2)):"
9817 msgstr ""
9818 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9819 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9820 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9821 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9822 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9823
9824 #. type: Plain text
9825 #: build/C/man3/pthread_tryjoin_np.3:83
9826 #, no-wrap
9827 msgid ""
9828 "struct timespec {\n"
9829 "    time_t tv_sec;     /* seconds */\n"
9830 "    long   tv_nsec;    /* nanoseconds */\n"
9831 "};\n"
9832 msgstr ""
9833 "struct timespec {\n"
9834 "    time_t tv_sec;     /* seconds */\n"
9835 "    long   tv_nsec;    /* nanoseconds */\n"
9836 "};\n"
9837
9838 #. type: Plain text
9839 #: build/C/man3/pthread_tryjoin_np.3:89
9840 msgid ""
9841 "On success, these functions return 0; on error, they return an error number."
9842 msgstr ""
9843 "成功すると、これらの関数は 0 を返す。\n"
9844 "エラーの場合、エラー番号を返す。"
9845
9846 #. type: Plain text
9847 #: build/C/man3/pthread_tryjoin_np.3:94
9848 msgid ""
9849 "These functions can fail with the same errors as B<pthread_join>(3).  "
9850 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9851 msgstr ""
9852 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9853 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9854
9855 #. type: TP
9856 #: build/C/man3/pthread_tryjoin_np.3:94
9857 #, no-wrap
9858 msgid "B<EBUSY>"
9859 msgstr "B<EBUSY>"
9860
9861 #. type: Plain text
9862 #: build/C/man3/pthread_tryjoin_np.3:98
9863 msgid "I<thread> had not yet terminated at the time of the call."
9864 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9865
9866 #. type: Plain text
9867 #: build/C/man3/pthread_tryjoin_np.3:101
9868 msgid ""
9869 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9870 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9871
9872 #. type: TP
9873 #: build/C/man3/pthread_tryjoin_np.3:101
9874 #, no-wrap
9875 msgid "B<ETIMEDOUT>"
9876 msgstr "B<ETIMEDOUT>"
9877
9878 #. type: Plain text
9879 #: build/C/man3/pthread_tryjoin_np.3:106
9880 msgid "The call timed out before I<thread> terminated."
9881 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9882
9883 #. type: Plain text
9884 #: build/C/man3/pthread_tryjoin_np.3:110
9885 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9886 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9887
9888 #. type: Plain text
9889 #: build/C/man3/pthread_tryjoin_np.3:112
9890 msgid "These functions first appeared in glibc in version 2.3.3."
9891 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9892
9893 #. type: Plain text
9894 #: build/C/man3/pthread_tryjoin_np.3:117
9895 msgid "The following code waits to join for up to 5 seconds:"
9896 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9897
9898 #. type: Plain text
9899 #: build/C/man3/pthread_tryjoin_np.3:121
9900 #, no-wrap
9901 msgid ""
9902 "    struct timespec ts;\n"
9903 "    int s;\n"
9904 msgstr ""
9905 "    struct timespec ts;\n"
9906 "    int s;\n"
9907
9908 #. type: Plain text
9909 #: build/C/man3/pthread_tryjoin_np.3:123
9910 #, no-wrap
9911 msgid "    ...\n"
9912 msgstr "    ...\n"
9913
9914 #. type: Plain text
9915 #: build/C/man3/pthread_tryjoin_np.3:127
9916 #, no-wrap
9917 msgid ""
9918 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9919 "\t/* Handle error */\n"
9920 "    }\n"
9921 msgstr ""
9922 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9923 "\t/* Handle error */\n"
9924 "    }\n"
9925
9926 #. type: Plain text
9927 #: build/C/man3/pthread_tryjoin_np.3:129
9928 #, no-wrap
9929 msgid "    ts.tv_sec += 5;\n"
9930 msgstr "    ts.tv_sec += 5;\n"
9931
9932 #. type: Plain text
9933 #: build/C/man3/pthread_tryjoin_np.3:134
9934 #, no-wrap
9935 msgid ""
9936 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9937 "    if (s != 0) {\n"
9938 "        /* Handle error */\n"
9939 "    }\n"
9940 msgstr ""
9941 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9942 "    if (s != 0) {\n"
9943 "        /* Handle error */\n"
9944 "    }\n"
9945
9946 #. type: Plain text
9947 #: build/C/man3/pthread_tryjoin_np.3:140
9948 msgid ""
9949 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9950 msgstr ""
9951 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9952
9953 #. type: TH
9954 #: build/C/man3/pthread_yield.3:25
9955 #, no-wrap
9956 msgid "PTHREAD_YIELD"
9957 msgstr "PTHREAD_YIELD"
9958
9959 #. type: Plain text
9960 #: build/C/man3/pthread_yield.3:28
9961 msgid "pthread_yield - yield the processor"
9962 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9963
9964 #. type: Plain text
9965 #: build/C/man3/pthread_yield.3:34
9966 #, no-wrap
9967 msgid "B<int pthread_yield(void);>\n"
9968 msgstr "B<int pthread_yield(void);>\n"
9969
9970 #. type: Plain text
9971 #: build/C/man3/pthread_yield.3:44
9972 msgid ""
9973 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9974 "thread is placed at the end of the run queue for its static priority and "
9975 "another thread is scheduled to run.  For further details, see "
9976 "B<sched_yield>(2)"
9977 msgstr ""
9978 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9979 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9980 "別のスレッドが実行されるようにスケジューリングされる。\n"
9981 "詳細は B<sched_yield>(2) を参照。"
9982
9983 #. type: Plain text
9984 #: build/C/man3/pthread_yield.3:49
9985 msgid ""
9986 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9987 "number."
9988 msgstr ""
9989 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9990 "エラーの場合、エラー番号を返す。"
9991
9992 #. type: Plain text
9993 #: build/C/man3/pthread_yield.3:53
9994 msgid ""
9995 "On Linux, this call always succeeds (but portable and future-proof "
9996 "applications should nevertheless handle a possible error return)."
9997 msgstr ""
9998 "Linux では、この関数の呼び出しは常に成功する\n"
9999 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
10000 "正のエラーの返り値を処理するようにすべきである)。"
10001
10002 #. type: Plain text
10003 #: build/C/man3/pthread_yield.3:58
10004 msgid "The B<pthread_yield>()  function is thread-safe."
10005 msgstr "B<pthread_yield>() 関数はスレッドセーフである。"
10006
10007 #.  e.g., the BSDs, Tru64, AIX, and Irix.
10008 #. type: Plain text
10009 #: build/C/man3/pthread_yield.3:64
10010 msgid ""
10011 "This call is nonstandard, but present on several other systems.  Use the "
10012 "standardized B<sched_yield>(2)  instead."
10013 msgstr ""
10014 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
10015 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
10016
10017 #. type: Plain text
10018 #: build/C/man3/pthread_yield.3:67
10019 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
10020 msgstr ""
10021 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
10022
10023 #. type: Plain text
10024 #: build/C/man3/pthread_yield.3:71
10025 msgid "B<sched_yield>(2), B<pthreads>(7), B<sched>(7)"
10026 msgstr "B<sched_yield>(2), B<pthreads>(7), B<sched>(7)"
10027
10028 #. type: TH
10029 #: build/C/man7/pthreads.7:26
10030 #, no-wrap
10031 msgid "PTHREADS"
10032 msgstr "PTHREADS"
10033
10034 #. type: Plain text
10035 #: build/C/man7/pthreads.7:29
10036 msgid "pthreads - POSIX threads"
10037 msgstr "pthreads - POSIX スレッド"
10038
10039 #. type: Plain text
10040 #: build/C/man7/pthreads.7:36
10041 msgid ""
10042 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
10043 "programming commonly known as POSIX threads, or Pthreads.  A single process "
10044 "can contain multiple threads, all of which are executing the same program.  "
10045 "These threads share the same global memory (data and heap segments), but "
10046 "each thread has its own stack (automatic variables)."
10047 msgstr ""
10048 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
10049 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
10050 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
10051 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
10052 "スレッドは自分専用のスタック (自動変数) を持つ。"
10053
10054 #. type: Plain text
10055 #: build/C/man7/pthreads.7:39
10056 msgid ""
10057 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
10058 "these attributes are process-wide rather than per-thread):"
10059 msgstr ""
10060 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
10061 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
10062
10063 #. type: IP
10064 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
10065 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
10066 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
10067 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
10068 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
10069 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
10070 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
10071 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
10072 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
10073 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:103
10074 #: build/C/man7/pthreads.7:106 build/C/man7/pthreads.7:683
10075 #: build/C/man7/pthreads.7:690 build/C/man7/pthreads.7:702
10076 #: build/C/man7/pthreads.7:712 build/C/man7/pthreads.7:716
10077 #: build/C/man7/pthreads.7:725 build/C/man7/pthreads.7:735
10078 #: build/C/man7/pthreads.7:742 build/C/man7/pthreads.7:749
10079 #: build/C/man7/pthreads.7:751 build/C/man7/pthreads.7:754
10080 #: build/C/man7/pthreads.7:760 build/C/man7/pthreads.7:763
10081 #: build/C/man7/pthreads.7:765 build/C/man7/pthreads.7:767
10082 #: build/C/man7/pthreads.7:777 build/C/man7/pthreads.7:797
10083 #: build/C/man7/pthreads.7:806 build/C/man7/pthreads.7:812
10084 #: build/C/man7/pthreads.7:814 build/C/man7/pthreads.7:816
10085 #: build/C/man7/pthreads.7:820 build/C/man7/pthreads.7:825
10086 #: build/C/man7/pthreads.7:833
10087 #, no-wrap
10088 msgid "-"
10089 msgstr "-"
10090
10091 #. type: Plain text
10092 #: build/C/man7/pthreads.7:41
10093 msgid "process ID"
10094 msgstr "プロセス ID"
10095
10096 #. type: Plain text
10097 #: build/C/man7/pthreads.7:43
10098 msgid "parent process ID"
10099 msgstr "親プロセス ID"
10100
10101 #. type: Plain text
10102 #: build/C/man7/pthreads.7:45
10103 msgid "process group ID and session ID"
10104 msgstr "プロセスグループ ID とセッション ID"
10105
10106 #. type: Plain text
10107 #: build/C/man7/pthreads.7:47
10108 msgid "controlling terminal"
10109 msgstr "制御端末"
10110
10111 #. type: Plain text
10112 #: build/C/man7/pthreads.7:49
10113 msgid "user and group IDs"
10114 msgstr "ユーザ ID とグループ ID"
10115
10116 #. type: Plain text
10117 #: build/C/man7/pthreads.7:51
10118 msgid "open file descriptors"
10119 msgstr "オープンするファイルディスクリプタ"
10120
10121 #. type: Plain text
10122 #: build/C/man7/pthreads.7:54
10123 msgid "record locks (see B<fcntl>(2))"
10124 msgstr "レコードのロック (B<fcntl>(3)  参照)"
10125
10126 #. type: Plain text
10127 #: build/C/man7/pthreads.7:56
10128 msgid "signal dispositions"
10129 msgstr "シグナルの配置"
10130
10131 #. type: Plain text
10132 #: build/C/man7/pthreads.7:59
10133 msgid "file mode creation mask (B<umask>(2))"
10134 msgstr "ファイルモード作成マスク (B<umask>(2))"
10135
10136 #. type: Plain text
10137 #: build/C/man7/pthreads.7:65
10138 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
10139 msgstr ""
10140 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
10141
10142 #. type: Plain text
10143 #: build/C/man7/pthreads.7:70
10144 msgid ""
10145 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
10146 msgstr ""
10147 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
10148
10149 #. type: Plain text
10150 #: build/C/man7/pthreads.7:73
10151 msgid "nice value (B<setpriority>(2))"
10152 msgstr "nice 値 (B<setpriority>(2))"
10153
10154 #. type: Plain text
10155 #: build/C/man7/pthreads.7:76
10156 msgid "resource limits (B<setrlimit>(2))"
10157 msgstr "リソース制限 (B<setrlimit>(2))"
10158
10159 #. type: Plain text
10160 #: build/C/man7/pthreads.7:81
10161 msgid ""
10162 "measurements of the consumption of CPU time (B<times>(2))  and resources "
10163 "(B<getrusage>(2))"
10164 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
10165
10166 #. type: Plain text
10167 #: build/C/man7/pthreads.7:84
10168 msgid ""
10169 "As well as the stack, POSIX.1 specifies that various other attributes are "
10170 "distinct for each thread, including:"
10171 msgstr ""
10172 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
10173 "るかを規定している:"
10174
10175 #. type: Plain text
10176 #: build/C/man7/pthreads.7:88
10177 msgid "thread ID (the I<pthread_t> data type)"
10178 msgstr "スレッド ID (B<pthread_t> データ型)"
10179
10180 #. type: Plain text
10181 #: build/C/man7/pthreads.7:91
10182 msgid "signal mask (B<pthread_sigmask>(3))"
10183 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
10184
10185 #. type: Plain text
10186 #: build/C/man7/pthreads.7:95
10187 msgid "the I<errno> variable"
10188 msgstr "I<errno> 変数"
10189
10190 #. type: Plain text
10191 #: build/C/man7/pthreads.7:98
10192 msgid "alternate signal stack (B<sigaltstack>(2))"
10193 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
10194
10195 #. type: Plain text
10196 #: build/C/man7/pthreads.7:101
10197 msgid "real-time scheduling policy and priority (B<sched>(7))"
10198 msgstr "リアルタイム・スケジューリングのポリシーと優先度 (B<sched>(7))"
10199
10200 #. type: Plain text
10201 #: build/C/man7/pthreads.7:103
10202 msgid "The following Linux-specific features are also per-thread:"
10203 msgstr "以下の Linux 特有の機能もスレッド単位である:"
10204
10205 #. type: Plain text
10206 #: build/C/man7/pthreads.7:106
10207 msgid "capabilities (see B<capabilities>(7))"
10208 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
10209
10210 #. type: Plain text
10211 #: build/C/man7/pthreads.7:109
10212 msgid "CPU affinity (B<sched_setaffinity>(2))"
10213 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
10214
10215 #. type: SS
10216 #: build/C/man7/pthreads.7:109
10217 #, no-wrap
10218 msgid "Pthreads function return values"
10219 msgstr "pthreads 関数の返り値"
10220
10221 #. type: Plain text
10222 #: build/C/man7/pthreads.7:116
10223 msgid ""
10224 "Most pthreads functions return 0 on success, and an error number of "
10225 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
10226 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
10227 "the function can never fail with the error B<EINTR>."
10228 msgstr ""
10229 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
10230 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
10231 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
10232 "は決してないと規定している。"
10233
10234 #. type: SS
10235 #: build/C/man7/pthreads.7:116
10236 #, no-wrap
10237 msgid "Thread IDs"
10238 msgstr "スレッド ID"
10239
10240 #. type: Plain text
10241 #: build/C/man7/pthreads.7:130
10242 msgid ""
10243 "Each of the threads in a process has a unique thread identifier (stored in "
10244 "the type I<pthread_t>).  This identifier is returned to the caller of "
10245 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
10246 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
10247 "within a process.  A thread ID may be reused after a terminated thread has "
10248 "been joined, or a detached thread has terminated.  In all pthreads functions "
10249 "that accept a thread ID as an argument, that ID by definition refers to a "
10250 "thread in the same process as the caller."
10251 msgstr ""
10252 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
10253 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
10254 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
10255 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
10256 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
10257 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
10258 "じプロセス内の一つのスレッドを参照する。"
10259
10260 #. type: SS
10261 #: build/C/man7/pthreads.7:130
10262 #, no-wrap
10263 msgid "Thread-safe functions"
10264 msgstr "スレッドセーフな関数"
10265
10266 #. type: Plain text
10267 #: build/C/man7/pthreads.7:134
10268 msgid ""
10269 "A thread-safe function is one that can be safely (i.e., it will deliver the "
10270 "same results regardless of whether it is)  called from multiple threads at "
10271 "the same time."
10272 msgstr ""
10273 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
10274 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
10275
10276 #. type: Plain text
10277 #: build/C/man7/pthreads.7:138
10278 msgid ""
10279 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
10280 "standard shall be thread-safe, except for the following functions:"
10281 msgstr ""
10282 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
10283 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
10284
10285 #. type: Plain text
10286 #: build/C/man7/pthreads.7:232
10287 #, no-wrap
10288 msgid ""
10289 "asctime()\n"
10290 "basename()\n"
10291 "catgets()\n"
10292 "crypt()\n"
10293 "ctermid() if passed a non-NULL argument\n"
10294 "ctime()\n"
10295 "dbm_clearerr()\n"
10296 "dbm_close()\n"
10297 "dbm_delete()\n"
10298 "dbm_error()\n"
10299 "dbm_fetch()\n"
10300 "dbm_firstkey()\n"
10301 "dbm_nextkey()\n"
10302 "dbm_open()\n"
10303 "dbm_store()\n"
10304 "dirname()\n"
10305 "dlerror()\n"
10306 "drand48()\n"
10307 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10308 "encrypt()\n"
10309 "endgrent()\n"
10310 "endpwent()\n"
10311 "endutxent()\n"
10312 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10313 "ftw()\n"
10314 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10315 "getc_unlocked()\n"
10316 "getchar_unlocked()\n"
10317 "getdate()\n"
10318 "getenv()\n"
10319 "getgrent()\n"
10320 "getgrgid()\n"
10321 "getgrnam()\n"
10322 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10323 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10324 "gethostent()\n"
10325 "getlogin()\n"
10326 "getnetbyaddr()\n"
10327 "getnetbyname()\n"
10328 "getnetent()\n"
10329 "getopt()\n"
10330 "getprotobyname()\n"
10331 "getprotobynumber()\n"
10332 "getprotoent()\n"
10333 "getpwent()\n"
10334 "getpwnam()\n"
10335 "getpwuid()\n"
10336 "getservbyname()\n"
10337 "getservbyport()\n"
10338 "getservent()\n"
10339 "getutxent()\n"
10340 "getutxid()\n"
10341 "getutxline()\n"
10342 "gmtime()\n"
10343 "hcreate()\n"
10344 "hdestroy()\n"
10345 "hsearch()\n"
10346 "inet_ntoa()\n"
10347 "l64a()\n"
10348 "lgamma()\n"
10349 "lgammaf()\n"
10350 "lgammal()\n"
10351 "localeconv()\n"
10352 "localtime()\n"
10353 "lrand48()\n"
10354 "mrand48()\n"
10355 "nftw()\n"
10356 "nl_langinfo()\n"
10357 "ptsname()\n"
10358 "putc_unlocked()\n"
10359 "putchar_unlocked()\n"
10360 "putenv()\n"
10361 "pututxline()\n"
10362 "rand()\n"
10363 "readdir()\n"
10364 "setenv()\n"
10365 "setgrent()\n"
10366 "setkey()\n"
10367 "setpwent()\n"
10368 "setutxent()\n"
10369 "strerror()\n"
10370 "strsignal() [Added in POSIX.1-2008]\n"
10371 "strtok()\n"
10372 "system() [Added in POSIX.1-2008]\n"
10373 "tmpnam() if passed a non-NULL argument\n"
10374 "ttyname()\n"
10375 "unsetenv()\n"
10376 "wcrtomb() if its final argument is NULL\n"
10377 "wcsrtombs() if its final argument is NULL\n"
10378 "wcstombs()\n"
10379 "wctomb()\n"
10380 msgstr ""
10381 "asctime()\n"
10382 "basename()\n"
10383 "catgets()\n"
10384 "crypt()\n"
10385 "ctermid() (NULL でない引き数を渡された場合)\n"
10386 "ctime()\n"
10387 "dbm_clearerr()\n"
10388 "dbm_close()\n"
10389 "dbm_delete()\n"
10390 "dbm_error()\n"
10391 "dbm_fetch()\n"
10392 "dbm_firstkey()\n"
10393 "dbm_nextkey()\n"
10394 "dbm_open()\n"
10395 "dbm_store()\n"
10396 "dirname()\n"
10397 "dlerror()\n"
10398 "drand48()\n"
10399 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10400 "encrypt()\n"
10401 "endgrent()\n"
10402 "endpwent()\n"
10403 "endutxent()\n"
10404 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10405 "ftw()\n"
10406 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10407 "getc_unlocked()\n"
10408 "getchar_unlocked()\n"
10409 "getdate()\n"
10410 "getenv()\n"
10411 "getgrent()\n"
10412 "getgrgid()\n"
10413 "getgrnam()\n"
10414 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10415 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10416 "gethostent()\n"
10417 "getlogin()\n"
10418 "getnetbyaddr()\n"
10419 "getnetbyname()\n"
10420 "getnetent()\n"
10421 "getopt()\n"
10422 "getprotobyname()\n"
10423 "getprotobynumber()\n"
10424 "getprotoent()\n"
10425 "getpwent()\n"
10426 "getpwnam()\n"
10427 "getpwuid()\n"
10428 "getservbyname()\n"
10429 "getservbyport()\n"
10430 "getservent()\n"
10431 "getutxent()\n"
10432 "getutxid()\n"
10433 "getutxline()\n"
10434 "gmtime()\n"
10435 "hcreate()\n"
10436 "hdestroy()\n"
10437 "hsearch()\n"
10438 "inet_ntoa()\n"
10439 "l64a()\n"
10440 "lgamma()\n"
10441 "lgammaf()\n"
10442 "lgammal()\n"
10443 "localeconv()\n"
10444 "localtime()\n"
10445 "lrand48()\n"
10446 "mrand48()\n"
10447 "nftw()\n"
10448 "nl_langinfo()\n"
10449 "ptsname()\n"
10450 "putc_unlocked()\n"
10451 "putchar_unlocked()\n"
10452 "putenv()\n"
10453 "pututxline()\n"
10454 "rand()\n"
10455 "readdir()\n"
10456 "setenv()\n"
10457 "setgrent()\n"
10458 "setkey()\n"
10459 "setpwent()\n"
10460 "setutxent()\n"
10461 "strerror()\n"
10462 "strsignal() [POSIX.1-2008 で追加された]\n"
10463 "strtok()\n"
10464 "system() [POSIX.1-2008 で追加された]\n"
10465 "tmpnam() (NULL でない引き数を渡された場合)\n"
10466 "ttyname()\n"
10467 "unsetenv()\n"
10468 "wcrtomb() (最後の引き数が NULL の場合)\n"
10469 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10470 "wcstombs()\n"
10471 "wctomb()\n"
10472
10473 #. type: SS
10474 #: build/C/man7/pthreads.7:234
10475 #, no-wrap
10476 msgid "Async-cancel-safe functions"
10477 msgstr "async-cancel-safe 関数"
10478
10479 #. type: Plain text
10480 #: build/C/man7/pthreads.7:238
10481 msgid ""
10482 "An async-cancel-safe function is one that can be safely called in an "
10483 "application where asynchronous cancelability is enabled (see "
10484 "B<pthread_setcancelstate>(3))."
10485 msgstr ""
10486 "async-cancel-safe 関数は、\n"
10487 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10488 "安全に呼び出すことができる関数のことである\n"
10489 "(B<pthread_setcancelstate>(3) を参照)。"
10490
10491 #. type: Plain text
10492 #: build/C/man7/pthreads.7:241
10493 msgid ""
10494 "Only the following functions are required to be async-cancel-safe by "
10495 "POSIX.1-2001 and POSIX.1-2008:"
10496 msgstr ""
10497 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10498 "なければならないとされている。"
10499
10500 #. type: Plain text
10501 #: build/C/man7/pthreads.7:247
10502 #, no-wrap
10503 msgid ""
10504 "pthread_cancel()\n"
10505 "pthread_setcancelstate()\n"
10506 "pthread_setcanceltype()\n"
10507 msgstr ""
10508 "pthread_cancel()\n"
10509 "pthread_setcancelstate()\n"
10510 "pthread_setcanceltype()\n"
10511
10512 #. type: SS
10513 #: build/C/man7/pthreads.7:249
10514 #, no-wrap
10515 msgid "Cancellation points"
10516 msgstr "取り消しポイント (cancellation points)"
10517
10518 #. type: Plain text
10519 #: build/C/man7/pthreads.7:256
10520 msgid ""
10521 "POSIX.1 specifies that certain functions must, and certain other functions "
10522 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10523 "type is deferred, and a cancellation request is pending for the thread, then "
10524 "the thread is canceled when it calls a function that is a cancellation point."
10525 msgstr ""
10526 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10527 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10528 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10529 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10530 "時点で、そのスレッドのキャンセルが 行われる。"
10531
10532 #. type: Plain text
10533 #: build/C/man7/pthreads.7:259
10534 msgid ""
10535 "The following functions are required to be cancellation points by "
10536 "POSIX.1-2001 and/or POSIX.1-2008:"
10537 msgstr ""
10538 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10539 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10540
10541 #. type: Plain text
10542 #: build/C/man7/pthreads.7:322
10543 #, no-wrap
10544 msgid ""
10545 "accept()\n"
10546 "aio_suspend()\n"
10547 "clock_nanosleep()\n"
10548 "close()\n"
10549 "connect()\n"
10550 "creat()\n"
10551 "fcntl() F_SETLKW\n"
10552 "fdatasync()\n"
10553 "fsync()\n"
10554 "getmsg()\n"
10555 "getpmsg()\n"
10556 "lockf() F_LOCK\n"
10557 "mq_receive()\n"
10558 "mq_send()\n"
10559 "mq_timedreceive()\n"
10560 "mq_timedsend()\n"
10561 "msgrcv()\n"
10562 "msgsnd()\n"
10563 "msync()\n"
10564 "nanosleep()\n"
10565 "open()\n"
10566 "openat() [Added in POSIX.1-2008]\n"
10567 "pause()\n"
10568 "poll()\n"
10569 "pread()\n"
10570 "pselect()\n"
10571 "pthread_cond_timedwait()\n"
10572 "pthread_cond_wait()\n"
10573 "pthread_join()\n"
10574 "pthread_testcancel()\n"
10575 "putmsg()\n"
10576 "putpmsg()\n"
10577 "pwrite()\n"
10578 "read()\n"
10579 "readv()\n"
10580 "recv()\n"
10581 "recvfrom()\n"
10582 "recvmsg()\n"
10583 "select()\n"
10584 "sem_timedwait()\n"
10585 "sem_wait()\n"
10586 "send()\n"
10587 "sendmsg()\n"
10588 "sendto()\n"
10589 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10590 "sigsuspend()\n"
10591 "sigtimedwait()\n"
10592 "sigwait()\n"
10593 "sigwaitinfo()\n"
10594 "sleep()\n"
10595 "system()\n"
10596 "tcdrain()\n"
10597 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10598 "wait()\n"
10599 "waitid()\n"
10600 "waitpid()\n"
10601 "write()\n"
10602 "writev()\n"
10603 msgstr ""
10604 "accept()\n"
10605 "aio_suspend()\n"
10606 "clock_nanosleep()\n"
10607 "close()\n"
10608 "connect()\n"
10609 "creat()\n"
10610 "fcntl() F_SETLKW\n"
10611 "fdatasync()\n"
10612 "fsync()\n"
10613 "getmsg()\n"
10614 "getpmsg()\n"
10615 "lockf() F_LOCK\n"
10616 "mq_receive()\n"
10617 "mq_send()\n"
10618 "mq_timedreceive()\n"
10619 "mq_timedsend()\n"
10620 "msgrcv()\n"
10621 "msgsnd()\n"
10622 "msync()\n"
10623 "nanosleep()\n"
10624 "open()\n"
10625 "openat() [POSIX.1-2008 で追加された]\n"
10626 "pause()\n"
10627 "poll()\n"
10628 "pread()\n"
10629 "pselect()\n"
10630 "pthread_cond_timedwait()\n"
10631 "pthread_cond_wait()\n"
10632 "pthread_join()\n"
10633 "pthread_testcancel()\n"
10634 "putmsg()\n"
10635 "putpmsg()\n"
10636 "pwrite()\n"
10637 "read()\n"
10638 "readv()\n"
10639 "recv()\n"
10640 "recvfrom()\n"
10641 "recvmsg()\n"
10642 "select()\n"
10643 "sem_timedwait()\n"
10644 "sem_wait()\n"
10645 "send()\n"
10646 "sendmsg()\n"
10647 "sendto()\n"
10648 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10649 "sigsuspend()\n"
10650 "sigtimedwait()\n"
10651 "sigwait()\n"
10652 "sigwaitinfo()\n"
10653 "sleep()\n"
10654 "system()\n"
10655 "tcdrain()\n"
10656 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10657 "wait()\n"
10658 "waitid()\n"
10659 "waitpid()\n"
10660 "write()\n"
10661 "writev()\n"
10662
10663 #. type: Plain text
10664 #: build/C/man7/pthreads.7:327
10665 msgid ""
10666 "The following functions may be cancellation points according to POSIX.1-2001 "
10667 "and/or POSIX.1-2008:"
10668 msgstr ""
10669 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10670 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10671
10672 #. type: Plain text
10673 #: build/C/man7/pthreads.7:555
10674 #, no-wrap
10675 msgid ""
10676 "access()\n"
10677 "asctime()\n"
10678 "asctime_r()\n"
10679 "catclose()\n"
10680 "catgets()\n"
10681 "catopen()\n"
10682 "chmod() [Added in POSIX.1-2008]\n"
10683 "chown() [Added in POSIX.1-2008]\n"
10684 "closedir()\n"
10685 "closelog()\n"
10686 "ctermid()\n"
10687 "ctime()\n"
10688 "ctime_r()\n"
10689 "dbm_close()\n"
10690 "dbm_delete()\n"
10691 "dbm_fetch()\n"
10692 "dbm_nextkey()\n"
10693 "dbm_open()\n"
10694 "dbm_store()\n"
10695 "dlclose()\n"
10696 "dlopen()\n"
10697 "dprintf() [Added in POSIX.1-2008]\n"
10698 "endgrent()\n"
10699 "endhostent()\n"
10700 "endnetent()\n"
10701 "endprotoent()\n"
10702 "endpwent()\n"
10703 "endservent()\n"
10704 "endutxent()\n"
10705 "faccessat() [Added in POSIX.1-2008]\n"
10706 "fchmod() [Added in POSIX.1-2008]\n"
10707 "fchmodat() [Added in POSIX.1-2008]\n"
10708 "fchown() [Added in POSIX.1-2008]\n"
10709 "fchownat() [Added in POSIX.1-2008]\n"
10710 "fclose()\n"
10711 "fcntl() (for any value of cmd argument)\n"
10712 "fflush()\n"
10713 "fgetc()\n"
10714 "fgetpos()\n"
10715 "fgets()\n"
10716 "fgetwc()\n"
10717 "fgetws()\n"
10718 "fmtmsg()\n"
10719 "fopen()\n"
10720 "fpathconf()\n"
10721 "fprintf()\n"
10722 "fputc()\n"
10723 "fputs()\n"
10724 "fputwc()\n"
10725 "fputws()\n"
10726 "fread()\n"
10727 "freopen()\n"
10728 "fscanf()\n"
10729 "fseek()\n"
10730 "fseeko()\n"
10731 "fsetpos()\n"
10732 "fstat()\n"
10733 "fstatat() [Added in POSIX.1-2008]\n"
10734 "ftell()\n"
10735 "ftello()\n"
10736 "ftw()\n"
10737 "futimens() [Added in POSIX.1-2008]\n"
10738 "fwprintf()\n"
10739 "fwrite()\n"
10740 "fwscanf()\n"
10741 "getaddrinfo()\n"
10742 "getc()\n"
10743 "getc_unlocked()\n"
10744 "getchar()\n"
10745 "getchar_unlocked()\n"
10746 "getcwd()\n"
10747 "getdate()\n"
10748 "getdelim() [Added in POSIX.1-2008]\n"
10749 "getgrent()\n"
10750 "getgrgid()\n"
10751 "getgrgid_r()\n"
10752 "getgrnam()\n"
10753 "getgrnam_r()\n"
10754 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10755 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10756 "gethostent()\n"
10757 "gethostid()\n"
10758 "gethostname()\n"
10759 "getline() [Added in POSIX.1-2008]\n"
10760 "getlogin()\n"
10761 "getlogin_r()\n"
10762 "getnameinfo()\n"
10763 "getnetbyaddr()\n"
10764 "getnetbyname()\n"
10765 "getnetent()\n"
10766 "getopt() (if opterr is nonzero)\n"
10767 "getprotobyname()\n"
10768 "getprotobynumber()\n"
10769 "getprotoent()\n"
10770 "getpwent()\n"
10771 "getpwnam()\n"
10772 "getpwnam_r()\n"
10773 "getpwuid()\n"
10774 "getpwuid_r()\n"
10775 "gets()\n"
10776 "getservbyname()\n"
10777 "getservbyport()\n"
10778 "getservent()\n"
10779 "getutxent()\n"
10780 "getutxid()\n"
10781 "getutxline()\n"
10782 "getwc()\n"
10783 "getwchar()\n"
10784 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10785 "glob()\n"
10786 "iconv_close()\n"
10787 "iconv_open()\n"
10788 "ioctl()\n"
10789 "link()\n"
10790 "linkat() [Added in POSIX.1-2008]\n"
10791 "lio_listio() [Added in POSIX.1-2008]\n"
10792 "localtime()\n"
10793 "localtime_r()\n"
10794 "lockf() [Added in POSIX.1-2008]\n"
10795 "lseek()\n"
10796 "lstat()\n"
10797 "mkdir() [Added in POSIX.1-2008]\n"
10798 "mkdirat() [Added in POSIX.1-2008]\n"
10799 "mkdtemp() [Added in POSIX.1-2008]\n"
10800 "mkfifo() [Added in POSIX.1-2008]\n"
10801 "mkfifoat() [Added in POSIX.1-2008]\n"
10802 "mknod() [Added in POSIX.1-2008]\n"
10803 "mknodat() [Added in POSIX.1-2008]\n"
10804 "mkstemp()\n"
10805 "mktime()\n"
10806 "nftw()\n"
10807 "opendir()\n"
10808 "openlog()\n"
10809 "pathconf()\n"
10810 "pclose()\n"
10811 "perror()\n"
10812 "popen()\n"
10813 "posix_fadvise()\n"
10814 "posix_fallocate()\n"
10815 "posix_madvise()\n"
10816 "posix_openpt()\n"
10817 "posix_spawn()\n"
10818 "posix_spawnp()\n"
10819 "posix_trace_clear()\n"
10820 "posix_trace_close()\n"
10821 "posix_trace_create()\n"
10822 "posix_trace_create_withlog()\n"
10823 "posix_trace_eventtypelist_getnext_id()\n"
10824 "posix_trace_eventtypelist_rewind()\n"
10825 "posix_trace_flush()\n"
10826 "posix_trace_get_attr()\n"
10827 "posix_trace_get_filter()\n"
10828 "posix_trace_get_status()\n"
10829 "posix_trace_getnext_event()\n"
10830 "posix_trace_open()\n"
10831 "posix_trace_rewind()\n"
10832 "posix_trace_set_filter()\n"
10833 "posix_trace_shutdown()\n"
10834 "posix_trace_timedgetnext_event()\n"
10835 "posix_typed_mem_open()\n"
10836 "printf()\n"
10837 "psiginfo() [Added in POSIX.1-2008]\n"
10838 "psignal() [Added in POSIX.1-2008]\n"
10839 "pthread_rwlock_rdlock()\n"
10840 "pthread_rwlock_timedrdlock()\n"
10841 "pthread_rwlock_timedwrlock()\n"
10842 "pthread_rwlock_wrlock()\n"
10843 "putc()\n"
10844 "putc_unlocked()\n"
10845 "putchar()\n"
10846 "putchar_unlocked()\n"
10847 "puts()\n"
10848 "pututxline()\n"
10849 "putwc()\n"
10850 "putwchar()\n"
10851 "readdir()\n"
10852 "readdir_r()\n"
10853 "readlink() [Added in POSIX.1-2008]\n"
10854 "readlinkat() [Added in POSIX.1-2008]\n"
10855 "remove()\n"
10856 "rename()\n"
10857 "renameat() [Added in POSIX.1-2008]\n"
10858 "rewind()\n"
10859 "rewinddir()\n"
10860 "scandir() [Added in POSIX.1-2008]\n"
10861 "scanf()\n"
10862 "seekdir()\n"
10863 "semop()\n"
10864 "setgrent()\n"
10865 "sethostent()\n"
10866 "setnetent()\n"
10867 "setprotoent()\n"
10868 "setpwent()\n"
10869 "setservent()\n"
10870 "setutxent()\n"
10871 "sigpause() [Added in POSIX.1-2008]\n"
10872 "stat()\n"
10873 "strerror()\n"
10874 "strerror_r()\n"
10875 "strftime()\n"
10876 "symlink()\n"
10877 "symlinkat() [Added in POSIX.1-2008]\n"
10878 "sync()\n"
10879 "syslog()\n"
10880 "tmpfile()\n"
10881 "tmpnam()\n"
10882 "ttyname()\n"
10883 "ttyname_r()\n"
10884 "tzset()\n"
10885 "ungetc()\n"
10886 "ungetwc()\n"
10887 "unlink()\n"
10888 "unlinkat() [Added in POSIX.1-2008]\n"
10889 "utime() [Added in POSIX.1-2008]\n"
10890 "utimensat() [Added in POSIX.1-2008]\n"
10891 "utimes() [Added in POSIX.1-2008]\n"
10892 "vdprintf() [Added in POSIX.1-2008]\n"
10893 "vfprintf()\n"
10894 "vfwprintf()\n"
10895 "vprintf()\n"
10896 "vwprintf()\n"
10897 "wcsftime()\n"
10898 "wordexp()\n"
10899 "wprintf()\n"
10900 "wscanf()\n"
10901 msgstr ""
10902 "access()\n"
10903 "asctime()\n"
10904 "asctime_r()\n"
10905 "catclose()\n"
10906 "catgets()\n"
10907 "catopen()\n"
10908 "chmod() [POSIX.1-2008 で追加された]\n"
10909 "chown() [POSIX.1-2008 で追加された]\n"
10910 "closedir()\n"
10911 "closelog()\n"
10912 "ctermid()\n"
10913 "ctime()\n"
10914 "ctime_r()\n"
10915 "dbm_close()\n"
10916 "dbm_delete()\n"
10917 "dbm_fetch()\n"
10918 "dbm_nextkey()\n"
10919 "dbm_open()\n"
10920 "dbm_store()\n"
10921 "dlclose()\n"
10922 "dlopen()\n"
10923 "dprintf() [POSIX.1-2008 で追加された]\n"
10924 "endgrent()\n"
10925 "endhostent()\n"
10926 "endnetent()\n"
10927 "endprotoent()\n"
10928 "endpwent()\n"
10929 "endservent()\n"
10930 "endutxent()\n"
10931 "faccessat() [POSIX.1-2008 で追加された]\n"
10932 "fchmod() [POSIX.1-2008 で追加された]\n"
10933 "fchmodat() [POSIX.1-2008 で追加された]\n"
10934 "fchown() [POSIX.1-2008 で追加された]\n"
10935 "fchownat() [POSIX.1-2008 で追加された]\n"
10936 "fclose()\n"
10937 "fcntl() (cmd 引き数が何であっても)\n"
10938 "fflush()\n"
10939 "fgetc()\n"
10940 "fgetpos()\n"
10941 "fgets()\n"
10942 "fgetwc()\n"
10943 "fgetws()\n"
10944 "fmtmsg()\n"
10945 "fopen()\n"
10946 "fpathconf()\n"
10947 "fprintf()\n"
10948 "fputc()\n"
10949 "fputs()\n"
10950 "fputwc()\n"
10951 "fputws()\n"
10952 "fread()\n"
10953 "freopen()\n"
10954 "fscanf()\n"
10955 "fseek()\n"
10956 "fseeko()\n"
10957 "fsetpos()\n"
10958 "fstat()\n"
10959 "fstatat() [POSIX.1-2008 で追加された]\n"
10960 "ftell()\n"
10961 "ftello()\n"
10962 "ftw()\n"
10963 "futimens() [POSIX.1-2008 で追加された]\n"
10964 "fwprintf()\n"
10965 "fwrite()\n"
10966 "fwscanf()\n"
10967 "getaddrinfo()\n"
10968 "getc()\n"
10969 "getc_unlocked()\n"
10970 "getchar()\n"
10971 "getchar_unlocked()\n"
10972 "getcwd()\n"
10973 "getdate()\n"
10974 "getdelim() [POSIX.1-2008 で追加された]\n"
10975 "getgrent()\n"
10976 "getgrgid()\n"
10977 "getgrgid_r()\n"
10978 "getgrnam()\n"
10979 "getgrnam_r()\n"
10980 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10981 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10982 "gethostent()\n"
10983 "gethostid()\n"
10984 "gethostname()\n"
10985 "getline() [POSIX.1-2008 で追加された]\n"
10986 "getlogin()\n"
10987 "getlogin_r()\n"
10988 "getnameinfo()\n"
10989 "getnetbyaddr()\n"
10990 "getnetbyname()\n"
10991 "getnetent()\n"
10992 "getopt() (opterr が 0 以外の場合)\n"
10993 "getprotobyname()\n"
10994 "getprotobynumber()\n"
10995 "getprotoent()\n"
10996 "getpwent()\n"
10997 "getpwnam()\n"
10998 "getpwnam_r()\n"
10999 "getpwuid()\n"
11000 "getpwuid_r()\n"
11001 "gets()\n"
11002 "getservbyname()\n"
11003 "getservbyport()\n"
11004 "getservent()\n"
11005 "getutxent()\n"
11006 "getutxid()\n"
11007 "getutxline()\n"
11008 "getwc()\n"
11009 "getwchar()\n"
11010 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
11011 "glob()\n"
11012 "iconv_close()\n"
11013 "iconv_open()\n"
11014 "ioctl()\n"
11015 "link()\n"
11016 "linkat() [POSIX.1-2008 で追加された]\n"
11017 "lio_listio() [POSIX.1-2008 で追加された]\n"
11018 "localtime()\n"
11019 "localtime_r()\n"
11020 "lockf() [POSIX.1-2008 で追加された]\n"
11021 "lseek()\n"
11022 "lstat()\n"
11023 "mkdir() [POSIX.1-2008 で追加された]\n"
11024 "mkdirat() [POSIX.1-2008 で追加された]\n"
11025 "mkdtemp() [POSIX.1-2008 で追加された]\n"
11026 "mkfifo() [POSIX.1-2008 で追加された]\n"
11027 "mkfifoat() [POSIX.1-2008 で追加された]\n"
11028 "mknod() [POSIX.1-2008 で追加された]\n"
11029 "mknodat() [POSIX.1-2008 で追加された]\n"
11030 "mkstemp()\n"
11031 "mktime()\n"
11032 "nftw()\n"
11033 "opendir()\n"
11034 "openlog()\n"
11035 "pathconf()\n"
11036 "pclose()\n"
11037 "perror()\n"
11038 "popen()\n"
11039 "posix_fadvise()\n"
11040 "posix_fallocate()\n"
11041 "posix_madvise()\n"
11042 "posix_openpt()\n"
11043 "posix_spawn()\n"
11044 "posix_spawnp()\n"
11045 "posix_trace_clear()\n"
11046 "posix_trace_close()\n"
11047 "posix_trace_create()\n"
11048 "posix_trace_create_withlog()\n"
11049 "posix_trace_eventtypelist_getnext_id()\n"
11050 "posix_trace_eventtypelist_rewind()\n"
11051 "posix_trace_flush()\n"
11052 "posix_trace_get_attr()\n"
11053 "posix_trace_get_filter()\n"
11054 "posix_trace_get_status()\n"
11055 "posix_trace_getnext_event()\n"
11056 "posix_trace_open()\n"
11057 "posix_trace_rewind()\n"
11058 "posix_trace_set_filter()\n"
11059 "posix_trace_shutdown()\n"
11060 "posix_trace_timedgetnext_event()\n"
11061 "posix_typed_mem_open()\n"
11062 "printf()\n"
11063 "psiginfo() [POSIX.1-2008 で追加された]\n"
11064 "psignal() [POSIX.1-2008 で追加された]\n"
11065 "pthread_rwlock_rdlock()\n"
11066 "pthread_rwlock_timedrdlock()\n"
11067 "pthread_rwlock_timedwrlock()\n"
11068 "pthread_rwlock_wrlock()\n"
11069 "putc()\n"
11070 "putc_unlocked()\n"
11071 "putchar()\n"
11072 "putchar_unlocked()\n"
11073 "puts()\n"
11074 "pututxline()\n"
11075 "putwc()\n"
11076 "putwchar()\n"
11077 "readdir()\n"
11078 "readdir_r()\n"
11079 "readlink() [POSIX.1-2008 で追加された]\n"
11080 "readlinkat() [POSIX.1-2008 で追加された]\n"
11081 "remove()\n"
11082 "rename()\n"
11083 "renameat() [POSIX.1-2008 で追加された]\n"
11084 "rewind()\n"
11085 "rewinddir()\n"
11086 "scandir() [POSIX.1-2008 で追加された]\n"
11087 "scanf()\n"
11088 "seekdir()\n"
11089 "semop()\n"
11090 "setgrent()\n"
11091 "sethostent()\n"
11092 "setnetent()\n"
11093 "setprotoent()\n"
11094 "setpwent()\n"
11095 "setservent()\n"
11096 "setutxent()\n"
11097 "sigpause() [POSIX.1-2008 で追加された]\n"
11098 "stat()\n"
11099 "strerror()\n"
11100 "strerror_r()\n"
11101 "strftime()\n"
11102 "symlink()\n"
11103 "symlinkat() [POSIX.1-2008 で追加された]\n"
11104 "sync()\n"
11105 "syslog()\n"
11106 "tmpfile()\n"
11107 "tmpnam()\n"
11108 "ttyname()\n"
11109 "ttyname_r()\n"
11110 "tzset()\n"
11111 "ungetc()\n"
11112 "ungetwc()\n"
11113 "unlink()\n"
11114 "unlinkat() [POSIX.1-2008 で追加された]\n"
11115 "utime() [POSIX.1-2008 で追加された]\n"
11116 "utimensat() [POSIX.1-2008 で追加された]\n"
11117 "utimes() [POSIX.1-2008 で追加された]\n"
11118 "vdprintf() [POSIX.1-2008 で追加された]\n"
11119 "vfprintf()\n"
11120 "vfwprintf()\n"
11121 "vprintf()\n"
11122 "vwprintf()\n"
11123 "wcsftime()\n"
11124 "wordexp()\n"
11125 "wprintf()\n"
11126 "wscanf()\n"
11127
11128 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
11129 #.  files, it looks as though at least the following nonstandard
11130 #.  functions are cancellation points:
11131 #.  endnetgrent
11132 #.  endspent
11133 #.  epoll_pwait
11134 #.  epoll_wait
11135 #.  fcloseall
11136 #.  fdopendir
11137 #.  fflush_unlocked
11138 #.  fgetc_unlocked
11139 #.  fgetgrent
11140 #.  fgetgrent_r
11141 #.  fgetpwent
11142 #.  fgetpwent_r
11143 #.  fgets_unlocked
11144 #.  fgetspent
11145 #.  fgetspent_r
11146 #.  fgetwc_unlocked
11147 #.  fgetws_unlocked
11148 #.  fputc_unlocked
11149 #.  fputs_unlocked
11150 #.  fputwc_unlocked
11151 #.  fputws_unlocked
11152 #.  fread_unlocked
11153 #.  fwrite_unlocked
11154 #.  gai_suspend
11155 #.  getaddrinfo_a
11156 #.  getdate_r
11157 #.  getgrent_r
11158 #.  getgrouplist
11159 #.  gethostbyaddr_r
11160 #.  gethostbyname2
11161 #.  gethostbyname2_r
11162 #.  gethostbyname_r
11163 #.  gethostent_r
11164 #.  getnetbyaddr_r
11165 #.  getnetbyname_r
11166 #.  getnetent_r
11167 #.  getnetgrent
11168 #.  getnetgrent_r
11169 #.  getprotobyname_r
11170 #.  getprotobynumber_r
11171 #.  getprotoent_r
11172 #.  getpw
11173 #.  getpwent_r
11174 #.  getservbyname_r
11175 #.  getservbyport_r
11176 #.  getservent_r
11177 #.  getspent
11178 #.  getspent_r
11179 #.  getspnam
11180 #.  getspnam_r
11181 #.  getutmp
11182 #.  getutmpx
11183 #.  getw
11184 #.  getwc_unlocked
11185 #.  getwchar_unlocked
11186 #.  initgroups
11187 #.  innetgr
11188 #.  mkostemp
11189 #.  mkostemp64
11190 #.  mkstemp64
11191 #.  ppoll
11192 #.  pthread_timedjoin_np
11193 #.  putgrent
11194 #.  putpwent
11195 #.  putspent
11196 #.  putw
11197 #.  putwc_unlocked
11198 #.  putwchar_unlocked
11199 #.  rcmd
11200 #.  rcmd_af
11201 #.  rexec
11202 #.  rexec_af
11203 #.  rresvport
11204 #.  rresvport_af
11205 #.  ruserok
11206 #.  ruserok_af
11207 #.  setnetgrent
11208 #.  setspent
11209 #.  sgetspent
11210 #.  sgetspent_r
11211 #.  updwtmpx
11212 #.  utmpxname
11213 #.  vfscanf
11214 #.  vfwscanf
11215 #.  vscanf
11216 #.  vsyslog
11217 #.  vwscanf
11218 #. type: Plain text
11219 #: build/C/man7/pthreads.7:653
11220 msgid ""
11221 "An implementation may also mark other functions not specified in the "
11222 "standard as cancellation points.  In particular, an implementation is likely "
11223 "to mark any nonstandard function that may block as a cancellation point.  "
11224 "(This includes most functions that can touch files.)"
11225 msgstr ""
11226 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
11227 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
11228 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
11229 "関数がこれに含まれる)。"
11230
11231 #. type: SS
11232 #: build/C/man7/pthreads.7:653
11233 #, no-wrap
11234 msgid "Compiling on Linux"
11235 msgstr "Linux でのコンパイル"
11236
11237 #. type: Plain text
11238 #: build/C/man7/pthreads.7:656
11239 msgid ""
11240 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
11241 "pthread>."
11242 msgstr ""
11243 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
11244 "きである。"
11245
11246 #. type: SS
11247 #: build/C/man7/pthreads.7:656
11248 #, no-wrap
11249 msgid "Linux implementations of POSIX threads"
11250 msgstr "POSIX スレッドの Linux での実装"
11251
11252 #. type: Plain text
11253 #: build/C/man7/pthreads.7:659
11254 msgid ""
11255 "Over time, two threading implementations have been provided by the GNU C "
11256 "library on Linux:"
11257 msgstr ""
11258 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
11259 "た。"
11260
11261 #. type: TP
11262 #: build/C/man7/pthreads.7:659
11263 #, no-wrap
11264 msgid "B<LinuxThreads>"
11265 msgstr "B<LinuxThreads>"
11266
11267 #. type: Plain text
11268 #: build/C/man7/pthreads.7:663
11269 msgid ""
11270 "This is the original Pthreads implementation.  Since glibc 2.4, this "
11271 "implementation is no longer supported."
11272 msgstr ""
11273 "最初の Pthreads の実装。\n"
11274 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
11275
11276 #. type: TP
11277 #: build/C/man7/pthreads.7:663
11278 #, no-wrap
11279 msgid "B<NPTL> (Native POSIX Threads Library)"
11280 msgstr "B<NPTL> (Native POSIX Threads Library)"
11281
11282 #. type: Plain text
11283 #: build/C/man7/pthreads.7:671
11284 msgid ""
11285 "This is the modern Pthreads implementation.  By comparison with "
11286 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
11287 "POSIX.1 specification and better performance when creating large numbers of "
11288 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
11289 "are present in the Linux 2.6 kernel."
11290 msgstr ""
11291 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
11292 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
11293 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
11294 "装されている機能が必要である。"
11295
11296 #. type: Plain text
11297 #: build/C/man7/pthreads.7:681
11298 msgid ""
11299 "Both of these are so-called 1:1 implementations, meaning that each thread "
11300 "maps to a kernel scheduling entity.  Both threading implementations employ "
11301 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
11302 "primitives (mutexes, thread joining, and so on) are implemented using the "
11303 "Linux B<futex>(2)  system call."
11304 msgstr ""
11305 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
11306 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
11307 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
11308 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
11309 "使って実装されている。"
11310
11311 #. type: SS
11312 #: build/C/man7/pthreads.7:681
11313 #, no-wrap
11314 msgid "LinuxThreads"
11315 msgstr "LinuxThreads"
11316
11317 #. type: Plain text
11318 #: build/C/man7/pthreads.7:683
11319 msgid "The notable features of this implementation are the following:"
11320 msgstr "この実装の大きな特徴は以下の通りである:"
11321
11322 #. type: Plain text
11323 #: build/C/man7/pthreads.7:690
11324 msgid ""
11325 "In addition to the main (initial) thread, and the threads that the program "
11326 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
11327 "thread.  This thread handles thread creation and termination.  (Problems can "
11328 "result if this thread is inadvertently killed.)"
11329 msgstr ""
11330 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
11331 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
11332 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
11333 "kill されると、問題が起こることがある)。"
11334
11335 #. type: Plain text
11336 #: build/C/man7/pthreads.7:702
11337 msgid ""
11338 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
11339 "the first three real-time signals are used (see also B<signal>(7)).  On "
11340 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
11341 "avoid the use of whichever set of signals is employed by the implementation."
11342 msgstr ""
11343 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11344 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11345 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11346 "用されているシグナルを どれも使わないようにしなければならない。"
11347
11348 #. type: Plain text
11349 #: build/C/man7/pthreads.7:709
11350 msgid ""
11351 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11352 "implemented as processes which share more information than usual, but which "
11353 "do not share a common process ID.)  LinuxThreads threads (including the "
11354 "manager thread)  are visible as separate processes using B<ps>(1)."
11355 msgstr ""
11356 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11357 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11358 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11359 "を使うと別のプロセスのように見える。"
11360
11361 #. type: Plain text
11362 #: build/C/man7/pthreads.7:712
11363 msgid ""
11364 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11365 "number of ways, including the following:"
11366 msgstr ""
11367 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11368 "示すような点がある:"
11369
11370 #. type: Plain text
11371 #: build/C/man7/pthreads.7:716
11372 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11373 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11374
11375 #. type: Plain text
11376 #: build/C/man7/pthreads.7:725
11377 msgid ""
11378 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11379 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11380 "should return the same value as B<getppid>(2)  in the main thread."
11381 msgstr ""
11382 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11383 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11384 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11385
11386 #. type: Plain text
11387 #: build/C/man7/pthreads.7:735
11388 msgid ""
11389 "When one thread creates a new child process using B<fork>(2), any thread "
11390 "should be able to B<wait>(2)  on the child.  However, the implementation "
11391 "only allows the thread that created the child to B<wait>(2)  on it."
11392 msgstr ""
11393 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11394 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11395 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11396 "る。"
11397
11398 #. type: Plain text
11399 #: build/C/man7/pthreads.7:742
11400 msgid ""
11401 "When a thread calls B<execve>(2), all other threads are terminated (as "
11402 "required by POSIX.1).  However, the resulting process has the same PID as "
11403 "the thread that called B<execve>(2): it should have the same PID as the main "
11404 "thread."
11405 msgstr ""
11406 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11407 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11408 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11409 "る。"
11410
11411 #. type: Plain text
11412 #: build/C/man7/pthreads.7:749
11413 msgid ""
11414 "Threads do not share user and group IDs.  This can cause complications with "
11415 "set-user-ID programs and can cause failures in Pthreads functions if an "
11416 "application changes its credentials using B<seteuid>(2)  or similar."
11417 msgstr ""
11418 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11419 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11420 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11421
11422 #. type: Plain text
11423 #: build/C/man7/pthreads.7:751
11424 msgid "Threads do not share a common session ID and process group ID."
11425 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11426
11427 #. type: Plain text
11428 #: build/C/man7/pthreads.7:754
11429 msgid "Threads do not share record locks created using B<fcntl>(2)."
11430 msgstr ""
11431 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11432
11433 #. type: Plain text
11434 #: build/C/man7/pthreads.7:760
11435 msgid ""
11436 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11437 "rather than process-wide."
11438 msgstr ""
11439 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11440 "単位の情報である。"
11441
11442 #. type: Plain text
11443 #: build/C/man7/pthreads.7:763
11444 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11445 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11446
11447 #. type: Plain text
11448 #: build/C/man7/pthreads.7:765
11449 msgid "Threads do not share interval timers."
11450 msgstr "スレッド間でインターバル・タイマを共有しない。"
11451
11452 #.  FIXME . bug report filed for NPTL nice nonconformance
11453 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11454 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11455 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11456 #.  Monitor this to see if it makes it into mainline.
11457 #. type: Plain text
11458 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:804
11459 msgid "Threads do not share a common nice value."
11460 msgstr "スレッドは共通の nice 値を共有しない。"
11461
11462 #. type: Plain text
11463 #: build/C/man7/pthreads.7:777
11464 msgid ""
11465 "POSIX.1 distinguishes the notions of signals that are directed to the "
11466 "process as a whole and signals that are directed to individual threads.  "
11467 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11468 "example) should be handled by a single, arbitrarily selected thread within "
11469 "the process.  LinuxThreads does not support the notion of process-directed "
11470 "signals: signals may be sent only to specific threads."
11471 msgstr ""
11472 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11473 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11474 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11475 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11476 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11477 "ルは特定のスレッドにだけ送ることができる。"
11478
11479 #. type: Plain text
11480 #: build/C/man7/pthreads.7:786
11481 msgid ""
11482 "Threads have distinct alternate signal stack settings.  However, a new "
11483 "thread's alternate signal stack settings are copied from the thread that "
11484 "created it, so that the threads initially share an alternate signal stack.  "
11485 "(A new thread should start with no alternate signal stack defined.  If two "
11486 "threads handle signals on their shared alternate signal stack at the same "
11487 "time, unpredictable program failures are likely to occur.)"
11488 msgstr ""
11489 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11490 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11491 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11492 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11493 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11494 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11495
11496 #. type: SS
11497 #: build/C/man7/pthreads.7:786
11498 #, no-wrap
11499 msgid "NPTL"
11500 msgstr "NPTL"
11501
11502 #. type: Plain text
11503 #: build/C/man7/pthreads.7:795
11504 msgid ""
11505 "With NPTL, all of the threads in a process are placed in the same thread "
11506 "group; all members of a thread group share the same PID.  NPTL does not "
11507 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11508 "signals (see also B<signal>(7)); these signals cannot be used in "
11509 "applications."
11510 msgstr ""
11511 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11512 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11513 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11514 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11515 "ションでは使用できない。"
11516
11517 #. type: Plain text
11518 #: build/C/man7/pthreads.7:797
11519 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11520 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11521
11522 #. type: Plain text
11523 #: build/C/man7/pthreads.7:806
11524 msgid "Some NPTL nonconformances occur only with older kernels:"
11525 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11526
11527 #. type: Plain text
11528 #: build/C/man7/pthreads.7:812
11529 msgid ""
11530 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11531 "rather than process-wide (fixed in kernel 2.6.9)."
11532 msgstr ""
11533 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11534 "単位の情報である (カーネル 2.6.9 で修正された)。"
11535
11536 #. type: Plain text
11537 #: build/C/man7/pthreads.7:814
11538 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11539 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11540
11541 #. type: Plain text
11542 #: build/C/man7/pthreads.7:816
11543 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11544 msgstr ""
11545 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11546
11547 #. type: Plain text
11548 #: build/C/man7/pthreads.7:820
11549 msgid ""
11550 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11551 "(fixed in kernel 2.6.16)."
11552 msgstr ""
11553 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11554 "きる (カーネル 2.6.16 で修正された)。"
11555
11556 #. type: Plain text
11557 #: build/C/man7/pthreads.7:825
11558 msgid ""
11559 "Only the main thread is permitted to make the process into a process group "
11560 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11561 msgstr ""
11562 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11563 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11564
11565 #. type: Plain text
11566 #: build/C/man7/pthreads.7:831
11567 msgid ""
11568 "Threads have distinct alternate signal stack settings.  However, a new "
11569 "thread's alternate signal stack settings are copied from the thread that "
11570 "created it, so that the threads initially share an alternate signal stack "
11571 "(fixed in kernel 2.6.16)."
11572 msgstr ""
11573 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11574 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11575 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11576 "ル 2.6.16 で修正された)。"
11577
11578 #. type: Plain text
11579 #: build/C/man7/pthreads.7:833
11580 msgid "Note the following further points about the NPTL implementation:"
11581 msgstr "NPTL の実装では以下の点についても注意すること:"
11582
11583 #. type: Plain text
11584 #: build/C/man7/pthreads.7:847
11585 msgid ""
11586 "If the stack size soft resource limit (see the description of "
11587 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11588 "I<unlimited>, then this value defines the default stack size for new "
11589 "threads.  To be effective, this limit must be set before the program is "
11590 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11591 "stacksize> in the C shell)."
11592 msgstr ""
11593 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11594 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11595 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11596 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11597 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11598 "は I<limit stacksize>)  を使って設定する。"
11599
11600 #. type: SS
11601 #: build/C/man7/pthreads.7:847
11602 #, no-wrap
11603 msgid "Determining the threading implementation"
11604 msgstr "スレッド実装の判定"
11605
11606 #. type: Plain text
11607 #: build/C/man7/pthreads.7:852
11608 msgid ""
11609 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11610 "system's threading implementation, for example:"
11611 msgstr ""
11612 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11613 "装を判定することができる。 以下に例を示す:"
11614
11615 #. type: Plain text
11616 #: build/C/man7/pthreads.7:857
11617 #, no-wrap
11618 msgid ""
11619 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11620 "NPTL 2.3.4\n"
11621 msgstr ""
11622 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11623 "NPTL 2.3.4\n"
11624
11625 #. type: Plain text
11626 #: build/C/man7/pthreads.7:862
11627 msgid ""
11628 "With older glibc versions, a command such as the following should be "
11629 "sufficient to determine the default threading implementation:"
11630 msgstr ""
11631 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11632 "ド実装を判定することができる。"
11633
11634 #. type: Plain text
11635 #: build/C/man7/pthreads.7:868
11636 #, no-wrap
11637 msgid ""
11638 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11639 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11640 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11641 msgstr ""
11642 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11643 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11644 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11645
11646 #. type: SS
11647 #: build/C/man7/pthreads.7:870
11648 #, no-wrap
11649 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11650 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11651
11652 #. type: Plain text
11653 #: build/C/man7/pthreads.7:885
11654 msgid ""
11655 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11656 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11657 "override the dynamic linker's default choice of threading implementation.  "
11658 "This variable tells the dynamic linker to assume that it is running on top "
11659 "of a particular kernel version.  By specifying a kernel version that does "
11660 "not provide the support required by NPTL, we can force the use of "
11661 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11662 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11663 "For example:"
11664 msgstr ""
11665 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11666 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11667 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11668 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11669 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11670 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11671 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11672 "ン を動作させる場合だろう)。 以下に例を示す:"
11673
11674 #. type: Plain text
11675 #: build/C/man7/pthreads.7:891
11676 #, no-wrap
11677 msgid ""
11678 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11679 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11680 "        linuxthreads-0.10 by Xavier Leroy\n"
11681 msgstr ""
11682 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11683 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11684 "        linuxthreads-0.10 by Xavier Leroy\n"
11685
11686 #. type: Plain text
11687 #: build/C/man7/pthreads.7:903
11688 msgid ""
11689 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), "
11690 "B<sigevent>(7), B<signal>(7),"
11691 msgstr ""
11692 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11693 "B<signal>(7),"
11694
11695 #. type: Plain text
11696 #: build/C/man7/pthreads.7:927
11697 msgid ""
11698 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11699 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11700 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11701 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11702 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11703 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), "
11704 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3), "
11705 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3), "
11706 "and B<pthread_testcancel>(3)"
11707 msgstr ""
11708 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11709 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11710 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11711 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11712 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11713 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11714 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11715 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11716 "and B<pthread_testcancel>(3)"
11717
11718 #~ msgid "2014-04-14"
11719 #~ msgstr "2014-04-14"
11720
11721 #~ msgid "2014-04-21"
11722 #~ msgstr "2014-04-21"
11723
11724 #~ msgid "2014-05-10"
11725 #~ msgstr "2014-05-10"
11726
11727 #~ msgid "2008-12-04"
11728 #~ msgstr "2008-12-04"
11729
11730 #~ msgid "2012-08-03"
11731 #~ msgstr "2012-08-03"
11732
11733 #~ msgid "2009-03-30"
11734 #~ msgstr "2009-03-30"
11735
11736 #~ msgid "2009-02-08"
11737 #~ msgstr "2009-02-08"
11738
11739 #~ msgid "2009-04-10"
11740 #~ msgstr "2009-04-10"
11741
11742 #~ msgid "2013-06-21"
11743 #~ msgstr "2013-06-21"