OSDN Git Service

(split) git commit -m "LDP: Update the version to 3.63 in PO files"
[linuxjm/LDP_man-pages.git] / po4a / pthread / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2014-04-13 10:27+0900\n"
10 "PO-Revision-Date: 2014-04-13 10:38+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.63 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.63 の一部\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 #, fuzzy
3520 #| msgid ""
3521 #| "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), "
3522 #| "may be either I<asynchronous> or I<deferred> (the default for new "
3523 #| "threads).  Asynchronous cancelability means that the thread can be "
3524 #| "canceled at any time (usually immediately, but the system does not "
3525 #| "guarantee this).  Deferred cancelability means that cancellation will be "
3526 #| "delayed until the thread next calls a function that is a I<cancellation "
3527 #| "point>.  A list of functions that are or may be cancellation points is "
3528 #| "provided in I<pthreads>(7)."
3529 msgid ""
3530 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3531 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3532 "Asynchronous cancelability means that the thread can be canceled at any time "
3533 "(usually immediately, but the system does not guarantee this).  Deferred "
3534 "cancelability means that cancellation will be delayed until the thread next "
3535 "calls a function that is a I<cancellation point>.  A list of functions that "
3536 "are or may be cancellation points is provided in B<pthreads>(7)."
3537 msgstr ""
3538 "スレッドのキャンセル種別 (cancelability type) は\n"
3539 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3540 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3541 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3542 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3543 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3544 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3545 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3546 "遅延される。取り消しポイントに設定されていたり設定\n"
3547 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3548
3549 #. type: Plain text
3550 #: build/C/man3/pthread_cancel.3:81
3551 msgid ""
3552 "When a cancellation requested is acted on, the following steps occur for "
3553 "I<thread> (in this order):"
3554 msgstr ""
3555 "キャンセル要求が実行されると、\n"
3556 "I<thread> では以下のステップが (この順序で) 行われる。"
3557
3558 #. type: IP
3559 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3560 #, no-wrap
3561 msgid "1."
3562 msgstr "1."
3563
3564 #. type: Plain text
3565 #: build/C/man3/pthread_cancel.3:86
3566 msgid ""
3567 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3568 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3569 msgstr ""
3570 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3571 "取り出され (pop され)、呼び出される。\n"
3572 "(B<pthread_cleanup_push>(3) 参照)"
3573
3574 #. type: IP
3575 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3576 #, no-wrap
3577 msgid "2."
3578 msgstr "2."
3579
3580 #. type: Plain text
3581 #: build/C/man3/pthread_cancel.3:91
3582 msgid ""
3583 "Thread-specific data destructors are called, in an unspecified order.  (See "
3584 "B<pthread_key_create>(3).)"
3585 msgstr ""
3586 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3587 "呼び出し順序は規定されていない。\n"
3588 "(B<pthread_key_create>(3) 参照)"
3589
3590 #. type: IP
3591 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3592 #, no-wrap
3593 msgid "3."
3594 msgstr "3."
3595
3596 #. type: Plain text
3597 #: build/C/man3/pthread_cancel.3:95
3598 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3599 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3600
3601 #. type: Plain text
3602 #: build/C/man3/pthread_cancel.3:103
3603 msgid ""
3604 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3605 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3606 "caller whether the cancellation request was successfully queued."
3607 msgstr ""
3608 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3609 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3610 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3611
3612 #. type: Plain text
3613 #: build/C/man3/pthread_cancel.3:112
3614 msgid ""
3615 "After a canceled thread has terminated, a join with that thread using "
3616 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3617 "status.  (Joining with a thread is the only way to know that cancellation "
3618 "has completed.)"
3619 msgstr ""
3620 "キャンセルされたスレッドが終了された後に、\n"
3621 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3622 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3623 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3624
3625 #. type: Plain text
3626 #: build/C/man3/pthread_cancel.3:117
3627 msgid ""
3628 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3629 "error number."
3630 msgstr ""
3631 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3632 "エラーの場合、0 以外のエラー番号を返す。"
3633
3634 #. type: TP
3635 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3636 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3637 #: build/C/man3/pthread_setaffinity_np.3:114
3638 #: build/C/man3/pthread_setschedparam.3:114
3639 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3640 #, no-wrap
3641 msgid "B<ESRCH>"
3642 msgstr "B<ESRCH>"
3643
3644 #. type: Plain text
3645 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3646 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3647 #: build/C/man3/pthread_setaffinity_np.3:119
3648 #: build/C/man3/pthread_setschedparam.3:119
3649 #: build/C/man3/pthread_setschedprio.3:75
3650 msgid "No thread with the ID I<thread> could be found."
3651 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3652
3653 #. type: Plain text
3654 #: build/C/man3/pthread_cancel.3:135
3655 msgid ""
3656 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3657 "threading implementation, the first real-time signal (i.e., signal 32) is "
3658 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3659 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3660 msgstr ""
3661 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3662 "は、\n"
3663 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3664 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3665 "ム\n"
3666 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3667
3668 #. type: Plain text
3669 #: build/C/man3/pthread_cancel.3:141
3670 msgid ""
3671 "The program below creates a thread and then cancels it.  The main thread "
3672 "joins with the canceled thread to check that its exit status was "
3673 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3674 "run the program:"
3675 msgstr ""
3676 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3677 "る。\n"
3678 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3679 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3680 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3681
3682 #. type: Plain text
3683 #: build/C/man3/pthread_cancel.3:149
3684 #, no-wrap
3685 msgid ""
3686 "$ ./a.out\n"
3687 "thread_func(): started; cancellation disabled\n"
3688 "main(): sending cancellation request\n"
3689 "thread_func(): about to enable cancellation\n"
3690 "main(): thread was canceled\n"
3691 msgstr ""
3692 "$ ./a.out\n"
3693 "thread_func(): started; cancellation disabled\n"
3694 "main(): sending cancellation request\n"
3695 "thread_func(): about to enable cancellation\n"
3696 "main(): thread was canceled\n"
3697
3698 #. type: Plain text
3699 #: build/C/man3/pthread_cancel.3:159
3700 #, no-wrap
3701 msgid ""
3702 "#include E<lt>pthread.hE<gt>\n"
3703 "#include E<lt>stdio.hE<gt>\n"
3704 "#include E<lt>errno.hE<gt>\n"
3705 "#include E<lt>stdlib.hE<gt>\n"
3706 "#include E<lt>unistd.hE<gt>\n"
3707 msgstr ""
3708 "#include E<lt>pthread.hE<gt>\n"
3709 "#include E<lt>stdio.hE<gt>\n"
3710 "#include E<lt>errno.hE<gt>\n"
3711 "#include E<lt>stdlib.hE<gt>\n"
3712 "#include E<lt>unistd.hE<gt>\n"
3713
3714 #. type: Plain text
3715 #: build/C/man3/pthread_cancel.3:167
3716 #, no-wrap
3717 msgid ""
3718 "static void *\n"
3719 "thread_func(void *ignored_argument)\n"
3720 "{\n"
3721 "    int s;\n"
3722 msgstr ""
3723 "static void *\n"
3724 "thread_func(void *ignored_argument)\n"
3725 "{\n"
3726 "    int s;\n"
3727
3728 #. type: Plain text
3729 #: build/C/man3/pthread_cancel.3:170
3730 #, no-wrap
3731 msgid ""
3732 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3733 "       immediately react to a cancellation request */\n"
3734 msgstr ""
3735 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3736 "       immediately react to a cancellation request */\n"
3737
3738 #. type: Plain text
3739 #: build/C/man3/pthread_cancel.3:174
3740 #, no-wrap
3741 msgid ""
3742 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3743 "    if (s != 0)\n"
3744 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3745 msgstr ""
3746 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3747 "    if (s != 0)\n"
3748 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3749
3750 #. type: Plain text
3751 #: build/C/man3/pthread_cancel.3:178
3752 #, no-wrap
3753 msgid ""
3754 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3755 "    sleep(5);\n"
3756 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3757 msgstr ""
3758 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3759 "    sleep(5);\n"
3760 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3761
3762 #. type: Plain text
3763 #: build/C/man3/pthread_cancel.3:182
3764 #, no-wrap
3765 msgid ""
3766 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3767 "    if (s != 0)\n"
3768 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3769 msgstr ""
3770 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3771 "    if (s != 0)\n"
3772 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3773
3774 #. type: Plain text
3775 #: build/C/man3/pthread_cancel.3:184
3776 #, no-wrap
3777 msgid "    /* sleep() is a cancellation point */\n"
3778 msgstr "    /* sleep() is a cancellation point */\n"
3779
3780 #. type: Plain text
3781 #: build/C/man3/pthread_cancel.3:186
3782 #, no-wrap
3783 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3784 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3785
3786 #. type: Plain text
3787 #: build/C/man3/pthread_cancel.3:188
3788 #, no-wrap
3789 msgid "    /* Should never get here */\n"
3790 msgstr "    /* Should never get here */\n"
3791
3792 #. type: Plain text
3793 #: build/C/man3/pthread_cancel.3:192
3794 #, no-wrap
3795 msgid ""
3796 "    printf(\"thread_func(): not canceled!\\en\");\n"
3797 "    return NULL;\n"
3798 "}\n"
3799 msgstr ""
3800 "    printf(\"thread_func(): not canceled!\\en\");\n"
3801 "    return NULL;\n"
3802 "}\n"
3803
3804 #. type: Plain text
3805 #: build/C/man3/pthread_cancel.3:199
3806 #, no-wrap
3807 msgid ""
3808 "int\n"
3809 "main(void)\n"
3810 "{\n"
3811 "    pthread_t thr;\n"
3812 "    void *res;\n"
3813 "    int s;\n"
3814 msgstr ""
3815 "int\n"
3816 "main(void)\n"
3817 "{\n"
3818 "    pthread_t thr;\n"
3819 "    void *res;\n"
3820 "    int s;\n"
3821
3822 #. type: Plain text
3823 #: build/C/man3/pthread_cancel.3:201
3824 #, no-wrap
3825 msgid "    /* Start a thread and then send it a cancellation request */\n"
3826 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3827
3828 #. type: Plain text
3829 #: build/C/man3/pthread_cancel.3:205
3830 #, no-wrap
3831 msgid ""
3832 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3833 "    if (s != 0)\n"
3834 "        handle_error_en(s, \"pthread_create\");\n"
3835 msgstr ""
3836 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3837 "    if (s != 0)\n"
3838 "        handle_error_en(s, \"pthread_create\");\n"
3839
3840 #. type: Plain text
3841 #: build/C/man3/pthread_cancel.3:207
3842 #, no-wrap
3843 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3844 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3845
3846 #. type: Plain text
3847 #: build/C/man3/pthread_cancel.3:212
3848 #, no-wrap
3849 msgid ""
3850 "    printf(\"main(): sending cancellation request\\en\");\n"
3851 "    s = pthread_cancel(thr);\n"
3852 "    if (s != 0)\n"
3853 "        handle_error_en(s, \"pthread_cancel\");\n"
3854 msgstr ""
3855 "    printf(\"main(): sending cancellation request\\en\");\n"
3856 "    s = pthread_cancel(thr);\n"
3857 "    if (s != 0)\n"
3858 "        handle_error_en(s, \"pthread_cancel\");\n"
3859
3860 #. type: Plain text
3861 #: build/C/man3/pthread_cancel.3:214
3862 #, no-wrap
3863 msgid "    /* Join with thread to see what its exit status was */\n"
3864 msgstr "    /* Join with thread to see what its exit status was */\n"
3865
3866 #. type: Plain text
3867 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
3868 #, no-wrap
3869 msgid ""
3870 "    s = pthread_join(thr, &res);\n"
3871 "    if (s != 0)\n"
3872 "        handle_error_en(s, \"pthread_join\");\n"
3873 msgstr ""
3874 "    s = pthread_join(thr, &res);\n"
3875 "    if (s != 0)\n"
3876 "        handle_error_en(s, \"pthread_join\");\n"
3877
3878 #. type: Plain text
3879 #: build/C/man3/pthread_cancel.3:225
3880 #, no-wrap
3881 msgid ""
3882 "    if (res == PTHREAD_CANCELED)\n"
3883 "        printf(\"main(): thread was canceled\\en\");\n"
3884 "    else\n"
3885 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3886 "    exit(EXIT_SUCCESS);\n"
3887 "}\n"
3888 msgstr ""
3889 "    if (res == PTHREAD_CANCELED)\n"
3890 "        printf(\"main(): thread was canceled\\en\");\n"
3891 "    else\n"
3892 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3893 "    exit(EXIT_SUCCESS);\n"
3894 "}\n"
3895
3896 #. type: Plain text
3897 #: build/C/man3/pthread_cancel.3:238
3898 msgid ""
3899 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3900 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3901 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3902 msgstr ""
3903 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3904 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3905 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3906
3907 #. type: TH
3908 #: build/C/man3/pthread_cleanup_push.3:26
3909 #, no-wrap
3910 msgid "PTHREAD_CLEANUP_PUSH"
3911 msgstr "PTHREAD_CLEANUP_PUSH"
3912
3913 #. type: TH
3914 #: build/C/man3/pthread_cleanup_push.3:26
3915 #: build/C/man3/pthread_setcancelstate.3:26
3916 #, no-wrap
3917 msgid "2008-11-24"
3918 msgstr "2008-11-24"
3919
3920 #. type: Plain text
3921 #: build/C/man3/pthread_cleanup_push.3:30
3922 msgid ""
3923 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3924 "clean-up handlers"
3925 msgstr ""
3926 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3927 "キャンセルクリーンアップハンドラの push/pop を行う"
3928
3929 #. type: Plain text
3930 #: build/C/man3/pthread_cleanup_push.3:37
3931 #, no-wrap
3932 msgid ""
3933 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3934 "B<                          void *>I<arg>B<);>\n"
3935 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3936 msgstr ""
3937 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3938 "B<                          void *>I<arg>B<);>\n"
3939 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3940
3941 #. type: Plain text
3942 #: build/C/man3/pthread_cleanup_push.3:48
3943 msgid ""
3944 "These functions manipulate the calling thread's stack of thread-cancellation "
3945 "clean-up handlers.  A clean-up handler is a function that is automatically "
3946 "executed when a thread is canceled (or in various other circumstances "
3947 "described below); it might, for example, unlock a mutex so that it becomes "
3948 "available to other threads in the process."
3949 msgstr ""
3950 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3951 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3952 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3953 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3954 "他のスレッドが利用できるようにする関数などが考えられる。"
3955
3956 #. type: Plain text
3957 #: build/C/man3/pthread_cleanup_push.3:59
3958 msgid ""
3959 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3960 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3961 "be given I<arg> as its argument."
3962 msgstr ""
3963 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3964 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3965 "起動される際には、 I<arg> が関数の引き数と渡される。"
3966
3967 #. type: Plain text
3968 #: build/C/man3/pthread_cleanup_push.3:66
3969 msgid ""
3970 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3971 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3972 "nonzero."
3973 msgstr ""
3974 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3975 "スタックの一番上のルーチンを削除する。\n"
3976 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3977
3978 #. type: Plain text
3979 #: build/C/man3/pthread_cleanup_push.3:69
3980 msgid ""
3981 "A cancellation clean-up handler is popped from the stack and executed in the "
3982 "following circumstances:"
3983 msgstr ""
3984 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3985 "スタックから取り出され実行される。"
3986
3987 #. type: Plain text
3988 #: build/C/man3/pthread_cleanup_push.3:73
3989 msgid ""
3990 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3991 "and executed in the reverse of the order in which they were pushed onto the "
3992 "stack."
3993 msgstr ""
3994 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3995 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3996 "実行は、スタックに登録されたのと逆の順序で行われる。"
3997
3998 #. type: Plain text
3999 #: build/C/man3/pthread_cleanup_push.3:83
4000 msgid ""
4001 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
4002 "handlers are executed as described in the preceding point.  (Clean-up "
4003 "handlers are I<not> called if the thread terminates by performing a "
4004 "I<return> from the thread start function.)"
4005 msgstr ""
4006 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
4007 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
4008 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
4009 "は、クリーンアップハンドラはI<呼び出されない>。)"
4010
4011 #. type: Plain text
4012 #: build/C/man3/pthread_cleanup_push.3:89
4013 msgid ""
4014 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
4015 "argument, the top-most clean-up handler is popped and executed."
4016 msgstr ""
4017 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
4018 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
4019 "実行される。"
4020
4021 #. type: Plain text
4022 #: build/C/man3/pthread_cleanup_push.3:101
4023 msgid ""
4024 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4025 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4026 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4027 "calls to these functions are paired within the same function, and at the "
4028 "same lexical nesting level.  (In other words, a clean-up handler is "
4029 "established only during the execution of a specified section of code.)"
4030 msgstr ""
4031 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4032 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4033 "して実装することを許容している。\n"
4034 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4035 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4036 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4037 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4038
4039 #. type: Plain text
4040 #: build/C/man3/pthread_cleanup_push.3:121
4041 msgid ""
4042 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4043 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
4044 "()  without the matching call of the pair since the jump buffer was filled "
4045 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
4046 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
4047 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
4048 "(3))  inside the handler."
4049 msgstr ""
4050 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4051 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4052 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4053 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4054 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4055 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4056 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4057 "結果になるかは不定である。"
4058
4059 #. type: Plain text
4060 #: build/C/man3/pthread_cleanup_push.3:123
4061 msgid "These functions do not return a value."
4062 msgstr "これらの関数は値を返さない。"
4063
4064 #.  SH VERSIONS
4065 #.  Available since glibc 2.0
4066 #. type: Plain text
4067 #: build/C/man3/pthread_cleanup_push.3:127
4068 msgid "There are no errors."
4069 msgstr "エラーはない。"
4070
4071 #. type: Plain text
4072 #: build/C/man3/pthread_cleanup_push.3:140
4073 msgid ""
4074 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4075 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4076 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4077 "declared within the scope of paired calls to these functions will be visible "
4078 "within only that scope."
4079 msgstr ""
4080 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4081 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4082 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4083 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4084 "ということを意味している。"
4085
4086 #.  The text was actually added in the 2004 TC2
4087 #. type: Plain text
4088 #: build/C/man3/pthread_cleanup_push.3:155
4089 msgid ""
4090 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4091 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4092 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4093 "avoid doing this."
4094 msgstr ""
4095 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4096 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4097 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4098 "不定であると書かれている。\n"
4099 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4100
4101 #. type: Plain text
4102 #: build/C/man3/pthread_cleanup_push.3:170
4103 msgid ""
4104 "The program below provides a simple example of the use of the functions "
4105 "described in this page.  The program creates a thread that executes a loop "
4106 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4107 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4108 "what command-line arguments are supplied, the main thread sends the other "
4109 "thread a cancellation request, or sets a global variable that causes the "
4110 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4111 msgstr ""
4112 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4113 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4114 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4115 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4116 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4117 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4118 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4119 "設定したりする。"
4120
4121 #. type: Plain text
4122 #: build/C/man3/pthread_cleanup_push.3:173
4123 msgid ""
4124 "In the following shell session, the main thread sends a cancellation request "
4125 "to the other thread:"
4126 msgstr ""
4127 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4128 "キャンセル要求を送信する。"
4129
4130 #. type: Plain text
4131 #: build/C/man3/pthread_cleanup_push.3:183
4132 #, no-wrap
4133 msgid ""
4134 "$ B<./a.out>\n"
4135 "New thread started\n"
4136 "cnt = 0\n"
4137 "cnt = 1\n"
4138 "Canceling thread\n"
4139 "Called clean-up handler\n"
4140 "Thread was canceled; cnt = 0\n"
4141 msgstr ""
4142 "$ B<./a.out>\n"
4143 "New thread started\n"
4144 "cnt = 0\n"
4145 "cnt = 1\n"
4146 "Canceling thread\n"
4147 "Called clean-up handler\n"
4148 "Thread was canceled; cnt = 0\n"
4149
4150 #. type: Plain text
4151 #: build/C/man3/pthread_cleanup_push.3:191
4152 msgid ""
4153 "From the above, we see that the thread was canceled, and that the "
4154 "cancellation clean-up handler was called and it reset the value of the "
4155 "global variable I<cnt> to 0."
4156 msgstr ""
4157 "上記の実行例から、スレッドがキャンセルされ、\n"
4158 "キャンセルクリーンアップハンドラが呼び出され、\n"
4159 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4160
4161 #. type: Plain text
4162 #: build/C/man3/pthread_cleanup_push.3:194
4163 msgid ""
4164 "In the next run, the main program sets a global variable that causes other "
4165 "thread to terminate normally:"
4166 msgstr ""
4167 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4168 "もう一つのスレッドが正常終了するようにしている。"
4169
4170 #. type: Plain text
4171 #: build/C/man3/pthread_cleanup_push.3:202
4172 #, no-wrap
4173 msgid ""
4174 "$ B<./a.out x>\n"
4175 "New thread started\n"
4176 "cnt = 0\n"
4177 "cnt = 1\n"
4178 "Thread terminated normally; cnt = 2\n"
4179 msgstr ""
4180 "$ B<./a.out x>\n"
4181 "New thread started\n"
4182 "cnt = 0\n"
4183 "cnt = 1\n"
4184 "Thread terminated normally; cnt = 2\n"
4185
4186 #. type: Plain text
4187 #: build/C/man3/pthread_cleanup_push.3:210
4188 msgid ""
4189 "From the above, we see that the clean-up handler was not executed (because "
4190 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4191 msgstr ""
4192 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4193 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4194 "分かる。"
4195
4196 #. type: Plain text
4197 #: build/C/man3/pthread_cleanup_push.3:215
4198 msgid ""
4199 "In the next run, the main program sets a global variable that causes the "
4200 "other thread to terminate normally, and supplies a nonzero value for "
4201 "I<cleanup_pop_arg>:"
4202 msgstr ""
4203 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4204 "もう一つのスレッドが正常終了するようにし、さらに\n"
4205 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4206
4207 #. type: Plain text
4208 #: build/C/man3/pthread_cleanup_push.3:224
4209 #, no-wrap
4210 msgid ""
4211 "$ B<./a.out x 1>\n"
4212 "New thread started\n"
4213 "cnt = 0\n"
4214 "cnt = 1\n"
4215 "Called clean-up handler\n"
4216 "Thread terminated normally; cnt = 0\n"
4217 msgstr ""
4218 "$ B<./a.out x 1>\n"
4219 "New thread started\n"
4220 "cnt = 0\n"
4221 "cnt = 1\n"
4222 "Called clean-up handler\n"
4223 "Thread terminated normally; cnt = 0\n"
4224
4225 #. type: Plain text
4226 #: build/C/man3/pthread_cleanup_push.3:231
4227 msgid ""
4228 "In the above, we see that although the thread was not canceled, the clean-up "
4229 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4230 "()  was nonzero."
4231 msgstr ""
4232 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4233 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4234 "に 0 以外を渡したからである。"
4235
4236 #. type: Plain text
4237 #: build/C/man3/pthread_cleanup_push.3:240
4238 #, no-wrap
4239 msgid ""
4240 "#include E<lt>pthread.hE<gt>\n"
4241 "#include E<lt>sys/types.hE<gt>\n"
4242 "#include E<lt>stdio.hE<gt>\n"
4243 "#include E<lt>stdlib.hE<gt>\n"
4244 "#include E<lt>unistd.hE<gt>\n"
4245 "#include E<lt>errno.hE<gt>\n"
4246 msgstr ""
4247 "#include E<lt>pthread.hE<gt>\n"
4248 "#include E<lt>sys/types.hE<gt>\n"
4249 "#include E<lt>stdio.hE<gt>\n"
4250 "#include E<lt>stdlib.hE<gt>\n"
4251 "#include E<lt>unistd.hE<gt>\n"
4252 "#include E<lt>errno.hE<gt>\n"
4253
4254 #. type: Plain text
4255 #: build/C/man3/pthread_cleanup_push.3:247
4256 #, no-wrap
4257 msgid ""
4258 "static int done = 0;\n"
4259 "static int cleanup_pop_arg = 0;\n"
4260 "static int cnt = 0;\n"
4261 msgstr ""
4262 "static int done = 0;\n"
4263 "static int cleanup_pop_arg = 0;\n"
4264 "static int cnt = 0;\n"
4265
4266 #. type: Plain text
4267 #: build/C/man3/pthread_cleanup_push.3:254
4268 #, no-wrap
4269 msgid ""
4270 "static void\n"
4271 "cleanup_handler(void *arg)\n"
4272 "{\n"
4273 "    printf(\"Called clean-up handler\\en\");\n"
4274 "    cnt = 0;\n"
4275 "}\n"
4276 msgstr ""
4277 "static void\n"
4278 "cleanup_handler(void *arg)\n"
4279 "{\n"
4280 "    printf(\"Called clean-up handler\\en\");\n"
4281 "    cnt = 0;\n"
4282 "}\n"
4283
4284 #. type: Plain text
4285 #: build/C/man3/pthread_cleanup_push.3:259
4286 #, no-wrap
4287 msgid ""
4288 "static void *\n"
4289 "thread_start(void *arg)\n"
4290 "{\n"
4291 "    time_t start, curr;\n"
4292 msgstr ""
4293 "static void *\n"
4294 "thread_start(void *arg)\n"
4295 "{\n"
4296 "    time_t start, curr;\n"
4297
4298 #. type: Plain text
4299 #: build/C/man3/pthread_cleanup_push.3:261
4300 #, no-wrap
4301 msgid "    printf(\"New thread started\\en\");\n"
4302 msgstr "    printf(\"New thread started\\en\");\n"
4303
4304 #. type: Plain text
4305 #: build/C/man3/pthread_cleanup_push.3:263
4306 #, no-wrap
4307 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4308 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4309
4310 #. type: Plain text
4311 #: build/C/man3/pthread_cleanup_push.3:265
4312 #, no-wrap
4313 msgid "    curr = start = time(NULL);\n"
4314 msgstr "    curr = start = time(NULL);\n"
4315
4316 #. type: Plain text
4317 #: build/C/man3/pthread_cleanup_push.3:274
4318 #, no-wrap
4319 msgid ""
4320 "    while (!done) {\n"
4321 "        pthread_testcancel();           /* A cancellation point */\n"
4322 "        if (curr E<lt> time(NULL)) {\n"
4323 "            curr = time(NULL);\n"
4324 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4325 "            cnt++;\n"
4326 "        }\n"
4327 "    }\n"
4328 msgstr ""
4329 "    while (!done) {\n"
4330 "        pthread_testcancel();           /* A cancellation point */\n"
4331 "        if (curr E<lt> time(NULL)) {\n"
4332 "            curr = time(NULL);\n"
4333 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4334 "            cnt++;\n"
4335 "        }\n"
4336 "    }\n"
4337
4338 #. type: Plain text
4339 #: build/C/man3/pthread_cleanup_push.3:278
4340 #, no-wrap
4341 msgid ""
4342 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4343 "    return NULL;\n"
4344 "}\n"
4345 msgstr ""
4346 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4347 "    return NULL;\n"
4348 "}\n"
4349
4350 #. type: Plain text
4351 #: build/C/man3/pthread_cleanup_push.3:285
4352 #, no-wrap
4353 msgid ""
4354 "int\n"
4355 "main(int argc, char *argv[])\n"
4356 "{\n"
4357 "    pthread_t thr;\n"
4358 "    int s;\n"
4359 "    void *res;\n"
4360 msgstr ""
4361 "int\n"
4362 "main(int argc, char *argv[])\n"
4363 "{\n"
4364 "    pthread_t thr;\n"
4365 "    int s;\n"
4366 "    void *res;\n"
4367
4368 #. type: Plain text
4369 #: build/C/man3/pthread_cleanup_push.3:289
4370 #, no-wrap
4371 msgid ""
4372 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4373 "    if (s != 0)\n"
4374 "        handle_error_en(s, \"pthread_create\");\n"
4375 msgstr ""
4376 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4377 "    if (s != 0)\n"
4378 "        handle_error_en(s, \"pthread_create\");\n"
4379
4380 #. type: Plain text
4381 #: build/C/man3/pthread_cleanup_push.3:291
4382 #, no-wrap
4383 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4384 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4385
4386 #. type: Plain text
4387 #: build/C/man3/pthread_cleanup_push.3:296
4388 #, no-wrap
4389 msgid ""
4390 "    if (argc E<gt> 1) {\n"
4391 "        if (argc E<gt> 2)\n"
4392 "            cleanup_pop_arg = atoi(argv[2]);\n"
4393 "        done = 1;\n"
4394 msgstr ""
4395 "    if (argc E<gt> 1) {\n"
4396 "        if (argc E<gt> 2)\n"
4397 "            cleanup_pop_arg = atoi(argv[2]);\n"
4398 "        done = 1;\n"
4399
4400 #. type: Plain text
4401 #: build/C/man3/pthread_cleanup_push.3:303
4402 #, no-wrap
4403 msgid ""
4404 "    } else {\n"
4405 "        printf(\"Canceling thread\\en\");\n"
4406 "        s = pthread_cancel(thr);\n"
4407 "        if (s != 0)\n"
4408 "            handle_error_en(s, \"pthread_cancel\");\n"
4409 "    }\n"
4410 msgstr ""
4411 "    } else {\n"
4412 "        printf(\"Canceling thread\\en\");\n"
4413 "        s = pthread_cancel(thr);\n"
4414 "        if (s != 0)\n"
4415 "            handle_error_en(s, \"pthread_cancel\");\n"
4416 "    }\n"
4417
4418 #. type: Plain text
4419 #: build/C/man3/pthread_cleanup_push.3:314
4420 #, no-wrap
4421 msgid ""
4422 "    if (res == PTHREAD_CANCELED)\n"
4423 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4424 "    else\n"
4425 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4426 "    exit(EXIT_SUCCESS);\n"
4427 "}\n"
4428 msgstr ""
4429 "    if (res == PTHREAD_CANCELED)\n"
4430 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4431 "    else\n"
4432 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4433 "    exit(EXIT_SUCCESS);\n"
4434 "}\n"
4435
4436 #. type: Plain text
4437 #: build/C/man3/pthread_cleanup_push.3:321
4438 msgid ""
4439 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4440 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4441 msgstr ""
4442 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4443 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4444
4445 #. type: TH
4446 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4447 #, no-wrap
4448 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4449 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4450
4451 #. type: TH
4452 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4453 #, no-wrap
4454 msgid "2008-12-04"
4455 msgstr "2008-12-04"
4456
4457 #. type: Plain text
4458 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4459 msgid ""
4460 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4461 "thread cancellation clean-up handlers while saving cancelability type"
4462 msgstr ""
4463 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4464 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4465 "の push/pop を行う"
4466
4467 #. type: Plain text
4468 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4469 #, no-wrap
4470 msgid ""
4471 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4472 "B<                                   void *>I<arg>B<);>\n"
4473 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4474 msgstr ""
4475 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4476 "B<                                   void *>I<arg>B<);>\n"
4477 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4478
4479 #. type: Plain text
4480 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4481 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4482 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4483 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4484 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4485 #: build/C/man3/pthread_yield.3:37
4486 msgid "Compile and link with I<-pthread>."
4487 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4488
4489 #. type: Plain text
4490 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4491 msgid ""
4492 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4493 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4494 msgstr ""
4495 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4496 "だが、このページで説明する点が異なる。"
4497
4498 #. type: Plain text
4499 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4500 msgid ""
4501 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4502 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4503 "addition, it also saves the thread's current cancelability type, and sets "
4504 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4505 "this ensures that cancellation clean-up will occur even if the thread's "
4506 "cancelability type was \"asynchronous\" before the call."
4507 msgstr ""
4508 "B<pthread_cleanup_push>(3) と同様に、\n"
4509 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4510 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4511 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4512 "保存し、cancelability type は \"deferred\" に設定する\n"
4513 "(B<pthread_setcanceltype>(3) 参照)。\n"
4514 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4515 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4516 "が保証される。"
4517
4518 #. type: Plain text
4519 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4520 msgid ""
4521 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4522 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4523 "up handlers.  In addition, it restores the thread's cancelability type to "
4524 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4525 msgstr ""
4526 "B<pthread_cleanup_pop>(3) と同様に、\n"
4527 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4528 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4529 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4530 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4531
4532 #. type: Plain text
4533 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4534 msgid ""
4535 "The caller must ensure that calls to these functions are paired within the "
4536 "same function, and at the same lexical nesting level.  Other restrictions "
4537 "apply, as described in B<pthread_cleanup_push>(3)."
4538 msgstr ""
4539 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4540 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4541 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4542 "適用される。"
4543
4544 #. type: Plain text
4545 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4546 msgid "This sequence of calls:"
4547 msgstr "以下の一連の呼び出し"
4548
4549 #. type: Plain text
4550 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4551 #, no-wrap
4552 msgid ""
4553 "pthread_cleanup_push_defer_np(routine, arg);\n"
4554 "pthread_cleanup_pop_restore_np(execute);\n"
4555 msgstr ""
4556 "pthread_cleanup_push_defer_np(routine, arg);\n"
4557 "pthread_cleanup_pop_restore_np(execute);\n"
4558
4559 #. type: Plain text
4560 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4561 msgid "is equivalent to (but shorter and more efficient than):"
4562 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4563
4564 #. type: Plain text
4565 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4566 #, no-wrap
4567 msgid "int oldtype;\n"
4568 msgstr "int oldtype;\n"
4569
4570 #. type: Plain text
4571 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4572 #, no-wrap
4573 msgid ""
4574 "pthread_cleanup_push(routine, arg);\n"
4575 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4576 "\\&...\n"
4577 "pthread_setcanceltype(oldtype, NULL);\n"
4578 "pthread_cleanup_pop(execute);\n"
4579 msgstr ""
4580 "pthread_cleanup_push(routine, arg);\n"
4581 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4582 "\\&...\n"
4583 "pthread_setcanceltype(oldtype, NULL);\n"
4584 "pthread_cleanup_pop(execute);\n"
4585
4586 #. type: Plain text
4587 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4588 msgid ""
4589 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4590 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4591 msgstr ""
4592 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4593 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4594
4595 #. type: TH
4596 #: build/C/man3/pthread_create.3:26
4597 #, no-wrap
4598 msgid "PTHREAD_CREATE"
4599 msgstr "PTHREAD_CREATE"
4600
4601 #. type: TH
4602 #: build/C/man3/pthread_create.3:26
4603 #, no-wrap
4604 msgid "2012-08-03"
4605 msgstr "2012-08-03"
4606
4607 #. type: Plain text
4608 #: build/C/man3/pthread_create.3:29
4609 msgid "pthread_create - create a new thread"
4610 msgstr "pthread_create - 新しいスレッドを作成する"
4611
4612 #. type: Plain text
4613 #: build/C/man3/pthread_create.3:35
4614 #, no-wrap
4615 msgid ""
4616 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4617 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4618 msgstr ""
4619 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4620 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4621
4622 #. type: Plain text
4623 #: build/C/man3/pthread_create.3:47
4624 msgid ""
4625 "The B<pthread_create>()  function starts a new thread in the calling "
4626 "process.  The new thread starts execution by invoking I<start_routine>(); "
4627 "I<arg> is passed as the sole argument of I<start_routine>()."
4628 msgstr ""
4629 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4630 "る。\n"
4631 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4632 "I<start_routine>() は引き数を一つだけ取り、\n"
4633 "I<arg> が I<start_routine>() の引き数として渡される。"
4634
4635 #. type: Plain text
4636 #: build/C/man3/pthread_create.3:49
4637 msgid "The new thread terminates in one of the following ways:"
4638 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4639
4640 #. type: IP
4641 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4642 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4643 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4644 #: build/C/man3/pthread_getattr_np.3:58
4645 #, no-wrap
4646 msgid "*"
4647 msgstr "*"
4648
4649 #. type: Plain text
4650 #: build/C/man3/pthread_create.3:55
4651 msgid ""
4652 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4653 "available to another thread in the same process that calls B<pthread_join>"
4654 "(3)."
4655 msgstr ""
4656 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4657 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4658 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4659 "別のスレッドで参照できる。"
4660
4661 #. type: Plain text
4662 #: build/C/man3/pthread_create.3:63
4663 msgid ""
4664 "It returns from I<start_routine>().  This is equivalent to calling "
4665 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4666 msgstr ""
4667 "スレッドが I<start_routine>() から返る。これは、\n"
4668 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4669
4670 #. type: Plain text
4671 #: build/C/man3/pthread_create.3:66
4672 msgid "It is canceled (see B<pthread_cancel>(3))."
4673 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4674
4675 #. type: Plain text
4676 #: build/C/man3/pthread_create.3:72
4677 msgid ""
4678 "Any of the threads in the process calls B<exit>(3), or the main thread "
4679 "performs a return from I<main>().  This causes the termination of all "
4680 "threads in the process."
4681 msgstr ""
4682 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4683 "メインスレッドで I<main>() 内で return が実行される。\n"
4684 "この場合は、プロセス内の全てのスレッドが終了される。"
4685
4686 #. type: Plain text
4687 #: build/C/man3/pthread_create.3:86
4688 msgid ""
4689 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4690 "are used at thread creation time to determine attributes for the new thread; "
4691 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4692 "functions.  If I<attr> is NULL, then the thread is created with default "
4693 "attributes."
4694 msgstr ""
4695 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4696 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4697 "新しいスレッドの属性が決定される。\n"
4698 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4699 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4700
4701 #. type: Plain text
4702 #: build/C/man3/pthread_create.3:93
4703 msgid ""
4704 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4705 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4706 "used to refer to the thread in subsequent calls to other pthreads functions."
4707 msgstr ""
4708 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4709 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4710 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4711
4712 #. type: Plain text
4713 #: build/C/man3/pthread_create.3:101
4714 msgid ""
4715 "The new thread inherits a copy of the creating thread's signal mask "
4716 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4717 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4718 "thread's alternate signal stack (B<sigaltstack>(2))."
4719 msgstr ""
4720 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4721 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4722 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4723 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4724 "(B<sigaltstack>(2)) を継承しない。"
4725
4726 #. type: Plain text
4727 #: build/C/man3/pthread_create.3:104
4728 msgid ""
4729 "The new thread inherits the calling thread's floating-point environment "
4730 "(B<fenv>(3))."
4731 msgstr ""
4732 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4733 "を継承する。"
4734
4735 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4736 #. type: Plain text
4737 #: build/C/man3/pthread_create.3:109
4738 msgid ""
4739 "The initial value of the new thread's CPU-time clock is 0 (see "
4740 "B<pthread_getcpuclockid>(3))."
4741 msgstr ""
4742 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4743 "(B<pthread_getcpuclockid>(3) 参照)。"
4744
4745 #. type: SS
4746 #: build/C/man3/pthread_create.3:109
4747 #, no-wrap
4748 msgid "Linux-specific details"
4749 msgstr "Linux 固有の詳細"
4750
4751 #. type: Plain text
4752 #: build/C/man3/pthread_create.3:115
4753 msgid ""
4754 "The new thread inherits copies of the calling thread's capability sets (see "
4755 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4756 msgstr ""
4757 "新しいスレッドは、呼び出したスレッドの\n"
4758 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4759 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4760 "コピーをを継承しない。"
4761
4762 #. type: Plain text
4763 #: build/C/man3/pthread_create.3:122
4764 msgid ""
4765 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4766 "number, and the contents of I<*thread> are undefined."
4767 msgstr ""
4768 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4769 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4770
4771 #. type: TP
4772 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4773 #, no-wrap
4774 msgid "B<EAGAIN>"
4775 msgstr "B<EAGAIN>"
4776
4777 #. type: Plain text
4778 #: build/C/man3/pthread_create.3:137
4779 msgid ""
4780 "Insufficient resources to create another thread, or a system-imposed limit "
4781 "on the number of threads was encountered.  The latter case may occur in two "
4782 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4783 "which limits the number of process for a real user ID, was reached; or the "
4784 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4785 "threads-max>, was reached."
4786 msgstr ""
4787 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4788 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4789 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4790 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4791 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4792 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4793
4794 #. type: Plain text
4795 #: build/C/man3/pthread_create.3:141
4796 msgid "Invalid settings in I<attr>."
4797 msgstr "I<attr> で指定された設定が不正である。"
4798
4799 #. type: TP
4800 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4801 #: build/C/man3/pthread_setschedprio.3:66
4802 #, no-wrap
4803 msgid "B<EPERM>"
4804 msgstr "B<EPERM>"
4805
4806 #. type: Plain text
4807 #: build/C/man3/pthread_create.3:146
4808 msgid ""
4809 "No permission to set the scheduling policy and parameters specified in "
4810 "I<attr>."
4811 msgstr ""
4812 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4813 "設定する許可がない。"
4814
4815 #. type: Plain text
4816 #: build/C/man3/pthread_create.3:160
4817 msgid ""
4818 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4819 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4820 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4821 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4822 msgstr ""
4823 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4824 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4825 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4826 "B<pthread_create>() の呼び出し後に、\n"
4827 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4828 "次に実行されるかは決まっていない。"
4829
4830 #. type: Plain text
4831 #: build/C/man3/pthread_create.3:180
4832 msgid ""
4833 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4834 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4835 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4836 "has been joined are the last of its resources released back to the system.  "
4837 "When a detached thread terminates, its resources are automatically released "
4838 "back to the system: it is not possible to join with the thread in order to "
4839 "obtain its exit status.  Making a thread detached is useful for some types "
4840 "of daemon threads whose exit status the application does not need to care "
4841 "about.  By default, a new thread is created in a joinable state, unless "
4842 "I<attr> was set to create the thread in a detached state (using "
4843 "B<pthread_attr_setdetachstate>(3))."
4844 msgstr ""
4845 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4846 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4847 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4848 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4849 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4850 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4851 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4852 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4853 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4854 "デーモン (daemon) スレッドでは有用である。\n"
4855 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4856 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4857 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4858 "作成される。"
4859
4860 #.  FIXME . Perhaps some of the following detail should be in
4861 #.  a future pthread_attr_setstacksize(3) page.
4862 #. type: Plain text
4863 #: build/C/man3/pthread_create.3:196
4864 msgid ""
4865 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4866 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4867 "resource limit I<at the time the program started> has any value other than "
4868 "\"unlimited\", then it determines the default stack size of new threads.  "
4869 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4870 "explicitly set in the I<attr> argument used to create a thread, in order to "
4871 "obtain a stack size other than the default."
4872 msgstr ""
4873 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4874 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4875 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4876 "フォルトのスタックサイズとなる。\n"
4877 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4878 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4879 "デフォルト値以外のスタックサイズを得ることができる。"
4880
4881 #. type: Plain text
4882 #: build/C/man3/pthread_create.3:202
4883 msgid ""
4884 "In the obsolete LinuxThreads implementation, each of the threads in a "
4885 "process has a different process ID.  This is in violation of the POSIX "
4886 "threads specification, and is the source of many other nonconformances to "
4887 "the standard; see B<pthreads>(7)."
4888 msgstr ""
4889 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4890 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4891 "他の多くの標準非準拠の点の原因になっている。\n"
4892 "B<pthreads>(7) を参照のこと。"
4893
4894 #. type: Plain text
4895 #: build/C/man3/pthread_create.3:206
4896 msgid ""
4897 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4898 "number of other functions in the pthreads API."
4899 msgstr ""
4900 "以下のプログラムは、 B<pthread_create>() や\n"
4901 "pthreads API の他のいろいろな関数の使用例を示している。"
4902
4903 #. type: Plain text
4904 #: build/C/man3/pthread_create.3:211
4905 msgid ""
4906 "In the following run, on a system providing the NPTL threading "
4907 "implementation, the stack size defaults to the value given by the \"stack "
4908 "size\" resource limit:"
4909 msgstr ""
4910 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4911 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4912 "になる。"
4913
4914 #. type: Plain text
4915 #: build/C/man3/pthread_create.3:223
4916 #, no-wrap
4917 msgid ""
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 msgstr ""
4928 "$B< ulimit -s>\n"
4929 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4930 "$B< ./a.out hola salut servus>\n"
4931 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4932 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4933 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4934 "Joined with thread 1; returned value was HOLA\n"
4935 "Joined with thread 2; returned value was SALUT\n"
4936 "Joined with thread 3; returned value was SERVUS\n"
4937
4938 #. type: Plain text
4939 #: build/C/man3/pthread_create.3:229
4940 msgid ""
4941 "In the next run, the program explicitly sets a stack size of 1MB (using "
4942 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4943 msgstr ""
4944 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4945 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4946 "明示的に設定している。"
4947
4948 #. type: Plain text
4949 #: build/C/man3/pthread_create.3:239
4950 #, no-wrap
4951 msgid ""
4952 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4953 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4954 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4955 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4956 "Joined with thread 1; returned value was HOLA\n"
4957 "Joined with thread 2; returned value was SALUT\n"
4958 "Joined with thread 3; returned value was SERVUS\n"
4959 msgstr ""
4960 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4961 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4962 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4963 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4964 "Joined with thread 1; returned value was HOLA\n"
4965 "Joined with thread 2; returned value was SALUT\n"
4966 "Joined with thread 3; returned value was SERVUS\n"
4967
4968 #. type: Plain text
4969 #: build/C/man3/pthread_create.3:251
4970 #, no-wrap
4971 msgid ""
4972 "#include E<lt>pthread.hE<gt>\n"
4973 "#include E<lt>string.hE<gt>\n"
4974 "#include E<lt>stdio.hE<gt>\n"
4975 "#include E<lt>stdlib.hE<gt>\n"
4976 "#include E<lt>unistd.hE<gt>\n"
4977 "#include E<lt>errno.hE<gt>\n"
4978 "#include E<lt>ctype.hE<gt>\n"
4979 msgstr ""
4980 "#include E<lt>pthread.hE<gt>\n"
4981 "#include E<lt>string.hE<gt>\n"
4982 "#include E<lt>stdio.hE<gt>\n"
4983 "#include E<lt>stdlib.hE<gt>\n"
4984 "#include E<lt>unistd.hE<gt>\n"
4985 "#include E<lt>errno.hE<gt>\n"
4986 "#include E<lt>ctype.hE<gt>\n"
4987
4988 #. type: Plain text
4989 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:111
4990 #, no-wrap
4991 msgid ""
4992 "#define handle_error(msg) \\e\n"
4993 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4994 msgstr ""
4995 "#define handle_error(msg) \\e\n"
4996 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4997
4998 #. type: Plain text
4999 #: build/C/man3/pthread_create.3:263
5000 #, no-wrap
5001 msgid ""
5002 "struct thread_info {    /* Used as argument to thread_start() */\n"
5003 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5004 "    int       thread_num;       /* Application-defined thread # */\n"
5005 "    char     *argv_string;      /* From command-line argument */\n"
5006 "};\n"
5007 msgstr ""
5008 "struct thread_info {    /* Used as argument to thread_start() */\n"
5009 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
5010 "    int       thread_num;       /* Application-defined thread # */\n"
5011 "    char     *argv_string;      /* From command-line argument */\n"
5012 "};\n"
5013
5014 #. type: Plain text
5015 #: build/C/man3/pthread_create.3:266
5016 #, no-wrap
5017 msgid ""
5018 "/* Thread start function: display address near top of our stack,\n"
5019 "   and return upper-cased copy of argv_string */\n"
5020 msgstr ""
5021 "/* Thread start function: display address near top of our stack,\n"
5022 "   and return upper-cased copy of argv_string */\n"
5023
5024 #. type: Plain text
5025 #: build/C/man3/pthread_create.3:272
5026 #, no-wrap
5027 msgid ""
5028 "static void *\n"
5029 "thread_start(void *arg)\n"
5030 "{\n"
5031 "    struct thread_info *tinfo = arg;\n"
5032 "    char *uargv, *p;\n"
5033 msgstr ""
5034 "static void *\n"
5035 "thread_start(void *arg)\n"
5036 "{\n"
5037 "    struct thread_info *tinfo = arg;\n"
5038 "    char *uargv, *p;\n"
5039
5040 #. type: Plain text
5041 #: build/C/man3/pthread_create.3:275
5042 #, no-wrap
5043 msgid ""
5044 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5045 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5046 msgstr ""
5047 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5048 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5049
5050 #. type: Plain text
5051 #: build/C/man3/pthread_create.3:279
5052 #, no-wrap
5053 msgid ""
5054 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5055 "    if (uargv == NULL)\n"
5056 "        handle_error(\"strdup\");\n"
5057 msgstr ""
5058 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5059 "    if (uargv == NULL)\n"
5060 "        handle_error(\"strdup\");\n"
5061
5062 #. type: Plain text
5063 #: build/C/man3/pthread_create.3:282
5064 #, no-wrap
5065 msgid ""
5066 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5067 "        *p = toupper(*p);\n"
5068 msgstr ""
5069 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5070 "        *p = toupper(*p);\n"
5071
5072 #. type: Plain text
5073 #: build/C/man3/pthread_create.3:285
5074 #, no-wrap
5075 msgid ""
5076 "    return uargv;\n"
5077 "}\n"
5078 msgstr ""
5079 "    return uargv;\n"
5080 "}\n"
5081
5082 #. type: Plain text
5083 #: build/C/man3/pthread_create.3:294
5084 #, no-wrap
5085 msgid ""
5086 "int\n"
5087 "main(int argc, char *argv[])\n"
5088 "{\n"
5089 "    int s, tnum, opt, num_threads;\n"
5090 "    struct thread_info *tinfo;\n"
5091 "    pthread_attr_t attr;\n"
5092 "    int stack_size;\n"
5093 "    void *res;\n"
5094 msgstr ""
5095 "int\n"
5096 "main(int argc, char *argv[])\n"
5097 "{\n"
5098 "    int s, tnum, opt, num_threads;\n"
5099 "    struct thread_info *tinfo;\n"
5100 "    pthread_attr_t attr;\n"
5101 "    int stack_size;\n"
5102 "    void *res;\n"
5103
5104 #. type: Plain text
5105 #: build/C/man3/pthread_create.3:296
5106 #, no-wrap
5107 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5108 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5109
5110 #. type: Plain text
5111 #: build/C/man3/pthread_create.3:303
5112 #, no-wrap
5113 msgid ""
5114 "    stack_size = -1;\n"
5115 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5116 "        switch (opt) {\n"
5117 "        case \\(aqs\\(aq:\n"
5118 "            stack_size = strtoul(optarg, NULL, 0);\n"
5119 "            break;\n"
5120 msgstr ""
5121 "    stack_size = -1;\n"
5122 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5123 "        switch (opt) {\n"
5124 "        case \\(aqs\\(aq:\n"
5125 "            stack_size = strtoul(optarg, NULL, 0);\n"
5126 "            break;\n"
5127
5128 #. type: Plain text
5129 #: build/C/man3/pthread_create.3:310
5130 #, no-wrap
5131 msgid ""
5132 "        default:\n"
5133 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5134 "                    argv[0]);\n"
5135 "            exit(EXIT_FAILURE);\n"
5136 "        }\n"
5137 "    }\n"
5138 msgstr ""
5139 "        default:\n"
5140 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5141 "                    argv[0]);\n"
5142 "            exit(EXIT_FAILURE);\n"
5143 "        }\n"
5144 "    }\n"
5145
5146 #. type: Plain text
5147 #: build/C/man3/pthread_create.3:312
5148 #, no-wrap
5149 msgid "    num_threads = argc - optind;\n"
5150 msgstr "    num_threads = argc - optind;\n"
5151
5152 #. type: Plain text
5153 #: build/C/man3/pthread_create.3:314
5154 #, no-wrap
5155 msgid "    /* Initialize thread creation attributes */\n"
5156 msgstr "    /* Initialize thread creation attributes */\n"
5157
5158 #. type: Plain text
5159 #: build/C/man3/pthread_create.3:318
5160 #, no-wrap
5161 msgid ""
5162 "    s = pthread_attr_init(&attr);\n"
5163 "    if (s != 0)\n"
5164 "        handle_error_en(s, \"pthread_attr_init\");\n"
5165 msgstr ""
5166 "    s = pthread_attr_init(&attr);\n"
5167 "    if (s != 0)\n"
5168 "        handle_error_en(s, \"pthread_attr_init\");\n"
5169
5170 #. type: Plain text
5171 #: build/C/man3/pthread_create.3:324
5172 #, no-wrap
5173 msgid ""
5174 "    if (stack_size E<gt> 0) {\n"
5175 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5176 "        if (s != 0)\n"
5177 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5178 "    }\n"
5179 msgstr ""
5180 "    if (stack_size E<gt> 0) {\n"
5181 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5182 "        if (s != 0)\n"
5183 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5184 "    }\n"
5185
5186 #. type: Plain text
5187 #: build/C/man3/pthread_create.3:326
5188 #, no-wrap
5189 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5190 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5191
5192 #. type: Plain text
5193 #: build/C/man3/pthread_create.3:330
5194 #, no-wrap
5195 msgid ""
5196 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5197 "    if (tinfo == NULL)\n"
5198 "        handle_error(\"calloc\");\n"
5199 msgstr ""
5200 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5201 "    if (tinfo == NULL)\n"
5202 "        handle_error(\"calloc\");\n"
5203
5204 #. type: Plain text
5205 #: build/C/man3/pthread_create.3:332
5206 #, no-wrap
5207 msgid "    /* Create one thread for each command-line argument */\n"
5208 msgstr "    /* Create one thread for each command-line argument */\n"
5209
5210 #. type: Plain text
5211 #: build/C/man3/pthread_create.3:336
5212 #, no-wrap
5213 msgid ""
5214 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5215 "        tinfo[tnum].thread_num = tnum + 1;\n"
5216 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5217 msgstr ""
5218 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5219 "        tinfo[tnum].thread_num = tnum + 1;\n"
5220 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5221
5222 #. type: Plain text
5223 #: build/C/man3/pthread_create.3:339
5224 #, no-wrap
5225 msgid ""
5226 "        /* The pthread_create() call stores the thread ID into\n"
5227 "           corresponding element of tinfo[] */\n"
5228 msgstr ""
5229 "        /* The pthread_create() call stores the thread ID into\n"
5230 "           corresponding element of tinfo[] */\n"
5231
5232 #. type: Plain text
5233 #: build/C/man3/pthread_create.3:345
5234 #, no-wrap
5235 msgid ""
5236 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5237 "                           &thread_start, &tinfo[tnum]);\n"
5238 "        if (s != 0)\n"
5239 "            handle_error_en(s, \"pthread_create\");\n"
5240 "    }\n"
5241 msgstr ""
5242 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5243 "                           &thread_start, &tinfo[tnum]);\n"
5244 "        if (s != 0)\n"
5245 "            handle_error_en(s, \"pthread_create\");\n"
5246 "    }\n"
5247
5248 #. type: Plain text
5249 #: build/C/man3/pthread_create.3:348
5250 #, no-wrap
5251 msgid ""
5252 "    /* Destroy the thread attributes object, since it is no\n"
5253 "       longer needed */\n"
5254 msgstr ""
5255 "    /* Destroy the thread attributes object, since it is no\n"
5256 "       longer needed */\n"
5257
5258 #. type: Plain text
5259 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5260 #, no-wrap
5261 msgid ""
5262 "    s = pthread_attr_destroy(&attr);\n"
5263 "    if (s != 0)\n"
5264 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5265 msgstr ""
5266 "    s = pthread_attr_destroy(&attr);\n"
5267 "    if (s != 0)\n"
5268 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5269
5270 #. type: Plain text
5271 #: build/C/man3/pthread_create.3:354
5272 #, no-wrap
5273 msgid "    /* Now join with each thread, and display its returned value */\n"
5274 msgstr "    /* Now join with each thread, and display its returned value */\n"
5275
5276 #. type: Plain text
5277 #: build/C/man3/pthread_create.3:359
5278 #, no-wrap
5279 msgid ""
5280 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5281 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5282 "        if (s != 0)\n"
5283 "            handle_error_en(s, \"pthread_join\");\n"
5284 msgstr ""
5285 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5286 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5287 "        if (s != 0)\n"
5288 "            handle_error_en(s, \"pthread_join\");\n"
5289
5290 #. type: Plain text
5291 #: build/C/man3/pthread_create.3:364
5292 #, no-wrap
5293 msgid ""
5294 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5295 "                tinfo[tnum].thread_num, (char *) res);\n"
5296 "        free(res);      /* Free memory allocated by thread */\n"
5297 "    }\n"
5298 msgstr ""
5299 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5300 "                tinfo[tnum].thread_num, (char *) res);\n"
5301 "        free(res);      /* Free memory allocated by thread */\n"
5302 "    }\n"
5303
5304 #. type: Plain text
5305 #: build/C/man3/pthread_create.3:368
5306 #, no-wrap
5307 msgid ""
5308 "    free(tinfo);\n"
5309 "    exit(EXIT_SUCCESS);\n"
5310 "}\n"
5311 msgstr ""
5312 "    free(tinfo);\n"
5313 "    exit(EXIT_SUCCESS);\n"
5314 "}\n"
5315
5316 #. type: Plain text
5317 #: build/C/man3/pthread_create.3:382
5318 msgid ""
5319 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5320 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5321 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5322 "(7)"
5323 msgstr ""
5324 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5325 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5326 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5327 "(7)"
5328
5329 #. type: TH
5330 #: build/C/man3/pthread_detach.3:26
5331 #, no-wrap
5332 msgid "PTHREAD_DETACH"
5333 msgstr "PTHREAD_DETACH"
5334
5335 #. type: TH
5336 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5337 #, no-wrap
5338 msgid "2008-11-27"
5339 msgstr "2008-11-27"
5340
5341 #. type: Plain text
5342 #: build/C/man3/pthread_detach.3:29
5343 msgid "pthread_detach - detach a thread"
5344 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5345
5346 #. type: Plain text
5347 #: build/C/man3/pthread_detach.3:34
5348 #, no-wrap
5349 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5350 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5351
5352 #. type: Plain text
5353 #: build/C/man3/pthread_detach.3:46
5354 msgid ""
5355 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5356 "as detached.  When a detached thread terminates, its resources are "
5357 "automatically released back to the system without the need for another "
5358 "thread to join with the terminated thread."
5359 msgstr ""
5360 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5361 "detached (切り離された状態) という印を付ける。\n"
5362 "detached 状態のスレッドが終了すると、\n"
5363 "別のスレッドが終了されたスレッドを join しなくても、\n"
5364 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5365
5366 #. type: Plain text
5367 #: build/C/man3/pthread_detach.3:49
5368 msgid ""
5369 "Attempting to detach an already detached thread results in unspecified "
5370 "behavior."
5371 msgstr ""
5372 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5373 "どのような結果となるかは規定されていない。"
5374
5375 #. type: Plain text
5376 #: build/C/man3/pthread_detach.3:54
5377 msgid ""
5378 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5379 "number."
5380 msgstr ""
5381 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5382 "エラーの場合、エラー番号を返す。"
5383
5384 #. type: Plain text
5385 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5386 msgid "I<thread> is not a joinable thread."
5387 msgstr "I<thread> が join 可能なスレッドではない。"
5388
5389 #. type: Plain text
5390 #: build/C/man3/pthread_detach.3:70
5391 msgid ""
5392 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5393 "or be made joinable again."
5394 msgstr ""
5395 "いったんスレッドを detached 状態にすると、\n"
5396 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5397 "もう一度 join 可能にしたりすることはできない。"
5398
5399 #. type: Plain text
5400 #: build/C/man3/pthread_detach.3:77
5401 msgid ""
5402 "A new thread can be created in a detached state using "
5403 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5404 "I<attr> argument of B<pthread_create>(3)."
5405 msgstr ""
5406 "B<pthread_attr_setdetachstate>(3) を使って\n"
5407 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5408 "新しいスレッドを detached 状態で作成することができる。"
5409
5410 #. type: Plain text
5411 #: build/C/man3/pthread_detach.3:84
5412 msgid ""
5413 "The detached attribute merely determines the behavior of the system when the "
5414 "thread terminates; it does not prevent the thread from being terminated if "
5415 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5416 "thread returns)."
5417 msgstr ""
5418 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5419 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5420 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5421 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5422
5423 #. type: Plain text
5424 #: build/C/man3/pthread_detach.3:93
5425 msgid ""
5426 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5427 "thread that an application creates, so that system resources for the thread "
5428 "can be released.  (But note that the resources of all threads are freed when "
5429 "the process terminates.)"
5430 msgstr ""
5431 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5432 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5433 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5434 "終了するときには、全てのスレッドのリソースが解放される)。"
5435
5436 #. type: Plain text
5437 #: build/C/man3/pthread_detach.3:95
5438 msgid "The following statement detaches the calling thread:"
5439 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5440
5441 #. type: Plain text
5442 #: build/C/man3/pthread_detach.3:97
5443 #, no-wrap
5444 msgid "    pthread_detach(pthread_self());\n"
5445 msgstr "    pthread_detach(pthread_self());\n"
5446
5447 #. type: Plain text
5448 #: build/C/man3/pthread_detach.3:104
5449 msgid ""
5450 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5451 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5452 msgstr ""
5453 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5454 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5455
5456 #. type: TH
5457 #: build/C/man3/pthread_equal.3:26
5458 #, no-wrap
5459 msgid "PTHREAD_EQUAL"
5460 msgstr "PTHREAD_EQUAL"
5461
5462 #. type: TH
5463 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5464 #, no-wrap
5465 msgid "2009-03-30"
5466 msgstr "2009-03-30"
5467
5468 #. type: Plain text
5469 #: build/C/man3/pthread_equal.3:29
5470 msgid "pthread_equal - compare thread IDs"
5471 msgstr "pthread_equal - スレッド ID を比較する"
5472
5473 #. type: Plain text
5474 #: build/C/man3/pthread_equal.3:34
5475 #, no-wrap
5476 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5477 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5478
5479 #. type: Plain text
5480 #: build/C/man3/pthread_equal.3:41
5481 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5482 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5483
5484 #. type: Plain text
5485 #: build/C/man3/pthread_equal.3:45
5486 msgid ""
5487 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5488 "value; otherwise, it returns 0."
5489 msgstr ""
5490 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5491 "そうでなければ 0 を返す。"
5492
5493 #.  SH VERSIONS
5494 #.  Available since glibc 2.0
5495 #. type: Plain text
5496 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5497 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5498 msgid "This function always succeeds."
5499 msgstr "この関数は常に成功する。"
5500
5501 #. type: Plain text
5502 #: build/C/man3/pthread_equal.3:56
5503 msgid ""
5504 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5505 "considered opaque: there is no portable way for applications to directly "
5506 "compare two I<pthread_t> values."
5507 msgstr ""
5508 "B<pthread_equal>() 関数が必要なのは、\n"
5509 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5510 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5511 "移植性を確保できる形で比較する方法はない。"
5512
5513 #. type: Plain text
5514 #: build/C/man3/pthread_equal.3:60
5515 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5516 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5517
5518 #. type: TH
5519 #: build/C/man3/pthread_exit.3:26
5520 #, no-wrap
5521 msgid "PTHREAD_EXIT"
5522 msgstr "PTHREAD_EXIT"
5523
5524 #. type: Plain text
5525 #: build/C/man3/pthread_exit.3:29
5526 msgid "pthread_exit - terminate calling thread"
5527 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5528
5529 #. type: Plain text
5530 #: build/C/man3/pthread_exit.3:34
5531 #, no-wrap
5532 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5533 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5534
5535 #. type: Plain text
5536 #: build/C/man3/pthread_exit.3:45
5537 msgid ""
5538 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5539 "value via I<retval> that (if the thread is joinable)  is available to "
5540 "another thread in the same process that calls B<pthread_join>(3)."
5541 msgstr ""
5542 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5543 "I<retval> 経由で値を返す。\n"
5544 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5545 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5546
5547 #. type: Plain text
5548 #: build/C/man3/pthread_exit.3:55
5549 msgid ""
5550 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5551 "not yet been popped, are popped (in the reverse of the order in which they "
5552 "were pushed)  and executed.  If the thread has any thread-specific data, "
5553 "then, after the clean-up handlers have been executed, the corresponding "
5554 "destructor functions are called, in an unspecified order."
5555 msgstr ""
5556 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5557 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5558 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5559 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5560 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5561 "は規定されていない)。"
5562
5563 #. type: Plain text
5564 #: build/C/man3/pthread_exit.3:62
5565 msgid ""
5566 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5567 "variables, semaphores, and file descriptors) are not released, and functions "
5568 "registered using B<atexit>(3)  are not called."
5569 msgstr ""
5570 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5571 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5572 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5573
5574 #. type: Plain text
5575 #: build/C/man3/pthread_exit.3:71
5576 msgid ""
5577 "After the last thread in a process terminates, the process terminates as by "
5578 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5579 "resources are released and functions registered using B<atexit>(3)  are "
5580 "called."
5581 msgstr ""
5582 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5583 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5584 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5585 "が呼び出される。"
5586
5587 #. type: Plain text
5588 #: build/C/man3/pthread_exit.3:73
5589 msgid "This function does not return to the caller."
5590 msgstr "この関数は呼び出し側には返らない。"
5591
5592 #. type: Plain text
5593 #: build/C/man3/pthread_exit.3:82
5594 msgid ""
5595 "Performing a return from the start function of any thread other than the "
5596 "main thread results in an implicit call to B<pthread_exit>(), using the "
5597 "function's return value as the thread's exit status."
5598 msgstr ""
5599 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5600 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5601 "関数の返り値がスレッドの終了ステータスとして使用される。"
5602
5603 #. type: Plain text
5604 #: build/C/man3/pthread_exit.3:88
5605 msgid ""
5606 "To allow other threads to continue execution, the main thread should "
5607 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5608 msgstr ""
5609 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5610 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5611
5612 #. type: Plain text
5613 #: build/C/man3/pthread_exit.3:93
5614 msgid ""
5615 "The value pointed to by I<retval> should not be located on the calling "
5616 "thread's stack, since the contents of that stack are undefined after the "
5617 "thread terminates."
5618 msgstr ""
5619 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5620 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5621 "である。"
5622
5623 #.  Linux 2.6.27
5624 #.  FIXME . review a later kernel to see if this gets fixed
5625 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5626 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5627 #. type: Plain text
5628 #: build/C/man3/pthread_exit.3:105
5629 msgid ""
5630 "Currently, there are limitations in the kernel implementation logic for "
5631 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5632 "This can manifest in problems such as a locked terminal if a stop signal is "
5633 "sent to a foreground process whose thread group leader has already called "
5634 "B<pthread_exit>()."
5635 msgstr ""
5636 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5637 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5638 "カーネル実装の論理には制限がある。\n"
5639 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5640 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5641 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5642 "場合がある。"
5643
5644 #. type: Plain text
5645 #: build/C/man3/pthread_exit.3:109
5646 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5647 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5648
5649 #. type: TH
5650 #: build/C/man3/pthread_getattr_np.3:26
5651 #, no-wrap
5652 msgid "PTHREAD_GETATTR_NP"
5653 msgstr "PTHREAD_GETATTR_NP"
5654
5655 #. type: Plain text
5656 #: build/C/man3/pthread_getattr_np.3:29
5657 msgid "pthread_getattr_np - get attributes of created thread"
5658 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5659
5660 #. type: Plain text
5661 #: build/C/man3/pthread_getattr_np.3:35
5662 #, no-wrap
5663 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5664 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5665
5666 #. type: Plain text
5667 #: build/C/man3/pthread_getattr_np.3:45
5668 msgid ""
5669 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5670 "object referred to by I<attr> so that it contains actual attribute values "
5671 "describing the running thread I<thread>."
5672 msgstr ""
5673 "B<pthread_getattr_np>() 関数は、\n"
5674 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5675 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5676 "格納して返す。"
5677
5678 #. type: Plain text
5679 #: build/C/man3/pthread_getattr_np.3:52
5680 msgid ""
5681 "The returned attribute values may differ from the corresponding attribute "
5682 "values passed in the I<attr> object that was used to create the thread using "
5683 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5684 msgstr ""
5685 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5686 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5687 "特に、以下の属性は異なる場合がある。"
5688
5689 #. type: Plain text
5690 #: build/C/man3/pthread_getattr_np.3:55
5691 msgid ""
5692 "the detach state, since a joinable thread may have detached itself after "
5693 "creation;"
5694 msgstr ""
5695 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5696 "切り離す (detach する) ことができるからである。"
5697
5698 #. type: Plain text
5699 #: build/C/man3/pthread_getattr_np.3:58
5700 msgid ""
5701 "the stack size, which the implementation may align to a suitable boundary."
5702 msgstr ""
5703 "スタックサイズ。\n"
5704 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5705
5706 #. type: Plain text
5707 #: build/C/man3/pthread_getattr_np.3:63
5708 msgid ""
5709 "and the guard size, which the implementation may round upward to a multiple "
5710 "of the page size, or ignore (i.e., treat as 0), if the application is "
5711 "allocating its own stack."
5712 msgstr ""
5713 "guard size.\n"
5714 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5715 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5716 "(0 として扱われる) ことがあるからである。"
5717
5718 #. type: Plain text
5719 #: build/C/man3/pthread_getattr_np.3:68
5720 msgid ""
5721 "Furthermore, if the stack address attribute was not set in the thread "
5722 "attributes object used to create the thread, then the returned thread "
5723 "attributes object will report the actual stack address that the "
5724 "implementation selected for the thread."
5725 msgstr ""
5726 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5727 "スタックアドレスが設定されていなかった場合、\n"
5728 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5729 "割り当てた実際のスタックアドレスが報告される。"
5730
5731 #. type: Plain text
5732 #: build/C/man3/pthread_getattr_np.3:73
5733 msgid ""
5734 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5735 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5736 msgstr ""
5737 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5738 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5739 "そのオブジェクトを破棄すべきである。"
5740
5741 #. type: Plain text
5742 #: build/C/man3/pthread_getattr_np.3:76
5743 #: build/C/man3/pthread_getcpuclockid.3:49
5744 msgid ""
5745 "On success, this function returns 0; on error, it returns a nonzero error "
5746 "number."
5747 msgstr ""
5748 "成功すると、この関数は 0 を返す。\n"
5749 "エラーの場合、 0 以外のエラー番号を返す。"
5750
5751 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5752 #. type: Plain text
5753 #: build/C/man3/pthread_getattr_np.3:81
5754 msgid "Insufficient memory."
5755 msgstr "メモリが十分になかった。"
5756
5757 #. type: Plain text
5758 #: build/C/man3/pthread_getattr_np.3:96
5759 msgid ""
5760 "In addition, if I<thread> refers to the main thread, then "
5761 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5762 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5763 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5764 msgstr ""
5765 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5766 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5767 "エラーで失敗する可能性がある。\n"
5768 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5769 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5770 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5771
5772 #. type: Plain text
5773 #: build/C/man3/pthread_getattr_np.3:98
5774 msgid "This function is available in glibc since version 2.2.3."
5775 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5776
5777 #. type: Plain text
5778 #: build/C/man3/pthread_getattr_np.3:101
5779 #: build/C/man3/pthread_kill_other_threads_np.3:50
5780 msgid ""
5781 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5782 "\" (nonportable) in the name."
5783 msgstr ""
5784 "この関数は非標準の GNU による拡張である。\n"
5785 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5786 "付いている。"
5787
5788 #. type: Plain text
5789 #: build/C/man3/pthread_getattr_np.3:111
5790 msgid ""
5791 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5792 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5793 "and display its guard size, stack address, and stack size attributes.  "
5794 "Command-line arguments can be used to set these attributes to values other "
5795 "than the default when creating the thread.  The shell sessions below "
5796 "demonstrate the use of the program."
5797 msgstr ""
5798 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5799 "このプログラムは、スレッドを作成し、それから\n"
5800 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5801 "スタックアドレス、スタックサイズを取得し表示する。\n"
5802 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5803 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5804 "下記のシェルのセッションはこのプログラムの使用例である。"
5805
5806 #. type: Plain text
5807 #: build/C/man3/pthread_getattr_np.3:114
5808 msgid ""
5809 "In the first run, on an x86-32 system, a thread is created using default "
5810 "attributes:"
5811 msgstr ""
5812 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5813 "(x86-32 システム上で実行)。"
5814
5815 #. type: Plain text
5816 #: build/C/man3/pthread_getattr_np.3:124
5817 #, no-wrap
5818 msgid ""
5819 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5820 "unlimited\n"
5821 "$B< ./a.out>\n"
5822 "Attributes of created thread:\n"
5823 "        Guard size          = 4096 bytes\n"
5824 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5825 "        Stack size          = 0x201000 (2101248) bytes\n"
5826 msgstr ""
5827 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5828 "unlimited\n"
5829 "$B< ./a.out>\n"
5830 "Attributes of created thread:\n"
5831 "        Guard size          = 4096 bytes\n"
5832 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5833 "        Stack size          = 0x201000 (2101248) bytes\n"
5834
5835 #. type: Plain text
5836 #: build/C/man3/pthread_getattr_np.3:130
5837 msgid ""
5838 "In the following run, we see that if a guard size is specified, it is "
5839 "rounded up to the next multiple of the system page size (4096 bytes on "
5840 "x86-32):"
5841 msgstr ""
5842 "次の実行例では、guard size が指定された場合、\n"
5843 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5844 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5845
5846 #. type: Plain text
5847 #: build/C/man3/pthread_getattr_np.3:138
5848 #, no-wrap
5849 msgid ""
5850 "$B< ./a.out -g 4097>\n"
5851 "Thread attributes object after initializations:\n"
5852 "        Guard size          = 4097 bytes\n"
5853 "        Stack address       = (nil)\n"
5854 "        Stack size          = 0x0 (0) bytes\n"
5855 msgstr ""
5856 "$B< ./a.out -g 4097>\n"
5857 "Thread attributes object after initializations:\n"
5858 "        Guard size          = 4097 bytes\n"
5859 "        Stack address       = (nil)\n"
5860 "        Stack size          = 0x0 (0) bytes\n"
5861
5862 #. type: Plain text
5863 #: build/C/man3/pthread_getattr_np.3:143
5864 #, no-wrap
5865 msgid ""
5866 "Attributes of created thread:\n"
5867 "        Guard size          = 8192 bytes\n"
5868 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5869 "        Stack size          = 0x201000 (2101248) bytes\n"
5870 msgstr ""
5871 "Attributes of created thread:\n"
5872 "        Guard size          = 8192 bytes\n"
5873 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5874 "        Stack size          = 0x201000 (2101248) bytes\n"
5875
5876 #. .in +4n
5877 #. .nf
5878 #. $ ./a.out \-s 0x8000
5879 #. Thread attributes object after initializations:
5880 #.         Guard size          = 4096 bytes
5881 #.         Stack address       = 0xffff8000 (EOS = (nil))
5882 #.         Stack size          = 0x8000 (32768) bytes
5883 #. Attributes of created thread:
5884 #.         Guard size          = 4096 bytes
5885 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5886 #.         Stack size          = 0x8000 (32768) bytes
5887 #. .fi
5888 #. .in
5889 #. type: Plain text
5890 #: build/C/man3/pthread_getattr_np.3:162
5891 msgid ""
5892 "In the last run, the program manually allocates a stack for the thread.  In "
5893 "this case, the guard size attribute is ignored."
5894 msgstr ""
5895 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5896 "この場合には、guard size 属性は無視される。"
5897
5898 #. type: Plain text
5899 #: build/C/man3/pthread_getattr_np.3:167
5900 #, no-wrap
5901 msgid ""
5902 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5903 "Allocated thread stack at 0x804d000\n"
5904 msgstr ""
5905 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5906 "Allocated thread stack at 0x804d000\n"
5907
5908 #. type: Plain text
5909 #: build/C/man3/pthread_getattr_np.3:172
5910 #, no-wrap
5911 msgid ""
5912 "Thread attributes object after initializations:\n"
5913 "        Guard size          = 4096 bytes\n"
5914 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5915 "        Stack size          = 0x8000 (32768) bytes\n"
5916 msgstr ""
5917 "Thread attributes object after initializations:\n"
5918 "        Guard size          = 4096 bytes\n"
5919 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5920 "        Stack size          = 0x8000 (32768) bytes\n"
5921
5922 #. type: Plain text
5923 #: build/C/man3/pthread_getattr_np.3:177
5924 #, no-wrap
5925 msgid ""
5926 "Attributes of created thread:\n"
5927 "        Guard size          = 0 bytes\n"
5928 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5929 "        Stack size          = 0x8000 (32768) bytes\n"
5930 msgstr ""
5931 "Attributes of created thread:\n"
5932 "        Guard size          = 0 bytes\n"
5933 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5934 "        Stack size          = 0x8000 (32768) bytes\n"
5935
5936 #. type: Plain text
5937 #: build/C/man3/pthread_getattr_np.3:198
5938 #, no-wrap
5939 msgid ""
5940 "static void\n"
5941 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5942 "{\n"
5943 "    int s;\n"
5944 "    size_t stack_size, guard_size;\n"
5945 "    void *stack_addr;\n"
5946 msgstr ""
5947 "static void\n"
5948 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5949 "{\n"
5950 "    int s;\n"
5951 "    size_t stack_size, guard_size;\n"
5952 "    void *stack_addr;\n"
5953
5954 #. type: Plain text
5955 #: build/C/man3/pthread_getattr_np.3:203
5956 #, no-wrap
5957 msgid ""
5958 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5959 "    if (s != 0)\n"
5960 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5961 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5962 msgstr ""
5963 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5964 "    if (s != 0)\n"
5965 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5966 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5967
5968 #. type: Plain text
5969 #: build/C/man3/pthread_getattr_np.3:214
5970 #, no-wrap
5971 msgid ""
5972 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5973 "    if (s != 0)\n"
5974 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5975 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5976 "    if (stack_size E<gt> 0)\n"
5977 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5978 "    printf(\"\\en\");\n"
5979 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5980 "            prefix, stack_size, stack_size);\n"
5981 "}\n"
5982 msgstr ""
5983 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5984 "    if (s != 0)\n"
5985 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5986 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5987 "    if (stack_size E<gt> 0)\n"
5988 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5989 "    printf(\"\\en\");\n"
5990 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5991 "            prefix, stack_size, stack_size);\n"
5992 "}\n"
5993
5994 #. type: Plain text
5995 #: build/C/man3/pthread_getattr_np.3:220
5996 #, no-wrap
5997 msgid ""
5998 "static void\n"
5999 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6000 "{\n"
6001 "    int s;\n"
6002 "    pthread_attr_t attr;\n"
6003 msgstr ""
6004 "static void\n"
6005 "display_thread_attributes(pthread_t thread, char *prefix)\n"
6006 "{\n"
6007 "    int s;\n"
6008 "    pthread_attr_t attr;\n"
6009
6010 #. type: Plain text
6011 #: build/C/man3/pthread_getattr_np.3:224
6012 #, no-wrap
6013 msgid ""
6014 "    s = pthread_getattr_np(thread, &attr);\n"
6015 "    if (s != 0)\n"
6016 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6017 msgstr ""
6018 "    s = pthread_getattr_np(thread, &attr);\n"
6019 "    if (s != 0)\n"
6020 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6021
6022 #. type: Plain text
6023 #: build/C/man3/pthread_getattr_np.3:226
6024 #, no-wrap
6025 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6026 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6027
6028 #. type: Plain text
6029 #: build/C/man3/pthread_getattr_np.3:231
6030 #, no-wrap
6031 msgid ""
6032 "    s = pthread_attr_destroy(&attr);\n"
6033 "    if (s != 0)\n"
6034 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6035 "}\n"
6036 msgstr ""
6037 "    s = pthread_attr_destroy(&attr);\n"
6038 "    if (s != 0)\n"
6039 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6040 "}\n"
6041
6042 #. type: Plain text
6043 #: build/C/man3/pthread_getattr_np.3:237
6044 #, no-wrap
6045 msgid ""
6046 "static void *           /* Start function for thread we create */\n"
6047 "thread_start(void *arg)\n"
6048 "{\n"
6049 "    printf(\"Attributes of created thread:\\en\");\n"
6050 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6051 msgstr ""
6052 "static void *           /* Start function for thread we create */\n"
6053 "thread_start(void *arg)\n"
6054 "{\n"
6055 "    printf(\"Attributes of created thread:\\en\");\n"
6056 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6057
6058 #. type: Plain text
6059 #: build/C/man3/pthread_getattr_np.3:251
6060 #, no-wrap
6061 msgid ""
6062 "static void\n"
6063 "usage(char *pname, char *msg)\n"
6064 "{\n"
6065 "    if (msg != NULL)\n"
6066 "        fputs(msg, stderr);\n"
6067 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6068 "            \" [-g guard-size]\\en\", pname);\n"
6069 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6070 "    exit(EXIT_FAILURE);\n"
6071 "}\n"
6072 msgstr ""
6073 "static void\n"
6074 "usage(char *pname, char *msg)\n"
6075 "{\n"
6076 "    if (msg != NULL)\n"
6077 "        fputs(msg, stderr);\n"
6078 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6079 "            \" [-g guard-size]\\en\", pname);\n"
6080 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6081 "    exit(EXIT_FAILURE);\n"
6082 "}\n"
6083
6084 #. type: Plain text
6085 #: build/C/man3/pthread_getattr_np.3:264
6086 #, no-wrap
6087 msgid ""
6088 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6089 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6090 "                              pthread_attr_t *attrp)\n"
6091 "{\n"
6092 "    int s, opt, allocate_stack;\n"
6093 "    long stack_size, guard_size;\n"
6094 "            void *stack_addr;\n"
6095 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6096 "                                           a thread attributes object */\n"
6097 "    allocate_stack = 0;\n"
6098 "    stack_size = -1;\n"
6099 "    guard_size = -1;\n"
6100 msgstr ""
6101 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6102 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6103 "                              pthread_attr_t *attrp)\n"
6104 "{\n"
6105 "    int s, opt, allocate_stack;\n"
6106 "    long stack_size, guard_size;\n"
6107 "            void *stack_addr;\n"
6108 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6109 "                                           a thread attributes object */\n"
6110 "    allocate_stack = 0;\n"
6111 "    stack_size = -1;\n"
6112 "    guard_size = -1;\n"
6113
6114 #. type: Plain text
6115 #: build/C/man3/pthread_getattr_np.3:273
6116 #, no-wrap
6117 msgid ""
6118 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6119 "        switch (opt) {\n"
6120 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6121 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6122 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6123 "        default:    usage(argv[0], NULL);\n"
6124 "        }\n"
6125 "    }\n"
6126 msgstr ""
6127 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6128 "        switch (opt) {\n"
6129 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6130 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6131 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6132 "        default:    usage(argv[0], NULL);\n"
6133 "        }\n"
6134 "    }\n"
6135
6136 #. type: Plain text
6137 #: build/C/man3/pthread_getattr_np.3:276
6138 #, no-wrap
6139 msgid ""
6140 "    if (allocate_stack && stack_size == -1)\n"
6141 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6142 msgstr ""
6143 "    if (allocate_stack && stack_size == -1)\n"
6144 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6145
6146 #. type: Plain text
6147 #: build/C/man3/pthread_getattr_np.3:279
6148 #, no-wrap
6149 msgid ""
6150 "    if (argc E<gt> optind)\n"
6151 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6152 msgstr ""
6153 "    if (argc E<gt> optind)\n"
6154 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6155
6156 #. type: Plain text
6157 #: build/C/man3/pthread_getattr_np.3:282
6158 #, no-wrap
6159 msgid ""
6160 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6161 "        ret_attrp = attrp;\n"
6162 msgstr ""
6163 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6164 "        ret_attrp = attrp;\n"
6165
6166 #. type: Plain text
6167 #: build/C/man3/pthread_getattr_np.3:287
6168 #, no-wrap
6169 msgid ""
6170 "        s = pthread_attr_init(attrp);\n"
6171 "        if (s != 0)\n"
6172 "            handle_error_en(s, \"pthread_attr_init\");\n"
6173 "    }\n"
6174 msgstr ""
6175 "        s = pthread_attr_init(attrp);\n"
6176 "        if (s != 0)\n"
6177 "            handle_error_en(s, \"pthread_attr_init\");\n"
6178 "    }\n"
6179
6180 #. type: Plain text
6181 #: build/C/man3/pthread_getattr_np.3:299
6182 #, no-wrap
6183 msgid ""
6184 "    if (stack_size E<gt>= 0) {\n"
6185 "        if (!allocate_stack) {\n"
6186 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6187 "            if (s != 0)\n"
6188 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6189 "        } else {\n"
6190 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6191 "                               stack_size);\n"
6192 "            if (s != 0)\n"
6193 "                handle_error_en(s, \"posix_memalign\");\n"
6194 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6195 msgstr ""
6196 "    if (stack_size E<gt>= 0) {\n"
6197 "        if (!allocate_stack) {\n"
6198 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6199 "            if (s != 0)\n"
6200 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6201 "        } else {\n"
6202 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6203 "                               stack_size);\n"
6204 "            if (s != 0)\n"
6205 "                handle_error_en(s, \"posix_memalign\");\n"
6206 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6207
6208 #. type: Plain text
6209 #: build/C/man3/pthread_getattr_np.3:305
6210 #, no-wrap
6211 msgid ""
6212 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6213 "            if (s != 0)\n"
6214 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6215 "        }\n"
6216 "    }\n"
6217 msgstr ""
6218 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6219 "            if (s != 0)\n"
6220 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6221 "        }\n"
6222 "    }\n"
6223
6224 #. type: Plain text
6225 #: build/C/man3/pthread_getattr_np.3:311
6226 #, no-wrap
6227 msgid ""
6228 "    if (guard_size E<gt>= 0) {\n"
6229 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6230 "        if (s != 0)\n"
6231 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6232 "    }\n"
6233 msgstr ""
6234 "    if (guard_size E<gt>= 0) {\n"
6235 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6236 "        if (s != 0)\n"
6237 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6238 "    }\n"
6239
6240 #. type: Plain text
6241 #: build/C/man3/pthread_getattr_np.3:314
6242 #, no-wrap
6243 msgid ""
6244 "    return ret_attrp;\n"
6245 "}\n"
6246 msgstr ""
6247 "    return ret_attrp;\n"
6248 "}\n"
6249
6250 #. type: Plain text
6251 #: build/C/man3/pthread_getattr_np.3:323
6252 #, no-wrap
6253 msgid ""
6254 "int\n"
6255 "main(int argc, char *argv[])\n"
6256 "{\n"
6257 "    int s;\n"
6258 "    pthread_t thr;\n"
6259 "    pthread_attr_t attr;\n"
6260 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6261 "                                        a thread attributes object */\n"
6262 msgstr ""
6263 "int\n"
6264 "main(int argc, char *argv[])\n"
6265 "{\n"
6266 "    int s;\n"
6267 "    pthread_t thr;\n"
6268 "    pthread_attr_t attr;\n"
6269 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6270 "                                        a thread attributes object */\n"
6271
6272 #. type: Plain text
6273 #: build/C/man3/pthread_getattr_np.3:325
6274 #, no-wrap
6275 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6276 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6277
6278 #. type: Plain text
6279 #: build/C/man3/pthread_getattr_np.3:331
6280 #, no-wrap
6281 msgid ""
6282 "    if (attrp != NULL) {\n"
6283 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6284 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6285 "        printf(\"\\en\");\n"
6286 "    }\n"
6287 msgstr ""
6288 "    if (attrp != NULL) {\n"
6289 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6290 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6291 "        printf(\"\\en\");\n"
6292 "    }\n"
6293
6294 #. type: Plain text
6295 #: build/C/man3/pthread_getattr_np.3:361
6296 msgid ""
6297 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6298 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6299 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6300 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6301 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6302 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6303 msgstr ""
6304 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6305 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6306 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6307 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6308 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6309 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6310
6311 #. type: TH
6312 #: build/C/man3/pthread_getcpuclockid.3:26
6313 #, no-wrap
6314 msgid "PTHREAD_GETCPUCLOCKID"
6315 msgstr "PTHREAD_GETCPUCLOCKID"
6316
6317 #. type: TH
6318 #: build/C/man3/pthread_getcpuclockid.3:26
6319 #, no-wrap
6320 msgid "2009-02-08"
6321 msgstr "2009-02-08"
6322
6323 #. type: Plain text
6324 #: build/C/man3/pthread_getcpuclockid.3:29
6325 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6326 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6327
6328 #. type: Plain text
6329 #: build/C/man3/pthread_getcpuclockid.3:33
6330 #, no-wrap
6331 msgid ""
6332 "B<#include E<lt>pthread.hE<gt>>\n"
6333 "B<#include E<lt>time.hE<gt>>\n"
6334 msgstr ""
6335 "B<#include E<lt>pthread.hE<gt>>\n"
6336 "B<#include E<lt>time.hE<gt>>\n"
6337
6338 #. type: Plain text
6339 #: build/C/man3/pthread_getcpuclockid.3:35
6340 #, no-wrap
6341 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6342 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6343
6344 #.  The clockid is constructed as follows:
6345 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6346 #.  where CLOCK_IDFIELD_SIZE is 3.
6347 #. type: Plain text
6348 #: build/C/man3/pthread_getcpuclockid.3:46
6349 msgid ""
6350 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6351 "time clock of the thread I<thread>."
6352 msgstr ""
6353 "B<pthread_getcpuclockid>() 関数は、\n"
6354 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6355
6356 #. type: TP
6357 #: build/C/man3/pthread_getcpuclockid.3:50
6358 #, no-wrap
6359 msgid "B<ENOENT>"
6360 msgstr "B<ENOENT>"
6361
6362 #.  CLOCK_THREAD_CPUTIME_ID not defined
6363 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6364 #.  be possible if kernel thread IDs took more than 29 bits (which
6365 #.  they currently cannot).
6366 #. type: Plain text
6367 #: build/C/man3/pthread_getcpuclockid.3:58
6368 msgid "Per-thread CPU time clocks are not supported by the system."
6369 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6370
6371 #. type: Plain text
6372 #: build/C/man3/pthread_getcpuclockid.3:65
6373 msgid "This function is available in glibc since version 2.2."
6374 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6375
6376 #. type: Plain text
6377 #: build/C/man3/pthread_getcpuclockid.3:78
6378 msgid ""
6379 "When I<thread> refers to the calling thread, this function returns an "
6380 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6381 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6382 msgstr ""
6383 "I<thread> が呼び出したスレッドを参照している場合、\n"
6384 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6385 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6386 "を参照する ID が返される。"
6387
6388 #. type: Plain text
6389 #: build/C/man3/pthread_getcpuclockid.3:84
6390 msgid ""
6391 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6392 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6393 "the two threads.  The following shell session shows an example run:"
6394 msgstr ""
6395 "以下のプログラムは、スレッドを作成し、それから\n"
6396 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6397 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6398 "スレッド毎の CPU 時間を取得する。\n"
6399 "下記のシェルのセッションは実行例である。"
6400
6401 #. type: Plain text
6402 #: build/C/man3/pthread_getcpuclockid.3:94
6403 #, no-wrap
6404 msgid ""
6405 "$ B<./a.out>\n"
6406 "Main thread sleeping\n"
6407 "Subthread starting infinite loop\n"
6408 "Main thread consuming some CPU time...\n"
6409 "Process total CPU time:    1.368\n"
6410 "Main thread CPU time:      0.376\n"
6411 "Subthread CPU time:        0.992\n"
6412 msgstr ""
6413 "$ B<./a.out>\n"
6414 "Main thread sleeping\n"
6415 "Subthread starting infinite loop\n"
6416 "Main thread consuming some CPU time...\n"
6417 "Process total CPU time:    1.368\n"
6418 "Main thread CPU time:      0.376\n"
6419 "Subthread CPU time:        0.992\n"
6420
6421 #. type: Plain text
6422 #: build/C/man3/pthread_getcpuclockid.3:100
6423 #, no-wrap
6424 msgid "/* Link with \"-lrt\" */\n"
6425 msgstr "/* \"-lrt\" でリンクする */\n"
6426
6427 #. type: Plain text
6428 #: build/C/man3/pthread_getcpuclockid.3:108
6429 #, no-wrap
6430 msgid ""
6431 "#include E<lt>time.hE<gt>\n"
6432 "#include E<lt>stdio.hE<gt>\n"
6433 "#include E<lt>stdlib.hE<gt>\n"
6434 "#include E<lt>unistd.hE<gt>\n"
6435 "#include E<lt>pthread.hE<gt>\n"
6436 "#include E<lt>string.hE<gt>\n"
6437 "#include E<lt>errno.hE<gt>\n"
6438 msgstr ""
6439 "#include E<lt>time.hE<gt>\n"
6440 "#include E<lt>stdio.hE<gt>\n"
6441 "#include E<lt>stdlib.hE<gt>\n"
6442 "#include E<lt>unistd.hE<gt>\n"
6443 "#include E<lt>pthread.hE<gt>\n"
6444 "#include E<lt>string.hE<gt>\n"
6445 "#include E<lt>errno.hE<gt>\n"
6446
6447 #. type: Plain text
6448 #: build/C/man3/pthread_getcpuclockid.3:122
6449 #, no-wrap
6450 msgid ""
6451 "static void *\n"
6452 "thread_start(void *arg)\n"
6453 "{\n"
6454 "    printf(\"Subthread starting infinite loop\\en\");\n"
6455 "    for (;;)\n"
6456 "        continue;\n"
6457 "}\n"
6458 msgstr ""
6459 "static void *\n"
6460 "thread_start(void *arg)\n"
6461 "{\n"
6462 "    printf(\"Subthread starting infinite loop\\en\");\n"
6463 "    for (;;)\n"
6464 "        continue;\n"
6465 "}\n"
6466
6467 #. type: Plain text
6468 #: build/C/man3/pthread_getcpuclockid.3:127
6469 #, no-wrap
6470 msgid ""
6471 "static void\n"
6472 "pclock(char *msg, clockid_t cid)\n"
6473 "{\n"
6474 "    struct timespec ts;\n"
6475 msgstr ""
6476 "static void\n"
6477 "pclock(char *msg, clockid_t cid)\n"
6478 "{\n"
6479 "    struct timespec ts;\n"
6480
6481 #. type: Plain text
6482 #: build/C/man3/pthread_getcpuclockid.3:133
6483 #, no-wrap
6484 msgid ""
6485 "    printf(\"%s\", msg);\n"
6486 "    if (clock_gettime(cid, &ts) == -1)\n"
6487 "        handle_error(\"clock_gettime\");\n"
6488 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6489 "}\n"
6490 msgstr ""
6491 "    printf(\"%s\", msg);\n"
6492 "    if (clock_gettime(cid, &ts) == -1)\n"
6493 "        handle_error(\"clock_gettime\");\n"
6494 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6495 "}\n"
6496
6497 #. type: Plain text
6498 #: build/C/man3/pthread_getcpuclockid.3:140
6499 #, no-wrap
6500 msgid ""
6501 "int\n"
6502 "main(int argc, char *argv[])\n"
6503 "{\n"
6504 "    pthread_t thread;\n"
6505 "    clockid_t cid;\n"
6506 "    int j, s;\n"
6507 msgstr ""
6508 "int\n"
6509 "main(int argc, char *argv[])\n"
6510 "{\n"
6511 "    pthread_t thread;\n"
6512 "    clockid_t cid;\n"
6513 "    int j, s;\n"
6514
6515 #. type: Plain text
6516 #: build/C/man3/pthread_getcpuclockid.3:144
6517 #, no-wrap
6518 msgid ""
6519 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6520 "    if (s != 0)\n"
6521 "        handle_error_en(s, \"pthread_create\");\n"
6522 msgstr ""
6523 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6524 "    if (s != 0)\n"
6525 "        handle_error_en(s, \"pthread_create\");\n"
6526
6527 #. type: Plain text
6528 #: build/C/man3/pthread_getcpuclockid.3:147
6529 #, no-wrap
6530 msgid ""
6531 "    printf(\"Main thread sleeping\\en\");\n"
6532 "    sleep(1);\n"
6533 msgstr ""
6534 "    printf(\"Main thread sleeping\\en\");\n"
6535 "    sleep(1);\n"
6536
6537 #. type: Plain text
6538 #: build/C/man3/pthread_getcpuclockid.3:151
6539 #, no-wrap
6540 msgid ""
6541 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6542 "    for (j = 0; j E<lt> 2000000; j++)\n"
6543 "        getppid();\n"
6544 msgstr ""
6545 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6546 "    for (j = 0; j E<lt> 2000000; j++)\n"
6547 "        getppid();\n"
6548
6549 #. type: Plain text
6550 #: build/C/man3/pthread_getcpuclockid.3:153
6551 #, no-wrap
6552 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6553 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6554
6555 #. type: Plain text
6556 #: build/C/man3/pthread_getcpuclockid.3:158
6557 #, no-wrap
6558 msgid ""
6559 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6560 "    if (s != 0)\n"
6561 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6562 "    pclock(\"Main thread CPU time:   \", cid);\n"
6563 msgstr ""
6564 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6565 "    if (s != 0)\n"
6566 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6567 "    pclock(\"Main thread CPU time:   \", cid);\n"
6568
6569 #. type: Plain text
6570 #: build/C/man3/pthread_getcpuclockid.3:161
6571 #, no-wrap
6572 msgid ""
6573 "    /* The preceding 4 lines of code could have been replaced by:\n"
6574 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6575 msgstr ""
6576 "    /* The preceding 4 lines of code could have been replaced by:\n"
6577 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6578
6579 #. type: Plain text
6580 #: build/C/man3/pthread_getcpuclockid.3:166
6581 #, no-wrap
6582 msgid ""
6583 "    s = pthread_getcpuclockid(thread, &cid);\n"
6584 "    if (s != 0)\n"
6585 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6586 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6587 msgstr ""
6588 "    s = pthread_getcpuclockid(thread, &cid);\n"
6589 "    if (s != 0)\n"
6590 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6591 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6592
6593 #. type: Plain text
6594 #: build/C/man3/pthread_getcpuclockid.3:169
6595 #, no-wrap
6596 msgid ""
6597 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6598 "}\n"
6599 msgstr ""
6600 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6601 "}\n"
6602
6603 #. type: Plain text
6604 #: build/C/man3/pthread_getcpuclockid.3:178
6605 msgid ""
6606 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6607 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6608 msgstr ""
6609 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6610 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6611
6612 #. type: TH
6613 #: build/C/man3/pthread_join.3:26
6614 #, no-wrap
6615 msgid "PTHREAD_JOIN"
6616 msgstr "PTHREAD_JOIN"
6617
6618 #. type: Plain text
6619 #: build/C/man3/pthread_join.3:29
6620 msgid "pthread_join - join with a terminated thread"
6621 msgstr "pthread_join - 終了したスレッドを join する"
6622
6623 #. type: Plain text
6624 #: build/C/man3/pthread_join.3:34
6625 #, no-wrap
6626 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6627 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6628
6629 #. type: Plain text
6630 #: build/C/man3/pthread_join.3:49
6631 msgid ""
6632 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6633 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6634 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6635 msgstr ""
6636 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6637 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6638 "B<pthread_join>() はすぐに返る。\n"
6639 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6640
6641 #. type: Plain text
6642 #: build/C/man3/pthread_join.3:63
6643 msgid ""
6644 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6645 "the target thread (i.e., the value that the target thread supplied to "
6646 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6647 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6648 msgstr ""
6649 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6650 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6651 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6652 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6653
6654 #. type: Plain text
6655 #: build/C/man3/pthread_join.3:70
6656 msgid ""
6657 "If multiple threads simultaneously try to join with the same thread, the "
6658 "results are undefined.  If the thread calling B<pthread_join>()  is "
6659 "canceled, then the target thread will remain joinable (i.e., it will not be "
6660 "detached)."
6661 msgstr ""
6662 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6663 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6664 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6665 "ならない)。"
6666
6667 #. type: Plain text
6668 #: build/C/man3/pthread_join.3:75
6669 msgid ""
6670 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6671 "number."
6672 msgstr ""
6673 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6674 "エラーの場合、エラー番号を返す。"
6675
6676 #. type: TP
6677 #: build/C/man3/pthread_join.3:76
6678 #, no-wrap
6679 msgid "B<EDEADLK>"
6680 msgstr "B<EDEADLK>"
6681
6682 #.  The following verified by testing on glibc 2.8/NPTL:
6683 #.  The following verified by testing on glibc 2.8/NPTL:
6684 #. type: Plain text
6685 #: build/C/man3/pthread_join.3:85
6686 msgid ""
6687 "A deadlock was detected (e.g., two threads tried to join with each other); "
6688 "or I<thread> specifies the calling thread."
6689 msgstr ""
6690 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6691 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6692
6693 #.  POSIX.1-2001 does not specify this error case.
6694 #. type: Plain text
6695 #: build/C/man3/pthread_join.3:93
6696 msgid "Another thread is already waiting to join with this thread."
6697 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6698
6699 #. type: Plain text
6700 #: build/C/man3/pthread_join.3:104
6701 msgid ""
6702 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6703 "the target thread has terminated."
6704 msgstr ""
6705 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6706 "呼び出し側には、対象スレッドが終了していることが保証される。"
6707
6708 #. type: Plain text
6709 #: build/C/man3/pthread_join.3:107
6710 msgid ""
6711 "Joining with a thread that has previously been joined results in undefined "
6712 "behavior."
6713 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6714
6715 #. type: Plain text
6716 #: build/C/man3/pthread_join.3:115
6717 msgid ""
6718 "Failure to join with a thread that is joinable (i.e., one that is not "
6719 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6720 "zombie thread consumes some system resources, and when enough zombie threads "
6721 "have accumulated, it will no longer be possible to create new threads (or "
6722 "processes)."
6723 msgstr ""
6724 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6725 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6726 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6727 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6728 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6729 "このようなことが起きるのは避けること。"
6730
6731 #. type: Plain text
6732 #: build/C/man3/pthread_join.3:121
6733 msgid ""
6734 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6735 "\"join with any terminated thread\".  If you believe you need this "
6736 "functionality, you probably need to rethink your application design."
6737 msgstr ""
6738 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6739 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6740 "この機能が必要だと思うような場合には、おそらく\n"
6741 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6742
6743 #. type: Plain text
6744 #: build/C/man3/pthread_join.3:124
6745 msgid ""
6746 "All of the threads in a process are peers: any thread can join with any "
6747 "other thread in the process."
6748 msgstr ""
6749 "プロセス内の全てのスレッドは対等であり、\n"
6750 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6751
6752 #. type: Plain text
6753 #: build/C/man3/pthread_join.3:134
6754 msgid ""
6755 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6756 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6757 msgstr ""
6758 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6759 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6760
6761 #. type: TH
6762 #: build/C/man3/pthread_kill.3:26
6763 #, no-wrap
6764 msgid "PTHREAD_KILL"
6765 msgstr "PTHREAD_KILL"
6766
6767 #. type: TH
6768 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigmask.3:26
6769 #, fuzzy, no-wrap
6770 #| msgid "2010-02-03"
6771 msgid "2014-02-04"
6772 msgstr "2010-02-03"
6773
6774 #. type: Plain text
6775 #: build/C/man3/pthread_kill.3:29
6776 msgid "pthread_kill - send a signal to a thread"
6777 msgstr "pthread_kill - スレッドにシグナルを送信する"
6778
6779 #. type: Plain text
6780 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6781 #, no-wrap
6782 msgid "B<#include E<lt>signal.hE<gt>>\n"
6783 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6784
6785 #. type: Plain text
6786 #: build/C/man3/pthread_kill.3:34
6787 #, no-wrap
6788 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6789 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6790
6791 #. type: Plain text
6792 #: build/C/man3/pthread_kill.3:45
6793 #, fuzzy
6794 #| msgid "See B<pthread_cancel>(3)."
6795 msgid "B<pthread_kill>():"
6796 msgstr "B<pthread_cancel>(3) を参照。"
6797
6798 #. type: Plain text
6799 #: build/C/man3/pthread_kill.3:47 build/C/man3/pthread_sigmask.3:48
6800 #, fuzzy
6801 #| msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
6802 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 199506L || _XOPEN_SOURCE\\ E<gt>=\\ 500"
6803 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
6804
6805 #. type: Plain text
6806 #: build/C/man3/pthread_kill.3:59
6807 msgid ""
6808 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6809 "thread in the same process as the caller.  The signal is asynchronously "
6810 "directed to I<thread>."
6811 msgstr ""
6812 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6813 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6814 "シグナルは非同期に I<thread> へ直接送られる。"
6815
6816 #. type: Plain text
6817 #: build/C/man3/pthread_kill.3:63
6818 #, fuzzy
6819 #| msgid ""
6820 #| "If I<sig> is 0, then no signal is sent, but error checking is still "
6821 #| "performed; this can be used to check for the existence of a thread ID."
6822 msgid ""
6823 "If I<sig> is 0, then no signal is sent, but error checking is still "
6824 "performed."
6825 msgstr ""
6826 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6827 "エラーチェックだけは実行される。\n"
6828 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6829
6830 #. type: Plain text
6831 #: build/C/man3/pthread_kill.3:68
6832 msgid ""
6833 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6834 "number, and no signal is sent."
6835 msgstr ""
6836 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6837 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6838
6839 #. type: Plain text
6840 #: build/C/man3/pthread_kill.3:72
6841 msgid "An invalid signal was specified."
6842 msgstr "無効なシグナルが指定された。"
6843
6844 #. type: Plain text
6845 #: build/C/man3/pthread_kill.3:74
6846 #, fuzzy
6847 #| msgid "POSIX.1-2001."
6848 msgid "POSIX.1-2008."
6849 msgstr "POSIX.1-2001."
6850
6851 #. type: Plain text
6852 #: build/C/man3/pthread_kill.3:81
6853 msgid ""
6854 "Signal dispositions are process-wide: if a signal handler is installed, the "
6855 "handler will be invoked in the thread I<thread>, but if the disposition of "
6856 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6857 "affect the whole process."
6858 msgstr ""
6859 "シグナルの配送はプロセス全体で行われる。\n"
6860 "シグナルハンドラが設定されている場合、\n"
6861 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6862 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6863 "シグナルに対するアクションはプロセス全体に影響がある。"
6864
6865 #. type: Plain text
6866 #: build/C/man3/pthread_kill.3:94
6867 msgid ""
6868 "POSIX.1-2008 recommends that if an implementation detects the use of a "
6869 "thread ID after the end of its lifetime, B<pthread_kill>()  should return "
6870 "the error B<ESRCH>.  The glibc implementation returns this error in the "
6871 "cases where an invalid thread ID can be detected.  But note also that POSIX "
6872 "says that an attempt to use a thread ID whose lifetime has ended produces "
6873 "undefined behavior, and an attempt to use an invalid thread ID in a call to "
6874 "B<pthread_kill>()  can, for example, cause a segmentation fault."
6875 msgstr ""
6876
6877 #. type: Plain text
6878 #: build/C/man3/pthread_kill.3:103
6879 msgid ""
6880 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6881 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6882 msgstr ""
6883 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6884 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6885
6886 #. type: TH
6887 #: build/C/man3/pthread_kill_other_threads_np.3:26
6888 #, no-wrap
6889 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6890 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6891
6892 #. type: TH
6893 #: build/C/man3/pthread_kill_other_threads_np.3:26
6894 #, no-wrap
6895 msgid "2010-09-09"
6896 msgstr "2010-09-09"
6897
6898 #. type: Plain text
6899 #: build/C/man3/pthread_kill_other_threads_np.3:29
6900 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6901 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6902
6903 #. type: Plain text
6904 #: build/C/man3/pthread_kill_other_threads_np.3:34
6905 #, no-wrap
6906 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6907 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6908
6909 #.  .SH VERSIONS
6910 #.  Available since glibc 2.0
6911 #. type: Plain text
6912 #: build/C/man3/pthread_kill_other_threads_np.3:47
6913 msgid ""
6914 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
6915 "threading implementation.  On that implementation, calling this function "
6916 "causes the immediate termination of all threads in the application, except "
6917 "the calling thread.  The cancellation state and cancellation type of the to-"
6918 "be-terminated threads are ignored, and the cleanup handlers are not called "
6919 "in those threads."
6920 msgstr ""
6921 "B<pthread_kill_other_threads_np>() は、\n"
6922 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6923 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6924 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6925 "終了対象のスレッドの cancelability state と cancelability type は\n"
6926 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6927
6928 #. type: Plain text
6929 #: build/C/man3/pthread_kill_other_threads_np.3:59
6930 msgid ""
6931 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6932 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6933 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6934 "the other threads of an application are not automatically terminated (as "
6935 "POSIX.1-2001 requires) during B<execve>(2)."
6936 msgstr ""
6937 "B<pthread_kill_other_threads_np>() は、\n"
6938 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6939 "呼ばれることを目的として用意されている。\n"
6940 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6941 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6942 "終了されないという制限を解決するために設計された。"
6943
6944 #. type: Plain text
6945 #: build/C/man3/pthread_kill_other_threads_np.3:66
6946 msgid ""
6947 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6948 "exists, but does nothing.  (Nothing needs to be done, because the "
6949 "implementation does the right thing during an B<execve>(2).)"
6950 msgstr ""
6951 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6952 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6953 "何もする必要がないということだ)。"
6954
6955 #. type: Plain text
6956 #: build/C/man3/pthread_kill_other_threads_np.3:72
6957 msgid ""
6958 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6959 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6960 msgstr ""
6961 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6962 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6963
6964 #. type: TH
6965 #: build/C/man3/pthread_self.3:26
6966 #, no-wrap
6967 msgid "PTHREAD_SELF"
6968 msgstr "PTHREAD_SELF"
6969
6970 #. type: Plain text
6971 #: build/C/man3/pthread_self.3:29
6972 msgid "pthread_self - obtain ID of the calling thread"
6973 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6974
6975 #. type: Plain text
6976 #: build/C/man3/pthread_self.3:34
6977 #, no-wrap
6978 msgid "B<pthread_t pthread_self(void);>\n"
6979 msgstr "B<pthread_t pthread_self(void);>\n"
6980
6981 #. type: Plain text
6982 #: build/C/man3/pthread_self.3:46
6983 msgid ""
6984 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6985 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6986 "(3)  call that created this thread."
6987 msgstr ""
6988 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6989 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6990 "呼び出しで I<*thread> で返されるのと同じ値である。"
6991
6992 #. type: Plain text
6993 #: build/C/man3/pthread_self.3:48
6994 msgid "This function always succeeds, returning the calling thread's ID."
6995 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6996
6997 #. type: Plain text
6998 #: build/C/man3/pthread_self.3:63
6999 msgid ""
7000 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
7001 "represent a thread ID; for example, representation using either an "
7002 "arithmetic type or a structure is permitted.  Therefore, variables of type "
7003 "I<pthread_t> can't portably be compared using the C equality operator "
7004 "(B<==>); use B<pthread_equal>(3)  instead."
7005 msgstr ""
7006 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
7007 "スレッド実装が完全に自由に選択してよいことになっている。\n"
7008 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
7009 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
7010 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
7011 "代わりに B<pthread_equal>(3) を使うこと。"
7012
7013 #. type: Plain text
7014 #: build/C/man3/pthread_self.3:67
7015 msgid ""
7016 "Thread identifiers should be considered opaque: any attempt to use a thread "
7017 "ID other than in pthreads calls is nonportable and can lead to unspecified "
7018 "results."
7019 msgstr ""
7020 "スレッド識別子はその内部構造を意識すべきではない。\n"
7021 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
7022 "移植性がなくなり、どのような結果が得られるかも分からない。"
7023
7024 #. type: Plain text
7025 #: build/C/man3/pthread_self.3:71
7026 msgid ""
7027 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
7028 "may be reused after a terminated thread has been joined, or a detached "
7029 "thread has terminated."
7030 msgstr ""
7031 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
7032 "終了したスレッドが join されたり、\n"
7033 "切り離された (detached) スレッドが終了されたりした後は、\n"
7034 "そのスレッド ID は再利用されることがある。"
7035
7036 #. type: Plain text
7037 #: build/C/man3/pthread_self.3:76
7038 msgid ""
7039 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
7040 "kernel thread ID returned by a call to B<gettid>(2)."
7041 msgstr ""
7042 "B<pthread_self>() が返すスレッド ID は、\n"
7043 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
7044
7045 #. type: Plain text
7046 #: build/C/man3/pthread_self.3:80
7047 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7048 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7049
7050 #. type: TH
7051 #: build/C/man3/pthread_setaffinity_np.3:26
7052 #, no-wrap
7053 msgid "PTHREAD_SETAFFINITY_NP"
7054 msgstr "PTHREAD_SETAFFINITY_NP"
7055
7056 #. type: Plain text
7057 #: build/C/man3/pthread_setaffinity_np.3:30
7058 msgid ""
7059 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7060 "thread"
7061 msgstr ""
7062 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7063 "CPU affinity の設定/取得を行う"
7064
7065 #. type: Plain text
7066 #: build/C/man3/pthread_setaffinity_np.3:39
7067 #, no-wrap
7068 msgid ""
7069 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7070 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7071 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7072 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7073 msgstr ""
7074 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7075 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7076 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7077 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7078
7079 #. type: Plain text
7080 #: build/C/man3/pthread_setaffinity_np.3:54
7081 msgid ""
7082 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7083 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7084 "successful, and the thread is not currently running on one of the CPUs in "
7085 "I<cpuset>, then it is migrated to one of those CPUs."
7086 msgstr ""
7087 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7088 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7089 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7090 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7091
7092 #. type: Plain text
7093 #: build/C/man3/pthread_setaffinity_np.3:61
7094 msgid ""
7095 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7096 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7097 msgstr ""
7098 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7099 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7100
7101 #. type: Plain text
7102 #: build/C/man3/pthread_setaffinity_np.3:77
7103 msgid ""
7104 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7105 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
7106 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
7107 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7108 msgstr ""
7109 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7110 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7111 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7112 "割り当てている場合には、別の値になることもある)。"
7113
7114 #. type: TP
7115 #: build/C/man3/pthread_setaffinity_np.3:81
7116 #, no-wrap
7117 msgid "B<EFAULT>"
7118 msgstr "B<EFAULT>"
7119
7120 #. type: Plain text
7121 #: build/C/man3/pthread_setaffinity_np.3:84
7122 msgid "A supplied memory address was invalid."
7123 msgstr "指定されたメモリアドレスが無効である。"
7124
7125 #. type: Plain text
7126 #: build/C/man3/pthread_setaffinity_np.3:93
7127 msgid ""
7128 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7129 "processors that are currently physically on the system and permitted to the "
7130 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7131 "mechanism described in B<cpuset>(7)."
7132 msgstr ""
7133 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7134 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7135 "されているプロセッサが一つも含まれていない。\n"
7136 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7137 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7138
7139 #.  FIXME . ?
7140 #.  Loic Domaigne commented: it seems that in the future the
7141 #.  kernel developers want to make cpumask_t dynamic, so
7142 #.  CONFIG_NR_CPUS might become obsolete in the future.
7143 #.  cpumask_t
7144 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7145 #.  of the cpumask_t type.
7146 #. type: Plain text
7147 #: build/C/man3/pthread_setaffinity_np.3:109
7148 msgid ""
7149 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7150 "the set supported by the kernel.  (The kernel configuration option "
7151 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7152 "type used to represent CPU sets.)"
7153 msgstr ""
7154 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7155 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7156 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7157 "データ型がサポートする CPU 集合の範囲が定義される。)"
7158
7159 #. type: Plain text
7160 #: build/C/man3/pthread_setaffinity_np.3:114
7161 msgid ""
7162 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7163 "affinity mask used by the kernel."
7164 msgstr ""
7165 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7166 "affinity マスクの大きさよりも小さい。"
7167
7168 #. type: Plain text
7169 #: build/C/man3/pthread_setaffinity_np.3:137
7170 msgid ""
7171 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7172 "thread will actually run is the intersection of the set specified in the "
7173 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7174 "system may further restrict the set of CPUs on which the thread runs if the "
7175 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7176 "restrictions on the actual set of CPUs on which the thread will run are "
7177 "silently imposed by the kernel."
7178 msgstr ""
7179 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7180 "そのスレッドが実際に実行される CPU 集合は、\n"
7181 "I<cpuset> 引き数で指定された集合と\n"
7182 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7183 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7184 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7185 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7186 "これらの制限は、カーネルにより黙って適用される。"
7187
7188 #. type: Plain text
7189 #: build/C/man3/pthread_setaffinity_np.3:143
7190 msgid ""
7191 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7192 "B<sched_getaffinity>(2)  system calls."
7193 msgstr ""
7194 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7195 "B<sched_getaffinity>(2) を使って実装されている。"
7196
7197 #. type: Plain text
7198 #: build/C/man3/pthread_setaffinity_np.3:154
7199 msgid ""
7200 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7201 "creator's CPU affinity mask."
7202 msgstr ""
7203 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7204 "作成者の CPU affinity マスクを継承する。"
7205
7206 #. type: Plain text
7207 #: build/C/man3/pthread_setaffinity_np.3:162
7208 msgid ""
7209 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7210 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7211 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7212 "check the resulting CPU affinity mask of the thread."
7213 msgstr ""
7214 "以下のプログラムでは、メインスレッドは\n"
7215 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7216 "CPU 0 から 7 が含まれるように設定し\n"
7217 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7218 "その後で B<pthread_getaffinity_np>() を使って\n"
7219 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7220
7221 #. type: Plain text
7222 #: build/C/man3/pthread_setaffinity_np.3:169
7223 #, no-wrap
7224 msgid ""
7225 "#define _GNU_SOURCE\n"
7226 "#include E<lt>pthread.hE<gt>\n"
7227 "#include E<lt>stdio.hE<gt>\n"
7228 "#include E<lt>stdlib.hE<gt>\n"
7229 "#include E<lt>errno.hE<gt>\n"
7230 msgstr ""
7231 "#define _GNU_SOURCE\n"
7232 "#include E<lt>pthread.hE<gt>\n"
7233 "#include E<lt>stdio.hE<gt>\n"
7234 "#include E<lt>stdlib.hE<gt>\n"
7235 "#include E<lt>errno.hE<gt>\n"
7236
7237 #. type: Plain text
7238 #: build/C/man3/pthread_setaffinity_np.3:179
7239 #, no-wrap
7240 msgid ""
7241 "int\n"
7242 "main(int argc, char *argv[])\n"
7243 "{\n"
7244 "    int s, j;\n"
7245 "    cpu_set_t cpuset;\n"
7246 "    pthread_t thread;\n"
7247 msgstr ""
7248 "int\n"
7249 "main(int argc, char *argv[])\n"
7250 "{\n"
7251 "    int s, j;\n"
7252 "    cpu_set_t cpuset;\n"
7253 "    pthread_t thread;\n"
7254
7255 #. type: Plain text
7256 #: build/C/man3/pthread_setaffinity_np.3:181
7257 #, no-wrap
7258 msgid "    thread = pthread_self();\n"
7259 msgstr "    thread = pthread_self();\n"
7260
7261 #. type: Plain text
7262 #: build/C/man3/pthread_setaffinity_np.3:183
7263 #, no-wrap
7264 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7265 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7266
7267 #. type: Plain text
7268 #: build/C/man3/pthread_setaffinity_np.3:187
7269 #, no-wrap
7270 msgid ""
7271 "    CPU_ZERO(&cpuset);\n"
7272 "    for (j = 0; j E<lt> 8; j++)\n"
7273 "        CPU_SET(j, &cpuset);\n"
7274 msgstr ""
7275 "    CPU_ZERO(&cpuset);\n"
7276 "    for (j = 0; j E<lt> 8; j++)\n"
7277 "        CPU_SET(j, &cpuset);\n"
7278
7279 #. type: Plain text
7280 #: build/C/man3/pthread_setaffinity_np.3:191
7281 #, no-wrap
7282 msgid ""
7283 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7284 "    if (s != 0)\n"
7285 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7286 msgstr ""
7287 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7288 "    if (s != 0)\n"
7289 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7290
7291 #. type: Plain text
7292 #: build/C/man3/pthread_setaffinity_np.3:193
7293 #, no-wrap
7294 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7295 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7296
7297 #. type: Plain text
7298 #: build/C/man3/pthread_setaffinity_np.3:197
7299 #, no-wrap
7300 msgid ""
7301 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7302 "    if (s != 0)\n"
7303 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7304 msgstr ""
7305 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7306 "    if (s != 0)\n"
7307 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7308
7309 #. type: Plain text
7310 #: build/C/man3/pthread_setaffinity_np.3:202
7311 #, no-wrap
7312 msgid ""
7313 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7314 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7315 "        if (CPU_ISSET(j, &cpuset))\n"
7316 "            printf(\"    CPU %d\\en\", j);\n"
7317 msgstr ""
7318 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7319 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7320 "        if (CPU_ISSET(j, &cpuset))\n"
7321 "            printf(\"    CPU %d\\en\", j);\n"
7322
7323 #. type: Plain text
7324 #: build/C/man3/pthread_setaffinity_np.3:205
7325 #: build/C/man3/pthread_setschedparam.3:430
7326 #, no-wrap
7327 msgid ""
7328 "    exit(EXIT_SUCCESS);\n"
7329 "}\n"
7330 msgstr ""
7331 "    exit(EXIT_SUCCESS);\n"
7332 "}\n"
7333
7334 #. type: Plain text
7335 #: build/C/man3/pthread_setaffinity_np.3:214
7336 msgid ""
7337 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7338 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7339 "B<cpuset>(7), B<pthreads>(7)"
7340 msgstr ""
7341 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7342 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7343 "B<cpuset>(7), B<pthreads>(7)"
7344
7345 #. type: TH
7346 #: build/C/man3/pthread_setcancelstate.3:26
7347 #, no-wrap
7348 msgid "PTHREAD_SETCANCELSTATE"
7349 msgstr "PTHREAD_SETCANCELSTATE"
7350
7351 #. type: Plain text
7352 #: build/C/man3/pthread_setcancelstate.3:30
7353 msgid ""
7354 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7355 "type"
7356 msgstr ""
7357 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7358 "cancelability type を設定する"
7359
7360 #. type: Plain text
7361 #: build/C/man3/pthread_setcancelstate.3:36
7362 #, no-wrap
7363 msgid ""
7364 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7365 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7366 msgstr ""
7367 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7368 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7369
7370 #. type: Plain text
7371 #: build/C/man3/pthread_setcancelstate.3:51
7372 msgid ""
7373 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7374 "thread to the value given in I<state>.  The previous cancelability state of "
7375 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7376 "I<state> argument must have one of the following values:"
7377 msgstr ""
7378 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7379 "cancelability state に I<state> で指定された\n"
7380 "値を設定する。変更前のスレッドの cancelability state は\n"
7381 "I<oldstate> が指すバッファで返される。\n"
7382 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7383
7384 #. type: TP
7385 #: build/C/man3/pthread_setcancelstate.3:51
7386 #, no-wrap
7387 msgid "B<PTHREAD_CANCEL_ENABLE>"
7388 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7389
7390 #. type: Plain text
7391 #: build/C/man3/pthread_setcancelstate.3:58
7392 msgid ""
7393 "The thread is cancelable.  This is the default cancelability state in all "
7394 "new threads, including the initial thread.  The thread's cancelability type "
7395 "determines when a cancelable thread will respond to a cancellation request."
7396 msgstr ""
7397 "スレッドは取り消し可能 (cancelable) である。\n"
7398 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7399 "cancelability state である。これには最初のスレッドも含まれる。\n"
7400 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7401 "取り消し要求にいつ反応するかが決まる。"
7402
7403 #. type: TP
7404 #: build/C/man3/pthread_setcancelstate.3:58
7405 #, no-wrap
7406 msgid "B<PTHREAD_CANCEL_DISABLE>"
7407 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7408
7409 #. type: Plain text
7410 #: build/C/man3/pthread_setcancelstate.3:63
7411 msgid ""
7412 "The thread is not cancelable.  If a cancellation request is received, it is "
7413 "blocked until cancelability is enabled."
7414 msgstr ""
7415 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7416 "取り消し可能に設定されるまでその要求はブロックされる。"
7417
7418 #. type: Plain text
7419 #: build/C/man3/pthread_setcancelstate.3:75
7420 msgid ""
7421 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7422 "thread to the value given in I<type>.  The previous cancelability type of "
7423 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7424 "argument must have one of the following values:"
7425 msgstr ""
7426 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7427 "cancelability type に I<type> で指定された値を設定する。\n"
7428 "変更前のスレッドの cancelability type は\n"
7429 "I<oldtype> が指すバッファで返される。\n"
7430 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7431
7432 #. type: TP
7433 #: build/C/man3/pthread_setcancelstate.3:75
7434 #, no-wrap
7435 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7436 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7437
7438 #. type: Plain text
7439 #: build/C/man3/pthread_setcancelstate.3:82
7440 msgid ""
7441 "A cancellation request is deferred until the thread next calls a function "
7442 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7443 "cancelability type in all new threads, including the initial thread."
7444 msgstr ""
7445 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7446 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7447 "スレッドでのデフォルトの cancelability type である。\n"
7448 "これには最初のスレッドも含まれる。"
7449
7450 #. type: TP
7451 #: build/C/man3/pthread_setcancelstate.3:82
7452 #, no-wrap
7453 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7454 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7455
7456 #. type: Plain text
7457 #: build/C/man3/pthread_setcancelstate.3:88
7458 msgid ""
7459 "The thread can be canceled at any time.  (Typically, it will be canceled "
7460 "immediately upon receiving a cancellation request, but the system doesn't "
7461 "guarantee this.)"
7462 msgstr ""
7463 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7464 "システムがそのことを保証しているわけではない)。"
7465
7466 #. type: Plain text
7467 #: build/C/man3/pthread_setcancelstate.3:92
7468 msgid ""
7469 "The set-and-get operation performed by each of these functions is atomic "
7470 "with respect to other threads in the process calling the same function."
7471 msgstr ""
7472 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7473 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7474 "アトミックに行われる。"
7475
7476 #. type: Plain text
7477 #: build/C/man3/pthread_setcancelstate.3:99
7478 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7479 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7480
7481 #. type: Plain text
7482 #: build/C/man3/pthread_setcancelstate.3:103
7483 msgid "Invalid value for I<state>."
7484 msgstr "I<state> に無効な値が指定された。"
7485
7486 #. type: Plain text
7487 #: build/C/man3/pthread_setcancelstate.3:107
7488 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7489 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7490
7491 #.  .SH VERSIONS
7492 #.  Available since glibc 2.0
7493 #. type: Plain text
7494 #: build/C/man3/pthread_setcancelstate.3:113
7495 msgid "Invalid value for I<type>."
7496 msgstr "I<type> に無効な値が指定された。"
7497
7498 #. type: Plain text
7499 #: build/C/man3/pthread_setcancelstate.3:118
7500 msgid ""
7501 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7502 "(3)."
7503 msgstr ""
7504 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7505 "B<pthread_cancel>(3) を参照。"
7506
7507 #. type: Plain text
7508 #: build/C/man3/pthread_setcancelstate.3:125
7509 msgid ""
7510 "Briefly disabling cancelability is useful if a thread performs some critical "
7511 "action that must not be interrupted by a cancellation request.  Beware of "
7512 "disabling cancelability for long periods, or around operations that may "
7513 "block for long periods, since that will render the thread unresponsive to "
7514 "cancellation requests."
7515 msgstr ""
7516 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7517 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7518 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7519 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7520 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7521 "スレッドが応答しない状態になってしまうからである。"
7522
7523 #. type: Plain text
7524 #: build/C/man3/pthread_setcancelstate.3:156
7525 msgid ""
7526 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7527 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7528 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7529 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7530 "because the application has no way of knowing what the state of these "
7531 "resources is when the thread is canceled; that is, did cancellation occur "
7532 "before the resources were reserved, while they were reserved, or after they "
7533 "were released? Furthermore, some internal data structures (e.g., the linked "
7534 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7535 "left in an inconsistent state if cancellation occurs in the middle of the "
7536 "function call.  Consequently, clean-up handlers cease to be useful.  "
7537 "Functions that can be safely asynchronously canceled are called I<async-"
7538 "cancel-safe functions>.  POSIX.1-2001 requires only that B<pthread_cancel>"
7539 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7540 "cancel-safe.  In general, other library functions can't be safely called "
7541 "from an asynchronously cancelable thread.  One of the few circumstances in "
7542 "which asynchronous cancelability is useful is for cancellation of a thread "
7543 "that is in a pure compute-bound loop."
7544 msgstr ""
7545 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7546 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7547 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7548 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7549 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7550 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7551 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7552 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7553 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7554 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7555 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7556 "が役に立たないものになってしまう。\n"
7557 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7558 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7559 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7560 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7561 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7562 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7563 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7564
7565 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7566 #. type: Plain text
7567 #: build/C/man3/pthread_setcancelstate.3:174
7568 msgid ""
7569 "The Linux threading implementations permit the I<oldstate> argument of "
7570 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7571 "the previous cancelability state is not returned to the caller.  Many other "
7572 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7573 "does not specify this point, so portable applications should always specify "
7574 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7575 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7576 msgstr ""
7577 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7578 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7579 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7580 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7581 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7582 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7583 "NULL 以外の値を指定するようにすべきである。\n"
7584 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7585 "全く同じことが言える。"
7586
7587 #. type: Plain text
7588 #: build/C/man3/pthread_setcancelstate.3:177
7589 msgid "See B<pthread_cancel>(3)."
7590 msgstr "B<pthread_cancel>(3) を参照。"
7591
7592 #. type: Plain text
7593 #: build/C/man3/pthread_setcancelstate.3:182
7594 msgid ""
7595 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7596 "B<pthreads>(7)"
7597 msgstr ""
7598 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7599 "B<pthreads>(7)"
7600
7601 #. type: TH
7602 #: build/C/man3/pthread_setconcurrency.3:25
7603 #, no-wrap
7604 msgid "PTHREAD_SETCONCURRENCY"
7605 msgstr "PTHREAD_SETCONCURRENCY"
7606
7607 #. type: TH
7608 #: build/C/man3/pthread_setconcurrency.3:25
7609 #, no-wrap
7610 msgid "2009-04-10"
7611 msgstr "2009-04-10"
7612
7613 #. type: Plain text
7614 #: build/C/man3/pthread_setconcurrency.3:29
7615 msgid ""
7616 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7617 "level"
7618 msgstr ""
7619 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7620 "行う"
7621
7622 #. type: Plain text
7623 #: build/C/man3/pthread_setconcurrency.3:35
7624 #, no-wrap
7625 msgid ""
7626 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7627 "B<int pthread_getconcurrency(void);>\n"
7628 msgstr ""
7629 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7630 "B<int pthread_getconcurrency(void);>\n"
7631
7632 #. type: Plain text
7633 #: build/C/man3/pthread_setconcurrency.3:48
7634 msgid ""
7635 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7636 "application's desired concurrency level, specified in I<new_level>.  The "
7637 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7638 "of concurrency that should be provided as a result of calling "
7639 "B<pthread_setconcurrency>()."
7640 msgstr ""
7641 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7642 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7643 "希望する並列処理レベルは I<new_level> で指定する。\n"
7644 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7645 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7646 "どのような並列度になるべきかは規定されていない。"
7647
7648 #. type: Plain text
7649 #: build/C/man3/pthread_setconcurrency.3:53
7650 msgid ""
7651 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7652 "concurrency level as it deems appropriate."
7653 msgstr ""
7654 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7655 "実装側で適切とみなしたレベルに設定するようになる。"
7656
7657 #. type: Plain text
7658 #: build/C/man3/pthread_setconcurrency.3:56
7659 msgid ""
7660 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7661 "level for this process."
7662 msgstr ""
7663 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7664 "の現在値を返す。"
7665
7666 #. type: Plain text
7667 #: build/C/man3/pthread_setconcurrency.3:61
7668 msgid ""
7669 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7670 "nonzero error number."
7671 msgstr ""
7672 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7673 "エラーの場合、 0 以外のエラー番号を返す。"
7674
7675 #. type: Plain text
7676 #: build/C/man3/pthread_setconcurrency.3:68
7677 msgid ""
7678 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7679 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7680 "B<pthread_setconcurrency>()  has not previously been called."
7681 msgstr ""
7682 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7683 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7684 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7685 "それまでに一度も呼び出されていない場合は 0 が返る。"
7686
7687 #. type: Plain text
7688 #: build/C/man3/pthread_setconcurrency.3:71
7689 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7690 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7691
7692 #. type: Plain text
7693 #: build/C/man3/pthread_setconcurrency.3:75
7694 msgid "I<new_level> is negative."
7695 msgstr "I<new_level> が負である。"
7696
7697 #. type: Plain text
7698 #: build/C/man3/pthread_setconcurrency.3:81
7699 msgid ""
7700 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7701 "I<new_level> would cause a system resource to be exceeded\")."
7702 msgstr ""
7703 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7704 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7705 "超過してしまう」)。"
7706
7707 #. type: Plain text
7708 #: build/C/man3/pthread_setconcurrency.3:83
7709 msgid "These functions are available in glibc since version 2.1."
7710 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7711
7712 #. type: Plain text
7713 #: build/C/man3/pthread_setconcurrency.3:87
7714 msgid "The default concurrency level is 0."
7715 msgstr "デフォルトの concurrency level は 0 である。"
7716
7717 #. type: Plain text
7718 #: build/C/man3/pthread_setconcurrency.3:94
7719 msgid ""
7720 "Concurrency levels are meaningful only for M:N threading implementations, "
7721 "where at any moment a subset of a process's set of user-level threads may be "
7722 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7723 "concurrency level allows the application to give the system a hint as to the "
7724 "number of kernel-scheduling entities that should be provided for efficient "
7725 "execution of the application."
7726 msgstr ""
7727 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7728 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7729 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7730 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7731 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7732 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7733 "ムに伝えることができる。"
7734
7735 #. type: Plain text
7736 #: build/C/man3/pthread_setconcurrency.3:100
7737 msgid ""
7738 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7739 "concurrency level has no meaning.  In other words, on Linux these functions "
7740 "merely exist for compatibility with other systems, and they have no effect "
7741 "on the execution of a program."
7742 msgstr ""
7743 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7744 "並列処理レベルを設定しても何の意味もない。\n"
7745 "言い換えると、 Linux では、これらの関数は、\n"
7746 "他のシステムとの互換性のためだけに存在し、\n"
7747 "プログラムの実行には何の影響も与えないということである。"
7748
7749 #. type: Plain text
7750 #: build/C/man3/pthread_setconcurrency.3:103
7751 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7752 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7753
7754 #. type: TH
7755 #: build/C/man3/pthread_setname_np.3:26
7756 #, no-wrap
7757 msgid "PTHREAD_SETNAME_NP"
7758 msgstr "PTHREAD_SETNAME_NP"
7759
7760 #. type: Plain text
7761 #: build/C/man3/pthread_setname_np.3:29
7762 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7763 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
7764
7765 #. type: Plain text
7766 #: build/C/man3/pthread_setname_np.3:36
7767 #, no-wrap
7768 msgid ""
7769 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7770 "B<#include E<lt>pthread.hE<gt>>\n"
7771 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7772 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7773 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7774 msgstr ""
7775 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7776 "B<#include E<lt>pthread.hE<gt>>\n"
7777 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7778 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7779 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7780
7781 #. type: Plain text
7782 #: build/C/man3/pthread_setname_np.3:55
7783 msgid ""
7784 "By default, all the threads created using B<pthread_create>()  inherit the "
7785 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7786 "unique name for a thread, which can be useful for debugging multithreaded "
7787 "applications.  The thread name is a meaningful C language string, whose "
7788 "length is restricted to 16 characters, including the terminating null byte "
7789 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
7790 "to be changed; I<name> specifies the new name."
7791 msgstr ""
7792 "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム"
7793 "名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定"
7794 "することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデ"
7795 "バッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さ"
7796 "は 16 文字に限定されており、 終端の NULL バイト (\\(aq\\e0\\(aq) も 16 文字に"
7797 "含まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には"
7798 "新しい名前を指定する。"
7799
7800 #. type: Plain text
7801 #: build/C/man3/pthread_setname_np.3:72
7802 msgid ""
7803 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7804 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7805 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7806 "specifies the number of bytes available in I<name>.  The buffer specified by "
7807 "I<name> should be at least 16 characters in length.  The returned thread "
7808 "name in the output buffer will be null terminated."
7809 msgstr ""
7810 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
7811 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
7812 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
7813 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
7814 "出力バッファに返されたスレッド名は NULL 終端される。"
7815
7816 #. type: Plain text
7817 #: build/C/man3/pthread_setname_np.3:79
7818 msgid ""
7819 "The B<pthread_setname_np>()  function can fail with the following error:"
7820 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7821
7822 #. type: TP
7823 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7824 #, no-wrap
7825 msgid "B<ERANGE>"
7826 msgstr "B<ERANGE>"
7827
7828 #. type: Plain text
7829 #: build/C/man3/pthread_setname_np.3:84
7830 msgid ""
7831 "The length of the string specified pointed to by I<name> exceeds the allowed "
7832 "limit."
7833 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
7834
7835 #. type: Plain text
7836 #: build/C/man3/pthread_setname_np.3:88
7837 msgid ""
7838 "The B<pthread_getname_np>()  function can fail with the following error:"
7839 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7840
7841 #. type: Plain text
7842 #: build/C/man3/pthread_setname_np.3:95
7843 msgid ""
7844 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7845 "name."
7846 msgstr ""
7847 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
7848 "る。"
7849
7850 #. type: Plain text
7851 #: build/C/man3/pthread_setname_np.3:100
7852 msgid ""
7853 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7854 "then the call may fail with one of the errors described in B<open>(2)."
7855 msgstr ""
7856 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
7857 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
7858
7859 #. type: Plain text
7860 #: build/C/man3/pthread_setname_np.3:102
7861 msgid "These functions first appeared in glibc in version 2.12."
7862 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7863
7864 #. type: Plain text
7865 #: build/C/man3/pthread_setname_np.3:104
7866 msgid "These functions are nonstandard GNU extensions."
7867 msgstr "これらの関数は非標準の GNU による拡張である。"
7868
7869 #. type: Plain text
7870 #: build/C/man3/pthread_setname_np.3:114
7871 #, fuzzy
7872 #| msgid ""
7873 #| "B<pthread_setname_np>()  internally writes to the thread specific comm "
7874 #| "file under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7875 #| "B<pthread_getname_np>()  retrieves it from the same location."
7876 msgid ""
7877 "B<pthread_setname_np>()  internally writes to the thread-specific I<comm> "
7878 "file under the I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7879 "B<pthread_getname_np>()  retrieves it from the same location."
7880 msgstr ""
7881 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
7882 "comm ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
7883 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
7884
7885 #. type: Plain text
7886 #: build/C/man3/pthread_setname_np.3:120
7887 msgid ""
7888 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7889 "B<pthread_getname_np>()."
7890 msgstr ""
7891 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7892 "の使用例を示している。"
7893
7894 #. type: Plain text
7895 #: build/C/man3/pthread_setname_np.3:122
7896 msgid "The following shell session shows a sample run of the program:"
7897 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7898
7899 #. type: Plain text
7900 #: build/C/man3/pthread_setname_np.3:138
7901 #, no-wrap
7902 msgid ""
7903 "$B< ./a.out>\n"
7904 "Created a thread. Default name is: a.out\n"
7905 "The thread name after setting it is THREADFOO.\n"
7906 "B<^Z>                           # Suspend the program\n"
7907 "[1]+  Stopped           ./a.out\n"
7908 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7909 "  PID   TID CMD                         COMMAND\n"
7910 " 5990  5990 ./a.out                     a.out\n"
7911 " 5990  5991 ./a.out                     THREADFOO\n"
7912 "$ B<cat /proc/5990/task/5990/comm>\n"
7913 "a.out\n"
7914 "$ B<cat /proc/5990/task/5991/comm>\n"
7915 "THREADFOO\n"
7916 msgstr ""
7917 "$B< ./a.out>\n"
7918 "Created a thread. Default name is: a.out\n"
7919 "The thread name after setting it is THREADFOO.\n"
7920 "B<^Z>                           # Suspend the program\n"
7921 "[1]+  Stopped           ./a.out\n"
7922 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7923 "  PID   TID CMD                         COMMAND\n"
7924 " 5990  5990 ./a.out                     a.out\n"
7925 " 5990  5991 ./a.out                     THREADFOO\n"
7926 "$ B<cat /proc/5990/task/5990/comm>\n"
7927 "a.out\n"
7928 "$ B<cat /proc/5990/task/5991/comm>\n"
7929 "THREADFOO\n"
7930
7931 #. type: Plain text
7932 #: build/C/man3/pthread_setname_np.3:150
7933 #, no-wrap
7934 msgid ""
7935 "#define _GNU_SOURCE\n"
7936 "#include E<lt>pthread.hE<gt>\n"
7937 "#include E<lt>stdio.hE<gt>\n"
7938 "#include E<lt>string.hE<gt>\n"
7939 "#include E<lt>unistd.hE<gt>\n"
7940 "#include E<lt>errno.hE<gt>\n"
7941 "#include E<lt>stdlib.hE<gt>\n"
7942 msgstr ""
7943 "#define _GNU_SOURCE\n"
7944 "#include E<lt>pthread.hE<gt>\n"
7945 "#include E<lt>stdio.hE<gt>\n"
7946 "#include E<lt>string.hE<gt>\n"
7947 "#include E<lt>unistd.hE<gt>\n"
7948 "#include E<lt>errno.hE<gt>\n"
7949 "#include E<lt>stdlib.hE<gt>\n"
7950
7951 #. type: Plain text
7952 #: build/C/man3/pthread_setname_np.3:152
7953 #, no-wrap
7954 msgid "#define NAMELEN 16\n"
7955 msgstr "#define NAMELEN 16\n"
7956
7957 #. type: Plain text
7958 #: build/C/man3/pthread_setname_np.3:156
7959 #, no-wrap
7960 msgid ""
7961 "#define errExitEN(en, msg) \\e\n"
7962 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7963 "        } while (0)\n"
7964 msgstr ""
7965 "#define errExitEN(en, msg) \\e\n"
7966 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7967 "        } while (0)\n"
7968
7969 #. type: Plain text
7970 #: build/C/man3/pthread_setname_np.3:163
7971 #, no-wrap
7972 msgid ""
7973 "static void *\n"
7974 "threadfunc(void *parm)\n"
7975 "{\n"
7976 "    sleep(5);          // allow main program to set the thread name\n"
7977 "    return NULL;\n"
7978 "}\n"
7979 msgstr ""
7980 "static void *\n"
7981 "threadfunc(void *parm)\n"
7982 "{\n"
7983 "    sleep(5);          // allow main program to set the thread name\n"
7984 "    return NULL;\n"
7985 "}\n"
7986
7987 #. type: Plain text
7988 #: build/C/man3/pthread_setname_np.3:170
7989 #, no-wrap
7990 msgid ""
7991 "int\n"
7992 "main(int argc, char **argv)\n"
7993 "{\n"
7994 "    pthread_t thread;\n"
7995 "    int rc;\n"
7996 "    char thread_name[NAMELEN];\n"
7997 msgstr ""
7998 "int\n"
7999 "main(int argc, char **argv)\n"
8000 "{\n"
8001 "    pthread_t thread;\n"
8002 "    int rc;\n"
8003 "    char thread_name[NAMELEN];\n"
8004
8005 #. type: Plain text
8006 #: build/C/man3/pthread_setname_np.3:174
8007 #, no-wrap
8008 msgid ""
8009 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8010 "    if (rc != 0)\n"
8011 "        errExitEN(rc, \"pthread_create\");\n"
8012 msgstr ""
8013 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
8014 "    if (rc != 0)\n"
8015 "        errExitEN(rc, \"pthread_create\");\n"
8016
8017 #. type: Plain text
8018 #: build/C/man3/pthread_setname_np.3:178
8019 #, no-wrap
8020 msgid ""
8021 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8022 "    if (rc != 0)\n"
8023 "        errExitEN(rc, \"pthread_getname_np\");\n"
8024 msgstr ""
8025 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
8026 "    if (rc != 0)\n"
8027 "        errExitEN(rc, \"pthread_getname_np\");\n"
8028
8029 #. type: Plain text
8030 #: build/C/man3/pthread_setname_np.3:183
8031 #, no-wrap
8032 msgid ""
8033 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8034 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8035 "    if (rc != 0)\n"
8036 "        errExitEN(rc, \"pthread_setname_np\");\n"
8037 msgstr ""
8038 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
8039 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
8040 "    if (rc != 0)\n"
8041 "        errExitEN(rc, \"pthread_setname_np\");\n"
8042
8043 #. type: Plain text
8044 #: build/C/man3/pthread_setname_np.3:185
8045 #, no-wrap
8046 msgid "    sleep(2);\n"
8047 msgstr "    sleep(2);\n"
8048
8049 #. type: Plain text
8050 #: build/C/man3/pthread_setname_np.3:191
8051 #, no-wrap
8052 msgid ""
8053 "    rc = pthread_getname_np(thread, thread_name,\n"
8054 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8055 "    if (rc != 0)\n"
8056 "        errExitEN(rc, \"pthread_getname_np\");\n"
8057 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8058 msgstr ""
8059 "    rc = pthread_getname_np(thread, thread_name,\n"
8060 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8061 "    if (rc != 0)\n"
8062 "        errExitEN(rc, \"pthread_getname_np\");\n"
8063 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8064
8065 #. type: Plain text
8066 #: build/C/man3/pthread_setname_np.3:195
8067 #, no-wrap
8068 msgid ""
8069 "    rc = pthread_join(thread, NULL);\n"
8070 "    if (rc != 0)\n"
8071 "        errExitEN(rc, \"pthread_join\");\n"
8072 msgstr ""
8073 "    rc = pthread_join(thread, NULL);\n"
8074 "    if (rc != 0)\n"
8075 "        errExitEN(rc, \"pthread_join\");\n"
8076
8077 #. type: Plain text
8078 #: build/C/man3/pthread_setname_np.3:199
8079 #, no-wrap
8080 msgid ""
8081 "    printf(\"Done\\en\");\n"
8082 "    exit(EXIT_SUCCESS);\n"
8083 "}\n"
8084 msgstr ""
8085 "    printf(\"Done\\en\");\n"
8086 "    exit(EXIT_SUCCESS);\n"
8087 "}\n"
8088
8089 #. type: Plain text
8090 #: build/C/man3/pthread_setname_np.3:206
8091 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8092 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8093
8094 #. type: TH
8095 #: build/C/man3/pthread_setschedparam.3:26
8096 #, no-wrap
8097 msgid "PTHREAD_SETSCHEDPARAM"
8098 msgstr "PTHREAD_SETSCHEDPARAM"
8099
8100 #. type: Plain text
8101 #: build/C/man3/pthread_setschedparam.3:30
8102 msgid ""
8103 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8104 "parameters of a thread"
8105 msgstr ""
8106 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8107 "スケジューリングポリシーとパラメータを設定/取得する"
8108
8109 #. type: Plain text
8110 #: build/C/man3/pthread_setschedparam.3:38
8111 #, no-wrap
8112 msgid ""
8113 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8114 "B<                      const struct sched_param *>I<param>B<);>\n"
8115 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8116 "B<                      struct sched_param *>I<param>B<);>\n"
8117 msgstr ""
8118 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8119 "B<                      const struct sched_param *>I<param>B<);>\n"
8120 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8121 "B<                      struct sched_param *>I<param>B<);>\n"
8122
8123 #. type: Plain text
8124 #: build/C/man3/pthread_setschedparam.3:46
8125 msgid ""
8126 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8127 "parameters of the thread I<thread>."
8128 msgstr ""
8129 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8130 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8131
8132 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8133 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8134 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8135 #. type: Plain text
8136 #: build/C/man3/pthread_setschedparam.3:57
8137 msgid ""
8138 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8139 "values for I<policy>, and their semantics, are described in "
8140 "B<sched_setscheduler>(2)."
8141 msgstr ""
8142 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8143 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8144 "説明されている。"
8145
8146 #. type: Plain text
8147 #: build/C/man3/pthread_setschedparam.3:63
8148 msgid ""
8149 "The structure pointed to by I<param> specifies the new scheduling parameters "
8150 "for I<thread>.  Scheduling parameters are maintained in the following "
8151 "structure:"
8152 msgstr ""
8153 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8154 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8155
8156 #.  FIXME . nptl/pthread_setschedparam.c has the following
8157 #.    /* If the thread should have higher priority because of some
8158 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8159 #.  Eventually (perhaps after writing the mutexattr pages), we
8160 #.  may want to add something on the topic to this page.
8161 #. type: Plain text
8162 #: build/C/man3/pthread_setschedparam.3:104
8163 msgid ""
8164 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8165 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8166 "and I<param>, respectively.  The returned priority value is that set by the "
8167 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8168 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8169 "does not reflect any temporary priority adjustments as a result of calls to "
8170 "any priority inheritance or priority ceiling functions (see, for example, "
8171 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8172 "(3))."
8173 msgstr ""
8174 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8175 "スケジューリングポリシーとパラメータを、\n"
8176 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8177 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8178 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8179 "B<pthread_create> で設定された値となる。\n"
8180 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8181 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8182 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8183 "行われる一時的な優先度の調整の影響を受けない。"
8184
8185 #. type: Plain text
8186 #: build/C/man3/pthread_setschedparam.3:112
8187 msgid ""
8188 "On success, these functions return 0; on error, they return a nonzero error "
8189 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8190 "parameters of I<thread> are not changed."
8191 msgstr ""
8192 "成功すると、これらの関数は 0 を返す。\n"
8193 "エラーの場合、0 以外のエラー番号を返す。\n"
8194 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8195 "スケジューリングポリシーとパラメータは変更されない。"
8196
8197 #. type: Plain text
8198 #: build/C/man3/pthread_setschedparam.3:114
8199 msgid "Both of these functions can fail with the following error:"
8200 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8201
8202 #. type: Plain text
8203 #: build/C/man3/pthread_setschedparam.3:122
8204 msgid ""
8205 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8206 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8207
8208 #. type: Plain text
8209 #: build/C/man3/pthread_setschedparam.3:129
8210 msgid ""
8211 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8212 "the I<policy>."
8213 msgstr ""
8214 "I<policy> が認識できないポリシーであるか、\n"
8215 "I<param> が I<policy> では意味を持たない値である。"
8216
8217 #. type: Plain text
8218 #: build/C/man3/pthread_setschedparam.3:133
8219 msgid ""
8220 "The caller does not have appropriate privileges to set the specified "
8221 "scheduling policy and parameters."
8222 msgstr ""
8223 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8224 "のに必要な特権を持たない。"
8225
8226 #.  .SH VERSIONS
8227 #.  Available since glibc 2.0
8228 #. type: Plain text
8229 #: build/C/man3/pthread_setschedparam.3:141
8230 msgid ""
8231 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8232 "policy or scheduling parameters to an unsupported value\") error for "
8233 "B<pthread_setschedparam>()."
8234 msgstr ""
8235 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8236 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8237 "パラメータに設定しようとした\") も追加で規定されている。"
8238
8239 #. type: Plain text
8240 #: build/C/man3/pthread_setschedparam.3:149
8241 msgid ""
8242 "For a description of the permissions required to, and the effect of, "
8243 "changing a thread's scheduling policy and priority, and details of the "
8244 "permitted ranges for priorities in each scheduling policy, see "
8245 "B<sched_setscheduler>(2)."
8246 msgstr ""
8247 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8248 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8249 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8250
8251 #. type: Plain text
8252 #: build/C/man3/pthread_setschedparam.3:156
8253 msgid ""
8254 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8255 "B<pthread_getschedparam>(), as well as the use of a number of other "
8256 "scheduling-related pthreads functions."
8257 msgstr ""
8258 "以下のプログラムは B<pthread_setschedparam>() と\n"
8259 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8260 "他のいろいろな関数の使用例を示すものである。"
8261
8262 #. type: Plain text
8263 #: build/C/man3/pthread_setschedparam.3:172
8264 msgid ""
8265 "In the following run, the main thread sets its scheduling policy to "
8266 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8267 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8268 "priority attribute of 20.  The program then sets (using "
8269 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8270 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8271 "created using this attributes object should take their scheduling attributes "
8272 "from the thread attributes object.  The program then creates a thread using "
8273 "the thread attributes object, and that thread displays its scheduling policy "
8274 "and priority."
8275 msgstr ""
8276 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8277 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8278 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8279 "属性 20 で初期化する。\n"
8280 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8281 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8282 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8283 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8284 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8285 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8286 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8287
8288 #. type: Plain text
8289 #: build/C/man3/pthread_setschedparam.3:180
8290 #, no-wrap
8291 msgid ""
8292 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8293 "Password:\n"
8294 "# B<./a.out -mf10 -ar20 -i e>\n"
8295 "Scheduler settings of main thread\n"
8296 "    policy=SCHED_FIFO, priority=10\n"
8297 msgstr ""
8298 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8299 "Password:\n"
8300 "# B<./a.out -mf10 -ar20 -i e>\n"
8301 "Scheduler settings of main thread\n"
8302 "    policy=SCHED_FIFO, priority=10\n"
8303
8304 #. type: Plain text
8305 #: build/C/man3/pthread_setschedparam.3:184
8306 #, no-wrap
8307 msgid ""
8308 "Scheduler settings in \\(aqattr\\(aq\n"
8309 "    policy=SCHED_RR, priority=20\n"
8310 "    inheritsched is EXPLICIT\n"
8311 msgstr ""
8312 "Scheduler settings in \\(aqattr\\(aq\n"
8313 "    policy=SCHED_RR, priority=20\n"
8314 "    inheritsched is EXPLICIT\n"
8315
8316 #. type: Plain text
8317 #: build/C/man3/pthread_setschedparam.3:187
8318 #, no-wrap
8319 msgid ""
8320 "Scheduler attributes of new thread\n"
8321 "    policy=SCHED_RR, priority=20\n"
8322 msgstr ""
8323 "Scheduler attributes of new thread\n"
8324 "    policy=SCHED_RR, priority=20\n"
8325
8326 #. type: Plain text
8327 #: build/C/man3/pthread_setschedparam.3:192
8328 msgid ""
8329 "In the above output, one can see that the scheduling policy and priority "
8330 "were taken from the values specified in the thread attributes object."
8331 msgstr ""
8332 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8333 "オブジェクトで指定された値から取られていることが分かる。"
8334
8335 #. type: Plain text
8336 #: build/C/man3/pthread_setschedparam.3:199
8337 msgid ""
8338 "The next run is the same as the previous, except that the inherit scheduler "
8339 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8340 "using the thread attributes object should ignore the scheduling attributes "
8341 "specified in the attributes object and instead take their scheduling "
8342 "attributes from the creating thread."
8343 msgstr ""
8344 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8345 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8346 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8347 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8348 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8349 "ことを意味する。"
8350
8351 #. type: Plain text
8352 #: build/C/man3/pthread_setschedparam.3:205
8353 #, no-wrap
8354 msgid ""
8355 "# B<./a.out -mf10 -ar20 -i i>\n"
8356 "Scheduler settings of main thread\n"
8357 "    policy=SCHED_FIFO, priority=10\n"
8358 msgstr ""
8359 "# B<./a.out -mf10 -ar20 -i i>\n"
8360 "Scheduler settings of main thread\n"
8361 "    policy=SCHED_FIFO, priority=10\n"
8362
8363 #. type: Plain text
8364 #: build/C/man3/pthread_setschedparam.3:209
8365 #, no-wrap
8366 msgid ""
8367 "Scheduler settings in \\(aqattr\\(aq\n"
8368 "    policy=SCHED_RR, priority=20\n"
8369 "    inheritsched is INHERIT\n"
8370 msgstr ""
8371 "Scheduler settings in \\(aqattr\\(aq\n"
8372 "    policy=SCHED_RR, priority=20\n"
8373 "    inheritsched is INHERIT\n"
8374
8375 #. type: Plain text
8376 #: build/C/man3/pthread_setschedparam.3:212
8377 #, no-wrap
8378 msgid ""
8379 "Scheduler attributes of new thread\n"
8380 "    policy=SCHED_FIFO, priority=10\n"
8381 msgstr ""
8382 "Scheduler attributes of new thread\n"
8383 "    policy=SCHED_FIFO, priority=10\n"
8384
8385 #. type: Plain text
8386 #: build/C/man3/pthread_setschedparam.3:218
8387 msgid ""
8388 "In the above output, one can see that the scheduling policy and priority "
8389 "were taken from the creating thread, rather than the thread attributes "
8390 "object."
8391 msgstr ""
8392 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8393 "スレッド属性オブジェクトからではなく、\n"
8394 "スレッドを作成したスレッドから取れれていることが分かる。"
8395
8396 #. type: Plain text
8397 #: build/C/man3/pthread_setschedparam.3:224
8398 msgid ""
8399 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8400 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8401 "scheduler attribute."
8402 msgstr ""
8403 "なお、 I<-i\\ i> を省略した場合でも、\n"
8404 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8405 "出力は同じになる。"
8406
8407 #. type: Plain text
8408 #: build/C/man3/pthread_setschedparam.3:228
8409 #, no-wrap
8410 msgid "/* pthreads_sched_test.c */\n"
8411 msgstr "/* pthreads_sched_test.c */\n"
8412
8413 #. type: Plain text
8414 #: build/C/man3/pthread_setschedparam.3:234
8415 #, no-wrap
8416 msgid ""
8417 "#include E<lt>pthread.hE<gt>\n"
8418 "#include E<lt>stdio.hE<gt>\n"
8419 "#include E<lt>stdlib.hE<gt>\n"
8420 "#include E<lt>unistd.hE<gt>\n"
8421 "#include E<lt>errno.hE<gt>\n"
8422 msgstr ""
8423 "#include E<lt>pthread.hE<gt>\n"
8424 "#include E<lt>stdio.hE<gt>\n"
8425 "#include E<lt>stdlib.hE<gt>\n"
8426 "#include E<lt>unistd.hE<gt>\n"
8427 "#include E<lt>errno.hE<gt>\n"
8428
8429 #. type: Plain text
8430 #: build/C/man3/pthread_setschedparam.3:243
8431 #, no-wrap
8432 msgid ""
8433 "static void\n"
8434 "usage(char *prog_name, char *msg)\n"
8435 "{\n"
8436 "    if (msg != NULL)\n"
8437 "        fputs(msg, stderr);\n"
8438 msgstr ""
8439 "static void\n"
8440 "usage(char *prog_name, char *msg)\n"
8441 "{\n"
8442 "    if (msg != NULL)\n"
8443 "        fputs(msg, stderr);\n"
8444
8445 #. type: Plain text
8446 #: build/C/man3/pthread_setschedparam.3:260
8447 #, no-wrap
8448 msgid ""
8449 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8450 "    fprintf(stderr, \"Options are:\\en\");\n"
8451 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8452 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8453 "    fpe(\"                 thread attributes object\\en\");\n"
8454 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8455 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8456 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8457 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8458 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8459 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8460 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8461 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8462 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8463 "    exit(EXIT_FAILURE);\n"
8464 "}\n"
8465 msgstr ""
8466 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8467 "    fprintf(stderr, \"Options are:\\en\");\n"
8468 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8469 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8470 "    fpe(\"                 thread attributes object\\en\");\n"
8471 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8472 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8473 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8474 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8475 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8476 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8477 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8478 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8479 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8480 "    exit(EXIT_FAILURE);\n"
8481 "}\n"
8482
8483 #. type: Plain text
8484 #: build/C/man3/pthread_setschedparam.3:271
8485 #, no-wrap
8486 msgid ""
8487 "static int\n"
8488 "get_policy(char p, int *policy)\n"
8489 "{\n"
8490 "    switch (p) {\n"
8491 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8492 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8493 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8494 "    default:  return 0;\n"
8495 "    }\n"
8496 "}\n"
8497 msgstr ""
8498 "static int\n"
8499 "get_policy(char p, int *policy)\n"
8500 "{\n"
8501 "    switch (p) {\n"
8502 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8503 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8504 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8505 "    default:  return 0;\n"
8506 "    }\n"
8507 "}\n"
8508
8509 #. type: Plain text
8510 #: build/C/man3/pthread_setschedparam.3:282
8511 #, no-wrap
8512 msgid ""
8513 "static void\n"
8514 "display_sched_attr(int policy, struct sched_param *param)\n"
8515 "{\n"
8516 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8517 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8518 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8519 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8520 "            \"???\",\n"
8521 "            param-E<gt>sched_priority);\n"
8522 "}\n"
8523 msgstr ""
8524 "static void\n"
8525 "display_sched_attr(int policy, struct sched_param *param)\n"
8526 "{\n"
8527 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8528 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8529 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8530 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8531 "            \"???\",\n"
8532 "            param-E<gt>sched_priority);\n"
8533 "}\n"
8534
8535 #. type: Plain text
8536 #: build/C/man3/pthread_setschedparam.3:288
8537 #, no-wrap
8538 msgid ""
8539 "static void\n"
8540 "display_thread_sched_attr(char *msg)\n"
8541 "{\n"
8542 "    int policy, s;\n"
8543 "    struct sched_param param;\n"
8544 msgstr ""
8545 "static void\n"
8546 "display_thread_sched_attr(char *msg)\n"
8547 "{\n"
8548 "    int policy, s;\n"
8549 "    struct sched_param param;\n"
8550
8551 #. type: Plain text
8552 #: build/C/man3/pthread_setschedparam.3:292
8553 #, no-wrap
8554 msgid ""
8555 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8556 "    if (s != 0)\n"
8557 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8558 msgstr ""
8559 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8560 "    if (s != 0)\n"
8561 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8562
8563 #. type: Plain text
8564 #: build/C/man3/pthread_setschedparam.3:296
8565 #, no-wrap
8566 msgid ""
8567 "    printf(\"%s\\en\", msg);\n"
8568 "    display_sched_attr(policy, &param);\n"
8569 "}\n"
8570 msgstr ""
8571 "    printf(\"%s\\en\", msg);\n"
8572 "    display_sched_attr(policy, &param);\n"
8573 "}\n"
8574
8575 #. type: Plain text
8576 #: build/C/man3/pthread_setschedparam.3:301
8577 #, no-wrap
8578 msgid ""
8579 "static void *\n"
8580 "thread_start(void *arg)\n"
8581 "{\n"
8582 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8583 msgstr ""
8584 "static void *\n"
8585 "thread_start(void *arg)\n"
8586 "{\n"
8587 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8588
8589 #. type: Plain text
8590 #: build/C/man3/pthread_setschedparam.3:304
8591 #, no-wrap
8592 msgid ""
8593 "    return NULL;\n"
8594 "}\n"
8595 msgstr ""
8596 "    return NULL;\n"
8597 "}\n"
8598
8599 #. type: Plain text
8600 #: build/C/man3/pthread_setschedparam.3:314
8601 #, no-wrap
8602 msgid ""
8603 "int\n"
8604 "main(int argc, char *argv[])\n"
8605 "{\n"
8606 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8607 "    pthread_t thread;\n"
8608 "    pthread_attr_t attr;\n"
8609 "    pthread_attr_t *attrp;\n"
8610 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8611 "    struct sched_param param;\n"
8612 msgstr ""
8613 "int\n"
8614 "main(int argc, char *argv[])\n"
8615 "{\n"
8616 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8617 "    pthread_t thread;\n"
8618 "    pthread_attr_t attr;\n"
8619 "    pthread_attr_t *attrp;\n"
8620 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8621 "    struct sched_param param;\n"
8622
8623 #. type: Plain text
8624 #: build/C/man3/pthread_setschedparam.3:316
8625 #, no-wrap
8626 msgid "    /* Process command-line options */\n"
8627 msgstr "    /* Process command-line options */\n"
8628
8629 #. type: Plain text
8630 #: build/C/man3/pthread_setschedparam.3:321
8631 #, no-wrap
8632 msgid ""
8633 "    use_null_attrib = 0;\n"
8634 "    attr_sched_str = NULL;\n"
8635 "    main_sched_str = NULL;\n"
8636 "    inheritsched_str = NULL;\n"
8637 msgstr ""
8638 "    use_null_attrib = 0;\n"
8639 "    attr_sched_str = NULL;\n"
8640 "    main_sched_str = NULL;\n"
8641 "    inheritsched_str = NULL;\n"
8642
8643 #. type: Plain text
8644 #: build/C/man3/pthread_setschedparam.3:331
8645 #, no-wrap
8646 msgid ""
8647 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8648 "        switch (opt) {\n"
8649 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8650 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8651 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8652 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8653 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8654 "        }\n"
8655 "    }\n"
8656 msgstr ""
8657 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8658 "        switch (opt) {\n"
8659 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8660 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8661 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8662 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8663 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8664 "        }\n"
8665 "    }\n"
8666
8667 #. type: Plain text
8668 #: build/C/man3/pthread_setschedparam.3:335
8669 #, no-wrap
8670 msgid ""
8671 "    if (use_null_attrib &&\n"
8672 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8673 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8674 msgstr ""
8675 "    if (use_null_attrib &&\n"
8676 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8677 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8678
8679 #. type: Plain text
8680 #: build/C/man3/pthread_setschedparam.3:338
8681 #, no-wrap
8682 msgid ""
8683 "    /* Optionally set scheduling attributes of main thread,\n"
8684 "       and display the attributes */\n"
8685 msgstr ""
8686 "    /* Optionally set scheduling attributes of main thread,\n"
8687 "       and display the attributes */\n"
8688
8689 #. type: Plain text
8690 #: build/C/man3/pthread_setschedparam.3:343
8691 #, no-wrap
8692 msgid ""
8693 "    if (main_sched_str != NULL) {\n"
8694 "        if (!get_policy(main_sched_str[0], &policy))\n"
8695 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8696 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8697 msgstr ""
8698 "    if (main_sched_str != NULL) {\n"
8699 "        if (!get_policy(main_sched_str[0], &policy))\n"
8700 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8701 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8702
8703 #. type: Plain text
8704 #: build/C/man3/pthread_setschedparam.3:348
8705 #, no-wrap
8706 msgid ""
8707 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8708 "        if (s != 0)\n"
8709 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8710 "    }\n"
8711 msgstr ""
8712 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8713 "        if (s != 0)\n"
8714 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8715 "    }\n"
8716
8717 #. type: Plain text
8718 #: build/C/man3/pthread_setschedparam.3:351
8719 #, no-wrap
8720 msgid ""
8721 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8722 "    printf(\"\\en\");\n"
8723 msgstr ""
8724 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8725 "    printf(\"\\en\");\n"
8726
8727 #. type: Plain text
8728 #: build/C/man3/pthread_setschedparam.3:353
8729 #, no-wrap
8730 msgid "    /* Initialize thread attributes object according to options */\n"
8731 msgstr "    /* Initialize thread attributes object according to options */\n"
8732
8733 #. type: Plain text
8734 #: build/C/man3/pthread_setschedparam.3:362
8735 #, no-wrap
8736 msgid ""
8737 "    if (!use_null_attrib) {\n"
8738 "        s = pthread_attr_init(&attr);\n"
8739 "        if (s != 0)\n"
8740 "            handle_error_en(s, \"pthread_attr_init\");\n"
8741 "        attrp = &attr;\n"
8742 "    }\n"
8743 msgstr ""
8744 "    if (!use_null_attrib) {\n"
8745 "        s = pthread_attr_init(&attr);\n"
8746 "        if (s != 0)\n"
8747 "            handle_error_en(s, \"pthread_attr_init\");\n"
8748 "        attrp = &attr;\n"
8749 "    }\n"
8750
8751 #. type: Plain text
8752 #: build/C/man3/pthread_setschedparam.3:370
8753 #, no-wrap
8754 msgid ""
8755 "    if (inheritsched_str != NULL) {\n"
8756 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8757 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8758 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8759 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8760 "        else\n"
8761 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8762 msgstr ""
8763 "    if (inheritsched_str != NULL) {\n"
8764 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8765 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8766 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8767 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8768 "        else\n"
8769 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8770
8771 #. type: Plain text
8772 #: build/C/man3/pthread_setschedparam.3:375
8773 #, no-wrap
8774 msgid ""
8775 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8776 "        if (s != 0)\n"
8777 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8778 "    }\n"
8779 msgstr ""
8780 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8781 "        if (s != 0)\n"
8782 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8783 "    }\n"
8784
8785 #. type: Plain text
8786 #: build/C/man3/pthread_setschedparam.3:381
8787 #, no-wrap
8788 msgid ""
8789 "    if (attr_sched_str != NULL) {\n"
8790 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8791 "            usage(argv[0],\n"
8792 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8793 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8794 msgstr ""
8795 "    if (attr_sched_str != NULL) {\n"
8796 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8797 "            usage(argv[0],\n"
8798 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8799 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8800
8801 #. type: Plain text
8802 #: build/C/man3/pthread_setschedparam.3:389
8803 #, no-wrap
8804 msgid ""
8805 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8806 "        if (s != 0)\n"
8807 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8808 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8809 "        if (s != 0)\n"
8810 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8811 "    }\n"
8812 msgstr ""
8813 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8814 "        if (s != 0)\n"
8815 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8816 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8817 "        if (s != 0)\n"
8818 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8819 "    }\n"
8820
8821 #. type: Plain text
8822 #: build/C/man3/pthread_setschedparam.3:392
8823 #, no-wrap
8824 msgid ""
8825 "    /* If we initialized a thread attributes object, display\n"
8826 "       the scheduling attributes that were set in the object */\n"
8827 msgstr ""
8828 "    /* If we initialized a thread attributes object, display\n"
8829 "       the scheduling attributes that were set in the object */\n"
8830
8831 #. type: Plain text
8832 #: build/C/man3/pthread_setschedparam.3:400
8833 #, no-wrap
8834 msgid ""
8835 "    if (attrp != NULL) {\n"
8836 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8837 "        if (s != 0)\n"
8838 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8839 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8840 "        if (s != 0)\n"
8841 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8842 msgstr ""
8843 "    if (attrp != NULL) {\n"
8844 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8845 "        if (s != 0)\n"
8846 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8847 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8848 "        if (s != 0)\n"
8849 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8850
8851 #. type: Plain text
8852 #: build/C/man3/pthread_setschedparam.3:403
8853 #, no-wrap
8854 msgid ""
8855 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8856 "        display_sched_attr(policy, &param);\n"
8857 msgstr ""
8858 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8859 "        display_sched_attr(policy, &param);\n"
8860
8861 #. type: Plain text
8862 #: build/C/man3/pthread_setschedparam.3:411
8863 #, no-wrap
8864 msgid ""
8865 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8866 "        printf(\"    inheritsched is %s\\en\",\n"
8867 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8868 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8869 "                \"???\");\n"
8870 "        printf(\"\\en\");\n"
8871 "    }\n"
8872 msgstr ""
8873 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8874 "        printf(\"    inheritsched is %s\\en\",\n"
8875 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8876 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8877 "                \"???\");\n"
8878 "        printf(\"\\en\");\n"
8879 "    }\n"
8880
8881 #. type: Plain text
8882 #: build/C/man3/pthread_setschedparam.3:413
8883 #, no-wrap
8884 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8885 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8886
8887 #. type: Plain text
8888 #: build/C/man3/pthread_setschedparam.3:417
8889 #, no-wrap
8890 msgid ""
8891 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8892 "    if (s != 0)\n"
8893 "        handle_error_en(s, \"pthread_create\");\n"
8894 msgstr ""
8895 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8896 "    if (s != 0)\n"
8897 "        handle_error_en(s, \"pthread_create\");\n"
8898
8899 #. type: Plain text
8900 #: build/C/man3/pthread_setschedparam.3:419
8901 #, no-wrap
8902 msgid "    /* Destroy unneeded thread attributes object */\n"
8903 msgstr "    /* Destroy unneeded thread attributes object */\n"
8904
8905 #. type: Plain text
8906 #: build/C/man3/pthread_setschedparam.3:427
8907 #, no-wrap
8908 msgid ""
8909 "    s = pthread_join(thread, NULL);\n"
8910 "    if (s != 0)\n"
8911 "        handle_error_en(s, \"pthread_join\");\n"
8912 msgstr ""
8913 "    s = pthread_join(thread, NULL);\n"
8914 "    if (s != 0)\n"
8915 "        handle_error_en(s, \"pthread_join\");\n"
8916
8917 #. type: Plain text
8918 #: build/C/man3/pthread_setschedparam.3:445
8919 msgid ""
8920 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8921 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8922 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8923 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8924 "B<pthreads>(7)"
8925 msgstr ""
8926 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8927 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8928 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8929 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8930 "B<pthreads>(7)"
8931
8932 #. type: TH
8933 #: build/C/man3/pthread_setschedprio.3:26
8934 #, no-wrap
8935 msgid "PTHREAD_SETSCHEDPRIO"
8936 msgstr "PTHREAD_SETSCHEDPRIO"
8937
8938 #. type: TH
8939 #: build/C/man3/pthread_setschedprio.3:26
8940 #, no-wrap
8941 msgid "2008-11-06"
8942 msgstr "2008-11-06"
8943
8944 #. type: Plain text
8945 #: build/C/man3/pthread_setschedprio.3:29
8946 msgid "pthread_setschedprio - set scheduling priority of a thread"
8947 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8948
8949 #. type: Plain text
8950 #: build/C/man3/pthread_setschedprio.3:34
8951 #, no-wrap
8952 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8953 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8954
8955 #.  FIXME . nptl/pthread_setschedprio.c has the following
8956 #.    /* If the thread should have higher priority because of some
8957 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8958 #.  Eventually (perhaps after writing the mutexattr pages), we
8959 #.  may want to add something on the topic to this page.
8960 #.  nptl/pthread_setschedparam.c has a similar case.
8961 #. type: Plain text
8962 #: build/C/man3/pthread_setschedprio.3:53
8963 msgid ""
8964 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8965 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8966 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8967 "of a thread.)"
8968 msgstr ""
8969 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8970 "優先度に I<prio> で指定された値を設定する\n"
8971 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8972 "と優先度の両方を変更する)。"
8973
8974 #. type: Plain text
8975 #: build/C/man3/pthread_setschedprio.3:61
8976 msgid ""
8977 "On success, this function returns 0; on error, it returns a nonzero error "
8978 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8979 "I<thread> is not changed."
8980 msgstr ""
8981 "成功すると、この関数は 0 を返す。\n"
8982 "エラーの場合、0 以外のエラー番号を返す。\n"
8983 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8984 "スケジューリング優先度は変更されない。"
8985
8986 #. type: Plain text
8987 #: build/C/man3/pthread_setschedprio.3:66
8988 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8989 msgstr ""
8990 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8991
8992 #. type: Plain text
8993 #: build/C/man3/pthread_setschedprio.3:70
8994 msgid ""
8995 "The caller does not have appropriate privileges to set the specified "
8996 "priority."
8997 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8998
8999 #. type: Plain text
9000 #: build/C/man3/pthread_setschedprio.3:81
9001 msgid ""
9002 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
9003 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
9004 msgstr ""
9005 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
9006 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
9007 "に設定しようとした\") も追加で規定されている。"
9008
9009 #. type: Plain text
9010 #: build/C/man3/pthread_setschedprio.3:83
9011 msgid "This function is available in glibc since version 2.3.4."
9012 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
9013
9014 #. type: Plain text
9015 #: build/C/man3/pthread_setschedprio.3:91
9016 msgid ""
9017 "For a description of the permissions required to, and the effect of, "
9018 "changing a thread's scheduling priority, and details of the permitted ranges "
9019 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
9020 msgstr ""
9021 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
9022 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
9023 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
9024
9025 #. type: Plain text
9026 #: build/C/man3/pthread_setschedprio.3:105
9027 msgid ""
9028 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9029 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9030 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9031 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9032 "B<pthreads>(7)"
9033 msgstr ""
9034 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
9035 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
9036 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
9037 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9038 "B<pthreads>(7)"
9039
9040 #. type: TH
9041 #: build/C/man3/pthread_sigmask.3:26
9042 #, no-wrap
9043 msgid "PTHREAD_SIGMASK"
9044 msgstr "PTHREAD_SIGMASK"
9045
9046 #. type: Plain text
9047 #: build/C/man3/pthread_sigmask.3:29
9048 msgid "pthread_sigmask - examine and change mask of blocked signals"
9049 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
9050
9051 #. type: Plain text
9052 #: build/C/man3/pthread_sigmask.3:35
9053 #, no-wrap
9054 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9055 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9056
9057 #. type: Plain text
9058 #: build/C/man3/pthread_sigmask.3:46
9059 #, fuzzy
9060 #| msgid "signal mask (B<pthread_sigmask>(3))"
9061 msgid "B<pthread_sigmask>():"
9062 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9063
9064 #. type: Plain text
9065 #: build/C/man3/pthread_sigmask.3:58
9066 msgid ""
9067 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9068 "difference that its use in multithreaded programs is explicitly specified by "
9069 "POSIX.1-2001.  Other differences are noted in this page."
9070 msgstr ""
9071 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9072 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9073 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9074
9075 #. type: Plain text
9076 #: build/C/man3/pthread_sigmask.3:61
9077 msgid ""
9078 "For a description of the arguments and operation of this function, see "
9079 "B<sigprocmask>(2)."
9080 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9081
9082 #. type: Plain text
9083 #: build/C/man3/pthread_sigmask.3:66
9084 msgid ""
9085 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9086 "number."
9087 msgstr ""
9088 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9089 "エラーの場合、エラー番号を返す。"
9090
9091 #. type: Plain text
9092 #: build/C/man3/pthread_sigmask.3:69
9093 msgid "See B<sigprocmask>(2)."
9094 msgstr "B<sigprocmask>(2) を参照。"
9095
9096 #. type: Plain text
9097 #: build/C/man3/pthread_sigmask.3:73
9098 msgid "A new thread inherits a copy of its creator's signal mask."
9099 msgstr ""
9100 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9101 "継承する。"
9102
9103 #. type: Plain text
9104 #: build/C/man3/pthread_sigmask.3:78
9105 msgid ""
9106 "The program below blocks some signals in the main thread, and then creates a "
9107 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9108 "shell session demonstrates its use:"
9109 msgstr ""
9110 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9111 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9112 "専用のスレッドを作成する。\n"
9113 "下記のシェルのセッションはその利用例を示したものである。"
9114
9115 #. type: Plain text
9116 #: build/C/man3/pthread_sigmask.3:89
9117 #, no-wrap
9118 msgid ""
9119 "$B< ./a.out &>\n"
9120 "[1] 5423\n"
9121 "$B< kill -QUIT %1>\n"
9122 "Signal handling thread got signal 3\n"
9123 "$B< kill -USR1 %1>\n"
9124 "Signal handling thread got signal 10\n"
9125 "$B< kill -TERM %1>\n"
9126 "[1]+  Terminated              ./a.out\n"
9127 msgstr ""
9128 "$B< ./a.out &>\n"
9129 "[1] 5423\n"
9130 "$B< kill -QUIT %1>\n"
9131 "Signal handling thread got signal 3\n"
9132 "$B< kill -USR1 %1>\n"
9133 "Signal handling thread got signal 10\n"
9134 "$B< kill -TERM %1>\n"
9135 "[1]+  Terminated              ./a.out\n"
9136
9137 #. type: Plain text
9138 #: build/C/man3/pthread_sigmask.3:100
9139 #, no-wrap
9140 msgid ""
9141 "#include E<lt>pthread.hE<gt>\n"
9142 "#include E<lt>stdio.hE<gt>\n"
9143 "#include E<lt>stdlib.hE<gt>\n"
9144 "#include E<lt>unistd.hE<gt>\n"
9145 "#include E<lt>signal.hE<gt>\n"
9146 "#include E<lt>errno.hE<gt>\n"
9147 msgstr ""
9148 "#include E<lt>pthread.hE<gt>\n"
9149 "#include E<lt>stdio.hE<gt>\n"
9150 "#include E<lt>stdlib.hE<gt>\n"
9151 "#include E<lt>unistd.hE<gt>\n"
9152 "#include E<lt>signal.hE<gt>\n"
9153 "#include E<lt>errno.hE<gt>\n"
9154
9155 #. type: Plain text
9156 #: build/C/man3/pthread_sigmask.3:102
9157 #, no-wrap
9158 msgid "/* Simple error handling functions */\n"
9159 msgstr "/* Simple error handling functions */\n"
9160
9161 #. type: Plain text
9162 #: build/C/man3/pthread_sigmask.3:111
9163 #, no-wrap
9164 msgid ""
9165 "static void *\n"
9166 "sig_thread(void *arg)\n"
9167 "{\n"
9168 "    sigset_t *set = arg;\n"
9169 "    int s, sig;\n"
9170 msgstr ""
9171 "static void *\n"
9172 "sig_thread(void *arg)\n"
9173 "{\n"
9174 "    sigset_t *set = arg;\n"
9175 "    int s, sig;\n"
9176
9177 #. type: Plain text
9178 #: build/C/man3/pthread_sigmask.3:119
9179 #, no-wrap
9180 msgid ""
9181 "    for (;;) {\n"
9182 "        s = sigwait(set, &sig);\n"
9183 "        if (s != 0)\n"
9184 "            handle_error_en(s, \"sigwait\");\n"
9185 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9186 "    }\n"
9187 "}\n"
9188 msgstr ""
9189 "    for (;;) {\n"
9190 "        s = sigwait(set, &sig);\n"
9191 "        if (s != 0)\n"
9192 "            handle_error_en(s, \"sigwait\");\n"
9193 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9194 "    }\n"
9195 "}\n"
9196
9197 #. type: Plain text
9198 #: build/C/man3/pthread_sigmask.3:126
9199 #, no-wrap
9200 msgid ""
9201 "int\n"
9202 "main(int argc, char *argv[])\n"
9203 "{\n"
9204 "    pthread_t thread;\n"
9205 "    sigset_t set;\n"
9206 "    int s;\n"
9207 msgstr ""
9208 "int\n"
9209 "main(int argc, char *argv[])\n"
9210 "{\n"
9211 "    pthread_t thread;\n"
9212 "    sigset_t set;\n"
9213 "    int s;\n"
9214
9215 #. type: Plain text
9216 #: build/C/man3/pthread_sigmask.3:129
9217 #, no-wrap
9218 msgid ""
9219 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9220 "       will inherit a copy of the signal mask. */\n"
9221 msgstr ""
9222 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9223 "       will inherit a copy of the signal mask. */\n"
9224
9225 #. type: Plain text
9226 #: build/C/man3/pthread_sigmask.3:136
9227 #, no-wrap
9228 msgid ""
9229 "    sigemptyset(&set);\n"
9230 "    sigaddset(&set, SIGQUIT);\n"
9231 "    sigaddset(&set, SIGUSR1);\n"
9232 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9233 "    if (s != 0)\n"
9234 "        handle_error_en(s, \"pthread_sigmask\");\n"
9235 msgstr ""
9236 "    sigemptyset(&set);\n"
9237 "    sigaddset(&set, SIGQUIT);\n"
9238 "    sigaddset(&set, SIGUSR1);\n"
9239 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9240 "    if (s != 0)\n"
9241 "        handle_error_en(s, \"pthread_sigmask\");\n"
9242
9243 #. type: Plain text
9244 #: build/C/man3/pthread_sigmask.3:140
9245 #, no-wrap
9246 msgid ""
9247 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9248 "    if (s != 0)\n"
9249 "        handle_error_en(s, \"pthread_create\");\n"
9250 msgstr ""
9251 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9252 "    if (s != 0)\n"
9253 "        handle_error_en(s, \"pthread_create\");\n"
9254
9255 #. type: Plain text
9256 #: build/C/man3/pthread_sigmask.3:143
9257 #, no-wrap
9258 msgid ""
9259 "    /* Main thread carries on to create other threads and/or do\n"
9260 "       other work */\n"
9261 msgstr ""
9262 "    /* Main thread carries on to create other threads and/or do\n"
9263 "       other work */\n"
9264
9265 #. type: Plain text
9266 #: build/C/man3/pthread_sigmask.3:146
9267 #, no-wrap
9268 msgid ""
9269 "    pause();            /* Dummy pause so we can test program */\n"
9270 "}\n"
9271 msgstr ""
9272 "    pause();            /* Dummy pause so we can test program */\n"
9273 "}\n"
9274
9275 #. type: Plain text
9276 #: build/C/man3/pthread_sigmask.3:156
9277 msgid ""
9278 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9279 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9280 msgstr ""
9281 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9282 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9283
9284 #. type: TH
9285 #: build/C/man3/pthread_sigqueue.3:25
9286 #, no-wrap
9287 msgid "PTHREAD_SIGQUEUE"
9288 msgstr "PTHREAD_SIGQUEUE"
9289
9290 #. type: TH
9291 #: build/C/man3/pthread_sigqueue.3:25
9292 #, no-wrap
9293 msgid "2012-08-19"
9294 msgstr "2012-08-19"
9295
9296 #. type: Plain text
9297 #: build/C/man3/pthread_sigqueue.3:28
9298 msgid "pthread_sigqueue - queue a signal and data to a thread"
9299 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9300
9301 #. type: Plain text
9302 #: build/C/man3/pthread_sigqueue.3:34
9303 #, no-wrap
9304 msgid ""
9305 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9306 "B<                     const union sigval >I<value>B<);>\n"
9307 msgstr ""
9308 "B<int pthread_sigqueue(pthread_t >I<thread>B<, int >I<sig>B<,>\n"
9309 "B<                     const union sigval >I<value>B<);>\n"
9310
9311 #. type: Plain text
9312 #: build/C/man3/pthread_sigqueue.3:45
9313 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9314 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9315
9316 #. type: Plain text
9317 #: build/C/man3/pthread_sigqueue.3:53
9318 msgid ""
9319 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9320 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9321 "thread in the same process as the calling thread."
9322 msgstr ""
9323 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9324 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9325 "同じプロセス内のスレッドにシグナルを送信する。"
9326
9327 #. type: Plain text
9328 #: build/C/man3/pthread_sigqueue.3:65
9329 msgid ""
9330 "The I<thread> argument is the ID of a thread in the same process as the "
9331 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9332 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9333 "details."
9334 msgstr ""
9335 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9336 "I<sig> 引き数は送信するシグナルを指定する。\n"
9337 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9338 "詳細は B<sigqueue>(3) を参照。"
9339
9340 #. type: Plain text
9341 #: build/C/man3/pthread_sigqueue.3:70
9342 msgid ""
9343 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9344 "number."
9345 msgstr ""
9346 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9347 "エラーの場合、エラー番号を返す。"
9348
9349 #. type: Plain text
9350 #: build/C/man3/pthread_sigqueue.3:77
9351 msgid ""
9352 "The limit of signals which may be queued has been reached.  (See B<signal>"
9353 "(7)  for further information.)"
9354 msgstr ""
9355 "キューに入れられるシグナル数が上限に達していた\n"
9356 "(詳しい情報は (B<signal>(7) を参照)。"
9357
9358 #. type: Plain text
9359 #: build/C/man3/pthread_sigqueue.3:81
9360 msgid "I<sig> was invalid."
9361 msgstr "I<sig> が無効であった。"
9362
9363 #. type: TP
9364 #: build/C/man3/pthread_sigqueue.3:81
9365 #, no-wrap
9366 msgid "B<ENOSYS>"
9367 msgstr "B<ENOSYS>"
9368
9369 #. type: Plain text
9370 #: build/C/man3/pthread_sigqueue.3:85
9371 msgid "B<pthread_sigqueue>()  is not supported on this system."
9372 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9373
9374 #. type: Plain text
9375 #: build/C/man3/pthread_sigqueue.3:89
9376 msgid "I<thread> is not valid."
9377 msgstr "I<thread> が無効である。"
9378
9379 #. type: Plain text
9380 #: build/C/man3/pthread_sigqueue.3:93
9381 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9382 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9383
9384 #. type: Plain text
9385 #: build/C/man3/pthread_sigqueue.3:95
9386 msgid "This function is a GNU extension."
9387 msgstr "この関数は GNU による拡張である。"
9388
9389 #. type: Plain text
9390 #: build/C/man3/pthread_sigqueue.3:103
9391 msgid ""
9392 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9393 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9394 msgstr ""
9395 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9396 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9397
9398 #. type: TH
9399 #: build/C/man3/pthread_testcancel.3:26
9400 #, no-wrap
9401 msgid "PTHREAD_TESTCANCEL"
9402 msgstr "PTHREAD_TESTCANCEL"
9403
9404 #. type: TH
9405 #: build/C/man3/pthread_testcancel.3:26
9406 #, no-wrap
9407 msgid "2012-04-14"
9408 msgstr "2012-04-14"
9409
9410 #. type: Plain text
9411 #: build/C/man3/pthread_testcancel.3:29
9412 msgid ""
9413 "pthread_testcancel - request delivery of any pending cancellation request"
9414 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9415
9416 #. type: Plain text
9417 #: build/C/man3/pthread_testcancel.3:34
9418 #, no-wrap
9419 msgid "B<void pthread_testcancel(void);>\n"
9420 msgstr "B<void pthread_testcancel(void);>\n"
9421
9422 #. type: Plain text
9423 #: build/C/man3/pthread_testcancel.3:43
9424 msgid ""
9425 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9426 "calling thread, so that a thread that is otherwise executing code that "
9427 "contains no cancellation points will respond to a cancellation request."
9428 msgstr ""
9429 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9430 "ポイント (cancellation point) が作成される。\n"
9431 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9432 "いるスレッドが取り消し要求に対応することができるようになる。"
9433
9434 #. type: Plain text
9435 #: build/C/man3/pthread_testcancel.3:50
9436 msgid ""
9437 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9438 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9439 "no effect."
9440 msgstr ""
9441 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9442 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9443 "呼び出しても何の影響もない。"
9444
9445 #. type: Plain text
9446 #: build/C/man3/pthread_testcancel.3:54
9447 msgid ""
9448 "This function does not return a value.  If the calling thread is canceled as "
9449 "a consequence of a call to this function, then the function does not return."
9450 msgstr ""
9451 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9452 "キャンセルされた場合、この関数が返ることはない。"
9453
9454 #. type: Plain text
9455 #: build/C/man3/pthread_testcancel.3:63
9456 msgid "See B<pthread_cleanup_push>(3)."
9457 msgstr "B<pthread_cleanup_push>(3) を参照。"
9458
9459 #. type: Plain text
9460 #: build/C/man3/pthread_testcancel.3:68
9461 msgid ""
9462 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9463 "(3), B<pthreads>(7)"
9464 msgstr ""
9465 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9466 "(3), B<pthreads>(7)"
9467
9468 #. type: TH
9469 #: build/C/man3/pthread_tryjoin_np.3:26
9470 #, no-wrap
9471 msgid "PTHREAD_TRYJOIN_NP"
9472 msgstr "PTHREAD_TRYJOIN_NP"
9473
9474 #. type: Plain text
9475 #: build/C/man3/pthread_tryjoin_np.3:30
9476 msgid ""
9477 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9478 "thread"
9479 msgstr ""
9480 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9481 "試みる"
9482
9483 #. type: Plain text
9484 #: build/C/man3/pthread_tryjoin_np.3:36
9485 #, no-wrap
9486 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9487 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9488
9489 #. type: Plain text
9490 #: build/C/man3/pthread_tryjoin_np.3:39
9491 #, no-wrap
9492 msgid ""
9493 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9494 "B<                         const struct timespec *>I<abstime>B<);>\n"
9495 msgstr ""
9496 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9497 "B<                         const struct timespec *>I<abstime>B<);>\n"
9498
9499 #. type: Plain text
9500 #: build/C/man3/pthread_tryjoin_np.3:46
9501 msgid ""
9502 "These functions operate in the same way as B<pthread_join>(3), except for "
9503 "the differences described on this page."
9504 msgstr ""
9505 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9506 "このページで説明する違いがある。"
9507
9508 #. type: Plain text
9509 #: build/C/man3/pthread_tryjoin_np.3:58
9510 msgid ""
9511 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9512 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9513 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9514 "B<pthread_join>(3), the call returns an error."
9515 msgstr ""
9516 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9517 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9518 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9519 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9520
9521 #. type: Plain text
9522 #: build/C/man3/pthread_tryjoin_np.3:76
9523 msgid ""
9524 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9525 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9526 "specified in I<abstime>.  If the timeout expires before I<thread> "
9527 "terminates, the call returns an error.  The I<abstime> argument is a "
9528 "structure of the following form, specifying an absolute time measured since "
9529 "the Epoch (see B<time>(2)):"
9530 msgstr ""
9531 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9532 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9533 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9534 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9535 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9536
9537 #. type: Plain text
9538 #: build/C/man3/pthread_tryjoin_np.3:83
9539 #, no-wrap
9540 msgid ""
9541 "struct timespec {\n"
9542 "    time_t tv_sec;     /* seconds */\n"
9543 "    long   tv_nsec;    /* nanoseconds */\n"
9544 "};\n"
9545 msgstr ""
9546 "struct timespec {\n"
9547 "    time_t tv_sec;     /* seconds */\n"
9548 "    long   tv_nsec;    /* nanoseconds */\n"
9549 "};\n"
9550
9551 #. type: Plain text
9552 #: build/C/man3/pthread_tryjoin_np.3:89
9553 msgid ""
9554 "On success, these functions return 0; on error, they return an error number."
9555 msgstr ""
9556 "成功すると、これらの関数は 0 を返す。\n"
9557 "エラーの場合、エラー番号を返す。"
9558
9559 #. type: Plain text
9560 #: build/C/man3/pthread_tryjoin_np.3:94
9561 msgid ""
9562 "These functions can fail with the same errors as B<pthread_join>(3).  "
9563 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9564 msgstr ""
9565 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9566 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9567
9568 #. type: TP
9569 #: build/C/man3/pthread_tryjoin_np.3:94
9570 #, no-wrap
9571 msgid "B<EBUSY>"
9572 msgstr "B<EBUSY>"
9573
9574 #. type: Plain text
9575 #: build/C/man3/pthread_tryjoin_np.3:98
9576 msgid "I<thread> had not yet terminated at the time of the call."
9577 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9578
9579 #. type: Plain text
9580 #: build/C/man3/pthread_tryjoin_np.3:101
9581 msgid ""
9582 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9583 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9584
9585 #. type: TP
9586 #: build/C/man3/pthread_tryjoin_np.3:101
9587 #, no-wrap
9588 msgid "B<ETIMEDOUT>"
9589 msgstr "B<ETIMEDOUT>"
9590
9591 #. type: Plain text
9592 #: build/C/man3/pthread_tryjoin_np.3:106
9593 msgid "The call timed out before I<thread> terminated."
9594 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9595
9596 #. type: Plain text
9597 #: build/C/man3/pthread_tryjoin_np.3:110
9598 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9599 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9600
9601 #. type: Plain text
9602 #: build/C/man3/pthread_tryjoin_np.3:112
9603 msgid "These functions first appeared in glibc in version 2.3.3."
9604 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9605
9606 #. type: Plain text
9607 #: build/C/man3/pthread_tryjoin_np.3:117
9608 msgid "The following code waits to join for up to 5 seconds:"
9609 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9610
9611 #. type: Plain text
9612 #: build/C/man3/pthread_tryjoin_np.3:121
9613 #, no-wrap
9614 msgid ""
9615 "    struct timespec ts;\n"
9616 "    int s;\n"
9617 msgstr ""
9618 "    struct timespec ts;\n"
9619 "    int s;\n"
9620
9621 #. type: Plain text
9622 #: build/C/man3/pthread_tryjoin_np.3:123
9623 #, no-wrap
9624 msgid "    ...\n"
9625 msgstr "    ...\n"
9626
9627 #. type: Plain text
9628 #: build/C/man3/pthread_tryjoin_np.3:127
9629 #, no-wrap
9630 msgid ""
9631 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9632 "\t/* Handle error */\n"
9633 "    }\n"
9634 msgstr ""
9635 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9636 "\t/* Handle error */\n"
9637 "    }\n"
9638
9639 #. type: Plain text
9640 #: build/C/man3/pthread_tryjoin_np.3:129
9641 #, no-wrap
9642 msgid "    ts.tv_sec += 5;\n"
9643 msgstr "    ts.tv_sec += 5;\n"
9644
9645 #. type: Plain text
9646 #: build/C/man3/pthread_tryjoin_np.3:134
9647 #, no-wrap
9648 msgid ""
9649 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9650 "    if (s != 0) {\n"
9651 "        /* Handle error */\n"
9652 "    }\n"
9653 msgstr ""
9654 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9655 "    if (s != 0) {\n"
9656 "        /* Handle error */\n"
9657 "    }\n"
9658
9659 #. type: Plain text
9660 #: build/C/man3/pthread_tryjoin_np.3:140
9661 msgid ""
9662 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9663 msgstr ""
9664 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9665
9666 #. type: TH
9667 #: build/C/man3/pthread_yield.3:25
9668 #, no-wrap
9669 msgid "PTHREAD_YIELD"
9670 msgstr "PTHREAD_YIELD"
9671
9672 #. type: TH
9673 #: build/C/man3/pthread_yield.3:25
9674 #, no-wrap
9675 msgid "2013-03-05"
9676 msgstr "2013-03-05"
9677
9678 #. type: Plain text
9679 #: build/C/man3/pthread_yield.3:28
9680 msgid "pthread_yield - yield the processor"
9681 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9682
9683 #. type: Plain text
9684 #: build/C/man3/pthread_yield.3:34
9685 #, no-wrap
9686 msgid "B<int pthread_yield(void);>\n"
9687 msgstr "B<int pthread_yield(void);>\n"
9688
9689 #. type: Plain text
9690 #: build/C/man3/pthread_yield.3:44
9691 msgid ""
9692 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9693 "thread is placed at the end of the run queue for its static priority and "
9694 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9695 "(2)"
9696 msgstr ""
9697 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9698 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9699 "別のスレッドが実行されるようにスケジューリングされる。\n"
9700 "詳細は B<sched_yield>(2) を参照。"
9701
9702 #. type: Plain text
9703 #: build/C/man3/pthread_yield.3:49
9704 msgid ""
9705 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9706 "number."
9707 msgstr ""
9708 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9709 "エラーの場合、エラー番号を返す。"
9710
9711 #. type: Plain text
9712 #: build/C/man3/pthread_yield.3:53
9713 msgid ""
9714 "On Linux, this call always succeeds (but portable and future-proof "
9715 "applications should nevertheless handle a possible error return)."
9716 msgstr ""
9717 "Linux では、この関数の呼び出しは常に成功する\n"
9718 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9719 "正のエラーの返り値を処理するようにすべきである)。"
9720
9721 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9722 #. type: Plain text
9723 #: build/C/man3/pthread_yield.3:59
9724 msgid ""
9725 "This call is nonstandard, but present on several other systems.  Use the "
9726 "standardized B<sched_yield>(2)  instead."
9727 msgstr ""
9728 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9729 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9730
9731 #. type: Plain text
9732 #: build/C/man3/pthread_yield.3:62
9733 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9734 msgstr ""
9735 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9736
9737 #. type: Plain text
9738 #: build/C/man3/pthread_yield.3:66
9739 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9740 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9741
9742 #. type: TH
9743 #: build/C/man7/pthreads.7:26
9744 #, no-wrap
9745 msgid "PTHREADS"
9746 msgstr "PTHREADS"
9747
9748 #. type: TH
9749 #: build/C/man7/pthreads.7:26
9750 #, no-wrap
9751 msgid "2010-11-14"
9752 msgstr "2010-11-14"
9753
9754 #. type: Plain text
9755 #: build/C/man7/pthreads.7:29
9756 msgid "pthreads - POSIX threads"
9757 msgstr "pthreads - POSIX スレッド"
9758
9759 #. type: Plain text
9760 #: build/C/man7/pthreads.7:36
9761 msgid ""
9762 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9763 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9764 "can contain multiple threads, all of which are executing the same program.  "
9765 "These threads share the same global memory (data and heap segments), but "
9766 "each thread has its own stack (automatic variables)."
9767 msgstr ""
9768 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9769 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9770 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9771 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9772 "スレッドは自分専用のスタック (自動変数) を持つ。"
9773
9774 #. type: Plain text
9775 #: build/C/man7/pthreads.7:39
9776 msgid ""
9777 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9778 "these attributes are process-wide rather than per-thread):"
9779 msgstr ""
9780 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9781 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9782
9783 #. type: IP
9784 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9785 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9786 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9787 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9788 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9789 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9790 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9791 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9792 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9793 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9794 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9795 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9796 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9797 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9798 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9799 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9800 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9801 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9802 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9803 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9804 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9805 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9806 #: build/C/man7/pthreads.7:835
9807 #, no-wrap
9808 msgid "-"
9809 msgstr "-"
9810
9811 #. type: Plain text
9812 #: build/C/man7/pthreads.7:41
9813 msgid "process ID"
9814 msgstr "プロセス ID"
9815
9816 #. type: Plain text
9817 #: build/C/man7/pthreads.7:43
9818 msgid "parent process ID"
9819 msgstr "親プロセス ID"
9820
9821 #. type: Plain text
9822 #: build/C/man7/pthreads.7:45
9823 msgid "process group ID and session ID"
9824 msgstr "プロセスグループ ID とセッション ID"
9825
9826 #. type: Plain text
9827 #: build/C/man7/pthreads.7:47
9828 msgid "controlling terminal"
9829 msgstr "制御端末"
9830
9831 #. type: Plain text
9832 #: build/C/man7/pthreads.7:49
9833 msgid "user and group IDs"
9834 msgstr "ユーザ ID とグループ ID"
9835
9836 #. type: Plain text
9837 #: build/C/man7/pthreads.7:51
9838 msgid "open file descriptors"
9839 msgstr "オープンするファイルディスクリプタ"
9840
9841 #. type: Plain text
9842 #: build/C/man7/pthreads.7:54
9843 msgid "record locks (see B<fcntl>(2))"
9844 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9845
9846 #. type: Plain text
9847 #: build/C/man7/pthreads.7:56
9848 msgid "signal dispositions"
9849 msgstr "シグナルの配置"
9850
9851 #. type: Plain text
9852 #: build/C/man7/pthreads.7:59
9853 msgid "file mode creation mask (B<umask>(2))"
9854 msgstr "ファイルモード作成マスク (B<umask>(2))"
9855
9856 #. type: Plain text
9857 #: build/C/man7/pthreads.7:65
9858 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9859 msgstr ""
9860 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9861
9862 #. type: Plain text
9863 #: build/C/man7/pthreads.7:70
9864 msgid ""
9865 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9866 msgstr ""
9867 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9868
9869 #. type: Plain text
9870 #: build/C/man7/pthreads.7:73
9871 msgid "nice value (B<setpriority>(2))"
9872 msgstr "nice 値 (B<setpriority>(2))"
9873
9874 #. type: Plain text
9875 #: build/C/man7/pthreads.7:76
9876 msgid "resource limits (B<setrlimit>(2))"
9877 msgstr "リソース制限 (B<setrlimit>(2))"
9878
9879 #. type: Plain text
9880 #: build/C/man7/pthreads.7:81
9881 msgid ""
9882 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9883 "(B<getrusage>(2))"
9884 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9885
9886 #. type: Plain text
9887 #: build/C/man7/pthreads.7:84
9888 msgid ""
9889 "As well as the stack, POSIX.1 specifies that various other attributes are "
9890 "distinct for each thread, including:"
9891 msgstr ""
9892 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9893 "るかを規定している:"
9894
9895 #. type: Plain text
9896 #: build/C/man7/pthreads.7:88
9897 msgid "thread ID (the I<pthread_t> data type)"
9898 msgstr "スレッド ID (B<pthread_t> データ型)"
9899
9900 #. type: Plain text
9901 #: build/C/man7/pthreads.7:91
9902 msgid "signal mask (B<pthread_sigmask>(3))"
9903 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9904
9905 #. type: Plain text
9906 #: build/C/man7/pthreads.7:95
9907 msgid "the I<errno> variable"
9908 msgstr "I<errno> 変数"
9909
9910 #. type: Plain text
9911 #: build/C/man7/pthreads.7:98
9912 msgid "alternate signal stack (B<sigaltstack>(2))"
9913 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9914
9915 #. type: Plain text
9916 #: build/C/man7/pthreads.7:103
9917 msgid ""
9918 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9919 "B<sched_setparam>(2))"
9920 msgstr ""
9921 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9922 "と B<sched_setparam>(2))"
9923
9924 #. type: Plain text
9925 #: build/C/man7/pthreads.7:105
9926 msgid "The following Linux-specific features are also per-thread:"
9927 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9928
9929 #. type: Plain text
9930 #: build/C/man7/pthreads.7:108
9931 msgid "capabilities (see B<capabilities>(7))"
9932 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9933
9934 #. type: Plain text
9935 #: build/C/man7/pthreads.7:111
9936 msgid "CPU affinity (B<sched_setaffinity>(2))"
9937 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9938
9939 #. type: SS
9940 #: build/C/man7/pthreads.7:111
9941 #, no-wrap
9942 msgid "Pthreads function return values"
9943 msgstr "pthreads 関数の返り値"
9944
9945 #. type: Plain text
9946 #: build/C/man7/pthreads.7:118
9947 msgid ""
9948 "Most pthreads functions return 0 on success, and an error number of "
9949 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9950 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9951 "the function can never fail with the error B<EINTR>."
9952 msgstr ""
9953 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9954 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9955 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9956 "は決してないと規定している。"
9957
9958 #. type: SS
9959 #: build/C/man7/pthreads.7:118
9960 #, no-wrap
9961 msgid "Thread IDs"
9962 msgstr "スレッド ID"
9963
9964 #. type: Plain text
9965 #: build/C/man7/pthreads.7:132
9966 msgid ""
9967 "Each of the threads in a process has a unique thread identifier (stored in "
9968 "the type I<pthread_t>).  This identifier is returned to the caller of "
9969 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9970 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
9971 "within a process.  A thread ID may be reused after a terminated thread has "
9972 "been joined, or a detached thread has terminated.  In all pthreads functions "
9973 "that accept a thread ID as an argument, that ID by definition refers to a "
9974 "thread in the same process as the caller."
9975 msgstr ""
9976 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9977 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9978 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9979 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9980 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9981 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9982 "じプロセス内の一つのスレッドを参照する。"
9983
9984 #. type: SS
9985 #: build/C/man7/pthreads.7:132
9986 #, no-wrap
9987 msgid "Thread-safe functions"
9988 msgstr "スレッドセーフな関数"
9989
9990 #. type: Plain text
9991 #: build/C/man7/pthreads.7:136
9992 msgid ""
9993 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9994 "same results regardless of whether it is)  called from multiple threads at "
9995 "the same time."
9996 msgstr ""
9997 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9998 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9999
10000 #. type: Plain text
10001 #: build/C/man7/pthreads.7:140
10002 msgid ""
10003 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
10004 "standard shall be thread-safe, except for the following functions:"
10005 msgstr ""
10006 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
10007 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
10008
10009 #. type: Plain text
10010 #: build/C/man7/pthreads.7:234
10011 #, no-wrap
10012 msgid ""
10013 "asctime()\n"
10014 "basename()\n"
10015 "catgets()\n"
10016 "crypt()\n"
10017 "ctermid() if passed a non-NULL argument\n"
10018 "ctime()\n"
10019 "dbm_clearerr()\n"
10020 "dbm_close()\n"
10021 "dbm_delete()\n"
10022 "dbm_error()\n"
10023 "dbm_fetch()\n"
10024 "dbm_firstkey()\n"
10025 "dbm_nextkey()\n"
10026 "dbm_open()\n"
10027 "dbm_store()\n"
10028 "dirname()\n"
10029 "dlerror()\n"
10030 "drand48()\n"
10031 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10032 "encrypt()\n"
10033 "endgrent()\n"
10034 "endpwent()\n"
10035 "endutxent()\n"
10036 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10037 "ftw()\n"
10038 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10039 "getc_unlocked()\n"
10040 "getchar_unlocked()\n"
10041 "getdate()\n"
10042 "getenv()\n"
10043 "getgrent()\n"
10044 "getgrgid()\n"
10045 "getgrnam()\n"
10046 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10047 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10048 "gethostent()\n"
10049 "getlogin()\n"
10050 "getnetbyaddr()\n"
10051 "getnetbyname()\n"
10052 "getnetent()\n"
10053 "getopt()\n"
10054 "getprotobyname()\n"
10055 "getprotobynumber()\n"
10056 "getprotoent()\n"
10057 "getpwent()\n"
10058 "getpwnam()\n"
10059 "getpwuid()\n"
10060 "getservbyname()\n"
10061 "getservbyport()\n"
10062 "getservent()\n"
10063 "getutxent()\n"
10064 "getutxid()\n"
10065 "getutxline()\n"
10066 "gmtime()\n"
10067 "hcreate()\n"
10068 "hdestroy()\n"
10069 "hsearch()\n"
10070 "inet_ntoa()\n"
10071 "l64a()\n"
10072 "lgamma()\n"
10073 "lgammaf()\n"
10074 "lgammal()\n"
10075 "localeconv()\n"
10076 "localtime()\n"
10077 "lrand48()\n"
10078 "mrand48()\n"
10079 "nftw()\n"
10080 "nl_langinfo()\n"
10081 "ptsname()\n"
10082 "putc_unlocked()\n"
10083 "putchar_unlocked()\n"
10084 "putenv()\n"
10085 "pututxline()\n"
10086 "rand()\n"
10087 "readdir()\n"
10088 "setenv()\n"
10089 "setgrent()\n"
10090 "setkey()\n"
10091 "setpwent()\n"
10092 "setutxent()\n"
10093 "strerror()\n"
10094 "strsignal() [Added in POSIX.1-2008]\n"
10095 "strtok()\n"
10096 "system() [Added in POSIX.1-2008]\n"
10097 "tmpnam() if passed a non-NULL argument\n"
10098 "ttyname()\n"
10099 "unsetenv()\n"
10100 "wcrtomb() if its final argument is NULL\n"
10101 "wcsrtombs() if its final argument is NULL\n"
10102 "wcstombs()\n"
10103 "wctomb()\n"
10104 msgstr ""
10105 "asctime()\n"
10106 "basename()\n"
10107 "catgets()\n"
10108 "crypt()\n"
10109 "ctermid() (NULL でない引き数を渡された場合)\n"
10110 "ctime()\n"
10111 "dbm_clearerr()\n"
10112 "dbm_close()\n"
10113 "dbm_delete()\n"
10114 "dbm_error()\n"
10115 "dbm_fetch()\n"
10116 "dbm_firstkey()\n"
10117 "dbm_nextkey()\n"
10118 "dbm_open()\n"
10119 "dbm_store()\n"
10120 "dirname()\n"
10121 "dlerror()\n"
10122 "drand48()\n"
10123 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10124 "encrypt()\n"
10125 "endgrent()\n"
10126 "endpwent()\n"
10127 "endutxent()\n"
10128 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10129 "ftw()\n"
10130 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10131 "getc_unlocked()\n"
10132 "getchar_unlocked()\n"
10133 "getdate()\n"
10134 "getenv()\n"
10135 "getgrent()\n"
10136 "getgrgid()\n"
10137 "getgrnam()\n"
10138 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10139 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10140 "gethostent()\n"
10141 "getlogin()\n"
10142 "getnetbyaddr()\n"
10143 "getnetbyname()\n"
10144 "getnetent()\n"
10145 "getopt()\n"
10146 "getprotobyname()\n"
10147 "getprotobynumber()\n"
10148 "getprotoent()\n"
10149 "getpwent()\n"
10150 "getpwnam()\n"
10151 "getpwuid()\n"
10152 "getservbyname()\n"
10153 "getservbyport()\n"
10154 "getservent()\n"
10155 "getutxent()\n"
10156 "getutxid()\n"
10157 "getutxline()\n"
10158 "gmtime()\n"
10159 "hcreate()\n"
10160 "hdestroy()\n"
10161 "hsearch()\n"
10162 "inet_ntoa()\n"
10163 "l64a()\n"
10164 "lgamma()\n"
10165 "lgammaf()\n"
10166 "lgammal()\n"
10167 "localeconv()\n"
10168 "localtime()\n"
10169 "lrand48()\n"
10170 "mrand48()\n"
10171 "nftw()\n"
10172 "nl_langinfo()\n"
10173 "ptsname()\n"
10174 "putc_unlocked()\n"
10175 "putchar_unlocked()\n"
10176 "putenv()\n"
10177 "pututxline()\n"
10178 "rand()\n"
10179 "readdir()\n"
10180 "setenv()\n"
10181 "setgrent()\n"
10182 "setkey()\n"
10183 "setpwent()\n"
10184 "setutxent()\n"
10185 "strerror()\n"
10186 "strsignal() [POSIX.1-2008 で追加された]\n"
10187 "strtok()\n"
10188 "system() [POSIX.1-2008 で追加された]\n"
10189 "tmpnam() (NULL でない引き数を渡された場合)\n"
10190 "ttyname()\n"
10191 "unsetenv()\n"
10192 "wcrtomb() (最後の引き数が NULL の場合)\n"
10193 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10194 "wcstombs()\n"
10195 "wctomb()\n"
10196
10197 #. type: SS
10198 #: build/C/man7/pthreads.7:236
10199 #, no-wrap
10200 msgid "Async-cancel-safe functions"
10201 msgstr "async-cancel-safe 関数"
10202
10203 #. type: Plain text
10204 #: build/C/man7/pthreads.7:240
10205 msgid ""
10206 "An async-cancel-safe function is one that can be safely called in an "
10207 "application where asynchronous cancelability is enabled (see "
10208 "B<pthread_setcancelstate>(3))."
10209 msgstr ""
10210 "async-cancel-safe 関数は、\n"
10211 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10212 "安全に呼び出すことができる関数のことである\n"
10213 "(B<pthread_setcancelstate>(3) を参照)。"
10214
10215 #. type: Plain text
10216 #: build/C/man7/pthreads.7:243
10217 msgid ""
10218 "Only the following functions are required to be async-cancel-safe by "
10219 "POSIX.1-2001 and POSIX.1-2008:"
10220 msgstr ""
10221 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10222 "なければならないとされている。"
10223
10224 #. type: Plain text
10225 #: build/C/man7/pthreads.7:249
10226 #, no-wrap
10227 msgid ""
10228 "pthread_cancel()\n"
10229 "pthread_setcancelstate()\n"
10230 "pthread_setcanceltype()\n"
10231 msgstr ""
10232 "pthread_cancel()\n"
10233 "pthread_setcancelstate()\n"
10234 "pthread_setcanceltype()\n"
10235
10236 #. type: SS
10237 #: build/C/man7/pthreads.7:251
10238 #, no-wrap
10239 msgid "Cancellation points"
10240 msgstr "取り消しポイント (cancellation points)"
10241
10242 #. type: Plain text
10243 #: build/C/man7/pthreads.7:258
10244 msgid ""
10245 "POSIX.1 specifies that certain functions must, and certain other functions "
10246 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10247 "type is deferred, and a cancellation request is pending for the thread, then "
10248 "the thread is canceled when it calls a function that is a cancellation point."
10249 msgstr ""
10250 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10251 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10252 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10253 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10254 "時点で、そのスレッドのキャンセルが 行われる。"
10255
10256 #. type: Plain text
10257 #: build/C/man7/pthreads.7:261
10258 msgid ""
10259 "The following functions are required to be cancellation points by "
10260 "POSIX.1-2001 and/or POSIX.1-2008:"
10261 msgstr ""
10262 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10263 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10264
10265 #. type: Plain text
10266 #: build/C/man7/pthreads.7:324
10267 #, no-wrap
10268 msgid ""
10269 "accept()\n"
10270 "aio_suspend()\n"
10271 "clock_nanosleep()\n"
10272 "close()\n"
10273 "connect()\n"
10274 "creat()\n"
10275 "fcntl() F_SETLKW\n"
10276 "fdatasync()\n"
10277 "fsync()\n"
10278 "getmsg()\n"
10279 "getpmsg()\n"
10280 "lockf() F_LOCK\n"
10281 "mq_receive()\n"
10282 "mq_send()\n"
10283 "mq_timedreceive()\n"
10284 "mq_timedsend()\n"
10285 "msgrcv()\n"
10286 "msgsnd()\n"
10287 "msync()\n"
10288 "nanosleep()\n"
10289 "open()\n"
10290 "openat() [Added in POSIX.1-2008]\n"
10291 "pause()\n"
10292 "poll()\n"
10293 "pread()\n"
10294 "pselect()\n"
10295 "pthread_cond_timedwait()\n"
10296 "pthread_cond_wait()\n"
10297 "pthread_join()\n"
10298 "pthread_testcancel()\n"
10299 "putmsg()\n"
10300 "putpmsg()\n"
10301 "pwrite()\n"
10302 "read()\n"
10303 "readv()\n"
10304 "recv()\n"
10305 "recvfrom()\n"
10306 "recvmsg()\n"
10307 "select()\n"
10308 "sem_timedwait()\n"
10309 "sem_wait()\n"
10310 "send()\n"
10311 "sendmsg()\n"
10312 "sendto()\n"
10313 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10314 "sigsuspend()\n"
10315 "sigtimedwait()\n"
10316 "sigwait()\n"
10317 "sigwaitinfo()\n"
10318 "sleep()\n"
10319 "system()\n"
10320 "tcdrain()\n"
10321 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10322 "wait()\n"
10323 "waitid()\n"
10324 "waitpid()\n"
10325 "write()\n"
10326 "writev()\n"
10327 msgstr ""
10328 "accept()\n"
10329 "aio_suspend()\n"
10330 "clock_nanosleep()\n"
10331 "close()\n"
10332 "connect()\n"
10333 "creat()\n"
10334 "fcntl() F_SETLKW\n"
10335 "fdatasync()\n"
10336 "fsync()\n"
10337 "getmsg()\n"
10338 "getpmsg()\n"
10339 "lockf() F_LOCK\n"
10340 "mq_receive()\n"
10341 "mq_send()\n"
10342 "mq_timedreceive()\n"
10343 "mq_timedsend()\n"
10344 "msgrcv()\n"
10345 "msgsnd()\n"
10346 "msync()\n"
10347 "nanosleep()\n"
10348 "open()\n"
10349 "openat() [POSIX.1-2008 で追加された]\n"
10350 "pause()\n"
10351 "poll()\n"
10352 "pread()\n"
10353 "pselect()\n"
10354 "pthread_cond_timedwait()\n"
10355 "pthread_cond_wait()\n"
10356 "pthread_join()\n"
10357 "pthread_testcancel()\n"
10358 "putmsg()\n"
10359 "putpmsg()\n"
10360 "pwrite()\n"
10361 "read()\n"
10362 "readv()\n"
10363 "recv()\n"
10364 "recvfrom()\n"
10365 "recvmsg()\n"
10366 "select()\n"
10367 "sem_timedwait()\n"
10368 "sem_wait()\n"
10369 "send()\n"
10370 "sendmsg()\n"
10371 "sendto()\n"
10372 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10373 "sigsuspend()\n"
10374 "sigtimedwait()\n"
10375 "sigwait()\n"
10376 "sigwaitinfo()\n"
10377 "sleep()\n"
10378 "system()\n"
10379 "tcdrain()\n"
10380 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10381 "wait()\n"
10382 "waitid()\n"
10383 "waitpid()\n"
10384 "write()\n"
10385 "writev()\n"
10386
10387 #. type: Plain text
10388 #: build/C/man7/pthreads.7:329
10389 msgid ""
10390 "The following functions may be cancellation points according to POSIX.1-2001 "
10391 "and/or POSIX.1-2008:"
10392 msgstr ""
10393 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10394 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10395
10396 #. type: Plain text
10397 #: build/C/man7/pthreads.7:557
10398 #, no-wrap
10399 msgid ""
10400 "access()\n"
10401 "asctime()\n"
10402 "asctime_r()\n"
10403 "catclose()\n"
10404 "catgets()\n"
10405 "catopen()\n"
10406 "chmod() [Added in POSIX.1-2008]\n"
10407 "chown() [Added in POSIX.1-2008]\n"
10408 "closedir()\n"
10409 "closelog()\n"
10410 "ctermid()\n"
10411 "ctime()\n"
10412 "ctime_r()\n"
10413 "dbm_close()\n"
10414 "dbm_delete()\n"
10415 "dbm_fetch()\n"
10416 "dbm_nextkey()\n"
10417 "dbm_open()\n"
10418 "dbm_store()\n"
10419 "dlclose()\n"
10420 "dlopen()\n"
10421 "dprintf() [Added in POSIX.1-2008]\n"
10422 "endgrent()\n"
10423 "endhostent()\n"
10424 "endnetent()\n"
10425 "endprotoent()\n"
10426 "endpwent()\n"
10427 "endservent()\n"
10428 "endutxent()\n"
10429 "faccessat() [Added in POSIX.1-2008]\n"
10430 "fchmod() [Added in POSIX.1-2008]\n"
10431 "fchmodat() [Added in POSIX.1-2008]\n"
10432 "fchown() [Added in POSIX.1-2008]\n"
10433 "fchownat() [Added in POSIX.1-2008]\n"
10434 "fclose()\n"
10435 "fcntl() (for any value of cmd argument)\n"
10436 "fflush()\n"
10437 "fgetc()\n"
10438 "fgetpos()\n"
10439 "fgets()\n"
10440 "fgetwc()\n"
10441 "fgetws()\n"
10442 "fmtmsg()\n"
10443 "fopen()\n"
10444 "fpathconf()\n"
10445 "fprintf()\n"
10446 "fputc()\n"
10447 "fputs()\n"
10448 "fputwc()\n"
10449 "fputws()\n"
10450 "fread()\n"
10451 "freopen()\n"
10452 "fscanf()\n"
10453 "fseek()\n"
10454 "fseeko()\n"
10455 "fsetpos()\n"
10456 "fstat()\n"
10457 "fstatat() [Added in POSIX.1-2008]\n"
10458 "ftell()\n"
10459 "ftello()\n"
10460 "ftw()\n"
10461 "futimens() [Added in POSIX.1-2008]\n"
10462 "fwprintf()\n"
10463 "fwrite()\n"
10464 "fwscanf()\n"
10465 "getaddrinfo()\n"
10466 "getc()\n"
10467 "getc_unlocked()\n"
10468 "getchar()\n"
10469 "getchar_unlocked()\n"
10470 "getcwd()\n"
10471 "getdate()\n"
10472 "getdelim() [Added in POSIX.1-2008]\n"
10473 "getgrent()\n"
10474 "getgrgid()\n"
10475 "getgrgid_r()\n"
10476 "getgrnam()\n"
10477 "getgrnam_r()\n"
10478 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10479 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10480 "gethostent()\n"
10481 "gethostid()\n"
10482 "gethostname()\n"
10483 "getline() [Added in POSIX.1-2008]\n"
10484 "getlogin()\n"
10485 "getlogin_r()\n"
10486 "getnameinfo()\n"
10487 "getnetbyaddr()\n"
10488 "getnetbyname()\n"
10489 "getnetent()\n"
10490 "getopt() (if opterr is nonzero)\n"
10491 "getprotobyname()\n"
10492 "getprotobynumber()\n"
10493 "getprotoent()\n"
10494 "getpwent()\n"
10495 "getpwnam()\n"
10496 "getpwnam_r()\n"
10497 "getpwuid()\n"
10498 "getpwuid_r()\n"
10499 "gets()\n"
10500 "getservbyname()\n"
10501 "getservbyport()\n"
10502 "getservent()\n"
10503 "getutxent()\n"
10504 "getutxid()\n"
10505 "getutxline()\n"
10506 "getwc()\n"
10507 "getwchar()\n"
10508 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10509 "glob()\n"
10510 "iconv_close()\n"
10511 "iconv_open()\n"
10512 "ioctl()\n"
10513 "link()\n"
10514 "linkat() [Added in POSIX.1-2008]\n"
10515 "lio_listio() [Added in POSIX.1-2008]\n"
10516 "localtime()\n"
10517 "localtime_r()\n"
10518 "lockf() [Added in POSIX.1-2008]\n"
10519 "lseek()\n"
10520 "lstat()\n"
10521 "mkdir() [Added in POSIX.1-2008]\n"
10522 "mkdirat() [Added in POSIX.1-2008]\n"
10523 "mkdtemp() [Added in POSIX.1-2008]\n"
10524 "mkfifo() [Added in POSIX.1-2008]\n"
10525 "mkfifoat() [Added in POSIX.1-2008]\n"
10526 "mknod() [Added in POSIX.1-2008]\n"
10527 "mknodat() [Added in POSIX.1-2008]\n"
10528 "mkstemp()\n"
10529 "mktime()\n"
10530 "nftw()\n"
10531 "opendir()\n"
10532 "openlog()\n"
10533 "pathconf()\n"
10534 "pclose()\n"
10535 "perror()\n"
10536 "popen()\n"
10537 "posix_fadvise()\n"
10538 "posix_fallocate()\n"
10539 "posix_madvise()\n"
10540 "posix_openpt()\n"
10541 "posix_spawn()\n"
10542 "posix_spawnp()\n"
10543 "posix_trace_clear()\n"
10544 "posix_trace_close()\n"
10545 "posix_trace_create()\n"
10546 "posix_trace_create_withlog()\n"
10547 "posix_trace_eventtypelist_getnext_id()\n"
10548 "posix_trace_eventtypelist_rewind()\n"
10549 "posix_trace_flush()\n"
10550 "posix_trace_get_attr()\n"
10551 "posix_trace_get_filter()\n"
10552 "posix_trace_get_status()\n"
10553 "posix_trace_getnext_event()\n"
10554 "posix_trace_open()\n"
10555 "posix_trace_rewind()\n"
10556 "posix_trace_set_filter()\n"
10557 "posix_trace_shutdown()\n"
10558 "posix_trace_timedgetnext_event()\n"
10559 "posix_typed_mem_open()\n"
10560 "printf()\n"
10561 "psiginfo() [Added in POSIX.1-2008]\n"
10562 "psignal() [Added in POSIX.1-2008]\n"
10563 "pthread_rwlock_rdlock()\n"
10564 "pthread_rwlock_timedrdlock()\n"
10565 "pthread_rwlock_timedwrlock()\n"
10566 "pthread_rwlock_wrlock()\n"
10567 "putc()\n"
10568 "putc_unlocked()\n"
10569 "putchar()\n"
10570 "putchar_unlocked()\n"
10571 "puts()\n"
10572 "pututxline()\n"
10573 "putwc()\n"
10574 "putwchar()\n"
10575 "readdir()\n"
10576 "readdir_r()\n"
10577 "readlink() [Added in POSIX.1-2008]\n"
10578 "readlinkat() [Added in POSIX.1-2008]\n"
10579 "remove()\n"
10580 "rename()\n"
10581 "renameat() [Added in POSIX.1-2008]\n"
10582 "rewind()\n"
10583 "rewinddir()\n"
10584 "scandir() [Added in POSIX.1-2008]\n"
10585 "scanf()\n"
10586 "seekdir()\n"
10587 "semop()\n"
10588 "setgrent()\n"
10589 "sethostent()\n"
10590 "setnetent()\n"
10591 "setprotoent()\n"
10592 "setpwent()\n"
10593 "setservent()\n"
10594 "setutxent()\n"
10595 "sigpause() [Added in POSIX.1-2008]\n"
10596 "stat()\n"
10597 "strerror()\n"
10598 "strerror_r()\n"
10599 "strftime()\n"
10600 "symlink()\n"
10601 "symlinkat() [Added in POSIX.1-2008]\n"
10602 "sync()\n"
10603 "syslog()\n"
10604 "tmpfile()\n"
10605 "tmpnam()\n"
10606 "ttyname()\n"
10607 "ttyname_r()\n"
10608 "tzset()\n"
10609 "ungetc()\n"
10610 "ungetwc()\n"
10611 "unlink()\n"
10612 "unlinkat() [Added in POSIX.1-2008]\n"
10613 "utime() [Added in POSIX.1-2008]\n"
10614 "utimensat() [Added in POSIX.1-2008]\n"
10615 "utimes() [Added in POSIX.1-2008]\n"
10616 "vdprintf() [Added in POSIX.1-2008]\n"
10617 "vfprintf()\n"
10618 "vfwprintf()\n"
10619 "vprintf()\n"
10620 "vwprintf()\n"
10621 "wcsftime()\n"
10622 "wordexp()\n"
10623 "wprintf()\n"
10624 "wscanf()\n"
10625 msgstr ""
10626 "access()\n"
10627 "asctime()\n"
10628 "asctime_r()\n"
10629 "catclose()\n"
10630 "catgets()\n"
10631 "catopen()\n"
10632 "chmod() [POSIX.1-2008 で追加された]\n"
10633 "chown() [POSIX.1-2008 で追加された]\n"
10634 "closedir()\n"
10635 "closelog()\n"
10636 "ctermid()\n"
10637 "ctime()\n"
10638 "ctime_r()\n"
10639 "dbm_close()\n"
10640 "dbm_delete()\n"
10641 "dbm_fetch()\n"
10642 "dbm_nextkey()\n"
10643 "dbm_open()\n"
10644 "dbm_store()\n"
10645 "dlclose()\n"
10646 "dlopen()\n"
10647 "dprintf() [POSIX.1-2008 で追加された]\n"
10648 "endgrent()\n"
10649 "endhostent()\n"
10650 "endnetent()\n"
10651 "endprotoent()\n"
10652 "endpwent()\n"
10653 "endservent()\n"
10654 "endutxent()\n"
10655 "faccessat() [POSIX.1-2008 で追加された]\n"
10656 "fchmod() [POSIX.1-2008 で追加された]\n"
10657 "fchmodat() [POSIX.1-2008 で追加された]\n"
10658 "fchown() [POSIX.1-2008 で追加された]\n"
10659 "fchownat() [POSIX.1-2008 で追加された]\n"
10660 "fclose()\n"
10661 "fcntl() (cmd 引き数が何であっても)\n"
10662 "fflush()\n"
10663 "fgetc()\n"
10664 "fgetpos()\n"
10665 "fgets()\n"
10666 "fgetwc()\n"
10667 "fgetws()\n"
10668 "fmtmsg()\n"
10669 "fopen()\n"
10670 "fpathconf()\n"
10671 "fprintf()\n"
10672 "fputc()\n"
10673 "fputs()\n"
10674 "fputwc()\n"
10675 "fputws()\n"
10676 "fread()\n"
10677 "freopen()\n"
10678 "fscanf()\n"
10679 "fseek()\n"
10680 "fseeko()\n"
10681 "fsetpos()\n"
10682 "fstat()\n"
10683 "fstatat() [POSIX.1-2008 で追加された]\n"
10684 "ftell()\n"
10685 "ftello()\n"
10686 "ftw()\n"
10687 "futimens() [POSIX.1-2008 で追加された]\n"
10688 "fwprintf()\n"
10689 "fwrite()\n"
10690 "fwscanf()\n"
10691 "getaddrinfo()\n"
10692 "getc()\n"
10693 "getc_unlocked()\n"
10694 "getchar()\n"
10695 "getchar_unlocked()\n"
10696 "getcwd()\n"
10697 "getdate()\n"
10698 "getdelim() [POSIX.1-2008 で追加された]\n"
10699 "getgrent()\n"
10700 "getgrgid()\n"
10701 "getgrgid_r()\n"
10702 "getgrnam()\n"
10703 "getgrnam_r()\n"
10704 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10705 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10706 "gethostent()\n"
10707 "gethostid()\n"
10708 "gethostname()\n"
10709 "getline() [POSIX.1-2008 で追加された]\n"
10710 "getlogin()\n"
10711 "getlogin_r()\n"
10712 "getnameinfo()\n"
10713 "getnetbyaddr()\n"
10714 "getnetbyname()\n"
10715 "getnetent()\n"
10716 "getopt() (opterr が 0 以外の場合)\n"
10717 "getprotobyname()\n"
10718 "getprotobynumber()\n"
10719 "getprotoent()\n"
10720 "getpwent()\n"
10721 "getpwnam()\n"
10722 "getpwnam_r()\n"
10723 "getpwuid()\n"
10724 "getpwuid_r()\n"
10725 "gets()\n"
10726 "getservbyname()\n"
10727 "getservbyport()\n"
10728 "getservent()\n"
10729 "getutxent()\n"
10730 "getutxid()\n"
10731 "getutxline()\n"
10732 "getwc()\n"
10733 "getwchar()\n"
10734 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10735 "glob()\n"
10736 "iconv_close()\n"
10737 "iconv_open()\n"
10738 "ioctl()\n"
10739 "link()\n"
10740 "linkat() [POSIX.1-2008 で追加された]\n"
10741 "lio_listio() [POSIX.1-2008 で追加された]\n"
10742 "localtime()\n"
10743 "localtime_r()\n"
10744 "lockf() [POSIX.1-2008 で追加された]\n"
10745 "lseek()\n"
10746 "lstat()\n"
10747 "mkdir() [POSIX.1-2008 で追加された]\n"
10748 "mkdirat() [POSIX.1-2008 で追加された]\n"
10749 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10750 "mkfifo() [POSIX.1-2008 で追加された]\n"
10751 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10752 "mknod() [POSIX.1-2008 で追加された]\n"
10753 "mknodat() [POSIX.1-2008 で追加された]\n"
10754 "mkstemp()\n"
10755 "mktime()\n"
10756 "nftw()\n"
10757 "opendir()\n"
10758 "openlog()\n"
10759 "pathconf()\n"
10760 "pclose()\n"
10761 "perror()\n"
10762 "popen()\n"
10763 "posix_fadvise()\n"
10764 "posix_fallocate()\n"
10765 "posix_madvise()\n"
10766 "posix_openpt()\n"
10767 "posix_spawn()\n"
10768 "posix_spawnp()\n"
10769 "posix_trace_clear()\n"
10770 "posix_trace_close()\n"
10771 "posix_trace_create()\n"
10772 "posix_trace_create_withlog()\n"
10773 "posix_trace_eventtypelist_getnext_id()\n"
10774 "posix_trace_eventtypelist_rewind()\n"
10775 "posix_trace_flush()\n"
10776 "posix_trace_get_attr()\n"
10777 "posix_trace_get_filter()\n"
10778 "posix_trace_get_status()\n"
10779 "posix_trace_getnext_event()\n"
10780 "posix_trace_open()\n"
10781 "posix_trace_rewind()\n"
10782 "posix_trace_set_filter()\n"
10783 "posix_trace_shutdown()\n"
10784 "posix_trace_timedgetnext_event()\n"
10785 "posix_typed_mem_open()\n"
10786 "printf()\n"
10787 "psiginfo() [POSIX.1-2008 で追加された]\n"
10788 "psignal() [POSIX.1-2008 で追加された]\n"
10789 "pthread_rwlock_rdlock()\n"
10790 "pthread_rwlock_timedrdlock()\n"
10791 "pthread_rwlock_timedwrlock()\n"
10792 "pthread_rwlock_wrlock()\n"
10793 "putc()\n"
10794 "putc_unlocked()\n"
10795 "putchar()\n"
10796 "putchar_unlocked()\n"
10797 "puts()\n"
10798 "pututxline()\n"
10799 "putwc()\n"
10800 "putwchar()\n"
10801 "readdir()\n"
10802 "readdir_r()\n"
10803 "readlink() [POSIX.1-2008 で追加された]\n"
10804 "readlinkat() [POSIX.1-2008 で追加された]\n"
10805 "remove()\n"
10806 "rename()\n"
10807 "renameat() [POSIX.1-2008 で追加された]\n"
10808 "rewind()\n"
10809 "rewinddir()\n"
10810 "scandir() [POSIX.1-2008 で追加された]\n"
10811 "scanf()\n"
10812 "seekdir()\n"
10813 "semop()\n"
10814 "setgrent()\n"
10815 "sethostent()\n"
10816 "setnetent()\n"
10817 "setprotoent()\n"
10818 "setpwent()\n"
10819 "setservent()\n"
10820 "setutxent()\n"
10821 "sigpause() [POSIX.1-2008 で追加された]\n"
10822 "stat()\n"
10823 "strerror()\n"
10824 "strerror_r()\n"
10825 "strftime()\n"
10826 "symlink()\n"
10827 "symlinkat() [POSIX.1-2008 で追加された]\n"
10828 "sync()\n"
10829 "syslog()\n"
10830 "tmpfile()\n"
10831 "tmpnam()\n"
10832 "ttyname()\n"
10833 "ttyname_r()\n"
10834 "tzset()\n"
10835 "ungetc()\n"
10836 "ungetwc()\n"
10837 "unlink()\n"
10838 "unlinkat() [POSIX.1-2008 で追加された]\n"
10839 "utime() [POSIX.1-2008 で追加された]\n"
10840 "utimensat() [POSIX.1-2008 で追加された]\n"
10841 "utimes() [POSIX.1-2008 で追加された]\n"
10842 "vdprintf() [POSIX.1-2008 で追加された]\n"
10843 "vfprintf()\n"
10844 "vfwprintf()\n"
10845 "vprintf()\n"
10846 "vwprintf()\n"
10847 "wcsftime()\n"
10848 "wordexp()\n"
10849 "wprintf()\n"
10850 "wscanf()\n"
10851
10852 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10853 #.  files, it looks as though at least the following nonstandard
10854 #.  functions are cancellation points:
10855 #.  endnetgrent
10856 #.  endspent
10857 #.  epoll_pwait
10858 #.  epoll_wait
10859 #.  fcloseall
10860 #.  fdopendir
10861 #.  fflush_unlocked
10862 #.  fgetc_unlocked
10863 #.  fgetgrent
10864 #.  fgetgrent_r
10865 #.  fgetpwent
10866 #.  fgetpwent_r
10867 #.  fgets_unlocked
10868 #.  fgetspent
10869 #.  fgetspent_r
10870 #.  fgetwc_unlocked
10871 #.  fgetws_unlocked
10872 #.  fputc_unlocked
10873 #.  fputs_unlocked
10874 #.  fputwc_unlocked
10875 #.  fputws_unlocked
10876 #.  fread_unlocked
10877 #.  fwrite_unlocked
10878 #.  gai_suspend
10879 #.  getaddrinfo_a
10880 #.  getdate_r
10881 #.  getgrent_r
10882 #.  getgrouplist
10883 #.  gethostbyaddr_r
10884 #.  gethostbyname2
10885 #.  gethostbyname2_r
10886 #.  gethostbyname_r
10887 #.  gethostent_r
10888 #.  getnetbyaddr_r
10889 #.  getnetbyname_r
10890 #.  getnetent_r
10891 #.  getnetgrent
10892 #.  getnetgrent_r
10893 #.  getprotobyname_r
10894 #.  getprotobynumber_r
10895 #.  getprotoent_r
10896 #.  getpw
10897 #.  getpwent_r
10898 #.  getservbyname_r
10899 #.  getservbyport_r
10900 #.  getservent_r
10901 #.  getspent
10902 #.  getspent_r
10903 #.  getspnam
10904 #.  getspnam_r
10905 #.  getutmp
10906 #.  getutmpx
10907 #.  getw
10908 #.  getwc_unlocked
10909 #.  getwchar_unlocked
10910 #.  initgroups
10911 #.  innetgr
10912 #.  mkostemp
10913 #.  mkostemp64
10914 #.  mkstemp64
10915 #.  ppoll
10916 #.  pthread_timedjoin_np
10917 #.  putgrent
10918 #.  putpwent
10919 #.  putspent
10920 #.  putw
10921 #.  putwc_unlocked
10922 #.  putwchar_unlocked
10923 #.  rcmd
10924 #.  rcmd_af
10925 #.  rexec
10926 #.  rexec_af
10927 #.  rresvport
10928 #.  rresvport_af
10929 #.  ruserok
10930 #.  ruserok_af
10931 #.  setnetgrent
10932 #.  setspent
10933 #.  sgetspent
10934 #.  sgetspent_r
10935 #.  updwtmpx
10936 #.  utmpxname
10937 #.  vfscanf
10938 #.  vfwscanf
10939 #.  vscanf
10940 #.  vsyslog
10941 #.  vwscanf
10942 #. type: Plain text
10943 #: build/C/man7/pthreads.7:655
10944 msgid ""
10945 "An implementation may also mark other functions not specified in the "
10946 "standard as cancellation points.  In particular, an implementation is likely "
10947 "to mark any nonstandard function that may block as a cancellation point.  "
10948 "(This includes most functions that can touch files.)"
10949 msgstr ""
10950 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10951 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10952 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10953 "関数がこれに含まれる)。"
10954
10955 #. type: SS
10956 #: build/C/man7/pthreads.7:655
10957 #, no-wrap
10958 msgid "Compiling on Linux"
10959 msgstr "Linux でのコンパイル"
10960
10961 #. type: Plain text
10962 #: build/C/man7/pthreads.7:658
10963 msgid ""
10964 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10965 "pthread>."
10966 msgstr ""
10967 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10968 "きである。"
10969
10970 #. type: SS
10971 #: build/C/man7/pthreads.7:658
10972 #, no-wrap
10973 msgid "Linux implementations of POSIX threads"
10974 msgstr "POSIX スレッドの Linux での実装"
10975
10976 #. type: Plain text
10977 #: build/C/man7/pthreads.7:661
10978 msgid ""
10979 "Over time, two threading implementations have been provided by the GNU C "
10980 "library on Linux:"
10981 msgstr ""
10982 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10983 "た。"
10984
10985 #. type: TP
10986 #: build/C/man7/pthreads.7:661
10987 #, no-wrap
10988 msgid "B<LinuxThreads>"
10989 msgstr "B<LinuxThreads>"
10990
10991 #. type: Plain text
10992 #: build/C/man7/pthreads.7:665
10993 msgid ""
10994 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10995 "implementation is no longer supported."
10996 msgstr ""
10997 "最初の Pthreads の実装。\n"
10998 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10999
11000 #. type: TP
11001 #: build/C/man7/pthreads.7:665
11002 #, no-wrap
11003 msgid "B<NPTL> (Native POSIX Threads Library)"
11004 msgstr "B<NPTL> (Native POSIX Threads Library)"
11005
11006 #. type: Plain text
11007 #: build/C/man7/pthreads.7:673
11008 msgid ""
11009 "This is the modern Pthreads implementation.  By comparison with "
11010 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
11011 "POSIX.1 specification and better performance when creating large numbers of "
11012 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
11013 "are present in the Linux 2.6 kernel."
11014 msgstr ""
11015 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
11016 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
11017 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
11018 "装されている機能が必要である。"
11019
11020 #. type: Plain text
11021 #: build/C/man7/pthreads.7:683
11022 msgid ""
11023 "Both of these are so-called 1:1 implementations, meaning that each thread "
11024 "maps to a kernel scheduling entity.  Both threading implementations employ "
11025 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
11026 "primitives (mutexes, thread joining, and so on) are implemented using the "
11027 "Linux B<futex>(2)  system call."
11028 msgstr ""
11029 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
11030 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
11031 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
11032 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
11033 "使って実装されている。"
11034
11035 #. type: SS
11036 #: build/C/man7/pthreads.7:683
11037 #, no-wrap
11038 msgid "LinuxThreads"
11039 msgstr "LinuxThreads"
11040
11041 #. type: Plain text
11042 #: build/C/man7/pthreads.7:685
11043 msgid "The notable features of this implementation are the following:"
11044 msgstr "この実装の大きな特徴は以下の通りである:"
11045
11046 #. type: Plain text
11047 #: build/C/man7/pthreads.7:692
11048 msgid ""
11049 "In addition to the main (initial) thread, and the threads that the program "
11050 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
11051 "thread.  This thread handles thread creation and termination.  (Problems can "
11052 "result if this thread is inadvertently killed.)"
11053 msgstr ""
11054 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
11055 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
11056 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
11057 "kill されると、問題が起こることがある)。"
11058
11059 #. type: Plain text
11060 #: build/C/man7/pthreads.7:704
11061 msgid ""
11062 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
11063 "the first three real-time signals are used (see also B<signal>(7)).  On "
11064 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
11065 "avoid the use of whichever set of signals is employed by the implementation."
11066 msgstr ""
11067 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11068 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11069 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11070 "用されているシグナルを どれも使わないようにしなければならない。"
11071
11072 #. type: Plain text
11073 #: build/C/man7/pthreads.7:711
11074 msgid ""
11075 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11076 "implemented as processes which share more information than usual, but which "
11077 "do not share a common process ID.)  LinuxThreads threads (including the "
11078 "manager thread)  are visible as separate processes using B<ps>(1)."
11079 msgstr ""
11080 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11081 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11082 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11083 "を使うと別のプロセスのように見える。"
11084
11085 #. type: Plain text
11086 #: build/C/man7/pthreads.7:714
11087 msgid ""
11088 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11089 "number of ways, including the following:"
11090 msgstr ""
11091 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11092 "示すような点がある:"
11093
11094 #. type: Plain text
11095 #: build/C/man7/pthreads.7:718
11096 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11097 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11098
11099 #. type: Plain text
11100 #: build/C/man7/pthreads.7:727
11101 msgid ""
11102 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11103 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11104 "should return the same value as B<getppid>(2)  in the main thread."
11105 msgstr ""
11106 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11107 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11108 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11109
11110 #. type: Plain text
11111 #: build/C/man7/pthreads.7:737
11112 msgid ""
11113 "When one thread creates a new child process using B<fork>(2), any thread "
11114 "should be able to B<wait>(2)  on the child.  However, the implementation "
11115 "only allows the thread that created the child to B<wait>(2)  on it."
11116 msgstr ""
11117 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11118 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11119 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11120 "る。"
11121
11122 #. type: Plain text
11123 #: build/C/man7/pthreads.7:744
11124 msgid ""
11125 "When a thread calls B<execve>(2), all other threads are terminated (as "
11126 "required by POSIX.1).  However, the resulting process has the same PID as "
11127 "the thread that called B<execve>(2): it should have the same PID as the main "
11128 "thread."
11129 msgstr ""
11130 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11131 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11132 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11133 "る。"
11134
11135 #. type: Plain text
11136 #: build/C/man7/pthreads.7:751
11137 msgid ""
11138 "Threads do not share user and group IDs.  This can cause complications with "
11139 "set-user-ID programs and can cause failures in Pthreads functions if an "
11140 "application changes its credentials using B<seteuid>(2)  or similar."
11141 msgstr ""
11142 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11143 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11144 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11145
11146 #. type: Plain text
11147 #: build/C/man7/pthreads.7:753
11148 msgid "Threads do not share a common session ID and process group ID."
11149 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11150
11151 #. type: Plain text
11152 #: build/C/man7/pthreads.7:756
11153 msgid "Threads do not share record locks created using B<fcntl>(2)."
11154 msgstr ""
11155 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11156
11157 #. type: Plain text
11158 #: build/C/man7/pthreads.7:762
11159 msgid ""
11160 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11161 "rather than process-wide."
11162 msgstr ""
11163 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11164 "単位の情報である。"
11165
11166 #. type: Plain text
11167 #: build/C/man7/pthreads.7:765
11168 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11169 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11170
11171 #. type: Plain text
11172 #: build/C/man7/pthreads.7:767
11173 msgid "Threads do not share interval timers."
11174 msgstr "スレッド間でインターバル・タイマを共有しない。"
11175
11176 #.  FIXME . bug report filed for NPTL nice nonconformance
11177 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11178 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11179 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11180 #.  Monitor this to see if it makes it into mainline.
11181 #. type: Plain text
11182 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11183 msgid "Threads do not share a common nice value."
11184 msgstr "スレッドは共通の nice 値を共有しない。"
11185
11186 #. type: Plain text
11187 #: build/C/man7/pthreads.7:779
11188 msgid ""
11189 "POSIX.1 distinguishes the notions of signals that are directed to the "
11190 "process as a whole and signals that are directed to individual threads.  "
11191 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11192 "example) should be handled by a single, arbitrarily selected thread within "
11193 "the process.  LinuxThreads does not support the notion of process-directed "
11194 "signals: signals may be sent only to specific threads."
11195 msgstr ""
11196 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11197 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11198 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11199 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11200 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11201 "ルは特定のスレッドにだけ送ることができる。"
11202
11203 #. type: Plain text
11204 #: build/C/man7/pthreads.7:788
11205 msgid ""
11206 "Threads have distinct alternate signal stack settings.  However, a new "
11207 "thread's alternate signal stack settings are copied from the thread that "
11208 "created it, so that the threads initially share an alternate signal stack.  "
11209 "(A new thread should start with no alternate signal stack defined.  If two "
11210 "threads handle signals on their shared alternate signal stack at the same "
11211 "time, unpredictable program failures are likely to occur.)"
11212 msgstr ""
11213 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11214 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11215 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11216 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11217 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11218 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11219
11220 #. type: SS
11221 #: build/C/man7/pthreads.7:788
11222 #, no-wrap
11223 msgid "NPTL"
11224 msgstr "NPTL"
11225
11226 #. type: Plain text
11227 #: build/C/man7/pthreads.7:797
11228 msgid ""
11229 "With NPTL, all of the threads in a process are placed in the same thread "
11230 "group; all members of a thread group share the same PID.  NPTL does not "
11231 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11232 "signals (see also B<signal>(7)); these signals cannot be used in "
11233 "applications."
11234 msgstr ""
11235 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11236 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11237 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11238 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11239 "ションでは使用できない。"
11240
11241 #. type: Plain text
11242 #: build/C/man7/pthreads.7:799
11243 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11244 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11245
11246 #. type: Plain text
11247 #: build/C/man7/pthreads.7:808
11248 msgid "Some NPTL nonconformances occur only with older kernels:"
11249 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11250
11251 #. type: Plain text
11252 #: build/C/man7/pthreads.7:814
11253 msgid ""
11254 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11255 "rather than process-wide (fixed in kernel 2.6.9)."
11256 msgstr ""
11257 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11258 "単位の情報である (カーネル 2.6.9 で修正された)。"
11259
11260 #. type: Plain text
11261 #: build/C/man7/pthreads.7:816
11262 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11263 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11264
11265 #. type: Plain text
11266 #: build/C/man7/pthreads.7:818
11267 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11268 msgstr ""
11269 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11270
11271 #. type: Plain text
11272 #: build/C/man7/pthreads.7:822
11273 msgid ""
11274 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11275 "(fixed in kernel 2.6.16)."
11276 msgstr ""
11277 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11278 "きる (カーネル 2.6.16 で修正された)。"
11279
11280 #. type: Plain text
11281 #: build/C/man7/pthreads.7:827
11282 msgid ""
11283 "Only the main thread is permitted to make the process into a process group "
11284 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11285 msgstr ""
11286 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11287 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11288
11289 #. type: Plain text
11290 #: build/C/man7/pthreads.7:833
11291 msgid ""
11292 "Threads have distinct alternate signal stack settings.  However, a new "
11293 "thread's alternate signal stack settings are copied from the thread that "
11294 "created it, so that the threads initially share an alternate signal stack "
11295 "(fixed in kernel 2.6.16)."
11296 msgstr ""
11297 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11298 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11299 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11300 "ル 2.6.16 で修正された)。"
11301
11302 #. type: Plain text
11303 #: build/C/man7/pthreads.7:835
11304 msgid "Note the following further points about the NPTL implementation:"
11305 msgstr "NPTL の実装では以下の点についても注意すること:"
11306
11307 #. type: Plain text
11308 #: build/C/man7/pthreads.7:849
11309 msgid ""
11310 "If the stack size soft resource limit (see the description of "
11311 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11312 "I<unlimited>, then this value defines the default stack size for new "
11313 "threads.  To be effective, this limit must be set before the program is "
11314 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11315 "stacksize> in the C shell)."
11316 msgstr ""
11317 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11318 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11319 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11320 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11321 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11322 "は I<limit stacksize>)  を使って設定する。"
11323
11324 #. type: SS
11325 #: build/C/man7/pthreads.7:849
11326 #, no-wrap
11327 msgid "Determining the threading implementation"
11328 msgstr "スレッド実装の判定"
11329
11330 #. type: Plain text
11331 #: build/C/man7/pthreads.7:854
11332 msgid ""
11333 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11334 "system's threading implementation, for example:"
11335 msgstr ""
11336 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11337 "装を判定することができる。 以下に例を示す:"
11338
11339 #. type: Plain text
11340 #: build/C/man7/pthreads.7:859
11341 #, no-wrap
11342 msgid ""
11343 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11344 "NPTL 2.3.4\n"
11345 msgstr ""
11346 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11347 "NPTL 2.3.4\n"
11348
11349 #. type: Plain text
11350 #: build/C/man7/pthreads.7:864
11351 msgid ""
11352 "With older glibc versions, a command such as the following should be "
11353 "sufficient to determine the default threading implementation:"
11354 msgstr ""
11355 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11356 "ド実装を判定することができる。"
11357
11358 #. type: Plain text
11359 #: build/C/man7/pthreads.7:870
11360 #, no-wrap
11361 msgid ""
11362 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11363 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11364 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11365 msgstr ""
11366 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11367 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11368 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11369
11370 #. type: SS
11371 #: build/C/man7/pthreads.7:872
11372 #, no-wrap
11373 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11374 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11375
11376 #. type: Plain text
11377 #: build/C/man7/pthreads.7:887
11378 msgid ""
11379 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11380 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11381 "override the dynamic linker's default choice of threading implementation.  "
11382 "This variable tells the dynamic linker to assume that it is running on top "
11383 "of a particular kernel version.  By specifying a kernel version that does "
11384 "not provide the support required by NPTL, we can force the use of "
11385 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11386 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11387 "For example:"
11388 msgstr ""
11389 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11390 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11391 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11392 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11393 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11394 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11395 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11396 "ン を動作させる場合だろう)。 以下に例を示す:"
11397
11398 #. type: Plain text
11399 #: build/C/man7/pthreads.7:893
11400 #, no-wrap
11401 msgid ""
11402 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11403 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11404 "        linuxthreads-0.10 by Xavier Leroy\n"
11405 msgstr ""
11406 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11407 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11408 "        linuxthreads-0.10 by Xavier Leroy\n"
11409
11410 #. type: Plain text
11411 #: build/C/man7/pthreads.7:905
11412 msgid ""
11413 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11414 "(7), B<signal>(7),"
11415 msgstr ""
11416 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11417 "B<signal>(7),"
11418
11419 #. type: Plain text
11420 #: build/C/man7/pthreads.7:929
11421 msgid ""
11422 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11423 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11424 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11425 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11426 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11427 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11428 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11429 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11430 msgstr ""
11431 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11432 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11433 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11434 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11435 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11436 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11437 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11438 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11439 "and B<pthread_testcancel>(3)"