OSDN Git Service

(split) LDP: Translation snapshots for LDP 3.64
[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-04-17 13:14+0900\n"
10 "PO-Revision-Date: 2014-04-17 23:40+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/getcontext.3:25
20 #, no-wrap
21 msgid "GETCONTEXT"
22 msgstr "GETCONTEXT"
23
24 #. type: TH
25 #: build/C/man3/getcontext.3:25
26 #, no-wrap
27 msgid "2009-03-15"
28 msgstr "2009-03-15"
29
30 #. type: TH
31 #: build/C/man3/getcontext.3:25 build/C/man3/pthread_attr_init.3:26
32 #: build/C/man3/pthread_attr_setaffinity_np.3:26
33 #: build/C/man3/pthread_attr_setdetachstate.3:26
34 #: build/C/man3/pthread_attr_setguardsize.3:26
35 #: build/C/man3/pthread_attr_setinheritsched.3:26
36 #: build/C/man3/pthread_attr_setschedparam.3:26
37 #: build/C/man3/pthread_attr_setschedpolicy.3:26
38 #: build/C/man3/pthread_attr_setscope.3:26
39 #: build/C/man3/pthread_attr_setstack.3:26
40 #: build/C/man3/pthread_attr_setstackaddr.3:26
41 #: build/C/man3/pthread_attr_setstacksize.3:26
42 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
43 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
44 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
45 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
46 #: build/C/man3/pthread_getattr_np.3:26
47 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
48 #: build/C/man3/pthread_kill.3:26
49 #: build/C/man3/pthread_kill_other_threads_np.3:26
50 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
51 #: build/C/man3/pthread_setcancelstate.3:26
52 #: build/C/man3/pthread_setconcurrency.3:25
53 #: build/C/man3/pthread_setname_np.3:26
54 #: build/C/man3/pthread_setschedparam.3:26
55 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
56 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
57 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
58 #: build/C/man7/pthreads.7:26
59 #, no-wrap
60 msgid "Linux"
61 msgstr "Linux"
62
63 #. type: TH
64 #: build/C/man3/getcontext.3:25 build/C/man3/makecontext.3:28
65 #: build/C/man3/pthread_attr_init.3:26
66 #: build/C/man3/pthread_attr_setaffinity_np.3:26
67 #: build/C/man3/pthread_attr_setdetachstate.3:26
68 #: build/C/man3/pthread_attr_setguardsize.3:26
69 #: build/C/man3/pthread_attr_setinheritsched.3:26
70 #: build/C/man3/pthread_attr_setschedparam.3:26
71 #: build/C/man3/pthread_attr_setschedpolicy.3:26
72 #: build/C/man3/pthread_attr_setscope.3:26
73 #: build/C/man3/pthread_attr_setstack.3:26
74 #: build/C/man3/pthread_attr_setstackaddr.3:26
75 #: build/C/man3/pthread_attr_setstacksize.3:26
76 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
77 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
78 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
79 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
80 #: build/C/man3/pthread_getattr_np.3:26
81 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
82 #: build/C/man3/pthread_kill.3:26
83 #: build/C/man3/pthread_kill_other_threads_np.3:26
84 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
85 #: build/C/man3/pthread_setcancelstate.3:26
86 #: build/C/man3/pthread_setconcurrency.3:25
87 #: build/C/man3/pthread_setname_np.3:26
88 #: build/C/man3/pthread_setschedparam.3:26
89 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
90 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
91 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
92 #: build/C/man7/pthreads.7:26
93 #, no-wrap
94 msgid "Linux Programmer's Manual"
95 msgstr "Linux Programmer's Manual"
96
97 #. type: SH
98 #: build/C/man3/getcontext.3:26 build/C/man3/makecontext.3:29
99 #: build/C/man3/pthread_attr_init.3:27
100 #: build/C/man3/pthread_attr_setaffinity_np.3:27
101 #: build/C/man3/pthread_attr_setdetachstate.3:27
102 #: build/C/man3/pthread_attr_setguardsize.3:27
103 #: build/C/man3/pthread_attr_setinheritsched.3:27
104 #: build/C/man3/pthread_attr_setschedparam.3:27
105 #: build/C/man3/pthread_attr_setschedpolicy.3:27
106 #: build/C/man3/pthread_attr_setscope.3:27
107 #: build/C/man3/pthread_attr_setstack.3:27
108 #: build/C/man3/pthread_attr_setstackaddr.3:27
109 #: build/C/man3/pthread_attr_setstacksize.3:27
110 #: build/C/man3/pthread_cancel.3:27 build/C/man3/pthread_cleanup_push.3:27
111 #: build/C/man3/pthread_cleanup_push_defer_np.3:27
112 #: build/C/man3/pthread_create.3:27 build/C/man3/pthread_detach.3:27
113 #: build/C/man3/pthread_equal.3:27 build/C/man3/pthread_exit.3:27
114 #: build/C/man3/pthread_getattr_np.3:27
115 #: build/C/man3/pthread_getcpuclockid.3:27 build/C/man3/pthread_join.3:27
116 #: build/C/man3/pthread_kill.3:27
117 #: build/C/man3/pthread_kill_other_threads_np.3:27
118 #: build/C/man3/pthread_self.3:27 build/C/man3/pthread_setaffinity_np.3:27
119 #: build/C/man3/pthread_setcancelstate.3:27
120 #: build/C/man3/pthread_setconcurrency.3:26
121 #: build/C/man3/pthread_setname_np.3:27
122 #: build/C/man3/pthread_setschedparam.3:27
123 #: build/C/man3/pthread_setschedprio.3:27 build/C/man3/pthread_sigmask.3:27
124 #: build/C/man3/pthread_sigqueue.3:26 build/C/man3/pthread_testcancel.3:27
125 #: build/C/man3/pthread_tryjoin_np.3:27 build/C/man3/pthread_yield.3:26
126 #: build/C/man7/pthreads.7:27
127 #, no-wrap
128 msgid "NAME"
129 msgstr "名前"
130
131 #. type: Plain text
132 #: build/C/man3/getcontext.3:28
133 msgid "getcontext, setcontext - get or set the user context"
134 msgstr "getcontext, setcontext - ユーザコンテキストを取得/設定する"
135
136 #. type: SH
137 #: build/C/man3/getcontext.3:28 build/C/man3/makecontext.3:31
138 #: build/C/man3/pthread_attr_init.3:30
139 #: build/C/man3/pthread_attr_setaffinity_np.3:30
140 #: build/C/man3/pthread_attr_setdetachstate.3:30
141 #: build/C/man3/pthread_attr_setguardsize.3:30
142 #: build/C/man3/pthread_attr_setinheritsched.3:30
143 #: build/C/man3/pthread_attr_setschedparam.3:30
144 #: build/C/man3/pthread_attr_setschedpolicy.3:30
145 #: build/C/man3/pthread_attr_setscope.3:30
146 #: build/C/man3/pthread_attr_setstack.3:30
147 #: build/C/man3/pthread_attr_setstackaddr.3:30
148 #: build/C/man3/pthread_attr_setstacksize.3:30
149 #: build/C/man3/pthread_cancel.3:29 build/C/man3/pthread_cleanup_push.3:30
150 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
151 #: build/C/man3/pthread_create.3:29 build/C/man3/pthread_detach.3:29
152 #: build/C/man3/pthread_equal.3:29 build/C/man3/pthread_exit.3:29
153 #: build/C/man3/pthread_getattr_np.3:29
154 #: build/C/man3/pthread_getcpuclockid.3:29 build/C/man3/pthread_join.3:29
155 #: build/C/man3/pthread_kill.3:29
156 #: build/C/man3/pthread_kill_other_threads_np.3:29
157 #: build/C/man3/pthread_self.3:29 build/C/man3/pthread_setaffinity_np.3:30
158 #: build/C/man3/pthread_setcancelstate.3:30
159 #: build/C/man3/pthread_setconcurrency.3:29
160 #: build/C/man3/pthread_setname_np.3:29
161 #: build/C/man3/pthread_setschedparam.3:30
162 #: build/C/man3/pthread_setschedprio.3:29 build/C/man3/pthread_sigmask.3:29
163 #: build/C/man3/pthread_sigqueue.3:28 build/C/man3/pthread_testcancel.3:29
164 #: build/C/man3/pthread_tryjoin_np.3:30 build/C/man3/pthread_yield.3:28
165 #, no-wrap
166 msgid "SYNOPSIS"
167 msgstr "書式"
168
169 #. type: Plain text
170 #: build/C/man3/getcontext.3:30 build/C/man3/makecontext.3:33
171 msgid "B<#include E<lt>ucontext.hE<gt>>"
172 msgstr "B<#include E<lt>ucontext.hE<gt>>"
173
174 #. type: Plain text
175 #: build/C/man3/getcontext.3:32
176 msgid "B<int getcontext(ucontext_t *>I<ucp>B<);>"
177 msgstr "B<int getcontext(ucontext_t *>I<ucp>B<);>"
178
179 #. type: Plain text
180 #: build/C/man3/getcontext.3:34
181 msgid "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
182 msgstr "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
183
184 #. type: SH
185 #: build/C/man3/getcontext.3:34 build/C/man3/makecontext.3:38
186 #: build/C/man3/pthread_attr_init.3:39
187 #: build/C/man3/pthread_attr_setaffinity_np.3:42
188 #: build/C/man3/pthread_attr_setdetachstate.3:41
189 #: build/C/man3/pthread_attr_setguardsize.3:41
190 #: build/C/man3/pthread_attr_setinheritsched.3:41
191 #: build/C/man3/pthread_attr_setschedparam.3:41
192 #: build/C/man3/pthread_attr_setschedpolicy.3:41
193 #: build/C/man3/pthread_attr_setscope.3:41
194 #: build/C/man3/pthread_attr_setstack.3:54
195 #: build/C/man3/pthread_attr_setstackaddr.3:41
196 #: build/C/man3/pthread_attr_setstacksize.3:41
197 #: build/C/man3/pthread_cancel.3:37 build/C/man3/pthread_cleanup_push.3:40
198 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
199 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
200 #: build/C/man3/pthread_equal.3:37 build/C/man3/pthread_exit.3:37
201 #: build/C/man3/pthread_getattr_np.3:38
202 #: build/C/man3/pthread_getcpuclockid.3:38 build/C/man3/pthread_join.3:37
203 #: build/C/man3/pthread_kill.3:49
204 #: build/C/man3/pthread_kill_other_threads_np.3:35
205 #: build/C/man3/pthread_self.3:37 build/C/man3/pthread_setaffinity_np.3:42
206 #: build/C/man3/pthread_setcancelstate.3:39
207 #: build/C/man3/pthread_setconcurrency.3:38
208 #: build/C/man3/pthread_setname_np.3:39
209 #: build/C/man3/pthread_setschedparam.3:41
210 #: build/C/man3/pthread_setschedprio.3:37 build/C/man3/pthread_sigmask.3:50
211 #: build/C/man3/pthread_sigqueue.3:45 build/C/man3/pthread_testcancel.3:37
212 #: build/C/man3/pthread_tryjoin_np.3:42 build/C/man3/pthread_yield.3:37
213 #: build/C/man7/pthreads.7:29
214 #, no-wrap
215 msgid "DESCRIPTION"
216 msgstr "説明"
217
218 #. type: Plain text
219 #: build/C/man3/getcontext.3:49
220 msgid ""
221 "In a System V-like environment, one has the two types I<mcontext_t> and "
222 "I<ucontext_t> defined in I<E<lt>ucontext.hE<gt>> and the four functions "
223 "B<getcontext>(), B<setcontext>(), B<makecontext>(3)  and B<swapcontext>(3)  "
224 "that allow user-level context switching between multiple threads of control "
225 "within a process."
226 msgstr ""
227 "System V 的な環境では、 I<mcontext_t> および I<ucontext_t> という 2 つの型"
228 "と、 B<getcontext>(), B<setcontext>(), B<makecontext>(3), B<swapcontext>(3)  "
229 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
230 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
231 "ようになっている。"
232
233 #. type: Plain text
234 #: build/C/man3/getcontext.3:57
235 msgid ""
236 "The I<mcontext_t> type is machine-dependent and opaque.  The I<ucontext_t> "
237 "type is a structure that has at least the following fields:"
238 msgstr ""
239 "I<mcontext_t> 型はマシン依存で、外部からは隠蔽されている。 I<ucontext_t> 型は"
240 "構造体で、少なくとも以下の 4 つのフィールドを持つ。"
241
242 #. type: Plain text
243 #: build/C/man3/getcontext.3:67
244 #, no-wrap
245 msgid ""
246 "typedef struct ucontext {\n"
247 "    struct ucontext *uc_link;\n"
248 "    sigset_t         uc_sigmask;\n"
249 "    stack_t          uc_stack;\n"
250 "    mcontext_t       uc_mcontext;\n"
251 "    ...\n"
252 "} ucontext_t;\n"
253 msgstr ""
254 "typedef struct ucontext {\n"
255 "    struct ucontext *uc_link;\n"
256 "    sigset_t         uc_sigmask;\n"
257 "    stack_t          uc_stack;\n"
258 "    mcontext_t       uc_mcontext;\n"
259 "    ...\n"
260 "} ucontext_t;\n"
261
262 #. type: Plain text
263 #: build/C/man3/getcontext.3:94
264 msgid ""
265 "with I<sigset_t> and I<stack_t> defined in I<E<lt>signal.hE<gt>>.  Here "
266 "I<uc_link> points to the context that will be resumed when the current "
267 "context terminates (in case the current context was created using "
268 "B<makecontext>(3)), I<uc_sigmask> is the set of signals blocked in this "
269 "context (see B<sigprocmask>(2)), I<uc_stack> is the stack used by this "
270 "context (see B<sigaltstack>(2)), and I<uc_mcontext> is the machine-specific "
271 "representation of the saved context, that includes the calling thread's "
272 "machine registers."
273 msgstr ""
274 "I<sigset_t> と I<stack_t> は I<E<lt>signal.hE<gt>> で定義されている。 ここで "
275 "I<uc_link> は、 現在のコンテキストが終了したとき、 続いて切り替わるコンテキス"
276 "トへのポインタである (現在のコンテキストが B<makecontext>(3)  で生成されたも"
277 "のの場合)。 I<uc_sigmask> はこのコンテキストでブロックされている シグナル群で"
278 "ある (B<sigprocmask>(2)  を見よ)。 I<uc_stack> はこのコンテキストが用いている"
279 "スタックである (B<signalstack>(2)  を見よ)。 I<uc_mcontext> は保存されている"
280 "コンテキストの マシン特有の表現形式であり、 ここには呼び出したスレッドのマシ"
281 "ンレジスタが格納される。"
282
283 #. type: Plain text
284 #: build/C/man3/getcontext.3:101
285 msgid ""
286 "The function B<getcontext>()  initializes the structure pointed at by I<ucp> "
287 "to the currently active context."
288 msgstr ""
289 "B<getcontext>()  関数は、 ポインタ I<ucp> が指す構造体を、 現在アクティブなコ"
290 "ンテキストに初期化する。"
291
292 #. type: Plain text
293 #: build/C/man3/getcontext.3:114
294 msgid ""
295 "The function B<setcontext>()  restores the user context pointed at by "
296 "I<ucp>.  A successful call does not return.  The context should have been "
297 "obtained by a call of B<getcontext>(), or B<makecontext>(3), or passed as "
298 "third argument to a signal handler."
299 msgstr ""
300 "B<setcontext>()  関数は、ポインタ I<ucp> が指すユーザコンテキストをリストアす"
301 "る。 呼び出しに成功すると返らない。 このコンテキストは、以前に B<getcontext>"
302 "()  または B<makecontext>(3)  で得られたものか、 あるいはシグナルの第三引数と"
303 "して与えられたものになる。"
304
305 #. type: Plain text
306 #: build/C/man3/getcontext.3:118
307 msgid ""
308 "If the context was obtained by a call of B<getcontext>(), program execution "
309 "continues as if this call just returned."
310 msgstr ""
311 "コンテキストが B<getcontext>()  の呼び出しによって得られていたものの場合は、 "
312 "プログラムはこの呼び出しから返った直後からのように実行を継続する。"
313
314 #. type: Plain text
315 #: build/C/man3/getcontext.3:135
316 msgid ""
317 "If the context was obtained by a call of B<makecontext>(3), program "
318 "execution continues by a call to the function I<func> specified as the "
319 "second argument of that call to B<makecontext>(3).  When the function "
320 "I<func> returns, we continue with the I<uc_link> member of the structure "
321 "I<ucp> specified as the first argument of that call to B<makecontext>(3).  "
322 "When this member is NULL, the thread exits."
323 msgstr ""
324 "コンテキストが B<makecontext>(3)  の呼び出しによって得られていたものの場合"
325 "は、 プログラムの実行はその B<makecontext>(3)  呼び出しの第二引数で指定された"
326 "関数 I<func> を呼び出すかたちで継続する。 I<func> から返ると、 B<makecontext>"
327 "(3)  呼び出しの第一引数で指定されていた I<ucp> 構造体の I<uc_link> メンバで継"
328 "続する。 このメンバが NULL だった場合は、そのスレッドは終了する。"
329
330 #. type: Plain text
331 #: build/C/man3/getcontext.3:142
332 msgid ""
333 "If the context was obtained by a call to a signal handler, then old standard "
334 "text says that \"program execution continues with the program instruction "
335 "following the instruction interrupted by the signal\".  However, this "
336 "sentence was removed in SUSv2, and the present verdict is \"the result is "
337 "unspecified\"."
338 msgstr ""
339 "コンテキストがシグナルハンドラの呼び出しによって得られていたものの場合は、 古"
340 "い標準によれば 「プログラムの実行はシグナルによって割り込まれた命令の次の命令"
341 "から継続される」。 しかしこの文は SUSv2 で削除されたので、 現在の判断は「結果"
342 "は定義されていない」である。"
343
344 #. type: SH
345 #: build/C/man3/getcontext.3:142 build/C/man3/makecontext.3:84
346 #: build/C/man3/pthread_attr_init.3:68
347 #: build/C/man3/pthread_attr_setaffinity_np.3:76
348 #: build/C/man3/pthread_attr_setdetachstate.3:77
349 #: build/C/man3/pthread_attr_setguardsize.3:90
350 #: build/C/man3/pthread_attr_setinheritsched.3:93
351 #: build/C/man3/pthread_attr_setschedparam.3:85
352 #: build/C/man3/pthread_attr_setschedpolicy.3:83
353 #: build/C/man3/pthread_attr_setscope.3:103
354 #: build/C/man3/pthread_attr_setstack.3:85
355 #: build/C/man3/pthread_attr_setstackaddr.3:74
356 #: build/C/man3/pthread_attr_setstacksize.3:61
357 #: build/C/man3/pthread_cancel.3:112 build/C/man3/pthread_cleanup_push.3:121
358 #: build/C/man3/pthread_create.3:115 build/C/man3/pthread_detach.3:49
359 #: build/C/man3/pthread_equal.3:41 build/C/man3/pthread_exit.3:71
360 #: build/C/man3/pthread_getattr_np.3:73
361 #: build/C/man3/pthread_getcpuclockid.3:46 build/C/man3/pthread_join.3:70
362 #: build/C/man3/pthread_kill.3:63 build/C/man3/pthread_self.3:46
363 #: build/C/man3/pthread_setaffinity_np.3:77
364 #: build/C/man3/pthread_setcancelstate.3:92
365 #: build/C/man3/pthread_setconcurrency.3:56
366 #: build/C/man3/pthread_setname_np.3:72
367 #: build/C/man3/pthread_setschedparam.3:104
368 #: build/C/man3/pthread_setschedprio.3:53 build/C/man3/pthread_sigmask.3:61
369 #: build/C/man3/pthread_sigqueue.3:65 build/C/man3/pthread_testcancel.3:50
370 #: build/C/man3/pthread_tryjoin_np.3:85 build/C/man3/pthread_yield.3:44
371 #, no-wrap
372 msgid "RETURN VALUE"
373 msgstr "返り値"
374
375 #. type: Plain text
376 #: build/C/man3/getcontext.3:151
377 msgid ""
378 "When successful, B<getcontext>()  returns 0 and B<setcontext>()  does not "
379 "return.  On error, both return -1 and set I<errno> appropriately."
380 msgstr ""
381 "成功すると、 B<getcontext>()  は 0 を返し、 B<setcontext>()  は返らない。 失"
382 "敗すると、両者とも -1 を返し、I<errno> をエラーに応じて設定する。"
383
384 #. type: SH
385 #: build/C/man3/getcontext.3:151 build/C/man3/makecontext.3:96
386 #: build/C/man3/pthread_attr_init.3:71
387 #: build/C/man3/pthread_attr_setaffinity_np.3:79
388 #: build/C/man3/pthread_attr_setdetachstate.3:80
389 #: build/C/man3/pthread_attr_setguardsize.3:93
390 #: build/C/man3/pthread_attr_setinheritsched.3:96
391 #: build/C/man3/pthread_attr_setschedparam.3:88
392 #: build/C/man3/pthread_attr_setschedpolicy.3:86
393 #: build/C/man3/pthread_attr_setscope.3:106
394 #: build/C/man3/pthread_attr_setstack.3:88
395 #: build/C/man3/pthread_attr_setstackaddr.3:77
396 #: build/C/man3/pthread_attr_setstacksize.3:64
397 #: build/C/man3/pthread_cancel.3:117 build/C/man3/pthread_cleanup_push.3:123
398 #: build/C/man3/pthread_create.3:122 build/C/man3/pthread_detach.3:54
399 #: build/C/man3/pthread_equal.3:45 build/C/man3/pthread_exit.3:73
400 #: build/C/man3/pthread_getattr_np.3:76
401 #: build/C/man3/pthread_getcpuclockid.3:49 build/C/man3/pthread_join.3:75
402 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:48
403 #: build/C/man3/pthread_setaffinity_np.3:80
404 #: build/C/man3/pthread_setcancelstate.3:95
405 #: build/C/man3/pthread_setconcurrency.3:68
406 #: build/C/man3/pthread_setname_np.3:75
407 #: build/C/man3/pthread_setschedparam.3:112
408 #: build/C/man3/pthread_setschedprio.3:61 build/C/man3/pthread_sigmask.3:66
409 #: build/C/man3/pthread_sigqueue.3:70 build/C/man3/pthread_testcancel.3:54
410 #: build/C/man3/pthread_tryjoin_np.3:89 build/C/man3/pthread_yield.3:49
411 #, no-wrap
412 msgid "ERRORS"
413 msgstr "エラー"
414
415 #. type: Plain text
416 #: build/C/man3/getcontext.3:153
417 msgid "None defined."
418 msgstr "定義されていない。"
419
420 #. type: SH
421 #: build/C/man3/getcontext.3:153 build/C/man3/makecontext.3:105
422 #: build/C/man3/pthread_attr_init.3:79
423 #: build/C/man3/pthread_attr_setaffinity_np.3:108
424 #: build/C/man3/pthread_attr_setdetachstate.3:87
425 #: build/C/man3/pthread_attr_setguardsize.3:106
426 #: build/C/man3/pthread_attr_setinheritsched.3:110
427 #: build/C/man3/pthread_attr_setschedparam.3:100
428 #: build/C/man3/pthread_attr_setschedpolicy.3:100
429 #: build/C/man3/pthread_attr_setscope.3:119
430 #: build/C/man3/pthread_attr_setstack.3:112
431 #: build/C/man3/pthread_attr_setstackaddr.3:83
432 #: build/C/man3/pthread_attr_setstacksize.3:83
433 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_cleanup_push.3:127
434 #: build/C/man3/pthread_cleanup_push_defer_np.3:101
435 #: build/C/man3/pthread_create.3:146 build/C/man3/pthread_detach.3:64
436 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
437 #: build/C/man3/pthread_getattr_np.3:98
438 #: build/C/man3/pthread_getcpuclockid.3:65 build/C/man3/pthread_join.3:98
439 #: build/C/man3/pthread_kill.3:72
440 #: build/C/man3/pthread_kill_other_threads_np.3:47
441 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_setaffinity_np.3:121
442 #: build/C/man3/pthread_setcancelstate.3:113
443 #: build/C/man3/pthread_setconcurrency.3:83
444 #: build/C/man3/pthread_setname_np.3:102
445 #: build/C/man3/pthread_setschedparam.3:141
446 #: build/C/man3/pthread_setschedprio.3:83 build/C/man3/pthread_sigmask.3:69
447 #: build/C/man3/pthread_sigqueue.3:93 build/C/man3/pthread_testcancel.3:58
448 #: build/C/man3/pthread_tryjoin_np.3:112 build/C/man3/pthread_yield.3:53
449 #, no-wrap
450 msgid "CONFORMING TO"
451 msgstr "準拠"
452
453 #. type: Plain text
454 #: build/C/man3/getcontext.3:159
455 msgid ""
456 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specification of B<getcontext>"
457 "(), citing portability issues, and recommending that applications be "
458 "rewritten to use POSIX threads instead."
459 msgstr ""
460 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<getcontext>()  の"
461 "仕様が削除された。 代わりに、アプリケーションを POSIX スレッドを使って書き直"
462 "すことが 推奨されている。"
463
464 #. type: SH
465 #: build/C/man3/getcontext.3:159 build/C/man3/makecontext.3:113
466 #: build/C/man3/pthread_attr_init.3:81
467 #: build/C/man3/pthread_attr_setaffinity_np.3:111
468 #: build/C/man3/pthread_attr_setdetachstate.3:89
469 #: build/C/man3/pthread_attr_setguardsize.3:108
470 #: build/C/man3/pthread_attr_setschedparam.3:102
471 #: build/C/man3/pthread_attr_setscope.3:121
472 #: build/C/man3/pthread_attr_setstack.3:114
473 #: build/C/man3/pthread_attr_setstackaddr.3:86
474 #: build/C/man3/pthread_attr_setstacksize.3:85
475 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
476 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
477 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
478 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
479 #: build/C/man3/pthread_kill.3:74
480 #: build/C/man3/pthread_kill_other_threads_np.3:50
481 #: build/C/man3/pthread_self.3:52 build/C/man3/pthread_setaffinity_np.3:124
482 #: build/C/man3/pthread_setcancelstate.3:115
483 #: build/C/man3/pthread_setconcurrency.3:85
484 #: build/C/man3/pthread_setname_np.3:104
485 #: build/C/man3/pthread_setschedparam.3:143
486 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:71
487 #: build/C/man3/pthread_yield.3:59
488 #, no-wrap
489 msgid "NOTES"
490 msgstr "注意"
491
492 #. type: Plain text
493 #: build/C/man3/getcontext.3:176
494 msgid ""
495 "The earliest incarnation of this mechanism was the B<setjmp>(3)/B<longjmp>"
496 "(3)  mechanism.  Since that does not define the handling of the signal "
497 "context, the next stage was the B<sigsetjmp>(3)/B<siglongjmp>(3)  pair.  The "
498 "present mechanism gives much more control.  On the other hand, there is no "
499 "easy way to detect whether a return from B<getcontext>()  is from the first "
500 "call, or via a B<setcontext>()  call.  The user has to invent her own "
501 "bookkeeping device, and a register variable won't do since registers are "
502 "restored."
503 msgstr ""
504 "このメカニズムの最古の実装は、 B<setjmp>(3)/B<longjmp>(3)  機構であった。 こ"
505 "れらにはシグナルコンテキストの取り扱いが定義されていなかったので、 次の段階で"
506 "は B<sigsetjmp>(3)/B<siglongjmp>(3)  のペアが現われた。 現在の機構ではずっと"
507 "細かな制御ができる。 一方 B<getcontext>()  から返ったとき、 これが最初の呼び"
508 "出しであったか、 それとも B<setcontext>()  呼び出しからのものであるかを 区別"
509 "する容易な方法がなくなってしまった。 ユーザは「しおり」機構を自分で作らなけれ"
510 "ばならない。 レジスタ変数は (レジスタはリストアされてしまうので) これをやって"
511 "くれない。"
512
513 #. type: Plain text
514 #: build/C/man3/getcontext.3:187
515 msgid ""
516 "When a signal occurs, the current user context is saved and a new context is "
517 "created by the kernel for the signal handler.  Do not leave the handler "
518 "using B<longjmp>(3): it is undefined what would happen with contexts.  Use "
519 "B<siglongjmp>(3)  or B<setcontext>()  instead."
520 msgstr ""
521 "シグナルが発生すると、 現在のユーザコンテキストは保存され、 シグナルハンドラ"
522 "用のコンテキストがカーネルによって生成される。 今後はハンドラに B<longjmp>"
523 "(3)  を使わせないこと: この関数のコンテキスト下での動作は定義されていない。 "
524 "代わりに B<siglongjmp>(3)  か B<setcontext>()  を使うこと。"
525
526 #. type: SH
527 #: build/C/man3/getcontext.3:187 build/C/man3/makecontext.3:220
528 #: build/C/man3/pthread_attr_init.3:297
529 #: build/C/man3/pthread_attr_setaffinity_np.3:118
530 #: build/C/man3/pthread_attr_setdetachstate.3:111
531 #: build/C/man3/pthread_attr_setguardsize.3:158
532 #: build/C/man3/pthread_attr_setinheritsched.3:131
533 #: build/C/man3/pthread_attr_setschedparam.3:109
534 #: build/C/man3/pthread_attr_setschedpolicy.3:105
535 #: build/C/man3/pthread_attr_setscope.3:132
536 #: build/C/man3/pthread_attr_setstack.3:155
537 #: build/C/man3/pthread_attr_setstackaddr.3:110
538 #: build/C/man3/pthread_attr_setstacksize.3:111
539 #: build/C/man3/pthread_cancel.3:226 build/C/man3/pthread_cleanup_push.3:315
540 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
541 #: build/C/man3/pthread_create.3:369 build/C/man3/pthread_detach.3:97
542 #: build/C/man3/pthread_equal.3:56 build/C/man3/pthread_exit.3:105
543 #: build/C/man3/pthread_getattr_np.3:345
544 #: build/C/man3/pthread_getcpuclockid.3:170 build/C/man3/pthread_join.3:127
545 #: build/C/man3/pthread_kill.3:94
546 #: build/C/man3/pthread_kill_other_threads_np.3:66
547 #: build/C/man3/pthread_self.3:76 build/C/man3/pthread_setaffinity_np.3:206
548 #: build/C/man3/pthread_setcancelstate.3:177
549 #: build/C/man3/pthread_setconcurrency.3:100
550 #: build/C/man3/pthread_setname_np.3:200
551 #: build/C/man3/pthread_setschedparam.3:431
552 #: build/C/man3/pthread_setschedprio.3:91 build/C/man3/pthread_sigmask.3:147
553 #: build/C/man3/pthread_sigqueue.3:95 build/C/man3/pthread_testcancel.3:63
554 #: build/C/man3/pthread_tryjoin_np.3:135 build/C/man3/pthread_yield.3:62
555 #: build/C/man7/pthreads.7:895
556 #, no-wrap
557 msgid "SEE ALSO"
558 msgstr "関連項目"
559
560 #. type: Plain text
561 #: build/C/man3/getcontext.3:194
562 msgid ""
563 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
564 "B<makecontext>(3), B<sigsetjmp>(3)"
565 msgstr ""
566 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
567 "B<makecontext>(3), B<sigsetjmp>(3)"
568
569 #. type: SH
570 #: build/C/man3/getcontext.3:194 build/C/man3/makecontext.3:226
571 #: build/C/man3/pthread_attr_init.3:313
572 #: build/C/man3/pthread_attr_setaffinity_np.3:124
573 #: build/C/man3/pthread_attr_setdetachstate.3:117
574 #: build/C/man3/pthread_attr_setguardsize.3:166
575 #: build/C/man3/pthread_attr_setinheritsched.3:143
576 #: build/C/man3/pthread_attr_setschedparam.3:121
577 #: build/C/man3/pthread_attr_setschedpolicy.3:116
578 #: build/C/man3/pthread_attr_setscope.3:142
579 #: build/C/man3/pthread_attr_setstack.3:167
580 #: build/C/man3/pthread_attr_setstackaddr.3:116
581 #: build/C/man3/pthread_attr_setstacksize.3:118
582 #: build/C/man3/pthread_cancel.3:238 build/C/man3/pthread_cleanup_push.3:321
583 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
584 #: build/C/man3/pthread_create.3:382 build/C/man3/pthread_detach.3:104
585 #: build/C/man3/pthread_equal.3:60 build/C/man3/pthread_exit.3:109
586 #: build/C/man3/pthread_getattr_np.3:361
587 #: build/C/man3/pthread_getcpuclockid.3:178 build/C/man3/pthread_join.3:134
588 #: build/C/man3/pthread_kill.3:103
589 #: build/C/man3/pthread_kill_other_threads_np.3:72
590 #: build/C/man3/pthread_self.3:80 build/C/man3/pthread_setaffinity_np.3:214
591 #: build/C/man3/pthread_setcancelstate.3:182
592 #: build/C/man3/pthread_setconcurrency.3:103
593 #: build/C/man3/pthread_setname_np.3:206
594 #: build/C/man3/pthread_setschedparam.3:445
595 #: build/C/man3/pthread_setschedprio.3:105 build/C/man3/pthread_sigmask.3:156
596 #: build/C/man3/pthread_sigqueue.3:103 build/C/man3/pthread_testcancel.3:68
597 #: build/C/man3/pthread_tryjoin_np.3:140 build/C/man3/pthread_yield.3:66
598 #: build/C/man7/pthreads.7:929
599 #, no-wrap
600 msgid "COLOPHON"
601 msgstr "この文書について"
602
603 #. type: Plain text
604 #: build/C/man3/getcontext.3:201 build/C/man3/makecontext.3:233
605 #: build/C/man3/pthread_attr_init.3:320
606 #: build/C/man3/pthread_attr_setaffinity_np.3:131
607 #: build/C/man3/pthread_attr_setdetachstate.3:124
608 #: build/C/man3/pthread_attr_setguardsize.3:173
609 #: build/C/man3/pthread_attr_setinheritsched.3:150
610 #: build/C/man3/pthread_attr_setschedparam.3:128
611 #: build/C/man3/pthread_attr_setschedpolicy.3:123
612 #: build/C/man3/pthread_attr_setscope.3:149
613 #: build/C/man3/pthread_attr_setstack.3:174
614 #: build/C/man3/pthread_attr_setstackaddr.3:123
615 #: build/C/man3/pthread_attr_setstacksize.3:125
616 #: build/C/man3/pthread_cancel.3:245 build/C/man3/pthread_cleanup_push.3:328
617 #: build/C/man3/pthread_cleanup_push_defer_np.3:117
618 #: build/C/man3/pthread_create.3:389 build/C/man3/pthread_detach.3:111
619 #: build/C/man3/pthread_equal.3:67 build/C/man3/pthread_exit.3:116
620 #: build/C/man3/pthread_getattr_np.3:368
621 #: build/C/man3/pthread_getcpuclockid.3:185 build/C/man3/pthread_join.3:141
622 #: build/C/man3/pthread_kill.3:110
623 #: build/C/man3/pthread_kill_other_threads_np.3:79
624 #: build/C/man3/pthread_self.3:87 build/C/man3/pthread_setaffinity_np.3:221
625 #: build/C/man3/pthread_setcancelstate.3:189
626 #: build/C/man3/pthread_setconcurrency.3:110
627 #: build/C/man3/pthread_setname_np.3:213
628 #: build/C/man3/pthread_setschedparam.3:452
629 #: build/C/man3/pthread_setschedprio.3:112 build/C/man3/pthread_sigmask.3:163
630 #: build/C/man3/pthread_sigqueue.3:110 build/C/man3/pthread_testcancel.3:75
631 #: build/C/man3/pthread_tryjoin_np.3:147 build/C/man3/pthread_yield.3:73
632 #: build/C/man7/pthreads.7:936
633 msgid ""
634 "This page is part of release 3.64 of the Linux I<man-pages> project.  A "
635 "description of the project, and information about reporting bugs, can be "
636 "found at \\%http://www.kernel.org/doc/man-pages/."
637 msgstr ""
638 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.64 の一部\n"
639 "である。プロジェクトの説明とバグ報告に関する情報は\n"
640 "http://www.kernel.org/doc/man-pages/ に書かれている。"
641
642 #. type: TH
643 #: build/C/man3/makecontext.3:28
644 #, no-wrap
645 msgid "MAKECONTEXT"
646 msgstr "MAKECONTEXT"
647
648 #. type: TH
649 #: build/C/man3/makecontext.3:28
650 #, no-wrap
651 msgid "2013-02-12"
652 msgstr "2013-02-12"
653
654 #. type: TH
655 #: build/C/man3/makecontext.3:28
656 #, no-wrap
657 msgid "GNU"
658 msgstr "GNU"
659
660 #. type: Plain text
661 #: build/C/man3/makecontext.3:31
662 msgid "makecontext, swapcontext - manipulate user context"
663 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
664
665 #. type: Plain text
666 #: build/C/man3/makecontext.3:36
667 msgid ""
668 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
669 ">I<argc>B<, ...);>"
670 msgstr ""
671 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
672 ">I<argc>B<, ...);>"
673
674 #. type: Plain text
675 #: build/C/man3/makecontext.3:38
676 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
677 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
678
679 #. type: Plain text
680 #: build/C/man3/makecontext.3:49
681 msgid ""
682 "In a System V-like environment, one has the type I<ucontext_t> defined in "
683 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
684 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
685 "level context switching between multiple threads of control within a process."
686 msgstr ""
687 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
688 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
689 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
690 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
691 "ようになっている。"
692
693 #. type: Plain text
694 #: build/C/man3/makecontext.3:52
695 msgid "For the type and the first two functions, see B<getcontext>(3)."
696 msgstr ""
697 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
698
699 #. type: Plain text
700 #: build/C/man3/makecontext.3:64
701 msgid ""
702 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
703 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
704 "B<makecontext>(), the caller must allocate a new stack for this context and "
705 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
706 "and assign its address to I<ucp-E<gt>uc_link>."
707 msgstr ""
708 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
709 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
710 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
711 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
712 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
713 "らない。"
714
715 #. type: Plain text
716 #: build/C/man3/makecontext.3:78
717 msgid ""
718 "When this context is later activated (using B<setcontext>(3)  or "
719 "B<swapcontext>())  the function I<func> is called, and passed the series of "
720 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
721 "number of these arguments in I<argc>.  When this function returns, the "
722 "successor context is activated.  If the successor context pointer is NULL, "
723 "the thread exits."
724 msgstr ""
725 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
726 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
727 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
728 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
729 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
730
731 #. type: Plain text
732 #: build/C/man3/makecontext.3:84
733 msgid ""
734 "The B<swapcontext>()  function saves the current context in the structure "
735 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
736 msgstr ""
737 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
738 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
739
740 #. type: Plain text
741 #: build/C/man3/makecontext.3:96
742 msgid ""
743 "When successful, B<swapcontext>()  does not return.  (But we may return "
744 "later, in case I<oucp> is activated, in which case it looks like "
745 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
746 "sets I<errno> appropriately."
747 msgstr ""
748 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
749 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
750 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
751 "て設定する。"
752
753 #. type: TP
754 #: build/C/man3/makecontext.3:97
755 #: build/C/man3/pthread_attr_setaffinity_np.3:102
756 #: build/C/man3/pthread_getattr_np.3:77
757 #, no-wrap
758 msgid "B<ENOMEM>"
759 msgstr "B<ENOMEM>"
760
761 #. type: Plain text
762 #: build/C/man3/makecontext.3:100
763 msgid "Insufficient stack space left."
764 msgstr "スタックに割り当てる空間が残っていない。"
765
766 #. type: SH
767 #: build/C/man3/makecontext.3:100
768 #: build/C/man3/pthread_attr_setaffinity_np.3:106
769 #: build/C/man3/pthread_attr_setguardsize.3:104
770 #: build/C/man3/pthread_attr_setstack.3:110
771 #: build/C/man3/pthread_attr_setstackaddr.3:81
772 #: build/C/man3/pthread_attr_setstacksize.3:81
773 #: build/C/man3/pthread_getattr_np.3:96
774 #: build/C/man3/pthread_getcpuclockid.3:63
775 #: build/C/man3/pthread_setaffinity_np.3:119
776 #: build/C/man3/pthread_setconcurrency.3:81
777 #: build/C/man3/pthread_setname_np.3:100
778 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
779 #: build/C/man3/pthread_tryjoin_np.3:110
780 #, no-wrap
781 msgid "VERSIONS"
782 msgstr "バージョン"
783
784 #. type: Plain text
785 #: build/C/man3/makecontext.3:105
786 msgid ""
787 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
788 "2.1."
789 msgstr ""
790 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
791 "されている。"
792
793 #. type: Plain text
794 #: build/C/man3/makecontext.3:113
795 msgid ""
796 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
797 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
798 "recommending that applications be rewritten to use POSIX threads instead."
799 msgstr ""
800 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
801 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
802 "POSIX スレッドを使って書き直すことが 推奨されている。"
803
804 #. type: Plain text
805 #: build/C/man3/makecontext.3:121
806 msgid ""
807 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
808 "namely, this struct contains the start and length of a memory area to be "
809 "used as the stack, regardless of the direction of growth of the stack.  "
810 "Thus, it is not necessary for the user program to worry about this direction."
811 msgstr ""
812 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
813 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
814 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
815 "て、ユーザプログラムはこの件については心配しなくてよい。"
816
817 #. type: Plain text
818 #: build/C/man3/makecontext.3:137
819 msgid ""
820 "On architectures where I<int> and pointer types are the same size (e.g., "
821 "x86-32, where both types are 32 bits), you may be able to get away with "
822 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
823 "However, doing this is not guaranteed to be portable, is undefined according "
824 "to the standards, and won't work on architectures where pointers are larger "
825 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
826 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
827 "g., x86-64)."
828 msgstr ""
829 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
830 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
831 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
832 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
833 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
834 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
835 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
836 "できるようになっている。"
837
838 #. type: SH
839 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
840 #: build/C/man3/pthread_attr_setdetachstate.3:108
841 #: build/C/man3/pthread_attr_setguardsize.3:155
842 #: build/C/man3/pthread_attr_setinheritsched.3:128
843 #: build/C/man3/pthread_attr_setschedparam.3:106
844 #: build/C/man3/pthread_attr_setschedpolicy.3:102
845 #: build/C/man3/pthread_attr_setstack.3:152
846 #: build/C/man3/pthread_attr_setstacksize.3:108
847 #: build/C/man3/pthread_cancel.3:135 build/C/man3/pthread_cleanup_push.3:155
848 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
849 #: build/C/man3/pthread_getattr_np.3:101
850 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
851 #: build/C/man3/pthread_setaffinity_np.3:154
852 #: build/C/man3/pthread_setcancelstate.3:174
853 #: build/C/man3/pthread_setname_np.3:114
854 #: build/C/man3/pthread_setschedparam.3:149 build/C/man3/pthread_sigmask.3:73
855 #: build/C/man3/pthread_testcancel.3:60 build/C/man3/pthread_tryjoin_np.3:115
856 #, no-wrap
857 msgid "EXAMPLE"
858 msgstr "例"
859
860 #. type: Plain text
861 #: build/C/man3/makecontext.3:145
862 msgid ""
863 "The example program below demonstrates the use of B<getcontext>(3), "
864 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
865 "following output:"
866 msgstr ""
867 "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), "
868 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
869 "と、以下のような出力が得られる:"
870
871 #. type: Plain text
872 #: build/C/man3/makecontext.3:157
873 #, no-wrap
874 msgid ""
875 "$B< ./a.out>\n"
876 "main: swapcontext(&uctx_main, &uctx_func2)\n"
877 "func2: started\n"
878 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
879 "func1: started\n"
880 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
881 "func2: returning\n"
882 "func1: returning\n"
883 "main: exiting\n"
884 msgstr ""
885 "$B< ./a.out>\n"
886 "main: swapcontext(&uctx_main, &uctx_func2)\n"
887 "func2: started\n"
888 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
889 "func1: started\n"
890 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
891 "func2: returning\n"
892 "func1: returning\n"
893 "main: exiting\n"
894
895 #. type: SS
896 #: build/C/man3/makecontext.3:159 build/C/man3/pthread_attr_init.3:148
897 #: build/C/man3/pthread_cancel.3:151 build/C/man3/pthread_cleanup_push.3:231
898 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
899 #: build/C/man3/pthread_getcpuclockid.3:96
900 #: build/C/man3/pthread_setname_np.3:140
901 #: build/C/man3/pthread_setschedparam.3:224 build/C/man3/pthread_sigmask.3:91
902 #, no-wrap
903 msgid "Program source"
904 msgstr "プログラムのソース"
905
906 #. type: Plain text
907 #: build/C/man3/makecontext.3:165
908 #, no-wrap
909 msgid ""
910 "#include E<lt>ucontext.hE<gt>\n"
911 "#include E<lt>stdio.hE<gt>\n"
912 "#include E<lt>stdlib.hE<gt>\n"
913 msgstr ""
914 "#include E<lt>ucontext.hE<gt>\n"
915 "#include E<lt>stdio.hE<gt>\n"
916 "#include E<lt>stdlib.hE<gt>\n"
917
918 #. type: Plain text
919 #: build/C/man3/makecontext.3:167
920 #, no-wrap
921 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
922 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
923
924 #. type: Plain text
925 #: build/C/man3/makecontext.3:170
926 #, no-wrap
927 msgid ""
928 "#define handle_error(msg) \\e\n"
929 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
930 msgstr ""
931 "#define handle_error(msg) \\e\n"
932 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
933
934 #. type: Plain text
935 #: build/C/man3/makecontext.3:180
936 #, no-wrap
937 msgid ""
938 "static void\n"
939 "func1(void)\n"
940 "{\n"
941 "    printf(\"func1: started\\en\");\n"
942 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
943 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
944 "        handle_error(\"swapcontext\");\n"
945 "    printf(\"func1: returning\\en\");\n"
946 "}\n"
947 msgstr ""
948 "static void\n"
949 "func1(void)\n"
950 "{\n"
951 "    printf(\"func1: started\\en\");\n"
952 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
953 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
954 "        handle_error(\"swapcontext\");\n"
955 "    printf(\"func1: returning\\en\");\n"
956 "}\n"
957
958 #. type: Plain text
959 #: build/C/man3/makecontext.3:190
960 #, no-wrap
961 msgid ""
962 "static void\n"
963 "func2(void)\n"
964 "{\n"
965 "    printf(\"func2: started\\en\");\n"
966 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
967 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
968 "        handle_error(\"swapcontext\");\n"
969 "    printf(\"func2: returning\\en\");\n"
970 "}\n"
971 msgstr ""
972 "static void\n"
973 "func2(void)\n"
974 "{\n"
975 "    printf(\"func2: started\\en\");\n"
976 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
977 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
978 "        handle_error(\"swapcontext\");\n"
979 "    printf(\"func2: returning\\en\");\n"
980 "}\n"
981
982 #. type: Plain text
983 #: build/C/man3/makecontext.3:196
984 #, no-wrap
985 msgid ""
986 "int\n"
987 "main(int argc, char *argv[])\n"
988 "{\n"
989 "    char func1_stack[16384];\n"
990 "    char func2_stack[16384];\n"
991 msgstr ""
992 "int\n"
993 "main(int argc, char *argv[])\n"
994 "{\n"
995 "    char func1_stack[16384];\n"
996 "    char func2_stack[16384];\n"
997
998 #. type: Plain text
999 #: build/C/man3/makecontext.3:203
1000 #, no-wrap
1001 msgid ""
1002 "    if (getcontext(&uctx_func1) == -1)\n"
1003 "        handle_error(\"getcontext\");\n"
1004 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1005 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1006 "    uctx_func1.uc_link = &uctx_main;\n"
1007 "    makecontext(&uctx_func1, func1, 0);\n"
1008 msgstr ""
1009 "    if (getcontext(&uctx_func1) == -1)\n"
1010 "        handle_error(\"getcontext\");\n"
1011 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1012 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1013 "    uctx_func1.uc_link = &uctx_main;\n"
1014 "    makecontext(&uctx_func1, func1, 0);\n"
1015
1016 #. type: Plain text
1017 #: build/C/man3/makecontext.3:211
1018 #, no-wrap
1019 msgid ""
1020 "    if (getcontext(&uctx_func2) == -1)\n"
1021 "        handle_error(\"getcontext\");\n"
1022 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1023 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1024 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1025 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1026 "    makecontext(&uctx_func2, func2, 0);\n"
1027 msgstr ""
1028 "    if (getcontext(&uctx_func2) == -1)\n"
1029 "        handle_error(\"getcontext\");\n"
1030 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1031 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1032 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1033 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1034 "    makecontext(&uctx_func2, func2, 0);\n"
1035
1036 #. type: Plain text
1037 #: build/C/man3/makecontext.3:215
1038 #, no-wrap
1039 msgid ""
1040 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1041 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1042 "        handle_error(\"swapcontext\");\n"
1043 msgstr ""
1044 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1045 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1046 "        handle_error(\"swapcontext\");\n"
1047
1048 #. type: Plain text
1049 #: build/C/man3/makecontext.3:219
1050 #, no-wrap
1051 msgid ""
1052 "    printf(\"main: exiting\\en\");\n"
1053 "    exit(EXIT_SUCCESS);\n"
1054 "}\n"
1055 msgstr ""
1056 "    printf(\"main: exiting\\en\");\n"
1057 "    exit(EXIT_SUCCESS);\n"
1058 "}\n"
1059
1060 #. type: Plain text
1061 #: build/C/man3/makecontext.3:226
1062 msgid ""
1063 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1064 "B<sigsetjmp>(3)"
1065 msgstr ""
1066 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1067 "B<sigsetjmp>(3)"
1068
1069 #. type: TH
1070 #: build/C/man3/pthread_attr_init.3:26
1071 #, no-wrap
1072 msgid "PTHREAD_ATTR_INIT"
1073 msgstr "PTHREAD_ATTR_INIT"
1074
1075 #. type: TH
1076 #: build/C/man3/pthread_attr_init.3:26
1077 #, no-wrap
1078 msgid "2008-11-11"
1079 msgstr "2008-11-11"
1080
1081 #. type: Plain text
1082 #: build/C/man3/pthread_attr_init.3:30
1083 msgid ""
1084 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1085 "attributes object"
1086 msgstr ""
1087 "pthread_attr_init, pthread_attr_destroy - \n"
1088 "スレッド属性オブジェクトの初期化と破棄を行う"
1089
1090 #. type: Plain text
1091 #: build/C/man3/pthread_attr_init.3:33
1092 #: build/C/man3/pthread_attr_setdetachstate.3:33
1093 #: build/C/man3/pthread_attr_setguardsize.3:33
1094 #: build/C/man3/pthread_attr_setinheritsched.3:33
1095 #: build/C/man3/pthread_attr_setschedparam.3:33
1096 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1097 #: build/C/man3/pthread_attr_setscope.3:33
1098 #: build/C/man3/pthread_attr_setstack.3:33
1099 #: build/C/man3/pthread_attr_setstackaddr.3:33
1100 #: build/C/man3/pthread_attr_setstacksize.3:33
1101 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1102 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1103 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1104 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1105 #: build/C/man3/pthread_join.3:32
1106 #: build/C/man3/pthread_kill_other_threads_np.3:32
1107 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1108 #: build/C/man3/pthread_setconcurrency.3:32
1109 #: build/C/man3/pthread_setschedparam.3:33
1110 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1111 #: build/C/man3/pthread_testcancel.3:32
1112 #, no-wrap
1113 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1114 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1115
1116 #. type: Plain text
1117 #: build/C/man3/pthread_attr_init.3:36
1118 #, no-wrap
1119 msgid ""
1120 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1121 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1122 msgstr ""
1123 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1124 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1125
1126 #. type: Plain text
1127 #: build/C/man3/pthread_attr_init.3:38
1128 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1129 #: build/C/man3/pthread_attr_setdetachstate.3:40
1130 #: build/C/man3/pthread_attr_setguardsize.3:40
1131 #: build/C/man3/pthread_attr_setinheritsched.3:40
1132 #: build/C/man3/pthread_attr_setschedparam.3:40
1133 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1134 #: build/C/man3/pthread_attr_setscope.3:40
1135 #: build/C/man3/pthread_attr_setstack.3:40
1136 #: build/C/man3/pthread_attr_setstackaddr.3:40
1137 #: build/C/man3/pthread_attr_setstacksize.3:40
1138 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1139 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1140 #: build/C/man3/pthread_getattr_np.3:37
1141 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1142 #: build/C/man3/pthread_setaffinity_np.3:41
1143 #: build/C/man3/pthread_setcancelstate.3:38
1144 #: build/C/man3/pthread_setconcurrency.3:37
1145 #: build/C/man3/pthread_setschedparam.3:40
1146 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1147 #, no-wrap
1148 msgid "Compile and link with I<-pthread>.\n"
1149 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1150
1151 #. type: Plain text
1152 #: build/C/man3/pthread_attr_init.3:50
1153 msgid ""
1154 "The B<pthread_attr_init>()  function initializes the thread attributes "
1155 "object pointed to by I<attr> with default attribute values.  After this "
1156 "call, individual attributes of the object can be set using various related "
1157 "functions (listed under SEE ALSO), and then the object can be used in one or "
1158 "more B<pthread_create>(3)  calls that create threads."
1159 msgstr ""
1160 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1161 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1162 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1163 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1164 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1165 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1166
1167 #. type: Plain text
1168 #: build/C/man3/pthread_attr_init.3:55
1169 msgid ""
1170 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1171 "already been initialized results in undefined behavior."
1172 msgstr ""
1173 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1174 "B<pthread_attr_init>() を呼び出した場合、\n"
1175 "どのような動作になるかは不定である。"
1176
1177 #. type: Plain text
1178 #: build/C/man3/pthread_attr_init.3:62
1179 msgid ""
1180 "When a thread attributes object is no longer required, it should be "
1181 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1182 "thread attributes object has no effect on threads that were created using "
1183 "that object."
1184 msgstr ""
1185 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1186 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1187 "スレッド属性オブジェクトを破棄しても、\n"
1188 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1189
1190 #. type: Plain text
1191 #: build/C/man3/pthread_attr_init.3:68
1192 msgid ""
1193 "Once a thread attributes object has been destroyed, it can be reinitialized "
1194 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1195 "attributes object has undefined results."
1196 msgstr ""
1197 "いったん破棄したスレッド属性オブジェクトは、\n"
1198 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1199 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1200 "使った場合の結果は不定である。"
1201
1202 #. type: Plain text
1203 #: build/C/man3/pthread_attr_init.3:71
1204 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1205 #: build/C/man3/pthread_attr_setdetachstate.3:80
1206 #: build/C/man3/pthread_attr_setguardsize.3:93
1207 #: build/C/man3/pthread_attr_setinheritsched.3:96
1208 #: build/C/man3/pthread_attr_setschedparam.3:88
1209 #: build/C/man3/pthread_attr_setschedpolicy.3:86
1210 #: build/C/man3/pthread_attr_setscope.3:106
1211 #: build/C/man3/pthread_attr_setstack.3:88
1212 #: build/C/man3/pthread_attr_setstackaddr.3:77
1213 #: build/C/man3/pthread_attr_setstacksize.3:64
1214 #: build/C/man3/pthread_setaffinity_np.3:80
1215 #: build/C/man3/pthread_setcancelstate.3:95
1216 #: build/C/man3/pthread_setname_np.3:75
1217 msgid ""
1218 "On success, these functions return 0; on error, they return a nonzero error "
1219 "number."
1220 msgstr ""
1221 "成功すると、これらの関数は 0 を返す。\n"
1222 "エラーの場合、0 以外のエラー番号を返す。"
1223
1224 #. type: Plain text
1225 #: build/C/man3/pthread_attr_init.3:79
1226 msgid ""
1227 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1228 "Linux these functions always succeed (but portable and future-proof "
1229 "applications should nevertheless handle a possible error return)."
1230 msgstr ""
1231 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1232 "記載されている。\n"
1233 "Linux では、これらの関数は常に成功する\n"
1234 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1235 "正のエラーの返り値を処理するようにすべきである)。"
1236
1237 #. type: Plain text
1238 #: build/C/man3/pthread_attr_init.3:81
1239 #: build/C/man3/pthread_attr_setdetachstate.3:89
1240 #: build/C/man3/pthread_attr_setguardsize.3:108
1241 #: build/C/man3/pthread_attr_setinheritsched.3:112
1242 #: build/C/man3/pthread_attr_setschedparam.3:102
1243 #: build/C/man3/pthread_attr_setschedpolicy.3:102
1244 #: build/C/man3/pthread_attr_setscope.3:121
1245 #: build/C/man3/pthread_attr_setstack.3:114
1246 #: build/C/man3/pthread_attr_setstacksize.3:85
1247 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
1248 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1249 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1250 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1251 #: build/C/man3/pthread_self.3:52 build/C/man3/pthread_setcancelstate.3:115
1252 #: build/C/man3/pthread_setconcurrency.3:85
1253 #: build/C/man3/pthread_setschedparam.3:143
1254 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:71
1255 #: build/C/man3/pthread_testcancel.3:60
1256 msgid "POSIX.1-2001."
1257 msgstr "POSIX.1-2001."
1258
1259 #. type: Plain text
1260 #: build/C/man3/pthread_attr_init.3:87
1261 msgid ""
1262 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1263 "object other than via pthreads functions is nonportable and produces "
1264 "undefined results."
1265 msgstr ""
1266 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1267 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1268 "どのような結果が得られるかも分からない。"
1269
1270 #. type: Plain text
1271 #: build/C/man3/pthread_attr_init.3:96
1272 msgid ""
1273 "The program below optionally makes use of B<pthread_attr_init>()  and "
1274 "various related functions to initialize a thread attributes object that is "
1275 "used to create a single thread.  Once created, the thread uses the "
1276 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1277 "the thread's attributes, and then displays those attributes."
1278 msgstr ""
1279 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1280 "スレッド属性オブジェクトの初期化を行い、\n"
1281 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1282 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1283 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1284 "取得した属性を表示する。"
1285
1286 #. type: Plain text
1287 #: build/C/man3/pthread_attr_init.3:105
1288 msgid ""
1289 "If the program is run with no command-line argument, then it passes NULL as "
1290 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1291 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1292 "threading implementation, we see the following:"
1293 msgstr ""
1294 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1295 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1296 "この場合、スレッドはデフォルトの属性で作成される。\n"
1297 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1298 "動作させると、以下のような出力が得られる。"
1299
1300 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1301 #. type: Plain text
1302 #: build/C/man3/pthread_attr_init.3:121
1303 #, no-wrap
1304 msgid ""
1305 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1306 "unlimited\n"
1307 "$B< ./a.out>\n"
1308 "Thread attributes:\n"
1309 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1310 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1311 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1312 "        Scheduling policy   = SCHED_OTHER\n"
1313 "        Scheduling priority = 0\n"
1314 "        Guard size          = 4096 bytes\n"
1315 "        Stack address       = 0x40196000\n"
1316 "        Stack size          = 0x201000 bytes\n"
1317 msgstr ""
1318 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1319 "unlimited\n"
1320 "$B< ./a.out>\n"
1321 "Thread attributes:\n"
1322 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1323 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1324 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1325 "        Scheduling policy   = SCHED_OTHER\n"
1326 "        Scheduling priority = 0\n"
1327 "        Guard size          = 4096 bytes\n"
1328 "        Stack address       = 0x40196000\n"
1329 "        Stack size          = 0x201000 bytes\n"
1330
1331 #. type: Plain text
1332 #: build/C/man3/pthread_attr_init.3:131
1333 msgid ""
1334 "When we supply a stack size as a command-line argument, the program "
1335 "initializes a thread attributes object, sets various attributes in that "
1336 "object, and passes a pointer to the object in the call to B<pthread_create>"
1337 "(3).  Running the program on Linux/x86-32 with the NPTL threading "
1338 "implementation, we see the following:"
1339 msgstr ""
1340 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1341 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1342 "そのオブジェクトの各種属性を設定し、\n"
1343 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1344 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1345 "動作させると、以下のような出力が得られる。"
1346
1347 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1348 #. type: Plain text
1349 #: build/C/man3/pthread_attr_init.3:146
1350 #, no-wrap
1351 msgid ""
1352 "$B< ./a.out 0x3000000>\n"
1353 "posix_memalign() allocated at 0x40197000\n"
1354 "Thread attributes:\n"
1355 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1356 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1357 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1358 "        Scheduling policy   = SCHED_OTHER\n"
1359 "        Scheduling priority = 0\n"
1360 "        Guard size          = 0 bytes\n"
1361 "        Stack address       = 0x40197000\n"
1362 "        Stack size          = 0x3000000 bytes\n"
1363 msgstr ""
1364 "$B< ./a.out 0x3000000>\n"
1365 "posix_memalign() allocated at 0x40197000\n"
1366 "Thread attributes:\n"
1367 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1368 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1369 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1370 "        Scheduling policy   = SCHED_OTHER\n"
1371 "        Scheduling priority = 0\n"
1372 "        Guard size          = 0 bytes\n"
1373 "        Stack address       = 0x40197000\n"
1374 "        Stack size          = 0x3000000 bytes\n"
1375
1376 #. type: Plain text
1377 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1378 #, no-wrap
1379 msgid ""
1380 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1381 "#include E<lt>pthread.hE<gt>\n"
1382 "#include E<lt>stdio.hE<gt>\n"
1383 "#include E<lt>stdlib.hE<gt>\n"
1384 "#include E<lt>unistd.hE<gt>\n"
1385 "#include E<lt>errno.hE<gt>\n"
1386 msgstr ""
1387 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1388 "#include E<lt>pthread.hE<gt>\n"
1389 "#include E<lt>stdio.hE<gt>\n"
1390 "#include E<lt>stdlib.hE<gt>\n"
1391 "#include E<lt>unistd.hE<gt>\n"
1392 "#include E<lt>errno.hE<gt>\n"
1393
1394 #. type: Plain text
1395 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:162
1396 #: build/C/man3/pthread_cleanup_push.3:243 build/C/man3/pthread_create.3:254
1397 #: build/C/man3/pthread_getattr_np.3:191
1398 #: build/C/man3/pthread_getcpuclockid.3:114
1399 #: build/C/man3/pthread_setaffinity_np.3:172
1400 #: build/C/man3/pthread_setschedparam.3:237 build/C/man3/pthread_sigmask.3:105
1401 #, no-wrap
1402 msgid ""
1403 "#define handle_error_en(en, msg) \\e\n"
1404 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1405 msgstr ""
1406 "#define handle_error_en(en, msg) \\e\n"
1407 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1408
1409 #. type: Plain text
1410 #: build/C/man3/pthread_attr_init.3:168
1411 #, no-wrap
1412 msgid ""
1413 "static void\n"
1414 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1415 "{\n"
1416 "    int s, i;\n"
1417 "    size_t v;\n"
1418 "    void *stkaddr;\n"
1419 "    struct sched_param sp;\n"
1420 msgstr ""
1421 "static void\n"
1422 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1423 "{\n"
1424 "    int s, i;\n"
1425 "    size_t v;\n"
1426 "    void *stkaddr;\n"
1427 "    struct sched_param sp;\n"
1428
1429 #. type: Plain text
1430 #: build/C/man3/pthread_attr_init.3:176
1431 #, no-wrap
1432 msgid ""
1433 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1434 "    if (s != 0)\n"
1435 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1436 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1437 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1438 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1439 "            \"???\");\n"
1440 msgstr ""
1441 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1442 "    if (s != 0)\n"
1443 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1444 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1445 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1446 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1447 "            \"???\");\n"
1448
1449 #. type: Plain text
1450 #: build/C/man3/pthread_attr_init.3:184
1451 #, no-wrap
1452 msgid ""
1453 "    s = pthread_attr_getscope(attr, &i);\n"
1454 "    if (s != 0)\n"
1455 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1456 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1457 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1458 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1459 "            \"???\");\n"
1460 msgstr ""
1461 "    s = pthread_attr_getscope(attr, &i);\n"
1462 "    if (s != 0)\n"
1463 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1464 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1465 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1466 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1467 "            \"???\");\n"
1468
1469 #. type: Plain text
1470 #: build/C/man3/pthread_attr_init.3:192
1471 #, no-wrap
1472 msgid ""
1473 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1474 "    if (s != 0)\n"
1475 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1476 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1477 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1478 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1479 "            \"???\");\n"
1480 msgstr ""
1481 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1482 "    if (s != 0)\n"
1483 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1484 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1485 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1486 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1487 "            \"???\");\n"
1488
1489 #. type: Plain text
1490 #: build/C/man3/pthread_attr_init.3:201
1491 #, no-wrap
1492 msgid ""
1493 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1494 "    if (s != 0)\n"
1495 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1496 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1497 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1498 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1499 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1500 "            \"???\");\n"
1501 msgstr ""
1502 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1503 "    if (s != 0)\n"
1504 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1505 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1506 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1507 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1508 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1509 "            \"???\");\n"
1510
1511 #. type: Plain text
1512 #: build/C/man3/pthread_attr_init.3:206
1513 #, no-wrap
1514 msgid ""
1515 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1516 "    if (s != 0)\n"
1517 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1518 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1519 msgstr ""
1520 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1521 "    if (s != 0)\n"
1522 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1523 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1524
1525 #. type: Plain text
1526 #: build/C/man3/pthread_attr_init.3:211
1527 #, no-wrap
1528 msgid ""
1529 "    s = pthread_attr_getguardsize(attr, &v);\n"
1530 "    if (s != 0)\n"
1531 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1532 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1533 msgstr ""
1534 "    s = pthread_attr_getguardsize(attr, &v);\n"
1535 "    if (s != 0)\n"
1536 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1537 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1538
1539 #. type: Plain text
1540 #: build/C/man3/pthread_attr_init.3:218
1541 #, no-wrap
1542 msgid ""
1543 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1544 "    if (s != 0)\n"
1545 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1546 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1547 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1548 "}\n"
1549 msgstr ""
1550 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1551 "    if (s != 0)\n"
1552 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1553 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1554 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1555 "}\n"
1556
1557 #. type: Plain text
1558 #: build/C/man3/pthread_attr_init.3:224
1559 #, no-wrap
1560 msgid ""
1561 "static void *\n"
1562 "thread_start(void *arg)\n"
1563 "{\n"
1564 "    int s;\n"
1565 "    pthread_attr_t gattr;\n"
1566 msgstr ""
1567 "static void *\n"
1568 "thread_start(void *arg)\n"
1569 "{\n"
1570 "    int s;\n"
1571 "    pthread_attr_t gattr;\n"
1572
1573 #. type: Plain text
1574 #: build/C/man3/pthread_attr_init.3:228
1575 #, no-wrap
1576 msgid ""
1577 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1578 "       retrieves the attributes of the thread specified in its\n"
1579 "       first argument */\n"
1580 msgstr ""
1581 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1582 "       retrieves the attributes of the thread specified in its\n"
1583 "       first argument */\n"
1584
1585 #. type: Plain text
1586 #: build/C/man3/pthread_attr_init.3:232
1587 #, no-wrap
1588 msgid ""
1589 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1590 "    if (s != 0)\n"
1591 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1592 msgstr ""
1593 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1594 "    if (s != 0)\n"
1595 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1596
1597 #. type: Plain text
1598 #: build/C/man3/pthread_attr_init.3:235
1599 #, no-wrap
1600 msgid ""
1601 "    printf(\"Thread attributes:\\en\");\n"
1602 "    display_pthread_attr(&gattr, \"\\et\");\n"
1603 msgstr ""
1604 "    printf(\"Thread attributes:\\en\");\n"
1605 "    display_pthread_attr(&gattr, \"\\et\");\n"
1606
1607 #. type: Plain text
1608 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1609 #, no-wrap
1610 msgid ""
1611 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1612 "}\n"
1613 msgstr ""
1614 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1615 "}\n"
1616
1617 #. type: Plain text
1618 #: build/C/man3/pthread_attr_init.3:246
1619 #, no-wrap
1620 msgid ""
1621 "int\n"
1622 "main(int argc, char *argv[])\n"
1623 "{\n"
1624 "    pthread_t thr;\n"
1625 "    pthread_attr_t attr;\n"
1626 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1627 "    int s;\n"
1628 msgstr ""
1629 "int\n"
1630 "main(int argc, char *argv[])\n"
1631 "{\n"
1632 "    pthread_t thr;\n"
1633 "    pthread_attr_t attr;\n"
1634 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1635 "    int s;\n"
1636
1637 #. type: Plain text
1638 #: build/C/man3/pthread_attr_init.3:248
1639 #: build/C/man3/pthread_setschedparam.3:355
1640 #, no-wrap
1641 msgid "    attrp = NULL;\n"
1642 msgstr "    attrp = NULL;\n"
1643
1644 #. type: Plain text
1645 #: build/C/man3/pthread_attr_init.3:252
1646 #, no-wrap
1647 msgid ""
1648 "    /* If a command-line argument was supplied, use it to set the\n"
1649 "       stack-size attribute and set a few other thread attributes,\n"
1650 "       and set attrp pointing to thread attributes object */\n"
1651 msgstr ""
1652 "    /* If a command-line argument was supplied, use it to set the\n"
1653 "       stack-size attribute and set a few other thread attributes,\n"
1654 "       and set attrp pointing to thread attributes object */\n"
1655
1656 #. type: Plain text
1657 #: build/C/man3/pthread_attr_init.3:256
1658 #, no-wrap
1659 msgid ""
1660 "    if (argc E<gt> 1) {\n"
1661 "        int stack_size;\n"
1662 "        void *sp;\n"
1663 msgstr ""
1664 "    if (argc E<gt> 1) {\n"
1665 "        int stack_size;\n"
1666 "        void *sp;\n"
1667
1668 #. type: Plain text
1669 #: build/C/man3/pthread_attr_init.3:258
1670 #, no-wrap
1671 msgid "        attrp = &attr;\n"
1672 msgstr "        attrp = &attr;\n"
1673
1674 #. type: Plain text
1675 #: build/C/man3/pthread_attr_init.3:262
1676 #, no-wrap
1677 msgid ""
1678 "        s = pthread_attr_init(&attr);\n"
1679 "        if (s != 0)\n"
1680 "            handle_error_en(s, \"pthread_attr_init\");\n"
1681 msgstr ""
1682 "        s = pthread_attr_init(&attr);\n"
1683 "        if (s != 0)\n"
1684 "            handle_error_en(s, \"pthread_attr_init\");\n"
1685
1686 #. type: Plain text
1687 #: build/C/man3/pthread_attr_init.3:266
1688 #, no-wrap
1689 msgid ""
1690 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1691 "        if (s != 0)\n"
1692 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1693 msgstr ""
1694 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1695 "        if (s != 0)\n"
1696 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1697
1698 #. type: Plain text
1699 #: build/C/man3/pthread_attr_init.3:270
1700 #, no-wrap
1701 msgid ""
1702 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1703 "        if (s != 0)\n"
1704 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1705 msgstr ""
1706 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1707 "        if (s != 0)\n"
1708 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1709
1710 #. type: Plain text
1711 #: build/C/man3/pthread_attr_init.3:272
1712 #, no-wrap
1713 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1714 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1715
1716 #. type: Plain text
1717 #: build/C/man3/pthread_attr_init.3:276
1718 #, no-wrap
1719 msgid ""
1720 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1721 "        if (s != 0)\n"
1722 "            handle_error_en(s, \"posix_memalign\");\n"
1723 msgstr ""
1724 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1725 "        if (s != 0)\n"
1726 "            handle_error_en(s, \"posix_memalign\");\n"
1727
1728 #. type: Plain text
1729 #: build/C/man3/pthread_attr_init.3:278
1730 #, no-wrap
1731 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1732 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1733
1734 #. type: Plain text
1735 #: build/C/man3/pthread_attr_init.3:283
1736 #, no-wrap
1737 msgid ""
1738 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1739 "        if (s != 0)\n"
1740 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1741 "    }\n"
1742 msgstr ""
1743 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1744 "        if (s != 0)\n"
1745 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1746 "    }\n"
1747
1748 #. type: Plain text
1749 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1750 #, no-wrap
1751 msgid ""
1752 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1753 "    if (s != 0)\n"
1754 "        handle_error_en(s, \"pthread_create\");\n"
1755 msgstr ""
1756 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1757 "    if (s != 0)\n"
1758 "        handle_error_en(s, \"pthread_create\");\n"
1759
1760 #. type: Plain text
1761 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1762 #, no-wrap
1763 msgid ""
1764 "    if (attrp != NULL) {\n"
1765 "        s = pthread_attr_destroy(attrp);\n"
1766 "        if (s != 0)\n"
1767 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1768 "    }\n"
1769 msgstr ""
1770 "    if (attrp != NULL) {\n"
1771 "        s = pthread_attr_destroy(attrp);\n"
1772 "        if (s != 0)\n"
1773 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1774 "    }\n"
1775
1776 #. type: Plain text
1777 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1778 #, no-wrap
1779 msgid ""
1780 "    pause();    /* Terminates when other thread calls exit() */\n"
1781 "}\n"
1782 msgstr ""
1783 "    pause();    /* Terminates when other thread calls exit() */\n"
1784 "}\n"
1785
1786 #. type: Plain text
1787 #: build/C/man3/pthread_attr_init.3:313
1788 msgid ""
1789 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1790 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1791 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1792 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1793 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1794 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1795 msgstr ""
1796 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1797 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1798 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1799 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1800 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1801 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1802
1803 #. type: TH
1804 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1805 #, no-wrap
1806 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1807 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1808
1809 #. type: TH
1810 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1811 #: build/C/man3/pthread_getattr_np.3:26
1812 #: build/C/man3/pthread_setaffinity_np.3:26
1813 #: build/C/man3/pthread_tryjoin_np.3:26
1814 #, no-wrap
1815 msgid "2010-09-10"
1816 msgstr "2010-09-10"
1817
1818 #. type: Plain text
1819 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1820 msgid ""
1821 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1822 "affinity attribute in thread attributes object"
1823 msgstr ""
1824 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1825 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1826
1827 #. type: Plain text
1828 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1829 #: build/C/man3/pthread_getattr_np.3:33
1830 #: build/C/man3/pthread_setaffinity_np.3:34
1831 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1832 #, no-wrap
1833 msgid ""
1834 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1835 "B<#include E<lt>pthread.hE<gt>>\n"
1836 msgstr ""
1837 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1838 "B<#include E<lt>pthread.hE<gt>>\n"
1839
1840 #. type: Plain text
1841 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1842 #, no-wrap
1843 msgid ""
1844 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1845 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1846 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1847 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1848 msgstr ""
1849 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1850 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1851 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1852 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1853
1854 #. type: Plain text
1855 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1856 msgid ""
1857 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1858 "attribute of the thread attributes object referred to by I<attr> to the "
1859 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1860 "mask of a thread created using the thread attributes object I<attr>."
1861 msgstr ""
1862 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1863 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1864 "I<cpuset> で指定された値に設定する。\n"
1865 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1866 "作成されたスレッドの CPU affinity マスクが決定される。"
1867
1868 #. type: Plain text
1869 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1870 msgid ""
1871 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1872 "attribute of the thread attributes object referred to by I<attr> in the "
1873 "buffer pointed to by I<cpuset>."
1874 msgstr ""
1875 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1876 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1877 "I<cpuset> が指すバッファに入れて返す。"
1878
1879 #. type: Plain text
1880 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1881 msgid ""
1882 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1883 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
1884 "(cpu_set_t)>."
1885 msgstr ""
1886 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1887 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1888 "指定することだろう。"
1889
1890 #. type: Plain text
1891 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1892 #: build/C/man3/pthread_setaffinity_np.3:67
1893 msgid ""
1894 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1895 "description of a set of macros that can be used to manipulate and inspect "
1896 "CPU sets, see B<CPU_SET>(3)."
1897 msgstr ""
1898 "CPU affinity マスクの詳細については、 \n"
1899 "B<sched_setaffinity>(2) を参照してほしい。\n"
1900 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1901 "B<CPU_SET>(3) を参照してほしい。"
1902
1903 #. type: TP
1904 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1905 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1906 #: build/C/man3/pthread_attr_setdetachstate.3:83
1907 #: build/C/man3/pthread_attr_setinheritsched.3:99
1908 #: build/C/man3/pthread_attr_setschedpolicy.3:89
1909 #: build/C/man3/pthread_attr_setscope.3:109
1910 #: build/C/man3/pthread_attr_setstack.3:91
1911 #: build/C/man3/pthread_attr_setstacksize.3:67
1912 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1913 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1914 #: build/C/man3/pthread_kill.3:69 build/C/man3/pthread_setaffinity_np.3:84
1915 #: build/C/man3/pthread_setaffinity_np.3:93
1916 #: build/C/man3/pthread_setaffinity_np.3:109
1917 #: build/C/man3/pthread_setcancelstate.3:99
1918 #: build/C/man3/pthread_setcancelstate.3:107
1919 #: build/C/man3/pthread_setconcurrency.3:71
1920 #: build/C/man3/pthread_setschedparam.3:122
1921 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1922 #, no-wrap
1923 msgid "B<EINVAL>"
1924 msgstr "B<EINVAL>"
1925
1926 #.  cpumask_t
1927 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1928 #.  of the cpumask_t type.
1929 #. type: Plain text
1930 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1931 msgid ""
1932 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1933 "outside the set supported by the kernel.  (The kernel configuration option "
1934 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1935 "type used to represent CPU sets.)"
1936 msgstr ""
1937 "(B<pthread_attr_setaffinity_np>())\n"
1938 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1939 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1940 "は、\n"
1941 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
1942
1943 #. type: Plain text
1944 #: build/C/man3/pthread_attr_setaffinity_np.3:102
1945 msgid ""
1946 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
1947 "attributes object referred to by I<attr> lies outside the range specified by "
1948 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
1949 msgstr ""
1950 "(B<pthread_attr_getaffinity_np>())\n"
1951 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
1952 "I<cpusetsize> により指定された範囲の中になかった\n"
1953 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
1954
1955 #. type: Plain text
1956 #: build/C/man3/pthread_attr_setaffinity_np.3:106
1957 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
1958 msgstr ""
1959 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
1960
1961 #. type: Plain text
1962 #: build/C/man3/pthread_attr_setaffinity_np.3:108
1963 #: build/C/man3/pthread_setaffinity_np.3:121
1964 msgid "These functions are provided by glibc since version 2.3.4."
1965 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
1966
1967 #. type: Plain text
1968 #: build/C/man3/pthread_attr_setaffinity_np.3:111
1969 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
1970 #: build/C/man3/pthread_setaffinity_np.3:124
1971 #: build/C/man3/pthread_tryjoin_np.3:115
1972 msgid ""
1973 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
1974 "\" (nonportable) in the names."
1975 msgstr ""
1976 "これらの関数は非標準の GNU による拡張である。\n"
1977 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
1978 "付いている。"
1979
1980 #. type: Plain text
1981 #: build/C/man3/pthread_attr_setaffinity_np.3:118
1982 #: build/C/man3/pthread_setaffinity_np.3:150
1983 msgid ""
1984 "In glibc 2.3.3 only, versions of these functions were provided that did not "
1985 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
1986 "underlying system calls was always I<sizeof(cpu_set_t)>."
1987 msgstr ""
1988 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
1989 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
1990 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
1991 "常に I<sizeof(cpu_set_t)> であった。"
1992
1993 #. type: Plain text
1994 #: build/C/man3/pthread_attr_setaffinity_np.3:124
1995 msgid ""
1996 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
1997 "(3), B<cpuset>(7), B<pthreads>(7)"
1998 msgstr ""
1999 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2000 "(3), B<cpuset>(7), B<pthreads>(7)"
2001
2002 #. type: TH
2003 #: build/C/man3/pthread_attr_setdetachstate.3:26
2004 #, no-wrap
2005 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2006 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2007
2008 #. type: TH
2009 #: build/C/man3/pthread_attr_setdetachstate.3:26
2010 #, no-wrap
2011 msgid "2010-02-03"
2012 msgstr "2010-02-03"
2013
2014 #. type: Plain text
2015 #: build/C/man3/pthread_attr_setdetachstate.3:30
2016 msgid ""
2017 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2018 "state attribute in thread attributes object"
2019 msgstr ""
2020 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2021 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2022
2023 #. type: Plain text
2024 #: build/C/man3/pthread_attr_setdetachstate.3:38
2025 #, no-wrap
2026 msgid ""
2027 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2028 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2029 msgstr ""
2030 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2031 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2032
2033 #. type: Plain text
2034 #: build/C/man3/pthread_attr_setdetachstate.3:53
2035 msgid ""
2036 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2037 "attribute of the thread attributes object referred to by I<attr> to the "
2038 "value specified in I<detachstate>.  The detach state attribute determines "
2039 "whether a thread created using the thread attributes object I<attr> will be "
2040 "created in a joinable or a detached state."
2041 msgstr ""
2042 "B<pthread_attr_setdetachstate>() 関数は、\n"
2043 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2044 "I<detachstate> で指定された値に設定する。\n"
2045 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2046 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2047 "detached (切り離された) 状態で作成されるかが決定される。"
2048
2049 #. type: Plain text
2050 #: build/C/man3/pthread_attr_setdetachstate.3:56
2051 msgid "The following values may be specified in I<detachstate>:"
2052 msgstr "I<detachstate> には以下の値を指定できる。"
2053
2054 #. type: TP
2055 #: build/C/man3/pthread_attr_setdetachstate.3:56
2056 #, no-wrap
2057 msgid "B<PTHREAD_CREATE_DETACHED>"
2058 msgstr "B<PTHREAD_CREATE_DETACHED>"
2059
2060 #. type: Plain text
2061 #: build/C/man3/pthread_attr_setdetachstate.3:61
2062 msgid ""
2063 "Threads that are created using I<attr> will be created in a detached state."
2064 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2065
2066 #. type: TP
2067 #: build/C/man3/pthread_attr_setdetachstate.3:61
2068 #, no-wrap
2069 msgid "B<PTHREAD_CREATE_JOINABLE>"
2070 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2071
2072 #. type: Plain text
2073 #: build/C/man3/pthread_attr_setdetachstate.3:66
2074 msgid ""
2075 "Threads that are created using I<attr> will be created in a joinable state."
2076 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2077
2078 #. type: Plain text
2079 #: build/C/man3/pthread_attr_setdetachstate.3:70
2080 msgid ""
2081 "The default setting of the detach state attribute in a newly initialized "
2082 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2083 msgstr ""
2084 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2085 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2086
2087 #. type: Plain text
2088 #: build/C/man3/pthread_attr_setdetachstate.3:77
2089 msgid ""
2090 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2091 "the thread attributes object I<attr> in the buffer pointed to by "
2092 "I<detachstate>."
2093 msgstr ""
2094 "B<pthread_attr_getdetachstate>() は、\n"
2095 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2096 "I<detachstate> が指すバッファに入れて返す。"
2097
2098 #. type: Plain text
2099 #: build/C/man3/pthread_attr_setdetachstate.3:83
2100 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2101 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2102
2103 #. type: Plain text
2104 #: build/C/man3/pthread_attr_setdetachstate.3:87
2105 msgid "An invalid value was specified in I<detachstate>."
2106 msgstr "無効な値が I<detachstate> で指定された。"
2107
2108 #. type: Plain text
2109 #: build/C/man3/pthread_attr_setdetachstate.3:93
2110 msgid ""
2111 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2112 msgstr ""
2113 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2114 "B<pthread_create>(3) を参照。"
2115
2116 #. type: Plain text
2117 #: build/C/man3/pthread_attr_setdetachstate.3:101
2118 msgid ""
2119 "A thread that is created in a joinable state should eventually either be "
2120 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2121 "B<pthread_create>(3)."
2122 msgstr ""
2123 "join 可能状態で作成されたスレッドは、最終的に\n"
2124 "B<pthread_join>(3) を使って join するか、\n"
2125 "B<pthread_detach>(3) を使って切り離すか、\n"
2126 "のどちらかを行うべきである。"
2127
2128 #. type: Plain text
2129 #: build/C/man3/pthread_attr_setdetachstate.3:108
2130 msgid ""
2131 "It is an error to specify the thread ID of a thread that was created in a "
2132 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2133 "(3)."
2134 msgstr ""
2135 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2136 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2137 "エラーである。"
2138
2139 #. type: Plain text
2140 #: build/C/man3/pthread_attr_setdetachstate.3:111
2141 #: build/C/man3/pthread_attr_setstack.3:155
2142 msgid "See B<pthread_attr_init>(3)."
2143 msgstr "B<pthread_attr_init>(3) を参照。"
2144
2145 #. type: Plain text
2146 #: build/C/man3/pthread_attr_setdetachstate.3:117
2147 msgid ""
2148 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2149 "B<pthread_join>(3), B<pthreads>(7)"
2150 msgstr ""
2151 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2152 "B<pthread_join>(3), B<pthreads>(7)"
2153
2154 #. type: TH
2155 #: build/C/man3/pthread_attr_setguardsize.3:26
2156 #, no-wrap
2157 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2158 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2159
2160 #. type: TH
2161 #: build/C/man3/pthread_attr_setguardsize.3:26
2162 #: build/C/man3/pthread_attr_setstack.3:26
2163 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2164 #, no-wrap
2165 msgid "2008-10-24"
2166 msgstr "2008-10-24"
2167
2168 #. type: Plain text
2169 #: build/C/man3/pthread_attr_setguardsize.3:30
2170 msgid ""
2171 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2172 "attribute in thread attributes object"
2173 msgstr ""
2174 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2175 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2176
2177 #. type: Plain text
2178 #: build/C/man3/pthread_attr_setguardsize.3:38
2179 #, no-wrap
2180 msgid ""
2181 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2182 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2183 msgstr ""
2184 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2185 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2186
2187 #. type: Plain text
2188 #: build/C/man3/pthread_attr_setguardsize.3:49
2189 msgid ""
2190 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2191 "of the thread attributes object referred to by I<attr> to the value "
2192 "specified in I<guardsize>."
2193 msgstr ""
2194 "B<pthread_attr_setguardsize>() 関数は、\n"
2195 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2196 "I<guardsize> で指定された値に設定する。"
2197
2198 #. type: Plain text
2199 #: build/C/man3/pthread_attr_setguardsize.3:59
2200 msgid ""
2201 "If I<guardsize> is greater than 0, then for each new thread created using "
2202 "I<attr> the system allocates an additional region of at least I<guardsize> "
2203 "bytes at the end of the thread's stack to act as the guard area for the "
2204 "stack (but see BUGS)."
2205 msgstr ""
2206 "I<guardsize> が 0 より大きい場合、\n"
2207 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2208 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2209 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2210 "機能する (ただし「バグ」の節も参照)。"
2211
2212 #. type: Plain text
2213 #: build/C/man3/pthread_attr_setguardsize.3:65
2214 msgid ""
2215 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2216 "guard area."
2217 msgstr ""
2218 "I<guardsize> が 0 の場合、\n"
2219 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2220
2221 #. type: Plain text
2222 #: build/C/man3/pthread_attr_setguardsize.3:67
2223 msgid "The default guard size is the same as the system page size."
2224 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2225
2226 #. type: Plain text
2227 #: build/C/man3/pthread_attr_setguardsize.3:82
2228 msgid ""
2229 "If the stack address attribute has been set in I<attr> (using "
2230 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2231 "that the caller is allocating the thread's stack, then the guard size "
2232 "attribute is ignored (i.e., no guard area is created by the system): it is "
2233 "the application's responsibility to handle stack overflow (perhaps by using "
2234 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2235 "it has allocated)."
2236 msgstr ""
2237 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2238 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2239 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2240 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2241 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2242 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2243 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2244
2245 #. type: Plain text
2246 #: build/C/man3/pthread_attr_setguardsize.3:90
2247 msgid ""
2248 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2249 "attribute of the thread attributes object referred to by I<attr> in the "
2250 "buffer pointed to by I<guardsize>."
2251 msgstr ""
2252 "B<pthread_attr_getguardsize>() は、\n"
2253 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2254 "I<guardsize> が指すバッファに入れて返す。"
2255
2256 #. type: Plain text
2257 #: build/C/man3/pthread_attr_setguardsize.3:104
2258 msgid ""
2259 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2260 "invalid.  On Linux these functions always succeed (but portable and future-"
2261 "proof applications should nevertheless handle a possible error return)."
2262 msgstr ""
2263 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2264 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2265 "Linux では、これらの関数は常に成功する\n"
2266 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2267 "正のエラーの返り値を処理するようにすべきである)。"
2268
2269 #. type: Plain text
2270 #: build/C/man3/pthread_attr_setguardsize.3:106
2271 #: build/C/man3/pthread_attr_setstackaddr.3:83
2272 #: build/C/man3/pthread_attr_setstacksize.3:83
2273 msgid "These functions are provided by glibc since version 2.1."
2274 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2275
2276 #. type: Plain text
2277 #: build/C/man3/pthread_attr_setguardsize.3:122
2278 msgid ""
2279 "A guard area consists of virtual memory pages that are protected to prevent "
2280 "read and write access.  If a thread overflows its stack into the guard area, "
2281 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2282 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2283 "guard size is internally rounded up to the system page size when creating a "
2284 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2285 "size that was set by B<pthread_attr_setguardsize>().)"
2286 msgstr ""
2287 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2288 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2289 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2290 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2291 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2292 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2293 "(その場合も B<pthread_attr_getguardsize>() では\n"
2294 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2295
2296 #. type: Plain text
2297 #: build/C/man3/pthread_attr_setguardsize.3:126
2298 msgid ""
2299 "Setting a guard size of 0 may be useful to save memory in an application "
2300 "that creates many threads and knows that stack overflow can never occur."
2301 msgstr ""
2302 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2303 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2304 "することで、メモリを節約できることもある。"
2305
2306 #. type: Plain text
2307 #: build/C/man3/pthread_attr_setguardsize.3:130
2308 msgid ""
2309 "Choosing a guard size larger than the default size may be necessary for "
2310 "detecting stack overflows if a thread allocates large data structures on the "
2311 "stack."
2312 msgstr ""
2313 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2314 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2315 "大きな guard size を選ぶ必要があるかもしれない。"
2316
2317 #. type: SH
2318 #: build/C/man3/pthread_attr_setguardsize.3:130
2319 #: build/C/man3/pthread_attr_setinheritsched.3:112
2320 #: build/C/man3/pthread_attr_setstacksize.3:96
2321 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2322 #, no-wrap
2323 msgid "BUGS"
2324 msgstr "バグ"
2325
2326 #. type: Plain text
2327 #: build/C/man3/pthread_attr_setguardsize.3:141
2328 msgid ""
2329 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2330 "within the stack size allocation, rather than allocating extra space at the "
2331 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2332 "error from B<pthread_create>(3)  if the guard size value is too large, "
2333 "leaving no space for the actual stack.)"
2334 msgstr ""
2335 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2336 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2337 "末尾に追加の領域を割り当てることが求められている。\n"
2338 "(このため、ガード領域が大きすぎて、\n"
2339 "実際のスタック用の場所がなくなってしまう場合、\n"
2340 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2341
2342 #.  glibc includes the guardsize within the allocated stack size,
2343 #.  which looks pretty clearly to be in violation of POSIX.
2344 #.  Filed bug, 22 Oct 2008:
2345 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2346 #.  Older reports:
2347 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2348 #.  Reportedly, LinuxThreads did the right thing, allocating
2349 #.  extra space at the end of the stack:
2350 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2351 #. type: Plain text
2352 #: build/C/man3/pthread_attr_setguardsize.3:155
2353 msgid ""
2354 "The obsolete LinuxThreads implementation did the right thing, allocating "
2355 "extra space at the end of the stack for the guard area."
2356 msgstr ""
2357 "廃止予定の LinuxThreads 実装では、\n"
2358 "POSIX.1 で求められている通りの動作で、\n"
2359 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2360
2361 #. type: Plain text
2362 #: build/C/man3/pthread_attr_setguardsize.3:158
2363 msgid "See B<pthread_getattr_np>(3)."
2364 msgstr "B<pthread_getattr_np>(3) を参照。"
2365
2366 #. type: Plain text
2367 #: build/C/man3/pthread_attr_setguardsize.3:166
2368 msgid ""
2369 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2370 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2371 msgstr ""
2372 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2373 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2374
2375 #. type: TH
2376 #: build/C/man3/pthread_attr_setinheritsched.3:26
2377 #, no-wrap
2378 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2379 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2380
2381 #. type: TH
2382 #: build/C/man3/pthread_attr_setinheritsched.3:26
2383 #: build/C/man3/pthread_attr_setscope.3:26
2384 #, no-wrap
2385 msgid "2013-04-19"
2386 msgstr "2013-04-19"
2387
2388 #. type: Plain text
2389 #: build/C/man3/pthread_attr_setinheritsched.3:30
2390 msgid ""
2391 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit-"
2392 "scheduler attribute in thread attributes object"
2393 msgstr ""
2394 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - スレッド属性オブ"
2395 "ジェクトの inherit-scheduler 属性の設定/取得を行う"
2396
2397 #. type: Plain text
2398 #: build/C/man3/pthread_attr_setinheritsched.3:38
2399 #, no-wrap
2400 msgid ""
2401 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2402 "B<                                 int >I<inheritsched>B<);>\n"
2403 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2404 "B<                                 int *>I<inheritsched>B<);>\n"
2405 msgstr ""
2406 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2407 "B<                                 int >I<inheritsched>B<);>\n"
2408 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2409 "B<                                 int *>I<inheritsched>B<);>\n"
2410
2411 #. type: Plain text
2412 #: build/C/man3/pthread_attr_setinheritsched.3:55
2413 msgid ""
2414 "The B<pthread_attr_setinheritsched>()  function sets the inherit-scheduler "
2415 "attribute of the thread attributes object referred to by I<attr> to the "
2416 "value specified in I<inheritsched>.  The inherit-scheduler attribute "
2417 "determines whether a thread created using the thread attributes object "
2418 "I<attr> will inherit its scheduling attributes from the calling thread or "
2419 "whether it will take them from I<attr>."
2420 msgstr ""
2421 "B<pthread_attr_setinheritsched>() 関数は、 I<attr> が参照するスレッド属性オブ"
2422 "ジェクトの inherit-scheduler 属性を I<inheritsched> で指定された値に設定す"
2423 "る。 inherit-scheduler 属性により、スレッド属性オブジェクト I<attr> を使って"
2424 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承するか、 "
2425 "I<attr> からスケジューリング属性を取得するかが決定される。"
2426
2427 #. type: Plain text
2428 #: build/C/man3/pthread_attr_setinheritsched.3:64
2429 msgid ""
2430 "The following scheduling attributes are affected by the inherit-scheduler "
2431 "attribute: scheduling policy (B<pthread_attr_setschedpolicy>(3)), scheduling "
2432 "priority (B<pthread_attr_setschedparam>(3)), and contention scope "
2433 "(B<pthread_attr_setscope>(3))."
2434 msgstr ""
2435 "次に挙げるスケジューリング属性は inherit-scheduler 属性の影響を受ける: スケ"
2436 "ジューリングポリシー (B<pthread_attr_setschedpolicy>(3))、 スケジューリング優"
2437 "先度 (B<pthread_attr_setschedparam>(3))、 contention scope "
2438 "(B<pthread_attr_setscope>(3))。"
2439
2440 #. type: Plain text
2441 #: build/C/man3/pthread_attr_setinheritsched.3:67
2442 msgid "The following values may be specified in I<inheritsched>:"
2443 msgstr "以下の値を I<inheritsched> に指定できる。"
2444
2445 #. type: TP
2446 #: build/C/man3/pthread_attr_setinheritsched.3:67
2447 #, no-wrap
2448 msgid "B<PTHREAD_INHERIT_SCHED>"
2449 msgstr "B<PTHREAD_INHERIT_SCHED>"
2450
2451 #. type: Plain text
2452 #: build/C/man3/pthread_attr_setinheritsched.3:75
2453 msgid ""
2454 "Threads that are created using I<attr> inherit scheduling attributes from "
2455 "the creating thread; the scheduling attributes in I<attr> are ignored."
2456 msgstr ""
2457 "I<attr> を使って作成されたスレッドは、\n"
2458 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2459 "I<attr> 内のスケジューリング属性は無視される。"
2460
2461 #. type: TP
2462 #: build/C/man3/pthread_attr_setinheritsched.3:75
2463 #, no-wrap
2464 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2465 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2466
2467 #.  FIXME what are the defaults for scheduler settings?
2468 #. type: Plain text
2469 #: build/C/man3/pthread_attr_setinheritsched.3:82
2470 msgid ""
2471 "Threads that are created using I<attr> take their scheduling attributes from "
2472 "the values specified by the attributes object."
2473 msgstr ""
2474 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2475 "指定された値からスケジューリング属性を取得する。"
2476
2477 #. type: Plain text
2478 #: build/C/man3/pthread_attr_setinheritsched.3:86
2479 msgid ""
2480 "The default setting of the inherit-scheduler attribute in a newly "
2481 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2482 msgstr ""
2483 "新たに初期化されたスレッド属性オブジェクトの inherit-scheduler 属性のデフォル"
2484 "ト設定は B<PTHREAD_INHERIT_SCHED> である。"
2485
2486 #. type: Plain text
2487 #: build/C/man3/pthread_attr_setinheritsched.3:93
2488 msgid ""
2489 "The B<pthread_attr_getinheritsched>()  returns the inherit-scheduler "
2490 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2491 "by I<inheritsched>."
2492 msgstr ""
2493 "B<pthread_attr_getinheritsched>() は、 スレッド属性オブジェクト I<attr> の "
2494 "inherit-scheduler 属性を I<inheritsched> が指すバッファに入れて返す。"
2495
2496 #. type: Plain text
2497 #: build/C/man3/pthread_attr_setinheritsched.3:99
2498 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2499 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2500
2501 #. type: Plain text
2502 #: build/C/man3/pthread_attr_setinheritsched.3:103
2503 msgid "Invalid value in I<inheritsched>."
2504 msgstr "I<inheritsched> に無効な値が指定された。"
2505
2506 #.  .SH VERSIONS
2507 #.  Available since glibc 2.0.
2508 #. type: Plain text
2509 #: build/C/man3/pthread_attr_setinheritsched.3:110
2510 msgid ""
2511 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2512 "to set the attribute to an unsupported value\") for "
2513 "B<pthread_attr_setinheritsched>()."
2514 msgstr ""
2515 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2516 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2517 "も追加で規定されている。"
2518
2519 #.  FIXME . Track status of the following bug:
2520 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2521 #. type: Plain text
2522 #: build/C/man3/pthread_attr_setinheritsched.3:128
2523 msgid ""
2524 "As at glibc 2.8, if a thread attributes object is initialized using "
2525 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2526 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2527 "if the inherit-scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2528 "then a thread created using the attribute object wrongly inherits its "
2529 "scheduling attributes from the creating thread.  This bug does not occur if "
2530 "either the scheduling policy or scheduling priority attribute is explicitly "
2531 "set in the thread attributes object before calling B<pthread_create>(3)."
2532 msgstr ""
2533 "glibc 2.8 の時点では、スレッド属性オブジェクトが B<pthread_attr_init>(3) を"
2534 "使って初期化された場合、 スレッド属性オブジェクトのスケジューリングポリシー"
2535 "が B<SCHED_OTHER> に、 スケジューリング優先度が 0 に設定される。一方、その後 "
2536 "inherit-scheduler 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ"
2537 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するスレッド"
2538 "のスケジューリング属性が間違って継承されてしまう。 B<pthread_create>(3) を呼"
2539 "び出す前にスケジューリングポリシー属性かスケジューリング優先度属性のどちらか"
2540 "が明示的に設定された場合には、 このバグは発生しない。"
2541
2542 #. type: Plain text
2543 #: build/C/man3/pthread_attr_setinheritsched.3:131
2544 #: build/C/man3/pthread_attr_setschedparam.3:109
2545 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2546 msgid "See B<pthread_setschedparam>(3)."
2547 msgstr "B<pthread_setschedparam>(3) を参照。"
2548
2549 #. type: Plain text
2550 #: build/C/man3/pthread_attr_setinheritsched.3:143
2551 msgid ""
2552 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2553 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2554 "B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>"
2555 "(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2556 msgstr ""
2557 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2558 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2559 "B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>"
2560 "(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2561
2562 #. type: TH
2563 #: build/C/man3/pthread_attr_setschedparam.3:26
2564 #, no-wrap
2565 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2566 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2567
2568 #. type: TH
2569 #: build/C/man3/pthread_attr_setschedparam.3:26
2570 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2571 #: build/C/man3/pthread_setname_np.3:26
2572 #, no-wrap
2573 msgid "2013-06-21"
2574 msgstr "2013-06-21"
2575
2576 #. type: Plain text
2577 #: build/C/man3/pthread_attr_setschedparam.3:30
2578 msgid ""
2579 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2580 "parameter attributes in thread attributes object"
2581 msgstr ""
2582 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2583 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2584
2585 #. type: Plain text
2586 #: build/C/man3/pthread_attr_setschedparam.3:38
2587 #, no-wrap
2588 msgid ""
2589 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2590 "B<                               const struct sched_param *>I<param>B<);>\n"
2591 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2592 "B<                               struct sched_param *>I<param>B<);>\n"
2593 msgstr ""
2594 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2595 "B<                               const struct sched_param *>I<param>B<);>\n"
2596 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2597 "B<                               struct sched_param *>I<param>B<);>\n"
2598
2599 #. type: Plain text
2600 #: build/C/man3/pthread_attr_setschedparam.3:52
2601 msgid ""
2602 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2603 "attributes of the thread attributes object referred to by I<attr> to the "
2604 "values specified in the buffer pointed to by I<param>.  These attributes "
2605 "determine the scheduling parameters of a thread created using the thread "
2606 "attributes object I<attr>."
2607 msgstr ""
2608 "B<pthread_attr_setschedparam>() 関数は、\n"
2609 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2610 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2611 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2612 "作成されるスレッドのスケジューリングパラメータが決定される。"
2613
2614 #. type: Plain text
2615 #: build/C/man3/pthread_attr_setschedparam.3:59
2616 msgid ""
2617 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2618 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2619 "by I<param>."
2620 msgstr ""
2621 "B<pthread_attr_getschedparam>() は、\n"
2622 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2623 "I<param> が指すバッファに入れて返す。"
2624
2625 #. type: Plain text
2626 #: build/C/man3/pthread_attr_setschedparam.3:61
2627 msgid "Scheduling parameters are maintained in the following structure:"
2628 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2629
2630 #. type: Plain text
2631 #: build/C/man3/pthread_attr_setschedparam.3:67
2632 #: build/C/man3/pthread_setschedparam.3:69
2633 #, no-wrap
2634 msgid ""
2635 "struct sched_param {\n"
2636 "    int sched_priority;     /* Scheduling priority */\n"
2637 "};\n"
2638 msgstr ""
2639 "struct sched_param {\n"
2640 "    int sched_priority;     /* Scheduling priority */\n"
2641 "};\n"
2642
2643 #. type: Plain text
2644 #: build/C/man3/pthread_attr_setschedparam.3:74
2645 #: build/C/man3/pthread_setschedparam.3:76
2646 msgid ""
2647 "As can be seen, only one scheduling parameter is supported.  For details of "
2648 "the permitted ranges for scheduling priorities in each scheduling policy, "
2649 "see B<sched_setscheduler>(2)."
2650 msgstr ""
2651 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2652 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2653 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2654
2655 #. type: Plain text
2656 #: build/C/man3/pthread_attr_setschedparam.3:85
2657 msgid ""
2658 "In order for the parameter setting made by B<pthread_attr_setschedparam>()  "
2659 "to have effect when calling B<pthread_create>(3), the caller must use "
2660 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2661 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2662 msgstr ""
2663 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedparam>() で行っ"
2664 "たパラメータ設定を有効にするには、 呼び出し側で "
2665 "B<pthread_attr_setinheritsched>(3) を使って 属性オブジェクト I<attr> の "
2666 "inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければなら"
2667 "ない。"
2668
2669 #.  .SH VERSIONS
2670 #.  Available since glibc 2.0.
2671 #. type: Plain text
2672 #: build/C/man3/pthread_attr_setschedparam.3:100
2673 msgid ""
2674 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2675 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2676 "(but portable and future-proof applications should nevertheless handle a "
2677 "possible error return)."
2678 msgstr ""
2679 "POSIX.1 では、\n"
2680 "B<pthread_attr_setschedparam>() について\n"
2681 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2682 "Linux では、これらの関数は常に成功する\n"
2683 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2684 "正のエラーの返り値を処理するようにすべきである)。"
2685
2686 #. type: Plain text
2687 #: build/C/man3/pthread_attr_setschedparam.3:106
2688 msgid ""
2689 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2690 "policies supported on Linux."
2691 msgstr ""
2692 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2693 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2694
2695 #. type: Plain text
2696 #: build/C/man3/pthread_attr_setschedparam.3:121
2697 msgid ""
2698 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2699 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2700 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2701 "(3), B<pthreads>(7)"
2702 msgstr ""
2703 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2704 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2705 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2706 "(3), B<pthreads>(7)"
2707
2708 #. type: TH
2709 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2710 #, no-wrap
2711 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2712 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2713
2714 #. type: Plain text
2715 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2716 msgid ""
2717 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2718 "scheduling policy attribute in thread attributes object"
2719 msgstr ""
2720 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2721 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2722
2723 #. type: Plain text
2724 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2725 #, no-wrap
2726 msgid ""
2727 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2728 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2729 msgstr ""
2730 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2731 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2732
2733 #. type: Plain text
2734 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2735 msgid ""
2736 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2737 "attribute of the thread attributes object referred to by I<attr> to the "
2738 "value specified in I<policy>.  This attribute determines the scheduling "
2739 "policy of a thread created using the thread attributes object I<attr>."
2740 msgstr ""
2741 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2742 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2743 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2744 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2745 "作成されるスレッドのスケジューリングポリシーが決定される。"
2746
2747 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2748 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2749 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2750 #. type: Plain text
2751 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2752 msgid ""
2753 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2754 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2755 msgstr ""
2756 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2757 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2758 "である。"
2759
2760 #. type: Plain text
2761 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2762 msgid ""
2763 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2764 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2765 "by I<policy>."
2766 msgstr ""
2767 "B<pthread_attr_getschedpolicy>() は、\n"
2768 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2769 "I<policy> が指すバッファに入れて返す。"
2770
2771 #. type: Plain text
2772 #: build/C/man3/pthread_attr_setschedpolicy.3:83
2773 msgid ""
2774 "In order for the policy setting made by B<pthread_attr_setschedpolicy>()  to "
2775 "have effect when calling B<pthread_create>(3), the caller must use "
2776 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2777 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2778 msgstr ""
2779 "B<pthread_create>(3) を呼び出した際に B<pthread_attr_setschedpolicy>() で行っ"
2780 "たポリシー設定を有効にするには、 呼び出し側で B<pthread_attr_setinheritsched>"
2781 "(3) を使って 属性オブジェクト I<attr> の inherit-scheduler 属性を "
2782 "B<PTHREAD_EXPLICIT_SCHED> に設定しておかなければならない。"
2783
2784 #. type: Plain text
2785 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2786 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2787 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2788
2789 #. type: Plain text
2790 #: build/C/man3/pthread_attr_setschedpolicy.3:93
2791 msgid "Invalid value in I<policy>."
2792 msgstr "I<policy> に無効な値が指定された。"
2793
2794 #.  .SH VERSIONS
2795 #.  Available since glibc 2.0.
2796 #. type: Plain text
2797 #: build/C/man3/pthread_attr_setschedpolicy.3:100
2798 msgid ""
2799 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2800 "to set the attribute to an unsupported value\") for "
2801 "B<pthread_attr_setschedpolicy>()."
2802 msgstr ""
2803 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2804 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2805 "も追加で規定されている。"
2806
2807 #. type: Plain text
2808 #: build/C/man3/pthread_attr_setschedpolicy.3:116
2809 msgid ""
2810 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2811 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2812 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2813 "(3), B<pthreads>(7)"
2814 msgstr ""
2815 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2816 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2817 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2818 "(3), B<pthreads>(7)"
2819
2820 #. type: TH
2821 #: build/C/man3/pthread_attr_setscope.3:26
2822 #, no-wrap
2823 msgid "PTHREAD_ATTR_SETSCOPE"
2824 msgstr "PTHREAD_ATTR_SETSCOPE"
2825
2826 #. type: Plain text
2827 #: build/C/man3/pthread_attr_setscope.3:30
2828 msgid ""
2829 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2830 "attribute in thread attributes object"
2831 msgstr ""
2832 "pthread_attr_setscope, pthread_attr_getscope - \n"
2833 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2834
2835 #. type: Plain text
2836 #: build/C/man3/pthread_attr_setscope.3:38
2837 #, no-wrap
2838 msgid ""
2839 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2840 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2841 msgstr ""
2842 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2843 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2844
2845 #. type: Plain text
2846 #: build/C/man3/pthread_attr_setscope.3:53
2847 msgid ""
2848 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2849 "of the thread attributes object referred to by I<attr> to the value "
2850 "specified in I<scope>.  The contention scope attribute defines the set of "
2851 "threads against which a thread competes for resources such as the CPU.  "
2852 "POSIX.1-2001 specifies two possible values for I<scope>:"
2853 msgstr ""
2854 "B<pthread_attr_setscope>() 関数は、\n"
2855 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2856 "属性を I<scope> で指定された値に設定する。\n"
2857 "contention scope 属性により、\n"
2858 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2859 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2860
2861 #. type: TP
2862 #: build/C/man3/pthread_attr_setscope.3:53
2863 #, no-wrap
2864 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2865 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2866
2867 #. type: Plain text
2868 #: build/C/man3/pthread_attr_setscope.3:61
2869 msgid ""
2870 "The thread competes for resources with all other threads in all processes on "
2871 "the system that are in the same scheduling allocation domain (a group of one "
2872 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2873 "to one another according to their scheduling policy and priority."
2874 msgstr ""
2875 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2876 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2877 "スレッドとリソースを取り合う。 \n"
2878 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2879 "優先度に基づき、互いに相対的にスケジューリングされる。"
2880
2881 #. type: TP
2882 #: build/C/man3/pthread_attr_setscope.3:61
2883 #, no-wrap
2884 msgid "B<PTHREAD_SCOPE_PROCESS>"
2885 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2886
2887 #. type: Plain text
2888 #: build/C/man3/pthread_attr_setscope.3:76
2889 msgid ""
2890 "The thread competes for resources with all other threads in the same process "
2891 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2892 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2893 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2894 "leaves it unspecified how these threads contend with other threads in other "
2895 "process on the system or with other threads in the same process that were "
2896 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2897 msgstr ""
2898 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2899 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2900 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2901 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2902 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2903 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2904 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2905 "規定されないままになっている。"
2906
2907 #. type: Plain text
2908 #: build/C/man3/pthread_attr_setscope.3:83
2909 msgid ""
2910 "POSIX.1-2001 requires that an implementation support at least one of these "
2911 "contention scopes.  Linux supports B<PTHREAD_SCOPE_SYSTEM>, but not "
2912 "B<PTHREAD_SCOPE_PROCESS>."
2913 msgstr ""
2914 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention scope の"
2915 "うち少なくとも 1 つをサポートすることだけである。 Linux は "
2916 "B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、 B<PTHREAD_SCOPE_PROCESS> はサ"
2917 "ポートしていない。"
2918
2919 #. type: Plain text
2920 #: build/C/man3/pthread_attr_setscope.3:95
2921 msgid ""
2922 "On systems that support multiple contention scopes, then, in order for the "
2923 "parameter setting made by B<pthread_attr_setscope>()  to have effect when "
2924 "calling B<pthread_create>(3), the caller must use "
2925 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2926 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2927 msgstr ""
2928 "複数の contention scope をサポートしているシステムで、 B<pthread_create>(3) "
2929 "を呼び出した際に B<pthread_attr_setscope>() で行ったパラメータ設定を有効にす"
2930 "るには、 呼び出し側で B<pthread_attr_setinheritsched>(3) を使って 属性オブ"
2931 "ジェクト I<attr> の inherit-scheduler 属性を B<PTHREAD_EXPLICIT_SCHED> に設定"
2932 "しておかなければならない。"
2933
2934 #. type: Plain text
2935 #: build/C/man3/pthread_attr_setscope.3:103
2936 msgid ""
2937 "The B<pthread_attr_getscope>()  function returns the contention scope "
2938 "attribute of the thread attributes object referred to by I<attr> in the "
2939 "buffer pointed to by I<scope>."
2940 msgstr ""
2941 "B<pthread_attr_getscope>() は、\n"
2942 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2943 "I<scope> が指すバッファに入れて返す。"
2944
2945 #. type: Plain text
2946 #: build/C/man3/pthread_attr_setscope.3:109
2947 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2948 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2949
2950 #. type: Plain text
2951 #: build/C/man3/pthread_attr_setscope.3:113
2952 msgid "An invalid value was specified in I<scope>."
2953 msgstr "I<scope> に無効な値が指定された。"
2954
2955 #. type: TP
2956 #: build/C/man3/pthread_attr_setscope.3:113
2957 #, no-wrap
2958 msgid "B<ENOTSUP>"
2959 msgstr "B<ENOTSUP>"
2960
2961 #. type: Plain text
2962 #: build/C/man3/pthread_attr_setscope.3:119
2963 msgid ""
2964 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2965 "supported on Linux."
2966 msgstr ""
2967 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
2968 "この値は Linux でサポートされていない。"
2969
2970 #. type: Plain text
2971 #: build/C/man3/pthread_attr_setscope.3:129
2972 msgid ""
2973 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
2974 "space thread is bound directly to a single kernel-scheduling entity.  This "
2975 "is the case on Linux for the obsolete LinuxThreads implementation and the "
2976 "modern NPTL implementation, which are both 1:1 threading implementations."
2977 msgstr ""
2978 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
2979 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
2980 "直接結び付けられる。\n"
2981 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
2982 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
2983
2984 #. type: Plain text
2985 #: build/C/man3/pthread_attr_setscope.3:132
2986 msgid ""
2987 "POSIX.1-2001 specifies that the default contention scope is implementation-"
2988 "defined."
2989 msgstr ""
2990 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
2991 "実装時で定義されるものと規定されている。"
2992
2993 #. type: Plain text
2994 #: build/C/man3/pthread_attr_setscope.3:142
2995 msgid ""
2996 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2997 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2998 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2999 msgstr ""
3000 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
3001 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
3002 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
3003
3004 #. type: TH
3005 #: build/C/man3/pthread_attr_setstack.3:26
3006 #, no-wrap
3007 msgid "PTHREAD_ATTR_SETSTACK"
3008 msgstr "PTHREAD_ATTR_SETSTACK"
3009
3010 #. type: Plain text
3011 #: build/C/man3/pthread_attr_setstack.3:30
3012 msgid ""
3013 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
3014 "thread attributes object"
3015 msgstr ""
3016 "pthread_attr_setstack, pthread_attr_getstack - \n"
3017 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
3018
3019 #. type: Plain text
3020 #: build/C/man3/pthread_attr_setstack.3:38
3021 #, no-wrap
3022 msgid ""
3023 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3024 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3025 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3026 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3027 msgstr ""
3028 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3029 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3030 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3031 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3032
3033 #. type: Plain text
3034 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_kill.3:41
3035 #: build/C/man3/pthread_sigmask.3:42 build/C/man3/pthread_sigqueue.3:41
3036 msgid ""
3037 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3038 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3039
3040 #. type: Plain text
3041 #: build/C/man3/pthread_attr_setstack.3:50
3042 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3043 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3044
3045 #. type: Plain text
3046 #: build/C/man3/pthread_attr_setstack.3:52
3047 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3048 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3049
3050 #. type: Plain text
3051 #: build/C/man3/pthread_attr_setstack.3:68
3052 msgid ""
3053 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3054 "size attributes of the thread attributes object referred to by I<attr> to "
3055 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3056 "attributes specify the location and size of the stack that should be used by "
3057 "a thread that is created using the thread attributes object I<attr>."
3058 msgstr ""
3059 "B<pthread_attr_setstack>() 関数は、\n"
3060 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3061 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3062 "指定された値に設定する。\n"
3063 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3064 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3065
3066 #. type: Plain text
3067 #: build/C/man3/pthread_attr_setstack.3:74
3068 msgid ""
3069 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3070 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3071 "allocated buffer should be both readable and writable."
3072 msgstr ""
3073 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3074 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3075 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3076 "べきである。"
3077
3078 #. type: Plain text
3079 #: build/C/man3/pthread_attr_setstack.3:85
3080 msgid ""
3081 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3082 "size attributes of the thread attributes object referred to by I<attr> in "
3083 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3084 msgstr ""
3085 "B<pthread_attr_getstack>() 関数は、\n"
3086 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3087 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3088 "指すバッファに入れて返す。"
3089
3090 #. type: Plain text
3091 #: build/C/man3/pthread_attr_setstack.3:91
3092 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3093 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3094
3095 #. type: Plain text
3096 #: build/C/man3/pthread_attr_setstack.3:102
3097 msgid ""
3098 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3099 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3100 "stacksize> is not suitably aligned."
3101 msgstr ""
3102 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3103 "システムによっては、 I<stackaddr> か\n"
3104 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3105 "このエラーが発生する。"
3106
3107 #. type: Plain text
3108 #: build/C/man3/pthread_attr_setstack.3:110
3109 msgid ""
3110 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3111 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3112 "caller."
3113 msgstr ""
3114 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3115 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3116 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3117
3118 #. type: Plain text
3119 #: build/C/man3/pthread_attr_setstack.3:112
3120 msgid "These functions are provided by glibc since version 2.2."
3121 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3122
3123 #. type: Plain text
3124 #: build/C/man3/pthread_attr_setstack.3:122
3125 msgid ""
3126 "These functions are provided for applications that must ensure that a "
3127 "thread's stack is placed in a particular location.  For most applications, "
3128 "this is not necessary, and the use of these functions should be avoided.  "
3129 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3130 "stack size other than the default.)"
3131 msgstr ""
3132 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3133 "しなければならないアプリケーションのために提供されている。\n"
3134 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3135 "これらの関数を使うのは避けるべきである。\n"
3136 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3137 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3138
3139 #. type: Plain text
3140 #: build/C/man3/pthread_attr_setstack.3:133
3141 msgid ""
3142 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3143 "responsibility of allocating the stack.  Any guard size value that was set "
3144 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3145 "is the application's responsibility to allocate a guard area (one or more "
3146 "pages protected against reading and writing)  to handle the possibility of "
3147 "stack overflow."
3148 msgstr ""
3149 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3150 "スタックの割り当てに責任を持つ必要がある。\n"
3151 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3152 "guard size の値は無視される。\n"
3153 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3154 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3155 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3156
3157 #. type: Plain text
3158 #: build/C/man3/pthread_attr_setstack.3:144
3159 msgid ""
3160 "The address specified in I<stackaddr> should be suitably aligned: for full "
3161 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3162 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3163 "should also be a multiple of the system page size."
3164 msgstr ""
3165 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3166 "完全な移植性を持たせるためには、\n"
3167 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3168 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3169 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3170
3171 #. type: Plain text
3172 #: build/C/man3/pthread_attr_setstack.3:152
3173 msgid ""
3174 "If I<attr> is used to create multiple threads, then the caller must change "
3175 "the stack address attribute between calls to B<pthread_create>(3); "
3176 "otherwise, the threads will attempt to use the same memory area for their "
3177 "stacks, and chaos will ensue."
3178 msgstr ""
3179 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3180 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3181 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3182 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3183 "使おうとするため、訳の分からない状況が発生してしまう。"
3184
3185 #. type: Plain text
3186 #: build/C/man3/pthread_attr_setstack.3:167
3187 msgid ""
3188 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3189 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3190 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3191 msgstr ""
3192 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3193 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3194 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3195
3196 #. type: TH
3197 #: build/C/man3/pthread_attr_setstackaddr.3:26
3198 #, no-wrap
3199 msgid "PTHREAD_ATTR_SETSTACKADDR"
3200 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3201
3202 #. type: Plain text
3203 #: build/C/man3/pthread_attr_setstackaddr.3:30
3204 msgid ""
3205 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3206 "attribute in thread attributes object"
3207 msgstr ""
3208 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3209 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3210
3211 #. type: Plain text
3212 #: build/C/man3/pthread_attr_setstackaddr.3:38
3213 #, no-wrap
3214 msgid ""
3215 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3216 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3217 msgstr ""
3218 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3219 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3220
3221 #. type: Plain text
3222 #: build/C/man3/pthread_attr_setstackaddr.3:49
3223 msgid ""
3224 "These functions are obsolete: B<do not use them.> Use "
3225 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3226 msgstr ""
3227 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3228 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3229 "うこと。"
3230
3231 #. type: Plain text
3232 #: build/C/man3/pthread_attr_setstackaddr.3:60
3233 msgid ""
3234 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3235 "attribute of the thread attributes object referred to by I<attr> to the "
3236 "value specified in I<stackaddr>.  This attribute specifies the location of "
3237 "the stack that should be used by a thread that is created using the thread "
3238 "attributes object I<attr>."
3239 msgstr ""
3240 "B<pthread_attr_setstackaddr>() 関数は、\n"
3241 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3242 "属性を I<stackaddr> で指定された値に設定する。\n"
3243 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3244 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3245
3246 #. type: Plain text
3247 #: build/C/man3/pthread_attr_setstackaddr.3:66
3248 msgid ""
3249 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3250 "that was allocated by the caller.  The pages of the allocated buffer should "
3251 "be both readable and writable."
3252 msgstr ""
3253 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3254 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3255 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3256 "なっているべきである。"
3257
3258 #. type: Plain text
3259 #: build/C/man3/pthread_attr_setstackaddr.3:74
3260 msgid ""
3261 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3262 "attribute of the thread attributes object referred to by I<attr> in the "
3263 "buffer pointed to by I<stackaddr>."
3264 msgstr ""
3265 "B<pthread_attr_getstackaddr>() は、\n"
3266 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3267 "I<stackaddr> が指すバッファに入れて返す。"
3268
3269 #. type: Plain text
3270 #: build/C/man3/pthread_attr_setstackaddr.3:81
3271 msgid ""
3272 "No errors are defined (but applications should nevertheless handle a "
3273 "possible error return)."
3274 msgstr ""
3275 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3276 "返り値を処理するようにすべきである)。"
3277
3278 #. type: Plain text
3279 #: build/C/man3/pthread_attr_setstackaddr.3:86
3280 msgid ""
3281 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3282 "POSIX.1-2008 removes the specification of these functions."
3283 msgstr ""
3284 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3285 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3286
3287 #. type: Plain text
3288 #: build/C/man3/pthread_attr_setstackaddr.3:110
3289 msgid ""
3290 "I<Do not use these functions!> They cannot be portably used, since they "
3291 "provide no way of specifying the direction of growth or the range of the "
3292 "stack.  For example, on architectures with a stack that grows downward, "
3293 "I<stackaddr> specifies the next address past the I<highest> address of the "
3294 "allocated stack area.  However, on architectures with a stack that grows "
3295 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3296 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3297 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3298 "in the allocated stack area (and the I<stacksize> argument specifies the "
3299 "range of the stack)."
3300 msgstr ""
3301 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3302 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3303 "かを指定する手段が提供されていないからである。\n"
3304 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3305 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3306 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3307 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3308 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3309 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3310 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3311 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3312
3313 #. type: Plain text
3314 #: build/C/man3/pthread_attr_setstackaddr.3:116
3315 msgid ""
3316 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3317 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3318 msgstr ""
3319 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3320 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3321
3322 #. type: TH
3323 #: build/C/man3/pthread_attr_setstacksize.3:26
3324 #, no-wrap
3325 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3326 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3327
3328 #. type: TH
3329 #: build/C/man3/pthread_attr_setstacksize.3:26
3330 #, no-wrap
3331 msgid "2012-03-15"
3332 msgstr "2012-03-15"
3333
3334 #. type: Plain text
3335 #: build/C/man3/pthread_attr_setstacksize.3:30
3336 msgid ""
3337 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3338 "attribute in thread attributes object"
3339 msgstr ""
3340 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3341 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3342
3343 #. type: Plain text
3344 #: build/C/man3/pthread_attr_setstacksize.3:38
3345 #, no-wrap
3346 msgid ""
3347 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3348 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3349 msgstr ""
3350 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3351 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3352
3353 #. type: Plain text
3354 #: build/C/man3/pthread_attr_setstacksize.3:49
3355 msgid ""
3356 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3357 "of the thread attributes object referred to by I<attr> to the value "
3358 "specified in I<stacksize>."
3359 msgstr ""
3360 "B<pthread_attr_setstacksize>() 関数は、\n"
3361 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3362 "属性を I<stacksize> で指定された値に設定する。"
3363
3364 #. type: Plain text
3365 #: build/C/man3/pthread_attr_setstacksize.3:53
3366 msgid ""
3367 "The stack size attribute determines the minimum size (in bytes) that will be "
3368 "allocated for threads created using the thread attributes object I<attr>."
3369 msgstr ""
3370 "スタックサイズ属性により、\n"
3371 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3372 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3373
3374 #. type: Plain text
3375 #: build/C/man3/pthread_attr_setstacksize.3:61
3376 msgid ""
3377 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3378 "attribute of the thread attributes object referred to by I<attr> in the "
3379 "buffer pointed to by I<stacksize>."
3380 msgstr ""
3381 "B<pthread_attr_getstacksize>() は、\n"
3382 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3383 "I<stacksize> が指すバッファに入れて返す。"
3384
3385 #. type: Plain text
3386 #: build/C/man3/pthread_attr_setstacksize.3:67
3387 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3388 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3389
3390 #. type: Plain text
3391 #: build/C/man3/pthread_attr_setstacksize.3:72
3392 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3393 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3394
3395 #.  e.g., MacOS
3396 #. type: Plain text
3397 #: build/C/man3/pthread_attr_setstacksize.3:81
3398 msgid ""
3399 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3400 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3401 msgstr ""
3402 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3403 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3404 "エラー B<EINVAL> で失敗する。"
3405
3406 #. type: Plain text
3407 #: build/C/man3/pthread_attr_setstacksize.3:88
3408 msgid ""
3409 "For details on the default stack size of new threads, see B<pthread_create>"
3410 "(3)."
3411 msgstr ""
3412 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3413 "B<pthread_create>(3) を参照。"
3414
3415 #. type: Plain text
3416 #: build/C/man3/pthread_attr_setstacksize.3:91
3417 msgid ""
3418 "A thread's stack size is fixed at the time of thread creation.  Only the "
3419 "main thread can dynamically grow its stack."
3420 msgstr ""
3421 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3422 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3423
3424 #. type: Plain text
3425 #: build/C/man3/pthread_attr_setstacksize.3:96
3426 msgid ""
3427 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3428 "the size and location of a caller-allocated stack that is to be used by a "
3429 "thread."
3430 msgstr ""
3431 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3432 "アプリケーションは、スレッドが使用するスタックとして、\n"
3433 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3434
3435 #. type: Plain text
3436 #: build/C/man3/pthread_attr_setstacksize.3:108
3437 msgid ""
3438 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3439 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3440 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3441 "stack will be at least I<stacksize> bytes."
3442 msgstr ""
3443 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3444 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3445 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3446 "これは POSIX.1-2001 に違反している。\n"
3447 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3448 "少なくとも I<stacksize> バイトになると書かれている。"
3449
3450 #. type: Plain text
3451 #: build/C/man3/pthread_attr_setstacksize.3:111
3452 #: build/C/man3/pthread_join.3:127
3453 msgid "See B<pthread_create>(3)."
3454 msgstr "B<pthread_create>(3) を参照。"
3455
3456 #. type: Plain text
3457 #: build/C/man3/pthread_attr_setstacksize.3:118
3458 msgid ""
3459 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3460 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3461 msgstr ""
3462 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3463 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3464
3465 #. type: TH
3466 #: build/C/man3/pthread_cancel.3:26
3467 #, no-wrap
3468 msgid "PTHREAD_CANCEL"
3469 msgstr "PTHREAD_CANCEL"
3470
3471 #. type: TH
3472 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3473 #, no-wrap
3474 msgid "2008-11-17"
3475 msgstr "2008-11-17"
3476
3477 #. type: Plain text
3478 #: build/C/man3/pthread_cancel.3:29
3479 msgid "pthread_cancel - send a cancellation request to a thread"
3480 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3481
3482 #. type: Plain text
3483 #: build/C/man3/pthread_cancel.3:34
3484 #, no-wrap
3485 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3486 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3487
3488 #. type: Plain text
3489 #: build/C/man3/pthread_cancel.3:49
3490 msgid ""
3491 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3492 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3493 "request depends on two attributes that are under the control of that thread: "
3494 "its cancelability I<state> and I<type>."
3495 msgstr ""
3496 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3497 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3498 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3499 "I<state> と I<type>により決まる。"
3500
3501 #. type: Plain text
3502 #: build/C/man3/pthread_cancel.3:61
3503 msgid ""
3504 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3505 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3506 "has disabled cancellation, then a cancellation request remains queued until "
3507 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3508 "its cancelability type determines when cancellation occurs."
3509 msgstr ""
3510 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3511 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3512 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3513 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3514 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3515 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3516
3517 #. type: Plain text
3518 #: build/C/man3/pthread_cancel.3:77
3519 msgid ""
3520 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3521 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3522 "Asynchronous cancelability means that the thread can be canceled at any time "
3523 "(usually immediately, but the system does not guarantee this).  Deferred "
3524 "cancelability means that cancellation will be delayed until the thread next "
3525 "calls a function that is a I<cancellation point>.  A list of functions that "
3526 "are or may be cancellation points is provided in B<pthreads>(7)."
3527 msgstr ""
3528 "スレッドのキャンセル種別 (cancelability type) は\n"
3529 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3530 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3531 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3532 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3533 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3534 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3535 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3536 "遅延される。取り消しポイントに設定されていたり設定\n"
3537 "したりできる関数のリストは B<pthreads>(7) に記載している。"
3538
3539 #. type: Plain text
3540 #: build/C/man3/pthread_cancel.3:81
3541 msgid ""
3542 "When a cancellation requested is acted on, the following steps occur for "
3543 "I<thread> (in this order):"
3544 msgstr ""
3545 "キャンセル要求が実行されると、\n"
3546 "I<thread> では以下のステップが (この順序で) 行われる。"
3547
3548 #. type: IP
3549 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3550 #, no-wrap
3551 msgid "1."
3552 msgstr "1."
3553
3554 #. type: Plain text
3555 #: build/C/man3/pthread_cancel.3:86
3556 msgid ""
3557 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3558 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3559 msgstr ""
3560 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3561 "取り出され (pop され)、呼び出される。\n"
3562 "(B<pthread_cleanup_push>(3) 参照)"
3563
3564 #. type: IP
3565 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3566 #, no-wrap
3567 msgid "2."
3568 msgstr "2."
3569
3570 #. type: Plain text
3571 #: build/C/man3/pthread_cancel.3:91
3572 msgid ""
3573 "Thread-specific data destructors are called, in an unspecified order.  (See "
3574 "B<pthread_key_create>(3).)"
3575 msgstr ""
3576 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3577 "呼び出し順序は規定されていない。\n"
3578 "(B<pthread_key_create>(3) 参照)"
3579
3580 #. type: IP
3581 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3582 #, no-wrap
3583 msgid "3."
3584 msgstr "3."
3585
3586 #. type: Plain text
3587 #: build/C/man3/pthread_cancel.3:95
3588 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3589 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3590
3591 #. type: Plain text
3592 #: build/C/man3/pthread_cancel.3:103
3593 msgid ""
3594 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3595 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3596 "caller whether the cancellation request was successfully queued."
3597 msgstr ""
3598 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3599 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3600 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3601
3602 #. type: Plain text
3603 #: build/C/man3/pthread_cancel.3:112
3604 msgid ""
3605 "After a canceled thread has terminated, a join with that thread using "
3606 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3607 "status.  (Joining with a thread is the only way to know that cancellation "
3608 "has completed.)"
3609 msgstr ""
3610 "キャンセルされたスレッドが終了された後に、\n"
3611 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3612 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3613 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3614
3615 #. type: Plain text
3616 #: build/C/man3/pthread_cancel.3:117
3617 msgid ""
3618 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3619 "error number."
3620 msgstr ""
3621 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3622 "エラーの場合、0 以外のエラー番号を返す。"
3623
3624 #. type: TP
3625 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3626 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3627 #: build/C/man3/pthread_setaffinity_np.3:114
3628 #: build/C/man3/pthread_setschedparam.3:114
3629 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3630 #, no-wrap
3631 msgid "B<ESRCH>"
3632 msgstr "B<ESRCH>"
3633
3634 #. type: Plain text
3635 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3636 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3637 #: build/C/man3/pthread_setaffinity_np.3:119
3638 #: build/C/man3/pthread_setschedparam.3:119
3639 #: build/C/man3/pthread_setschedprio.3:75
3640 msgid "No thread with the ID I<thread> could be found."
3641 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3642
3643 #. type: Plain text
3644 #: build/C/man3/pthread_cancel.3:135
3645 msgid ""
3646 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3647 "threading implementation, the first real-time signal (i.e., signal 32) is "
3648 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3649 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3650 msgstr ""
3651 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3652 "は、\n"
3653 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3654 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3655 "ム\n"
3656 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3657
3658 #. type: Plain text
3659 #: build/C/man3/pthread_cancel.3:141
3660 msgid ""
3661 "The program below creates a thread and then cancels it.  The main thread "
3662 "joins with the canceled thread to check that its exit status was "
3663 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3664 "run the program:"
3665 msgstr ""
3666 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3667 "る。\n"
3668 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3669 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3670 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3671
3672 #. type: Plain text
3673 #: build/C/man3/pthread_cancel.3:149
3674 #, no-wrap
3675 msgid ""
3676 "$ ./a.out\n"
3677 "thread_func(): started; cancellation disabled\n"
3678 "main(): sending cancellation request\n"
3679 "thread_func(): about to enable cancellation\n"
3680 "main(): thread was canceled\n"
3681 msgstr ""
3682 "$ ./a.out\n"
3683 "thread_func(): started; cancellation disabled\n"
3684 "main(): sending cancellation request\n"
3685 "thread_func(): about to enable cancellation\n"
3686 "main(): thread was canceled\n"
3687
3688 #. type: Plain text
3689 #: build/C/man3/pthread_cancel.3:159
3690 #, no-wrap
3691 msgid ""
3692 "#include E<lt>pthread.hE<gt>\n"
3693 "#include E<lt>stdio.hE<gt>\n"
3694 "#include E<lt>errno.hE<gt>\n"
3695 "#include E<lt>stdlib.hE<gt>\n"
3696 "#include E<lt>unistd.hE<gt>\n"
3697 msgstr ""
3698 "#include E<lt>pthread.hE<gt>\n"
3699 "#include E<lt>stdio.hE<gt>\n"
3700 "#include E<lt>errno.hE<gt>\n"
3701 "#include E<lt>stdlib.hE<gt>\n"
3702 "#include E<lt>unistd.hE<gt>\n"
3703
3704 #. type: Plain text
3705 #: build/C/man3/pthread_cancel.3:167
3706 #, no-wrap
3707 msgid ""
3708 "static void *\n"
3709 "thread_func(void *ignored_argument)\n"
3710 "{\n"
3711 "    int s;\n"
3712 msgstr ""
3713 "static void *\n"
3714 "thread_func(void *ignored_argument)\n"
3715 "{\n"
3716 "    int s;\n"
3717
3718 #. type: Plain text
3719 #: build/C/man3/pthread_cancel.3:170
3720 #, no-wrap
3721 msgid ""
3722 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3723 "       immediately react to a cancellation request */\n"
3724 msgstr ""
3725 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3726 "       immediately react to a cancellation request */\n"
3727
3728 #. type: Plain text
3729 #: build/C/man3/pthread_cancel.3:174
3730 #, no-wrap
3731 msgid ""
3732 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3733 "    if (s != 0)\n"
3734 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3735 msgstr ""
3736 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3737 "    if (s != 0)\n"
3738 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3739
3740 #. type: Plain text
3741 #: build/C/man3/pthread_cancel.3:178
3742 #, no-wrap
3743 msgid ""
3744 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3745 "    sleep(5);\n"
3746 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3747 msgstr ""
3748 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3749 "    sleep(5);\n"
3750 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3751
3752 #. type: Plain text
3753 #: build/C/man3/pthread_cancel.3:182
3754 #, no-wrap
3755 msgid ""
3756 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3757 "    if (s != 0)\n"
3758 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3759 msgstr ""
3760 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3761 "    if (s != 0)\n"
3762 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3763
3764 #. type: Plain text
3765 #: build/C/man3/pthread_cancel.3:184
3766 #, no-wrap
3767 msgid "    /* sleep() is a cancellation point */\n"
3768 msgstr "    /* sleep() is a cancellation point */\n"
3769
3770 #. type: Plain text
3771 #: build/C/man3/pthread_cancel.3:186
3772 #, no-wrap
3773 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3774 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3775
3776 #. type: Plain text
3777 #: build/C/man3/pthread_cancel.3:188
3778 #, no-wrap
3779 msgid "    /* Should never get here */\n"
3780 msgstr "    /* Should never get here */\n"
3781
3782 #. type: Plain text
3783 #: build/C/man3/pthread_cancel.3:192
3784 #, no-wrap
3785 msgid ""
3786 "    printf(\"thread_func(): not canceled!\\en\");\n"
3787 "    return NULL;\n"
3788 "}\n"
3789 msgstr ""
3790 "    printf(\"thread_func(): not canceled!\\en\");\n"
3791 "    return NULL;\n"
3792 "}\n"
3793
3794 #. type: Plain text
3795 #: build/C/man3/pthread_cancel.3:199
3796 #, no-wrap
3797 msgid ""
3798 "int\n"
3799 "main(void)\n"
3800 "{\n"
3801 "    pthread_t thr;\n"
3802 "    void *res;\n"
3803 "    int s;\n"
3804 msgstr ""
3805 "int\n"
3806 "main(void)\n"
3807 "{\n"
3808 "    pthread_t thr;\n"
3809 "    void *res;\n"
3810 "    int s;\n"
3811
3812 #. type: Plain text
3813 #: build/C/man3/pthread_cancel.3:201
3814 #, no-wrap
3815 msgid "    /* Start a thread and then send it a cancellation request */\n"
3816 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3817
3818 #. type: Plain text
3819 #: build/C/man3/pthread_cancel.3:205
3820 #, no-wrap
3821 msgid ""
3822 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3823 "    if (s != 0)\n"
3824 "        handle_error_en(s, \"pthread_create\");\n"
3825 msgstr ""
3826 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3827 "    if (s != 0)\n"
3828 "        handle_error_en(s, \"pthread_create\");\n"
3829
3830 #. type: Plain text
3831 #: build/C/man3/pthread_cancel.3:207
3832 #, no-wrap
3833 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3834 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3835
3836 #. type: Plain text
3837 #: build/C/man3/pthread_cancel.3:212
3838 #, no-wrap
3839 msgid ""
3840 "    printf(\"main(): sending cancellation request\\en\");\n"
3841 "    s = pthread_cancel(thr);\n"
3842 "    if (s != 0)\n"
3843 "        handle_error_en(s, \"pthread_cancel\");\n"
3844 msgstr ""
3845 "    printf(\"main(): sending cancellation request\\en\");\n"
3846 "    s = pthread_cancel(thr);\n"
3847 "    if (s != 0)\n"
3848 "        handle_error_en(s, \"pthread_cancel\");\n"
3849
3850 #. type: Plain text
3851 #: build/C/man3/pthread_cancel.3:214
3852 #, no-wrap
3853 msgid "    /* Join with thread to see what its exit status was */\n"
3854 msgstr "    /* Join with thread to see what its exit status was */\n"
3855
3856 #. type: Plain text
3857 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
3858 #, no-wrap
3859 msgid ""
3860 "    s = pthread_join(thr, &res);\n"
3861 "    if (s != 0)\n"
3862 "        handle_error_en(s, \"pthread_join\");\n"
3863 msgstr ""
3864 "    s = pthread_join(thr, &res);\n"
3865 "    if (s != 0)\n"
3866 "        handle_error_en(s, \"pthread_join\");\n"
3867
3868 #. type: Plain text
3869 #: build/C/man3/pthread_cancel.3:225
3870 #, no-wrap
3871 msgid ""
3872 "    if (res == PTHREAD_CANCELED)\n"
3873 "        printf(\"main(): thread was canceled\\en\");\n"
3874 "    else\n"
3875 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3876 "    exit(EXIT_SUCCESS);\n"
3877 "}\n"
3878 msgstr ""
3879 "    if (res == PTHREAD_CANCELED)\n"
3880 "        printf(\"main(): thread was canceled\\en\");\n"
3881 "    else\n"
3882 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3883 "    exit(EXIT_SUCCESS);\n"
3884 "}\n"
3885
3886 #. type: Plain text
3887 #: build/C/man3/pthread_cancel.3:238
3888 msgid ""
3889 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3890 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3891 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3892 msgstr ""
3893 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3894 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3895 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3896
3897 #. type: TH
3898 #: build/C/man3/pthread_cleanup_push.3:26
3899 #, no-wrap
3900 msgid "PTHREAD_CLEANUP_PUSH"
3901 msgstr "PTHREAD_CLEANUP_PUSH"
3902
3903 #. type: TH
3904 #: build/C/man3/pthread_cleanup_push.3:26
3905 #: build/C/man3/pthread_setcancelstate.3:26
3906 #, no-wrap
3907 msgid "2008-11-24"
3908 msgstr "2008-11-24"
3909
3910 #. type: Plain text
3911 #: build/C/man3/pthread_cleanup_push.3:30
3912 msgid ""
3913 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3914 "clean-up handlers"
3915 msgstr ""
3916 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3917 "キャンセルクリーンアップハンドラの push/pop を行う"
3918
3919 #. type: Plain text
3920 #: build/C/man3/pthread_cleanup_push.3:37
3921 #, no-wrap
3922 msgid ""
3923 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3924 "B<                          void *>I<arg>B<);>\n"
3925 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3926 msgstr ""
3927 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3928 "B<                          void *>I<arg>B<);>\n"
3929 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3930
3931 #. type: Plain text
3932 #: build/C/man3/pthread_cleanup_push.3:48
3933 msgid ""
3934 "These functions manipulate the calling thread's stack of thread-cancellation "
3935 "clean-up handlers.  A clean-up handler is a function that is automatically "
3936 "executed when a thread is canceled (or in various other circumstances "
3937 "described below); it might, for example, unlock a mutex so that it becomes "
3938 "available to other threads in the process."
3939 msgstr ""
3940 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3941 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3942 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3943 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3944 "他のスレッドが利用できるようにする関数などが考えられる。"
3945
3946 #. type: Plain text
3947 #: build/C/man3/pthread_cleanup_push.3:59
3948 msgid ""
3949 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3950 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3951 "be given I<arg> as its argument."
3952 msgstr ""
3953 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3954 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3955 "起動される際には、 I<arg> が関数の引き数と渡される。"
3956
3957 #. type: Plain text
3958 #: build/C/man3/pthread_cleanup_push.3:66
3959 msgid ""
3960 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3961 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3962 "nonzero."
3963 msgstr ""
3964 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3965 "スタックの一番上のルーチンを削除する。\n"
3966 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3967
3968 #. type: Plain text
3969 #: build/C/man3/pthread_cleanup_push.3:69
3970 msgid ""
3971 "A cancellation clean-up handler is popped from the stack and executed in the "
3972 "following circumstances:"
3973 msgstr ""
3974 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3975 "スタックから取り出され実行される。"
3976
3977 #. type: Plain text
3978 #: build/C/man3/pthread_cleanup_push.3:73
3979 msgid ""
3980 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3981 "and executed in the reverse of the order in which they were pushed onto the "
3982 "stack."
3983 msgstr ""
3984 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3985 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3986 "実行は、スタックに登録されたのと逆の順序で行われる。"
3987
3988 #. type: Plain text
3989 #: build/C/man3/pthread_cleanup_push.3:83
3990 msgid ""
3991 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
3992 "handlers are executed as described in the preceding point.  (Clean-up "
3993 "handlers are I<not> called if the thread terminates by performing a "
3994 "I<return> from the thread start function.)"
3995 msgstr ""
3996 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
3997 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
3998 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
3999 "は、クリーンアップハンドラはI<呼び出されない>。)"
4000
4001 #. type: Plain text
4002 #: build/C/man3/pthread_cleanup_push.3:89
4003 msgid ""
4004 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
4005 "argument, the top-most clean-up handler is popped and executed."
4006 msgstr ""
4007 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
4008 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
4009 "実行される。"
4010
4011 #. type: Plain text
4012 #: build/C/man3/pthread_cleanup_push.3:101
4013 msgid ""
4014 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4015 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4016 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4017 "calls to these functions are paired within the same function, and at the "
4018 "same lexical nesting level.  (In other words, a clean-up handler is "
4019 "established only during the execution of a specified section of code.)"
4020 msgstr ""
4021 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4022 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4023 "して実装することを許容している。\n"
4024 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4025 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4026 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4027 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4028
4029 #. type: Plain text
4030 #: build/C/man3/pthread_cleanup_push.3:121
4031 msgid ""
4032 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4033 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
4034 "()  without the matching call of the pair since the jump buffer was filled "
4035 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
4036 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
4037 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
4038 "(3))  inside the handler."
4039 msgstr ""
4040 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4041 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4042 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4043 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4044 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4045 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4046 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4047 "結果になるかは不定である。"
4048
4049 #. type: Plain text
4050 #: build/C/man3/pthread_cleanup_push.3:123
4051 msgid "These functions do not return a value."
4052 msgstr "これらの関数は値を返さない。"
4053
4054 #.  SH VERSIONS
4055 #.  Available since glibc 2.0
4056 #. type: Plain text
4057 #: build/C/man3/pthread_cleanup_push.3:127
4058 msgid "There are no errors."
4059 msgstr "エラーはない。"
4060
4061 #. type: Plain text
4062 #: build/C/man3/pthread_cleanup_push.3:140
4063 msgid ""
4064 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4065 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4066 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4067 "declared within the scope of paired calls to these functions will be visible "
4068 "within only that scope."
4069 msgstr ""
4070 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4071 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4072 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4073 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4074 "ということを意味している。"
4075
4076 #.  The text was actually added in the 2004 TC2
4077 #. type: Plain text
4078 #: build/C/man3/pthread_cleanup_push.3:155
4079 msgid ""
4080 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4081 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4082 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4083 "avoid doing this."
4084 msgstr ""
4085 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4086 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4087 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4088 "不定であると書かれている。\n"
4089 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4090
4091 #. type: Plain text
4092 #: build/C/man3/pthread_cleanup_push.3:170
4093 msgid ""
4094 "The program below provides a simple example of the use of the functions "
4095 "described in this page.  The program creates a thread that executes a loop "
4096 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4097 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4098 "what command-line arguments are supplied, the main thread sends the other "
4099 "thread a cancellation request, or sets a global variable that causes the "
4100 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4101 msgstr ""
4102 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4103 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4104 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4105 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4106 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4107 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4108 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4109 "設定したりする。"
4110
4111 #. type: Plain text
4112 #: build/C/man3/pthread_cleanup_push.3:173
4113 msgid ""
4114 "In the following shell session, the main thread sends a cancellation request "
4115 "to the other thread:"
4116 msgstr ""
4117 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4118 "キャンセル要求を送信する。"
4119
4120 #. type: Plain text
4121 #: build/C/man3/pthread_cleanup_push.3:183
4122 #, no-wrap
4123 msgid ""
4124 "$ B<./a.out>\n"
4125 "New thread started\n"
4126 "cnt = 0\n"
4127 "cnt = 1\n"
4128 "Canceling thread\n"
4129 "Called clean-up handler\n"
4130 "Thread was canceled; cnt = 0\n"
4131 msgstr ""
4132 "$ B<./a.out>\n"
4133 "New thread started\n"
4134 "cnt = 0\n"
4135 "cnt = 1\n"
4136 "Canceling thread\n"
4137 "Called clean-up handler\n"
4138 "Thread was canceled; cnt = 0\n"
4139
4140 #. type: Plain text
4141 #: build/C/man3/pthread_cleanup_push.3:191
4142 msgid ""
4143 "From the above, we see that the thread was canceled, and that the "
4144 "cancellation clean-up handler was called and it reset the value of the "
4145 "global variable I<cnt> to 0."
4146 msgstr ""
4147 "上記の実行例から、スレッドがキャンセルされ、\n"
4148 "キャンセルクリーンアップハンドラが呼び出され、\n"
4149 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4150
4151 #. type: Plain text
4152 #: build/C/man3/pthread_cleanup_push.3:194
4153 msgid ""
4154 "In the next run, the main program sets a global variable that causes other "
4155 "thread to terminate normally:"
4156 msgstr ""
4157 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4158 "もう一つのスレッドが正常終了するようにしている。"
4159
4160 #. type: Plain text
4161 #: build/C/man3/pthread_cleanup_push.3:202
4162 #, no-wrap
4163 msgid ""
4164 "$ B<./a.out x>\n"
4165 "New thread started\n"
4166 "cnt = 0\n"
4167 "cnt = 1\n"
4168 "Thread terminated normally; cnt = 2\n"
4169 msgstr ""
4170 "$ B<./a.out x>\n"
4171 "New thread started\n"
4172 "cnt = 0\n"
4173 "cnt = 1\n"
4174 "Thread terminated normally; cnt = 2\n"
4175
4176 #. type: Plain text
4177 #: build/C/man3/pthread_cleanup_push.3:210
4178 msgid ""
4179 "From the above, we see that the clean-up handler was not executed (because "
4180 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4181 msgstr ""
4182 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4183 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4184 "分かる。"
4185
4186 #. type: Plain text
4187 #: build/C/man3/pthread_cleanup_push.3:215
4188 msgid ""
4189 "In the next run, the main program sets a global variable that causes the "
4190 "other thread to terminate normally, and supplies a nonzero value for "
4191 "I<cleanup_pop_arg>:"
4192 msgstr ""
4193 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4194 "もう一つのスレッドが正常終了するようにし、さらに\n"
4195 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4196
4197 #. type: Plain text
4198 #: build/C/man3/pthread_cleanup_push.3:224
4199 #, no-wrap
4200 msgid ""
4201 "$ B<./a.out x 1>\n"
4202 "New thread started\n"
4203 "cnt = 0\n"
4204 "cnt = 1\n"
4205 "Called clean-up handler\n"
4206 "Thread terminated normally; cnt = 0\n"
4207 msgstr ""
4208 "$ B<./a.out x 1>\n"
4209 "New thread started\n"
4210 "cnt = 0\n"
4211 "cnt = 1\n"
4212 "Called clean-up handler\n"
4213 "Thread terminated normally; cnt = 0\n"
4214
4215 #. type: Plain text
4216 #: build/C/man3/pthread_cleanup_push.3:231
4217 msgid ""
4218 "In the above, we see that although the thread was not canceled, the clean-up "
4219 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4220 "()  was nonzero."
4221 msgstr ""
4222 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4223 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4224 "に 0 以外を渡したからである。"
4225
4226 #. type: Plain text
4227 #: build/C/man3/pthread_cleanup_push.3:240
4228 #, no-wrap
4229 msgid ""
4230 "#include E<lt>pthread.hE<gt>\n"
4231 "#include E<lt>sys/types.hE<gt>\n"
4232 "#include E<lt>stdio.hE<gt>\n"
4233 "#include E<lt>stdlib.hE<gt>\n"
4234 "#include E<lt>unistd.hE<gt>\n"
4235 "#include E<lt>errno.hE<gt>\n"
4236 msgstr ""
4237 "#include E<lt>pthread.hE<gt>\n"
4238 "#include E<lt>sys/types.hE<gt>\n"
4239 "#include E<lt>stdio.hE<gt>\n"
4240 "#include E<lt>stdlib.hE<gt>\n"
4241 "#include E<lt>unistd.hE<gt>\n"
4242 "#include E<lt>errno.hE<gt>\n"
4243
4244 #. type: Plain text
4245 #: build/C/man3/pthread_cleanup_push.3:247
4246 #, no-wrap
4247 msgid ""
4248 "static int done = 0;\n"
4249 "static int cleanup_pop_arg = 0;\n"
4250 "static int cnt = 0;\n"
4251 msgstr ""
4252 "static int done = 0;\n"
4253 "static int cleanup_pop_arg = 0;\n"
4254 "static int cnt = 0;\n"
4255
4256 #. type: Plain text
4257 #: build/C/man3/pthread_cleanup_push.3:254
4258 #, no-wrap
4259 msgid ""
4260 "static void\n"
4261 "cleanup_handler(void *arg)\n"
4262 "{\n"
4263 "    printf(\"Called clean-up handler\\en\");\n"
4264 "    cnt = 0;\n"
4265 "}\n"
4266 msgstr ""
4267 "static void\n"
4268 "cleanup_handler(void *arg)\n"
4269 "{\n"
4270 "    printf(\"Called clean-up handler\\en\");\n"
4271 "    cnt = 0;\n"
4272 "}\n"
4273
4274 #. type: Plain text
4275 #: build/C/man3/pthread_cleanup_push.3:259
4276 #, no-wrap
4277 msgid ""
4278 "static void *\n"
4279 "thread_start(void *arg)\n"
4280 "{\n"
4281 "    time_t start, curr;\n"
4282 msgstr ""
4283 "static void *\n"
4284 "thread_start(void *arg)\n"
4285 "{\n"
4286 "    time_t start, curr;\n"
4287
4288 #. type: Plain text
4289 #: build/C/man3/pthread_cleanup_push.3:261
4290 #, no-wrap
4291 msgid "    printf(\"New thread started\\en\");\n"
4292 msgstr "    printf(\"New thread started\\en\");\n"
4293
4294 #. type: Plain text
4295 #: build/C/man3/pthread_cleanup_push.3:263
4296 #, no-wrap
4297 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4298 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4299
4300 #. type: Plain text
4301 #: build/C/man3/pthread_cleanup_push.3:265
4302 #, no-wrap
4303 msgid "    curr = start = time(NULL);\n"
4304 msgstr "    curr = start = time(NULL);\n"
4305
4306 #. type: Plain text
4307 #: build/C/man3/pthread_cleanup_push.3:274
4308 #, no-wrap
4309 msgid ""
4310 "    while (!done) {\n"
4311 "        pthread_testcancel();           /* A cancellation point */\n"
4312 "        if (curr E<lt> time(NULL)) {\n"
4313 "            curr = time(NULL);\n"
4314 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4315 "            cnt++;\n"
4316 "        }\n"
4317 "    }\n"
4318 msgstr ""
4319 "    while (!done) {\n"
4320 "        pthread_testcancel();           /* A cancellation point */\n"
4321 "        if (curr E<lt> time(NULL)) {\n"
4322 "            curr = time(NULL);\n"
4323 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4324 "            cnt++;\n"
4325 "        }\n"
4326 "    }\n"
4327
4328 #. type: Plain text
4329 #: build/C/man3/pthread_cleanup_push.3:278
4330 #, no-wrap
4331 msgid ""
4332 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4333 "    return NULL;\n"
4334 "}\n"
4335 msgstr ""
4336 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4337 "    return NULL;\n"
4338 "}\n"
4339
4340 #. type: Plain text
4341 #: build/C/man3/pthread_cleanup_push.3:285
4342 #, no-wrap
4343 msgid ""
4344 "int\n"
4345 "main(int argc, char *argv[])\n"
4346 "{\n"
4347 "    pthread_t thr;\n"
4348 "    int s;\n"
4349 "    void *res;\n"
4350 msgstr ""
4351 "int\n"
4352 "main(int argc, char *argv[])\n"
4353 "{\n"
4354 "    pthread_t thr;\n"
4355 "    int s;\n"
4356 "    void *res;\n"
4357
4358 #. type: Plain text
4359 #: build/C/man3/pthread_cleanup_push.3:289
4360 #, no-wrap
4361 msgid ""
4362 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4363 "    if (s != 0)\n"
4364 "        handle_error_en(s, \"pthread_create\");\n"
4365 msgstr ""
4366 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4367 "    if (s != 0)\n"
4368 "        handle_error_en(s, \"pthread_create\");\n"
4369
4370 #. type: Plain text
4371 #: build/C/man3/pthread_cleanup_push.3:291
4372 #, no-wrap
4373 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4374 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4375
4376 #. type: Plain text
4377 #: build/C/man3/pthread_cleanup_push.3:296
4378 #, no-wrap
4379 msgid ""
4380 "    if (argc E<gt> 1) {\n"
4381 "        if (argc E<gt> 2)\n"
4382 "            cleanup_pop_arg = atoi(argv[2]);\n"
4383 "        done = 1;\n"
4384 msgstr ""
4385 "    if (argc E<gt> 1) {\n"
4386 "        if (argc E<gt> 2)\n"
4387 "            cleanup_pop_arg = atoi(argv[2]);\n"
4388 "        done = 1;\n"
4389
4390 #. type: Plain text
4391 #: build/C/man3/pthread_cleanup_push.3:303
4392 #, no-wrap
4393 msgid ""
4394 "    } else {\n"
4395 "        printf(\"Canceling thread\\en\");\n"
4396 "        s = pthread_cancel(thr);\n"
4397 "        if (s != 0)\n"
4398 "            handle_error_en(s, \"pthread_cancel\");\n"
4399 "    }\n"
4400 msgstr ""
4401 "    } else {\n"
4402 "        printf(\"Canceling thread\\en\");\n"
4403 "        s = pthread_cancel(thr);\n"
4404 "        if (s != 0)\n"
4405 "            handle_error_en(s, \"pthread_cancel\");\n"
4406 "    }\n"
4407
4408 #. type: Plain text
4409 #: build/C/man3/pthread_cleanup_push.3:314
4410 #, no-wrap
4411 msgid ""
4412 "    if (res == PTHREAD_CANCELED)\n"
4413 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4414 "    else\n"
4415 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4416 "    exit(EXIT_SUCCESS);\n"
4417 "}\n"
4418 msgstr ""
4419 "    if (res == PTHREAD_CANCELED)\n"
4420 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4421 "    else\n"
4422 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4423 "    exit(EXIT_SUCCESS);\n"
4424 "}\n"
4425
4426 #. type: Plain text
4427 #: build/C/man3/pthread_cleanup_push.3:321
4428 msgid ""
4429 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4430 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4431 msgstr ""
4432 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4433 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4434
4435 #. type: TH
4436 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4437 #, no-wrap
4438 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4439 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4440
4441 #. type: TH
4442 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4443 #, no-wrap
4444 msgid "2008-12-04"
4445 msgstr "2008-12-04"
4446
4447 #. type: Plain text
4448 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4449 msgid ""
4450 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4451 "thread cancellation clean-up handlers while saving cancelability type"
4452 msgstr ""
4453 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4454 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4455 "の push/pop を行う"
4456
4457 #. type: Plain text
4458 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4459 #, no-wrap
4460 msgid ""
4461 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4462 "B<                                   void *>I<arg>B<);>\n"
4463 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4464 msgstr ""
4465 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4466 "B<                                   void *>I<arg>B<);>\n"
4467 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4468
4469 #. type: Plain text
4470 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4471 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4472 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4473 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4474 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4475 #: build/C/man3/pthread_yield.3:37
4476 msgid "Compile and link with I<-pthread>."
4477 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4478
4479 #. type: Plain text
4480 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4481 msgid ""
4482 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4483 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4484 msgstr ""
4485 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4486 "だが、このページで説明する点が異なる。"
4487
4488 #. type: Plain text
4489 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4490 msgid ""
4491 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4492 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4493 "addition, it also saves the thread's current cancelability type, and sets "
4494 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4495 "this ensures that cancellation clean-up will occur even if the thread's "
4496 "cancelability type was \"asynchronous\" before the call."
4497 msgstr ""
4498 "B<pthread_cleanup_push>(3) と同様に、\n"
4499 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4500 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4501 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4502 "保存し、cancelability type は \"deferred\" に設定する\n"
4503 "(B<pthread_setcanceltype>(3) 参照)。\n"
4504 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4505 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4506 "が保証される。"
4507
4508 #. type: Plain text
4509 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4510 msgid ""
4511 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4512 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4513 "up handlers.  In addition, it restores the thread's cancelability type to "
4514 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4515 msgstr ""
4516 "B<pthread_cleanup_pop>(3) と同様に、\n"
4517 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4518 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4519 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4520 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4521
4522 #. type: Plain text
4523 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4524 msgid ""
4525 "The caller must ensure that calls to these functions are paired within the "
4526 "same function, and at the same lexical nesting level.  Other restrictions "
4527 "apply, as described in B<pthread_cleanup_push>(3)."
4528 msgstr ""
4529 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4530 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4531 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4532 "適用される。"
4533
4534 #. type: Plain text
4535 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4536 msgid "This sequence of calls:"
4537 msgstr "以下の一連の呼び出し"
4538
4539 #. type: Plain text
4540 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4541 #, no-wrap
4542 msgid ""
4543 "pthread_cleanup_push_defer_np(routine, arg);\n"
4544 "pthread_cleanup_pop_restore_np(execute);\n"
4545 msgstr ""
4546 "pthread_cleanup_push_defer_np(routine, arg);\n"
4547 "pthread_cleanup_pop_restore_np(execute);\n"
4548
4549 #. type: Plain text
4550 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4551 msgid "is equivalent to (but shorter and more efficient than):"
4552 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4553
4554 #. type: Plain text
4555 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4556 #, no-wrap
4557 msgid "int oldtype;\n"
4558 msgstr "int oldtype;\n"
4559
4560 #. type: Plain text
4561 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4562 #, no-wrap
4563 msgid ""
4564 "pthread_cleanup_push(routine, arg);\n"
4565 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4566 "\\&...\n"
4567 "pthread_setcanceltype(oldtype, NULL);\n"
4568 "pthread_cleanup_pop(execute);\n"
4569 msgstr ""
4570 "pthread_cleanup_push(routine, arg);\n"
4571 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4572 "\\&...\n"
4573 "pthread_setcanceltype(oldtype, NULL);\n"
4574 "pthread_cleanup_pop(execute);\n"
4575
4576 #. type: Plain text
4577 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4578 msgid ""
4579 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4580 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4581 msgstr ""
4582 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4583 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4584
4585 #. type: TH
4586 #: build/C/man3/pthread_create.3:26
4587 #, no-wrap
4588 msgid "PTHREAD_CREATE"
4589 msgstr "PTHREAD_CREATE"
4590
4591 #. type: TH
4592 #: build/C/man3/pthread_create.3:26
4593 #, no-wrap
4594 msgid "2012-08-03"
4595 msgstr "2012-08-03"
4596
4597 #. type: Plain text
4598 #: build/C/man3/pthread_create.3:29
4599 msgid "pthread_create - create a new thread"
4600 msgstr "pthread_create - 新しいスレッドを作成する"
4601
4602 #. type: Plain text
4603 #: build/C/man3/pthread_create.3:35
4604 #, no-wrap
4605 msgid ""
4606 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4607 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4608 msgstr ""
4609 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4610 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4611
4612 #. type: Plain text
4613 #: build/C/man3/pthread_create.3:47
4614 msgid ""
4615 "The B<pthread_create>()  function starts a new thread in the calling "
4616 "process.  The new thread starts execution by invoking I<start_routine>(); "
4617 "I<arg> is passed as the sole argument of I<start_routine>()."
4618 msgstr ""
4619 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4620 "る。\n"
4621 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4622 "I<start_routine>() は引き数を一つだけ取り、\n"
4623 "I<arg> が I<start_routine>() の引き数として渡される。"
4624
4625 #. type: Plain text
4626 #: build/C/man3/pthread_create.3:49
4627 msgid "The new thread terminates in one of the following ways:"
4628 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4629
4630 #. type: IP
4631 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4632 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4633 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4634 #: build/C/man3/pthread_getattr_np.3:58
4635 #, no-wrap
4636 msgid "*"
4637 msgstr "*"
4638
4639 #. type: Plain text
4640 #: build/C/man3/pthread_create.3:55
4641 msgid ""
4642 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4643 "available to another thread in the same process that calls B<pthread_join>"
4644 "(3)."
4645 msgstr ""
4646 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4647 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4648 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4649 "別のスレッドで参照できる。"
4650
4651 #. type: Plain text
4652 #: build/C/man3/pthread_create.3:63
4653 msgid ""
4654 "It returns from I<start_routine>().  This is equivalent to calling "
4655 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4656 msgstr ""
4657 "スレッドが I<start_routine>() から返る。これは、\n"
4658 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4659
4660 #. type: Plain text
4661 #: build/C/man3/pthread_create.3:66
4662 msgid "It is canceled (see B<pthread_cancel>(3))."
4663 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4664
4665 #. type: Plain text
4666 #: build/C/man3/pthread_create.3:72
4667 msgid ""
4668 "Any of the threads in the process calls B<exit>(3), or the main thread "
4669 "performs a return from I<main>().  This causes the termination of all "
4670 "threads in the process."
4671 msgstr ""
4672 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4673 "メインスレッドで I<main>() 内で return が実行される。\n"
4674 "この場合は、プロセス内の全てのスレッドが終了される。"
4675
4676 #. type: Plain text
4677 #: build/C/man3/pthread_create.3:86
4678 msgid ""
4679 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4680 "are used at thread creation time to determine attributes for the new thread; "
4681 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4682 "functions.  If I<attr> is NULL, then the thread is created with default "
4683 "attributes."
4684 msgstr ""
4685 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4686 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4687 "新しいスレッドの属性が決定される。\n"
4688 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4689 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4690
4691 #. type: Plain text
4692 #: build/C/man3/pthread_create.3:93
4693 msgid ""
4694 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4695 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4696 "used to refer to the thread in subsequent calls to other pthreads functions."
4697 msgstr ""
4698 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4699 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4700 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4701
4702 #. type: Plain text
4703 #: build/C/man3/pthread_create.3:101
4704 msgid ""
4705 "The new thread inherits a copy of the creating thread's signal mask "
4706 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4707 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4708 "thread's alternate signal stack (B<sigaltstack>(2))."
4709 msgstr ""
4710 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4711 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4712 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4713 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4714 "(B<sigaltstack>(2)) を継承しない。"
4715
4716 #. type: Plain text
4717 #: build/C/man3/pthread_create.3:104
4718 msgid ""
4719 "The new thread inherits the calling thread's floating-point environment "
4720 "(B<fenv>(3))."
4721 msgstr ""
4722 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4723 "を継承する。"
4724
4725 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4726 #. type: Plain text
4727 #: build/C/man3/pthread_create.3:109
4728 msgid ""
4729 "The initial value of the new thread's CPU-time clock is 0 (see "
4730 "B<pthread_getcpuclockid>(3))."
4731 msgstr ""
4732 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4733 "(B<pthread_getcpuclockid>(3) 参照)。"
4734
4735 #. type: SS
4736 #: build/C/man3/pthread_create.3:109
4737 #, no-wrap
4738 msgid "Linux-specific details"
4739 msgstr "Linux 固有の詳細"
4740
4741 #. type: Plain text
4742 #: build/C/man3/pthread_create.3:115
4743 msgid ""
4744 "The new thread inherits copies of the calling thread's capability sets (see "
4745 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4746 msgstr ""
4747 "新しいスレッドは、呼び出したスレッドの\n"
4748 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4749 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4750 "コピーをを継承しない。"
4751
4752 #. type: Plain text
4753 #: build/C/man3/pthread_create.3:122
4754 msgid ""
4755 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4756 "number, and the contents of I<*thread> are undefined."
4757 msgstr ""
4758 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4759 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4760
4761 #. type: TP
4762 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4763 #, no-wrap
4764 msgid "B<EAGAIN>"
4765 msgstr "B<EAGAIN>"
4766
4767 #. type: Plain text
4768 #: build/C/man3/pthread_create.3:137
4769 msgid ""
4770 "Insufficient resources to create another thread, or a system-imposed limit "
4771 "on the number of threads was encountered.  The latter case may occur in two "
4772 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4773 "which limits the number of process for a real user ID, was reached; or the "
4774 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4775 "threads-max>, was reached."
4776 msgstr ""
4777 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4778 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4779 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4780 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4781 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4782 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4783
4784 #. type: Plain text
4785 #: build/C/man3/pthread_create.3:141
4786 msgid "Invalid settings in I<attr>."
4787 msgstr "I<attr> で指定された設定が不正である。"
4788
4789 #. type: TP
4790 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4791 #: build/C/man3/pthread_setschedprio.3:66
4792 #, no-wrap
4793 msgid "B<EPERM>"
4794 msgstr "B<EPERM>"
4795
4796 #. type: Plain text
4797 #: build/C/man3/pthread_create.3:146
4798 msgid ""
4799 "No permission to set the scheduling policy and parameters specified in "
4800 "I<attr>."
4801 msgstr ""
4802 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4803 "設定する許可がない。"
4804
4805 #. type: Plain text
4806 #: build/C/man3/pthread_create.3:160
4807 msgid ""
4808 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4809 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4810 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4811 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4812 msgstr ""
4813 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4814 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4815 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4816 "B<pthread_create>() の呼び出し後に、\n"
4817 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4818 "次に実行されるかは決まっていない。"
4819
4820 #. type: Plain text
4821 #: build/C/man3/pthread_create.3:180
4822 msgid ""
4823 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4824 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4825 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4826 "has been joined are the last of its resources released back to the system.  "
4827 "When a detached thread terminates, its resources are automatically released "
4828 "back to the system: it is not possible to join with the thread in order to "
4829 "obtain its exit status.  Making a thread detached is useful for some types "
4830 "of daemon threads whose exit status the application does not need to care "
4831 "about.  By default, a new thread is created in a joinable state, unless "
4832 "I<attr> was set to create the thread in a detached state (using "
4833 "B<pthread_attr_setdetachstate>(3))."
4834 msgstr ""
4835 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4836 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4837 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4838 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4839 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4840 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4841 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4842 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4843 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4844 "デーモン (daemon) スレッドでは有用である。\n"
4845 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4846 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4847 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4848 "作成される。"
4849
4850 #.  FIXME . Perhaps some of the following detail should be in
4851 #.  a future pthread_attr_setstacksize(3) page.
4852 #. type: Plain text
4853 #: build/C/man3/pthread_create.3:196
4854 msgid ""
4855 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4856 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4857 "resource limit I<at the time the program started> has any value other than "
4858 "\"unlimited\", then it determines the default stack size of new threads.  "
4859 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4860 "explicitly set in the I<attr> argument used to create a thread, in order to "
4861 "obtain a stack size other than the default."
4862 msgstr ""
4863 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4864 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4865 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4866 "フォルトのスタックサイズとなる。\n"
4867 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4868 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4869 "デフォルト値以外のスタックサイズを得ることができる。"
4870
4871 #. type: Plain text
4872 #: build/C/man3/pthread_create.3:202
4873 msgid ""
4874 "In the obsolete LinuxThreads implementation, each of the threads in a "
4875 "process has a different process ID.  This is in violation of the POSIX "
4876 "threads specification, and is the source of many other nonconformances to "
4877 "the standard; see B<pthreads>(7)."
4878 msgstr ""
4879 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4880 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4881 "他の多くの標準非準拠の点の原因になっている。\n"
4882 "B<pthreads>(7) を参照のこと。"
4883
4884 #. type: Plain text
4885 #: build/C/man3/pthread_create.3:206
4886 msgid ""
4887 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4888 "number of other functions in the pthreads API."
4889 msgstr ""
4890 "以下のプログラムは、 B<pthread_create>() や\n"
4891 "pthreads API の他のいろいろな関数の使用例を示している。"
4892
4893 #. type: Plain text
4894 #: build/C/man3/pthread_create.3:211
4895 msgid ""
4896 "In the following run, on a system providing the NPTL threading "
4897 "implementation, the stack size defaults to the value given by the \"stack "
4898 "size\" resource limit:"
4899 msgstr ""
4900 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4901 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4902 "になる。"
4903
4904 #. type: Plain text
4905 #: build/C/man3/pthread_create.3:223
4906 #, no-wrap
4907 msgid ""
4908 "$B< ulimit -s>\n"
4909 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4910 "$B< ./a.out hola salut servus>\n"
4911 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4912 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4913 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4914 "Joined with thread 1; returned value was HOLA\n"
4915 "Joined with thread 2; returned value was SALUT\n"
4916 "Joined with thread 3; returned value was SERVUS\n"
4917 msgstr ""
4918 "$B< ulimit -s>\n"
4919 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4920 "$B< ./a.out hola salut servus>\n"
4921 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4922 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4923 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4924 "Joined with thread 1; returned value was HOLA\n"
4925 "Joined with thread 2; returned value was SALUT\n"
4926 "Joined with thread 3; returned value was SERVUS\n"
4927
4928 #. type: Plain text
4929 #: build/C/man3/pthread_create.3:229
4930 msgid ""
4931 "In the next run, the program explicitly sets a stack size of 1MB (using "
4932 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4933 msgstr ""
4934 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4935 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4936 "明示的に設定している。"
4937
4938 #. type: Plain text
4939 #: build/C/man3/pthread_create.3:239
4940 #, no-wrap
4941 msgid ""
4942 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4943 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4944 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4945 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4946 "Joined with thread 1; returned value was HOLA\n"
4947 "Joined with thread 2; returned value was SALUT\n"
4948 "Joined with thread 3; returned value was SERVUS\n"
4949 msgstr ""
4950 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4951 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4952 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4953 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4954 "Joined with thread 1; returned value was HOLA\n"
4955 "Joined with thread 2; returned value was SALUT\n"
4956 "Joined with thread 3; returned value was SERVUS\n"
4957
4958 #. type: Plain text
4959 #: build/C/man3/pthread_create.3:251
4960 #, no-wrap
4961 msgid ""
4962 "#include E<lt>pthread.hE<gt>\n"
4963 "#include E<lt>string.hE<gt>\n"
4964 "#include E<lt>stdio.hE<gt>\n"
4965 "#include E<lt>stdlib.hE<gt>\n"
4966 "#include E<lt>unistd.hE<gt>\n"
4967 "#include E<lt>errno.hE<gt>\n"
4968 "#include E<lt>ctype.hE<gt>\n"
4969 msgstr ""
4970 "#include E<lt>pthread.hE<gt>\n"
4971 "#include E<lt>string.hE<gt>\n"
4972 "#include E<lt>stdio.hE<gt>\n"
4973 "#include E<lt>stdlib.hE<gt>\n"
4974 "#include E<lt>unistd.hE<gt>\n"
4975 "#include E<lt>errno.hE<gt>\n"
4976 "#include E<lt>ctype.hE<gt>\n"
4977
4978 #. type: Plain text
4979 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:111
4980 #, no-wrap
4981 msgid ""
4982 "#define handle_error(msg) \\e\n"
4983 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4984 msgstr ""
4985 "#define handle_error(msg) \\e\n"
4986 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4987
4988 #. type: Plain text
4989 #: build/C/man3/pthread_create.3:263
4990 #, no-wrap
4991 msgid ""
4992 "struct thread_info {    /* Used as argument to thread_start() */\n"
4993 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4994 "    int       thread_num;       /* Application-defined thread # */\n"
4995 "    char     *argv_string;      /* From command-line argument */\n"
4996 "};\n"
4997 msgstr ""
4998 "struct thread_info {    /* Used as argument to thread_start() */\n"
4999 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5000 "    int       thread_num;       /* Application-defined thread # */\n"
5001 "    char     *argv_string;      /* From command-line argument */\n"
5002 "};\n"
5003
5004 #. type: Plain text
5005 #: build/C/man3/pthread_create.3:266
5006 #, no-wrap
5007 msgid ""
5008 "/* Thread start function: display address near top of our stack,\n"
5009 "   and return upper-cased copy of argv_string */\n"
5010 msgstr ""
5011 "/* Thread start function: display address near top of our stack,\n"
5012 "   and return upper-cased copy of argv_string */\n"
5013
5014 #. type: Plain text
5015 #: build/C/man3/pthread_create.3:272
5016 #, no-wrap
5017 msgid ""
5018 "static void *\n"
5019 "thread_start(void *arg)\n"
5020 "{\n"
5021 "    struct thread_info *tinfo = arg;\n"
5022 "    char *uargv, *p;\n"
5023 msgstr ""
5024 "static void *\n"
5025 "thread_start(void *arg)\n"
5026 "{\n"
5027 "    struct thread_info *tinfo = arg;\n"
5028 "    char *uargv, *p;\n"
5029
5030 #. type: Plain text
5031 #: build/C/man3/pthread_create.3:275
5032 #, no-wrap
5033 msgid ""
5034 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5035 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5036 msgstr ""
5037 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5038 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5039
5040 #. type: Plain text
5041 #: build/C/man3/pthread_create.3:279
5042 #, no-wrap
5043 msgid ""
5044 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5045 "    if (uargv == NULL)\n"
5046 "        handle_error(\"strdup\");\n"
5047 msgstr ""
5048 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5049 "    if (uargv == NULL)\n"
5050 "        handle_error(\"strdup\");\n"
5051
5052 #. type: Plain text
5053 #: build/C/man3/pthread_create.3:282
5054 #, no-wrap
5055 msgid ""
5056 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5057 "        *p = toupper(*p);\n"
5058 msgstr ""
5059 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5060 "        *p = toupper(*p);\n"
5061
5062 #. type: Plain text
5063 #: build/C/man3/pthread_create.3:285
5064 #, no-wrap
5065 msgid ""
5066 "    return uargv;\n"
5067 "}\n"
5068 msgstr ""
5069 "    return uargv;\n"
5070 "}\n"
5071
5072 #. type: Plain text
5073 #: build/C/man3/pthread_create.3:294
5074 #, no-wrap
5075 msgid ""
5076 "int\n"
5077 "main(int argc, char *argv[])\n"
5078 "{\n"
5079 "    int s, tnum, opt, num_threads;\n"
5080 "    struct thread_info *tinfo;\n"
5081 "    pthread_attr_t attr;\n"
5082 "    int stack_size;\n"
5083 "    void *res;\n"
5084 msgstr ""
5085 "int\n"
5086 "main(int argc, char *argv[])\n"
5087 "{\n"
5088 "    int s, tnum, opt, num_threads;\n"
5089 "    struct thread_info *tinfo;\n"
5090 "    pthread_attr_t attr;\n"
5091 "    int stack_size;\n"
5092 "    void *res;\n"
5093
5094 #. type: Plain text
5095 #: build/C/man3/pthread_create.3:296
5096 #, no-wrap
5097 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5098 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5099
5100 #. type: Plain text
5101 #: build/C/man3/pthread_create.3:303
5102 #, no-wrap
5103 msgid ""
5104 "    stack_size = -1;\n"
5105 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5106 "        switch (opt) {\n"
5107 "        case \\(aqs\\(aq:\n"
5108 "            stack_size = strtoul(optarg, NULL, 0);\n"
5109 "            break;\n"
5110 msgstr ""
5111 "    stack_size = -1;\n"
5112 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5113 "        switch (opt) {\n"
5114 "        case \\(aqs\\(aq:\n"
5115 "            stack_size = strtoul(optarg, NULL, 0);\n"
5116 "            break;\n"
5117
5118 #. type: Plain text
5119 #: build/C/man3/pthread_create.3:310
5120 #, no-wrap
5121 msgid ""
5122 "        default:\n"
5123 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5124 "                    argv[0]);\n"
5125 "            exit(EXIT_FAILURE);\n"
5126 "        }\n"
5127 "    }\n"
5128 msgstr ""
5129 "        default:\n"
5130 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5131 "                    argv[0]);\n"
5132 "            exit(EXIT_FAILURE);\n"
5133 "        }\n"
5134 "    }\n"
5135
5136 #. type: Plain text
5137 #: build/C/man3/pthread_create.3:312
5138 #, no-wrap
5139 msgid "    num_threads = argc - optind;\n"
5140 msgstr "    num_threads = argc - optind;\n"
5141
5142 #. type: Plain text
5143 #: build/C/man3/pthread_create.3:314
5144 #, no-wrap
5145 msgid "    /* Initialize thread creation attributes */\n"
5146 msgstr "    /* Initialize thread creation attributes */\n"
5147
5148 #. type: Plain text
5149 #: build/C/man3/pthread_create.3:318
5150 #, no-wrap
5151 msgid ""
5152 "    s = pthread_attr_init(&attr);\n"
5153 "    if (s != 0)\n"
5154 "        handle_error_en(s, \"pthread_attr_init\");\n"
5155 msgstr ""
5156 "    s = pthread_attr_init(&attr);\n"
5157 "    if (s != 0)\n"
5158 "        handle_error_en(s, \"pthread_attr_init\");\n"
5159
5160 #. type: Plain text
5161 #: build/C/man3/pthread_create.3:324
5162 #, no-wrap
5163 msgid ""
5164 "    if (stack_size E<gt> 0) {\n"
5165 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5166 "        if (s != 0)\n"
5167 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5168 "    }\n"
5169 msgstr ""
5170 "    if (stack_size E<gt> 0) {\n"
5171 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5172 "        if (s != 0)\n"
5173 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5174 "    }\n"
5175
5176 #. type: Plain text
5177 #: build/C/man3/pthread_create.3:326
5178 #, no-wrap
5179 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5180 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5181
5182 #. type: Plain text
5183 #: build/C/man3/pthread_create.3:330
5184 #, no-wrap
5185 msgid ""
5186 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5187 "    if (tinfo == NULL)\n"
5188 "        handle_error(\"calloc\");\n"
5189 msgstr ""
5190 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5191 "    if (tinfo == NULL)\n"
5192 "        handle_error(\"calloc\");\n"
5193
5194 #. type: Plain text
5195 #: build/C/man3/pthread_create.3:332
5196 #, no-wrap
5197 msgid "    /* Create one thread for each command-line argument */\n"
5198 msgstr "    /* Create one thread for each command-line argument */\n"
5199
5200 #. type: Plain text
5201 #: build/C/man3/pthread_create.3:336
5202 #, no-wrap
5203 msgid ""
5204 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5205 "        tinfo[tnum].thread_num = tnum + 1;\n"
5206 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5207 msgstr ""
5208 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5209 "        tinfo[tnum].thread_num = tnum + 1;\n"
5210 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5211
5212 #. type: Plain text
5213 #: build/C/man3/pthread_create.3:339
5214 #, no-wrap
5215 msgid ""
5216 "        /* The pthread_create() call stores the thread ID into\n"
5217 "           corresponding element of tinfo[] */\n"
5218 msgstr ""
5219 "        /* The pthread_create() call stores the thread ID into\n"
5220 "           corresponding element of tinfo[] */\n"
5221
5222 #. type: Plain text
5223 #: build/C/man3/pthread_create.3:345
5224 #, no-wrap
5225 msgid ""
5226 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5227 "                           &thread_start, &tinfo[tnum]);\n"
5228 "        if (s != 0)\n"
5229 "            handle_error_en(s, \"pthread_create\");\n"
5230 "    }\n"
5231 msgstr ""
5232 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5233 "                           &thread_start, &tinfo[tnum]);\n"
5234 "        if (s != 0)\n"
5235 "            handle_error_en(s, \"pthread_create\");\n"
5236 "    }\n"
5237
5238 #. type: Plain text
5239 #: build/C/man3/pthread_create.3:348
5240 #, no-wrap
5241 msgid ""
5242 "    /* Destroy the thread attributes object, since it is no\n"
5243 "       longer needed */\n"
5244 msgstr ""
5245 "    /* Destroy the thread attributes object, since it is no\n"
5246 "       longer needed */\n"
5247
5248 #. type: Plain text
5249 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5250 #, no-wrap
5251 msgid ""
5252 "    s = pthread_attr_destroy(&attr);\n"
5253 "    if (s != 0)\n"
5254 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5255 msgstr ""
5256 "    s = pthread_attr_destroy(&attr);\n"
5257 "    if (s != 0)\n"
5258 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5259
5260 #. type: Plain text
5261 #: build/C/man3/pthread_create.3:354
5262 #, no-wrap
5263 msgid "    /* Now join with each thread, and display its returned value */\n"
5264 msgstr "    /* Now join with each thread, and display its returned value */\n"
5265
5266 #. type: Plain text
5267 #: build/C/man3/pthread_create.3:359
5268 #, no-wrap
5269 msgid ""
5270 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5271 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5272 "        if (s != 0)\n"
5273 "            handle_error_en(s, \"pthread_join\");\n"
5274 msgstr ""
5275 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5276 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5277 "        if (s != 0)\n"
5278 "            handle_error_en(s, \"pthread_join\");\n"
5279
5280 #. type: Plain text
5281 #: build/C/man3/pthread_create.3:364
5282 #, no-wrap
5283 msgid ""
5284 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5285 "                tinfo[tnum].thread_num, (char *) res);\n"
5286 "        free(res);      /* Free memory allocated by thread */\n"
5287 "    }\n"
5288 msgstr ""
5289 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5290 "                tinfo[tnum].thread_num, (char *) res);\n"
5291 "        free(res);      /* Free memory allocated by thread */\n"
5292 "    }\n"
5293
5294 #. type: Plain text
5295 #: build/C/man3/pthread_create.3:368
5296 #, no-wrap
5297 msgid ""
5298 "    free(tinfo);\n"
5299 "    exit(EXIT_SUCCESS);\n"
5300 "}\n"
5301 msgstr ""
5302 "    free(tinfo);\n"
5303 "    exit(EXIT_SUCCESS);\n"
5304 "}\n"
5305
5306 #. type: Plain text
5307 #: build/C/man3/pthread_create.3:382
5308 msgid ""
5309 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5310 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5311 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5312 "(7)"
5313 msgstr ""
5314 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5315 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5316 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5317 "(7)"
5318
5319 #. type: TH
5320 #: build/C/man3/pthread_detach.3:26
5321 #, no-wrap
5322 msgid "PTHREAD_DETACH"
5323 msgstr "PTHREAD_DETACH"
5324
5325 #. type: TH
5326 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5327 #, no-wrap
5328 msgid "2008-11-27"
5329 msgstr "2008-11-27"
5330
5331 #. type: Plain text
5332 #: build/C/man3/pthread_detach.3:29
5333 msgid "pthread_detach - detach a thread"
5334 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5335
5336 #. type: Plain text
5337 #: build/C/man3/pthread_detach.3:34
5338 #, no-wrap
5339 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5340 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5341
5342 #. type: Plain text
5343 #: build/C/man3/pthread_detach.3:46
5344 msgid ""
5345 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5346 "as detached.  When a detached thread terminates, its resources are "
5347 "automatically released back to the system without the need for another "
5348 "thread to join with the terminated thread."
5349 msgstr ""
5350 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5351 "detached (切り離された状態) という印を付ける。\n"
5352 "detached 状態のスレッドが終了すると、\n"
5353 "別のスレッドが終了されたスレッドを join しなくても、\n"
5354 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5355
5356 #. type: Plain text
5357 #: build/C/man3/pthread_detach.3:49
5358 msgid ""
5359 "Attempting to detach an already detached thread results in unspecified "
5360 "behavior."
5361 msgstr ""
5362 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5363 "どのような結果となるかは規定されていない。"
5364
5365 #. type: Plain text
5366 #: build/C/man3/pthread_detach.3:54
5367 msgid ""
5368 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5369 "number."
5370 msgstr ""
5371 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5372 "エラーの場合、エラー番号を返す。"
5373
5374 #. type: Plain text
5375 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5376 msgid "I<thread> is not a joinable thread."
5377 msgstr "I<thread> が join 可能なスレッドではない。"
5378
5379 #. type: Plain text
5380 #: build/C/man3/pthread_detach.3:70
5381 msgid ""
5382 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5383 "or be made joinable again."
5384 msgstr ""
5385 "いったんスレッドを detached 状態にすると、\n"
5386 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5387 "もう一度 join 可能にしたりすることはできない。"
5388
5389 #. type: Plain text
5390 #: build/C/man3/pthread_detach.3:77
5391 msgid ""
5392 "A new thread can be created in a detached state using "
5393 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5394 "I<attr> argument of B<pthread_create>(3)."
5395 msgstr ""
5396 "B<pthread_attr_setdetachstate>(3) を使って\n"
5397 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5398 "新しいスレッドを detached 状態で作成することができる。"
5399
5400 #. type: Plain text
5401 #: build/C/man3/pthread_detach.3:84
5402 msgid ""
5403 "The detached attribute merely determines the behavior of the system when the "
5404 "thread terminates; it does not prevent the thread from being terminated if "
5405 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5406 "thread returns)."
5407 msgstr ""
5408 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5409 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5410 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5411 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5412
5413 #. type: Plain text
5414 #: build/C/man3/pthread_detach.3:93
5415 msgid ""
5416 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5417 "thread that an application creates, so that system resources for the thread "
5418 "can be released.  (But note that the resources of all threads are freed when "
5419 "the process terminates.)"
5420 msgstr ""
5421 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5422 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5423 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5424 "終了するときには、全てのスレッドのリソースが解放される)。"
5425
5426 #. type: Plain text
5427 #: build/C/man3/pthread_detach.3:95
5428 msgid "The following statement detaches the calling thread:"
5429 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5430
5431 #. type: Plain text
5432 #: build/C/man3/pthread_detach.3:97
5433 #, no-wrap
5434 msgid "    pthread_detach(pthread_self());\n"
5435 msgstr "    pthread_detach(pthread_self());\n"
5436
5437 #. type: Plain text
5438 #: build/C/man3/pthread_detach.3:104
5439 msgid ""
5440 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5441 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5442 msgstr ""
5443 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5444 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5445
5446 #. type: TH
5447 #: build/C/man3/pthread_equal.3:26
5448 #, no-wrap
5449 msgid "PTHREAD_EQUAL"
5450 msgstr "PTHREAD_EQUAL"
5451
5452 #. type: TH
5453 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5454 #, no-wrap
5455 msgid "2009-03-30"
5456 msgstr "2009-03-30"
5457
5458 #. type: Plain text
5459 #: build/C/man3/pthread_equal.3:29
5460 msgid "pthread_equal - compare thread IDs"
5461 msgstr "pthread_equal - スレッド ID を比較する"
5462
5463 #. type: Plain text
5464 #: build/C/man3/pthread_equal.3:34
5465 #, no-wrap
5466 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5467 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5468
5469 #. type: Plain text
5470 #: build/C/man3/pthread_equal.3:41
5471 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5472 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5473
5474 #. type: Plain text
5475 #: build/C/man3/pthread_equal.3:45
5476 msgid ""
5477 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5478 "value; otherwise, it returns 0."
5479 msgstr ""
5480 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5481 "そうでなければ 0 を返す。"
5482
5483 #.  SH VERSIONS
5484 #.  Available since glibc 2.0
5485 #. type: Plain text
5486 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5487 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5488 msgid "This function always succeeds."
5489 msgstr "この関数は常に成功する。"
5490
5491 #. type: Plain text
5492 #: build/C/man3/pthread_equal.3:56
5493 msgid ""
5494 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5495 "considered opaque: there is no portable way for applications to directly "
5496 "compare two I<pthread_t> values."
5497 msgstr ""
5498 "B<pthread_equal>() 関数が必要なのは、\n"
5499 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5500 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5501 "移植性を確保できる形で比較する方法はない。"
5502
5503 #. type: Plain text
5504 #: build/C/man3/pthread_equal.3:60
5505 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5506 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5507
5508 #. type: TH
5509 #: build/C/man3/pthread_exit.3:26
5510 #, no-wrap
5511 msgid "PTHREAD_EXIT"
5512 msgstr "PTHREAD_EXIT"
5513
5514 #. type: Plain text
5515 #: build/C/man3/pthread_exit.3:29
5516 msgid "pthread_exit - terminate calling thread"
5517 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5518
5519 #. type: Plain text
5520 #: build/C/man3/pthread_exit.3:34
5521 #, no-wrap
5522 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5523 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5524
5525 #. type: Plain text
5526 #: build/C/man3/pthread_exit.3:45
5527 msgid ""
5528 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5529 "value via I<retval> that (if the thread is joinable)  is available to "
5530 "another thread in the same process that calls B<pthread_join>(3)."
5531 msgstr ""
5532 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5533 "I<retval> 経由で値を返す。\n"
5534 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5535 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5536
5537 #. type: Plain text
5538 #: build/C/man3/pthread_exit.3:55
5539 msgid ""
5540 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5541 "not yet been popped, are popped (in the reverse of the order in which they "
5542 "were pushed)  and executed.  If the thread has any thread-specific data, "
5543 "then, after the clean-up handlers have been executed, the corresponding "
5544 "destructor functions are called, in an unspecified order."
5545 msgstr ""
5546 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5547 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5548 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5549 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5550 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5551 "は規定されていない)。"
5552
5553 #. type: Plain text
5554 #: build/C/man3/pthread_exit.3:62
5555 msgid ""
5556 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5557 "variables, semaphores, and file descriptors) are not released, and functions "
5558 "registered using B<atexit>(3)  are not called."
5559 msgstr ""
5560 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5561 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5562 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5563
5564 #. type: Plain text
5565 #: build/C/man3/pthread_exit.3:71
5566 msgid ""
5567 "After the last thread in a process terminates, the process terminates as by "
5568 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5569 "resources are released and functions registered using B<atexit>(3)  are "
5570 "called."
5571 msgstr ""
5572 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5573 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5574 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5575 "が呼び出される。"
5576
5577 #. type: Plain text
5578 #: build/C/man3/pthread_exit.3:73
5579 msgid "This function does not return to the caller."
5580 msgstr "この関数は呼び出し側には返らない。"
5581
5582 #. type: Plain text
5583 #: build/C/man3/pthread_exit.3:82
5584 msgid ""
5585 "Performing a return from the start function of any thread other than the "
5586 "main thread results in an implicit call to B<pthread_exit>(), using the "
5587 "function's return value as the thread's exit status."
5588 msgstr ""
5589 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5590 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5591 "関数の返り値がスレッドの終了ステータスとして使用される。"
5592
5593 #. type: Plain text
5594 #: build/C/man3/pthread_exit.3:88
5595 msgid ""
5596 "To allow other threads to continue execution, the main thread should "
5597 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5598 msgstr ""
5599 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5600 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5601
5602 #. type: Plain text
5603 #: build/C/man3/pthread_exit.3:93
5604 msgid ""
5605 "The value pointed to by I<retval> should not be located on the calling "
5606 "thread's stack, since the contents of that stack are undefined after the "
5607 "thread terminates."
5608 msgstr ""
5609 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5610 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5611 "である。"
5612
5613 #.  Linux 2.6.27
5614 #.  FIXME . review a later kernel to see if this gets fixed
5615 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5616 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5617 #. type: Plain text
5618 #: build/C/man3/pthread_exit.3:105
5619 msgid ""
5620 "Currently, there are limitations in the kernel implementation logic for "
5621 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5622 "This can manifest in problems such as a locked terminal if a stop signal is "
5623 "sent to a foreground process whose thread group leader has already called "
5624 "B<pthread_exit>()."
5625 msgstr ""
5626 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5627 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5628 "カーネル実装の論理には制限がある。\n"
5629 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5630 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5631 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5632 "場合がある。"
5633
5634 #. type: Plain text
5635 #: build/C/man3/pthread_exit.3:109
5636 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5637 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5638
5639 #. type: TH
5640 #: build/C/man3/pthread_getattr_np.3:26
5641 #, no-wrap
5642 msgid "PTHREAD_GETATTR_NP"
5643 msgstr "PTHREAD_GETATTR_NP"
5644
5645 #. type: Plain text
5646 #: build/C/man3/pthread_getattr_np.3:29
5647 msgid "pthread_getattr_np - get attributes of created thread"
5648 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5649
5650 #. type: Plain text
5651 #: build/C/man3/pthread_getattr_np.3:35
5652 #, no-wrap
5653 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5654 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5655
5656 #. type: Plain text
5657 #: build/C/man3/pthread_getattr_np.3:45
5658 msgid ""
5659 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5660 "object referred to by I<attr> so that it contains actual attribute values "
5661 "describing the running thread I<thread>."
5662 msgstr ""
5663 "B<pthread_getattr_np>() 関数は、\n"
5664 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5665 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5666 "格納して返す。"
5667
5668 #. type: Plain text
5669 #: build/C/man3/pthread_getattr_np.3:52
5670 msgid ""
5671 "The returned attribute values may differ from the corresponding attribute "
5672 "values passed in the I<attr> object that was used to create the thread using "
5673 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5674 msgstr ""
5675 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5676 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5677 "特に、以下の属性は異なる場合がある。"
5678
5679 #. type: Plain text
5680 #: build/C/man3/pthread_getattr_np.3:55
5681 msgid ""
5682 "the detach state, since a joinable thread may have detached itself after "
5683 "creation;"
5684 msgstr ""
5685 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5686 "切り離す (detach する) ことができるからである。"
5687
5688 #. type: Plain text
5689 #: build/C/man3/pthread_getattr_np.3:58
5690 msgid ""
5691 "the stack size, which the implementation may align to a suitable boundary."
5692 msgstr ""
5693 "スタックサイズ。\n"
5694 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5695
5696 #. type: Plain text
5697 #: build/C/man3/pthread_getattr_np.3:63
5698 msgid ""
5699 "and the guard size, which the implementation may round upward to a multiple "
5700 "of the page size, or ignore (i.e., treat as 0), if the application is "
5701 "allocating its own stack."
5702 msgstr ""
5703 "guard size.\n"
5704 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5705 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5706 "(0 として扱われる) ことがあるからである。"
5707
5708 #. type: Plain text
5709 #: build/C/man3/pthread_getattr_np.3:68
5710 msgid ""
5711 "Furthermore, if the stack address attribute was not set in the thread "
5712 "attributes object used to create the thread, then the returned thread "
5713 "attributes object will report the actual stack address that the "
5714 "implementation selected for the thread."
5715 msgstr ""
5716 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5717 "スタックアドレスが設定されていなかった場合、\n"
5718 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5719 "割り当てた実際のスタックアドレスが報告される。"
5720
5721 #. type: Plain text
5722 #: build/C/man3/pthread_getattr_np.3:73
5723 msgid ""
5724 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5725 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5726 msgstr ""
5727 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5728 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5729 "そのオブジェクトを破棄すべきである。"
5730
5731 #. type: Plain text
5732 #: build/C/man3/pthread_getattr_np.3:76
5733 #: build/C/man3/pthread_getcpuclockid.3:49
5734 msgid ""
5735 "On success, this function returns 0; on error, it returns a nonzero error "
5736 "number."
5737 msgstr ""
5738 "成功すると、この関数は 0 を返す。\n"
5739 "エラーの場合、 0 以外のエラー番号を返す。"
5740
5741 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5742 #. type: Plain text
5743 #: build/C/man3/pthread_getattr_np.3:81
5744 msgid "Insufficient memory."
5745 msgstr "メモリが十分になかった。"
5746
5747 #. type: Plain text
5748 #: build/C/man3/pthread_getattr_np.3:96
5749 msgid ""
5750 "In addition, if I<thread> refers to the main thread, then "
5751 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5752 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5753 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5754 msgstr ""
5755 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5756 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5757 "エラーで失敗する可能性がある。\n"
5758 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5759 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5760 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5761
5762 #. type: Plain text
5763 #: build/C/man3/pthread_getattr_np.3:98
5764 msgid "This function is available in glibc since version 2.2.3."
5765 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5766
5767 #. type: Plain text
5768 #: build/C/man3/pthread_getattr_np.3:101
5769 #: build/C/man3/pthread_kill_other_threads_np.3:50
5770 msgid ""
5771 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5772 "\" (nonportable) in the name."
5773 msgstr ""
5774 "この関数は非標準の GNU による拡張である。\n"
5775 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5776 "付いている。"
5777
5778 #. type: Plain text
5779 #: build/C/man3/pthread_getattr_np.3:111
5780 msgid ""
5781 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5782 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5783 "and display its guard size, stack address, and stack size attributes.  "
5784 "Command-line arguments can be used to set these attributes to values other "
5785 "than the default when creating the thread.  The shell sessions below "
5786 "demonstrate the use of the program."
5787 msgstr ""
5788 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5789 "このプログラムは、スレッドを作成し、それから\n"
5790 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5791 "スタックアドレス、スタックサイズを取得し表示する。\n"
5792 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5793 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5794 "下記のシェルのセッションはこのプログラムの使用例である。"
5795
5796 #. type: Plain text
5797 #: build/C/man3/pthread_getattr_np.3:114
5798 msgid ""
5799 "In the first run, on an x86-32 system, a thread is created using default "
5800 "attributes:"
5801 msgstr ""
5802 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5803 "(x86-32 システム上で実行)。"
5804
5805 #. type: Plain text
5806 #: build/C/man3/pthread_getattr_np.3:124
5807 #, no-wrap
5808 msgid ""
5809 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5810 "unlimited\n"
5811 "$B< ./a.out>\n"
5812 "Attributes of created thread:\n"
5813 "        Guard size          = 4096 bytes\n"
5814 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5815 "        Stack size          = 0x201000 (2101248) bytes\n"
5816 msgstr ""
5817 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5818 "unlimited\n"
5819 "$B< ./a.out>\n"
5820 "Attributes of created thread:\n"
5821 "        Guard size          = 4096 bytes\n"
5822 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5823 "        Stack size          = 0x201000 (2101248) bytes\n"
5824
5825 #. type: Plain text
5826 #: build/C/man3/pthread_getattr_np.3:130
5827 msgid ""
5828 "In the following run, we see that if a guard size is specified, it is "
5829 "rounded up to the next multiple of the system page size (4096 bytes on "
5830 "x86-32):"
5831 msgstr ""
5832 "次の実行例では、guard size が指定された場合、\n"
5833 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5834 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5835
5836 #. type: Plain text
5837 #: build/C/man3/pthread_getattr_np.3:138
5838 #, no-wrap
5839 msgid ""
5840 "$B< ./a.out -g 4097>\n"
5841 "Thread attributes object after initializations:\n"
5842 "        Guard size          = 4097 bytes\n"
5843 "        Stack address       = (nil)\n"
5844 "        Stack size          = 0x0 (0) bytes\n"
5845 msgstr ""
5846 "$B< ./a.out -g 4097>\n"
5847 "Thread attributes object after initializations:\n"
5848 "        Guard size          = 4097 bytes\n"
5849 "        Stack address       = (nil)\n"
5850 "        Stack size          = 0x0 (0) bytes\n"
5851
5852 #. type: Plain text
5853 #: build/C/man3/pthread_getattr_np.3:143
5854 #, no-wrap
5855 msgid ""
5856 "Attributes of created thread:\n"
5857 "        Guard size          = 8192 bytes\n"
5858 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5859 "        Stack size          = 0x201000 (2101248) bytes\n"
5860 msgstr ""
5861 "Attributes of created thread:\n"
5862 "        Guard size          = 8192 bytes\n"
5863 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5864 "        Stack size          = 0x201000 (2101248) bytes\n"
5865
5866 #. .in +4n
5867 #. .nf
5868 #. $ ./a.out \-s 0x8000
5869 #. Thread attributes object after initializations:
5870 #.         Guard size          = 4096 bytes
5871 #.         Stack address       = 0xffff8000 (EOS = (nil))
5872 #.         Stack size          = 0x8000 (32768) bytes
5873 #. Attributes of created thread:
5874 #.         Guard size          = 4096 bytes
5875 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5876 #.         Stack size          = 0x8000 (32768) bytes
5877 #. .fi
5878 #. .in
5879 #. type: Plain text
5880 #: build/C/man3/pthread_getattr_np.3:162
5881 msgid ""
5882 "In the last run, the program manually allocates a stack for the thread.  In "
5883 "this case, the guard size attribute is ignored."
5884 msgstr ""
5885 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5886 "この場合には、guard size 属性は無視される。"
5887
5888 #. type: Plain text
5889 #: build/C/man3/pthread_getattr_np.3:167
5890 #, no-wrap
5891 msgid ""
5892 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5893 "Allocated thread stack at 0x804d000\n"
5894 msgstr ""
5895 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5896 "Allocated thread stack at 0x804d000\n"
5897
5898 #. type: Plain text
5899 #: build/C/man3/pthread_getattr_np.3:172
5900 #, no-wrap
5901 msgid ""
5902 "Thread attributes object after initializations:\n"
5903 "        Guard size          = 4096 bytes\n"
5904 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5905 "        Stack size          = 0x8000 (32768) bytes\n"
5906 msgstr ""
5907 "Thread attributes object after initializations:\n"
5908 "        Guard size          = 4096 bytes\n"
5909 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5910 "        Stack size          = 0x8000 (32768) bytes\n"
5911
5912 #. type: Plain text
5913 #: build/C/man3/pthread_getattr_np.3:177
5914 #, no-wrap
5915 msgid ""
5916 "Attributes of created thread:\n"
5917 "        Guard size          = 0 bytes\n"
5918 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5919 "        Stack size          = 0x8000 (32768) bytes\n"
5920 msgstr ""
5921 "Attributes of created thread:\n"
5922 "        Guard size          = 0 bytes\n"
5923 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5924 "        Stack size          = 0x8000 (32768) bytes\n"
5925
5926 #. type: Plain text
5927 #: build/C/man3/pthread_getattr_np.3:198
5928 #, no-wrap
5929 msgid ""
5930 "static void\n"
5931 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5932 "{\n"
5933 "    int s;\n"
5934 "    size_t stack_size, guard_size;\n"
5935 "    void *stack_addr;\n"
5936 msgstr ""
5937 "static void\n"
5938 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5939 "{\n"
5940 "    int s;\n"
5941 "    size_t stack_size, guard_size;\n"
5942 "    void *stack_addr;\n"
5943
5944 #. type: Plain text
5945 #: build/C/man3/pthread_getattr_np.3:203
5946 #, no-wrap
5947 msgid ""
5948 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5949 "    if (s != 0)\n"
5950 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5951 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5952 msgstr ""
5953 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5954 "    if (s != 0)\n"
5955 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5956 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5957
5958 #. type: Plain text
5959 #: build/C/man3/pthread_getattr_np.3:214
5960 #, no-wrap
5961 msgid ""
5962 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5963 "    if (s != 0)\n"
5964 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5965 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5966 "    if (stack_size E<gt> 0)\n"
5967 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5968 "    printf(\"\\en\");\n"
5969 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5970 "            prefix, stack_size, stack_size);\n"
5971 "}\n"
5972 msgstr ""
5973 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5974 "    if (s != 0)\n"
5975 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5976 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5977 "    if (stack_size E<gt> 0)\n"
5978 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5979 "    printf(\"\\en\");\n"
5980 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5981 "            prefix, stack_size, stack_size);\n"
5982 "}\n"
5983
5984 #. type: Plain text
5985 #: build/C/man3/pthread_getattr_np.3:220
5986 #, no-wrap
5987 msgid ""
5988 "static void\n"
5989 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5990 "{\n"
5991 "    int s;\n"
5992 "    pthread_attr_t attr;\n"
5993 msgstr ""
5994 "static void\n"
5995 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5996 "{\n"
5997 "    int s;\n"
5998 "    pthread_attr_t attr;\n"
5999
6000 #. type: Plain text
6001 #: build/C/man3/pthread_getattr_np.3:224
6002 #, no-wrap
6003 msgid ""
6004 "    s = pthread_getattr_np(thread, &attr);\n"
6005 "    if (s != 0)\n"
6006 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6007 msgstr ""
6008 "    s = pthread_getattr_np(thread, &attr);\n"
6009 "    if (s != 0)\n"
6010 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6011
6012 #. type: Plain text
6013 #: build/C/man3/pthread_getattr_np.3:226
6014 #, no-wrap
6015 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6016 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6017
6018 #. type: Plain text
6019 #: build/C/man3/pthread_getattr_np.3:231
6020 #, no-wrap
6021 msgid ""
6022 "    s = pthread_attr_destroy(&attr);\n"
6023 "    if (s != 0)\n"
6024 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6025 "}\n"
6026 msgstr ""
6027 "    s = pthread_attr_destroy(&attr);\n"
6028 "    if (s != 0)\n"
6029 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6030 "}\n"
6031
6032 #. type: Plain text
6033 #: build/C/man3/pthread_getattr_np.3:237
6034 #, no-wrap
6035 msgid ""
6036 "static void *           /* Start function for thread we create */\n"
6037 "thread_start(void *arg)\n"
6038 "{\n"
6039 "    printf(\"Attributes of created thread:\\en\");\n"
6040 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6041 msgstr ""
6042 "static void *           /* Start function for thread we create */\n"
6043 "thread_start(void *arg)\n"
6044 "{\n"
6045 "    printf(\"Attributes of created thread:\\en\");\n"
6046 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6047
6048 #. type: Plain text
6049 #: build/C/man3/pthread_getattr_np.3:251
6050 #, no-wrap
6051 msgid ""
6052 "static void\n"
6053 "usage(char *pname, char *msg)\n"
6054 "{\n"
6055 "    if (msg != NULL)\n"
6056 "        fputs(msg, stderr);\n"
6057 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6058 "            \" [-g guard-size]\\en\", pname);\n"
6059 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6060 "    exit(EXIT_FAILURE);\n"
6061 "}\n"
6062 msgstr ""
6063 "static void\n"
6064 "usage(char *pname, char *msg)\n"
6065 "{\n"
6066 "    if (msg != NULL)\n"
6067 "        fputs(msg, stderr);\n"
6068 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6069 "            \" [-g guard-size]\\en\", pname);\n"
6070 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6071 "    exit(EXIT_FAILURE);\n"
6072 "}\n"
6073
6074 #. type: Plain text
6075 #: build/C/man3/pthread_getattr_np.3:264
6076 #, no-wrap
6077 msgid ""
6078 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6079 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6080 "                              pthread_attr_t *attrp)\n"
6081 "{\n"
6082 "    int s, opt, allocate_stack;\n"
6083 "    long stack_size, guard_size;\n"
6084 "            void *stack_addr;\n"
6085 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6086 "                                           a thread attributes object */\n"
6087 "    allocate_stack = 0;\n"
6088 "    stack_size = -1;\n"
6089 "    guard_size = -1;\n"
6090 msgstr ""
6091 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6092 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6093 "                              pthread_attr_t *attrp)\n"
6094 "{\n"
6095 "    int s, opt, allocate_stack;\n"
6096 "    long stack_size, guard_size;\n"
6097 "            void *stack_addr;\n"
6098 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6099 "                                           a thread attributes object */\n"
6100 "    allocate_stack = 0;\n"
6101 "    stack_size = -1;\n"
6102 "    guard_size = -1;\n"
6103
6104 #. type: Plain text
6105 #: build/C/man3/pthread_getattr_np.3:273
6106 #, no-wrap
6107 msgid ""
6108 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6109 "        switch (opt) {\n"
6110 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6111 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6112 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6113 "        default:    usage(argv[0], NULL);\n"
6114 "        }\n"
6115 "    }\n"
6116 msgstr ""
6117 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6118 "        switch (opt) {\n"
6119 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6120 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6121 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6122 "        default:    usage(argv[0], NULL);\n"
6123 "        }\n"
6124 "    }\n"
6125
6126 #. type: Plain text
6127 #: build/C/man3/pthread_getattr_np.3:276
6128 #, no-wrap
6129 msgid ""
6130 "    if (allocate_stack && stack_size == -1)\n"
6131 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6132 msgstr ""
6133 "    if (allocate_stack && stack_size == -1)\n"
6134 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6135
6136 #. type: Plain text
6137 #: build/C/man3/pthread_getattr_np.3:279
6138 #, no-wrap
6139 msgid ""
6140 "    if (argc E<gt> optind)\n"
6141 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6142 msgstr ""
6143 "    if (argc E<gt> optind)\n"
6144 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6145
6146 #. type: Plain text
6147 #: build/C/man3/pthread_getattr_np.3:282
6148 #, no-wrap
6149 msgid ""
6150 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6151 "        ret_attrp = attrp;\n"
6152 msgstr ""
6153 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6154 "        ret_attrp = attrp;\n"
6155
6156 #. type: Plain text
6157 #: build/C/man3/pthread_getattr_np.3:287
6158 #, no-wrap
6159 msgid ""
6160 "        s = pthread_attr_init(attrp);\n"
6161 "        if (s != 0)\n"
6162 "            handle_error_en(s, \"pthread_attr_init\");\n"
6163 "    }\n"
6164 msgstr ""
6165 "        s = pthread_attr_init(attrp);\n"
6166 "        if (s != 0)\n"
6167 "            handle_error_en(s, \"pthread_attr_init\");\n"
6168 "    }\n"
6169
6170 #. type: Plain text
6171 #: build/C/man3/pthread_getattr_np.3:299
6172 #, no-wrap
6173 msgid ""
6174 "    if (stack_size E<gt>= 0) {\n"
6175 "        if (!allocate_stack) {\n"
6176 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6177 "            if (s != 0)\n"
6178 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6179 "        } else {\n"
6180 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6181 "                               stack_size);\n"
6182 "            if (s != 0)\n"
6183 "                handle_error_en(s, \"posix_memalign\");\n"
6184 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6185 msgstr ""
6186 "    if (stack_size E<gt>= 0) {\n"
6187 "        if (!allocate_stack) {\n"
6188 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6189 "            if (s != 0)\n"
6190 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6191 "        } else {\n"
6192 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6193 "                               stack_size);\n"
6194 "            if (s != 0)\n"
6195 "                handle_error_en(s, \"posix_memalign\");\n"
6196 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6197
6198 #. type: Plain text
6199 #: build/C/man3/pthread_getattr_np.3:305
6200 #, no-wrap
6201 msgid ""
6202 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6203 "            if (s != 0)\n"
6204 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6205 "        }\n"
6206 "    }\n"
6207 msgstr ""
6208 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6209 "            if (s != 0)\n"
6210 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6211 "        }\n"
6212 "    }\n"
6213
6214 #. type: Plain text
6215 #: build/C/man3/pthread_getattr_np.3:311
6216 #, no-wrap
6217 msgid ""
6218 "    if (guard_size E<gt>= 0) {\n"
6219 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6220 "        if (s != 0)\n"
6221 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6222 "    }\n"
6223 msgstr ""
6224 "    if (guard_size E<gt>= 0) {\n"
6225 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6226 "        if (s != 0)\n"
6227 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6228 "    }\n"
6229
6230 #. type: Plain text
6231 #: build/C/man3/pthread_getattr_np.3:314
6232 #, no-wrap
6233 msgid ""
6234 "    return ret_attrp;\n"
6235 "}\n"
6236 msgstr ""
6237 "    return ret_attrp;\n"
6238 "}\n"
6239
6240 #. type: Plain text
6241 #: build/C/man3/pthread_getattr_np.3:323
6242 #, no-wrap
6243 msgid ""
6244 "int\n"
6245 "main(int argc, char *argv[])\n"
6246 "{\n"
6247 "    int s;\n"
6248 "    pthread_t thr;\n"
6249 "    pthread_attr_t attr;\n"
6250 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6251 "                                        a thread attributes object */\n"
6252 msgstr ""
6253 "int\n"
6254 "main(int argc, char *argv[])\n"
6255 "{\n"
6256 "    int s;\n"
6257 "    pthread_t thr;\n"
6258 "    pthread_attr_t attr;\n"
6259 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6260 "                                        a thread attributes object */\n"
6261
6262 #. type: Plain text
6263 #: build/C/man3/pthread_getattr_np.3:325
6264 #, no-wrap
6265 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6266 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6267
6268 #. type: Plain text
6269 #: build/C/man3/pthread_getattr_np.3:331
6270 #, no-wrap
6271 msgid ""
6272 "    if (attrp != NULL) {\n"
6273 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6274 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6275 "        printf(\"\\en\");\n"
6276 "    }\n"
6277 msgstr ""
6278 "    if (attrp != NULL) {\n"
6279 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6280 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6281 "        printf(\"\\en\");\n"
6282 "    }\n"
6283
6284 #. type: Plain text
6285 #: build/C/man3/pthread_getattr_np.3:361
6286 msgid ""
6287 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6288 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6289 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6290 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6291 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6292 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6293 msgstr ""
6294 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6295 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6296 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6297 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6298 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6299 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6300
6301 #. type: TH
6302 #: build/C/man3/pthread_getcpuclockid.3:26
6303 #, no-wrap
6304 msgid "PTHREAD_GETCPUCLOCKID"
6305 msgstr "PTHREAD_GETCPUCLOCKID"
6306
6307 #. type: TH
6308 #: build/C/man3/pthread_getcpuclockid.3:26
6309 #, no-wrap
6310 msgid "2009-02-08"
6311 msgstr "2009-02-08"
6312
6313 #. type: Plain text
6314 #: build/C/man3/pthread_getcpuclockid.3:29
6315 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6316 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6317
6318 #. type: Plain text
6319 #: build/C/man3/pthread_getcpuclockid.3:33
6320 #, no-wrap
6321 msgid ""
6322 "B<#include E<lt>pthread.hE<gt>>\n"
6323 "B<#include E<lt>time.hE<gt>>\n"
6324 msgstr ""
6325 "B<#include E<lt>pthread.hE<gt>>\n"
6326 "B<#include E<lt>time.hE<gt>>\n"
6327
6328 #. type: Plain text
6329 #: build/C/man3/pthread_getcpuclockid.3:35
6330 #, no-wrap
6331 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6332 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6333
6334 #.  The clockid is constructed as follows:
6335 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6336 #.  where CLOCK_IDFIELD_SIZE is 3.
6337 #. type: Plain text
6338 #: build/C/man3/pthread_getcpuclockid.3:46
6339 msgid ""
6340 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6341 "time clock of the thread I<thread>."
6342 msgstr ""
6343 "B<pthread_getcpuclockid>() 関数は、\n"
6344 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6345
6346 #. type: TP
6347 #: build/C/man3/pthread_getcpuclockid.3:50
6348 #, no-wrap
6349 msgid "B<ENOENT>"
6350 msgstr "B<ENOENT>"
6351
6352 #.  CLOCK_THREAD_CPUTIME_ID not defined
6353 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6354 #.  be possible if kernel thread IDs took more than 29 bits (which
6355 #.  they currently cannot).
6356 #. type: Plain text
6357 #: build/C/man3/pthread_getcpuclockid.3:58
6358 msgid "Per-thread CPU time clocks are not supported by the system."
6359 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6360
6361 #. type: Plain text
6362 #: build/C/man3/pthread_getcpuclockid.3:65
6363 msgid "This function is available in glibc since version 2.2."
6364 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6365
6366 #. type: Plain text
6367 #: build/C/man3/pthread_getcpuclockid.3:78
6368 msgid ""
6369 "When I<thread> refers to the calling thread, this function returns an "
6370 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6371 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6372 msgstr ""
6373 "I<thread> が呼び出したスレッドを参照している場合、\n"
6374 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6375 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6376 "を参照する ID が返される。"
6377
6378 #. type: Plain text
6379 #: build/C/man3/pthread_getcpuclockid.3:84
6380 msgid ""
6381 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6382 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6383 "the two threads.  The following shell session shows an example run:"
6384 msgstr ""
6385 "以下のプログラムは、スレッドを作成し、それから\n"
6386 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6387 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6388 "スレッド毎の CPU 時間を取得する。\n"
6389 "下記のシェルのセッションは実行例である。"
6390
6391 #. type: Plain text
6392 #: build/C/man3/pthread_getcpuclockid.3:94
6393 #, no-wrap
6394 msgid ""
6395 "$ B<./a.out>\n"
6396 "Main thread sleeping\n"
6397 "Subthread starting infinite loop\n"
6398 "Main thread consuming some CPU time...\n"
6399 "Process total CPU time:    1.368\n"
6400 "Main thread CPU time:      0.376\n"
6401 "Subthread CPU time:        0.992\n"
6402 msgstr ""
6403 "$ B<./a.out>\n"
6404 "Main thread sleeping\n"
6405 "Subthread starting infinite loop\n"
6406 "Main thread consuming some CPU time...\n"
6407 "Process total CPU time:    1.368\n"
6408 "Main thread CPU time:      0.376\n"
6409 "Subthread CPU time:        0.992\n"
6410
6411 #. type: Plain text
6412 #: build/C/man3/pthread_getcpuclockid.3:100
6413 #, no-wrap
6414 msgid "/* Link with \"-lrt\" */\n"
6415 msgstr "/* \"-lrt\" でリンクする */\n"
6416
6417 #. type: Plain text
6418 #: build/C/man3/pthread_getcpuclockid.3:108
6419 #, no-wrap
6420 msgid ""
6421 "#include E<lt>time.hE<gt>\n"
6422 "#include E<lt>stdio.hE<gt>\n"
6423 "#include E<lt>stdlib.hE<gt>\n"
6424 "#include E<lt>unistd.hE<gt>\n"
6425 "#include E<lt>pthread.hE<gt>\n"
6426 "#include E<lt>string.hE<gt>\n"
6427 "#include E<lt>errno.hE<gt>\n"
6428 msgstr ""
6429 "#include E<lt>time.hE<gt>\n"
6430 "#include E<lt>stdio.hE<gt>\n"
6431 "#include E<lt>stdlib.hE<gt>\n"
6432 "#include E<lt>unistd.hE<gt>\n"
6433 "#include E<lt>pthread.hE<gt>\n"
6434 "#include E<lt>string.hE<gt>\n"
6435 "#include E<lt>errno.hE<gt>\n"
6436
6437 #. type: Plain text
6438 #: build/C/man3/pthread_getcpuclockid.3:122
6439 #, no-wrap
6440 msgid ""
6441 "static void *\n"
6442 "thread_start(void *arg)\n"
6443 "{\n"
6444 "    printf(\"Subthread starting infinite loop\\en\");\n"
6445 "    for (;;)\n"
6446 "        continue;\n"
6447 "}\n"
6448 msgstr ""
6449 "static void *\n"
6450 "thread_start(void *arg)\n"
6451 "{\n"
6452 "    printf(\"Subthread starting infinite loop\\en\");\n"
6453 "    for (;;)\n"
6454 "        continue;\n"
6455 "}\n"
6456
6457 #. type: Plain text
6458 #: build/C/man3/pthread_getcpuclockid.3:127
6459 #, no-wrap
6460 msgid ""
6461 "static void\n"
6462 "pclock(char *msg, clockid_t cid)\n"
6463 "{\n"
6464 "    struct timespec ts;\n"
6465 msgstr ""
6466 "static void\n"
6467 "pclock(char *msg, clockid_t cid)\n"
6468 "{\n"
6469 "    struct timespec ts;\n"
6470
6471 #. type: Plain text
6472 #: build/C/man3/pthread_getcpuclockid.3:133
6473 #, no-wrap
6474 msgid ""
6475 "    printf(\"%s\", msg);\n"
6476 "    if (clock_gettime(cid, &ts) == -1)\n"
6477 "        handle_error(\"clock_gettime\");\n"
6478 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6479 "}\n"
6480 msgstr ""
6481 "    printf(\"%s\", msg);\n"
6482 "    if (clock_gettime(cid, &ts) == -1)\n"
6483 "        handle_error(\"clock_gettime\");\n"
6484 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6485 "}\n"
6486
6487 #. type: Plain text
6488 #: build/C/man3/pthread_getcpuclockid.3:140
6489 #, no-wrap
6490 msgid ""
6491 "int\n"
6492 "main(int argc, char *argv[])\n"
6493 "{\n"
6494 "    pthread_t thread;\n"
6495 "    clockid_t cid;\n"
6496 "    int j, s;\n"
6497 msgstr ""
6498 "int\n"
6499 "main(int argc, char *argv[])\n"
6500 "{\n"
6501 "    pthread_t thread;\n"
6502 "    clockid_t cid;\n"
6503 "    int j, s;\n"
6504
6505 #. type: Plain text
6506 #: build/C/man3/pthread_getcpuclockid.3:144
6507 #, no-wrap
6508 msgid ""
6509 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6510 "    if (s != 0)\n"
6511 "        handle_error_en(s, \"pthread_create\");\n"
6512 msgstr ""
6513 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6514 "    if (s != 0)\n"
6515 "        handle_error_en(s, \"pthread_create\");\n"
6516
6517 #. type: Plain text
6518 #: build/C/man3/pthread_getcpuclockid.3:147
6519 #, no-wrap
6520 msgid ""
6521 "    printf(\"Main thread sleeping\\en\");\n"
6522 "    sleep(1);\n"
6523 msgstr ""
6524 "    printf(\"Main thread sleeping\\en\");\n"
6525 "    sleep(1);\n"
6526
6527 #. type: Plain text
6528 #: build/C/man3/pthread_getcpuclockid.3:151
6529 #, no-wrap
6530 msgid ""
6531 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6532 "    for (j = 0; j E<lt> 2000000; j++)\n"
6533 "        getppid();\n"
6534 msgstr ""
6535 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6536 "    for (j = 0; j E<lt> 2000000; j++)\n"
6537 "        getppid();\n"
6538
6539 #. type: Plain text
6540 #: build/C/man3/pthread_getcpuclockid.3:153
6541 #, no-wrap
6542 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6543 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6544
6545 #. type: Plain text
6546 #: build/C/man3/pthread_getcpuclockid.3:158
6547 #, no-wrap
6548 msgid ""
6549 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6550 "    if (s != 0)\n"
6551 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6552 "    pclock(\"Main thread CPU time:   \", cid);\n"
6553 msgstr ""
6554 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6555 "    if (s != 0)\n"
6556 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6557 "    pclock(\"Main thread CPU time:   \", cid);\n"
6558
6559 #. type: Plain text
6560 #: build/C/man3/pthread_getcpuclockid.3:161
6561 #, no-wrap
6562 msgid ""
6563 "    /* The preceding 4 lines of code could have been replaced by:\n"
6564 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6565 msgstr ""
6566 "    /* The preceding 4 lines of code could have been replaced by:\n"
6567 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6568
6569 #. type: Plain text
6570 #: build/C/man3/pthread_getcpuclockid.3:166
6571 #, no-wrap
6572 msgid ""
6573 "    s = pthread_getcpuclockid(thread, &cid);\n"
6574 "    if (s != 0)\n"
6575 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6576 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6577 msgstr ""
6578 "    s = pthread_getcpuclockid(thread, &cid);\n"
6579 "    if (s != 0)\n"
6580 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6581 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6582
6583 #. type: Plain text
6584 #: build/C/man3/pthread_getcpuclockid.3:169
6585 #, no-wrap
6586 msgid ""
6587 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6588 "}\n"
6589 msgstr ""
6590 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6591 "}\n"
6592
6593 #. type: Plain text
6594 #: build/C/man3/pthread_getcpuclockid.3:178
6595 msgid ""
6596 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6597 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6598 msgstr ""
6599 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6600 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6601
6602 #. type: TH
6603 #: build/C/man3/pthread_join.3:26
6604 #, no-wrap
6605 msgid "PTHREAD_JOIN"
6606 msgstr "PTHREAD_JOIN"
6607
6608 #. type: Plain text
6609 #: build/C/man3/pthread_join.3:29
6610 msgid "pthread_join - join with a terminated thread"
6611 msgstr "pthread_join - 終了したスレッドを join する"
6612
6613 #. type: Plain text
6614 #: build/C/man3/pthread_join.3:34
6615 #, no-wrap
6616 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6617 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6618
6619 #. type: Plain text
6620 #: build/C/man3/pthread_join.3:49
6621 msgid ""
6622 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6623 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6624 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6625 msgstr ""
6626 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6627 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6628 "B<pthread_join>() はすぐに返る。\n"
6629 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6630
6631 #. type: Plain text
6632 #: build/C/man3/pthread_join.3:63
6633 msgid ""
6634 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6635 "the target thread (i.e., the value that the target thread supplied to "
6636 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6637 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6638 msgstr ""
6639 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6640 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6641 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6642 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6643
6644 #. type: Plain text
6645 #: build/C/man3/pthread_join.3:70
6646 msgid ""
6647 "If multiple threads simultaneously try to join with the same thread, the "
6648 "results are undefined.  If the thread calling B<pthread_join>()  is "
6649 "canceled, then the target thread will remain joinable (i.e., it will not be "
6650 "detached)."
6651 msgstr ""
6652 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6653 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6654 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6655 "ならない)。"
6656
6657 #. type: Plain text
6658 #: build/C/man3/pthread_join.3:75
6659 msgid ""
6660 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6661 "number."
6662 msgstr ""
6663 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6664 "エラーの場合、エラー番号を返す。"
6665
6666 #. type: TP
6667 #: build/C/man3/pthread_join.3:76
6668 #, no-wrap
6669 msgid "B<EDEADLK>"
6670 msgstr "B<EDEADLK>"
6671
6672 #.  The following verified by testing on glibc 2.8/NPTL:
6673 #.  The following verified by testing on glibc 2.8/NPTL:
6674 #. type: Plain text
6675 #: build/C/man3/pthread_join.3:85
6676 msgid ""
6677 "A deadlock was detected (e.g., two threads tried to join with each other); "
6678 "or I<thread> specifies the calling thread."
6679 msgstr ""
6680 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6681 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6682
6683 #.  POSIX.1-2001 does not specify this error case.
6684 #. type: Plain text
6685 #: build/C/man3/pthread_join.3:93
6686 msgid "Another thread is already waiting to join with this thread."
6687 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6688
6689 #. type: Plain text
6690 #: build/C/man3/pthread_join.3:104
6691 msgid ""
6692 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6693 "the target thread has terminated."
6694 msgstr ""
6695 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6696 "呼び出し側には、対象スレッドが終了していることが保証される。"
6697
6698 #. type: Plain text
6699 #: build/C/man3/pthread_join.3:107
6700 msgid ""
6701 "Joining with a thread that has previously been joined results in undefined "
6702 "behavior."
6703 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6704
6705 #. type: Plain text
6706 #: build/C/man3/pthread_join.3:115
6707 msgid ""
6708 "Failure to join with a thread that is joinable (i.e., one that is not "
6709 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6710 "zombie thread consumes some system resources, and when enough zombie threads "
6711 "have accumulated, it will no longer be possible to create new threads (or "
6712 "processes)."
6713 msgstr ""
6714 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6715 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6716 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6717 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6718 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6719 "このようなことが起きるのは避けること。"
6720
6721 #. type: Plain text
6722 #: build/C/man3/pthread_join.3:121
6723 msgid ""
6724 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6725 "\"join with any terminated thread\".  If you believe you need this "
6726 "functionality, you probably need to rethink your application design."
6727 msgstr ""
6728 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6729 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6730 "この機能が必要だと思うような場合には、おそらく\n"
6731 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6732
6733 #. type: Plain text
6734 #: build/C/man3/pthread_join.3:124
6735 msgid ""
6736 "All of the threads in a process are peers: any thread can join with any "
6737 "other thread in the process."
6738 msgstr ""
6739 "プロセス内の全てのスレッドは対等であり、\n"
6740 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6741
6742 #. type: Plain text
6743 #: build/C/man3/pthread_join.3:134
6744 msgid ""
6745 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6746 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6747 msgstr ""
6748 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6749 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6750
6751 #. type: TH
6752 #: build/C/man3/pthread_kill.3:26
6753 #, no-wrap
6754 msgid "PTHREAD_KILL"
6755 msgstr "PTHREAD_KILL"
6756
6757 #. type: TH
6758 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigmask.3:26
6759 #, no-wrap
6760 msgid "2014-02-04"
6761 msgstr "2014-02-04"
6762
6763 #. type: Plain text
6764 #: build/C/man3/pthread_kill.3:29
6765 msgid "pthread_kill - send a signal to a thread"
6766 msgstr "pthread_kill - スレッドにシグナルを送信する"
6767
6768 #. type: Plain text
6769 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6770 #, no-wrap
6771 msgid "B<#include E<lt>signal.hE<gt>>\n"
6772 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6773
6774 #. type: Plain text
6775 #: build/C/man3/pthread_kill.3:34
6776 #, no-wrap
6777 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6778 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6779
6780 #. type: Plain text
6781 #: build/C/man3/pthread_kill.3:45
6782 msgid "B<pthread_kill>():"
6783 msgstr "B<pthread_kill>():"
6784
6785 #. type: Plain text
6786 #: build/C/man3/pthread_kill.3:47 build/C/man3/pthread_sigmask.3:48
6787 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 199506L || _XOPEN_SOURCE\\ E<gt>=\\ 500"
6788 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 199506L || _XOPEN_SOURCE\\ E<gt>=\\ 500"
6789
6790 #. type: Plain text
6791 #: build/C/man3/pthread_kill.3:59
6792 msgid ""
6793 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6794 "thread in the same process as the caller.  The signal is asynchronously "
6795 "directed to I<thread>."
6796 msgstr ""
6797 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6798 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6799 "シグナルは非同期に I<thread> へ直接送られる。"
6800
6801 #. type: Plain text
6802 #: build/C/man3/pthread_kill.3:63
6803 msgid ""
6804 "If I<sig> is 0, then no signal is sent, but error checking is still "
6805 "performed."
6806 msgstr ""
6807 "I<sig> が 0 の場合、シグナルは送信されないが、エラーチェックだけは実行され"
6808 "る。"
6809
6810 #. type: Plain text
6811 #: build/C/man3/pthread_kill.3:68
6812 msgid ""
6813 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6814 "number, and no signal is sent."
6815 msgstr ""
6816 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6817 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6818
6819 #. type: Plain text
6820 #: build/C/man3/pthread_kill.3:72
6821 msgid "An invalid signal was specified."
6822 msgstr "無効なシグナルが指定された。"
6823
6824 #. type: Plain text
6825 #: build/C/man3/pthread_kill.3:74
6826 msgid "POSIX.1-2008."
6827 msgstr "POSIX.1-2008."
6828
6829 #. type: Plain text
6830 #: build/C/man3/pthread_kill.3:81
6831 msgid ""
6832 "Signal dispositions are process-wide: if a signal handler is installed, the "
6833 "handler will be invoked in the thread I<thread>, but if the disposition of "
6834 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6835 "affect the whole process."
6836 msgstr ""
6837 "シグナルの配送はプロセス全体で行われる。\n"
6838 "シグナルハンドラが設定されている場合、\n"
6839 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6840 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6841 "シグナルに対するアクションはプロセス全体に影響がある。"
6842
6843 #. type: Plain text
6844 #: build/C/man3/pthread_kill.3:94
6845 msgid ""
6846 "POSIX.1-2008 recommends that if an implementation detects the use of a "
6847 "thread ID after the end of its lifetime, B<pthread_kill>()  should return "
6848 "the error B<ESRCH>.  The glibc implementation returns this error in the "
6849 "cases where an invalid thread ID can be detected.  But note also that POSIX "
6850 "says that an attempt to use a thread ID whose lifetime has ended produces "
6851 "undefined behavior, and an attempt to use an invalid thread ID in a call to "
6852 "B<pthread_kill>()  can, for example, cause a segmentation fault."
6853 msgstr ""
6854
6855 #. type: Plain text
6856 #: build/C/man3/pthread_kill.3:103
6857 msgid ""
6858 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6859 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6860 msgstr ""
6861 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6862 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6863
6864 #. type: TH
6865 #: build/C/man3/pthread_kill_other_threads_np.3:26
6866 #, no-wrap
6867 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6868 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6869
6870 #. type: TH
6871 #: build/C/man3/pthread_kill_other_threads_np.3:26
6872 #, no-wrap
6873 msgid "2010-09-09"
6874 msgstr "2010-09-09"
6875
6876 #. type: Plain text
6877 #: build/C/man3/pthread_kill_other_threads_np.3:29
6878 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6879 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6880
6881 #. type: Plain text
6882 #: build/C/man3/pthread_kill_other_threads_np.3:34
6883 #, no-wrap
6884 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6885 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6886
6887 #.  .SH VERSIONS
6888 #.  Available since glibc 2.0
6889 #. type: Plain text
6890 #: build/C/man3/pthread_kill_other_threads_np.3:47
6891 msgid ""
6892 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
6893 "threading implementation.  On that implementation, calling this function "
6894 "causes the immediate termination of all threads in the application, except "
6895 "the calling thread.  The cancellation state and cancellation type of the to-"
6896 "be-terminated threads are ignored, and the cleanup handlers are not called "
6897 "in those threads."
6898 msgstr ""
6899 "B<pthread_kill_other_threads_np>() は、\n"
6900 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6901 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6902 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6903 "終了対象のスレッドの cancelability state と cancelability type は\n"
6904 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6905
6906 #. type: Plain text
6907 #: build/C/man3/pthread_kill_other_threads_np.3:59
6908 msgid ""
6909 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6910 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6911 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6912 "the other threads of an application are not automatically terminated (as "
6913 "POSIX.1-2001 requires) during B<execve>(2)."
6914 msgstr ""
6915 "B<pthread_kill_other_threads_np>() は、\n"
6916 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6917 "呼ばれることを目的として用意されている。\n"
6918 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6919 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6920 "終了されないという制限を解決するために設計された。"
6921
6922 #. type: Plain text
6923 #: build/C/man3/pthread_kill_other_threads_np.3:66
6924 msgid ""
6925 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6926 "exists, but does nothing.  (Nothing needs to be done, because the "
6927 "implementation does the right thing during an B<execve>(2).)"
6928 msgstr ""
6929 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6930 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6931 "何もする必要がないということだ)。"
6932
6933 #. type: Plain text
6934 #: build/C/man3/pthread_kill_other_threads_np.3:72
6935 msgid ""
6936 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6937 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6938 msgstr ""
6939 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6940 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6941
6942 #. type: TH
6943 #: build/C/man3/pthread_self.3:26
6944 #, no-wrap
6945 msgid "PTHREAD_SELF"
6946 msgstr "PTHREAD_SELF"
6947
6948 #. type: Plain text
6949 #: build/C/man3/pthread_self.3:29
6950 msgid "pthread_self - obtain ID of the calling thread"
6951 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6952
6953 #. type: Plain text
6954 #: build/C/man3/pthread_self.3:34
6955 #, no-wrap
6956 msgid "B<pthread_t pthread_self(void);>\n"
6957 msgstr "B<pthread_t pthread_self(void);>\n"
6958
6959 #. type: Plain text
6960 #: build/C/man3/pthread_self.3:46
6961 msgid ""
6962 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6963 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6964 "(3)  call that created this thread."
6965 msgstr ""
6966 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6967 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6968 "呼び出しで I<*thread> で返されるのと同じ値である。"
6969
6970 #. type: Plain text
6971 #: build/C/man3/pthread_self.3:48
6972 msgid "This function always succeeds, returning the calling thread's ID."
6973 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6974
6975 #. type: Plain text
6976 #: build/C/man3/pthread_self.3:63
6977 msgid ""
6978 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6979 "represent a thread ID; for example, representation using either an "
6980 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6981 "I<pthread_t> can't portably be compared using the C equality operator "
6982 "(B<==>); use B<pthread_equal>(3)  instead."
6983 msgstr ""
6984 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
6985 "スレッド実装が完全に自由に選択してよいことになっている。\n"
6986 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
6987 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
6988 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
6989 "代わりに B<pthread_equal>(3) を使うこと。"
6990
6991 #. type: Plain text
6992 #: build/C/man3/pthread_self.3:67
6993 msgid ""
6994 "Thread identifiers should be considered opaque: any attempt to use a thread "
6995 "ID other than in pthreads calls is nonportable and can lead to unspecified "
6996 "results."
6997 msgstr ""
6998 "スレッド識別子はその内部構造を意識すべきではない。\n"
6999 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
7000 "移植性がなくなり、どのような結果が得られるかも分からない。"
7001
7002 #. type: Plain text
7003 #: build/C/man3/pthread_self.3:71
7004 msgid ""
7005 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
7006 "may be reused after a terminated thread has been joined, or a detached "
7007 "thread has terminated."
7008 msgstr ""
7009 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
7010 "終了したスレッドが join されたり、\n"
7011 "切り離された (detached) スレッドが終了されたりした後は、\n"
7012 "そのスレッド ID は再利用されることがある。"
7013
7014 #. type: Plain text
7015 #: build/C/man3/pthread_self.3:76
7016 msgid ""
7017 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
7018 "kernel thread ID returned by a call to B<gettid>(2)."
7019 msgstr ""
7020 "B<pthread_self>() が返すスレッド ID は、\n"
7021 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
7022
7023 #. type: Plain text
7024 #: build/C/man3/pthread_self.3:80
7025 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7026 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7027
7028 #. type: TH
7029 #: build/C/man3/pthread_setaffinity_np.3:26
7030 #, no-wrap
7031 msgid "PTHREAD_SETAFFINITY_NP"
7032 msgstr "PTHREAD_SETAFFINITY_NP"
7033
7034 #. type: Plain text
7035 #: build/C/man3/pthread_setaffinity_np.3:30
7036 msgid ""
7037 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7038 "thread"
7039 msgstr ""
7040 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7041 "CPU affinity の設定/取得を行う"
7042
7043 #. type: Plain text
7044 #: build/C/man3/pthread_setaffinity_np.3:39
7045 #, no-wrap
7046 msgid ""
7047 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7048 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7049 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7050 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7051 msgstr ""
7052 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7053 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7054 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7055 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7056
7057 #. type: Plain text
7058 #: build/C/man3/pthread_setaffinity_np.3:54
7059 msgid ""
7060 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7061 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7062 "successful, and the thread is not currently running on one of the CPUs in "
7063 "I<cpuset>, then it is migrated to one of those CPUs."
7064 msgstr ""
7065 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7066 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7067 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7068 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7069
7070 #. type: Plain text
7071 #: build/C/man3/pthread_setaffinity_np.3:61
7072 msgid ""
7073 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7074 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7075 msgstr ""
7076 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7077 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7078
7079 #. type: Plain text
7080 #: build/C/man3/pthread_setaffinity_np.3:77
7081 msgid ""
7082 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7083 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
7084 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
7085 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7086 msgstr ""
7087 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7088 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7089 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7090 "割り当てている場合には、別の値になることもある)。"
7091
7092 #. type: TP
7093 #: build/C/man3/pthread_setaffinity_np.3:81
7094 #, no-wrap
7095 msgid "B<EFAULT>"
7096 msgstr "B<EFAULT>"
7097
7098 #. type: Plain text
7099 #: build/C/man3/pthread_setaffinity_np.3:84
7100 msgid "A supplied memory address was invalid."
7101 msgstr "指定されたメモリアドレスが無効である。"
7102
7103 #. type: Plain text
7104 #: build/C/man3/pthread_setaffinity_np.3:93
7105 msgid ""
7106 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7107 "processors that are currently physically on the system and permitted to the "
7108 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7109 "mechanism described in B<cpuset>(7)."
7110 msgstr ""
7111 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7112 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7113 "されているプロセッサが一つも含まれていない。\n"
7114 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7115 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7116
7117 #.  FIXME . ?
7118 #.  Loic Domaigne commented: it seems that in the future the
7119 #.  kernel developers want to make cpumask_t dynamic, so
7120 #.  CONFIG_NR_CPUS might become obsolete in the future.
7121 #.  cpumask_t
7122 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7123 #.  of the cpumask_t type.
7124 #. type: Plain text
7125 #: build/C/man3/pthread_setaffinity_np.3:109
7126 msgid ""
7127 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7128 "the set supported by the kernel.  (The kernel configuration option "
7129 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7130 "type used to represent CPU sets.)"
7131 msgstr ""
7132 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7133 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7134 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7135 "データ型がサポートする CPU 集合の範囲が定義される。)"
7136
7137 #. type: Plain text
7138 #: build/C/man3/pthread_setaffinity_np.3:114
7139 msgid ""
7140 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7141 "affinity mask used by the kernel."
7142 msgstr ""
7143 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7144 "affinity マスクの大きさよりも小さい。"
7145
7146 #. type: Plain text
7147 #: build/C/man3/pthread_setaffinity_np.3:137
7148 msgid ""
7149 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7150 "thread will actually run is the intersection of the set specified in the "
7151 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7152 "system may further restrict the set of CPUs on which the thread runs if the "
7153 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7154 "restrictions on the actual set of CPUs on which the thread will run are "
7155 "silently imposed by the kernel."
7156 msgstr ""
7157 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7158 "そのスレッドが実際に実行される CPU 集合は、\n"
7159 "I<cpuset> 引き数で指定された集合と\n"
7160 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7161 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7162 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7163 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7164 "これらの制限は、カーネルにより黙って適用される。"
7165
7166 #. type: Plain text
7167 #: build/C/man3/pthread_setaffinity_np.3:143
7168 msgid ""
7169 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7170 "B<sched_getaffinity>(2)  system calls."
7171 msgstr ""
7172 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7173 "B<sched_getaffinity>(2) を使って実装されている。"
7174
7175 #. type: Plain text
7176 #: build/C/man3/pthread_setaffinity_np.3:154
7177 msgid ""
7178 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7179 "creator's CPU affinity mask."
7180 msgstr ""
7181 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7182 "作成者の CPU affinity マスクを継承する。"
7183
7184 #. type: Plain text
7185 #: build/C/man3/pthread_setaffinity_np.3:162
7186 msgid ""
7187 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7188 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7189 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7190 "check the resulting CPU affinity mask of the thread."
7191 msgstr ""
7192 "以下のプログラムでは、メインスレッドは\n"
7193 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7194 "CPU 0 から 7 が含まれるように設定し\n"
7195 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7196 "その後で B<pthread_getaffinity_np>() を使って\n"
7197 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7198
7199 #. type: Plain text
7200 #: build/C/man3/pthread_setaffinity_np.3:169
7201 #, no-wrap
7202 msgid ""
7203 "#define _GNU_SOURCE\n"
7204 "#include E<lt>pthread.hE<gt>\n"
7205 "#include E<lt>stdio.hE<gt>\n"
7206 "#include E<lt>stdlib.hE<gt>\n"
7207 "#include E<lt>errno.hE<gt>\n"
7208 msgstr ""
7209 "#define _GNU_SOURCE\n"
7210 "#include E<lt>pthread.hE<gt>\n"
7211 "#include E<lt>stdio.hE<gt>\n"
7212 "#include E<lt>stdlib.hE<gt>\n"
7213 "#include E<lt>errno.hE<gt>\n"
7214
7215 #. type: Plain text
7216 #: build/C/man3/pthread_setaffinity_np.3:179
7217 #, no-wrap
7218 msgid ""
7219 "int\n"
7220 "main(int argc, char *argv[])\n"
7221 "{\n"
7222 "    int s, j;\n"
7223 "    cpu_set_t cpuset;\n"
7224 "    pthread_t thread;\n"
7225 msgstr ""
7226 "int\n"
7227 "main(int argc, char *argv[])\n"
7228 "{\n"
7229 "    int s, j;\n"
7230 "    cpu_set_t cpuset;\n"
7231 "    pthread_t thread;\n"
7232
7233 #. type: Plain text
7234 #: build/C/man3/pthread_setaffinity_np.3:181
7235 #, no-wrap
7236 msgid "    thread = pthread_self();\n"
7237 msgstr "    thread = pthread_self();\n"
7238
7239 #. type: Plain text
7240 #: build/C/man3/pthread_setaffinity_np.3:183
7241 #, no-wrap
7242 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7243 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7244
7245 #. type: Plain text
7246 #: build/C/man3/pthread_setaffinity_np.3:187
7247 #, no-wrap
7248 msgid ""
7249 "    CPU_ZERO(&cpuset);\n"
7250 "    for (j = 0; j E<lt> 8; j++)\n"
7251 "        CPU_SET(j, &cpuset);\n"
7252 msgstr ""
7253 "    CPU_ZERO(&cpuset);\n"
7254 "    for (j = 0; j E<lt> 8; j++)\n"
7255 "        CPU_SET(j, &cpuset);\n"
7256
7257 #. type: Plain text
7258 #: build/C/man3/pthread_setaffinity_np.3:191
7259 #, no-wrap
7260 msgid ""
7261 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7262 "    if (s != 0)\n"
7263 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7264 msgstr ""
7265 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7266 "    if (s != 0)\n"
7267 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7268
7269 #. type: Plain text
7270 #: build/C/man3/pthread_setaffinity_np.3:193
7271 #, no-wrap
7272 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7273 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7274
7275 #. type: Plain text
7276 #: build/C/man3/pthread_setaffinity_np.3:197
7277 #, no-wrap
7278 msgid ""
7279 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7280 "    if (s != 0)\n"
7281 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7282 msgstr ""
7283 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7284 "    if (s != 0)\n"
7285 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7286
7287 #. type: Plain text
7288 #: build/C/man3/pthread_setaffinity_np.3:202
7289 #, no-wrap
7290 msgid ""
7291 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7292 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7293 "        if (CPU_ISSET(j, &cpuset))\n"
7294 "            printf(\"    CPU %d\\en\", j);\n"
7295 msgstr ""
7296 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7297 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7298 "        if (CPU_ISSET(j, &cpuset))\n"
7299 "            printf(\"    CPU %d\\en\", j);\n"
7300
7301 #. type: Plain text
7302 #: build/C/man3/pthread_setaffinity_np.3:205
7303 #: build/C/man3/pthread_setschedparam.3:430
7304 #, no-wrap
7305 msgid ""
7306 "    exit(EXIT_SUCCESS);\n"
7307 "}\n"
7308 msgstr ""
7309 "    exit(EXIT_SUCCESS);\n"
7310 "}\n"
7311
7312 #. type: Plain text
7313 #: build/C/man3/pthread_setaffinity_np.3:214
7314 msgid ""
7315 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7316 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7317 "B<cpuset>(7), B<pthreads>(7)"
7318 msgstr ""
7319 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7320 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7321 "B<cpuset>(7), B<pthreads>(7)"
7322
7323 #. type: TH
7324 #: build/C/man3/pthread_setcancelstate.3:26
7325 #, no-wrap
7326 msgid "PTHREAD_SETCANCELSTATE"
7327 msgstr "PTHREAD_SETCANCELSTATE"
7328
7329 #. type: Plain text
7330 #: build/C/man3/pthread_setcancelstate.3:30
7331 msgid ""
7332 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7333 "type"
7334 msgstr ""
7335 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7336 "cancelability type を設定する"
7337
7338 #. type: Plain text
7339 #: build/C/man3/pthread_setcancelstate.3:36
7340 #, no-wrap
7341 msgid ""
7342 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7343 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7344 msgstr ""
7345 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7346 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7347
7348 #. type: Plain text
7349 #: build/C/man3/pthread_setcancelstate.3:51
7350 msgid ""
7351 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7352 "thread to the value given in I<state>.  The previous cancelability state of "
7353 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7354 "I<state> argument must have one of the following values:"
7355 msgstr ""
7356 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7357 "cancelability state に I<state> で指定された\n"
7358 "値を設定する。変更前のスレッドの cancelability state は\n"
7359 "I<oldstate> が指すバッファで返される。\n"
7360 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7361
7362 #. type: TP
7363 #: build/C/man3/pthread_setcancelstate.3:51
7364 #, no-wrap
7365 msgid "B<PTHREAD_CANCEL_ENABLE>"
7366 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7367
7368 #. type: Plain text
7369 #: build/C/man3/pthread_setcancelstate.3:58
7370 msgid ""
7371 "The thread is cancelable.  This is the default cancelability state in all "
7372 "new threads, including the initial thread.  The thread's cancelability type "
7373 "determines when a cancelable thread will respond to a cancellation request."
7374 msgstr ""
7375 "スレッドは取り消し可能 (cancelable) である。\n"
7376 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7377 "cancelability state である。これには最初のスレッドも含まれる。\n"
7378 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7379 "取り消し要求にいつ反応するかが決まる。"
7380
7381 #. type: TP
7382 #: build/C/man3/pthread_setcancelstate.3:58
7383 #, no-wrap
7384 msgid "B<PTHREAD_CANCEL_DISABLE>"
7385 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7386
7387 #. type: Plain text
7388 #: build/C/man3/pthread_setcancelstate.3:63
7389 msgid ""
7390 "The thread is not cancelable.  If a cancellation request is received, it is "
7391 "blocked until cancelability is enabled."
7392 msgstr ""
7393 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7394 "取り消し可能に設定されるまでその要求はブロックされる。"
7395
7396 #. type: Plain text
7397 #: build/C/man3/pthread_setcancelstate.3:75
7398 msgid ""
7399 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7400 "thread to the value given in I<type>.  The previous cancelability type of "
7401 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7402 "argument must have one of the following values:"
7403 msgstr ""
7404 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7405 "cancelability type に I<type> で指定された値を設定する。\n"
7406 "変更前のスレッドの cancelability type は\n"
7407 "I<oldtype> が指すバッファで返される。\n"
7408 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7409
7410 #. type: TP
7411 #: build/C/man3/pthread_setcancelstate.3:75
7412 #, no-wrap
7413 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7414 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7415
7416 #. type: Plain text
7417 #: build/C/man3/pthread_setcancelstate.3:82
7418 msgid ""
7419 "A cancellation request is deferred until the thread next calls a function "
7420 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7421 "cancelability type in all new threads, including the initial thread."
7422 msgstr ""
7423 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7424 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7425 "スレッドでのデフォルトの cancelability type である。\n"
7426 "これには最初のスレッドも含まれる。"
7427
7428 #. type: TP
7429 #: build/C/man3/pthread_setcancelstate.3:82
7430 #, no-wrap
7431 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7432 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7433
7434 #. type: Plain text
7435 #: build/C/man3/pthread_setcancelstate.3:88
7436 msgid ""
7437 "The thread can be canceled at any time.  (Typically, it will be canceled "
7438 "immediately upon receiving a cancellation request, but the system doesn't "
7439 "guarantee this.)"
7440 msgstr ""
7441 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7442 "システムがそのことを保証しているわけではない)。"
7443
7444 #. type: Plain text
7445 #: build/C/man3/pthread_setcancelstate.3:92
7446 msgid ""
7447 "The set-and-get operation performed by each of these functions is atomic "
7448 "with respect to other threads in the process calling the same function."
7449 msgstr ""
7450 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7451 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7452 "アトミックに行われる。"
7453
7454 #. type: Plain text
7455 #: build/C/man3/pthread_setcancelstate.3:99
7456 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7457 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7458
7459 #. type: Plain text
7460 #: build/C/man3/pthread_setcancelstate.3:103
7461 msgid "Invalid value for I<state>."
7462 msgstr "I<state> に無効な値が指定された。"
7463
7464 #. type: Plain text
7465 #: build/C/man3/pthread_setcancelstate.3:107
7466 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7467 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7468
7469 #.  .SH VERSIONS
7470 #.  Available since glibc 2.0
7471 #. type: Plain text
7472 #: build/C/man3/pthread_setcancelstate.3:113
7473 msgid "Invalid value for I<type>."
7474 msgstr "I<type> に無効な値が指定された。"
7475
7476 #. type: Plain text
7477 #: build/C/man3/pthread_setcancelstate.3:118
7478 msgid ""
7479 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7480 "(3)."
7481 msgstr ""
7482 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7483 "B<pthread_cancel>(3) を参照。"
7484
7485 #. type: Plain text
7486 #: build/C/man3/pthread_setcancelstate.3:125
7487 msgid ""
7488 "Briefly disabling cancelability is useful if a thread performs some critical "
7489 "action that must not be interrupted by a cancellation request.  Beware of "
7490 "disabling cancelability for long periods, or around operations that may "
7491 "block for long periods, since that will render the thread unresponsive to "
7492 "cancellation requests."
7493 msgstr ""
7494 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7495 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7496 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7497 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7498 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7499 "スレッドが応答しない状態になってしまうからである。"
7500
7501 #. type: Plain text
7502 #: build/C/man3/pthread_setcancelstate.3:156
7503 msgid ""
7504 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7505 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7506 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7507 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7508 "because the application has no way of knowing what the state of these "
7509 "resources is when the thread is canceled; that is, did cancellation occur "
7510 "before the resources were reserved, while they were reserved, or after they "
7511 "were released? Furthermore, some internal data structures (e.g., the linked "
7512 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7513 "left in an inconsistent state if cancellation occurs in the middle of the "
7514 "function call.  Consequently, clean-up handlers cease to be useful.  "
7515 "Functions that can be safely asynchronously canceled are called I<async-"
7516 "cancel-safe functions>.  POSIX.1-2001 requires only that B<pthread_cancel>"
7517 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7518 "cancel-safe.  In general, other library functions can't be safely called "
7519 "from an asynchronously cancelable thread.  One of the few circumstances in "
7520 "which asynchronous cancelability is useful is for cancellation of a thread "
7521 "that is in a pure compute-bound loop."
7522 msgstr ""
7523 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7524 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7525 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7526 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7527 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7528 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7529 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7530 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7531 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7532 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7533 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7534 "が役に立たないものになってしまう。\n"
7535 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7536 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7537 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7538 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7539 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7540 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7541 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7542
7543 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7544 #. type: Plain text
7545 #: build/C/man3/pthread_setcancelstate.3:174
7546 msgid ""
7547 "The Linux threading implementations permit the I<oldstate> argument of "
7548 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7549 "the previous cancelability state is not returned to the caller.  Many other "
7550 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7551 "does not specify this point, so portable applications should always specify "
7552 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7553 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7554 msgstr ""
7555 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7556 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7557 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7558 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7559 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7560 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7561 "NULL 以外の値を指定するようにすべきである。\n"
7562 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7563 "全く同じことが言える。"
7564
7565 #. type: Plain text
7566 #: build/C/man3/pthread_setcancelstate.3:177
7567 msgid "See B<pthread_cancel>(3)."
7568 msgstr "B<pthread_cancel>(3) を参照。"
7569
7570 #. type: Plain text
7571 #: build/C/man3/pthread_setcancelstate.3:182
7572 msgid ""
7573 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7574 "B<pthreads>(7)"
7575 msgstr ""
7576 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7577 "B<pthreads>(7)"
7578
7579 #. type: TH
7580 #: build/C/man3/pthread_setconcurrency.3:25
7581 #, no-wrap
7582 msgid "PTHREAD_SETCONCURRENCY"
7583 msgstr "PTHREAD_SETCONCURRENCY"
7584
7585 #. type: TH
7586 #: build/C/man3/pthread_setconcurrency.3:25
7587 #, no-wrap
7588 msgid "2009-04-10"
7589 msgstr "2009-04-10"
7590
7591 #. type: Plain text
7592 #: build/C/man3/pthread_setconcurrency.3:29
7593 msgid ""
7594 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7595 "level"
7596 msgstr ""
7597 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7598 "行う"
7599
7600 #. type: Plain text
7601 #: build/C/man3/pthread_setconcurrency.3:35
7602 #, no-wrap
7603 msgid ""
7604 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7605 "B<int pthread_getconcurrency(void);>\n"
7606 msgstr ""
7607 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7608 "B<int pthread_getconcurrency(void);>\n"
7609
7610 #. type: Plain text
7611 #: build/C/man3/pthread_setconcurrency.3:48
7612 msgid ""
7613 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7614 "application's desired concurrency level, specified in I<new_level>.  The "
7615 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7616 "of concurrency that should be provided as a result of calling "
7617 "B<pthread_setconcurrency>()."
7618 msgstr ""
7619 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7620 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7621 "希望する並列処理レベルは I<new_level> で指定する。\n"
7622 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7623 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7624 "どのような並列度になるべきかは規定されていない。"
7625
7626 #. type: Plain text
7627 #: build/C/man3/pthread_setconcurrency.3:53
7628 msgid ""
7629 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7630 "concurrency level as it deems appropriate."
7631 msgstr ""
7632 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7633 "実装側で適切とみなしたレベルに設定するようになる。"
7634
7635 #. type: Plain text
7636 #: build/C/man3/pthread_setconcurrency.3:56
7637 msgid ""
7638 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7639 "level for this process."
7640 msgstr ""
7641 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7642 "の現在値を返す。"
7643
7644 #. type: Plain text
7645 #: build/C/man3/pthread_setconcurrency.3:61
7646 msgid ""
7647 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7648 "nonzero error number."
7649 msgstr ""
7650 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7651 "エラーの場合、 0 以外のエラー番号を返す。"
7652
7653 #. type: Plain text
7654 #: build/C/man3/pthread_setconcurrency.3:68
7655 msgid ""
7656 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7657 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7658 "B<pthread_setconcurrency>()  has not previously been called."
7659 msgstr ""
7660 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7661 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7662 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7663 "それまでに一度も呼び出されていない場合は 0 が返る。"
7664
7665 #. type: Plain text
7666 #: build/C/man3/pthread_setconcurrency.3:71
7667 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7668 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7669
7670 #. type: Plain text
7671 #: build/C/man3/pthread_setconcurrency.3:75
7672 msgid "I<new_level> is negative."
7673 msgstr "I<new_level> が負である。"
7674
7675 #. type: Plain text
7676 #: build/C/man3/pthread_setconcurrency.3:81
7677 msgid ""
7678 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7679 "I<new_level> would cause a system resource to be exceeded\")."
7680 msgstr ""
7681 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7682 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7683 "超過してしまう」)。"
7684
7685 #. type: Plain text
7686 #: build/C/man3/pthread_setconcurrency.3:83
7687 msgid "These functions are available in glibc since version 2.1."
7688 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7689
7690 #. type: Plain text
7691 #: build/C/man3/pthread_setconcurrency.3:87
7692 msgid "The default concurrency level is 0."
7693 msgstr "デフォルトの concurrency level は 0 である。"
7694
7695 #. type: Plain text
7696 #: build/C/man3/pthread_setconcurrency.3:94
7697 msgid ""
7698 "Concurrency levels are meaningful only for M:N threading implementations, "
7699 "where at any moment a subset of a process's set of user-level threads may be "
7700 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7701 "concurrency level allows the application to give the system a hint as to the "
7702 "number of kernel-scheduling entities that should be provided for efficient "
7703 "execution of the application."
7704 msgstr ""
7705 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7706 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7707 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7708 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7709 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7710 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7711 "ムに伝えることができる。"
7712
7713 #. type: Plain text
7714 #: build/C/man3/pthread_setconcurrency.3:100
7715 msgid ""
7716 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7717 "concurrency level has no meaning.  In other words, on Linux these functions "
7718 "merely exist for compatibility with other systems, and they have no effect "
7719 "on the execution of a program."
7720 msgstr ""
7721 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7722 "並列処理レベルを設定しても何の意味もない。\n"
7723 "言い換えると、 Linux では、これらの関数は、\n"
7724 "他のシステムとの互換性のためだけに存在し、\n"
7725 "プログラムの実行には何の影響も与えないということである。"
7726
7727 #. type: Plain text
7728 #: build/C/man3/pthread_setconcurrency.3:103
7729 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7730 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7731
7732 #. type: TH
7733 #: build/C/man3/pthread_setname_np.3:26
7734 #, no-wrap
7735 msgid "PTHREAD_SETNAME_NP"
7736 msgstr "PTHREAD_SETNAME_NP"
7737
7738 #. type: Plain text
7739 #: build/C/man3/pthread_setname_np.3:29
7740 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7741 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
7742
7743 #. type: Plain text
7744 #: build/C/man3/pthread_setname_np.3:36
7745 #, no-wrap
7746 msgid ""
7747 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7748 "B<#include E<lt>pthread.hE<gt>>\n"
7749 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7750 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7751 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7752 msgstr ""
7753 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7754 "B<#include E<lt>pthread.hE<gt>>\n"
7755 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7756 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7757 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7758
7759 #. type: Plain text
7760 #: build/C/man3/pthread_setname_np.3:55
7761 msgid ""
7762 "By default, all the threads created using B<pthread_create>()  inherit the "
7763 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7764 "unique name for a thread, which can be useful for debugging multithreaded "
7765 "applications.  The thread name is a meaningful C language string, whose "
7766 "length is restricted to 16 characters, including the terminating null byte "
7767 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
7768 "to be changed; I<name> specifies the new name."
7769 msgstr ""
7770 "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム"
7771 "名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定"
7772 "することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデ"
7773 "バッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さ"
7774 "は 16 文字に限定されており、 終端の NULL バイト (\\(aq\\e0\\(aq) も 16 文字に"
7775 "含まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には"
7776 "新しい名前を指定する。"
7777
7778 #. type: Plain text
7779 #: build/C/man3/pthread_setname_np.3:72
7780 msgid ""
7781 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7782 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7783 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7784 "specifies the number of bytes available in I<name>.  The buffer specified by "
7785 "I<name> should be at least 16 characters in length.  The returned thread "
7786 "name in the output buffer will be null terminated."
7787 msgstr ""
7788 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
7789 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
7790 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
7791 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
7792 "出力バッファに返されたスレッド名は NULL 終端される。"
7793
7794 #. type: Plain text
7795 #: build/C/man3/pthread_setname_np.3:79
7796 msgid ""
7797 "The B<pthread_setname_np>()  function can fail with the following error:"
7798 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7799
7800 #. type: TP
7801 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7802 #, no-wrap
7803 msgid "B<ERANGE>"
7804 msgstr "B<ERANGE>"
7805
7806 #. type: Plain text
7807 #: build/C/man3/pthread_setname_np.3:84
7808 msgid ""
7809 "The length of the string specified pointed to by I<name> exceeds the allowed "
7810 "limit."
7811 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
7812
7813 #. type: Plain text
7814 #: build/C/man3/pthread_setname_np.3:88
7815 msgid ""
7816 "The B<pthread_getname_np>()  function can fail with the following error:"
7817 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7818
7819 #. type: Plain text
7820 #: build/C/man3/pthread_setname_np.3:95
7821 msgid ""
7822 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7823 "name."
7824 msgstr ""
7825 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
7826 "る。"
7827
7828 #. type: Plain text
7829 #: build/C/man3/pthread_setname_np.3:100
7830 msgid ""
7831 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7832 "then the call may fail with one of the errors described in B<open>(2)."
7833 msgstr ""
7834 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
7835 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
7836
7837 #. type: Plain text
7838 #: build/C/man3/pthread_setname_np.3:102
7839 msgid "These functions first appeared in glibc in version 2.12."
7840 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7841
7842 #. type: Plain text
7843 #: build/C/man3/pthread_setname_np.3:104
7844 msgid "These functions are nonstandard GNU extensions."
7845 msgstr "これらの関数は非標準の GNU による拡張である。"
7846
7847 #. type: Plain text
7848 #: build/C/man3/pthread_setname_np.3:114
7849 msgid ""
7850 "B<pthread_setname_np>()  internally writes to the thread-specific I<comm> "
7851 "file under the I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7852 "B<pthread_getname_np>()  retrieves it from the same location."
7853 msgstr ""
7854 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
7855 "I<comm> ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
7856 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
7857
7858 #. type: Plain text
7859 #: build/C/man3/pthread_setname_np.3:120
7860 msgid ""
7861 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7862 "B<pthread_getname_np>()."
7863 msgstr ""
7864 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7865 "の使用例を示している。"
7866
7867 #. type: Plain text
7868 #: build/C/man3/pthread_setname_np.3:122
7869 msgid "The following shell session shows a sample run of the program:"
7870 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7871
7872 #. type: Plain text
7873 #: build/C/man3/pthread_setname_np.3:138
7874 #, no-wrap
7875 msgid ""
7876 "$B< ./a.out>\n"
7877 "Created a thread. Default name is: a.out\n"
7878 "The thread name after setting it is THREADFOO.\n"
7879 "B<^Z>                           # Suspend the program\n"
7880 "[1]+  Stopped           ./a.out\n"
7881 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7882 "  PID   TID CMD                         COMMAND\n"
7883 " 5990  5990 ./a.out                     a.out\n"
7884 " 5990  5991 ./a.out                     THREADFOO\n"
7885 "$ B<cat /proc/5990/task/5990/comm>\n"
7886 "a.out\n"
7887 "$ B<cat /proc/5990/task/5991/comm>\n"
7888 "THREADFOO\n"
7889 msgstr ""
7890 "$B< ./a.out>\n"
7891 "Created a thread. Default name is: a.out\n"
7892 "The thread name after setting it is THREADFOO.\n"
7893 "B<^Z>                           # Suspend the program\n"
7894 "[1]+  Stopped           ./a.out\n"
7895 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7896 "  PID   TID CMD                         COMMAND\n"
7897 " 5990  5990 ./a.out                     a.out\n"
7898 " 5990  5991 ./a.out                     THREADFOO\n"
7899 "$ B<cat /proc/5990/task/5990/comm>\n"
7900 "a.out\n"
7901 "$ B<cat /proc/5990/task/5991/comm>\n"
7902 "THREADFOO\n"
7903
7904 #. type: Plain text
7905 #: build/C/man3/pthread_setname_np.3:150
7906 #, no-wrap
7907 msgid ""
7908 "#define _GNU_SOURCE\n"
7909 "#include E<lt>pthread.hE<gt>\n"
7910 "#include E<lt>stdio.hE<gt>\n"
7911 "#include E<lt>string.hE<gt>\n"
7912 "#include E<lt>unistd.hE<gt>\n"
7913 "#include E<lt>errno.hE<gt>\n"
7914 "#include E<lt>stdlib.hE<gt>\n"
7915 msgstr ""
7916 "#define _GNU_SOURCE\n"
7917 "#include E<lt>pthread.hE<gt>\n"
7918 "#include E<lt>stdio.hE<gt>\n"
7919 "#include E<lt>string.hE<gt>\n"
7920 "#include E<lt>unistd.hE<gt>\n"
7921 "#include E<lt>errno.hE<gt>\n"
7922 "#include E<lt>stdlib.hE<gt>\n"
7923
7924 #. type: Plain text
7925 #: build/C/man3/pthread_setname_np.3:152
7926 #, no-wrap
7927 msgid "#define NAMELEN 16\n"
7928 msgstr "#define NAMELEN 16\n"
7929
7930 #. type: Plain text
7931 #: build/C/man3/pthread_setname_np.3:156
7932 #, no-wrap
7933 msgid ""
7934 "#define errExitEN(en, msg) \\e\n"
7935 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7936 "        } while (0)\n"
7937 msgstr ""
7938 "#define errExitEN(en, msg) \\e\n"
7939 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7940 "        } while (0)\n"
7941
7942 #. type: Plain text
7943 #: build/C/man3/pthread_setname_np.3:163
7944 #, no-wrap
7945 msgid ""
7946 "static void *\n"
7947 "threadfunc(void *parm)\n"
7948 "{\n"
7949 "    sleep(5);          // allow main program to set the thread name\n"
7950 "    return NULL;\n"
7951 "}\n"
7952 msgstr ""
7953 "static void *\n"
7954 "threadfunc(void *parm)\n"
7955 "{\n"
7956 "    sleep(5);          // allow main program to set the thread name\n"
7957 "    return NULL;\n"
7958 "}\n"
7959
7960 #. type: Plain text
7961 #: build/C/man3/pthread_setname_np.3:170
7962 #, no-wrap
7963 msgid ""
7964 "int\n"
7965 "main(int argc, char **argv)\n"
7966 "{\n"
7967 "    pthread_t thread;\n"
7968 "    int rc;\n"
7969 "    char thread_name[NAMELEN];\n"
7970 msgstr ""
7971 "int\n"
7972 "main(int argc, char **argv)\n"
7973 "{\n"
7974 "    pthread_t thread;\n"
7975 "    int rc;\n"
7976 "    char thread_name[NAMELEN];\n"
7977
7978 #. type: Plain text
7979 #: build/C/man3/pthread_setname_np.3:174
7980 #, no-wrap
7981 msgid ""
7982 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7983 "    if (rc != 0)\n"
7984 "        errExitEN(rc, \"pthread_create\");\n"
7985 msgstr ""
7986 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7987 "    if (rc != 0)\n"
7988 "        errExitEN(rc, \"pthread_create\");\n"
7989
7990 #. type: Plain text
7991 #: build/C/man3/pthread_setname_np.3:178
7992 #, no-wrap
7993 msgid ""
7994 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7995 "    if (rc != 0)\n"
7996 "        errExitEN(rc, \"pthread_getname_np\");\n"
7997 msgstr ""
7998 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7999 "    if (rc != 0)\n"
8000 "        errExitEN(rc, \"pthread_getname_np\");\n"
8001
8002 #. type: Plain text
8003 #: build/C/man3/pthread_setname_np.3:183
8004 #, no-wrap
8005 msgid ""
8006 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8007 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8008 "    if (rc != 0)\n"
8009 "        errExitEN(rc, \"pthread_setname_np\");\n"
8010 msgstr ""
8011 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8012 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8013 "    if (rc != 0)\n"
8014 "        errExitEN(rc, \"pthread_setname_np\");\n"
8015
8016 #. type: Plain text
8017 #: build/C/man3/pthread_setname_np.3:185
8018 #, no-wrap
8019 msgid "    sleep(2);\n"
8020 msgstr "    sleep(2);\n"
8021
8022 #. type: Plain text
8023 #: build/C/man3/pthread_setname_np.3:191
8024 #, no-wrap
8025 msgid ""
8026 "    rc = pthread_getname_np(thread, thread_name,\n"
8027 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8028 "    if (rc != 0)\n"
8029 "        errExitEN(rc, \"pthread_getname_np\");\n"
8030 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8031 msgstr ""
8032 "    rc = pthread_getname_np(thread, thread_name,\n"
8033 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8034 "    if (rc != 0)\n"
8035 "        errExitEN(rc, \"pthread_getname_np\");\n"
8036 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8037
8038 #. type: Plain text
8039 #: build/C/man3/pthread_setname_np.3:195
8040 #, no-wrap
8041 msgid ""
8042 "    rc = pthread_join(thread, NULL);\n"
8043 "    if (rc != 0)\n"
8044 "        errExitEN(rc, \"pthread_join\");\n"
8045 msgstr ""
8046 "    rc = pthread_join(thread, NULL);\n"
8047 "    if (rc != 0)\n"
8048 "        errExitEN(rc, \"pthread_join\");\n"
8049
8050 #. type: Plain text
8051 #: build/C/man3/pthread_setname_np.3:199
8052 #, no-wrap
8053 msgid ""
8054 "    printf(\"Done\\en\");\n"
8055 "    exit(EXIT_SUCCESS);\n"
8056 "}\n"
8057 msgstr ""
8058 "    printf(\"Done\\en\");\n"
8059 "    exit(EXIT_SUCCESS);\n"
8060 "}\n"
8061
8062 #. type: Plain text
8063 #: build/C/man3/pthread_setname_np.3:206
8064 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8065 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8066
8067 #. type: TH
8068 #: build/C/man3/pthread_setschedparam.3:26
8069 #, no-wrap
8070 msgid "PTHREAD_SETSCHEDPARAM"
8071 msgstr "PTHREAD_SETSCHEDPARAM"
8072
8073 #. type: Plain text
8074 #: build/C/man3/pthread_setschedparam.3:30
8075 msgid ""
8076 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8077 "parameters of a thread"
8078 msgstr ""
8079 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8080 "スケジューリングポリシーとパラメータを設定/取得する"
8081
8082 #. type: Plain text
8083 #: build/C/man3/pthread_setschedparam.3:38
8084 #, no-wrap
8085 msgid ""
8086 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8087 "B<                      const struct sched_param *>I<param>B<);>\n"
8088 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8089 "B<                      struct sched_param *>I<param>B<);>\n"
8090 msgstr ""
8091 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8092 "B<                      const struct sched_param *>I<param>B<);>\n"
8093 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8094 "B<                      struct sched_param *>I<param>B<);>\n"
8095
8096 #. type: Plain text
8097 #: build/C/man3/pthread_setschedparam.3:46
8098 msgid ""
8099 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8100 "parameters of the thread I<thread>."
8101 msgstr ""
8102 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8103 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8104
8105 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8106 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8107 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8108 #. type: Plain text
8109 #: build/C/man3/pthread_setschedparam.3:57
8110 msgid ""
8111 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8112 "values for I<policy>, and their semantics, are described in "
8113 "B<sched_setscheduler>(2)."
8114 msgstr ""
8115 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8116 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8117 "説明されている。"
8118
8119 #. type: Plain text
8120 #: build/C/man3/pthread_setschedparam.3:63
8121 msgid ""
8122 "The structure pointed to by I<param> specifies the new scheduling parameters "
8123 "for I<thread>.  Scheduling parameters are maintained in the following "
8124 "structure:"
8125 msgstr ""
8126 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8127 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8128
8129 #.  FIXME . nptl/pthread_setschedparam.c has the following
8130 #.    /* If the thread should have higher priority because of some
8131 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8132 #.  Eventually (perhaps after writing the mutexattr pages), we
8133 #.  may want to add something on the topic to this page.
8134 #. type: Plain text
8135 #: build/C/man3/pthread_setschedparam.3:104
8136 msgid ""
8137 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8138 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8139 "and I<param>, respectively.  The returned priority value is that set by the "
8140 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8141 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8142 "does not reflect any temporary priority adjustments as a result of calls to "
8143 "any priority inheritance or priority ceiling functions (see, for example, "
8144 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8145 "(3))."
8146 msgstr ""
8147 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8148 "スケジューリングポリシーとパラメータを、\n"
8149 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8150 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8151 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8152 "B<pthread_create> で設定された値となる。\n"
8153 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8154 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8155 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8156 "行われる一時的な優先度の調整の影響を受けない。"
8157
8158 #. type: Plain text
8159 #: build/C/man3/pthread_setschedparam.3:112
8160 msgid ""
8161 "On success, these functions return 0; on error, they return a nonzero error "
8162 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8163 "parameters of I<thread> are not changed."
8164 msgstr ""
8165 "成功すると、これらの関数は 0 を返す。\n"
8166 "エラーの場合、0 以外のエラー番号を返す。\n"
8167 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8168 "スケジューリングポリシーとパラメータは変更されない。"
8169
8170 #. type: Plain text
8171 #: build/C/man3/pthread_setschedparam.3:114
8172 msgid "Both of these functions can fail with the following error:"
8173 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8174
8175 #. type: Plain text
8176 #: build/C/man3/pthread_setschedparam.3:122
8177 msgid ""
8178 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8179 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8180
8181 #. type: Plain text
8182 #: build/C/man3/pthread_setschedparam.3:129
8183 msgid ""
8184 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8185 "the I<policy>."
8186 msgstr ""
8187 "I<policy> が認識できないポリシーであるか、\n"
8188 "I<param> が I<policy> では意味を持たない値である。"
8189
8190 #. type: Plain text
8191 #: build/C/man3/pthread_setschedparam.3:133
8192 msgid ""
8193 "The caller does not have appropriate privileges to set the specified "
8194 "scheduling policy and parameters."
8195 msgstr ""
8196 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8197 "のに必要な特権を持たない。"
8198
8199 #.  .SH VERSIONS
8200 #.  Available since glibc 2.0
8201 #. type: Plain text
8202 #: build/C/man3/pthread_setschedparam.3:141
8203 msgid ""
8204 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8205 "policy or scheduling parameters to an unsupported value\") error for "
8206 "B<pthread_setschedparam>()."
8207 msgstr ""
8208 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8209 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8210 "パラメータに設定しようとした\") も追加で規定されている。"
8211
8212 #. type: Plain text
8213 #: build/C/man3/pthread_setschedparam.3:149
8214 msgid ""
8215 "For a description of the permissions required to, and the effect of, "
8216 "changing a thread's scheduling policy and priority, and details of the "
8217 "permitted ranges for priorities in each scheduling policy, see "
8218 "B<sched_setscheduler>(2)."
8219 msgstr ""
8220 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8221 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8222 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8223
8224 #. type: Plain text
8225 #: build/C/man3/pthread_setschedparam.3:156
8226 msgid ""
8227 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8228 "B<pthread_getschedparam>(), as well as the use of a number of other "
8229 "scheduling-related pthreads functions."
8230 msgstr ""
8231 "以下のプログラムは B<pthread_setschedparam>() と\n"
8232 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8233 "他のいろいろな関数の使用例を示すものである。"
8234
8235 #. type: Plain text
8236 #: build/C/man3/pthread_setschedparam.3:172
8237 msgid ""
8238 "In the following run, the main thread sets its scheduling policy to "
8239 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8240 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8241 "priority attribute of 20.  The program then sets (using "
8242 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8243 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8244 "created using this attributes object should take their scheduling attributes "
8245 "from the thread attributes object.  The program then creates a thread using "
8246 "the thread attributes object, and that thread displays its scheduling policy "
8247 "and priority."
8248 msgstr ""
8249 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8250 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8251 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8252 "属性 20 で初期化する。\n"
8253 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8254 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8255 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8256 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8257 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8258 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8259 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8260
8261 #. type: Plain text
8262 #: build/C/man3/pthread_setschedparam.3:180
8263 #, no-wrap
8264 msgid ""
8265 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8266 "Password:\n"
8267 "# B<./a.out -mf10 -ar20 -i e>\n"
8268 "Scheduler settings of main thread\n"
8269 "    policy=SCHED_FIFO, priority=10\n"
8270 msgstr ""
8271 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8272 "Password:\n"
8273 "# B<./a.out -mf10 -ar20 -i e>\n"
8274 "Scheduler settings of main thread\n"
8275 "    policy=SCHED_FIFO, priority=10\n"
8276
8277 #. type: Plain text
8278 #: build/C/man3/pthread_setschedparam.3:184
8279 #, no-wrap
8280 msgid ""
8281 "Scheduler settings in \\(aqattr\\(aq\n"
8282 "    policy=SCHED_RR, priority=20\n"
8283 "    inheritsched is EXPLICIT\n"
8284 msgstr ""
8285 "Scheduler settings in \\(aqattr\\(aq\n"
8286 "    policy=SCHED_RR, priority=20\n"
8287 "    inheritsched is EXPLICIT\n"
8288
8289 #. type: Plain text
8290 #: build/C/man3/pthread_setschedparam.3:187
8291 #, no-wrap
8292 msgid ""
8293 "Scheduler attributes of new thread\n"
8294 "    policy=SCHED_RR, priority=20\n"
8295 msgstr ""
8296 "Scheduler attributes of new thread\n"
8297 "    policy=SCHED_RR, priority=20\n"
8298
8299 #. type: Plain text
8300 #: build/C/man3/pthread_setschedparam.3:192
8301 msgid ""
8302 "In the above output, one can see that the scheduling policy and priority "
8303 "were taken from the values specified in the thread attributes object."
8304 msgstr ""
8305 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8306 "オブジェクトで指定された値から取られていることが分かる。"
8307
8308 #. type: Plain text
8309 #: build/C/man3/pthread_setschedparam.3:199
8310 msgid ""
8311 "The next run is the same as the previous, except that the inherit scheduler "
8312 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8313 "using the thread attributes object should ignore the scheduling attributes "
8314 "specified in the attributes object and instead take their scheduling "
8315 "attributes from the creating thread."
8316 msgstr ""
8317 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8318 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8319 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8320 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8321 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8322 "ことを意味する。"
8323
8324 #. type: Plain text
8325 #: build/C/man3/pthread_setschedparam.3:205
8326 #, no-wrap
8327 msgid ""
8328 "# B<./a.out -mf10 -ar20 -i i>\n"
8329 "Scheduler settings of main thread\n"
8330 "    policy=SCHED_FIFO, priority=10\n"
8331 msgstr ""
8332 "# B<./a.out -mf10 -ar20 -i i>\n"
8333 "Scheduler settings of main thread\n"
8334 "    policy=SCHED_FIFO, priority=10\n"
8335
8336 #. type: Plain text
8337 #: build/C/man3/pthread_setschedparam.3:209
8338 #, no-wrap
8339 msgid ""
8340 "Scheduler settings in \\(aqattr\\(aq\n"
8341 "    policy=SCHED_RR, priority=20\n"
8342 "    inheritsched is INHERIT\n"
8343 msgstr ""
8344 "Scheduler settings in \\(aqattr\\(aq\n"
8345 "    policy=SCHED_RR, priority=20\n"
8346 "    inheritsched is INHERIT\n"
8347
8348 #. type: Plain text
8349 #: build/C/man3/pthread_setschedparam.3:212
8350 #, no-wrap
8351 msgid ""
8352 "Scheduler attributes of new thread\n"
8353 "    policy=SCHED_FIFO, priority=10\n"
8354 msgstr ""
8355 "Scheduler attributes of new thread\n"
8356 "    policy=SCHED_FIFO, priority=10\n"
8357
8358 #. type: Plain text
8359 #: build/C/man3/pthread_setschedparam.3:218
8360 msgid ""
8361 "In the above output, one can see that the scheduling policy and priority "
8362 "were taken from the creating thread, rather than the thread attributes "
8363 "object."
8364 msgstr ""
8365 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8366 "スレッド属性オブジェクトからではなく、\n"
8367 "スレッドを作成したスレッドから取れれていることが分かる。"
8368
8369 #. type: Plain text
8370 #: build/C/man3/pthread_setschedparam.3:224
8371 msgid ""
8372 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8373 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8374 "scheduler attribute."
8375 msgstr ""
8376 "なお、 I<-i\\ i> を省略した場合でも、\n"
8377 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8378 "出力は同じになる。"
8379
8380 #. type: Plain text
8381 #: build/C/man3/pthread_setschedparam.3:228
8382 #, no-wrap
8383 msgid "/* pthreads_sched_test.c */\n"
8384 msgstr "/* pthreads_sched_test.c */\n"
8385
8386 #. type: Plain text
8387 #: build/C/man3/pthread_setschedparam.3:234
8388 #, no-wrap
8389 msgid ""
8390 "#include E<lt>pthread.hE<gt>\n"
8391 "#include E<lt>stdio.hE<gt>\n"
8392 "#include E<lt>stdlib.hE<gt>\n"
8393 "#include E<lt>unistd.hE<gt>\n"
8394 "#include E<lt>errno.hE<gt>\n"
8395 msgstr ""
8396 "#include E<lt>pthread.hE<gt>\n"
8397 "#include E<lt>stdio.hE<gt>\n"
8398 "#include E<lt>stdlib.hE<gt>\n"
8399 "#include E<lt>unistd.hE<gt>\n"
8400 "#include E<lt>errno.hE<gt>\n"
8401
8402 #. type: Plain text
8403 #: build/C/man3/pthread_setschedparam.3:243
8404 #, no-wrap
8405 msgid ""
8406 "static void\n"
8407 "usage(char *prog_name, char *msg)\n"
8408 "{\n"
8409 "    if (msg != NULL)\n"
8410 "        fputs(msg, stderr);\n"
8411 msgstr ""
8412 "static void\n"
8413 "usage(char *prog_name, char *msg)\n"
8414 "{\n"
8415 "    if (msg != NULL)\n"
8416 "        fputs(msg, stderr);\n"
8417
8418 #. type: Plain text
8419 #: build/C/man3/pthread_setschedparam.3:260
8420 #, no-wrap
8421 msgid ""
8422 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8423 "    fprintf(stderr, \"Options are:\\en\");\n"
8424 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8425 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8426 "    fpe(\"                 thread attributes object\\en\");\n"
8427 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8428 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8429 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8430 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8431 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8432 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8433 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8434 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8435 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8436 "    exit(EXIT_FAILURE);\n"
8437 "}\n"
8438 msgstr ""
8439 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8440 "    fprintf(stderr, \"Options are:\\en\");\n"
8441 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8442 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8443 "    fpe(\"                 thread attributes object\\en\");\n"
8444 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8445 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8446 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8447 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8448 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8449 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8450 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8451 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8452 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8453 "    exit(EXIT_FAILURE);\n"
8454 "}\n"
8455
8456 #. type: Plain text
8457 #: build/C/man3/pthread_setschedparam.3:271
8458 #, no-wrap
8459 msgid ""
8460 "static int\n"
8461 "get_policy(char p, int *policy)\n"
8462 "{\n"
8463 "    switch (p) {\n"
8464 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8465 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8466 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8467 "    default:  return 0;\n"
8468 "    }\n"
8469 "}\n"
8470 msgstr ""
8471 "static int\n"
8472 "get_policy(char p, int *policy)\n"
8473 "{\n"
8474 "    switch (p) {\n"
8475 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8476 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8477 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8478 "    default:  return 0;\n"
8479 "    }\n"
8480 "}\n"
8481
8482 #. type: Plain text
8483 #: build/C/man3/pthread_setschedparam.3:282
8484 #, no-wrap
8485 msgid ""
8486 "static void\n"
8487 "display_sched_attr(int policy, struct sched_param *param)\n"
8488 "{\n"
8489 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8490 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8491 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8492 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8493 "            \"???\",\n"
8494 "            param-E<gt>sched_priority);\n"
8495 "}\n"
8496 msgstr ""
8497 "static void\n"
8498 "display_sched_attr(int policy, struct sched_param *param)\n"
8499 "{\n"
8500 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8501 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8502 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8503 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8504 "            \"???\",\n"
8505 "            param-E<gt>sched_priority);\n"
8506 "}\n"
8507
8508 #. type: Plain text
8509 #: build/C/man3/pthread_setschedparam.3:288
8510 #, no-wrap
8511 msgid ""
8512 "static void\n"
8513 "display_thread_sched_attr(char *msg)\n"
8514 "{\n"
8515 "    int policy, s;\n"
8516 "    struct sched_param param;\n"
8517 msgstr ""
8518 "static void\n"
8519 "display_thread_sched_attr(char *msg)\n"
8520 "{\n"
8521 "    int policy, s;\n"
8522 "    struct sched_param param;\n"
8523
8524 #. type: Plain text
8525 #: build/C/man3/pthread_setschedparam.3:292
8526 #, no-wrap
8527 msgid ""
8528 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8529 "    if (s != 0)\n"
8530 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8531 msgstr ""
8532 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8533 "    if (s != 0)\n"
8534 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8535
8536 #. type: Plain text
8537 #: build/C/man3/pthread_setschedparam.3:296
8538 #, no-wrap
8539 msgid ""
8540 "    printf(\"%s\\en\", msg);\n"
8541 "    display_sched_attr(policy, &param);\n"
8542 "}\n"
8543 msgstr ""
8544 "    printf(\"%s\\en\", msg);\n"
8545 "    display_sched_attr(policy, &param);\n"
8546 "}\n"
8547
8548 #. type: Plain text
8549 #: build/C/man3/pthread_setschedparam.3:301
8550 #, no-wrap
8551 msgid ""
8552 "static void *\n"
8553 "thread_start(void *arg)\n"
8554 "{\n"
8555 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8556 msgstr ""
8557 "static void *\n"
8558 "thread_start(void *arg)\n"
8559 "{\n"
8560 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8561
8562 #. type: Plain text
8563 #: build/C/man3/pthread_setschedparam.3:304
8564 #, no-wrap
8565 msgid ""
8566 "    return NULL;\n"
8567 "}\n"
8568 msgstr ""
8569 "    return NULL;\n"
8570 "}\n"
8571
8572 #. type: Plain text
8573 #: build/C/man3/pthread_setschedparam.3:314
8574 #, no-wrap
8575 msgid ""
8576 "int\n"
8577 "main(int argc, char *argv[])\n"
8578 "{\n"
8579 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8580 "    pthread_t thread;\n"
8581 "    pthread_attr_t attr;\n"
8582 "    pthread_attr_t *attrp;\n"
8583 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8584 "    struct sched_param param;\n"
8585 msgstr ""
8586 "int\n"
8587 "main(int argc, char *argv[])\n"
8588 "{\n"
8589 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8590 "    pthread_t thread;\n"
8591 "    pthread_attr_t attr;\n"
8592 "    pthread_attr_t *attrp;\n"
8593 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8594 "    struct sched_param param;\n"
8595
8596 #. type: Plain text
8597 #: build/C/man3/pthread_setschedparam.3:316
8598 #, no-wrap
8599 msgid "    /* Process command-line options */\n"
8600 msgstr "    /* Process command-line options */\n"
8601
8602 #. type: Plain text
8603 #: build/C/man3/pthread_setschedparam.3:321
8604 #, no-wrap
8605 msgid ""
8606 "    use_null_attrib = 0;\n"
8607 "    attr_sched_str = NULL;\n"
8608 "    main_sched_str = NULL;\n"
8609 "    inheritsched_str = NULL;\n"
8610 msgstr ""
8611 "    use_null_attrib = 0;\n"
8612 "    attr_sched_str = NULL;\n"
8613 "    main_sched_str = NULL;\n"
8614 "    inheritsched_str = NULL;\n"
8615
8616 #. type: Plain text
8617 #: build/C/man3/pthread_setschedparam.3:331
8618 #, no-wrap
8619 msgid ""
8620 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8621 "        switch (opt) {\n"
8622 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8623 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8624 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8625 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8626 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8627 "        }\n"
8628 "    }\n"
8629 msgstr ""
8630 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8631 "        switch (opt) {\n"
8632 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8633 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8634 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8635 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8636 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8637 "        }\n"
8638 "    }\n"
8639
8640 #. type: Plain text
8641 #: build/C/man3/pthread_setschedparam.3:335
8642 #, no-wrap
8643 msgid ""
8644 "    if (use_null_attrib &&\n"
8645 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8646 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8647 msgstr ""
8648 "    if (use_null_attrib &&\n"
8649 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8650 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8651
8652 #. type: Plain text
8653 #: build/C/man3/pthread_setschedparam.3:338
8654 #, no-wrap
8655 msgid ""
8656 "    /* Optionally set scheduling attributes of main thread,\n"
8657 "       and display the attributes */\n"
8658 msgstr ""
8659 "    /* Optionally set scheduling attributes of main thread,\n"
8660 "       and display the attributes */\n"
8661
8662 #. type: Plain text
8663 #: build/C/man3/pthread_setschedparam.3:343
8664 #, no-wrap
8665 msgid ""
8666 "    if (main_sched_str != NULL) {\n"
8667 "        if (!get_policy(main_sched_str[0], &policy))\n"
8668 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8669 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8670 msgstr ""
8671 "    if (main_sched_str != NULL) {\n"
8672 "        if (!get_policy(main_sched_str[0], &policy))\n"
8673 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8674 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8675
8676 #. type: Plain text
8677 #: build/C/man3/pthread_setschedparam.3:348
8678 #, no-wrap
8679 msgid ""
8680 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8681 "        if (s != 0)\n"
8682 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8683 "    }\n"
8684 msgstr ""
8685 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8686 "        if (s != 0)\n"
8687 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8688 "    }\n"
8689
8690 #. type: Plain text
8691 #: build/C/man3/pthread_setschedparam.3:351
8692 #, no-wrap
8693 msgid ""
8694 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8695 "    printf(\"\\en\");\n"
8696 msgstr ""
8697 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8698 "    printf(\"\\en\");\n"
8699
8700 #. type: Plain text
8701 #: build/C/man3/pthread_setschedparam.3:353
8702 #, no-wrap
8703 msgid "    /* Initialize thread attributes object according to options */\n"
8704 msgstr "    /* Initialize thread attributes object according to options */\n"
8705
8706 #. type: Plain text
8707 #: build/C/man3/pthread_setschedparam.3:362
8708 #, no-wrap
8709 msgid ""
8710 "    if (!use_null_attrib) {\n"
8711 "        s = pthread_attr_init(&attr);\n"
8712 "        if (s != 0)\n"
8713 "            handle_error_en(s, \"pthread_attr_init\");\n"
8714 "        attrp = &attr;\n"
8715 "    }\n"
8716 msgstr ""
8717 "    if (!use_null_attrib) {\n"
8718 "        s = pthread_attr_init(&attr);\n"
8719 "        if (s != 0)\n"
8720 "            handle_error_en(s, \"pthread_attr_init\");\n"
8721 "        attrp = &attr;\n"
8722 "    }\n"
8723
8724 #. type: Plain text
8725 #: build/C/man3/pthread_setschedparam.3:370
8726 #, no-wrap
8727 msgid ""
8728 "    if (inheritsched_str != NULL) {\n"
8729 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8730 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8731 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8732 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8733 "        else\n"
8734 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8735 msgstr ""
8736 "    if (inheritsched_str != NULL) {\n"
8737 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8738 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8739 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8740 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8741 "        else\n"
8742 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8743
8744 #. type: Plain text
8745 #: build/C/man3/pthread_setschedparam.3:375
8746 #, no-wrap
8747 msgid ""
8748 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8749 "        if (s != 0)\n"
8750 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8751 "    }\n"
8752 msgstr ""
8753 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8754 "        if (s != 0)\n"
8755 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8756 "    }\n"
8757
8758 #. type: Plain text
8759 #: build/C/man3/pthread_setschedparam.3:381
8760 #, no-wrap
8761 msgid ""
8762 "    if (attr_sched_str != NULL) {\n"
8763 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8764 "            usage(argv[0],\n"
8765 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8766 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8767 msgstr ""
8768 "    if (attr_sched_str != NULL) {\n"
8769 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8770 "            usage(argv[0],\n"
8771 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8772 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8773
8774 #. type: Plain text
8775 #: build/C/man3/pthread_setschedparam.3:389
8776 #, no-wrap
8777 msgid ""
8778 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8779 "        if (s != 0)\n"
8780 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8781 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8782 "        if (s != 0)\n"
8783 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8784 "    }\n"
8785 msgstr ""
8786 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8787 "        if (s != 0)\n"
8788 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8789 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8790 "        if (s != 0)\n"
8791 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8792 "    }\n"
8793
8794 #. type: Plain text
8795 #: build/C/man3/pthread_setschedparam.3:392
8796 #, no-wrap
8797 msgid ""
8798 "    /* If we initialized a thread attributes object, display\n"
8799 "       the scheduling attributes that were set in the object */\n"
8800 msgstr ""
8801 "    /* If we initialized a thread attributes object, display\n"
8802 "       the scheduling attributes that were set in the object */\n"
8803
8804 #. type: Plain text
8805 #: build/C/man3/pthread_setschedparam.3:400
8806 #, no-wrap
8807 msgid ""
8808 "    if (attrp != NULL) {\n"
8809 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8810 "        if (s != 0)\n"
8811 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8812 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8813 "        if (s != 0)\n"
8814 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8815 msgstr ""
8816 "    if (attrp != NULL) {\n"
8817 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8818 "        if (s != 0)\n"
8819 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8820 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8821 "        if (s != 0)\n"
8822 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8823
8824 #. type: Plain text
8825 #: build/C/man3/pthread_setschedparam.3:403
8826 #, no-wrap
8827 msgid ""
8828 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8829 "        display_sched_attr(policy, &param);\n"
8830 msgstr ""
8831 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8832 "        display_sched_attr(policy, &param);\n"
8833
8834 #. type: Plain text
8835 #: build/C/man3/pthread_setschedparam.3:411
8836 #, no-wrap
8837 msgid ""
8838 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8839 "        printf(\"    inheritsched is %s\\en\",\n"
8840 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8841 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8842 "                \"???\");\n"
8843 "        printf(\"\\en\");\n"
8844 "    }\n"
8845 msgstr ""
8846 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8847 "        printf(\"    inheritsched is %s\\en\",\n"
8848 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8849 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8850 "                \"???\");\n"
8851 "        printf(\"\\en\");\n"
8852 "    }\n"
8853
8854 #. type: Plain text
8855 #: build/C/man3/pthread_setschedparam.3:413
8856 #, no-wrap
8857 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8858 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8859
8860 #. type: Plain text
8861 #: build/C/man3/pthread_setschedparam.3:417
8862 #, no-wrap
8863 msgid ""
8864 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8865 "    if (s != 0)\n"
8866 "        handle_error_en(s, \"pthread_create\");\n"
8867 msgstr ""
8868 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8869 "    if (s != 0)\n"
8870 "        handle_error_en(s, \"pthread_create\");\n"
8871
8872 #. type: Plain text
8873 #: build/C/man3/pthread_setschedparam.3:419
8874 #, no-wrap
8875 msgid "    /* Destroy unneeded thread attributes object */\n"
8876 msgstr "    /* Destroy unneeded thread attributes object */\n"
8877
8878 #. type: Plain text
8879 #: build/C/man3/pthread_setschedparam.3:427
8880 #, no-wrap
8881 msgid ""
8882 "    s = pthread_join(thread, NULL);\n"
8883 "    if (s != 0)\n"
8884 "        handle_error_en(s, \"pthread_join\");\n"
8885 msgstr ""
8886 "    s = pthread_join(thread, NULL);\n"
8887 "    if (s != 0)\n"
8888 "        handle_error_en(s, \"pthread_join\");\n"
8889
8890 #. type: Plain text
8891 #: build/C/man3/pthread_setschedparam.3:445
8892 msgid ""
8893 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8894 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8895 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8896 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8897 "B<pthreads>(7)"
8898 msgstr ""
8899 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8900 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8901 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8902 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8903 "B<pthreads>(7)"
8904
8905 #. type: TH
8906 #: build/C/man3/pthread_setschedprio.3:26
8907 #, no-wrap
8908 msgid "PTHREAD_SETSCHEDPRIO"
8909 msgstr "PTHREAD_SETSCHEDPRIO"
8910
8911 #. type: TH
8912 #: build/C/man3/pthread_setschedprio.3:26
8913 #, no-wrap
8914 msgid "2008-11-06"
8915 msgstr "2008-11-06"
8916
8917 #. type: Plain text
8918 #: build/C/man3/pthread_setschedprio.3:29
8919 msgid "pthread_setschedprio - set scheduling priority of a thread"
8920 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8921
8922 #. type: Plain text
8923 #: build/C/man3/pthread_setschedprio.3:34
8924 #, no-wrap
8925 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8926 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8927
8928 #.  FIXME . nptl/pthread_setschedprio.c has the following
8929 #.    /* If the thread should have higher priority because of some
8930 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8931 #.  Eventually (perhaps after writing the mutexattr pages), we
8932 #.  may want to add something on the topic to this page.
8933 #.  nptl/pthread_setschedparam.c has a similar case.
8934 #. type: Plain text
8935 #: build/C/man3/pthread_setschedprio.3:53
8936 msgid ""
8937 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8938 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8939 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8940 "of a thread.)"
8941 msgstr ""
8942 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8943 "優先度に I<prio> で指定された値を設定する\n"
8944 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8945 "と優先度の両方を変更する)。"
8946
8947 #. type: Plain text
8948 #: build/C/man3/pthread_setschedprio.3:61
8949 msgid ""
8950 "On success, this function returns 0; on error, it returns a nonzero error "
8951 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8952 "I<thread> is not changed."
8953 msgstr ""
8954 "成功すると、この関数は 0 を返す。\n"
8955 "エラーの場合、0 以外のエラー番号を返す。\n"
8956 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8957 "スケジューリング優先度は変更されない。"
8958
8959 #. type: Plain text
8960 #: build/C/man3/pthread_setschedprio.3:66
8961 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8962 msgstr ""
8963 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8964
8965 #. type: Plain text
8966 #: build/C/man3/pthread_setschedprio.3:70
8967 msgid ""
8968 "The caller does not have appropriate privileges to set the specified "
8969 "priority."
8970 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8971
8972 #. type: Plain text
8973 #: build/C/man3/pthread_setschedprio.3:81
8974 msgid ""
8975 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8976 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
8977 msgstr ""
8978 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
8979 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
8980 "に設定しようとした\") も追加で規定されている。"
8981
8982 #. type: Plain text
8983 #: build/C/man3/pthread_setschedprio.3:83
8984 msgid "This function is available in glibc since version 2.3.4."
8985 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
8986
8987 #. type: Plain text
8988 #: build/C/man3/pthread_setschedprio.3:91
8989 msgid ""
8990 "For a description of the permissions required to, and the effect of, "
8991 "changing a thread's scheduling priority, and details of the permitted ranges "
8992 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
8993 msgstr ""
8994 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
8995 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8996 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8997
8998 #. type: Plain text
8999 #: build/C/man3/pthread_setschedprio.3:105
9000 msgid ""
9001 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9002 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9003 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9004 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9005 "B<pthreads>(7)"
9006 msgstr ""
9007 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9008 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9009 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9010 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9011 "B<pthreads>(7)"
9012
9013 #. type: TH
9014 #: build/C/man3/pthread_sigmask.3:26
9015 #, no-wrap
9016 msgid "PTHREAD_SIGMASK"
9017 msgstr "PTHREAD_SIGMASK"
9018
9019 #. type: Plain text
9020 #: build/C/man3/pthread_sigmask.3:29
9021 msgid "pthread_sigmask - examine and change mask of blocked signals"
9022 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
9023
9024 #. type: Plain text
9025 #: build/C/man3/pthread_sigmask.3:35
9026 #, no-wrap
9027 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9028 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9029
9030 #. type: Plain text
9031 #: build/C/man3/pthread_sigmask.3:46
9032 msgid "B<pthread_sigmask>():"
9033 msgstr "B<pthread_sigmask>():"
9034
9035 #. type: Plain text
9036 #: build/C/man3/pthread_sigmask.3:58
9037 msgid ""
9038 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9039 "difference that its use in multithreaded programs is explicitly specified by "
9040 "POSIX.1-2001.  Other differences are noted in this page."
9041 msgstr ""
9042 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9043 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9044 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9045
9046 #. type: Plain text
9047 #: build/C/man3/pthread_sigmask.3:61
9048 msgid ""
9049 "For a description of the arguments and operation of this function, see "
9050 "B<sigprocmask>(2)."
9051 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9052
9053 #. type: Plain text
9054 #: build/C/man3/pthread_sigmask.3:66
9055 msgid ""
9056 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9057 "number."
9058 msgstr ""
9059 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9060 "エラーの場合、エラー番号を返す。"
9061
9062 #. type: Plain text
9063 #: build/C/man3/pthread_sigmask.3:69
9064 msgid "See B<sigprocmask>(2)."
9065 msgstr "B<sigprocmask>(2) を参照。"
9066
9067 #. type: Plain text
9068 #: build/C/man3/pthread_sigmask.3:73
9069 msgid "A new thread inherits a copy of its creator's signal mask."
9070 msgstr ""
9071 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9072 "継承する。"
9073
9074 #. type: Plain text
9075 #: build/C/man3/pthread_sigmask.3:78
9076 msgid ""
9077 "The program below blocks some signals in the main thread, and then creates a "
9078 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9079 "shell session demonstrates its use:"
9080 msgstr ""
9081 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9082 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9083 "専用のスレッドを作成する。\n"
9084 "下記のシェルのセッションはその利用例を示したものである。"
9085
9086 #. type: Plain text
9087 #: build/C/man3/pthread_sigmask.3:89
9088 #, no-wrap
9089 msgid ""
9090 "$B< ./a.out &>\n"
9091 "[1] 5423\n"
9092 "$B< kill -QUIT %1>\n"
9093 "Signal handling thread got signal 3\n"
9094 "$B< kill -USR1 %1>\n"
9095 "Signal handling thread got signal 10\n"
9096 "$B< kill -TERM %1>\n"
9097 "[1]+  Terminated              ./a.out\n"
9098 msgstr ""
9099 "$B< ./a.out &>\n"
9100 "[1] 5423\n"
9101 "$B< kill -QUIT %1>\n"
9102 "Signal handling thread got signal 3\n"
9103 "$B< kill -USR1 %1>\n"
9104 "Signal handling thread got signal 10\n"
9105 "$B< kill -TERM %1>\n"
9106 "[1]+  Terminated              ./a.out\n"
9107
9108 #. type: Plain text
9109 #: build/C/man3/pthread_sigmask.3:100
9110 #, no-wrap
9111 msgid ""
9112 "#include E<lt>pthread.hE<gt>\n"
9113 "#include E<lt>stdio.hE<gt>\n"
9114 "#include E<lt>stdlib.hE<gt>\n"
9115 "#include E<lt>unistd.hE<gt>\n"
9116 "#include E<lt>signal.hE<gt>\n"
9117 "#include E<lt>errno.hE<gt>\n"
9118 msgstr ""
9119 "#include E<lt>pthread.hE<gt>\n"
9120 "#include E<lt>stdio.hE<gt>\n"
9121 "#include E<lt>stdlib.hE<gt>\n"
9122 "#include E<lt>unistd.hE<gt>\n"
9123 "#include E<lt>signal.hE<gt>\n"
9124 "#include E<lt>errno.hE<gt>\n"
9125
9126 #. type: Plain text
9127 #: build/C/man3/pthread_sigmask.3:102
9128 #, no-wrap
9129 msgid "/* Simple error handling functions */\n"
9130 msgstr "/* Simple error handling functions */\n"
9131
9132 #. type: Plain text
9133 #: build/C/man3/pthread_sigmask.3:111
9134 #, no-wrap
9135 msgid ""
9136 "static void *\n"
9137 "sig_thread(void *arg)\n"
9138 "{\n"
9139 "    sigset_t *set = arg;\n"
9140 "    int s, sig;\n"
9141 msgstr ""
9142 "static void *\n"
9143 "sig_thread(void *arg)\n"
9144 "{\n"
9145 "    sigset_t *set = arg;\n"
9146 "    int s, sig;\n"
9147
9148 #. type: Plain text
9149 #: build/C/man3/pthread_sigmask.3:119
9150 #, no-wrap
9151 msgid ""
9152 "    for (;;) {\n"
9153 "        s = sigwait(set, &sig);\n"
9154 "        if (s != 0)\n"
9155 "            handle_error_en(s, \"sigwait\");\n"
9156 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9157 "    }\n"
9158 "}\n"
9159 msgstr ""
9160 "    for (;;) {\n"
9161 "        s = sigwait(set, &sig);\n"
9162 "        if (s != 0)\n"
9163 "            handle_error_en(s, \"sigwait\");\n"
9164 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9165 "    }\n"
9166 "}\n"
9167
9168 #. type: Plain text
9169 #: build/C/man3/pthread_sigmask.3:126
9170 #, no-wrap
9171 msgid ""
9172 "int\n"
9173 "main(int argc, char *argv[])\n"
9174 "{\n"
9175 "    pthread_t thread;\n"
9176 "    sigset_t set;\n"
9177 "    int s;\n"
9178 msgstr ""
9179 "int\n"
9180 "main(int argc, char *argv[])\n"
9181 "{\n"
9182 "    pthread_t thread;\n"
9183 "    sigset_t set;\n"
9184 "    int s;\n"
9185
9186 #. type: Plain text
9187 #: build/C/man3/pthread_sigmask.3:129
9188 #, no-wrap
9189 msgid ""
9190 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9191 "       will inherit a copy of the signal mask. */\n"
9192 msgstr ""
9193 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9194 "       will inherit a copy of the signal mask. */\n"
9195
9196 #. type: Plain text
9197 #: build/C/man3/pthread_sigmask.3:136
9198 #, no-wrap
9199 msgid ""
9200 "    sigemptyset(&set);\n"
9201 "    sigaddset(&set, SIGQUIT);\n"
9202 "    sigaddset(&set, SIGUSR1);\n"
9203 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9204 "    if (s != 0)\n"
9205 "        handle_error_en(s, \"pthread_sigmask\");\n"
9206 msgstr ""
9207 "    sigemptyset(&set);\n"
9208 "    sigaddset(&set, SIGQUIT);\n"
9209 "    sigaddset(&set, SIGUSR1);\n"
9210 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9211 "    if (s != 0)\n"
9212 "        handle_error_en(s, \"pthread_sigmask\");\n"
9213
9214 #. type: Plain text
9215 #: build/C/man3/pthread_sigmask.3:140
9216 #, no-wrap
9217 msgid ""
9218 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9219 "    if (s != 0)\n"
9220 "        handle_error_en(s, \"pthread_create\");\n"
9221 msgstr ""
9222 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9223 "    if (s != 0)\n"
9224 "        handle_error_en(s, \"pthread_create\");\n"
9225
9226 #. type: Plain text
9227 #: build/C/man3/pthread_sigmask.3:143
9228 #, no-wrap
9229 msgid ""
9230 "    /* Main thread carries on to create other threads and/or do\n"
9231 "       other work */\n"
9232 msgstr ""
9233 "    /* Main thread carries on to create other threads and/or do\n"
9234 "       other work */\n"
9235
9236 #. type: Plain text
9237 #: build/C/man3/pthread_sigmask.3:146
9238 #, no-wrap
9239 msgid ""
9240 "    pause();            /* Dummy pause so we can test program */\n"
9241 "}\n"
9242 msgstr ""
9243 "    pause();            /* Dummy pause so we can test program */\n"
9244 "}\n"
9245
9246 #. type: Plain text
9247 #: build/C/man3/pthread_sigmask.3:156
9248 msgid ""
9249 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9250 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9251 msgstr ""
9252 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9253 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9254
9255 #. type: TH
9256 #: build/C/man3/pthread_sigqueue.3:25
9257 #, no-wrap
9258 msgid "PTHREAD_SIGQUEUE"
9259 msgstr "PTHREAD_SIGQUEUE"
9260
9261 #. type: TH
9262 #: build/C/man3/pthread_sigqueue.3:25
9263 #, no-wrap
9264 msgid "2012-08-19"
9265 msgstr "2012-08-19"
9266
9267 #. type: Plain text
9268 #: build/C/man3/pthread_sigqueue.3:28
9269 msgid "pthread_sigqueue - queue a signal and data to a thread"
9270 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9271
9272 #. type: Plain text
9273 #: build/C/man3/pthread_sigqueue.3:34
9274 #, no-wrap
9275 msgid ""
9276 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9277 "B<                     const union sigval >I<value>B<);>\n"
9278 msgstr ""
9279 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9280 "B<                     const union sigval >I<value>B<);>\n"
9281
9282 #. type: Plain text
9283 #: build/C/man3/pthread_sigqueue.3:45
9284 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9285 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9286
9287 #. type: Plain text
9288 #: build/C/man3/pthread_sigqueue.3:53
9289 msgid ""
9290 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9291 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9292 "thread in the same process as the calling thread."
9293 msgstr ""
9294 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9295 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9296 "同じプロセス内のスレッドにシグナルを送信する。"
9297
9298 #. type: Plain text
9299 #: build/C/man3/pthread_sigqueue.3:65
9300 msgid ""
9301 "The I<thread> argument is the ID of a thread in the same process as the "
9302 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9303 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9304 "details."
9305 msgstr ""
9306 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9307 "I<sig> 引き数は送信するシグナルを指定する。\n"
9308 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9309 "詳細は B<sigqueue>(3) を参照。"
9310
9311 #. type: Plain text
9312 #: build/C/man3/pthread_sigqueue.3:70
9313 msgid ""
9314 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9315 "number."
9316 msgstr ""
9317 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9318 "エラーの場合、エラー番号を返す。"
9319
9320 #. type: Plain text
9321 #: build/C/man3/pthread_sigqueue.3:77
9322 msgid ""
9323 "The limit of signals which may be queued has been reached.  (See B<signal>"
9324 "(7)  for further information.)"
9325 msgstr ""
9326 "キューに入れられるシグナル数が上限に達していた\n"
9327 "(詳しい情報は (B<signal>(7) を参照)。"
9328
9329 #. type: Plain text
9330 #: build/C/man3/pthread_sigqueue.3:81
9331 msgid "I<sig> was invalid."
9332 msgstr "I<sig> が無効であった。"
9333
9334 #. type: TP
9335 #: build/C/man3/pthread_sigqueue.3:81
9336 #, no-wrap
9337 msgid "B<ENOSYS>"
9338 msgstr "B<ENOSYS>"
9339
9340 #. type: Plain text
9341 #: build/C/man3/pthread_sigqueue.3:85
9342 msgid "B<pthread_sigqueue>()  is not supported on this system."
9343 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9344
9345 #. type: Plain text
9346 #: build/C/man3/pthread_sigqueue.3:89
9347 msgid "I<thread> is not valid."
9348 msgstr "I<thread> が無効である。"
9349
9350 #. type: Plain text
9351 #: build/C/man3/pthread_sigqueue.3:93
9352 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9353 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9354
9355 #. type: Plain text
9356 #: build/C/man3/pthread_sigqueue.3:95
9357 msgid "This function is a GNU extension."
9358 msgstr "この関数は GNU による拡張である。"
9359
9360 #. type: Plain text
9361 #: build/C/man3/pthread_sigqueue.3:103
9362 msgid ""
9363 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9364 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9365 msgstr ""
9366 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9367 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9368
9369 #. type: TH
9370 #: build/C/man3/pthread_testcancel.3:26
9371 #, no-wrap
9372 msgid "PTHREAD_TESTCANCEL"
9373 msgstr "PTHREAD_TESTCANCEL"
9374
9375 #. type: TH
9376 #: build/C/man3/pthread_testcancel.3:26
9377 #, no-wrap
9378 msgid "2012-04-14"
9379 msgstr "2012-04-14"
9380
9381 #. type: Plain text
9382 #: build/C/man3/pthread_testcancel.3:29
9383 msgid ""
9384 "pthread_testcancel - request delivery of any pending cancellation request"
9385 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9386
9387 #. type: Plain text
9388 #: build/C/man3/pthread_testcancel.3:34
9389 #, no-wrap
9390 msgid "B<void pthread_testcancel(void);>\n"
9391 msgstr "B<void pthread_testcancel(void);>\n"
9392
9393 #. type: Plain text
9394 #: build/C/man3/pthread_testcancel.3:43
9395 msgid ""
9396 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9397 "calling thread, so that a thread that is otherwise executing code that "
9398 "contains no cancellation points will respond to a cancellation request."
9399 msgstr ""
9400 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9401 "ポイント (cancellation point) が作成される。\n"
9402 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9403 "いるスレッドが取り消し要求に対応することができるようになる。"
9404
9405 #. type: Plain text
9406 #: build/C/man3/pthread_testcancel.3:50
9407 msgid ""
9408 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9409 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9410 "no effect."
9411 msgstr ""
9412 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9413 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9414 "呼び出しても何の影響もない。"
9415
9416 #. type: Plain text
9417 #: build/C/man3/pthread_testcancel.3:54
9418 msgid ""
9419 "This function does not return a value.  If the calling thread is canceled as "
9420 "a consequence of a call to this function, then the function does not return."
9421 msgstr ""
9422 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9423 "キャンセルされた場合、この関数が返ることはない。"
9424
9425 #. type: Plain text
9426 #: build/C/man3/pthread_testcancel.3:63
9427 msgid "See B<pthread_cleanup_push>(3)."
9428 msgstr "B<pthread_cleanup_push>(3) を参照。"
9429
9430 #. type: Plain text
9431 #: build/C/man3/pthread_testcancel.3:68
9432 msgid ""
9433 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9434 "(3), B<pthreads>(7)"
9435 msgstr ""
9436 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9437 "(3), B<pthreads>(7)"
9438
9439 #. type: TH
9440 #: build/C/man3/pthread_tryjoin_np.3:26
9441 #, no-wrap
9442 msgid "PTHREAD_TRYJOIN_NP"
9443 msgstr "PTHREAD_TRYJOIN_NP"
9444
9445 #. type: Plain text
9446 #: build/C/man3/pthread_tryjoin_np.3:30
9447 msgid ""
9448 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9449 "thread"
9450 msgstr ""
9451 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9452 "試みる"
9453
9454 #. type: Plain text
9455 #: build/C/man3/pthread_tryjoin_np.3:36
9456 #, no-wrap
9457 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9458 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9459
9460 #. type: Plain text
9461 #: build/C/man3/pthread_tryjoin_np.3:39
9462 #, no-wrap
9463 msgid ""
9464 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9465 "B<                         const struct timespec *>I<abstime>B<);>\n"
9466 msgstr ""
9467 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9468 "B<                         const struct timespec *>I<abstime>B<);>\n"
9469
9470 #. type: Plain text
9471 #: build/C/man3/pthread_tryjoin_np.3:46
9472 msgid ""
9473 "These functions operate in the same way as B<pthread_join>(3), except for "
9474 "the differences described on this page."
9475 msgstr ""
9476 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9477 "このページで説明する違いがある。"
9478
9479 #. type: Plain text
9480 #: build/C/man3/pthread_tryjoin_np.3:58
9481 msgid ""
9482 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9483 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9484 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9485 "B<pthread_join>(3), the call returns an error."
9486 msgstr ""
9487 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9488 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9489 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9490 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9491
9492 #. type: Plain text
9493 #: build/C/man3/pthread_tryjoin_np.3:76
9494 msgid ""
9495 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9496 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9497 "specified in I<abstime>.  If the timeout expires before I<thread> "
9498 "terminates, the call returns an error.  The I<abstime> argument is a "
9499 "structure of the following form, specifying an absolute time measured since "
9500 "the Epoch (see B<time>(2)):"
9501 msgstr ""
9502 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9503 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9504 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9505 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9506 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9507
9508 #. type: Plain text
9509 #: build/C/man3/pthread_tryjoin_np.3:83
9510 #, no-wrap
9511 msgid ""
9512 "struct timespec {\n"
9513 "    time_t tv_sec;     /* seconds */\n"
9514 "    long   tv_nsec;    /* nanoseconds */\n"
9515 "};\n"
9516 msgstr ""
9517 "struct timespec {\n"
9518 "    time_t tv_sec;     /* seconds */\n"
9519 "    long   tv_nsec;    /* nanoseconds */\n"
9520 "};\n"
9521
9522 #. type: Plain text
9523 #: build/C/man3/pthread_tryjoin_np.3:89
9524 msgid ""
9525 "On success, these functions return 0; on error, they return an error number."
9526 msgstr ""
9527 "成功すると、これらの関数は 0 を返す。\n"
9528 "エラーの場合、エラー番号を返す。"
9529
9530 #. type: Plain text
9531 #: build/C/man3/pthread_tryjoin_np.3:94
9532 msgid ""
9533 "These functions can fail with the same errors as B<pthread_join>(3).  "
9534 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9535 msgstr ""
9536 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9537 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9538
9539 #. type: TP
9540 #: build/C/man3/pthread_tryjoin_np.3:94
9541 #, no-wrap
9542 msgid "B<EBUSY>"
9543 msgstr "B<EBUSY>"
9544
9545 #. type: Plain text
9546 #: build/C/man3/pthread_tryjoin_np.3:98
9547 msgid "I<thread> had not yet terminated at the time of the call."
9548 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9549
9550 #. type: Plain text
9551 #: build/C/man3/pthread_tryjoin_np.3:101
9552 msgid ""
9553 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9554 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9555
9556 #. type: TP
9557 #: build/C/man3/pthread_tryjoin_np.3:101
9558 #, no-wrap
9559 msgid "B<ETIMEDOUT>"
9560 msgstr "B<ETIMEDOUT>"
9561
9562 #. type: Plain text
9563 #: build/C/man3/pthread_tryjoin_np.3:106
9564 msgid "The call timed out before I<thread> terminated."
9565 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9566
9567 #. type: Plain text
9568 #: build/C/man3/pthread_tryjoin_np.3:110
9569 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9570 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9571
9572 #. type: Plain text
9573 #: build/C/man3/pthread_tryjoin_np.3:112
9574 msgid "These functions first appeared in glibc in version 2.3.3."
9575 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9576
9577 #. type: Plain text
9578 #: build/C/man3/pthread_tryjoin_np.3:117
9579 msgid "The following code waits to join for up to 5 seconds:"
9580 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9581
9582 #. type: Plain text
9583 #: build/C/man3/pthread_tryjoin_np.3:121
9584 #, no-wrap
9585 msgid ""
9586 "    struct timespec ts;\n"
9587 "    int s;\n"
9588 msgstr ""
9589 "    struct timespec ts;\n"
9590 "    int s;\n"
9591
9592 #. type: Plain text
9593 #: build/C/man3/pthread_tryjoin_np.3:123
9594 #, no-wrap
9595 msgid "    ...\n"
9596 msgstr "    ...\n"
9597
9598 #. type: Plain text
9599 #: build/C/man3/pthread_tryjoin_np.3:127
9600 #, no-wrap
9601 msgid ""
9602 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9603 "\t/* Handle error */\n"
9604 "    }\n"
9605 msgstr ""
9606 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9607 "\t/* Handle error */\n"
9608 "    }\n"
9609
9610 #. type: Plain text
9611 #: build/C/man3/pthread_tryjoin_np.3:129
9612 #, no-wrap
9613 msgid "    ts.tv_sec += 5;\n"
9614 msgstr "    ts.tv_sec += 5;\n"
9615
9616 #. type: Plain text
9617 #: build/C/man3/pthread_tryjoin_np.3:134
9618 #, no-wrap
9619 msgid ""
9620 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9621 "    if (s != 0) {\n"
9622 "        /* Handle error */\n"
9623 "    }\n"
9624 msgstr ""
9625 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9626 "    if (s != 0) {\n"
9627 "        /* Handle error */\n"
9628 "    }\n"
9629
9630 #. type: Plain text
9631 #: build/C/man3/pthread_tryjoin_np.3:140
9632 msgid ""
9633 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9634 msgstr ""
9635 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9636
9637 #. type: TH
9638 #: build/C/man3/pthread_yield.3:25
9639 #, no-wrap
9640 msgid "PTHREAD_YIELD"
9641 msgstr "PTHREAD_YIELD"
9642
9643 #. type: TH
9644 #: build/C/man3/pthread_yield.3:25
9645 #, no-wrap
9646 msgid "2013-03-05"
9647 msgstr "2013-03-05"
9648
9649 #. type: Plain text
9650 #: build/C/man3/pthread_yield.3:28
9651 msgid "pthread_yield - yield the processor"
9652 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9653
9654 #. type: Plain text
9655 #: build/C/man3/pthread_yield.3:34
9656 #, no-wrap
9657 msgid "B<int pthread_yield(void);>\n"
9658 msgstr "B<int pthread_yield(void);>\n"
9659
9660 #. type: Plain text
9661 #: build/C/man3/pthread_yield.3:44
9662 msgid ""
9663 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9664 "thread is placed at the end of the run queue for its static priority and "
9665 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9666 "(2)"
9667 msgstr ""
9668 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9669 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9670 "別のスレッドが実行されるようにスケジューリングされる。\n"
9671 "詳細は B<sched_yield>(2) を参照。"
9672
9673 #. type: Plain text
9674 #: build/C/man3/pthread_yield.3:49
9675 msgid ""
9676 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9677 "number."
9678 msgstr ""
9679 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9680 "エラーの場合、エラー番号を返す。"
9681
9682 #. type: Plain text
9683 #: build/C/man3/pthread_yield.3:53
9684 msgid ""
9685 "On Linux, this call always succeeds (but portable and future-proof "
9686 "applications should nevertheless handle a possible error return)."
9687 msgstr ""
9688 "Linux では、この関数の呼び出しは常に成功する\n"
9689 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9690 "正のエラーの返り値を処理するようにすべきである)。"
9691
9692 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9693 #. type: Plain text
9694 #: build/C/man3/pthread_yield.3:59
9695 msgid ""
9696 "This call is nonstandard, but present on several other systems.  Use the "
9697 "standardized B<sched_yield>(2)  instead."
9698 msgstr ""
9699 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9700 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9701
9702 #. type: Plain text
9703 #: build/C/man3/pthread_yield.3:62
9704 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9705 msgstr ""
9706 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9707
9708 #. type: Plain text
9709 #: build/C/man3/pthread_yield.3:66
9710 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9711 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9712
9713 #. type: TH
9714 #: build/C/man7/pthreads.7:26
9715 #, no-wrap
9716 msgid "PTHREADS"
9717 msgstr "PTHREADS"
9718
9719 #. type: TH
9720 #: build/C/man7/pthreads.7:26
9721 #, no-wrap
9722 msgid "2010-11-14"
9723 msgstr "2010-11-14"
9724
9725 #. type: Plain text
9726 #: build/C/man7/pthreads.7:29
9727 msgid "pthreads - POSIX threads"
9728 msgstr "pthreads - POSIX スレッド"
9729
9730 #. type: Plain text
9731 #: build/C/man7/pthreads.7:36
9732 msgid ""
9733 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9734 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9735 "can contain multiple threads, all of which are executing the same program.  "
9736 "These threads share the same global memory (data and heap segments), but "
9737 "each thread has its own stack (automatic variables)."
9738 msgstr ""
9739 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9740 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9741 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9742 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9743 "スレッドは自分専用のスタック (自動変数) を持つ。"
9744
9745 #. type: Plain text
9746 #: build/C/man7/pthreads.7:39
9747 msgid ""
9748 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9749 "these attributes are process-wide rather than per-thread):"
9750 msgstr ""
9751 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9752 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9753
9754 #. type: IP
9755 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9756 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9757 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9758 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9759 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9760 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9761 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9762 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9763 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9764 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9765 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9766 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9767 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9768 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9769 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9770 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9771 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9772 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9773 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9774 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9775 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9776 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9777 #: build/C/man7/pthreads.7:835
9778 #, no-wrap
9779 msgid "-"
9780 msgstr "-"
9781
9782 #. type: Plain text
9783 #: build/C/man7/pthreads.7:41
9784 msgid "process ID"
9785 msgstr "プロセス ID"
9786
9787 #. type: Plain text
9788 #: build/C/man7/pthreads.7:43
9789 msgid "parent process ID"
9790 msgstr "親プロセス ID"
9791
9792 #. type: Plain text
9793 #: build/C/man7/pthreads.7:45
9794 msgid "process group ID and session ID"
9795 msgstr "プロセスグループ ID とセッション ID"
9796
9797 #. type: Plain text
9798 #: build/C/man7/pthreads.7:47
9799 msgid "controlling terminal"
9800 msgstr "制御端末"
9801
9802 #. type: Plain text
9803 #: build/C/man7/pthreads.7:49
9804 msgid "user and group IDs"
9805 msgstr "ユーザ ID とグループ ID"
9806
9807 #. type: Plain text
9808 #: build/C/man7/pthreads.7:51
9809 msgid "open file descriptors"
9810 msgstr "オープンするファイルディスクリプタ"
9811
9812 #. type: Plain text
9813 #: build/C/man7/pthreads.7:54
9814 msgid "record locks (see B<fcntl>(2))"
9815 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9816
9817 #. type: Plain text
9818 #: build/C/man7/pthreads.7:56
9819 msgid "signal dispositions"
9820 msgstr "シグナルの配置"
9821
9822 #. type: Plain text
9823 #: build/C/man7/pthreads.7:59
9824 msgid "file mode creation mask (B<umask>(2))"
9825 msgstr "ファイルモード作成マスク (B<umask>(2))"
9826
9827 #. type: Plain text
9828 #: build/C/man7/pthreads.7:65
9829 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9830 msgstr ""
9831 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9832
9833 #. type: Plain text
9834 #: build/C/man7/pthreads.7:70
9835 msgid ""
9836 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9837 msgstr ""
9838 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9839
9840 #. type: Plain text
9841 #: build/C/man7/pthreads.7:73
9842 msgid "nice value (B<setpriority>(2))"
9843 msgstr "nice 値 (B<setpriority>(2))"
9844
9845 #. type: Plain text
9846 #: build/C/man7/pthreads.7:76
9847 msgid "resource limits (B<setrlimit>(2))"
9848 msgstr "リソース制限 (B<setrlimit>(2))"
9849
9850 #. type: Plain text
9851 #: build/C/man7/pthreads.7:81
9852 msgid ""
9853 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9854 "(B<getrusage>(2))"
9855 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9856
9857 #. type: Plain text
9858 #: build/C/man7/pthreads.7:84
9859 msgid ""
9860 "As well as the stack, POSIX.1 specifies that various other attributes are "
9861 "distinct for each thread, including:"
9862 msgstr ""
9863 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9864 "るかを規定している:"
9865
9866 #. type: Plain text
9867 #: build/C/man7/pthreads.7:88
9868 msgid "thread ID (the I<pthread_t> data type)"
9869 msgstr "スレッド ID (B<pthread_t> データ型)"
9870
9871 #. type: Plain text
9872 #: build/C/man7/pthreads.7:91
9873 msgid "signal mask (B<pthread_sigmask>(3))"
9874 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9875
9876 #. type: Plain text
9877 #: build/C/man7/pthreads.7:95
9878 msgid "the I<errno> variable"
9879 msgstr "I<errno> 変数"
9880
9881 #. type: Plain text
9882 #: build/C/man7/pthreads.7:98
9883 msgid "alternate signal stack (B<sigaltstack>(2))"
9884 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9885
9886 #. type: Plain text
9887 #: build/C/man7/pthreads.7:103
9888 msgid ""
9889 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9890 "B<sched_setparam>(2))"
9891 msgstr ""
9892 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9893 "と B<sched_setparam>(2))"
9894
9895 #. type: Plain text
9896 #: build/C/man7/pthreads.7:105
9897 msgid "The following Linux-specific features are also per-thread:"
9898 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9899
9900 #. type: Plain text
9901 #: build/C/man7/pthreads.7:108
9902 msgid "capabilities (see B<capabilities>(7))"
9903 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9904
9905 #. type: Plain text
9906 #: build/C/man7/pthreads.7:111
9907 msgid "CPU affinity (B<sched_setaffinity>(2))"
9908 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9909
9910 #. type: SS
9911 #: build/C/man7/pthreads.7:111
9912 #, no-wrap
9913 msgid "Pthreads function return values"
9914 msgstr "pthreads 関数の返り値"
9915
9916 #. type: Plain text
9917 #: build/C/man7/pthreads.7:118
9918 msgid ""
9919 "Most pthreads functions return 0 on success, and an error number of "
9920 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9921 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9922 "the function can never fail with the error B<EINTR>."
9923 msgstr ""
9924 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9925 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9926 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9927 "は決してないと規定している。"
9928
9929 #. type: SS
9930 #: build/C/man7/pthreads.7:118
9931 #, no-wrap
9932 msgid "Thread IDs"
9933 msgstr "スレッド ID"
9934
9935 #. type: Plain text
9936 #: build/C/man7/pthreads.7:132
9937 msgid ""
9938 "Each of the threads in a process has a unique thread identifier (stored in "
9939 "the type I<pthread_t>).  This identifier is returned to the caller of "
9940 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9941 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
9942 "within a process.  A thread ID may be reused after a terminated thread has "
9943 "been joined, or a detached thread has terminated.  In all pthreads functions "
9944 "that accept a thread ID as an argument, that ID by definition refers to a "
9945 "thread in the same process as the caller."
9946 msgstr ""
9947 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9948 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9949 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9950 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9951 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9952 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9953 "じプロセス内の一つのスレッドを参照する。"
9954
9955 #. type: SS
9956 #: build/C/man7/pthreads.7:132
9957 #, no-wrap
9958 msgid "Thread-safe functions"
9959 msgstr "スレッドセーフな関数"
9960
9961 #. type: Plain text
9962 #: build/C/man7/pthreads.7:136
9963 msgid ""
9964 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9965 "same results regardless of whether it is)  called from multiple threads at "
9966 "the same time."
9967 msgstr ""
9968 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9969 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9970
9971 #. type: Plain text
9972 #: build/C/man7/pthreads.7:140
9973 msgid ""
9974 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9975 "standard shall be thread-safe, except for the following functions:"
9976 msgstr ""
9977 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9978 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9979
9980 #. type: Plain text
9981 #: build/C/man7/pthreads.7:234
9982 #, no-wrap
9983 msgid ""
9984 "asctime()\n"
9985 "basename()\n"
9986 "catgets()\n"
9987 "crypt()\n"
9988 "ctermid() if passed a non-NULL argument\n"
9989 "ctime()\n"
9990 "dbm_clearerr()\n"
9991 "dbm_close()\n"
9992 "dbm_delete()\n"
9993 "dbm_error()\n"
9994 "dbm_fetch()\n"
9995 "dbm_firstkey()\n"
9996 "dbm_nextkey()\n"
9997 "dbm_open()\n"
9998 "dbm_store()\n"
9999 "dirname()\n"
10000 "dlerror()\n"
10001 "drand48()\n"
10002 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10003 "encrypt()\n"
10004 "endgrent()\n"
10005 "endpwent()\n"
10006 "endutxent()\n"
10007 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10008 "ftw()\n"
10009 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10010 "getc_unlocked()\n"
10011 "getchar_unlocked()\n"
10012 "getdate()\n"
10013 "getenv()\n"
10014 "getgrent()\n"
10015 "getgrgid()\n"
10016 "getgrnam()\n"
10017 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10018 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10019 "gethostent()\n"
10020 "getlogin()\n"
10021 "getnetbyaddr()\n"
10022 "getnetbyname()\n"
10023 "getnetent()\n"
10024 "getopt()\n"
10025 "getprotobyname()\n"
10026 "getprotobynumber()\n"
10027 "getprotoent()\n"
10028 "getpwent()\n"
10029 "getpwnam()\n"
10030 "getpwuid()\n"
10031 "getservbyname()\n"
10032 "getservbyport()\n"
10033 "getservent()\n"
10034 "getutxent()\n"
10035 "getutxid()\n"
10036 "getutxline()\n"
10037 "gmtime()\n"
10038 "hcreate()\n"
10039 "hdestroy()\n"
10040 "hsearch()\n"
10041 "inet_ntoa()\n"
10042 "l64a()\n"
10043 "lgamma()\n"
10044 "lgammaf()\n"
10045 "lgammal()\n"
10046 "localeconv()\n"
10047 "localtime()\n"
10048 "lrand48()\n"
10049 "mrand48()\n"
10050 "nftw()\n"
10051 "nl_langinfo()\n"
10052 "ptsname()\n"
10053 "putc_unlocked()\n"
10054 "putchar_unlocked()\n"
10055 "putenv()\n"
10056 "pututxline()\n"
10057 "rand()\n"
10058 "readdir()\n"
10059 "setenv()\n"
10060 "setgrent()\n"
10061 "setkey()\n"
10062 "setpwent()\n"
10063 "setutxent()\n"
10064 "strerror()\n"
10065 "strsignal() [Added in POSIX.1-2008]\n"
10066 "strtok()\n"
10067 "system() [Added in POSIX.1-2008]\n"
10068 "tmpnam() if passed a non-NULL argument\n"
10069 "ttyname()\n"
10070 "unsetenv()\n"
10071 "wcrtomb() if its final argument is NULL\n"
10072 "wcsrtombs() if its final argument is NULL\n"
10073 "wcstombs()\n"
10074 "wctomb()\n"
10075 msgstr ""
10076 "asctime()\n"
10077 "basename()\n"
10078 "catgets()\n"
10079 "crypt()\n"
10080 "ctermid() (NULL でない引き数を渡された場合)\n"
10081 "ctime()\n"
10082 "dbm_clearerr()\n"
10083 "dbm_close()\n"
10084 "dbm_delete()\n"
10085 "dbm_error()\n"
10086 "dbm_fetch()\n"
10087 "dbm_firstkey()\n"
10088 "dbm_nextkey()\n"
10089 "dbm_open()\n"
10090 "dbm_store()\n"
10091 "dirname()\n"
10092 "dlerror()\n"
10093 "drand48()\n"
10094 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10095 "encrypt()\n"
10096 "endgrent()\n"
10097 "endpwent()\n"
10098 "endutxent()\n"
10099 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10100 "ftw()\n"
10101 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10102 "getc_unlocked()\n"
10103 "getchar_unlocked()\n"
10104 "getdate()\n"
10105 "getenv()\n"
10106 "getgrent()\n"
10107 "getgrgid()\n"
10108 "getgrnam()\n"
10109 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10110 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10111 "gethostent()\n"
10112 "getlogin()\n"
10113 "getnetbyaddr()\n"
10114 "getnetbyname()\n"
10115 "getnetent()\n"
10116 "getopt()\n"
10117 "getprotobyname()\n"
10118 "getprotobynumber()\n"
10119 "getprotoent()\n"
10120 "getpwent()\n"
10121 "getpwnam()\n"
10122 "getpwuid()\n"
10123 "getservbyname()\n"
10124 "getservbyport()\n"
10125 "getservent()\n"
10126 "getutxent()\n"
10127 "getutxid()\n"
10128 "getutxline()\n"
10129 "gmtime()\n"
10130 "hcreate()\n"
10131 "hdestroy()\n"
10132 "hsearch()\n"
10133 "inet_ntoa()\n"
10134 "l64a()\n"
10135 "lgamma()\n"
10136 "lgammaf()\n"
10137 "lgammal()\n"
10138 "localeconv()\n"
10139 "localtime()\n"
10140 "lrand48()\n"
10141 "mrand48()\n"
10142 "nftw()\n"
10143 "nl_langinfo()\n"
10144 "ptsname()\n"
10145 "putc_unlocked()\n"
10146 "putchar_unlocked()\n"
10147 "putenv()\n"
10148 "pututxline()\n"
10149 "rand()\n"
10150 "readdir()\n"
10151 "setenv()\n"
10152 "setgrent()\n"
10153 "setkey()\n"
10154 "setpwent()\n"
10155 "setutxent()\n"
10156 "strerror()\n"
10157 "strsignal() [POSIX.1-2008 で追加された]\n"
10158 "strtok()\n"
10159 "system() [POSIX.1-2008 で追加された]\n"
10160 "tmpnam() (NULL でない引き数を渡された場合)\n"
10161 "ttyname()\n"
10162 "unsetenv()\n"
10163 "wcrtomb() (最後の引き数が NULL の場合)\n"
10164 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10165 "wcstombs()\n"
10166 "wctomb()\n"
10167
10168 #. type: SS
10169 #: build/C/man7/pthreads.7:236
10170 #, no-wrap
10171 msgid "Async-cancel-safe functions"
10172 msgstr "async-cancel-safe 関数"
10173
10174 #. type: Plain text
10175 #: build/C/man7/pthreads.7:240
10176 msgid ""
10177 "An async-cancel-safe function is one that can be safely called in an "
10178 "application where asynchronous cancelability is enabled (see "
10179 "B<pthread_setcancelstate>(3))."
10180 msgstr ""
10181 "async-cancel-safe 関数は、\n"
10182 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10183 "安全に呼び出すことができる関数のことである\n"
10184 "(B<pthread_setcancelstate>(3) を参照)。"
10185
10186 #. type: Plain text
10187 #: build/C/man7/pthreads.7:243
10188 msgid ""
10189 "Only the following functions are required to be async-cancel-safe by "
10190 "POSIX.1-2001 and POSIX.1-2008:"
10191 msgstr ""
10192 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10193 "なければならないとされている。"
10194
10195 #. type: Plain text
10196 #: build/C/man7/pthreads.7:249
10197 #, no-wrap
10198 msgid ""
10199 "pthread_cancel()\n"
10200 "pthread_setcancelstate()\n"
10201 "pthread_setcanceltype()\n"
10202 msgstr ""
10203 "pthread_cancel()\n"
10204 "pthread_setcancelstate()\n"
10205 "pthread_setcanceltype()\n"
10206
10207 #. type: SS
10208 #: build/C/man7/pthreads.7:251
10209 #, no-wrap
10210 msgid "Cancellation points"
10211 msgstr "取り消しポイント (cancellation points)"
10212
10213 #. type: Plain text
10214 #: build/C/man7/pthreads.7:258
10215 msgid ""
10216 "POSIX.1 specifies that certain functions must, and certain other functions "
10217 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10218 "type is deferred, and a cancellation request is pending for the thread, then "
10219 "the thread is canceled when it calls a function that is a cancellation point."
10220 msgstr ""
10221 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10222 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10223 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10224 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10225 "時点で、そのスレッドのキャンセルが 行われる。"
10226
10227 #. type: Plain text
10228 #: build/C/man7/pthreads.7:261
10229 msgid ""
10230 "The following functions are required to be cancellation points by "
10231 "POSIX.1-2001 and/or POSIX.1-2008:"
10232 msgstr ""
10233 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10234 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10235
10236 #. type: Plain text
10237 #: build/C/man7/pthreads.7:324
10238 #, no-wrap
10239 msgid ""
10240 "accept()\n"
10241 "aio_suspend()\n"
10242 "clock_nanosleep()\n"
10243 "close()\n"
10244 "connect()\n"
10245 "creat()\n"
10246 "fcntl() F_SETLKW\n"
10247 "fdatasync()\n"
10248 "fsync()\n"
10249 "getmsg()\n"
10250 "getpmsg()\n"
10251 "lockf() F_LOCK\n"
10252 "mq_receive()\n"
10253 "mq_send()\n"
10254 "mq_timedreceive()\n"
10255 "mq_timedsend()\n"
10256 "msgrcv()\n"
10257 "msgsnd()\n"
10258 "msync()\n"
10259 "nanosleep()\n"
10260 "open()\n"
10261 "openat() [Added in POSIX.1-2008]\n"
10262 "pause()\n"
10263 "poll()\n"
10264 "pread()\n"
10265 "pselect()\n"
10266 "pthread_cond_timedwait()\n"
10267 "pthread_cond_wait()\n"
10268 "pthread_join()\n"
10269 "pthread_testcancel()\n"
10270 "putmsg()\n"
10271 "putpmsg()\n"
10272 "pwrite()\n"
10273 "read()\n"
10274 "readv()\n"
10275 "recv()\n"
10276 "recvfrom()\n"
10277 "recvmsg()\n"
10278 "select()\n"
10279 "sem_timedwait()\n"
10280 "sem_wait()\n"
10281 "send()\n"
10282 "sendmsg()\n"
10283 "sendto()\n"
10284 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10285 "sigsuspend()\n"
10286 "sigtimedwait()\n"
10287 "sigwait()\n"
10288 "sigwaitinfo()\n"
10289 "sleep()\n"
10290 "system()\n"
10291 "tcdrain()\n"
10292 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10293 "wait()\n"
10294 "waitid()\n"
10295 "waitpid()\n"
10296 "write()\n"
10297 "writev()\n"
10298 msgstr ""
10299 "accept()\n"
10300 "aio_suspend()\n"
10301 "clock_nanosleep()\n"
10302 "close()\n"
10303 "connect()\n"
10304 "creat()\n"
10305 "fcntl() F_SETLKW\n"
10306 "fdatasync()\n"
10307 "fsync()\n"
10308 "getmsg()\n"
10309 "getpmsg()\n"
10310 "lockf() F_LOCK\n"
10311 "mq_receive()\n"
10312 "mq_send()\n"
10313 "mq_timedreceive()\n"
10314 "mq_timedsend()\n"
10315 "msgrcv()\n"
10316 "msgsnd()\n"
10317 "msync()\n"
10318 "nanosleep()\n"
10319 "open()\n"
10320 "openat() [POSIX.1-2008 で追加された]\n"
10321 "pause()\n"
10322 "poll()\n"
10323 "pread()\n"
10324 "pselect()\n"
10325 "pthread_cond_timedwait()\n"
10326 "pthread_cond_wait()\n"
10327 "pthread_join()\n"
10328 "pthread_testcancel()\n"
10329 "putmsg()\n"
10330 "putpmsg()\n"
10331 "pwrite()\n"
10332 "read()\n"
10333 "readv()\n"
10334 "recv()\n"
10335 "recvfrom()\n"
10336 "recvmsg()\n"
10337 "select()\n"
10338 "sem_timedwait()\n"
10339 "sem_wait()\n"
10340 "send()\n"
10341 "sendmsg()\n"
10342 "sendto()\n"
10343 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10344 "sigsuspend()\n"
10345 "sigtimedwait()\n"
10346 "sigwait()\n"
10347 "sigwaitinfo()\n"
10348 "sleep()\n"
10349 "system()\n"
10350 "tcdrain()\n"
10351 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10352 "wait()\n"
10353 "waitid()\n"
10354 "waitpid()\n"
10355 "write()\n"
10356 "writev()\n"
10357
10358 #. type: Plain text
10359 #: build/C/man7/pthreads.7:329
10360 msgid ""
10361 "The following functions may be cancellation points according to POSIX.1-2001 "
10362 "and/or POSIX.1-2008:"
10363 msgstr ""
10364 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10365 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10366
10367 #. type: Plain text
10368 #: build/C/man7/pthreads.7:557
10369 #, no-wrap
10370 msgid ""
10371 "access()\n"
10372 "asctime()\n"
10373 "asctime_r()\n"
10374 "catclose()\n"
10375 "catgets()\n"
10376 "catopen()\n"
10377 "chmod() [Added in POSIX.1-2008]\n"
10378 "chown() [Added in POSIX.1-2008]\n"
10379 "closedir()\n"
10380 "closelog()\n"
10381 "ctermid()\n"
10382 "ctime()\n"
10383 "ctime_r()\n"
10384 "dbm_close()\n"
10385 "dbm_delete()\n"
10386 "dbm_fetch()\n"
10387 "dbm_nextkey()\n"
10388 "dbm_open()\n"
10389 "dbm_store()\n"
10390 "dlclose()\n"
10391 "dlopen()\n"
10392 "dprintf() [Added in POSIX.1-2008]\n"
10393 "endgrent()\n"
10394 "endhostent()\n"
10395 "endnetent()\n"
10396 "endprotoent()\n"
10397 "endpwent()\n"
10398 "endservent()\n"
10399 "endutxent()\n"
10400 "faccessat() [Added in POSIX.1-2008]\n"
10401 "fchmod() [Added in POSIX.1-2008]\n"
10402 "fchmodat() [Added in POSIX.1-2008]\n"
10403 "fchown() [Added in POSIX.1-2008]\n"
10404 "fchownat() [Added in POSIX.1-2008]\n"
10405 "fclose()\n"
10406 "fcntl() (for any value of cmd argument)\n"
10407 "fflush()\n"
10408 "fgetc()\n"
10409 "fgetpos()\n"
10410 "fgets()\n"
10411 "fgetwc()\n"
10412 "fgetws()\n"
10413 "fmtmsg()\n"
10414 "fopen()\n"
10415 "fpathconf()\n"
10416 "fprintf()\n"
10417 "fputc()\n"
10418 "fputs()\n"
10419 "fputwc()\n"
10420 "fputws()\n"
10421 "fread()\n"
10422 "freopen()\n"
10423 "fscanf()\n"
10424 "fseek()\n"
10425 "fseeko()\n"
10426 "fsetpos()\n"
10427 "fstat()\n"
10428 "fstatat() [Added in POSIX.1-2008]\n"
10429 "ftell()\n"
10430 "ftello()\n"
10431 "ftw()\n"
10432 "futimens() [Added in POSIX.1-2008]\n"
10433 "fwprintf()\n"
10434 "fwrite()\n"
10435 "fwscanf()\n"
10436 "getaddrinfo()\n"
10437 "getc()\n"
10438 "getc_unlocked()\n"
10439 "getchar()\n"
10440 "getchar_unlocked()\n"
10441 "getcwd()\n"
10442 "getdate()\n"
10443 "getdelim() [Added in POSIX.1-2008]\n"
10444 "getgrent()\n"
10445 "getgrgid()\n"
10446 "getgrgid_r()\n"
10447 "getgrnam()\n"
10448 "getgrnam_r()\n"
10449 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10450 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10451 "gethostent()\n"
10452 "gethostid()\n"
10453 "gethostname()\n"
10454 "getline() [Added in POSIX.1-2008]\n"
10455 "getlogin()\n"
10456 "getlogin_r()\n"
10457 "getnameinfo()\n"
10458 "getnetbyaddr()\n"
10459 "getnetbyname()\n"
10460 "getnetent()\n"
10461 "getopt() (if opterr is nonzero)\n"
10462 "getprotobyname()\n"
10463 "getprotobynumber()\n"
10464 "getprotoent()\n"
10465 "getpwent()\n"
10466 "getpwnam()\n"
10467 "getpwnam_r()\n"
10468 "getpwuid()\n"
10469 "getpwuid_r()\n"
10470 "gets()\n"
10471 "getservbyname()\n"
10472 "getservbyport()\n"
10473 "getservent()\n"
10474 "getutxent()\n"
10475 "getutxid()\n"
10476 "getutxline()\n"
10477 "getwc()\n"
10478 "getwchar()\n"
10479 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10480 "glob()\n"
10481 "iconv_close()\n"
10482 "iconv_open()\n"
10483 "ioctl()\n"
10484 "link()\n"
10485 "linkat() [Added in POSIX.1-2008]\n"
10486 "lio_listio() [Added in POSIX.1-2008]\n"
10487 "localtime()\n"
10488 "localtime_r()\n"
10489 "lockf() [Added in POSIX.1-2008]\n"
10490 "lseek()\n"
10491 "lstat()\n"
10492 "mkdir() [Added in POSIX.1-2008]\n"
10493 "mkdirat() [Added in POSIX.1-2008]\n"
10494 "mkdtemp() [Added in POSIX.1-2008]\n"
10495 "mkfifo() [Added in POSIX.1-2008]\n"
10496 "mkfifoat() [Added in POSIX.1-2008]\n"
10497 "mknod() [Added in POSIX.1-2008]\n"
10498 "mknodat() [Added in POSIX.1-2008]\n"
10499 "mkstemp()\n"
10500 "mktime()\n"
10501 "nftw()\n"
10502 "opendir()\n"
10503 "openlog()\n"
10504 "pathconf()\n"
10505 "pclose()\n"
10506 "perror()\n"
10507 "popen()\n"
10508 "posix_fadvise()\n"
10509 "posix_fallocate()\n"
10510 "posix_madvise()\n"
10511 "posix_openpt()\n"
10512 "posix_spawn()\n"
10513 "posix_spawnp()\n"
10514 "posix_trace_clear()\n"
10515 "posix_trace_close()\n"
10516 "posix_trace_create()\n"
10517 "posix_trace_create_withlog()\n"
10518 "posix_trace_eventtypelist_getnext_id()\n"
10519 "posix_trace_eventtypelist_rewind()\n"
10520 "posix_trace_flush()\n"
10521 "posix_trace_get_attr()\n"
10522 "posix_trace_get_filter()\n"
10523 "posix_trace_get_status()\n"
10524 "posix_trace_getnext_event()\n"
10525 "posix_trace_open()\n"
10526 "posix_trace_rewind()\n"
10527 "posix_trace_set_filter()\n"
10528 "posix_trace_shutdown()\n"
10529 "posix_trace_timedgetnext_event()\n"
10530 "posix_typed_mem_open()\n"
10531 "printf()\n"
10532 "psiginfo() [Added in POSIX.1-2008]\n"
10533 "psignal() [Added in POSIX.1-2008]\n"
10534 "pthread_rwlock_rdlock()\n"
10535 "pthread_rwlock_timedrdlock()\n"
10536 "pthread_rwlock_timedwrlock()\n"
10537 "pthread_rwlock_wrlock()\n"
10538 "putc()\n"
10539 "putc_unlocked()\n"
10540 "putchar()\n"
10541 "putchar_unlocked()\n"
10542 "puts()\n"
10543 "pututxline()\n"
10544 "putwc()\n"
10545 "putwchar()\n"
10546 "readdir()\n"
10547 "readdir_r()\n"
10548 "readlink() [Added in POSIX.1-2008]\n"
10549 "readlinkat() [Added in POSIX.1-2008]\n"
10550 "remove()\n"
10551 "rename()\n"
10552 "renameat() [Added in POSIX.1-2008]\n"
10553 "rewind()\n"
10554 "rewinddir()\n"
10555 "scandir() [Added in POSIX.1-2008]\n"
10556 "scanf()\n"
10557 "seekdir()\n"
10558 "semop()\n"
10559 "setgrent()\n"
10560 "sethostent()\n"
10561 "setnetent()\n"
10562 "setprotoent()\n"
10563 "setpwent()\n"
10564 "setservent()\n"
10565 "setutxent()\n"
10566 "sigpause() [Added in POSIX.1-2008]\n"
10567 "stat()\n"
10568 "strerror()\n"
10569 "strerror_r()\n"
10570 "strftime()\n"
10571 "symlink()\n"
10572 "symlinkat() [Added in POSIX.1-2008]\n"
10573 "sync()\n"
10574 "syslog()\n"
10575 "tmpfile()\n"
10576 "tmpnam()\n"
10577 "ttyname()\n"
10578 "ttyname_r()\n"
10579 "tzset()\n"
10580 "ungetc()\n"
10581 "ungetwc()\n"
10582 "unlink()\n"
10583 "unlinkat() [Added in POSIX.1-2008]\n"
10584 "utime() [Added in POSIX.1-2008]\n"
10585 "utimensat() [Added in POSIX.1-2008]\n"
10586 "utimes() [Added in POSIX.1-2008]\n"
10587 "vdprintf() [Added in POSIX.1-2008]\n"
10588 "vfprintf()\n"
10589 "vfwprintf()\n"
10590 "vprintf()\n"
10591 "vwprintf()\n"
10592 "wcsftime()\n"
10593 "wordexp()\n"
10594 "wprintf()\n"
10595 "wscanf()\n"
10596 msgstr ""
10597 "access()\n"
10598 "asctime()\n"
10599 "asctime_r()\n"
10600 "catclose()\n"
10601 "catgets()\n"
10602 "catopen()\n"
10603 "chmod() [POSIX.1-2008 で追加された]\n"
10604 "chown() [POSIX.1-2008 で追加された]\n"
10605 "closedir()\n"
10606 "closelog()\n"
10607 "ctermid()\n"
10608 "ctime()\n"
10609 "ctime_r()\n"
10610 "dbm_close()\n"
10611 "dbm_delete()\n"
10612 "dbm_fetch()\n"
10613 "dbm_nextkey()\n"
10614 "dbm_open()\n"
10615 "dbm_store()\n"
10616 "dlclose()\n"
10617 "dlopen()\n"
10618 "dprintf() [POSIX.1-2008 で追加された]\n"
10619 "endgrent()\n"
10620 "endhostent()\n"
10621 "endnetent()\n"
10622 "endprotoent()\n"
10623 "endpwent()\n"
10624 "endservent()\n"
10625 "endutxent()\n"
10626 "faccessat() [POSIX.1-2008 で追加された]\n"
10627 "fchmod() [POSIX.1-2008 で追加された]\n"
10628 "fchmodat() [POSIX.1-2008 で追加された]\n"
10629 "fchown() [POSIX.1-2008 で追加された]\n"
10630 "fchownat() [POSIX.1-2008 で追加された]\n"
10631 "fclose()\n"
10632 "fcntl() (cmd 引き数が何であっても)\n"
10633 "fflush()\n"
10634 "fgetc()\n"
10635 "fgetpos()\n"
10636 "fgets()\n"
10637 "fgetwc()\n"
10638 "fgetws()\n"
10639 "fmtmsg()\n"
10640 "fopen()\n"
10641 "fpathconf()\n"
10642 "fprintf()\n"
10643 "fputc()\n"
10644 "fputs()\n"
10645 "fputwc()\n"
10646 "fputws()\n"
10647 "fread()\n"
10648 "freopen()\n"
10649 "fscanf()\n"
10650 "fseek()\n"
10651 "fseeko()\n"
10652 "fsetpos()\n"
10653 "fstat()\n"
10654 "fstatat() [POSIX.1-2008 で追加された]\n"
10655 "ftell()\n"
10656 "ftello()\n"
10657 "ftw()\n"
10658 "futimens() [POSIX.1-2008 で追加された]\n"
10659 "fwprintf()\n"
10660 "fwrite()\n"
10661 "fwscanf()\n"
10662 "getaddrinfo()\n"
10663 "getc()\n"
10664 "getc_unlocked()\n"
10665 "getchar()\n"
10666 "getchar_unlocked()\n"
10667 "getcwd()\n"
10668 "getdate()\n"
10669 "getdelim() [POSIX.1-2008 で追加された]\n"
10670 "getgrent()\n"
10671 "getgrgid()\n"
10672 "getgrgid_r()\n"
10673 "getgrnam()\n"
10674 "getgrnam_r()\n"
10675 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10676 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10677 "gethostent()\n"
10678 "gethostid()\n"
10679 "gethostname()\n"
10680 "getline() [POSIX.1-2008 で追加された]\n"
10681 "getlogin()\n"
10682 "getlogin_r()\n"
10683 "getnameinfo()\n"
10684 "getnetbyaddr()\n"
10685 "getnetbyname()\n"
10686 "getnetent()\n"
10687 "getopt() (opterr が 0 以外の場合)\n"
10688 "getprotobyname()\n"
10689 "getprotobynumber()\n"
10690 "getprotoent()\n"
10691 "getpwent()\n"
10692 "getpwnam()\n"
10693 "getpwnam_r()\n"
10694 "getpwuid()\n"
10695 "getpwuid_r()\n"
10696 "gets()\n"
10697 "getservbyname()\n"
10698 "getservbyport()\n"
10699 "getservent()\n"
10700 "getutxent()\n"
10701 "getutxid()\n"
10702 "getutxline()\n"
10703 "getwc()\n"
10704 "getwchar()\n"
10705 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10706 "glob()\n"
10707 "iconv_close()\n"
10708 "iconv_open()\n"
10709 "ioctl()\n"
10710 "link()\n"
10711 "linkat() [POSIX.1-2008 で追加された]\n"
10712 "lio_listio() [POSIX.1-2008 で追加された]\n"
10713 "localtime()\n"
10714 "localtime_r()\n"
10715 "lockf() [POSIX.1-2008 で追加された]\n"
10716 "lseek()\n"
10717 "lstat()\n"
10718 "mkdir() [POSIX.1-2008 で追加された]\n"
10719 "mkdirat() [POSIX.1-2008 で追加された]\n"
10720 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10721 "mkfifo() [POSIX.1-2008 で追加された]\n"
10722 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10723 "mknod() [POSIX.1-2008 で追加された]\n"
10724 "mknodat() [POSIX.1-2008 で追加された]\n"
10725 "mkstemp()\n"
10726 "mktime()\n"
10727 "nftw()\n"
10728 "opendir()\n"
10729 "openlog()\n"
10730 "pathconf()\n"
10731 "pclose()\n"
10732 "perror()\n"
10733 "popen()\n"
10734 "posix_fadvise()\n"
10735 "posix_fallocate()\n"
10736 "posix_madvise()\n"
10737 "posix_openpt()\n"
10738 "posix_spawn()\n"
10739 "posix_spawnp()\n"
10740 "posix_trace_clear()\n"
10741 "posix_trace_close()\n"
10742 "posix_trace_create()\n"
10743 "posix_trace_create_withlog()\n"
10744 "posix_trace_eventtypelist_getnext_id()\n"
10745 "posix_trace_eventtypelist_rewind()\n"
10746 "posix_trace_flush()\n"
10747 "posix_trace_get_attr()\n"
10748 "posix_trace_get_filter()\n"
10749 "posix_trace_get_status()\n"
10750 "posix_trace_getnext_event()\n"
10751 "posix_trace_open()\n"
10752 "posix_trace_rewind()\n"
10753 "posix_trace_set_filter()\n"
10754 "posix_trace_shutdown()\n"
10755 "posix_trace_timedgetnext_event()\n"
10756 "posix_typed_mem_open()\n"
10757 "printf()\n"
10758 "psiginfo() [POSIX.1-2008 で追加された]\n"
10759 "psignal() [POSIX.1-2008 で追加された]\n"
10760 "pthread_rwlock_rdlock()\n"
10761 "pthread_rwlock_timedrdlock()\n"
10762 "pthread_rwlock_timedwrlock()\n"
10763 "pthread_rwlock_wrlock()\n"
10764 "putc()\n"
10765 "putc_unlocked()\n"
10766 "putchar()\n"
10767 "putchar_unlocked()\n"
10768 "puts()\n"
10769 "pututxline()\n"
10770 "putwc()\n"
10771 "putwchar()\n"
10772 "readdir()\n"
10773 "readdir_r()\n"
10774 "readlink() [POSIX.1-2008 で追加された]\n"
10775 "readlinkat() [POSIX.1-2008 で追加された]\n"
10776 "remove()\n"
10777 "rename()\n"
10778 "renameat() [POSIX.1-2008 で追加された]\n"
10779 "rewind()\n"
10780 "rewinddir()\n"
10781 "scandir() [POSIX.1-2008 で追加された]\n"
10782 "scanf()\n"
10783 "seekdir()\n"
10784 "semop()\n"
10785 "setgrent()\n"
10786 "sethostent()\n"
10787 "setnetent()\n"
10788 "setprotoent()\n"
10789 "setpwent()\n"
10790 "setservent()\n"
10791 "setutxent()\n"
10792 "sigpause() [POSIX.1-2008 で追加された]\n"
10793 "stat()\n"
10794 "strerror()\n"
10795 "strerror_r()\n"
10796 "strftime()\n"
10797 "symlink()\n"
10798 "symlinkat() [POSIX.1-2008 で追加された]\n"
10799 "sync()\n"
10800 "syslog()\n"
10801 "tmpfile()\n"
10802 "tmpnam()\n"
10803 "ttyname()\n"
10804 "ttyname_r()\n"
10805 "tzset()\n"
10806 "ungetc()\n"
10807 "ungetwc()\n"
10808 "unlink()\n"
10809 "unlinkat() [POSIX.1-2008 で追加された]\n"
10810 "utime() [POSIX.1-2008 で追加された]\n"
10811 "utimensat() [POSIX.1-2008 で追加された]\n"
10812 "utimes() [POSIX.1-2008 で追加された]\n"
10813 "vdprintf() [POSIX.1-2008 で追加された]\n"
10814 "vfprintf()\n"
10815 "vfwprintf()\n"
10816 "vprintf()\n"
10817 "vwprintf()\n"
10818 "wcsftime()\n"
10819 "wordexp()\n"
10820 "wprintf()\n"
10821 "wscanf()\n"
10822
10823 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10824 #.  files, it looks as though at least the following nonstandard
10825 #.  functions are cancellation points:
10826 #.  endnetgrent
10827 #.  endspent
10828 #.  epoll_pwait
10829 #.  epoll_wait
10830 #.  fcloseall
10831 #.  fdopendir
10832 #.  fflush_unlocked
10833 #.  fgetc_unlocked
10834 #.  fgetgrent
10835 #.  fgetgrent_r
10836 #.  fgetpwent
10837 #.  fgetpwent_r
10838 #.  fgets_unlocked
10839 #.  fgetspent
10840 #.  fgetspent_r
10841 #.  fgetwc_unlocked
10842 #.  fgetws_unlocked
10843 #.  fputc_unlocked
10844 #.  fputs_unlocked
10845 #.  fputwc_unlocked
10846 #.  fputws_unlocked
10847 #.  fread_unlocked
10848 #.  fwrite_unlocked
10849 #.  gai_suspend
10850 #.  getaddrinfo_a
10851 #.  getdate_r
10852 #.  getgrent_r
10853 #.  getgrouplist
10854 #.  gethostbyaddr_r
10855 #.  gethostbyname2
10856 #.  gethostbyname2_r
10857 #.  gethostbyname_r
10858 #.  gethostent_r
10859 #.  getnetbyaddr_r
10860 #.  getnetbyname_r
10861 #.  getnetent_r
10862 #.  getnetgrent
10863 #.  getnetgrent_r
10864 #.  getprotobyname_r
10865 #.  getprotobynumber_r
10866 #.  getprotoent_r
10867 #.  getpw
10868 #.  getpwent_r
10869 #.  getservbyname_r
10870 #.  getservbyport_r
10871 #.  getservent_r
10872 #.  getspent
10873 #.  getspent_r
10874 #.  getspnam
10875 #.  getspnam_r
10876 #.  getutmp
10877 #.  getutmpx
10878 #.  getw
10879 #.  getwc_unlocked
10880 #.  getwchar_unlocked
10881 #.  initgroups
10882 #.  innetgr
10883 #.  mkostemp
10884 #.  mkostemp64
10885 #.  mkstemp64
10886 #.  ppoll
10887 #.  pthread_timedjoin_np
10888 #.  putgrent
10889 #.  putpwent
10890 #.  putspent
10891 #.  putw
10892 #.  putwc_unlocked
10893 #.  putwchar_unlocked
10894 #.  rcmd
10895 #.  rcmd_af
10896 #.  rexec
10897 #.  rexec_af
10898 #.  rresvport
10899 #.  rresvport_af
10900 #.  ruserok
10901 #.  ruserok_af
10902 #.  setnetgrent
10903 #.  setspent
10904 #.  sgetspent
10905 #.  sgetspent_r
10906 #.  updwtmpx
10907 #.  utmpxname
10908 #.  vfscanf
10909 #.  vfwscanf
10910 #.  vscanf
10911 #.  vsyslog
10912 #.  vwscanf
10913 #. type: Plain text
10914 #: build/C/man7/pthreads.7:655
10915 msgid ""
10916 "An implementation may also mark other functions not specified in the "
10917 "standard as cancellation points.  In particular, an implementation is likely "
10918 "to mark any nonstandard function that may block as a cancellation point.  "
10919 "(This includes most functions that can touch files.)"
10920 msgstr ""
10921 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10922 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10923 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10924 "関数がこれに含まれる)。"
10925
10926 #. type: SS
10927 #: build/C/man7/pthreads.7:655
10928 #, no-wrap
10929 msgid "Compiling on Linux"
10930 msgstr "Linux でのコンパイル"
10931
10932 #. type: Plain text
10933 #: build/C/man7/pthreads.7:658
10934 msgid ""
10935 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10936 "pthread>."
10937 msgstr ""
10938 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10939 "きである。"
10940
10941 #. type: SS
10942 #: build/C/man7/pthreads.7:658
10943 #, no-wrap
10944 msgid "Linux implementations of POSIX threads"
10945 msgstr "POSIX スレッドの Linux での実装"
10946
10947 #. type: Plain text
10948 #: build/C/man7/pthreads.7:661
10949 msgid ""
10950 "Over time, two threading implementations have been provided by the GNU C "
10951 "library on Linux:"
10952 msgstr ""
10953 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10954 "た。"
10955
10956 #. type: TP
10957 #: build/C/man7/pthreads.7:661
10958 #, no-wrap
10959 msgid "B<LinuxThreads>"
10960 msgstr "B<LinuxThreads>"
10961
10962 #. type: Plain text
10963 #: build/C/man7/pthreads.7:665
10964 msgid ""
10965 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10966 "implementation is no longer supported."
10967 msgstr ""
10968 "最初の Pthreads の実装。\n"
10969 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10970
10971 #. type: TP
10972 #: build/C/man7/pthreads.7:665
10973 #, no-wrap
10974 msgid "B<NPTL> (Native POSIX Threads Library)"
10975 msgstr "B<NPTL> (Native POSIX Threads Library)"
10976
10977 #. type: Plain text
10978 #: build/C/man7/pthreads.7:673
10979 msgid ""
10980 "This is the modern Pthreads implementation.  By comparison with "
10981 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10982 "POSIX.1 specification and better performance when creating large numbers of "
10983 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10984 "are present in the Linux 2.6 kernel."
10985 msgstr ""
10986 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
10987 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
10988 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
10989 "装されている機能が必要である。"
10990
10991 #. type: Plain text
10992 #: build/C/man7/pthreads.7:683
10993 msgid ""
10994 "Both of these are so-called 1:1 implementations, meaning that each thread "
10995 "maps to a kernel scheduling entity.  Both threading implementations employ "
10996 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
10997 "primitives (mutexes, thread joining, and so on) are implemented using the "
10998 "Linux B<futex>(2)  system call."
10999 msgstr ""
11000 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
11001 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
11002 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
11003 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
11004 "使って実装されている。"
11005
11006 #. type: SS
11007 #: build/C/man7/pthreads.7:683
11008 #, no-wrap
11009 msgid "LinuxThreads"
11010 msgstr "LinuxThreads"
11011
11012 #. type: Plain text
11013 #: build/C/man7/pthreads.7:685
11014 msgid "The notable features of this implementation are the following:"
11015 msgstr "この実装の大きな特徴は以下の通りである:"
11016
11017 #. type: Plain text
11018 #: build/C/man7/pthreads.7:692
11019 msgid ""
11020 "In addition to the main (initial) thread, and the threads that the program "
11021 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
11022 "thread.  This thread handles thread creation and termination.  (Problems can "
11023 "result if this thread is inadvertently killed.)"
11024 msgstr ""
11025 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
11026 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
11027 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
11028 "kill されると、問題が起こることがある)。"
11029
11030 #. type: Plain text
11031 #: build/C/man7/pthreads.7:704
11032 msgid ""
11033 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
11034 "the first three real-time signals are used (see also B<signal>(7)).  On "
11035 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
11036 "avoid the use of whichever set of signals is employed by the implementation."
11037 msgstr ""
11038 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11039 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11040 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11041 "用されているシグナルを どれも使わないようにしなければならない。"
11042
11043 #. type: Plain text
11044 #: build/C/man7/pthreads.7:711
11045 msgid ""
11046 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11047 "implemented as processes which share more information than usual, but which "
11048 "do not share a common process ID.)  LinuxThreads threads (including the "
11049 "manager thread)  are visible as separate processes using B<ps>(1)."
11050 msgstr ""
11051 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11052 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11053 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11054 "を使うと別のプロセスのように見える。"
11055
11056 #. type: Plain text
11057 #: build/C/man7/pthreads.7:714
11058 msgid ""
11059 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11060 "number of ways, including the following:"
11061 msgstr ""
11062 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11063 "示すような点がある:"
11064
11065 #. type: Plain text
11066 #: build/C/man7/pthreads.7:718
11067 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11068 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11069
11070 #. type: Plain text
11071 #: build/C/man7/pthreads.7:727
11072 msgid ""
11073 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11074 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11075 "should return the same value as B<getppid>(2)  in the main thread."
11076 msgstr ""
11077 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11078 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11079 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11080
11081 #. type: Plain text
11082 #: build/C/man7/pthreads.7:737
11083 msgid ""
11084 "When one thread creates a new child process using B<fork>(2), any thread "
11085 "should be able to B<wait>(2)  on the child.  However, the implementation "
11086 "only allows the thread that created the child to B<wait>(2)  on it."
11087 msgstr ""
11088 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11089 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11090 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11091 "る。"
11092
11093 #. type: Plain text
11094 #: build/C/man7/pthreads.7:744
11095 msgid ""
11096 "When a thread calls B<execve>(2), all other threads are terminated (as "
11097 "required by POSIX.1).  However, the resulting process has the same PID as "
11098 "the thread that called B<execve>(2): it should have the same PID as the main "
11099 "thread."
11100 msgstr ""
11101 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11102 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11103 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11104 "る。"
11105
11106 #. type: Plain text
11107 #: build/C/man7/pthreads.7:751
11108 msgid ""
11109 "Threads do not share user and group IDs.  This can cause complications with "
11110 "set-user-ID programs and can cause failures in Pthreads functions if an "
11111 "application changes its credentials using B<seteuid>(2)  or similar."
11112 msgstr ""
11113 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11114 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11115 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11116
11117 #. type: Plain text
11118 #: build/C/man7/pthreads.7:753
11119 msgid "Threads do not share a common session ID and process group ID."
11120 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11121
11122 #. type: Plain text
11123 #: build/C/man7/pthreads.7:756
11124 msgid "Threads do not share record locks created using B<fcntl>(2)."
11125 msgstr ""
11126 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11127
11128 #. type: Plain text
11129 #: build/C/man7/pthreads.7:762
11130 msgid ""
11131 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11132 "rather than process-wide."
11133 msgstr ""
11134 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11135 "単位の情報である。"
11136
11137 #. type: Plain text
11138 #: build/C/man7/pthreads.7:765
11139 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11140 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11141
11142 #. type: Plain text
11143 #: build/C/man7/pthreads.7:767
11144 msgid "Threads do not share interval timers."
11145 msgstr "スレッド間でインターバル・タイマを共有しない。"
11146
11147 #.  FIXME . bug report filed for NPTL nice nonconformance
11148 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11149 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11150 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11151 #.  Monitor this to see if it makes it into mainline.
11152 #. type: Plain text
11153 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11154 msgid "Threads do not share a common nice value."
11155 msgstr "スレッドは共通の nice 値を共有しない。"
11156
11157 #. type: Plain text
11158 #: build/C/man7/pthreads.7:779
11159 msgid ""
11160 "POSIX.1 distinguishes the notions of signals that are directed to the "
11161 "process as a whole and signals that are directed to individual threads.  "
11162 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11163 "example) should be handled by a single, arbitrarily selected thread within "
11164 "the process.  LinuxThreads does not support the notion of process-directed "
11165 "signals: signals may be sent only to specific threads."
11166 msgstr ""
11167 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11168 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11169 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11170 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11171 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11172 "ルは特定のスレッドにだけ送ることができる。"
11173
11174 #. type: Plain text
11175 #: build/C/man7/pthreads.7:788
11176 msgid ""
11177 "Threads have distinct alternate signal stack settings.  However, a new "
11178 "thread's alternate signal stack settings are copied from the thread that "
11179 "created it, so that the threads initially share an alternate signal stack.  "
11180 "(A new thread should start with no alternate signal stack defined.  If two "
11181 "threads handle signals on their shared alternate signal stack at the same "
11182 "time, unpredictable program failures are likely to occur.)"
11183 msgstr ""
11184 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11185 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11186 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11187 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11188 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11189 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11190
11191 #. type: SS
11192 #: build/C/man7/pthreads.7:788
11193 #, no-wrap
11194 msgid "NPTL"
11195 msgstr "NPTL"
11196
11197 #. type: Plain text
11198 #: build/C/man7/pthreads.7:797
11199 msgid ""
11200 "With NPTL, all of the threads in a process are placed in the same thread "
11201 "group; all members of a thread group share the same PID.  NPTL does not "
11202 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11203 "signals (see also B<signal>(7)); these signals cannot be used in "
11204 "applications."
11205 msgstr ""
11206 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11207 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11208 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11209 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11210 "ションでは使用できない。"
11211
11212 #. type: Plain text
11213 #: build/C/man7/pthreads.7:799
11214 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11215 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11216
11217 #. type: Plain text
11218 #: build/C/man7/pthreads.7:808
11219 msgid "Some NPTL nonconformances occur only with older kernels:"
11220 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11221
11222 #. type: Plain text
11223 #: build/C/man7/pthreads.7:814
11224 msgid ""
11225 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11226 "rather than process-wide (fixed in kernel 2.6.9)."
11227 msgstr ""
11228 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11229 "単位の情報である (カーネル 2.6.9 で修正された)。"
11230
11231 #. type: Plain text
11232 #: build/C/man7/pthreads.7:816
11233 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11234 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11235
11236 #. type: Plain text
11237 #: build/C/man7/pthreads.7:818
11238 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11239 msgstr ""
11240 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11241
11242 #. type: Plain text
11243 #: build/C/man7/pthreads.7:822
11244 msgid ""
11245 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11246 "(fixed in kernel 2.6.16)."
11247 msgstr ""
11248 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11249 "きる (カーネル 2.6.16 で修正された)。"
11250
11251 #. type: Plain text
11252 #: build/C/man7/pthreads.7:827
11253 msgid ""
11254 "Only the main thread is permitted to make the process into a process group "
11255 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11256 msgstr ""
11257 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11258 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11259
11260 #. type: Plain text
11261 #: build/C/man7/pthreads.7:833
11262 msgid ""
11263 "Threads have distinct alternate signal stack settings.  However, a new "
11264 "thread's alternate signal stack settings are copied from the thread that "
11265 "created it, so that the threads initially share an alternate signal stack "
11266 "(fixed in kernel 2.6.16)."
11267 msgstr ""
11268 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11269 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11270 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11271 "ル 2.6.16 で修正された)。"
11272
11273 #. type: Plain text
11274 #: build/C/man7/pthreads.7:835
11275 msgid "Note the following further points about the NPTL implementation:"
11276 msgstr "NPTL の実装では以下の点についても注意すること:"
11277
11278 #. type: Plain text
11279 #: build/C/man7/pthreads.7:849
11280 msgid ""
11281 "If the stack size soft resource limit (see the description of "
11282 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11283 "I<unlimited>, then this value defines the default stack size for new "
11284 "threads.  To be effective, this limit must be set before the program is "
11285 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11286 "stacksize> in the C shell)."
11287 msgstr ""
11288 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11289 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11290 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11291 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11292 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11293 "は I<limit stacksize>)  を使って設定する。"
11294
11295 #. type: SS
11296 #: build/C/man7/pthreads.7:849
11297 #, no-wrap
11298 msgid "Determining the threading implementation"
11299 msgstr "スレッド実装の判定"
11300
11301 #. type: Plain text
11302 #: build/C/man7/pthreads.7:854
11303 msgid ""
11304 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11305 "system's threading implementation, for example:"
11306 msgstr ""
11307 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11308 "装を判定することができる。 以下に例を示す:"
11309
11310 #. type: Plain text
11311 #: build/C/man7/pthreads.7:859
11312 #, no-wrap
11313 msgid ""
11314 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11315 "NPTL 2.3.4\n"
11316 msgstr ""
11317 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11318 "NPTL 2.3.4\n"
11319
11320 #. type: Plain text
11321 #: build/C/man7/pthreads.7:864
11322 msgid ""
11323 "With older glibc versions, a command such as the following should be "
11324 "sufficient to determine the default threading implementation:"
11325 msgstr ""
11326 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11327 "ド実装を判定することができる。"
11328
11329 #. type: Plain text
11330 #: build/C/man7/pthreads.7:870
11331 #, no-wrap
11332 msgid ""
11333 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11334 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11335 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11336 msgstr ""
11337 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11338 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11339 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11340
11341 #. type: SS
11342 #: build/C/man7/pthreads.7:872
11343 #, no-wrap
11344 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11345 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11346
11347 #. type: Plain text
11348 #: build/C/man7/pthreads.7:887
11349 msgid ""
11350 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11351 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11352 "override the dynamic linker's default choice of threading implementation.  "
11353 "This variable tells the dynamic linker to assume that it is running on top "
11354 "of a particular kernel version.  By specifying a kernel version that does "
11355 "not provide the support required by NPTL, we can force the use of "
11356 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11357 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11358 "For example:"
11359 msgstr ""
11360 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11361 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11362 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11363 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11364 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11365 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11366 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11367 "ン を動作させる場合だろう)。 以下に例を示す:"
11368
11369 #. type: Plain text
11370 #: build/C/man7/pthreads.7:893
11371 #, no-wrap
11372 msgid ""
11373 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11374 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11375 "        linuxthreads-0.10 by Xavier Leroy\n"
11376 msgstr ""
11377 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11378 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11379 "        linuxthreads-0.10 by Xavier Leroy\n"
11380
11381 #. type: Plain text
11382 #: build/C/man7/pthreads.7:905
11383 msgid ""
11384 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11385 "(7), B<signal>(7),"
11386 msgstr ""
11387 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11388 "B<signal>(7),"
11389
11390 #. type: Plain text
11391 #: build/C/man7/pthreads.7:929
11392 msgid ""
11393 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11394 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11395 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11396 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11397 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11398 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11399 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11400 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11401 msgstr ""
11402 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11403 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11404 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11405 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11406 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11407 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11408 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11409 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11410 "and B<pthread_testcancel>(3)"