OSDN Git Service

(split) LDP: Update ja.po (editorical changes only)
[linuxjm/LDP_man-pages.git] / po4a / pthread / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-03-22 01:06+0900\n"
10 "PO-Revision-Date: 2013-03-24 00:55+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/getcontext.3:25
20 #, no-wrap
21 msgid "GETCONTEXT"
22 msgstr "GETCONTEXT"
23
24 #. type: TH
25 #: build/C/man3/getcontext.3:25
26 #, no-wrap
27 msgid "2009-03-15"
28 msgstr "2009-03-15"
29
30 #. type: TH
31 #: build/C/man3/getcontext.3:25 build/C/man3/pthread_attr_init.3:26
32 #: build/C/man3/pthread_attr_setaffinity_np.3:26
33 #: build/C/man3/pthread_attr_setdetachstate.3:26
34 #: build/C/man3/pthread_attr_setguardsize.3:26
35 #: build/C/man3/pthread_attr_setinheritsched.3:26
36 #: build/C/man3/pthread_attr_setschedparam.3:26
37 #: build/C/man3/pthread_attr_setschedpolicy.3:26
38 #: build/C/man3/pthread_attr_setscope.3:26
39 #: build/C/man3/pthread_attr_setstack.3:26
40 #: build/C/man3/pthread_attr_setstackaddr.3:26
41 #: build/C/man3/pthread_attr_setstacksize.3:26
42 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
43 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
44 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
45 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
46 #: build/C/man3/pthread_getattr_np.3:26
47 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
48 #: build/C/man3/pthread_kill.3:26
49 #: build/C/man3/pthread_kill_other_threads_np.3:26
50 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
51 #: build/C/man3/pthread_setcancelstate.3:26
52 #: build/C/man3/pthread_setconcurrency.3:25
53 #: build/C/man3/pthread_setname_np.3:26
54 #: build/C/man3/pthread_setschedparam.3:26
55 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
56 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
57 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
58 #: build/C/man7/pthreads.7:26
59 #, no-wrap
60 msgid "Linux"
61 msgstr "Linux"
62
63 #. type: TH
64 #: build/C/man3/getcontext.3:25 build/C/man3/makecontext.3:28
65 #: build/C/man3/pthread_attr_init.3:26
66 #: build/C/man3/pthread_attr_setaffinity_np.3:26
67 #: build/C/man3/pthread_attr_setdetachstate.3:26
68 #: build/C/man3/pthread_attr_setguardsize.3:26
69 #: build/C/man3/pthread_attr_setinheritsched.3:26
70 #: build/C/man3/pthread_attr_setschedparam.3:26
71 #: build/C/man3/pthread_attr_setschedpolicy.3:26
72 #: build/C/man3/pthread_attr_setscope.3:26
73 #: build/C/man3/pthread_attr_setstack.3:26
74 #: build/C/man3/pthread_attr_setstackaddr.3:26
75 #: build/C/man3/pthread_attr_setstacksize.3:26
76 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
77 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
78 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
79 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
80 #: build/C/man3/pthread_getattr_np.3:26
81 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
82 #: build/C/man3/pthread_kill.3:26
83 #: build/C/man3/pthread_kill_other_threads_np.3:26
84 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
85 #: build/C/man3/pthread_setcancelstate.3:26
86 #: build/C/man3/pthread_setconcurrency.3:25
87 #: build/C/man3/pthread_setname_np.3:26
88 #: build/C/man3/pthread_setschedparam.3:26
89 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
90 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
91 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
92 #: build/C/man7/pthreads.7:26
93 #, no-wrap
94 msgid "Linux Programmer's Manual"
95 msgstr "Linux Programmer's Manual"
96
97 #. type: SH
98 #: build/C/man3/getcontext.3:26 build/C/man3/makecontext.3:29
99 #: build/C/man3/pthread_attr_init.3:27
100 #: build/C/man3/pthread_attr_setaffinity_np.3:27
101 #: build/C/man3/pthread_attr_setdetachstate.3:27
102 #: build/C/man3/pthread_attr_setguardsize.3:27
103 #: build/C/man3/pthread_attr_setinheritsched.3:27
104 #: build/C/man3/pthread_attr_setschedparam.3:27
105 #: build/C/man3/pthread_attr_setschedpolicy.3:27
106 #: build/C/man3/pthread_attr_setscope.3:27
107 #: build/C/man3/pthread_attr_setstack.3:27
108 #: build/C/man3/pthread_attr_setstackaddr.3:27
109 #: build/C/man3/pthread_attr_setstacksize.3:27
110 #: build/C/man3/pthread_cancel.3:27 build/C/man3/pthread_cleanup_push.3:27
111 #: build/C/man3/pthread_cleanup_push_defer_np.3:27
112 #: build/C/man3/pthread_create.3:27 build/C/man3/pthread_detach.3:27
113 #: build/C/man3/pthread_equal.3:27 build/C/man3/pthread_exit.3:27
114 #: build/C/man3/pthread_getattr_np.3:27
115 #: build/C/man3/pthread_getcpuclockid.3:27 build/C/man3/pthread_join.3:27
116 #: build/C/man3/pthread_kill.3:27
117 #: build/C/man3/pthread_kill_other_threads_np.3:27
118 #: build/C/man3/pthread_self.3:27 build/C/man3/pthread_setaffinity_np.3:27
119 #: build/C/man3/pthread_setcancelstate.3:27
120 #: build/C/man3/pthread_setconcurrency.3:26
121 #: build/C/man3/pthread_setname_np.3:27
122 #: build/C/man3/pthread_setschedparam.3:27
123 #: build/C/man3/pthread_setschedprio.3:27 build/C/man3/pthread_sigmask.3:27
124 #: build/C/man3/pthread_sigqueue.3:26 build/C/man3/pthread_testcancel.3:27
125 #: build/C/man3/pthread_tryjoin_np.3:27 build/C/man3/pthread_yield.3:26
126 #: build/C/man7/pthreads.7:27
127 #, no-wrap
128 msgid "NAME"
129 msgstr "名前"
130
131 #. type: Plain text
132 #: build/C/man3/getcontext.3:28
133 msgid "getcontext, setcontext - get or set the user context"
134 msgstr "getcontext, setcontext - ユーザコンテキストを取得/設定する"
135
136 #. type: SH
137 #: build/C/man3/getcontext.3:28 build/C/man3/makecontext.3:31
138 #: build/C/man3/pthread_attr_init.3:30
139 #: build/C/man3/pthread_attr_setaffinity_np.3:30
140 #: build/C/man3/pthread_attr_setdetachstate.3:30
141 #: build/C/man3/pthread_attr_setguardsize.3:30
142 #: build/C/man3/pthread_attr_setinheritsched.3:30
143 #: build/C/man3/pthread_attr_setschedparam.3:30
144 #: build/C/man3/pthread_attr_setschedpolicy.3:30
145 #: build/C/man3/pthread_attr_setscope.3:30
146 #: build/C/man3/pthread_attr_setstack.3:30
147 #: build/C/man3/pthread_attr_setstackaddr.3:30
148 #: build/C/man3/pthread_attr_setstacksize.3:30
149 #: build/C/man3/pthread_cancel.3:29 build/C/man3/pthread_cleanup_push.3:30
150 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
151 #: build/C/man3/pthread_create.3:29 build/C/man3/pthread_detach.3:29
152 #: build/C/man3/pthread_equal.3:29 build/C/man3/pthread_exit.3:29
153 #: build/C/man3/pthread_getattr_np.3:29
154 #: build/C/man3/pthread_getcpuclockid.3:29 build/C/man3/pthread_join.3:29
155 #: build/C/man3/pthread_kill.3:29
156 #: build/C/man3/pthread_kill_other_threads_np.3:29
157 #: build/C/man3/pthread_self.3:29 build/C/man3/pthread_setaffinity_np.3:30
158 #: build/C/man3/pthread_setcancelstate.3:30
159 #: build/C/man3/pthread_setconcurrency.3:29
160 #: build/C/man3/pthread_setname_np.3:29
161 #: build/C/man3/pthread_setschedparam.3:30
162 #: build/C/man3/pthread_setschedprio.3:29 build/C/man3/pthread_sigmask.3:29
163 #: build/C/man3/pthread_sigqueue.3:28 build/C/man3/pthread_testcancel.3:29
164 #: build/C/man3/pthread_tryjoin_np.3:30 build/C/man3/pthread_yield.3:28
165 #, no-wrap
166 msgid "SYNOPSIS"
167 msgstr "書式"
168
169 #. type: Plain text
170 #: build/C/man3/getcontext.3:30 build/C/man3/makecontext.3:33
171 msgid "B<#include E<lt>ucontext.hE<gt>>"
172 msgstr "B<#include E<lt>ucontext.hE<gt>>"
173
174 #. type: Plain text
175 #: build/C/man3/getcontext.3:32
176 msgid "B<int getcontext(ucontext_t *>I<ucp>B<);>"
177 msgstr "B<int getcontext(ucontext_t *>I<ucp>B<);>"
178
179 #. type: Plain text
180 #: build/C/man3/getcontext.3:34
181 msgid "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
182 msgstr "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
183
184 #. type: SH
185 #: build/C/man3/getcontext.3:34 build/C/man3/makecontext.3:38
186 #: build/C/man3/pthread_attr_init.3:39
187 #: build/C/man3/pthread_attr_setaffinity_np.3:42
188 #: build/C/man3/pthread_attr_setdetachstate.3:41
189 #: build/C/man3/pthread_attr_setguardsize.3:41
190 #: build/C/man3/pthread_attr_setinheritsched.3:41
191 #: build/C/man3/pthread_attr_setschedparam.3:41
192 #: build/C/man3/pthread_attr_setschedpolicy.3:41
193 #: build/C/man3/pthread_attr_setscope.3:41
194 #: build/C/man3/pthread_attr_setstack.3:54
195 #: build/C/man3/pthread_attr_setstackaddr.3:41
196 #: build/C/man3/pthread_attr_setstacksize.3:41
197 #: build/C/man3/pthread_cancel.3:37 build/C/man3/pthread_cleanup_push.3:40
198 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
199 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
200 #: build/C/man3/pthread_equal.3:37 build/C/man3/pthread_exit.3:37
201 #: build/C/man3/pthread_getattr_np.3:38
202 #: build/C/man3/pthread_getcpuclockid.3:38 build/C/man3/pthread_join.3:37
203 #: build/C/man3/pthread_kill.3:37
204 #: build/C/man3/pthread_kill_other_threads_np.3:35
205 #: build/C/man3/pthread_self.3:37 build/C/man3/pthread_setaffinity_np.3:42
206 #: build/C/man3/pthread_setcancelstate.3:39
207 #: build/C/man3/pthread_setconcurrency.3:38
208 #: build/C/man3/pthread_setname_np.3:39
209 #: build/C/man3/pthread_setschedparam.3:41
210 #: build/C/man3/pthread_setschedprio.3:37 build/C/man3/pthread_sigmask.3:38
211 #: build/C/man3/pthread_sigqueue.3:45 build/C/man3/pthread_testcancel.3:37
212 #: build/C/man3/pthread_tryjoin_np.3:42 build/C/man3/pthread_yield.3:37
213 #: build/C/man7/pthreads.7:29
214 #, no-wrap
215 msgid "DESCRIPTION"
216 msgstr "説明"
217
218 #. type: Plain text
219 #: build/C/man3/getcontext.3:46
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:50
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:60
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:77
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:82
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:94
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:98
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:109
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:116
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:116 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:84
351 #: build/C/man3/pthread_attr_setschedparam.3:74
352 #: build/C/man3/pthread_attr_setschedpolicy.3:72
353 #: build/C/man3/pthread_attr_setscope.3:91
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:109 build/C/man3/pthread_cleanup_push.3:119
358 #: build/C/man3/pthread_create.3:115 build/C/man3/pthread_detach.3:49
359 #: build/C/man3/pthread_equal.3:41 build/C/man3/pthread_exit.3:71
360 #: build/C/man3/pthread_getattr_np.3:73
361 #: build/C/man3/pthread_getcpuclockid.3:46 build/C/man3/pthread_join.3:70
362 #: build/C/man3/pthread_kill.3:52 build/C/man3/pthread_self.3:46
363 #: build/C/man3/pthread_setaffinity_np.3:77
364 #: build/C/man3/pthread_setcancelstate.3:92
365 #: build/C/man3/pthread_setconcurrency.3:56
366 #: build/C/man3/pthread_setname_np.3:72
367 #: build/C/man3/pthread_setschedparam.3:104
368 #: build/C/man3/pthread_setschedprio.3:53 build/C/man3/pthread_sigmask.3:49
369 #: build/C/man3/pthread_sigqueue.3:65 build/C/man3/pthread_testcancel.3:50
370 #: build/C/man3/pthread_tryjoin_np.3:85 build/C/man3/pthread_yield.3:44
371 #, no-wrap
372 msgid "RETURN VALUE"
373 msgstr "返り値"
374
375 #. type: Plain text
376 #: build/C/man3/getcontext.3:124
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:124 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:87
391 #: build/C/man3/pthread_attr_setschedparam.3:77
392 #: build/C/man3/pthread_attr_setschedpolicy.3:75
393 #: build/C/man3/pthread_attr_setscope.3:94
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:114 build/C/man3/pthread_cleanup_push.3:121
398 #: build/C/man3/pthread_create.3:122 build/C/man3/pthread_detach.3:54
399 #: build/C/man3/pthread_equal.3:45 build/C/man3/pthread_exit.3:73
400 #: build/C/man3/pthread_getattr_np.3:76
401 #: build/C/man3/pthread_getcpuclockid.3:49 build/C/man3/pthread_join.3:75
402 #: build/C/man3/pthread_kill.3:57 build/C/man3/pthread_self.3:48
403 #: build/C/man3/pthread_setaffinity_np.3:80
404 #: build/C/man3/pthread_setcancelstate.3:95
405 #: build/C/man3/pthread_setconcurrency.3:68
406 #: build/C/man3/pthread_setname_np.3:75
407 #: build/C/man3/pthread_setschedparam.3:112
408 #: build/C/man3/pthread_setschedprio.3:61 build/C/man3/pthread_sigmask.3:54
409 #: build/C/man3/pthread_sigqueue.3:70 build/C/man3/pthread_testcancel.3:54
410 #: build/C/man3/pthread_tryjoin_np.3:89 build/C/man3/pthread_yield.3:49
411 #, no-wrap
412 msgid "ERRORS"
413 msgstr "エラー"
414
415 #. type: Plain text
416 #: build/C/man3/getcontext.3:126
417 msgid "None defined."
418 msgstr "定義されていない。"
419
420 #. type: SH
421 #: build/C/man3/getcontext.3:126 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:101
427 #: build/C/man3/pthread_attr_setschedparam.3:89
428 #: build/C/man3/pthread_attr_setschedpolicy.3:89
429 #: build/C/man3/pthread_attr_setscope.3:107
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:122 build/C/man3/pthread_cleanup_push.3:125
434 #: build/C/man3/pthread_cleanup_push_defer_np.3:101
435 #: build/C/man3/pthread_create.3:146 build/C/man3/pthread_detach.3:64
436 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
437 #: build/C/man3/pthread_getattr_np.3:98
438 #: build/C/man3/pthread_getcpuclockid.3:65 build/C/man3/pthread_join.3:98
439 #: build/C/man3/pthread_kill.3:66
440 #: build/C/man3/pthread_kill_other_threads_np.3:47
441 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_setaffinity_np.3:121
442 #: build/C/man3/pthread_setcancelstate.3:113
443 #: build/C/man3/pthread_setconcurrency.3:83
444 #: build/C/man3/pthread_setname_np.3:102
445 #: build/C/man3/pthread_setschedparam.3:141
446 #: build/C/man3/pthread_setschedprio.3:83 build/C/man3/pthread_sigmask.3:57
447 #: build/C/man3/pthread_sigqueue.3:93 build/C/man3/pthread_testcancel.3:58
448 #: build/C/man3/pthread_tryjoin_np.3:112 build/C/man3/pthread_yield.3:53
449 #, no-wrap
450 msgid "CONFORMING TO"
451 msgstr "準拠"
452
453 #. type: Plain text
454 #: build/C/man3/getcontext.3:132
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:132 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:91
471 #: build/C/man3/pthread_attr_setscope.3:109
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:124 build/C/man3/pthread_cleanup_push.3:127
476 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
477 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
478 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
479 #: build/C/man3/pthread_kill.3:68
480 #: build/C/man3/pthread_kill_other_threads_np.3:50
481 #: build/C/man3/pthread_self.3:52 build/C/man3/pthread_setaffinity_np.3:124
482 #: build/C/man3/pthread_setcancelstate.3:115
483 #: build/C/man3/pthread_setconcurrency.3:85
484 #: build/C/man3/pthread_setname_np.3:104
485 #: build/C/man3/pthread_setschedparam.3:143
486 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
487 #: build/C/man3/pthread_yield.3:59
488 #, no-wrap
489 msgid "NOTES"
490 msgstr "注意"
491
492 #. type: Plain text
493 #: build/C/man3/getcontext.3:149
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:160
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:160 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:122
533 #: build/C/man3/pthread_attr_setschedparam.3:98
534 #: build/C/man3/pthread_attr_setschedpolicy.3:94
535 #: build/C/man3/pthread_attr_setscope.3:120
536 #: build/C/man3/pthread_attr_setstack.3:156
537 #: build/C/man3/pthread_attr_setstackaddr.3:110
538 #: build/C/man3/pthread_attr_setstacksize.3:111
539 #: build/C/man3/pthread_cancel.3:223 build/C/man3/pthread_cleanup_push.3:311
540 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
541 #: build/C/man3/pthread_create.3:369 build/C/man3/pthread_detach.3:97
542 #: build/C/man3/pthread_equal.3:56 build/C/man3/pthread_exit.3:105
543 #: build/C/man3/pthread_getattr_np.3:345
544 #: build/C/man3/pthread_getcpuclockid.3:169 build/C/man3/pthread_join.3:127
545 #: build/C/man3/pthread_kill.3:75
546 #: build/C/man3/pthread_kill_other_threads_np.3:66
547 #: build/C/man3/pthread_self.3:76 build/C/man3/pthread_setaffinity_np.3:206
548 #: build/C/man3/pthread_setcancelstate.3:177
549 #: build/C/man3/pthread_setconcurrency.3:100
550 #: build/C/man3/pthread_setname_np.3:198
551 #: build/C/man3/pthread_setschedparam.3:431
552 #: build/C/man3/pthread_setschedprio.3:91 build/C/man3/pthread_sigmask.3:135
553 #: build/C/man3/pthread_sigqueue.3:95 build/C/man3/pthread_testcancel.3:63
554 #: build/C/man3/pthread_tryjoin_np.3:135 build/C/man3/pthread_yield.3:62
555 #: build/C/man7/pthreads.7:895
556 #, no-wrap
557 msgid "SEE ALSO"
558 msgstr "関連項目"
559
560 #. type: Plain text
561 #: build/C/man3/getcontext.3:167
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:167 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:133
576 #: build/C/man3/pthread_attr_setschedparam.3:110
577 #: build/C/man3/pthread_attr_setschedpolicy.3:105
578 #: build/C/man3/pthread_attr_setscope.3:130
579 #: build/C/man3/pthread_attr_setstack.3:168
580 #: build/C/man3/pthread_attr_setstackaddr.3:116
581 #: build/C/man3/pthread_attr_setstacksize.3:118
582 #: build/C/man3/pthread_cancel.3:235 build/C/man3/pthread_cleanup_push.3:317
583 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
584 #: build/C/man3/pthread_create.3:382 build/C/man3/pthread_detach.3:104
585 #: build/C/man3/pthread_equal.3:60 build/C/man3/pthread_exit.3:109
586 #: build/C/man3/pthread_getattr_np.3:361
587 #: build/C/man3/pthread_getcpuclockid.3:177 build/C/man3/pthread_join.3:134
588 #: build/C/man3/pthread_kill.3:84
589 #: build/C/man3/pthread_kill_other_threads_np.3:72
590 #: build/C/man3/pthread_self.3:80 build/C/man3/pthread_setaffinity_np.3:214
591 #: build/C/man3/pthread_setcancelstate.3:182
592 #: build/C/man3/pthread_setconcurrency.3:103
593 #: build/C/man3/pthread_setname_np.3:204
594 #: build/C/man3/pthread_setschedparam.3:445
595 #: build/C/man3/pthread_setschedprio.3:105 build/C/man3/pthread_sigmask.3:144
596 #: build/C/man3/pthread_sigqueue.3:103 build/C/man3/pthread_testcancel.3:68
597 #: build/C/man3/pthread_tryjoin_np.3:140 build/C/man3/pthread_yield.3:66
598 #: build/C/man7/pthreads.7:929
599 #, no-wrap
600 msgid "COLOPHON"
601 msgstr "この文書について"
602
603 #. type: Plain text
604 #: build/C/man3/getcontext.3:174 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:140
610 #: build/C/man3/pthread_attr_setschedparam.3:117
611 #: build/C/man3/pthread_attr_setschedpolicy.3:112
612 #: build/C/man3/pthread_attr_setscope.3:137
613 #: build/C/man3/pthread_attr_setstack.3:175
614 #: build/C/man3/pthread_attr_setstackaddr.3:123
615 #: build/C/man3/pthread_attr_setstacksize.3:125
616 #: build/C/man3/pthread_cancel.3:242 build/C/man3/pthread_cleanup_push.3:324
617 #: build/C/man3/pthread_cleanup_push_defer_np.3:117
618 #: build/C/man3/pthread_create.3:389 build/C/man3/pthread_detach.3:111
619 #: build/C/man3/pthread_equal.3:67 build/C/man3/pthread_exit.3:116
620 #: build/C/man3/pthread_getattr_np.3:368
621 #: build/C/man3/pthread_getcpuclockid.3:184 build/C/man3/pthread_join.3:141
622 #: build/C/man3/pthread_kill.3:91
623 #: build/C/man3/pthread_kill_other_threads_np.3:79
624 #: build/C/man3/pthread_self.3:87 build/C/man3/pthread_setaffinity_np.3:221
625 #: build/C/man3/pthread_setcancelstate.3:189
626 #: build/C/man3/pthread_setconcurrency.3:110
627 #: build/C/man3/pthread_setname_np.3:211
628 #: build/C/man3/pthread_setschedparam.3:452
629 #: build/C/man3/pthread_setschedprio.3:112 build/C/man3/pthread_sigmask.3:151
630 #: build/C/man3/pthread_sigqueue.3:110 build/C/man3/pthread_testcancel.3:75
631 #: build/C/man3/pthread_tryjoin_np.3:147 build/C/man3/pthread_yield.3:73
632 #: build/C/man7/pthreads.7:936
633 msgid ""
634 "This page is part of release 3.50 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.50 の一部\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 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができるようになっている。"
687
688 #. type: Plain text
689 #: build/C/man3/makecontext.3:52
690 msgid "For the type and the first two functions, see B<getcontext>(3)."
691 msgstr "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
692
693 #. type: Plain text
694 #: build/C/man3/makecontext.3:64
695 msgid ""
696 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
697 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
698 "B<makecontext>(), the caller must allocate a new stack for this context and "
699 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
700 "and assign its address to I<ucp-E<gt>uc_link>."
701 msgstr "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する (I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しいスタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継のコンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければならない。"
702
703 #. type: Plain text
704 #: build/C/man3/makecontext.3:78
705 msgid ""
706 "When this context is later activated (using B<setcontext>(3)  or "
707 "B<swapcontext>())  the function I<func> is called, and passed the series of "
708 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
709 "number of these arguments in I<argc>.  When this function returns, the "
710 "successor context is activated.  If the successor context pointer is NULL, "
711 "the thread exits."
712 msgstr "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によって)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 (I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効になる。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
713
714 #. type: Plain text
715 #: build/C/man3/makecontext.3:84
716 msgid ""
717 "The B<swapcontext>()  function saves the current context in the structure "
718 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
719 msgstr ""
720 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
721 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
722
723 #. type: Plain text
724 #: build/C/man3/makecontext.3:96
725 msgid ""
726 "When successful, B<swapcontext>()  does not return.  (But we may return "
727 "later, in case I<oucp> is activated, in which case it looks like "
728 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
729 "sets I<errno> appropriately."
730 msgstr ""
731 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
732 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
733 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
734 "て設定する。"
735
736 #. type: TP
737 #: build/C/man3/makecontext.3:97
738 #: build/C/man3/pthread_attr_setaffinity_np.3:102
739 #: build/C/man3/pthread_getattr_np.3:77
740 #, no-wrap
741 msgid "B<ENOMEM>"
742 msgstr "B<ENOMEM>"
743
744 #. type: Plain text
745 #: build/C/man3/makecontext.3:100
746 msgid "Insufficient stack space left."
747 msgstr "スタックに割り当てる空間が残っていない。"
748
749 #. type: SH
750 #: build/C/man3/makecontext.3:100
751 #: build/C/man3/pthread_attr_setaffinity_np.3:106
752 #: build/C/man3/pthread_attr_setguardsize.3:104
753 #: build/C/man3/pthread_attr_setstack.3:110
754 #: build/C/man3/pthread_attr_setstackaddr.3:81
755 #: build/C/man3/pthread_attr_setstacksize.3:81
756 #: build/C/man3/pthread_getattr_np.3:96
757 #: build/C/man3/pthread_getcpuclockid.3:63
758 #: build/C/man3/pthread_setaffinity_np.3:119
759 #: build/C/man3/pthread_setconcurrency.3:81
760 #: build/C/man3/pthread_setname_np.3:100
761 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
762 #: build/C/man3/pthread_tryjoin_np.3:110
763 #, no-wrap
764 msgid "VERSIONS"
765 msgstr "バージョン"
766
767 #. type: Plain text
768 #: build/C/man3/makecontext.3:105
769 msgid ""
770 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
771 "2.1."
772 msgstr ""
773 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
774 "されている。"
775
776 #. type: Plain text
777 #: build/C/man3/makecontext.3:113
778 msgid ""
779 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
780 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
781 "recommending that applications be rewritten to use POSIX threads instead."
782 msgstr ""
783 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
784 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
785 "POSIX スレッドを使って書き直すことが 推奨されている。"
786
787 #. type: Plain text
788 #: build/C/man3/makecontext.3:121
789 msgid ""
790 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
791 "namely, this struct contains the start and length of a memory area to be "
792 "used as the stack, regardless of the direction of growth of the stack.  "
793 "Thus, it is not necessary for the user program to worry about this direction."
794 msgstr ""
795 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
796 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
797 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
798 "て、ユーザプログラムはこの件については心配しなくてよい。"
799
800 #. type: Plain text
801 #: build/C/man3/makecontext.3:137
802 msgid ""
803 "On architectures where I<int> and pointer types are the same size (e.g., "
804 "x86-32, where both types are 32 bits), you may be able to get away with "
805 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
806 "However, doing this is not guaranteed to be portable, is undefined according "
807 "to the standards, and won't work on architectures where pointers are larger "
808 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
809 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
810 "g., x86-64)."
811 msgstr ""
812 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
813 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
814 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
815 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
816 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
817 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
818 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
819 "できるようになっている。"
820
821 #. type: SH
822 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
823 #: build/C/man3/pthread_attr_setdetachstate.3:108
824 #: build/C/man3/pthread_attr_setguardsize.3:155
825 #: build/C/man3/pthread_attr_setinheritsched.3:119
826 #: build/C/man3/pthread_attr_setschedparam.3:95
827 #: build/C/man3/pthread_attr_setschedpolicy.3:91
828 #: build/C/man3/pthread_attr_setstack.3:153
829 #: build/C/man3/pthread_attr_setstacksize.3:108
830 #: build/C/man3/pthread_cancel.3:132 build/C/man3/pthread_cleanup_push.3:151
831 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
832 #: build/C/man3/pthread_getattr_np.3:101
833 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
834 #: build/C/man3/pthread_setaffinity_np.3:154
835 #: build/C/man3/pthread_setcancelstate.3:174
836 #: build/C/man3/pthread_setname_np.3:112
837 #: build/C/man3/pthread_setschedparam.3:149 build/C/man3/pthread_sigmask.3:61
838 #: build/C/man3/pthread_testcancel.3:60 build/C/man3/pthread_tryjoin_np.3:115
839 #, no-wrap
840 msgid "EXAMPLE"
841 msgstr "例"
842
843 #. type: Plain text
844 #: build/C/man3/makecontext.3:145
845 msgid ""
846 "The example program below demonstrates the use of B<getcontext>(3), "
847 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
848 "following output:"
849 msgstr "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行すると、以下のような出力が得られる:"
850
851 #. type: Plain text
852 #: build/C/man3/makecontext.3:157
853 #, no-wrap
854 msgid ""
855 "$B< ./a.out>\n"
856 "main: swapcontext(&uctx_main, &uctx_func2)\n"
857 "func2: started\n"
858 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
859 "func1: started\n"
860 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
861 "func2: returning\n"
862 "func1: returning\n"
863 "main: exiting\n"
864 msgstr ""
865 "$B< ./a.out>\n"
866 "main: swapcontext(&uctx_main, &uctx_func2)\n"
867 "func2: started\n"
868 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
869 "func1: started\n"
870 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
871 "func2: returning\n"
872 "func1: returning\n"
873 "main: exiting\n"
874
875 #. type: SS
876 #: build/C/man3/makecontext.3:159 build/C/man3/pthread_attr_init.3:148
877 #: build/C/man3/pthread_cancel.3:148 build/C/man3/pthread_cleanup_push.3:227
878 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
879 #: build/C/man3/pthread_getcpuclockid.3:95
880 #: build/C/man3/pthread_setname_np.3:138
881 #: build/C/man3/pthread_setschedparam.3:224 build/C/man3/pthread_sigmask.3:79
882 #, no-wrap
883 msgid "Program source"
884 msgstr "プログラムのソース"
885
886 #. type: Plain text
887 #: build/C/man3/makecontext.3:165
888 #, no-wrap
889 msgid ""
890 "#include E<lt>ucontext.hE<gt>\n"
891 "#include E<lt>stdio.hE<gt>\n"
892 "#include E<lt>stdlib.hE<gt>\n"
893 msgstr ""
894 "#include E<lt>ucontext.hE<gt>\n"
895 "#include E<lt>stdio.hE<gt>\n"
896 "#include E<lt>stdlib.hE<gt>\n"
897
898 #. type: Plain text
899 #: build/C/man3/makecontext.3:167
900 #, no-wrap
901 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
902 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
903
904 #. type: Plain text
905 #: build/C/man3/makecontext.3:170
906 #, no-wrap
907 msgid ""
908 "#define handle_error(msg) \\e\n"
909 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
910 msgstr ""
911 "#define handle_error(msg) \\e\n"
912 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
913
914 #. type: Plain text
915 #: build/C/man3/makecontext.3:180
916 #, no-wrap
917 msgid ""
918 "static void\n"
919 "func1(void)\n"
920 "{\n"
921 "    printf(\"func1: started\\en\");\n"
922 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
923 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
924 "        handle_error(\"swapcontext\");\n"
925 "    printf(\"func1: returning\\en\");\n"
926 "}\n"
927 msgstr ""
928 "static void\n"
929 "func1(void)\n"
930 "{\n"
931 "    printf(\"func1: started\\en\");\n"
932 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
933 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
934 "        handle_error(\"swapcontext\");\n"
935 "    printf(\"func1: returning\\en\");\n"
936 "}\n"
937
938 #. type: Plain text
939 #: build/C/man3/makecontext.3:190
940 #, no-wrap
941 msgid ""
942 "static void\n"
943 "func2(void)\n"
944 "{\n"
945 "    printf(\"func2: started\\en\");\n"
946 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
947 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
948 "        handle_error(\"swapcontext\");\n"
949 "    printf(\"func2: returning\\en\");\n"
950 "}\n"
951 msgstr ""
952 "static void\n"
953 "func2(void)\n"
954 "{\n"
955 "    printf(\"func2: started\\en\");\n"
956 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
957 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
958 "        handle_error(\"swapcontext\");\n"
959 "    printf(\"func2: returning\\en\");\n"
960 "}\n"
961
962 #. type: Plain text
963 #: build/C/man3/makecontext.3:196
964 #, no-wrap
965 msgid ""
966 "int\n"
967 "main(int argc, char *argv[])\n"
968 "{\n"
969 "    char func1_stack[16384];\n"
970 "    char func2_stack[16384];\n"
971 msgstr ""
972 "int\n"
973 "main(int argc, char *argv[])\n"
974 "{\n"
975 "    char func1_stack[16384];\n"
976 "    char func2_stack[16384];\n"
977
978 #. type: Plain text
979 #: build/C/man3/makecontext.3:203
980 #, no-wrap
981 msgid ""
982 "    if (getcontext(&uctx_func1) == -1)\n"
983 "        handle_error(\"getcontext\");\n"
984 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
985 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
986 "    uctx_func1.uc_link = &uctx_main;\n"
987 "    makecontext(&uctx_func1, func1, 0);\n"
988 msgstr ""
989 "    if (getcontext(&uctx_func1) == -1)\n"
990 "        handle_error(\"getcontext\");\n"
991 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
992 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
993 "    uctx_func1.uc_link = &uctx_main;\n"
994 "    makecontext(&uctx_func1, func1, 0);\n"
995
996 #. type: Plain text
997 #: build/C/man3/makecontext.3:211
998 #, no-wrap
999 msgid ""
1000 "    if (getcontext(&uctx_func2) == -1)\n"
1001 "        handle_error(\"getcontext\");\n"
1002 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1003 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1004 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1005 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1006 "    makecontext(&uctx_func2, func2, 0);\n"
1007 msgstr ""
1008 "    if (getcontext(&uctx_func2) == -1)\n"
1009 "        handle_error(\"getcontext\");\n"
1010 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1011 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1012 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1013 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1014 "    makecontext(&uctx_func2, func2, 0);\n"
1015
1016 #. type: Plain text
1017 #: build/C/man3/makecontext.3:215
1018 #, no-wrap
1019 msgid ""
1020 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1021 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1022 "        handle_error(\"swapcontext\");\n"
1023 msgstr ""
1024 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1025 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1026 "        handle_error(\"swapcontext\");\n"
1027
1028 #. type: Plain text
1029 #: build/C/man3/makecontext.3:219
1030 #, no-wrap
1031 msgid ""
1032 "    printf(\"main: exiting\\en\");\n"
1033 "    exit(EXIT_SUCCESS);\n"
1034 "}\n"
1035 msgstr ""
1036 "    printf(\"main: exiting\\en\");\n"
1037 "    exit(EXIT_SUCCESS);\n"
1038 "}\n"
1039
1040 #. type: Plain text
1041 #: build/C/man3/makecontext.3:226
1042 msgid ""
1043 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1044 "B<sigsetjmp>(3)"
1045 msgstr "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), B<sigsetjmp>(3)"
1046
1047 #. type: TH
1048 #: build/C/man3/pthread_attr_init.3:26
1049 #, no-wrap
1050 msgid "PTHREAD_ATTR_INIT"
1051 msgstr "PTHREAD_ATTR_INIT"
1052
1053 #. type: TH
1054 #: build/C/man3/pthread_attr_init.3:26
1055 #, no-wrap
1056 msgid "2008-11-11"
1057 msgstr "2008-11-11"
1058
1059 #. type: Plain text
1060 #: build/C/man3/pthread_attr_init.3:30
1061 msgid ""
1062 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1063 "attributes object"
1064 msgstr ""
1065 "pthread_attr_init, pthread_attr_destroy - \n"
1066 "スレッド属性オブジェクトの初期化と破棄を行う"
1067
1068 #. type: Plain text
1069 #: build/C/man3/pthread_attr_init.3:33
1070 #: build/C/man3/pthread_attr_setdetachstate.3:33
1071 #: build/C/man3/pthread_attr_setguardsize.3:33
1072 #: build/C/man3/pthread_attr_setinheritsched.3:33
1073 #: build/C/man3/pthread_attr_setschedparam.3:33
1074 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1075 #: build/C/man3/pthread_attr_setscope.3:33
1076 #: build/C/man3/pthread_attr_setstack.3:33
1077 #: build/C/man3/pthread_attr_setstackaddr.3:33
1078 #: build/C/man3/pthread_attr_setstacksize.3:33
1079 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1080 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1081 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1082 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1083 #: build/C/man3/pthread_join.3:32
1084 #: build/C/man3/pthread_kill_other_threads_np.3:32
1085 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1086 #: build/C/man3/pthread_setconcurrency.3:32
1087 #: build/C/man3/pthread_setschedparam.3:33
1088 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1089 #: build/C/man3/pthread_testcancel.3:32
1090 #, no-wrap
1091 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1092 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1093
1094 #. type: Plain text
1095 #: build/C/man3/pthread_attr_init.3:36
1096 #, no-wrap
1097 msgid ""
1098 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1099 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1100 msgstr ""
1101 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1102 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1103
1104 #. type: Plain text
1105 #: build/C/man3/pthread_attr_init.3:38
1106 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1107 #: build/C/man3/pthread_attr_setdetachstate.3:40
1108 #: build/C/man3/pthread_attr_setguardsize.3:40
1109 #: build/C/man3/pthread_attr_setinheritsched.3:40
1110 #: build/C/man3/pthread_attr_setschedparam.3:40
1111 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1112 #: build/C/man3/pthread_attr_setscope.3:40
1113 #: build/C/man3/pthread_attr_setstack.3:40
1114 #: build/C/man3/pthread_attr_setstackaddr.3:40
1115 #: build/C/man3/pthread_attr_setstacksize.3:40
1116 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1117 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1118 #: build/C/man3/pthread_getattr_np.3:37
1119 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1120 #: build/C/man3/pthread_setaffinity_np.3:41
1121 #: build/C/man3/pthread_setcancelstate.3:38
1122 #: build/C/man3/pthread_setconcurrency.3:37
1123 #: build/C/man3/pthread_setschedparam.3:40
1124 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1125 #, no-wrap
1126 msgid "Compile and link with I<-pthread>.\n"
1127 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1128
1129 #. type: Plain text
1130 #: build/C/man3/pthread_attr_init.3:50
1131 msgid ""
1132 "The B<pthread_attr_init>()  function initializes the thread attributes "
1133 "object pointed to by I<attr> with default attribute values.  After this "
1134 "call, individual attributes of the object can be set using various related "
1135 "functions (listed under SEE ALSO), and then the object can be used in one or "
1136 "more B<pthread_create>(3)  calls that create threads."
1137 msgstr ""
1138 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1139 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1140 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1141 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1142 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1143 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1144
1145 #. type: Plain text
1146 #: build/C/man3/pthread_attr_init.3:55
1147 msgid ""
1148 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1149 "already been initialized results in undefined behavior."
1150 msgstr ""
1151 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1152 "B<pthread_attr_init>() を呼び出した場合、\n"
1153 "どのような動作になるかは不定である。"
1154
1155 #. type: Plain text
1156 #: build/C/man3/pthread_attr_init.3:62
1157 msgid ""
1158 "When a thread attributes object is no longer required, it should be "
1159 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1160 "thread attributes object has no effect on threads that were created using "
1161 "that object."
1162 msgstr ""
1163 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1164 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1165 "スレッド属性オブジェクトを破棄しても、\n"
1166 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1167
1168 #. type: Plain text
1169 #: build/C/man3/pthread_attr_init.3:68
1170 msgid ""
1171 "Once a thread attributes object has been destroyed, it can be reinitialized "
1172 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1173 "attributes object has undefined results."
1174 msgstr ""
1175 "いったん破棄したスレッド属性オブジェクトは、\n"
1176 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1177 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1178 "使った場合の結果は不定である。"
1179
1180 #. type: Plain text
1181 #: build/C/man3/pthread_attr_init.3:71
1182 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1183 #: build/C/man3/pthread_attr_setdetachstate.3:80
1184 #: build/C/man3/pthread_attr_setguardsize.3:93
1185 #: build/C/man3/pthread_attr_setinheritsched.3:87
1186 #: build/C/man3/pthread_attr_setschedparam.3:77
1187 #: build/C/man3/pthread_attr_setschedpolicy.3:75
1188 #: build/C/man3/pthread_attr_setscope.3:94
1189 #: build/C/man3/pthread_attr_setstack.3:88
1190 #: build/C/man3/pthread_attr_setstackaddr.3:77
1191 #: build/C/man3/pthread_attr_setstacksize.3:64
1192 #: build/C/man3/pthread_setaffinity_np.3:80
1193 #: build/C/man3/pthread_setcancelstate.3:95
1194 #: build/C/man3/pthread_setname_np.3:75
1195 msgid ""
1196 "On success, these functions return 0; on error, they return a nonzero error "
1197 "number."
1198 msgstr ""
1199 "成功すると、これらの関数は 0 を返す。\n"
1200 "エラーの場合、0 以外のエラー番号を返す。"
1201
1202 #. type: Plain text
1203 #: build/C/man3/pthread_attr_init.3:79
1204 msgid ""
1205 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1206 "Linux these functions always succeed (but portable and future-proof "
1207 "applications should nevertheless handle a possible error return)."
1208 msgstr ""
1209 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1210 "記載されている。\n"
1211 "Linux では、これらの関数は常に成功する\n"
1212 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1213 "正のエラーの返り値を処理するようにすべきである)。"
1214
1215 #. type: Plain text
1216 #: build/C/man3/pthread_attr_init.3:81
1217 #: build/C/man3/pthread_attr_setdetachstate.3:89
1218 #: build/C/man3/pthread_attr_setguardsize.3:108
1219 #: build/C/man3/pthread_attr_setinheritsched.3:103
1220 #: build/C/man3/pthread_attr_setschedparam.3:91
1221 #: build/C/man3/pthread_attr_setschedpolicy.3:91
1222 #: build/C/man3/pthread_attr_setscope.3:109
1223 #: build/C/man3/pthread_attr_setstack.3:114
1224 #: build/C/man3/pthread_attr_setstacksize.3:85
1225 #: build/C/man3/pthread_cancel.3:124 build/C/man3/pthread_cleanup_push.3:127
1226 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1227 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1228 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1229 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:52
1230 #: build/C/man3/pthread_setcancelstate.3:115
1231 #: build/C/man3/pthread_setconcurrency.3:85
1232 #: build/C/man3/pthread_setschedparam.3:143
1233 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
1234 #: build/C/man3/pthread_testcancel.3:60
1235 msgid "POSIX.1-2001."
1236 msgstr "POSIX.1-2001."
1237
1238 #. type: Plain text
1239 #: build/C/man3/pthread_attr_init.3:87
1240 msgid ""
1241 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1242 "object other than via pthreads functions is nonportable and produces "
1243 "undefined results."
1244 msgstr ""
1245 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1246 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1247 "どのような結果が得られるかも分からない。"
1248
1249 #. type: Plain text
1250 #: build/C/man3/pthread_attr_init.3:96
1251 msgid ""
1252 "The program below optionally makes use of B<pthread_attr_init>()  and "
1253 "various related functions to initialize a thread attributes object that is "
1254 "used to create a single thread.  Once created, the thread uses the "
1255 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1256 "the thread's attributes, and then displays those attributes."
1257 msgstr ""
1258 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1259 "スレッド属性オブジェクトの初期化を行い、\n"
1260 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1261 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1262 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1263 "取得した属性を表示する。"
1264
1265 #. type: Plain text
1266 #: build/C/man3/pthread_attr_init.3:105
1267 msgid ""
1268 "If the program is run with no command-line argument, then it passes NULL as "
1269 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1270 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1271 "threading implementation, we see the following:"
1272 msgstr ""
1273 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1274 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1275 "この場合、スレッドはデフォルトの属性で作成される。\n"
1276 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1277 "動作させると、以下のような出力が得られる。"
1278
1279 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1280 #. type: Plain text
1281 #: build/C/man3/pthread_attr_init.3:121
1282 #, no-wrap
1283 msgid ""
1284 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1285 "unlimited\n"
1286 "$B< ./a.out>\n"
1287 "Thread attributes:\n"
1288 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1289 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1290 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1291 "        Scheduling policy   = SCHED_OTHER\n"
1292 "        Scheduling priority = 0\n"
1293 "        Guard size          = 4096 bytes\n"
1294 "        Stack address       = 0x40196000\n"
1295 "        Stack size          = 0x201000 bytes\n"
1296 msgstr ""
1297 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1298 "unlimited\n"
1299 "$B< ./a.out>\n"
1300 "Thread attributes:\n"
1301 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1302 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1303 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1304 "        Scheduling policy   = SCHED_OTHER\n"
1305 "        Scheduling priority = 0\n"
1306 "        Guard size          = 4096 bytes\n"
1307 "        Stack address       = 0x40196000\n"
1308 "        Stack size          = 0x201000 bytes\n"
1309
1310 #. type: Plain text
1311 #: build/C/man3/pthread_attr_init.3:131
1312 msgid ""
1313 "When we supply a stack size as a command-line argument, the program "
1314 "initializes a thread attributes object, sets various attributes in that "
1315 "object, and passes a pointer to the object in the call to B<pthread_create>"
1316 "(3).  Running the program on Linux/x86-32 with the NPTL threading "
1317 "implementation, we see the following:"
1318 msgstr ""
1319 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1320 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1321 "そのオブジェクトの各種属性を設定し、\n"
1322 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1323 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1324 "動作させると、以下のような出力が得られる。"
1325
1326 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1327 #. type: Plain text
1328 #: build/C/man3/pthread_attr_init.3:146
1329 #, no-wrap
1330 msgid ""
1331 "$B< ./a.out 0x3000000>\n"
1332 "posix_memalign() allocated at 0x40197000\n"
1333 "Thread attributes:\n"
1334 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1335 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1336 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1337 "        Scheduling policy   = SCHED_OTHER\n"
1338 "        Scheduling priority = 0\n"
1339 "        Guard size          = 0 bytes\n"
1340 "        Stack address       = 0x40197000\n"
1341 "        Stack size          = 0x3000000 bytes\n"
1342 msgstr ""
1343 "$B< ./a.out 0x3000000>\n"
1344 "posix_memalign() allocated at 0x40197000\n"
1345 "Thread attributes:\n"
1346 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1347 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1348 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1349 "        Scheduling policy   = SCHED_OTHER\n"
1350 "        Scheduling priority = 0\n"
1351 "        Guard size          = 0 bytes\n"
1352 "        Stack address       = 0x40197000\n"
1353 "        Stack size          = 0x3000000 bytes\n"
1354
1355 #. type: Plain text
1356 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1357 #, no-wrap
1358 msgid ""
1359 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1360 "#include E<lt>pthread.hE<gt>\n"
1361 "#include E<lt>stdio.hE<gt>\n"
1362 "#include E<lt>stdlib.hE<gt>\n"
1363 "#include E<lt>unistd.hE<gt>\n"
1364 "#include E<lt>errno.hE<gt>\n"
1365 msgstr ""
1366 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1367 "#include E<lt>pthread.hE<gt>\n"
1368 "#include E<lt>stdio.hE<gt>\n"
1369 "#include E<lt>stdlib.hE<gt>\n"
1370 "#include E<lt>unistd.hE<gt>\n"
1371 "#include E<lt>errno.hE<gt>\n"
1372
1373 #. type: Plain text
1374 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:159
1375 #: build/C/man3/pthread_cleanup_push.3:239 build/C/man3/pthread_create.3:254
1376 #: build/C/man3/pthread_getattr_np.3:191
1377 #: build/C/man3/pthread_getcpuclockid.3:113
1378 #: build/C/man3/pthread_setaffinity_np.3:172
1379 #: build/C/man3/pthread_setschedparam.3:237 build/C/man3/pthread_sigmask.3:93
1380 #, no-wrap
1381 msgid ""
1382 "#define handle_error_en(en, msg) \\e\n"
1383 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1384 msgstr ""
1385 "#define handle_error_en(en, msg) \\e\n"
1386 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1387
1388 #. type: Plain text
1389 #: build/C/man3/pthread_attr_init.3:168
1390 #, no-wrap
1391 msgid ""
1392 "static void\n"
1393 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1394 "{\n"
1395 "    int s, i;\n"
1396 "    size_t v;\n"
1397 "    void *stkaddr;\n"
1398 "    struct sched_param sp;\n"
1399 msgstr ""
1400 "static void\n"
1401 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1402 "{\n"
1403 "    int s, i;\n"
1404 "    size_t v;\n"
1405 "    void *stkaddr;\n"
1406 "    struct sched_param sp;\n"
1407
1408 #. type: Plain text
1409 #: build/C/man3/pthread_attr_init.3:176
1410 #, no-wrap
1411 msgid ""
1412 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1413 "    if (s != 0)\n"
1414 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1415 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1416 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1417 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1418 "            \"???\");\n"
1419 msgstr ""
1420 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1421 "    if (s != 0)\n"
1422 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1423 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1424 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1425 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1426 "            \"???\");\n"
1427
1428 #. type: Plain text
1429 #: build/C/man3/pthread_attr_init.3:184
1430 #, no-wrap
1431 msgid ""
1432 "    s = pthread_attr_getscope(attr, &i);\n"
1433 "    if (s != 0)\n"
1434 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1435 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1436 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1437 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1438 "            \"???\");\n"
1439 msgstr ""
1440 "    s = pthread_attr_getscope(attr, &i);\n"
1441 "    if (s != 0)\n"
1442 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1443 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1444 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1445 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1446 "            \"???\");\n"
1447
1448 #. type: Plain text
1449 #: build/C/man3/pthread_attr_init.3:192
1450 #, no-wrap
1451 msgid ""
1452 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1453 "    if (s != 0)\n"
1454 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1455 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1456 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1457 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1458 "            \"???\");\n"
1459 msgstr ""
1460 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1461 "    if (s != 0)\n"
1462 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1463 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1464 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1465 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1466 "            \"???\");\n"
1467
1468 #. type: Plain text
1469 #: build/C/man3/pthread_attr_init.3:201
1470 #, no-wrap
1471 msgid ""
1472 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1473 "    if (s != 0)\n"
1474 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1475 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1476 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1477 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1478 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1479 "            \"???\");\n"
1480 msgstr ""
1481 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1482 "    if (s != 0)\n"
1483 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1484 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1485 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1486 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1487 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1488 "            \"???\");\n"
1489
1490 #. type: Plain text
1491 #: build/C/man3/pthread_attr_init.3:206
1492 #, no-wrap
1493 msgid ""
1494 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1495 "    if (s != 0)\n"
1496 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1497 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1498 msgstr ""
1499 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1500 "    if (s != 0)\n"
1501 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1502 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1503
1504 #. type: Plain text
1505 #: build/C/man3/pthread_attr_init.3:211
1506 #, no-wrap
1507 msgid ""
1508 "    s = pthread_attr_getguardsize(attr, &v);\n"
1509 "    if (s != 0)\n"
1510 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1511 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1512 msgstr ""
1513 "    s = pthread_attr_getguardsize(attr, &v);\n"
1514 "    if (s != 0)\n"
1515 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1516 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1517
1518 #. type: Plain text
1519 #: build/C/man3/pthread_attr_init.3:218
1520 #, no-wrap
1521 msgid ""
1522 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1523 "    if (s != 0)\n"
1524 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1525 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1526 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1527 "}\n"
1528 msgstr ""
1529 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1530 "    if (s != 0)\n"
1531 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1532 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1533 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1534 "}\n"
1535
1536 #. type: Plain text
1537 #: build/C/man3/pthread_attr_init.3:224
1538 #, no-wrap
1539 msgid ""
1540 "static void *\n"
1541 "thread_start(void *arg)\n"
1542 "{\n"
1543 "    int s;\n"
1544 "    pthread_attr_t gattr;\n"
1545 msgstr ""
1546 "static void *\n"
1547 "thread_start(void *arg)\n"
1548 "{\n"
1549 "    int s;\n"
1550 "    pthread_attr_t gattr;\n"
1551
1552 #. type: Plain text
1553 #: build/C/man3/pthread_attr_init.3:228
1554 #, no-wrap
1555 msgid ""
1556 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1557 "       retrieves the attributes of the thread specified in its\n"
1558 "       first argument */\n"
1559 msgstr ""
1560 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1561 "       retrieves the attributes of the thread specified in its\n"
1562 "       first argument */\n"
1563
1564 #. type: Plain text
1565 #: build/C/man3/pthread_attr_init.3:232
1566 #, no-wrap
1567 msgid ""
1568 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1569 "    if (s != 0)\n"
1570 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1571 msgstr ""
1572 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1573 "    if (s != 0)\n"
1574 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1575
1576 #. type: Plain text
1577 #: build/C/man3/pthread_attr_init.3:235
1578 #, no-wrap
1579 msgid ""
1580 "    printf(\"Thread attributes:\\en\");\n"
1581 "    display_pthread_attr(&gattr, \"\\et\");\n"
1582 msgstr ""
1583 "    printf(\"Thread attributes:\\en\");\n"
1584 "    display_pthread_attr(&gattr, \"\\et\");\n"
1585
1586 #. type: Plain text
1587 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1588 #, no-wrap
1589 msgid ""
1590 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1591 "}\n"
1592 msgstr ""
1593 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1594 "}\n"
1595
1596 #. type: Plain text
1597 #: build/C/man3/pthread_attr_init.3:246
1598 #, no-wrap
1599 msgid ""
1600 "int\n"
1601 "main(int argc, char *argv[])\n"
1602 "{\n"
1603 "    pthread_t thr;\n"
1604 "    pthread_attr_t attr;\n"
1605 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1606 "    int s;\n"
1607 msgstr ""
1608 "int\n"
1609 "main(int argc, char *argv[])\n"
1610 "{\n"
1611 "    pthread_t thr;\n"
1612 "    pthread_attr_t attr;\n"
1613 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1614 "    int s;\n"
1615
1616 #. type: Plain text
1617 #: build/C/man3/pthread_attr_init.3:248
1618 #: build/C/man3/pthread_setschedparam.3:355
1619 #, no-wrap
1620 msgid "    attrp = NULL;\n"
1621 msgstr "    attrp = NULL;\n"
1622
1623 #. type: Plain text
1624 #: build/C/man3/pthread_attr_init.3:252
1625 #, no-wrap
1626 msgid ""
1627 "    /* If a command-line argument was supplied, use it to set the\n"
1628 "       stack-size attribute and set a few other thread attributes,\n"
1629 "       and set attrp pointing to thread attributes object */\n"
1630 msgstr ""
1631 "    /* If a command-line argument was supplied, use it to set the\n"
1632 "       stack-size attribute and set a few other thread attributes,\n"
1633 "       and set attrp pointing to thread attributes object */\n"
1634
1635 #. type: Plain text
1636 #: build/C/man3/pthread_attr_init.3:256
1637 #, no-wrap
1638 msgid ""
1639 "    if (argc E<gt> 1) {\n"
1640 "        int stack_size;\n"
1641 "        void *sp;\n"
1642 msgstr ""
1643 "    if (argc E<gt> 1) {\n"
1644 "        int stack_size;\n"
1645 "        void *sp;\n"
1646
1647 #. type: Plain text
1648 #: build/C/man3/pthread_attr_init.3:258
1649 #, no-wrap
1650 msgid "        attrp = &attr;\n"
1651 msgstr "        attrp = &attr;\n"
1652
1653 #. type: Plain text
1654 #: build/C/man3/pthread_attr_init.3:262
1655 #, no-wrap
1656 msgid ""
1657 "        s = pthread_attr_init(&attr);\n"
1658 "        if (s != 0)\n"
1659 "            handle_error_en(s, \"pthread_attr_init\");\n"
1660 msgstr ""
1661 "        s = pthread_attr_init(&attr);\n"
1662 "        if (s != 0)\n"
1663 "            handle_error_en(s, \"pthread_attr_init\");\n"
1664
1665 #. type: Plain text
1666 #: build/C/man3/pthread_attr_init.3:266
1667 #, no-wrap
1668 msgid ""
1669 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1670 "        if (s != 0)\n"
1671 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1672 msgstr ""
1673 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1674 "        if (s != 0)\n"
1675 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1676
1677 #. type: Plain text
1678 #: build/C/man3/pthread_attr_init.3:270
1679 #, no-wrap
1680 msgid ""
1681 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1682 "        if (s != 0)\n"
1683 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1684 msgstr ""
1685 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1686 "        if (s != 0)\n"
1687 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1688
1689 #. type: Plain text
1690 #: build/C/man3/pthread_attr_init.3:272
1691 #, no-wrap
1692 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1693 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1694
1695 #. type: Plain text
1696 #: build/C/man3/pthread_attr_init.3:276
1697 #, no-wrap
1698 msgid ""
1699 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1700 "        if (s != 0)\n"
1701 "            handle_error_en(s, \"posix_memalign\");\n"
1702 msgstr ""
1703 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1704 "        if (s != 0)\n"
1705 "            handle_error_en(s, \"posix_memalign\");\n"
1706
1707 #. type: Plain text
1708 #: build/C/man3/pthread_attr_init.3:278
1709 #, no-wrap
1710 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1711 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1712
1713 #. type: Plain text
1714 #: build/C/man3/pthread_attr_init.3:283
1715 #, no-wrap
1716 msgid ""
1717 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1718 "        if (s != 0)\n"
1719 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1720 "    }\n"
1721 msgstr ""
1722 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1723 "        if (s != 0)\n"
1724 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1725 "    }\n"
1726
1727 #. type: Plain text
1728 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1729 #, no-wrap
1730 msgid ""
1731 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1732 "    if (s != 0)\n"
1733 "        handle_error_en(s, \"pthread_create\");\n"
1734 msgstr ""
1735 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1736 "    if (s != 0)\n"
1737 "        handle_error_en(s, \"pthread_create\");\n"
1738
1739 #. type: Plain text
1740 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1741 #, no-wrap
1742 msgid ""
1743 "    if (attrp != NULL) {\n"
1744 "        s = pthread_attr_destroy(attrp);\n"
1745 "        if (s != 0)\n"
1746 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1747 "    }\n"
1748 msgstr ""
1749 "    if (attrp != NULL) {\n"
1750 "        s = pthread_attr_destroy(attrp);\n"
1751 "        if (s != 0)\n"
1752 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1753 "    }\n"
1754
1755 #. type: Plain text
1756 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1757 #, no-wrap
1758 msgid ""
1759 "    pause();    /* Terminates when other thread calls exit() */\n"
1760 "}\n"
1761 msgstr ""
1762 "    pause();    /* Terminates when other thread calls exit() */\n"
1763 "}\n"
1764
1765 #. type: Plain text
1766 #: build/C/man3/pthread_attr_init.3:313
1767 msgid ""
1768 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1769 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1770 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1771 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1772 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1773 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1774 msgstr ""
1775 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1776 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1777 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1778 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1779 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1780 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1781
1782 #. type: TH
1783 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1784 #, no-wrap
1785 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1786 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1787
1788 #. type: TH
1789 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1790 #: build/C/man3/pthread_getattr_np.3:26
1791 #: build/C/man3/pthread_setaffinity_np.3:26
1792 #: build/C/man3/pthread_tryjoin_np.3:26
1793 #, no-wrap
1794 msgid "2010-09-10"
1795 msgstr "2010-09-10"
1796
1797 #. type: Plain text
1798 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1799 msgid ""
1800 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1801 "affinity attribute in thread attributes object"
1802 msgstr ""
1803 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1804 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1805
1806 #. type: Plain text
1807 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1808 #: build/C/man3/pthread_getattr_np.3:33
1809 #: build/C/man3/pthread_setaffinity_np.3:34
1810 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1811 #, no-wrap
1812 msgid ""
1813 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1814 "B<#include E<lt>pthread.hE<gt>>\n"
1815 msgstr ""
1816 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1817 "B<#include E<lt>pthread.hE<gt>>\n"
1818
1819 #. type: Plain text
1820 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1821 #, no-wrap
1822 msgid ""
1823 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1824 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1825 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1826 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1827 msgstr ""
1828 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1829 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1830 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1831 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1832
1833 #. type: Plain text
1834 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1835 msgid ""
1836 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1837 "attribute of the thread attributes object referred to by I<attr> to the "
1838 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1839 "mask of a thread created using the thread attributes object I<attr>."
1840 msgstr ""
1841 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1842 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1843 "I<cpuset> で指定された値に設定する。\n"
1844 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1845 "作成されたスレッドの CPU affinity マスクが決定される。"
1846
1847 #. type: Plain text
1848 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1849 msgid ""
1850 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1851 "attribute of the thread attributes object referred to by I<attr> in the "
1852 "buffer pointed to by I<cpuset>."
1853 msgstr ""
1854 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1855 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1856 "I<cpuset> が指すバッファに入れて返す。"
1857
1858 #. type: Plain text
1859 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1860 msgid ""
1861 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1862 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
1863 "(cpu_set_t)>."
1864 msgstr ""
1865 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1866 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1867 "指定することだろう。"
1868
1869 #. type: Plain text
1870 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1871 #: build/C/man3/pthread_setaffinity_np.3:67
1872 msgid ""
1873 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1874 "description of a set of macros that can be used to manipulate and inspect "
1875 "CPU sets, see B<CPU_SET>(3)."
1876 msgstr ""
1877 "CPU affinity マスクの詳細については、 \n"
1878 "B<sched_setaffinity>(2) を参照してほしい。\n"
1879 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1880 "B<CPU_SET>(3) を参照してほしい。"
1881
1882 #. type: TP
1883 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1884 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1885 #: build/C/man3/pthread_attr_setdetachstate.3:83
1886 #: build/C/man3/pthread_attr_setinheritsched.3:90
1887 #: build/C/man3/pthread_attr_setschedpolicy.3:78
1888 #: build/C/man3/pthread_attr_setscope.3:97
1889 #: build/C/man3/pthread_attr_setstack.3:91
1890 #: build/C/man3/pthread_attr_setstacksize.3:67
1891 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1892 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1893 #: build/C/man3/pthread_kill.3:58 build/C/man3/pthread_setaffinity_np.3:84
1894 #: build/C/man3/pthread_setaffinity_np.3:93
1895 #: build/C/man3/pthread_setaffinity_np.3:109
1896 #: build/C/man3/pthread_setcancelstate.3:99
1897 #: build/C/man3/pthread_setcancelstate.3:107
1898 #: build/C/man3/pthread_setconcurrency.3:71
1899 #: build/C/man3/pthread_setschedparam.3:122
1900 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1901 #, no-wrap
1902 msgid "B<EINVAL>"
1903 msgstr "B<EINVAL>"
1904
1905 #.  cpumask_t
1906 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1907 #.  of the cpumask_t type.
1908 #. type: Plain text
1909 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1910 msgid ""
1911 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1912 "outside the set supported by the kernel.  (The kernel configuration option "
1913 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1914 "type used to represent CPU sets.)"
1915 msgstr ""
1916 "(B<pthread_attr_setaffinity_np>())\n"
1917 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1918 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1919 "は、\n"
1920 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
1921
1922 #. type: Plain text
1923 #: build/C/man3/pthread_attr_setaffinity_np.3:102
1924 msgid ""
1925 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
1926 "attributes object referred to by I<attr> lies outside the range specified by "
1927 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
1928 msgstr ""
1929 "(B<pthread_attr_getaffinity_np>())\n"
1930 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
1931 "I<cpusetsize> により指定された範囲の中になかった\n"
1932 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
1933
1934 #. type: Plain text
1935 #: build/C/man3/pthread_attr_setaffinity_np.3:106
1936 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
1937 msgstr ""
1938 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
1939
1940 #. type: Plain text
1941 #: build/C/man3/pthread_attr_setaffinity_np.3:108
1942 #: build/C/man3/pthread_setaffinity_np.3:121
1943 msgid "These functions are provided by glibc since version 2.3.4."
1944 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
1945
1946 #. type: Plain text
1947 #: build/C/man3/pthread_attr_setaffinity_np.3:111
1948 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
1949 #: build/C/man3/pthread_setaffinity_np.3:124
1950 #: build/C/man3/pthread_tryjoin_np.3:115
1951 msgid ""
1952 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
1953 "\" (nonportable) in the names."
1954 msgstr ""
1955 "これらの関数は非標準の GNU による拡張である。\n"
1956 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
1957 "付いている。"
1958
1959 #. type: Plain text
1960 #: build/C/man3/pthread_attr_setaffinity_np.3:118
1961 #: build/C/man3/pthread_setaffinity_np.3:150
1962 msgid ""
1963 "In glibc 2.3.3 only, versions of these functions were provided that did not "
1964 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
1965 "underlying system calls was always I<sizeof(cpu_set_t)>."
1966 msgstr ""
1967 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
1968 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
1969 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
1970 "常に I<sizeof(cpu_set_t)> であった。"
1971
1972 #. type: Plain text
1973 #: build/C/man3/pthread_attr_setaffinity_np.3:124
1974 msgid ""
1975 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
1976 "(3), B<cpuset>(7), B<pthreads>(7)"
1977 msgstr ""
1978 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
1979 "(3), B<cpuset>(7), B<pthreads>(7)"
1980
1981 #. type: TH
1982 #: build/C/man3/pthread_attr_setdetachstate.3:26
1983 #, no-wrap
1984 msgid "PTHREAD_ATTR_SETDETACHSTATE"
1985 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
1986
1987 #. type: TH
1988 #: build/C/man3/pthread_attr_setdetachstate.3:26
1989 #: build/C/man3/pthread_attr_setschedpolicy.3:26
1990 #, no-wrap
1991 msgid "2010-02-03"
1992 msgstr "2010-02-03"
1993
1994 #. type: Plain text
1995 #: build/C/man3/pthread_attr_setdetachstate.3:30
1996 msgid ""
1997 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
1998 "state attribute in thread attributes object"
1999 msgstr ""
2000 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2001 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2002
2003 #. type: Plain text
2004 #: build/C/man3/pthread_attr_setdetachstate.3:38
2005 #, no-wrap
2006 msgid ""
2007 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2008 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2009 msgstr ""
2010 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2011 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2012
2013 #. type: Plain text
2014 #: build/C/man3/pthread_attr_setdetachstate.3:53
2015 msgid ""
2016 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2017 "attribute of the thread attributes object referred to by I<attr> to the "
2018 "value specified in I<detachstate>.  The detach state attribute determines "
2019 "whether a thread created using the thread attributes object I<attr> will be "
2020 "created in a joinable or a detached state."
2021 msgstr ""
2022 "B<pthread_attr_setdetachstate>() 関数は、\n"
2023 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2024 "I<detachstate> で指定された値に設定する。\n"
2025 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2026 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2027 "detached (切り離された) 状態で作成されるかが決定される。"
2028
2029 #. type: Plain text
2030 #: build/C/man3/pthread_attr_setdetachstate.3:56
2031 msgid "The following values may be specified in I<detachstate>:"
2032 msgstr "I<detachstate> には以下の値を指定できる。"
2033
2034 #. type: TP
2035 #: build/C/man3/pthread_attr_setdetachstate.3:56
2036 #, no-wrap
2037 msgid "B<PTHREAD_CREATE_DETACHED>"
2038 msgstr "B<PTHREAD_CREATE_DETACHED>"
2039
2040 #. type: Plain text
2041 #: build/C/man3/pthread_attr_setdetachstate.3:61
2042 msgid ""
2043 "Threads that are created using I<attr> will be created in a detached state."
2044 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2045
2046 #. type: TP
2047 #: build/C/man3/pthread_attr_setdetachstate.3:61
2048 #, no-wrap
2049 msgid "B<PTHREAD_CREATE_JOINABLE>"
2050 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2051
2052 #. type: Plain text
2053 #: build/C/man3/pthread_attr_setdetachstate.3:66
2054 msgid ""
2055 "Threads that are created using I<attr> will be created in a joinable state."
2056 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2057
2058 #. type: Plain text
2059 #: build/C/man3/pthread_attr_setdetachstate.3:70
2060 msgid ""
2061 "The default setting of the detach state attribute in a newly initialized "
2062 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2063 msgstr ""
2064 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2065 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2066
2067 #. type: Plain text
2068 #: build/C/man3/pthread_attr_setdetachstate.3:77
2069 msgid ""
2070 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2071 "the thread attributes object I<attr> in the buffer pointed to by "
2072 "I<detachstate>."
2073 msgstr ""
2074 "B<pthread_attr_getdetachstate>() は、\n"
2075 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2076 "I<detachstate> が指すバッファに入れて返す。"
2077
2078 #. type: Plain text
2079 #: build/C/man3/pthread_attr_setdetachstate.3:83
2080 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2081 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2082
2083 #. type: Plain text
2084 #: build/C/man3/pthread_attr_setdetachstate.3:87
2085 msgid "An invalid value was specified in I<detachstate>."
2086 msgstr "無効な値が I<detachstate> で指定された。"
2087
2088 #. type: Plain text
2089 #: build/C/man3/pthread_attr_setdetachstate.3:93
2090 msgid ""
2091 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2092 msgstr ""
2093 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2094 "B<pthread_create>(3) を参照。"
2095
2096 #. type: Plain text
2097 #: build/C/man3/pthread_attr_setdetachstate.3:101
2098 msgid ""
2099 "A thread that is created in a joinable state should eventually either be "
2100 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2101 "B<pthread_create>(3)."
2102 msgstr ""
2103 "join 可能状態で作成されたスレッドは、最終的に\n"
2104 "B<pthread_join>(3) を使って join するか、\n"
2105 "B<pthread_detach>(3) を使って切り離すか、\n"
2106 "のどちらかを行うべきである。"
2107
2108 #. type: Plain text
2109 #: build/C/man3/pthread_attr_setdetachstate.3:108
2110 msgid ""
2111 "It is an error to specify the thread ID of a thread that was created in a "
2112 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2113 "(3)."
2114 msgstr ""
2115 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2116 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2117 "エラーである。"
2118
2119 #. type: Plain text
2120 #: build/C/man3/pthread_attr_setdetachstate.3:111
2121 #: build/C/man3/pthread_attr_setstack.3:156
2122 msgid "See B<pthread_attr_init>(3)."
2123 msgstr "B<pthread_attr_init>(3) を参照。"
2124
2125 #. type: Plain text
2126 #: build/C/man3/pthread_attr_setdetachstate.3:117
2127 msgid ""
2128 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2129 "B<pthread_join>(3), B<pthreads>(7)"
2130 msgstr ""
2131 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2132 "B<pthread_join>(3), B<pthreads>(7)"
2133
2134 #. type: TH
2135 #: build/C/man3/pthread_attr_setguardsize.3:26
2136 #, no-wrap
2137 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2138 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2139
2140 #. type: TH
2141 #: build/C/man3/pthread_attr_setguardsize.3:26
2142 #: build/C/man3/pthread_attr_setscope.3:26
2143 #: build/C/man3/pthread_attr_setstack.3:26
2144 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2145 #, no-wrap
2146 msgid "2008-10-24"
2147 msgstr "2008-10-24"
2148
2149 #. type: Plain text
2150 #: build/C/man3/pthread_attr_setguardsize.3:30
2151 msgid ""
2152 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2153 "attribute in thread attributes object"
2154 msgstr ""
2155 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2156 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2157
2158 #. type: Plain text
2159 #: build/C/man3/pthread_attr_setguardsize.3:38
2160 #, no-wrap
2161 msgid ""
2162 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2163 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2164 msgstr ""
2165 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2166 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2167
2168 #. type: Plain text
2169 #: build/C/man3/pthread_attr_setguardsize.3:49
2170 msgid ""
2171 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2172 "of the thread attributes object referred to by I<attr> to the value "
2173 "specified in I<guardsize>."
2174 msgstr ""
2175 "B<pthread_attr_setguardsize>() 関数は、\n"
2176 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2177 "I<guardsize> で指定された値に設定する。"
2178
2179 #. type: Plain text
2180 #: build/C/man3/pthread_attr_setguardsize.3:59
2181 msgid ""
2182 "If I<guardsize> is greater than 0, then for each new thread created using "
2183 "I<attr> the system allocates an additional region of at least I<guardsize> "
2184 "bytes at the end of the thread's stack to act as the guard area for the "
2185 "stack (but see BUGS)."
2186 msgstr ""
2187 "I<guardsize> が 0 より大きい場合、\n"
2188 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2189 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2190 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2191 "機能する (ただし「バグ」の節も参照)。"
2192
2193 #. type: Plain text
2194 #: build/C/man3/pthread_attr_setguardsize.3:65
2195 msgid ""
2196 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2197 "guard area."
2198 msgstr ""
2199 "I<guardsize> が 0 の場合、\n"
2200 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2201
2202 #. type: Plain text
2203 #: build/C/man3/pthread_attr_setguardsize.3:67
2204 msgid "The default guard size is the same as the system page size."
2205 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2206
2207 #. type: Plain text
2208 #: build/C/man3/pthread_attr_setguardsize.3:82
2209 msgid ""
2210 "If the stack address attribute has been set in I<attr> (using "
2211 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2212 "that the caller is allocating the thread's stack, then the guard size "
2213 "attribute is ignored (i.e., no guard area is created by the system): it is "
2214 "the application's responsibility to handle stack overflow (perhaps by using "
2215 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2216 "it has allocated)."
2217 msgstr ""
2218 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2219 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2220 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2221 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2222 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2223 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2224 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2225
2226 #. type: Plain text
2227 #: build/C/man3/pthread_attr_setguardsize.3:90
2228 msgid ""
2229 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2230 "attribute of the thread attributes object referred to by I<attr> in the "
2231 "buffer pointed to by I<guardsize>."
2232 msgstr ""
2233 "B<pthread_attr_getguardsize>() は、\n"
2234 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2235 "I<guardsize> が指すバッファに入れて返す。"
2236
2237 #. type: Plain text
2238 #: build/C/man3/pthread_attr_setguardsize.3:104
2239 msgid ""
2240 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2241 "invalid.  On Linux these functions always succeed (but portable and future-"
2242 "proof applications should nevertheless handle a possible error return)."
2243 msgstr ""
2244 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2245 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2246 "Linux では、これらの関数は常に成功する\n"
2247 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2248 "正のエラーの返り値を処理するようにすべきである)。"
2249
2250 #. type: Plain text
2251 #: build/C/man3/pthread_attr_setguardsize.3:106
2252 #: build/C/man3/pthread_attr_setstackaddr.3:83
2253 #: build/C/man3/pthread_attr_setstacksize.3:83
2254 msgid "These functions are provided by glibc since version 2.1."
2255 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2256
2257 #. type: Plain text
2258 #: build/C/man3/pthread_attr_setguardsize.3:122
2259 msgid ""
2260 "A guard area consists of virtual memory pages that are protected to prevent "
2261 "read and write access.  If a thread overflows its stack into the guard area, "
2262 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2263 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2264 "guard size is internally rounded up to the system page size when creating a "
2265 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2266 "size that was set by B<pthread_attr_setguardsize>().)"
2267 msgstr ""
2268 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2269 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2270 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2271 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2272 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2273 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2274 "(その場合も B<pthread_attr_getguardsize>() では\n"
2275 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2276
2277 #. type: Plain text
2278 #: build/C/man3/pthread_attr_setguardsize.3:126
2279 msgid ""
2280 "Setting a guard size of 0 may be useful to save memory in an application "
2281 "that creates many threads and knows that stack overflow can never occur."
2282 msgstr ""
2283 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2284 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2285 "することで、メモリを節約できることもある。"
2286
2287 #. type: Plain text
2288 #: build/C/man3/pthread_attr_setguardsize.3:130
2289 msgid ""
2290 "Choosing a guard size larger than the default size may be necessary for "
2291 "detecting stack overflows if a thread allocates large data structures on the "
2292 "stack."
2293 msgstr ""
2294 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2295 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2296 "大きな guard size を選ぶ必要があるかもしれない。"
2297
2298 #. type: SH
2299 #: build/C/man3/pthread_attr_setguardsize.3:130
2300 #: build/C/man3/pthread_attr_setinheritsched.3:103
2301 #: build/C/man3/pthread_attr_setstacksize.3:96
2302 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2303 #, no-wrap
2304 msgid "BUGS"
2305 msgstr "バグ"
2306
2307 #. type: Plain text
2308 #: build/C/man3/pthread_attr_setguardsize.3:141
2309 msgid ""
2310 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2311 "within the stack size allocation, rather than allocating extra space at the "
2312 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2313 "error from B<pthread_create>(3)  if the guard size value is too large, "
2314 "leaving no space for the actual stack.)"
2315 msgstr ""
2316 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2317 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2318 "末尾に追加の領域を割り当てることが求められている。\n"
2319 "(このため、ガード領域が大きすぎて、\n"
2320 "実際のスタック用の場所がなくなってしまう場合、\n"
2321 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2322
2323 #.  glibc includes the guardsize within the allocated stack size,
2324 #.  which looks pretty clearly to be in violation of POSIX.
2325 #.  Filed bug, 22 Oct 2008:
2326 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2327 #.  Older reports:
2328 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2329 #.  Reportedly, LinuxThreads did the right thing, allocating
2330 #.  extra space at the end of the stack:
2331 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2332 #. type: Plain text
2333 #: build/C/man3/pthread_attr_setguardsize.3:155
2334 msgid ""
2335 "The obsolete LinuxThreads implementation did the right thing, allocating "
2336 "extra space at the end of the stack for the guard area."
2337 msgstr ""
2338 "廃止予定の LinuxThreads 実装では、\n"
2339 "POSIX.1 で求められている通りの動作で、\n"
2340 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2341
2342 #. type: Plain text
2343 #: build/C/man3/pthread_attr_setguardsize.3:158
2344 msgid "See B<pthread_getattr_np>(3)."
2345 msgstr "B<pthread_getattr_np>(3) を参照。"
2346
2347 #. type: Plain text
2348 #: build/C/man3/pthread_attr_setguardsize.3:166
2349 msgid ""
2350 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2351 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2352 msgstr ""
2353 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2354 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2355
2356 #. type: TH
2357 #: build/C/man3/pthread_attr_setinheritsched.3:26
2358 #, no-wrap
2359 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2360 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2361
2362 #. type: TH
2363 #: build/C/man3/pthread_attr_setinheritsched.3:26
2364 #: build/C/man3/pthread_attr_setschedparam.3:26
2365 #: build/C/man3/pthread_attr_setstacksize.3:26
2366 #, no-wrap
2367 msgid "2012-03-15"
2368 msgstr "2012-03-15"
2369
2370 #. type: Plain text
2371 #: build/C/man3/pthread_attr_setinheritsched.3:30
2372 msgid ""
2373 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit "
2374 "scheduler attribute in thread attributes object"
2375 msgstr ""
2376 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - \n"
2377 "スレッド属性オブジェクトの inherit scheduler 属性の設定/取得を行う"
2378
2379 #. type: Plain text
2380 #: build/C/man3/pthread_attr_setinheritsched.3:38
2381 #, no-wrap
2382 msgid ""
2383 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2384 "B<                                 int >I<inheritsched>B<);>\n"
2385 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2386 "B<                                 int *>I<inheritsched>B<);>\n"
2387 msgstr ""
2388 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2389 "B<                                 int >I<inheritsched>B<);>\n"
2390 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2391 "B<                                 int *>I<inheritsched>B<);>\n"
2392
2393 #. type: Plain text
2394 #: build/C/man3/pthread_attr_setinheritsched.3:55
2395 msgid ""
2396 "The B<pthread_attr_setinheritsched>()  function sets the inherit scheduler "
2397 "attribute of the thread attributes object referred to by I<attr> to the "
2398 "value specified in I<inheritsched>.  The inherit scheduler attribute "
2399 "determines whether a thread created using the thread attributes object "
2400 "I<attr> will inherit its scheduling attributes from the calling thread or "
2401 "whether it will take them from I<attr>."
2402 msgstr ""
2403 "B<pthread_attr_setinheritsched>() 関数は、\n"
2404 "I<attr> が参照するスレッド属性オブジェクトの inherit scheduler 属性を\n"
2405 "I<inheritsched> で指定された値に設定する。\n"
2406 "inherit scheduler 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2407 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承\n"
2408 "するか、I<attr> からスケジューリング属性を取得するかが決定される。"
2409
2410 #. type: Plain text
2411 #: build/C/man3/pthread_attr_setinheritsched.3:58
2412 msgid "The following values may be specified in I<inheritsched>:"
2413 msgstr "以下の値を I<inheritsched> に指定できる。"
2414
2415 #. type: TP
2416 #: build/C/man3/pthread_attr_setinheritsched.3:58
2417 #, no-wrap
2418 msgid "B<PTHREAD_INHERIT_SCHED>"
2419 msgstr "B<PTHREAD_INHERIT_SCHED>"
2420
2421 #. type: Plain text
2422 #: build/C/man3/pthread_attr_setinheritsched.3:66
2423 msgid ""
2424 "Threads that are created using I<attr> inherit scheduling attributes from "
2425 "the creating thread; the scheduling attributes in I<attr> are ignored."
2426 msgstr ""
2427 "I<attr> を使って作成されたスレッドは、\n"
2428 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2429 "I<attr> 内のスケジューリング属性は無視される。"
2430
2431 #. type: TP
2432 #: build/C/man3/pthread_attr_setinheritsched.3:66
2433 #, no-wrap
2434 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2435 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2436
2437 #.  FIXME what are the defaults for scheduler settings?
2438 #. type: Plain text
2439 #: build/C/man3/pthread_attr_setinheritsched.3:73
2440 msgid ""
2441 "Threads that are created using I<attr> take their scheduling attributes from "
2442 "the values specified by the attributes object."
2443 msgstr ""
2444 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2445 "指定された値からスケジューリング属性を取得する。"
2446
2447 #. type: Plain text
2448 #: build/C/man3/pthread_attr_setinheritsched.3:77
2449 msgid ""
2450 "The default setting of the inherit scheduler attribute in a newly "
2451 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2452 msgstr ""
2453 "新たに初期化されたスレッド属性オブジェクトの inherit scheduler 属性の\n"
2454 "デフォルト設定は B<PTHREAD_INHERIT_SCHED> である。"
2455
2456 #. type: Plain text
2457 #: build/C/man3/pthread_attr_setinheritsched.3:84
2458 msgid ""
2459 "The B<pthread_attr_getinheritsched>()  returns the inherit scheduler "
2460 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2461 "by I<inheritsched>."
2462 msgstr ""
2463 "B<pthread_attr_getinheritsched>() は、\n"
2464 "スレッド属性オブジェクト I<attr> の inherit scheduler 属性を\n"
2465 "I<inheritsched> が指すバッファに入れて返す。"
2466
2467 #. type: Plain text
2468 #: build/C/man3/pthread_attr_setinheritsched.3:90
2469 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2470 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2471
2472 #. type: Plain text
2473 #: build/C/man3/pthread_attr_setinheritsched.3:94
2474 msgid "Invalid value in I<inheritsched>."
2475 msgstr "I<inheritsched> に無効な値が指定された。"
2476
2477 #.  .SH VERSIONS
2478 #.  Available since glibc 2.0.
2479 #. type: Plain text
2480 #: build/C/man3/pthread_attr_setinheritsched.3:101
2481 msgid ""
2482 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2483 "to set the attribute to an unsupported value\") for "
2484 "B<pthread_attr_setinheritsched>()."
2485 msgstr ""
2486 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2487 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2488 "も追加で規定されている。"
2489
2490 #.  FIXME . Track status of the following bug:
2491 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2492 #. type: Plain text
2493 #: build/C/man3/pthread_attr_setinheritsched.3:119
2494 msgid ""
2495 "As at glibc 2.8, if a thread attributes object is initialized using "
2496 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2497 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2498 "if the inherit scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2499 "then a thread created using the attribute object wrongly inherits its "
2500 "scheduling attributes from the creating thread.  This bug does not occur if "
2501 "either the scheduling policy or scheduling priority attribute is explicitly "
2502 "set in the thread attributes object before calling B<pthread_create>(3)."
2503 msgstr ""
2504 "glibc 2.8 の時点では、スレッド属性オブジェクトが\n"
2505 "B<pthread_attr_init>(3) を使って初期化された場合、\n"
2506 "スレッド属性オブジェクトのスケジューリングポリシーが B<SCHED_OTHER> に、\n"
2507 "スケジューリング優先度が 0 に設定される。一方、その後 inherit\n"
2508 "scheduling 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ\n"
2509 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するス\n"
2510 "レッドのスケジューリング属性が間違って継承されてしまう。\n"
2511 "B<pthread_create>(3) を呼び出す前にスケジューリングポリシー属性か\n"
2512 "スケジューリング優先度属性のどちらかが明示的に設定された場合には、\n"
2513 "このバグは発生しない。"
2514
2515 #. type: Plain text
2516 #: build/C/man3/pthread_attr_setinheritsched.3:122
2517 #: build/C/man3/pthread_attr_setschedparam.3:98
2518 #: build/C/man3/pthread_attr_setschedpolicy.3:94
2519 msgid "See B<pthread_setschedparam>(3)."
2520 msgstr "B<pthread_setschedparam>(3) を参照。"
2521
2522 #. type: Plain text
2523 #: build/C/man3/pthread_attr_setinheritsched.3:133
2524 msgid ""
2525 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2526 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2527 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2528 "(3), B<pthreads>(7)"
2529 msgstr ""
2530 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2531 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2532 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2533 "(3), B<pthreads>(7)"
2534
2535 #. type: TH
2536 #: build/C/man3/pthread_attr_setschedparam.3:26
2537 #, no-wrap
2538 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2539 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2540
2541 #. type: Plain text
2542 #: build/C/man3/pthread_attr_setschedparam.3:30
2543 msgid ""
2544 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2545 "parameter attributes in thread attributes object"
2546 msgstr ""
2547 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2548 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2549
2550 #. type: Plain text
2551 #: build/C/man3/pthread_attr_setschedparam.3:38
2552 #, no-wrap
2553 msgid ""
2554 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2555 "B<                               const struct sched_param *>I<param>B<);>\n"
2556 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2557 "B<                               struct sched_param *>I<param>B<);>\n"
2558 msgstr ""
2559 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2560 "B<                               const struct sched_param *>I<param>B<);>\n"
2561 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2562 "B<                               struct sched_param *>I<param>B<);>\n"
2563
2564 #. type: Plain text
2565 #: build/C/man3/pthread_attr_setschedparam.3:52
2566 msgid ""
2567 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2568 "attributes of the thread attributes object referred to by I<attr> to the "
2569 "values specified in the buffer pointed to by I<param>.  These attributes "
2570 "determine the scheduling parameters of a thread created using the thread "
2571 "attributes object I<attr>."
2572 msgstr ""
2573 "B<pthread_attr_setschedparam>() 関数は、\n"
2574 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2575 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2576 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2577 "作成されるスレッドのスケジューリングパラメータが決定される。"
2578
2579 #. type: Plain text
2580 #: build/C/man3/pthread_attr_setschedparam.3:59
2581 msgid ""
2582 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2583 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2584 "by I<param>."
2585 msgstr ""
2586 "B<pthread_attr_getschedparam>() は、\n"
2587 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2588 "I<param> が指すバッファに入れて返す。"
2589
2590 #. type: Plain text
2591 #: build/C/man3/pthread_attr_setschedparam.3:61
2592 msgid "Scheduling parameters are maintained in the following structure:"
2593 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2594
2595 #. type: Plain text
2596 #: build/C/man3/pthread_attr_setschedparam.3:67
2597 #: build/C/man3/pthread_setschedparam.3:69
2598 #, no-wrap
2599 msgid ""
2600 "struct sched_param {\n"
2601 "    int sched_priority;     /* Scheduling priority */\n"
2602 "};\n"
2603 msgstr ""
2604 "struct sched_param {\n"
2605 "    int sched_priority;     /* Scheduling priority */\n"
2606 "};\n"
2607
2608 #. type: Plain text
2609 #: build/C/man3/pthread_attr_setschedparam.3:74
2610 #: build/C/man3/pthread_setschedparam.3:76
2611 msgid ""
2612 "As can be seen, only one scheduling parameter is supported.  For details of "
2613 "the permitted ranges for scheduling priorities in each scheduling policy, "
2614 "see B<sched_setscheduler>(2)."
2615 msgstr ""
2616 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2617 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2618 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2619
2620 #.  .SH VERSIONS
2621 #.  Available since glibc 2.0.
2622 #. type: Plain text
2623 #: build/C/man3/pthread_attr_setschedparam.3:89
2624 msgid ""
2625 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2626 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2627 "(but portable and future-proof applications should nevertheless handle a "
2628 "possible error return)."
2629 msgstr ""
2630 "POSIX.1 では、\n"
2631 "B<pthread_attr_setschedparam>() について\n"
2632 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2633 "Linux では、これらの関数は常に成功する\n"
2634 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2635 "正のエラーの返り値を処理するようにすべきである)。"
2636
2637 #. type: Plain text
2638 #: build/C/man3/pthread_attr_setschedparam.3:95
2639 msgid ""
2640 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2641 "policies supported on Linux."
2642 msgstr ""
2643 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2644 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2645
2646 #. type: Plain text
2647 #: build/C/man3/pthread_attr_setschedparam.3:110
2648 msgid ""
2649 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2650 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2651 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2652 "(3), B<pthreads>(7)"
2653 msgstr ""
2654 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2655 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2656 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2657 "(3), B<pthreads>(7)"
2658
2659 #. type: TH
2660 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2661 #, no-wrap
2662 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2663 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2664
2665 #. type: Plain text
2666 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2667 msgid ""
2668 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2669 "scheduling policy attribute in thread attributes object"
2670 msgstr ""
2671 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2672 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2673
2674 #. type: Plain text
2675 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2676 #, no-wrap
2677 msgid ""
2678 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2679 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2680 msgstr ""
2681 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2682 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2683
2684 #. type: Plain text
2685 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2686 msgid ""
2687 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2688 "attribute of the thread attributes object referred to by I<attr> to the "
2689 "value specified in I<policy>.  This attribute determines the scheduling "
2690 "policy of a thread created using the thread attributes object I<attr>."
2691 msgstr ""
2692 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2693 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2694 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2695 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2696 "作成されるスレッドのスケジューリングポリシーが決定される。"
2697
2698 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2699 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2700 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2701 #. type: Plain text
2702 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2703 msgid ""
2704 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2705 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2706 msgstr ""
2707 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2708 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2709 "である。"
2710
2711 #. type: Plain text
2712 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2713 msgid ""
2714 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2715 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2716 "by I<policy>."
2717 msgstr ""
2718 "B<pthread_attr_getschedpolicy>() は、\n"
2719 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2720 "I<policy> が指すバッファに入れて返す。"
2721
2722 #. type: Plain text
2723 #: build/C/man3/pthread_attr_setschedpolicy.3:78
2724 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2725 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2726
2727 #. type: Plain text
2728 #: build/C/man3/pthread_attr_setschedpolicy.3:82
2729 msgid "Invalid value in I<policy>."
2730 msgstr "I<policy> に無効な値が指定された。"
2731
2732 #.  .SH VERSIONS
2733 #.  Available since glibc 2.0.
2734 #. type: Plain text
2735 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2736 msgid ""
2737 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2738 "to set the attribute to an unsupported value\") for "
2739 "B<pthread_attr_setschedpolicy>()."
2740 msgstr ""
2741 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2742 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2743 "も追加で規定されている。"
2744
2745 #. type: Plain text
2746 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2747 msgid ""
2748 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2749 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2750 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2751 "(3), B<pthreads>(7)"
2752 msgstr ""
2753 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2754 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2755 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2756 "(3), B<pthreads>(7)"
2757
2758 #. type: TH
2759 #: build/C/man3/pthread_attr_setscope.3:26
2760 #, no-wrap
2761 msgid "PTHREAD_ATTR_SETSCOPE"
2762 msgstr "PTHREAD_ATTR_SETSCOPE"
2763
2764 #. type: Plain text
2765 #: build/C/man3/pthread_attr_setscope.3:30
2766 msgid ""
2767 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2768 "attribute in thread attributes object"
2769 msgstr ""
2770 "pthread_attr_setscope, pthread_attr_getscope - \n"
2771 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2772
2773 #. type: Plain text
2774 #: build/C/man3/pthread_attr_setscope.3:38
2775 #, no-wrap
2776 msgid ""
2777 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2778 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2779 msgstr ""
2780 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2781 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2782
2783 #. type: Plain text
2784 #: build/C/man3/pthread_attr_setscope.3:53
2785 msgid ""
2786 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2787 "of the thread attributes object referred to by I<attr> to the value "
2788 "specified in I<scope>.  The contention scope attribute defines the set of "
2789 "threads against which a thread competes for resources such as the CPU.  "
2790 "POSIX.1-2001 specifies two possible values for I<scope>:"
2791 msgstr ""
2792 "B<pthread_attr_setscope>() 関数は、\n"
2793 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2794 "属性を I<scope> で指定された値に設定する。\n"
2795 "contention scope 属性により、\n"
2796 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2797 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2798
2799 #. type: TP
2800 #: build/C/man3/pthread_attr_setscope.3:53
2801 #, no-wrap
2802 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2803 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2804
2805 #. type: Plain text
2806 #: build/C/man3/pthread_attr_setscope.3:61
2807 msgid ""
2808 "The thread competes for resources with all other threads in all processes on "
2809 "the system that are in the same scheduling allocation domain (a group of one "
2810 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2811 "to one another according to their scheduling policy and priority."
2812 msgstr ""
2813 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2814 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2815 "スレッドとリソースを取り合う。 \n"
2816 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2817 "優先度に基づき、互いに相対的にスケジューリングされる。"
2818
2819 #. type: TP
2820 #: build/C/man3/pthread_attr_setscope.3:61
2821 #, no-wrap
2822 msgid "B<PTHREAD_SCOPE_PROCESS>"
2823 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2824
2825 #. type: Plain text
2826 #: build/C/man3/pthread_attr_setscope.3:76
2827 msgid ""
2828 "The thread competes for resources with all other threads in the same process "
2829 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2830 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2831 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2832 "leaves it unspecified how these threads contend with other threads in other "
2833 "process on the system or with other threads in the same process that were "
2834 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2835 msgstr ""
2836 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2837 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2838 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2839 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2840 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2841 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2842 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2843 "規定されないままになっている。"
2844
2845 #. type: Plain text
2846 #: build/C/man3/pthread_attr_setscope.3:83
2847 msgid ""
2848 "POSIX.1-2001 only requires that an implementation support one of these "
2849 "contention scopes, but permits both to be supported.  Linux supports "
2850 "B<PTHREAD_SCOPE_SYSTEM>, but not B<PTHREAD_SCOPE_PROCESS>."
2851 msgstr ""
2852 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention\n"
2853 "scope のうち 1 つをサポートすることだけであるが、\n"
2854 "両方をサポートすることも認めている。\n"
2855 "Linux は B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、\n"
2856 "B<PTHREAD_SCOPE_PROCESS> はサポートしていない。"
2857
2858 #. type: Plain text
2859 #: build/C/man3/pthread_attr_setscope.3:91
2860 msgid ""
2861 "The B<pthread_attr_getscope>()  function returns the contention scope "
2862 "attribute of the thread attributes object referred to by I<attr> in the "
2863 "buffer pointed to by I<scope>."
2864 msgstr ""
2865 "B<pthread_attr_getscope>() は、\n"
2866 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2867 "I<scope> が指すバッファに入れて返す。"
2868
2869 #. type: Plain text
2870 #: build/C/man3/pthread_attr_setscope.3:97
2871 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2872 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2873
2874 #. type: Plain text
2875 #: build/C/man3/pthread_attr_setscope.3:101
2876 msgid "An invalid value was specified in I<scope>."
2877 msgstr "I<scope> に無効な値が指定された。"
2878
2879 #. type: TP
2880 #: build/C/man3/pthread_attr_setscope.3:101
2881 #, no-wrap
2882 msgid "B<ENOTSUP>"
2883 msgstr "B<ENOTSUP>"
2884
2885 #. type: Plain text
2886 #: build/C/man3/pthread_attr_setscope.3:107
2887 msgid ""
2888 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2889 "supported on Linux."
2890 msgstr ""
2891 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
2892 "この値は Linux でサポートされていない。"
2893
2894 #. type: Plain text
2895 #: build/C/man3/pthread_attr_setscope.3:117
2896 msgid ""
2897 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
2898 "space thread is bound directly to a single kernel-scheduling entity.  This "
2899 "is the case on Linux for the obsolete LinuxThreads implementation and the "
2900 "modern NPTL implementation, which are both 1:1 threading implementations."
2901 msgstr ""
2902 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
2903 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
2904 "直接結び付けられる。\n"
2905 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
2906 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
2907
2908 #. type: Plain text
2909 #: build/C/man3/pthread_attr_setscope.3:120
2910 msgid ""
2911 "POSIX.1-2001 specifies that the default contention scope is implementation-"
2912 "defined."
2913 msgstr ""
2914 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
2915 "実装時で定義されるものと規定されている。"
2916
2917 #. type: Plain text
2918 #: build/C/man3/pthread_attr_setscope.3:130
2919 msgid ""
2920 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2921 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2922 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2923 msgstr ""
2924 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2925 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2926 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2927
2928 #. type: TH
2929 #: build/C/man3/pthread_attr_setstack.3:26
2930 #, no-wrap
2931 msgid "PTHREAD_ATTR_SETSTACK"
2932 msgstr "PTHREAD_ATTR_SETSTACK"
2933
2934 #. type: Plain text
2935 #: build/C/man3/pthread_attr_setstack.3:30
2936 msgid ""
2937 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
2938 "thread attributes object"
2939 msgstr ""
2940 "pthread_attr_setstack, pthread_attr_getstack - \n"
2941 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
2942
2943 #. type: Plain text
2944 #: build/C/man3/pthread_attr_setstack.3:38
2945 #, no-wrap
2946 msgid ""
2947 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
2948 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
2949 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
2950 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
2951 msgstr ""
2952 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
2953 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
2954 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
2955 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
2956
2957 #. type: Plain text
2958 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_sigqueue.3:41
2959 msgid ""
2960 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2961 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
2962
2963 #. type: Plain text
2964 #: build/C/man3/pthread_attr_setstack.3:50
2965 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
2966 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
2967
2968 #. type: Plain text
2969 #: build/C/man3/pthread_attr_setstack.3:52
2970 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
2971 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
2972
2973 #. type: Plain text
2974 #: build/C/man3/pthread_attr_setstack.3:68
2975 msgid ""
2976 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
2977 "size attributes of the thread attributes object referred to by I<attr> to "
2978 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
2979 "attributes specify the location and size of the stack that should be used by "
2980 "a thread that is created using the thread attributes object I<attr>."
2981 msgstr ""
2982 "B<pthread_attr_setstack>() 関数は、\n"
2983 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
2984 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
2985 "指定された値に設定する。\n"
2986 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2987 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
2988
2989 #. type: Plain text
2990 #: build/C/man3/pthread_attr_setstack.3:74
2991 msgid ""
2992 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
2993 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
2994 "allocated buffer should be both readable and writable."
2995 msgstr ""
2996 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
2997 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
2998 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
2999 "べきである。"
3000
3001 #. type: Plain text
3002 #: build/C/man3/pthread_attr_setstack.3:85
3003 msgid ""
3004 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3005 "size attributes of the thread attributes object referred to by I<attr> in "
3006 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3007 msgstr ""
3008 "B<pthread_attr_getstack>() 関数は、\n"
3009 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3010 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3011 "指すバッファに入れて返す。"
3012
3013 #. type: Plain text
3014 #: build/C/man3/pthread_attr_setstack.3:91
3015 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3016 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3017
3018 #. type: Plain text
3019 #: build/C/man3/pthread_attr_setstack.3:102
3020 msgid ""
3021 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3022 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3023 "stacksize> is not suitably aligned."
3024 msgstr ""
3025 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3026 "システムによっては、 I<stackaddr> か\n"
3027 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3028 "このエラーが発生する。"
3029
3030 #. type: Plain text
3031 #: build/C/man3/pthread_attr_setstack.3:110
3032 msgid ""
3033 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3034 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3035 "caller."
3036 msgstr ""
3037 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3038 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3039 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3040
3041 #. type: Plain text
3042 #: build/C/man3/pthread_attr_setstack.3:112
3043 msgid "These functions are provided by glibc since version 2.2."
3044 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3045
3046 #. type: Plain text
3047 #: build/C/man3/pthread_attr_setstack.3:122
3048 msgid ""
3049 "These functions are provided for applications that must ensure that a "
3050 "thread's stack is placed in a particular location.  For most applications, "
3051 "this is not necessary, and the use of these functions should be avoided.  "
3052 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3053 "stack size other than the default.)"
3054 msgstr ""
3055 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3056 "しなければならないアプリケーションのために提供されている。\n"
3057 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3058 "これらの関数を使うのは避けるべきである。\n"
3059 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3060 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3061
3062 #. type: Plain text
3063 #: build/C/man3/pthread_attr_setstack.3:133
3064 msgid ""
3065 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3066 "responsibility of allocating the stack.  Any guard size value that was set "
3067 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3068 "is the application's responsibility to allocate a guard area (one or more "
3069 "pages protected against reading and writing)  to handle the possibility of "
3070 "stack overflow."
3071 msgstr ""
3072 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3073 "スタックの割り当てに責任を持つ必要がある。\n"
3074 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3075 "guard size の値は無視される。\n"
3076 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3077 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3078 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3079
3080 #. type: Plain text
3081 #: build/C/man3/pthread_attr_setstack.3:144
3082 msgid ""
3083 "The address specified in I<stackaddr> should be suitably aligned: for full "
3084 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3085 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3086 "should also be a multiple of the system page size."
3087 msgstr ""
3088 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3089 "完全な移植性を持たせるためには、\n"
3090 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3091 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3092 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3093
3094 #. type: Plain text
3095 #: build/C/man3/pthread_attr_setstack.3:153
3096 msgid ""
3097 "If I<attr> is used to create multiple threads, then the caller must change "
3098 "the stack address attribute between calls to B<pthread_create>(3); "
3099 "otherwise, the threads will attempt to use the same memory area for their "
3100 "stacks, and chaos will ensue."
3101 msgstr ""
3102 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3103 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3104 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3105 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3106 "使おうとするため、訳の分からない状況が発生してしまう。"
3107
3108 #. type: Plain text
3109 #: build/C/man3/pthread_attr_setstack.3:168
3110 msgid ""
3111 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3112 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3113 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3114 msgstr ""
3115 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3116 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3117 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3118
3119 #. type: TH
3120 #: build/C/man3/pthread_attr_setstackaddr.3:26
3121 #, no-wrap
3122 msgid "PTHREAD_ATTR_SETSTACKADDR"
3123 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3124
3125 #. type: Plain text
3126 #: build/C/man3/pthread_attr_setstackaddr.3:30
3127 msgid ""
3128 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3129 "attribute in thread attributes object"
3130 msgstr ""
3131 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3132 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3133
3134 #. type: Plain text
3135 #: build/C/man3/pthread_attr_setstackaddr.3:38
3136 #, no-wrap
3137 msgid ""
3138 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3139 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3140 msgstr ""
3141 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3142 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3143
3144 #. type: Plain text
3145 #: build/C/man3/pthread_attr_setstackaddr.3:49
3146 msgid ""
3147 "These functions are obsolete: B<do not use them.> Use "
3148 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3149 msgstr ""
3150 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3151 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3152 "うこと。"
3153
3154 #. type: Plain text
3155 #: build/C/man3/pthread_attr_setstackaddr.3:60
3156 msgid ""
3157 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3158 "attribute of the thread attributes object referred to by I<attr> to the "
3159 "value specified in I<stackaddr>.  This attribute specifies the location of "
3160 "the stack that should be used by a thread that is created using the thread "
3161 "attributes object I<attr>."
3162 msgstr ""
3163 "B<pthread_attr_setstackaddr>() 関数は、\n"
3164 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3165 "属性を I<stackaddr> で指定された値に設定する。\n"
3166 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3167 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3168
3169 #. type: Plain text
3170 #: build/C/man3/pthread_attr_setstackaddr.3:66
3171 msgid ""
3172 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3173 "that was allocated by the caller.  The pages of the allocated buffer should "
3174 "be both readable and writable."
3175 msgstr ""
3176 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3177 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3178 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3179 "なっているべきである。"
3180
3181 #. type: Plain text
3182 #: build/C/man3/pthread_attr_setstackaddr.3:74
3183 msgid ""
3184 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3185 "attribute of the thread attributes object referred to by I<attr> in the "
3186 "buffer pointed to by I<stackaddr>."
3187 msgstr ""
3188 "B<pthread_attr_getstackaddr>() は、\n"
3189 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3190 "I<stackaddr> が指すバッファに入れて返す。"
3191
3192 #. type: Plain text
3193 #: build/C/man3/pthread_attr_setstackaddr.3:81
3194 msgid ""
3195 "No errors are defined (but applications should nevertheless handle a "
3196 "possible error return)."
3197 msgstr ""
3198 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3199 "返り値を処理するようにすべきである)。"
3200
3201 #. type: Plain text
3202 #: build/C/man3/pthread_attr_setstackaddr.3:86
3203 msgid ""
3204 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3205 "POSIX.1-2008 removes the specification of these functions."
3206 msgstr ""
3207 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3208 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3209
3210 #. type: Plain text
3211 #: build/C/man3/pthread_attr_setstackaddr.3:110
3212 msgid ""
3213 "I<Do not use these functions!> They cannot be portably used, since they "
3214 "provide no way of specifying the direction of growth or the range of the "
3215 "stack.  For example, on architectures with a stack that grows downward, "
3216 "I<stackaddr> specifies the next address past the I<highest> address of the "
3217 "allocated stack area.  However, on architectures with a stack that grows "
3218 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3219 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3220 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3221 "in the allocated stack area (and the I<stacksize> argument specifies the "
3222 "range of the stack)."
3223 msgstr ""
3224 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3225 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3226 "かを指定する手段が提供されていないからである。\n"
3227 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3228 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3229 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3230 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3231 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3232 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3233 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3234 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3235
3236 #. type: Plain text
3237 #: build/C/man3/pthread_attr_setstackaddr.3:116
3238 msgid ""
3239 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3240 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3241 msgstr ""
3242 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3243 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3244
3245 #. type: TH
3246 #: build/C/man3/pthread_attr_setstacksize.3:26
3247 #, no-wrap
3248 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3249 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3250
3251 #. type: Plain text
3252 #: build/C/man3/pthread_attr_setstacksize.3:30
3253 msgid ""
3254 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3255 "attribute in thread attributes object"
3256 msgstr ""
3257 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3258 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3259
3260 #. type: Plain text
3261 #: build/C/man3/pthread_attr_setstacksize.3:38
3262 #, no-wrap
3263 msgid ""
3264 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3265 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3266 msgstr ""
3267 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3268 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3269
3270 #. type: Plain text
3271 #: build/C/man3/pthread_attr_setstacksize.3:49
3272 msgid ""
3273 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3274 "of the thread attributes object referred to by I<attr> to the value "
3275 "specified in I<stacksize>."
3276 msgstr ""
3277 "B<pthread_attr_setstacksize>() 関数は、\n"
3278 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3279 "属性を I<stacksize> で指定された値に設定する。"
3280
3281 #. type: Plain text
3282 #: build/C/man3/pthread_attr_setstacksize.3:53
3283 msgid ""
3284 "The stack size attribute determines the minimum size (in bytes) that will be "
3285 "allocated for threads created using the thread attributes object I<attr>."
3286 msgstr ""
3287 "スタックサイズ属性により、\n"
3288 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3289 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3290
3291 #. type: Plain text
3292 #: build/C/man3/pthread_attr_setstacksize.3:61
3293 msgid ""
3294 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3295 "attribute of the thread attributes object referred to by I<attr> in the "
3296 "buffer pointed to by I<stacksize>."
3297 msgstr ""
3298 "B<pthread_attr_getstacksize>() は、\n"
3299 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3300 "I<stacksize> が指すバッファに入れて返す。"
3301
3302 #. type: Plain text
3303 #: build/C/man3/pthread_attr_setstacksize.3:67
3304 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3305 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3306
3307 #. type: Plain text
3308 #: build/C/man3/pthread_attr_setstacksize.3:72
3309 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3310 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3311
3312 #.  e.g., MacOS
3313 #. type: Plain text
3314 #: build/C/man3/pthread_attr_setstacksize.3:81
3315 msgid ""
3316 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3317 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3318 msgstr ""
3319 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3320 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3321 "エラー B<EINVAL> で失敗する。"
3322
3323 #. type: Plain text
3324 #: build/C/man3/pthread_attr_setstacksize.3:88
3325 msgid ""
3326 "For details on the default stack size of new threads, see B<pthread_create>"
3327 "(3)."
3328 msgstr ""
3329 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3330 "B<pthread_create>(3) を参照。"
3331
3332 #. type: Plain text
3333 #: build/C/man3/pthread_attr_setstacksize.3:91
3334 msgid ""
3335 "A thread's stack size is fixed at the time of thread creation.  Only the "
3336 "main thread can dynamically grow its stack."
3337 msgstr ""
3338 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3339 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3340
3341 #. type: Plain text
3342 #: build/C/man3/pthread_attr_setstacksize.3:96
3343 msgid ""
3344 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3345 "the size and location of a caller-allocated stack that is to be used by a "
3346 "thread."
3347 msgstr ""
3348 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3349 "アプリケーションは、スレッドが使用するスタックとして、\n"
3350 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3351
3352 #. type: Plain text
3353 #: build/C/man3/pthread_attr_setstacksize.3:108
3354 msgid ""
3355 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3356 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3357 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3358 "stack will be at least I<stacksize> bytes."
3359 msgstr ""
3360 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3361 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3362 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3363 "これは POSIX.1-2001 に違反している。\n"
3364 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3365 "少なくとも I<stacksize> バイトになると書かれている。"
3366
3367 #. type: Plain text
3368 #: build/C/man3/pthread_attr_setstacksize.3:111
3369 #: build/C/man3/pthread_join.3:127
3370 msgid "See B<pthread_create>(3)."
3371 msgstr "B<pthread_create>(3) を参照。"
3372
3373 #. type: Plain text
3374 #: build/C/man3/pthread_attr_setstacksize.3:118
3375 msgid ""
3376 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3377 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3378 msgstr ""
3379 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3380 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3381
3382 #. type: TH
3383 #: build/C/man3/pthread_cancel.3:26
3384 #, no-wrap
3385 msgid "PTHREAD_CANCEL"
3386 msgstr "PTHREAD_CANCEL"
3387
3388 #. type: TH
3389 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3390 #, no-wrap
3391 msgid "2008-11-17"
3392 msgstr "2008-11-17"
3393
3394 #. type: Plain text
3395 #: build/C/man3/pthread_cancel.3:29
3396 msgid "pthread_cancel - send a cancellation request to a thread"
3397 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3398
3399 #. type: Plain text
3400 #: build/C/man3/pthread_cancel.3:34
3401 #, no-wrap
3402 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3403 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3404
3405 #. type: Plain text
3406 #: build/C/man3/pthread_cancel.3:46
3407 msgid ""
3408 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3409 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3410 "request depends on two attributes that are under the control of that thread: "
3411 "its cancelability I<state> and I<type>."
3412 msgstr ""
3413 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3414 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3415 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3416 "I<state> と I<type>により決まる。"
3417
3418 #. type: Plain text
3419 #: build/C/man3/pthread_cancel.3:58
3420 msgid ""
3421 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3422 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3423 "has disabled cancellation, then a cancellation request remains queued until "
3424 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3425 "its cancelability type determines when cancellation occurs."
3426 msgstr ""
3427 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3428 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3429 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3430 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3431 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3432 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3433
3434 #. type: Plain text
3435 #: build/C/man3/pthread_cancel.3:74
3436 msgid ""
3437 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3438 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3439 "Asynchronous cancelability means that the thread can be canceled at any time "
3440 "(usually immediately, but the system does not guarantee this).  Deferred "
3441 "cancelability means that cancellation will be delayed until the thread next "
3442 "calls a function that is a I<cancellation point>.  A list of functions that "
3443 "are or may be cancellation points is provided in I<pthreads>(7)."
3444 msgstr ""
3445 "スレッドのキャンセル種別 (cancelability type) は\n"
3446 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3447 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3448 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3449 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3450 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3451 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3452 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3453 "遅延される。取り消しポイントに設定されていたり設定\n"
3454 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3455
3456 #. type: Plain text
3457 #: build/C/man3/pthread_cancel.3:78
3458 msgid ""
3459 "When a cancellation requested is acted on, the following steps occur for "
3460 "I<thread> (in this order):"
3461 msgstr ""
3462 "キャンセル要求が実行されると、\n"
3463 "I<thread> では以下のステップが (この順序で) 行われる。"
3464
3465 #. type: IP
3466 #: build/C/man3/pthread_cancel.3:78 build/C/man3/pthread_cleanup_push.3:69
3467 #, no-wrap
3468 msgid "1."
3469 msgstr "1."
3470
3471 #. type: Plain text
3472 #: build/C/man3/pthread_cancel.3:83
3473 msgid ""
3474 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3475 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3476 msgstr ""
3477 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3478 "取り出され (pop され)、呼び出される。\n"
3479 "(B<pthread_cleanup_push>(3) 参照)"
3480
3481 #. type: IP
3482 #: build/C/man3/pthread_cancel.3:83 build/C/man3/pthread_cleanup_push.3:73
3483 #, no-wrap
3484 msgid "2."
3485 msgstr "2."
3486
3487 #. type: Plain text
3488 #: build/C/man3/pthread_cancel.3:88
3489 msgid ""
3490 "Thread-specific data destructors are called, in an unspecified order.  (See "
3491 "B<pthread_key_create>(3).)"
3492 msgstr ""
3493 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3494 "呼び出し順序は規定されていない。\n"
3495 "(B<pthread_key_create>(3) 参照)"
3496
3497 #. type: IP
3498 #: build/C/man3/pthread_cancel.3:88 build/C/man3/pthread_cleanup_push.3:81
3499 #, no-wrap
3500 msgid "3."
3501 msgstr "3."
3502
3503 #. type: Plain text
3504 #: build/C/man3/pthread_cancel.3:92
3505 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3506 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3507
3508 #. type: Plain text
3509 #: build/C/man3/pthread_cancel.3:100
3510 msgid ""
3511 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3512 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3513 "caller whether the cancellation request was successfully queued."
3514 msgstr ""
3515 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3516 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3517 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3518
3519 #. type: Plain text
3520 #: build/C/man3/pthread_cancel.3:109
3521 msgid ""
3522 "After a canceled thread has terminated, a join with that thread using "
3523 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3524 "status.  (Joining with a thread is the only way to know that cancellation "
3525 "has completed.)"
3526 msgstr ""
3527 "キャンセルされたスレッドが終了された後に、\n"
3528 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3529 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3530 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3531
3532 #. type: Plain text
3533 #: build/C/man3/pthread_cancel.3:114
3534 msgid ""
3535 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3536 "error number."
3537 msgstr ""
3538 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3539 "エラーの場合、0 以外のエラー番号を返す。"
3540
3541 #. type: TP
3542 #: build/C/man3/pthread_cancel.3:115 build/C/man3/pthread_detach.3:59
3543 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3544 #: build/C/man3/pthread_kill.3:61 build/C/man3/pthread_setaffinity_np.3:114
3545 #: build/C/man3/pthread_setschedparam.3:114
3546 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3547 #, no-wrap
3548 msgid "B<ESRCH>"
3549 msgstr "B<ESRCH>"
3550
3551 #. type: Plain text
3552 #: build/C/man3/pthread_cancel.3:122 build/C/man3/pthread_detach.3:64
3553 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3554 #: build/C/man3/pthread_kill.3:66 build/C/man3/pthread_setaffinity_np.3:119
3555 #: build/C/man3/pthread_setschedparam.3:119
3556 #: build/C/man3/pthread_setschedprio.3:75
3557 msgid "No thread with the ID I<thread> could be found."
3558 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3559
3560 #. type: Plain text
3561 #: build/C/man3/pthread_cancel.3:132
3562 msgid ""
3563 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3564 "threading implementation, the first real-time signal (i.e., signal 32) is "
3565 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3566 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3567 msgstr ""
3568 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3569 "は、\n"
3570 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3571 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3572 "ム\n"
3573 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3574
3575 #. type: Plain text
3576 #: build/C/man3/pthread_cancel.3:138
3577 msgid ""
3578 "The program below creates a thread and then cancels it.  The main thread "
3579 "joins with the canceled thread to check that its exit status was "
3580 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3581 "run the program:"
3582 msgstr ""
3583 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3584 "る。\n"
3585 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3586 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3587 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3588
3589 #. type: Plain text
3590 #: build/C/man3/pthread_cancel.3:146
3591 #, no-wrap
3592 msgid ""
3593 "$ ./a.out\n"
3594 "thread_func(): started; cancellation disabled\n"
3595 "main(): sending cancellation request\n"
3596 "thread_func(): about to enable cancellation\n"
3597 "main(): thread was canceled\n"
3598 msgstr ""
3599 "$ ./a.out\n"
3600 "thread_func(): started; cancellation disabled\n"
3601 "main(): sending cancellation request\n"
3602 "thread_func(): about to enable cancellation\n"
3603 "main(): thread was canceled\n"
3604
3605 #. type: Plain text
3606 #: build/C/man3/pthread_cancel.3:156
3607 #, no-wrap
3608 msgid ""
3609 "#include E<lt>pthread.hE<gt>\n"
3610 "#include E<lt>stdio.hE<gt>\n"
3611 "#include E<lt>errno.hE<gt>\n"
3612 "#include E<lt>stdlib.hE<gt>\n"
3613 "#include E<lt>unistd.hE<gt>\n"
3614 msgstr ""
3615 "#include E<lt>pthread.hE<gt>\n"
3616 "#include E<lt>stdio.hE<gt>\n"
3617 "#include E<lt>errno.hE<gt>\n"
3618 "#include E<lt>stdlib.hE<gt>\n"
3619 "#include E<lt>unistd.hE<gt>\n"
3620
3621 #. type: Plain text
3622 #: build/C/man3/pthread_cancel.3:164
3623 #, no-wrap
3624 msgid ""
3625 "static void *\n"
3626 "thread_func(void *ignored_argument)\n"
3627 "{\n"
3628 "    int s;\n"
3629 msgstr ""
3630 "static void *\n"
3631 "thread_func(void *ignored_argument)\n"
3632 "{\n"
3633 "    int s;\n"
3634
3635 #. type: Plain text
3636 #: build/C/man3/pthread_cancel.3:167
3637 #, no-wrap
3638 msgid ""
3639 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3640 "       immediately react to a cancellation request */\n"
3641 msgstr ""
3642 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3643 "       immediately react to a cancellation request */\n"
3644
3645 #. type: Plain text
3646 #: build/C/man3/pthread_cancel.3:171
3647 #, no-wrap
3648 msgid ""
3649 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3650 "    if (s != 0)\n"
3651 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3652 msgstr ""
3653 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3654 "    if (s != 0)\n"
3655 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3656
3657 #. type: Plain text
3658 #: build/C/man3/pthread_cancel.3:175
3659 #, no-wrap
3660 msgid ""
3661 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3662 "    sleep(5);\n"
3663 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3664 msgstr ""
3665 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3666 "    sleep(5);\n"
3667 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3668
3669 #. type: Plain text
3670 #: build/C/man3/pthread_cancel.3:179
3671 #, no-wrap
3672 msgid ""
3673 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3674 "    if (s != 0)\n"
3675 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3676 msgstr ""
3677 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3678 "    if (s != 0)\n"
3679 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3680
3681 #. type: Plain text
3682 #: build/C/man3/pthread_cancel.3:181
3683 #, no-wrap
3684 msgid "    /* sleep() is a cancellation point */\n"
3685 msgstr "    /* sleep() is a cancellation point */\n"
3686
3687 #. type: Plain text
3688 #: build/C/man3/pthread_cancel.3:183
3689 #, no-wrap
3690 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3691 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3692
3693 #. type: Plain text
3694 #: build/C/man3/pthread_cancel.3:185
3695 #, no-wrap
3696 msgid "    /* Should never get here */\n"
3697 msgstr "    /* Should never get here */\n"
3698
3699 #. type: Plain text
3700 #: build/C/man3/pthread_cancel.3:189
3701 #, no-wrap
3702 msgid ""
3703 "    printf(\"thread_func(): not canceled!\\en\");\n"
3704 "    return NULL;\n"
3705 "}\n"
3706 msgstr ""
3707 "    printf(\"thread_func(): not canceled!\\en\");\n"
3708 "    return NULL;\n"
3709 "}\n"
3710
3711 #. type: Plain text
3712 #: build/C/man3/pthread_cancel.3:196
3713 #, no-wrap
3714 msgid ""
3715 "int\n"
3716 "main(void)\n"
3717 "{\n"
3718 "    pthread_t thr;\n"
3719 "    void *res;\n"
3720 "    int s;\n"
3721 msgstr ""
3722 "int\n"
3723 "main(void)\n"
3724 "{\n"
3725 "    pthread_t thr;\n"
3726 "    void *res;\n"
3727 "    int s;\n"
3728
3729 #. type: Plain text
3730 #: build/C/man3/pthread_cancel.3:198
3731 #, no-wrap
3732 msgid "    /* Start a thread and then send it a cancellation request */\n"
3733 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3734
3735 #. type: Plain text
3736 #: build/C/man3/pthread_cancel.3:202
3737 #, no-wrap
3738 msgid ""
3739 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3740 "    if (s != 0)\n"
3741 "        handle_error_en(s, \"pthread_create\");\n"
3742 msgstr ""
3743 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3744 "    if (s != 0)\n"
3745 "        handle_error_en(s, \"pthread_create\");\n"
3746
3747 #. type: Plain text
3748 #: build/C/man3/pthread_cancel.3:204
3749 #, no-wrap
3750 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3751 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3752
3753 #. type: Plain text
3754 #: build/C/man3/pthread_cancel.3:209
3755 #, no-wrap
3756 msgid ""
3757 "    printf(\"main(): sending cancellation request\\en\");\n"
3758 "    s = pthread_cancel(thr);\n"
3759 "    if (s != 0)\n"
3760 "        handle_error_en(s, \"pthread_cancel\");\n"
3761 msgstr ""
3762 "    printf(\"main(): sending cancellation request\\en\");\n"
3763 "    s = pthread_cancel(thr);\n"
3764 "    if (s != 0)\n"
3765 "        handle_error_en(s, \"pthread_cancel\");\n"
3766
3767 #. type: Plain text
3768 #: build/C/man3/pthread_cancel.3:211
3769 #, no-wrap
3770 msgid "    /* Join with thread to see what its exit status was */\n"
3771 msgstr "    /* Join with thread to see what its exit status was */\n"
3772
3773 #. type: Plain text
3774 #: build/C/man3/pthread_cancel.3:215 build/C/man3/pthread_cleanup_push.3:303
3775 #, no-wrap
3776 msgid ""
3777 "    s = pthread_join(thr, &res);\n"
3778 "    if (s != 0)\n"
3779 "        handle_error_en(s, \"pthread_join\");\n"
3780 msgstr ""
3781 "    s = pthread_join(thr, &res);\n"
3782 "    if (s != 0)\n"
3783 "        handle_error_en(s, \"pthread_join\");\n"
3784
3785 #. type: Plain text
3786 #: build/C/man3/pthread_cancel.3:222
3787 #, no-wrap
3788 msgid ""
3789 "    if (res == PTHREAD_CANCELED)\n"
3790 "        printf(\"main(): thread was canceled\\en\");\n"
3791 "    else\n"
3792 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3793 "    exit(EXIT_SUCCESS);\n"
3794 "}\n"
3795 msgstr ""
3796 "    if (res == PTHREAD_CANCELED)\n"
3797 "        printf(\"main(): thread was canceled\\en\");\n"
3798 "    else\n"
3799 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3800 "    exit(EXIT_SUCCESS);\n"
3801 "}\n"
3802
3803 #. type: Plain text
3804 #: build/C/man3/pthread_cancel.3:235
3805 msgid ""
3806 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3807 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3808 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3809 msgstr ""
3810 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3811 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3812 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3813
3814 #. type: TH
3815 #: build/C/man3/pthread_cleanup_push.3:26
3816 #, no-wrap
3817 msgid "PTHREAD_CLEANUP_PUSH"
3818 msgstr "PTHREAD_CLEANUP_PUSH"
3819
3820 #. type: TH
3821 #: build/C/man3/pthread_cleanup_push.3:26
3822 #: build/C/man3/pthread_setcancelstate.3:26
3823 #, no-wrap
3824 msgid "2008-11-24"
3825 msgstr "2008-11-24"
3826
3827 #. type: Plain text
3828 #: build/C/man3/pthread_cleanup_push.3:30
3829 msgid ""
3830 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3831 "clean-up handlers"
3832 msgstr ""
3833 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3834 "キャンセルクリーンアップハンドラの push/pop を行う"
3835
3836 #. type: Plain text
3837 #: build/C/man3/pthread_cleanup_push.3:37
3838 #, no-wrap
3839 msgid ""
3840 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3841 "B<                          void *>I<arg>B<);>\n"
3842 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3843 msgstr ""
3844 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3845 "B<                          void *>I<arg>B<);>\n"
3846 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3847
3848 #. type: Plain text
3849 #: build/C/man3/pthread_cleanup_push.3:48
3850 msgid ""
3851 "These functions manipulate the calling thread's stack of thread-cancellation "
3852 "clean-up handlers.  A clean-up handler is a function that is automatically "
3853 "executed when a thread is canceled (or in various other circumstances "
3854 "described below); it might, for example, unlock a mutex so that it becomes "
3855 "available to other threads in the process."
3856 msgstr ""
3857 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3858 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3859 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3860 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3861 "他のスレッドが利用できるようにする関数などが考えられる。"
3862
3863 #. type: Plain text
3864 #: build/C/man3/pthread_cleanup_push.3:59
3865 msgid ""
3866 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3867 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3868 "be given I<arg> as its argument."
3869 msgstr ""
3870 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3871 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3872 "起動される際には、 I<arg> が関数の引き数と渡される。"
3873
3874 #. type: Plain text
3875 #: build/C/man3/pthread_cleanup_push.3:66
3876 msgid ""
3877 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3878 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3879 "nonzero."
3880 msgstr ""
3881 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3882 "スタックの一番上のルーチンを削除する。\n"
3883 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3884
3885 #. type: Plain text
3886 #: build/C/man3/pthread_cleanup_push.3:69
3887 msgid ""
3888 "A cancellation clean-up handler is popped from the stack and executed in the "
3889 "following circumstances:"
3890 msgstr ""
3891 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3892 "スタックから取り出され実行される。"
3893
3894 #. type: Plain text
3895 #: build/C/man3/pthread_cleanup_push.3:73
3896 msgid ""
3897 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3898 "and executed in the reverse of the order in which they were pushed onto the "
3899 "stack."
3900 msgstr ""
3901 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3902 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3903 "実行は、スタックに登録されたのと逆の順序で行われる。"
3904
3905 #. type: Plain text
3906 #: build/C/man3/pthread_cleanup_push.3:81
3907 msgid ""
3908 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
3909 "handlers are executed as described in the preceding point.  (Clean-up "
3910 "handlers are I<not> called if the thread terminates by performing a "
3911 "I<return> from the thread start function.)"
3912 msgstr ""
3913 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
3914 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
3915 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
3916 "は、クリーンアップハンドラはI<呼び出されない>。)"
3917
3918 #. type: Plain text
3919 #: build/C/man3/pthread_cleanup_push.3:87
3920 msgid ""
3921 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
3922 "argument, the top-most clean-up handler is popped and executed."
3923 msgstr ""
3924 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
3925 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
3926 "実行される。"
3927
3928 #. type: Plain text
3929 #: build/C/man3/pthread_cleanup_push.3:99
3930 msgid ""
3931 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
3932 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
3933 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
3934 "calls to these functions are paired within the same function, and at the "
3935 "same lexical nesting level.  (In other words, a clean-up handler is only "
3936 "established during the execution of a specified section of code.)"
3937 msgstr ""
3938 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
3939 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
3940 "して実装することを許容している。\n"
3941 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
3942 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
3943 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
3944 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
3945
3946 #. type: Plain text
3947 #: build/C/man3/pthread_cleanup_push.3:119
3948 msgid ""
3949 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
3950 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
3951 "()  without the matching call of the pair since the jump buffer was filled "
3952 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
3953 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
3954 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
3955 "(3))  inside the handler."
3956 msgstr ""
3957 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
3958 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
3959 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
3960 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
3961 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
3962 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
3963 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
3964 "結果になるかは不定である。"
3965
3966 #. type: Plain text
3967 #: build/C/man3/pthread_cleanup_push.3:121
3968 msgid "These functions do not return a value."
3969 msgstr "これらの関数は値を返さない。"
3970
3971 #.  SH VERSIONS
3972 #.  Available since glibc 2.0
3973 #. type: Plain text
3974 #: build/C/man3/pthread_cleanup_push.3:125
3975 msgid "There are no errors."
3976 msgstr "エラーはない。"
3977
3978 #. type: Plain text
3979 #: build/C/man3/pthread_cleanup_push.3:136
3980 msgid ""
3981 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
3982 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
3983 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
3984 "declared within the scope of paired calls to these functions will only be "
3985 "visible within that scope."
3986 msgstr ""
3987 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
3988 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
3989 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
3990 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
3991 "ということを意味している。"
3992
3993 #.  The text was actually added in the 2004 TC2
3994 #. type: Plain text
3995 #: build/C/man3/pthread_cleanup_push.3:151
3996 msgid ""
3997 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
3998 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
3999 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4000 "avoid doing this."
4001 msgstr ""
4002 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4003 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4004 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4005 "不定であると書かれている。\n"
4006 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4007
4008 #. type: Plain text
4009 #: build/C/man3/pthread_cleanup_push.3:166
4010 msgid ""
4011 "The program below provides a simple example of the use of the functions "
4012 "described in this page.  The program creates a thread that executes a loop "
4013 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4014 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4015 "what command-line arguments are supplied, the main thread sends the other "
4016 "thread a cancellation request, or sets a global variable that causes the "
4017 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4018 msgstr ""
4019 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4020 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4021 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4022 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4023 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4024 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4025 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4026 "設定したりする。"
4027
4028 #. type: Plain text
4029 #: build/C/man3/pthread_cleanup_push.3:169
4030 msgid ""
4031 "In the following shell session, the main thread sends a cancellation request "
4032 "to the other thread:"
4033 msgstr ""
4034 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4035 "キャンセル要求を送信する。"
4036
4037 #. type: Plain text
4038 #: build/C/man3/pthread_cleanup_push.3:179
4039 #, no-wrap
4040 msgid ""
4041 "$ B<./a.out>\n"
4042 "New thread started\n"
4043 "cnt = 0\n"
4044 "cnt = 1\n"
4045 "Canceling thread\n"
4046 "Called clean-up handler\n"
4047 "Thread was canceled; cnt = 0\n"
4048 msgstr ""
4049 "$ B<./a.out>\n"
4050 "New thread started\n"
4051 "cnt = 0\n"
4052 "cnt = 1\n"
4053 "Canceling thread\n"
4054 "Called clean-up handler\n"
4055 "Thread was canceled; cnt = 0\n"
4056
4057 #. type: Plain text
4058 #: build/C/man3/pthread_cleanup_push.3:187
4059 msgid ""
4060 "From the above, we see that the thread was canceled, and that the "
4061 "cancellation clean-up handler was called and it reset the value of the "
4062 "global variable I<cnt> to 0."
4063 msgstr ""
4064 "上記の実行例から、スレッドがキャンセルされ、\n"
4065 "キャンセルクリーンアップハンドラが呼び出され、\n"
4066 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4067
4068 #. type: Plain text
4069 #: build/C/man3/pthread_cleanup_push.3:190
4070 msgid ""
4071 "In the next run, the main program sets a global variable that causes other "
4072 "thread to terminate normally:"
4073 msgstr ""
4074 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4075 "もう一つのスレッドが正常終了するようにしている。"
4076
4077 #. type: Plain text
4078 #: build/C/man3/pthread_cleanup_push.3:198
4079 #, no-wrap
4080 msgid ""
4081 "$ B<./a.out x>\n"
4082 "New thread started\n"
4083 "cnt = 0\n"
4084 "cnt = 1\n"
4085 "Thread terminated normally; cnt = 2\n"
4086 msgstr ""
4087 "$ B<./a.out x>\n"
4088 "New thread started\n"
4089 "cnt = 0\n"
4090 "cnt = 1\n"
4091 "Thread terminated normally; cnt = 2\n"
4092
4093 #. type: Plain text
4094 #: build/C/man3/pthread_cleanup_push.3:206
4095 msgid ""
4096 "From the above, we see that the clean-up handler was not executed (because "
4097 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4098 msgstr ""
4099 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4100 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4101 "分かる。"
4102
4103 #. type: Plain text
4104 #: build/C/man3/pthread_cleanup_push.3:211
4105 msgid ""
4106 "In the next run, the main program sets a global variable that causes the "
4107 "other thread to terminate normally, and supplies a nonzero value for "
4108 "I<cleanup_pop_arg>:"
4109 msgstr ""
4110 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4111 "もう一つのスレッドが正常終了するようにし、さらに\n"
4112 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4113
4114 #. type: Plain text
4115 #: build/C/man3/pthread_cleanup_push.3:220
4116 #, no-wrap
4117 msgid ""
4118 "$ B<./a.out x 1>\n"
4119 "New thread started\n"
4120 "cnt = 0\n"
4121 "cnt = 1\n"
4122 "Called clean-up handler\n"
4123 "Thread terminated normally; cnt = 0\n"
4124 msgstr ""
4125 "$ B<./a.out x 1>\n"
4126 "New thread started\n"
4127 "cnt = 0\n"
4128 "cnt = 1\n"
4129 "Called clean-up handler\n"
4130 "Thread terminated normally; cnt = 0\n"
4131
4132 #. type: Plain text
4133 #: build/C/man3/pthread_cleanup_push.3:227
4134 msgid ""
4135 "In the above, we see that although the thread was not canceled, the clean-up "
4136 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4137 "()  was nonzero."
4138 msgstr ""
4139 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4140 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4141 "に 0 以外を渡したからである。"
4142
4143 #. type: Plain text
4144 #: build/C/man3/pthread_cleanup_push.3:236
4145 #, no-wrap
4146 msgid ""
4147 "#include E<lt>pthread.hE<gt>\n"
4148 "#include E<lt>sys/types.hE<gt>\n"
4149 "#include E<lt>stdio.hE<gt>\n"
4150 "#include E<lt>stdlib.hE<gt>\n"
4151 "#include E<lt>unistd.hE<gt>\n"
4152 "#include E<lt>errno.hE<gt>\n"
4153 msgstr ""
4154 "#include E<lt>pthread.hE<gt>\n"
4155 "#include E<lt>sys/types.hE<gt>\n"
4156 "#include E<lt>stdio.hE<gt>\n"
4157 "#include E<lt>stdlib.hE<gt>\n"
4158 "#include E<lt>unistd.hE<gt>\n"
4159 "#include E<lt>errno.hE<gt>\n"
4160
4161 #. type: Plain text
4162 #: build/C/man3/pthread_cleanup_push.3:243
4163 #, no-wrap
4164 msgid ""
4165 "static int done = 0;\n"
4166 "static int cleanup_pop_arg = 0;\n"
4167 "static int cnt = 0;\n"
4168 msgstr ""
4169 "static int done = 0;\n"
4170 "static int cleanup_pop_arg = 0;\n"
4171 "static int cnt = 0;\n"
4172
4173 #. type: Plain text
4174 #: build/C/man3/pthread_cleanup_push.3:250
4175 #, no-wrap
4176 msgid ""
4177 "static void\n"
4178 "cleanup_handler(void *arg)\n"
4179 "{\n"
4180 "    printf(\"Called clean-up handler\\en\");\n"
4181 "    cnt = 0;\n"
4182 "}\n"
4183 msgstr ""
4184 "static void\n"
4185 "cleanup_handler(void *arg)\n"
4186 "{\n"
4187 "    printf(\"Called clean-up handler\\en\");\n"
4188 "    cnt = 0;\n"
4189 "}\n"
4190
4191 #. type: Plain text
4192 #: build/C/man3/pthread_cleanup_push.3:255
4193 #, no-wrap
4194 msgid ""
4195 "static void *\n"
4196 "thread_start(void *arg)\n"
4197 "{\n"
4198 "    time_t start, curr;\n"
4199 msgstr ""
4200 "static void *\n"
4201 "thread_start(void *arg)\n"
4202 "{\n"
4203 "    time_t start, curr;\n"
4204
4205 #. type: Plain text
4206 #: build/C/man3/pthread_cleanup_push.3:257
4207 #, no-wrap
4208 msgid "    printf(\"New thread started\\en\");\n"
4209 msgstr "    printf(\"New thread started\\en\");\n"
4210
4211 #. type: Plain text
4212 #: build/C/man3/pthread_cleanup_push.3:259
4213 #, no-wrap
4214 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4215 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4216
4217 #. type: Plain text
4218 #: build/C/man3/pthread_cleanup_push.3:261
4219 #, no-wrap
4220 msgid "    curr = start = time(NULL);\n"
4221 msgstr "    curr = start = time(NULL);\n"
4222
4223 #. type: Plain text
4224 #: build/C/man3/pthread_cleanup_push.3:270
4225 #, no-wrap
4226 msgid ""
4227 "    while (!done) {\n"
4228 "        pthread_testcancel();           /* A cancellation point */\n"
4229 "        if (curr E<lt> time(NULL)) {\n"
4230 "            curr = time(NULL);\n"
4231 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4232 "            cnt++;\n"
4233 "        }\n"
4234 "    }\n"
4235 msgstr ""
4236 "    while (!done) {\n"
4237 "        pthread_testcancel();           /* A cancellation point */\n"
4238 "        if (curr E<lt> time(NULL)) {\n"
4239 "            curr = time(NULL);\n"
4240 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4241 "            cnt++;\n"
4242 "        }\n"
4243 "    }\n"
4244
4245 #. type: Plain text
4246 #: build/C/man3/pthread_cleanup_push.3:274
4247 #, no-wrap
4248 msgid ""
4249 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4250 "    return NULL;\n"
4251 "}\n"
4252 msgstr ""
4253 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4254 "    return NULL;\n"
4255 "}\n"
4256
4257 #. type: Plain text
4258 #: build/C/man3/pthread_cleanup_push.3:281
4259 #, no-wrap
4260 msgid ""
4261 "int\n"
4262 "main(int argc, char *argv[])\n"
4263 "{\n"
4264 "    pthread_t thr;\n"
4265 "    int s;\n"
4266 "    void *res;\n"
4267 msgstr ""
4268 "int\n"
4269 "main(int argc, char *argv[])\n"
4270 "{\n"
4271 "    pthread_t thr;\n"
4272 "    int s;\n"
4273 "    void *res;\n"
4274
4275 #. type: Plain text
4276 #: build/C/man3/pthread_cleanup_push.3:285
4277 #, no-wrap
4278 msgid ""
4279 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4280 "    if (s != 0)\n"
4281 "        handle_error_en(s, \"pthread_create\");\n"
4282 msgstr ""
4283 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4284 "    if (s != 0)\n"
4285 "        handle_error_en(s, \"pthread_create\");\n"
4286
4287 #. type: Plain text
4288 #: build/C/man3/pthread_cleanup_push.3:287
4289 #, no-wrap
4290 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4291 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4292
4293 #. type: Plain text
4294 #: build/C/man3/pthread_cleanup_push.3:292
4295 #, no-wrap
4296 msgid ""
4297 "    if (argc E<gt> 1) {\n"
4298 "        if (argc E<gt> 2)\n"
4299 "            cleanup_pop_arg = atoi(argv[2]);\n"
4300 "        done = 1;\n"
4301 msgstr ""
4302 "    if (argc E<gt> 1) {\n"
4303 "        if (argc E<gt> 2)\n"
4304 "            cleanup_pop_arg = atoi(argv[2]);\n"
4305 "        done = 1;\n"
4306
4307 #. type: Plain text
4308 #: build/C/man3/pthread_cleanup_push.3:299
4309 #, no-wrap
4310 msgid ""
4311 "    } else {\n"
4312 "        printf(\"Canceling thread\\en\");\n"
4313 "        s = pthread_cancel(thr);\n"
4314 "        if (s != 0)\n"
4315 "            handle_error_en(s, \"pthread_cancel\");\n"
4316 "    }\n"
4317 msgstr ""
4318 "    } else {\n"
4319 "        printf(\"Canceling thread\\en\");\n"
4320 "        s = pthread_cancel(thr);\n"
4321 "        if (s != 0)\n"
4322 "            handle_error_en(s, \"pthread_cancel\");\n"
4323 "    }\n"
4324
4325 #. type: Plain text
4326 #: build/C/man3/pthread_cleanup_push.3:310
4327 #, no-wrap
4328 msgid ""
4329 "    if (res == PTHREAD_CANCELED)\n"
4330 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4331 "    else\n"
4332 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4333 "    exit(EXIT_SUCCESS);\n"
4334 "}\n"
4335 msgstr ""
4336 "    if (res == PTHREAD_CANCELED)\n"
4337 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4338 "    else\n"
4339 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4340 "    exit(EXIT_SUCCESS);\n"
4341 "}\n"
4342
4343 #. type: Plain text
4344 #: build/C/man3/pthread_cleanup_push.3:317
4345 msgid ""
4346 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4347 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4348 msgstr ""
4349 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4350 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4351
4352 #. type: TH
4353 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4354 #, no-wrap
4355 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4356 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4357
4358 #. type: TH
4359 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4360 #, no-wrap
4361 msgid "2008-12-04"
4362 msgstr "2008-12-04"
4363
4364 #. type: Plain text
4365 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4366 msgid ""
4367 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4368 "thread cancellation clean-up handlers while saving cancelability type"
4369 msgstr ""
4370 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4371 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4372 "の push/pop を行う"
4373
4374 #. type: Plain text
4375 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4376 #, no-wrap
4377 msgid ""
4378 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4379 "B<                                   void *>I<arg>B<);>\n"
4380 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4381 msgstr ""
4382 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4383 "B<                                   void *>I<arg>B<);>\n"
4384 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4385
4386 #. type: Plain text
4387 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4388 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4389 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4390 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4391 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4392 #: build/C/man3/pthread_yield.3:37
4393 msgid "Compile and link with I<-pthread>."
4394 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4395
4396 #. type: Plain text
4397 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4398 msgid ""
4399 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4400 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4401 msgstr ""
4402 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4403 "だが、このページで説明する点が異なる。"
4404
4405 #. type: Plain text
4406 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4407 msgid ""
4408 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4409 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4410 "addition, it also saves the thread's current cancelability type, and sets "
4411 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4412 "this ensures that cancellation clean-up will occur even if the thread's "
4413 "cancelability type was \"asynchronous\" before the call."
4414 msgstr ""
4415 "B<pthread_cleanup_push>(3) と同様に、\n"
4416 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4417 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4418 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4419 "保存し、cancelability type は \"deferred\" に設定する\n"
4420 "(B<pthread_setcanceltype>(3) 参照)。\n"
4421 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4422 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4423 "が保証される。"
4424
4425 #. type: Plain text
4426 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4427 msgid ""
4428 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4429 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4430 "up handlers.  In addition, it restores the thread's cancelability type to "
4431 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4432 msgstr ""
4433 "B<pthread_cleanup_pop>(3) と同様に、\n"
4434 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4435 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4436 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4437 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4438
4439 #. type: Plain text
4440 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4441 msgid ""
4442 "The caller must ensure that calls to these functions are paired within the "
4443 "same function, and at the same lexical nesting level.  Other restrictions "
4444 "apply, as described in B<pthread_cleanup_push>(3)."
4445 msgstr ""
4446 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4447 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4448 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4449 "適用される。"
4450
4451 #. type: Plain text
4452 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4453 msgid "This sequence of calls:"
4454 msgstr "以下の一連の呼び出し"
4455
4456 #. type: Plain text
4457 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4458 #, no-wrap
4459 msgid ""
4460 "pthread_cleanup_push_defer_np(routine, arg);\n"
4461 "pthread_cleanup_pop_restore_np(execute);\n"
4462 msgstr ""
4463 "pthread_cleanup_push_defer_np(routine, arg);\n"
4464 "pthread_cleanup_pop_restore_np(execute);\n"
4465
4466 #. type: Plain text
4467 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4468 msgid "is equivalent to (but shorter and more efficient than):"
4469 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4470
4471 #. type: Plain text
4472 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4473 #, no-wrap
4474 msgid "int oldtype;\n"
4475 msgstr "int oldtype;\n"
4476
4477 #. type: Plain text
4478 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4479 #, no-wrap
4480 msgid ""
4481 "pthread_cleanup_push(routine, arg);\n"
4482 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4483 "\\&...\n"
4484 "pthread_setcanceltype(oldtype, NULL);\n"
4485 "pthread_cleanup_pop(execute);\n"
4486 msgstr ""
4487 "pthread_cleanup_push(routine, arg);\n"
4488 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4489 "\\&...\n"
4490 "pthread_setcanceltype(oldtype, NULL);\n"
4491 "pthread_cleanup_pop(execute);\n"
4492
4493 #. type: Plain text
4494 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4495 msgid ""
4496 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4497 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4498 msgstr ""
4499 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4500 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4501
4502 #. type: TH
4503 #: build/C/man3/pthread_create.3:26
4504 #, no-wrap
4505 msgid "PTHREAD_CREATE"
4506 msgstr "PTHREAD_CREATE"
4507
4508 #. type: TH
4509 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_sigmask.3:26
4510 #, no-wrap
4511 msgid "2012-08-03"
4512 msgstr "2012-08-03"
4513
4514 #. type: Plain text
4515 #: build/C/man3/pthread_create.3:29
4516 msgid "pthread_create - create a new thread"
4517 msgstr "pthread_create - 新しいスレッドを作成する"
4518
4519 #. type: Plain text
4520 #: build/C/man3/pthread_create.3:35
4521 #, no-wrap
4522 msgid ""
4523 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4524 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4525 msgstr ""
4526 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4527 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4528
4529 #. type: Plain text
4530 #: build/C/man3/pthread_create.3:47
4531 msgid ""
4532 "The B<pthread_create>()  function starts a new thread in the calling "
4533 "process.  The new thread starts execution by invoking I<start_routine>(); "
4534 "I<arg> is passed as the sole argument of I<start_routine>()."
4535 msgstr ""
4536 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4537 "る。\n"
4538 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4539 "I<start_routine>() は引き数を一つだけ取り、\n"
4540 "I<arg> が I<start_routine>() の引き数として渡される。"
4541
4542 #. type: Plain text
4543 #: build/C/man3/pthread_create.3:49
4544 msgid "The new thread terminates in one of the following ways:"
4545 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4546
4547 #. type: IP
4548 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4549 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4550 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4551 #: build/C/man3/pthread_getattr_np.3:58
4552 #, no-wrap
4553 msgid "*"
4554 msgstr "*"
4555
4556 #. type: Plain text
4557 #: build/C/man3/pthread_create.3:55
4558 msgid ""
4559 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4560 "available to another thread in the same process that calls B<pthread_join>"
4561 "(3)."
4562 msgstr ""
4563 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4564 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4565 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4566 "別のスレッドで参照できる。"
4567
4568 #. type: Plain text
4569 #: build/C/man3/pthread_create.3:63
4570 msgid ""
4571 "It returns from I<start_routine>().  This is equivalent to calling "
4572 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4573 msgstr ""
4574 "スレッドが I<start_routine>() から返る。これは、\n"
4575 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4576
4577 #. type: Plain text
4578 #: build/C/man3/pthread_create.3:66
4579 msgid "It is canceled (see B<pthread_cancel>(3))."
4580 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4581
4582 #. type: Plain text
4583 #: build/C/man3/pthread_create.3:72
4584 msgid ""
4585 "Any of the threads in the process calls B<exit>(3), or the main thread "
4586 "performs a return from I<main>().  This causes the termination of all "
4587 "threads in the process."
4588 msgstr ""
4589 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4590 "メインスレッドで I<main>() 内で return が実行される。\n"
4591 "この場合は、プロセス内の全てのスレッドが終了される。"
4592
4593 #. type: Plain text
4594 #: build/C/man3/pthread_create.3:86
4595 msgid ""
4596 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4597 "are used at thread creation time to determine attributes for the new thread; "
4598 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4599 "functions.  If I<attr> is NULL, then the thread is created with default "
4600 "attributes."
4601 msgstr ""
4602 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4603 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4604 "新しいスレッドの属性が決定される。\n"
4605 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4606 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4607
4608 #. type: Plain text
4609 #: build/C/man3/pthread_create.3:93
4610 msgid ""
4611 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4612 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4613 "used to refer to the thread in subsequent calls to other pthreads functions."
4614 msgstr ""
4615 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4616 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4617 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4618
4619 #. type: Plain text
4620 #: build/C/man3/pthread_create.3:101
4621 msgid ""
4622 "The new thread inherits a copy of the creating thread's signal mask "
4623 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4624 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4625 "thread's alternate signal stack (B<sigaltstack>(2))."
4626 msgstr ""
4627 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4628 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4629 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4630 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4631 "(B<sigaltstack>(2)) を継承しない。"
4632
4633 #. type: Plain text
4634 #: build/C/man3/pthread_create.3:104
4635 msgid ""
4636 "The new thread inherits the calling thread's floating-point environment "
4637 "(B<fenv>(3))."
4638 msgstr ""
4639 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4640 "を継承する。"
4641
4642 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4643 #. type: Plain text
4644 #: build/C/man3/pthread_create.3:109
4645 msgid ""
4646 "The initial value of the new thread's CPU-time clock is 0 (see "
4647 "B<pthread_getcpuclockid>(3))."
4648 msgstr ""
4649 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4650 "(B<pthread_getcpuclockid>(3) 参照)。"
4651
4652 #. type: SS
4653 #: build/C/man3/pthread_create.3:109
4654 #, no-wrap
4655 msgid "Linux-specific details"
4656 msgstr "Linux 固有の詳細"
4657
4658 #. type: Plain text
4659 #: build/C/man3/pthread_create.3:115
4660 msgid ""
4661 "The new thread inherits copies of the calling thread's capability sets (see "
4662 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4663 msgstr ""
4664 "新しいスレッドは、呼び出したスレッドの\n"
4665 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4666 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4667 "コピーをを継承しない。"
4668
4669 #. type: Plain text
4670 #: build/C/man3/pthread_create.3:122
4671 msgid ""
4672 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4673 "number, and the contents of I<*thread> are undefined."
4674 msgstr ""
4675 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4676 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4677
4678 #. type: TP
4679 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4680 #, no-wrap
4681 msgid "B<EAGAIN>"
4682 msgstr "B<EAGAIN>"
4683
4684 #. type: Plain text
4685 #: build/C/man3/pthread_create.3:137
4686 msgid ""
4687 "Insufficient resources to create another thread, or a system-imposed limit "
4688 "on the number of threads was encountered.  The latter case may occur in two "
4689 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4690 "which limits the number of process for a real user ID, was reached; or the "
4691 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4692 "threads-max>, was reached."
4693 msgstr ""
4694 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4695 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4696 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4697 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4698 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4699 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4700
4701 #. type: Plain text
4702 #: build/C/man3/pthread_create.3:141
4703 msgid "Invalid settings in I<attr>."
4704 msgstr "I<attr> で指定された設定が不正である。"
4705
4706 #. type: TP
4707 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4708 #: build/C/man3/pthread_setschedprio.3:66
4709 #, no-wrap
4710 msgid "B<EPERM>"
4711 msgstr "B<EPERM>"
4712
4713 #. type: Plain text
4714 #: build/C/man3/pthread_create.3:146
4715 msgid ""
4716 "No permission to set the scheduling policy and parameters specified in "
4717 "I<attr>."
4718 msgstr ""
4719 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4720 "設定する許可がない。"
4721
4722 #. type: Plain text
4723 #: build/C/man3/pthread_create.3:160
4724 msgid ""
4725 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4726 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4727 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4728 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4729 msgstr ""
4730 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4731 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4732 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4733 "B<pthread_create>() の呼び出し後に、\n"
4734 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4735 "次に実行されるかは決まっていない。"
4736
4737 #. type: Plain text
4738 #: build/C/man3/pthread_create.3:180
4739 msgid ""
4740 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4741 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4742 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4743 "has been joined are the last of its resources released back to the system.  "
4744 "When a detached thread terminates, its resources are automatically released "
4745 "back to the system: it is not possible to join with the thread in order to "
4746 "obtain its exit status.  Making a thread detached is useful for some types "
4747 "of daemon threads whose exit status the application does not need to care "
4748 "about.  By default, a new thread is created in a joinable state, unless "
4749 "I<attr> was set to create the thread in a detached state (using "
4750 "B<pthread_attr_setdetachstate>(3))."
4751 msgstr ""
4752 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4753 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4754 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4755 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4756 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4757 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4758 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4759 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4760 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4761 "デーモン (daemon) スレッドでは有用である。\n"
4762 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4763 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4764 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4765 "作成される。"
4766
4767 #.  FIXME . Perhaps some of the following detail should be in
4768 #.  a future pthread_attr_setstacksize(3) page.
4769 #. type: Plain text
4770 #: build/C/man3/pthread_create.3:196
4771 msgid ""
4772 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4773 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4774 "resource limit I<at the time the program started> has any value other than "
4775 "\"unlimited\", then it determines the default stack size of new threads.  "
4776 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4777 "explicitly set in the I<attr> argument used to create a thread, in order to "
4778 "obtain a stack size other than the default."
4779 msgstr ""
4780 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4781 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4782 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4783 "フォルトのスタックサイズとなる。\n"
4784 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4785 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4786 "デフォルト値以外のスタックサイズを得ることができる。"
4787
4788 #. type: Plain text
4789 #: build/C/man3/pthread_create.3:202
4790 msgid ""
4791 "In the obsolete LinuxThreads implementation, each of the threads in a "
4792 "process has a different process ID.  This is in violation of the POSIX "
4793 "threads specification, and is the source of many other nonconformances to "
4794 "the standard; see B<pthreads>(7)."
4795 msgstr ""
4796 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4797 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4798 "他の多くの標準非準拠の点の原因になっている。\n"
4799 "B<pthreads>(7) を参照のこと。"
4800
4801 #. type: Plain text
4802 #: build/C/man3/pthread_create.3:206
4803 msgid ""
4804 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4805 "number of other functions in the pthreads API."
4806 msgstr ""
4807 "以下のプログラムは、 B<pthread_create>() や\n"
4808 "pthreads API の他のいろいろな関数の使用例を示している。"
4809
4810 #. type: Plain text
4811 #: build/C/man3/pthread_create.3:211
4812 msgid ""
4813 "In the following run, on a system providing the NPTL threading "
4814 "implementation, the stack size defaults to the value given by the \"stack "
4815 "size\" resource limit:"
4816 msgstr ""
4817 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4818 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4819 "になる。"
4820
4821 #. type: Plain text
4822 #: build/C/man3/pthread_create.3:223
4823 #, no-wrap
4824 msgid ""
4825 "$B< ulimit -s>\n"
4826 "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4827 "$B< ./a.out hola salut servus>\n"
4828 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4829 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4830 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4831 "Joined with thread 1; returned value was HOLA\n"
4832 "Joined with thread 2; returned value was SALUT\n"
4833 "Joined with thread 3; returned value was SERVUS\n"
4834 msgstr ""
4835 "$B< ulimit -s>\n"
4836 "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4837 "$B< ./a.out hola salut servus>\n"
4838 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4839 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4840 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4841 "Joined with thread 1; returned value was HOLA\n"
4842 "Joined with thread 2; returned value was SALUT\n"
4843 "Joined with thread 3; returned value was SERVUS\n"
4844
4845 #. type: Plain text
4846 #: build/C/man3/pthread_create.3:229
4847 msgid ""
4848 "In the next run, the program explicitly sets a stack size of 1MB (using "
4849 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4850 msgstr ""
4851 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4852 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4853 "明示的に設定している。"
4854
4855 #. type: Plain text
4856 #: build/C/man3/pthread_create.3:239
4857 #, no-wrap
4858 msgid ""
4859 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4860 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4861 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4862 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4863 "Joined with thread 1; returned value was HOLA\n"
4864 "Joined with thread 2; returned value was SALUT\n"
4865 "Joined with thread 3; returned value was SERVUS\n"
4866 msgstr ""
4867 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4868 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4869 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4870 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4871 "Joined with thread 1; returned value was HOLA\n"
4872 "Joined with thread 2; returned value was SALUT\n"
4873 "Joined with thread 3; returned value was SERVUS\n"
4874
4875 #. type: Plain text
4876 #: build/C/man3/pthread_create.3:251
4877 #, no-wrap
4878 msgid ""
4879 "#include E<lt>pthread.hE<gt>\n"
4880 "#include E<lt>string.hE<gt>\n"
4881 "#include E<lt>stdio.hE<gt>\n"
4882 "#include E<lt>stdlib.hE<gt>\n"
4883 "#include E<lt>unistd.hE<gt>\n"
4884 "#include E<lt>errno.hE<gt>\n"
4885 "#include E<lt>ctype.hE<gt>\n"
4886 msgstr ""
4887 "#include E<lt>pthread.hE<gt>\n"
4888 "#include E<lt>string.hE<gt>\n"
4889 "#include E<lt>stdio.hE<gt>\n"
4890 "#include E<lt>stdlib.hE<gt>\n"
4891 "#include E<lt>unistd.hE<gt>\n"
4892 "#include E<lt>errno.hE<gt>\n"
4893 "#include E<lt>ctype.hE<gt>\n"
4894
4895 #. type: Plain text
4896 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:110
4897 #, no-wrap
4898 msgid ""
4899 "#define handle_error(msg) \\e\n"
4900 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4901 msgstr ""
4902 "#define handle_error(msg) \\e\n"
4903 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4904
4905 #. type: Plain text
4906 #: build/C/man3/pthread_create.3:263
4907 #, no-wrap
4908 msgid ""
4909 "struct thread_info {    /* Used as argument to thread_start() */\n"
4910 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4911 "    int       thread_num;       /* Application-defined thread # */\n"
4912 "    char     *argv_string;      /* From command-line argument */\n"
4913 "};\n"
4914 msgstr ""
4915 "struct thread_info {    /* Used as argument to thread_start() */\n"
4916 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4917 "    int       thread_num;       /* Application-defined thread # */\n"
4918 "    char     *argv_string;      /* From command-line argument */\n"
4919 "};\n"
4920
4921 #. type: Plain text
4922 #: build/C/man3/pthread_create.3:266
4923 #, no-wrap
4924 msgid ""
4925 "/* Thread start function: display address near top of our stack,\n"
4926 "   and return upper-cased copy of argv_string */\n"
4927 msgstr ""
4928 "/* Thread start function: display address near top of our stack,\n"
4929 "   and return upper-cased copy of argv_string */\n"
4930
4931 #. type: Plain text
4932 #: build/C/man3/pthread_create.3:272
4933 #, no-wrap
4934 msgid ""
4935 "static void *\n"
4936 "thread_start(void *arg)\n"
4937 "{\n"
4938 "    struct thread_info *tinfo = arg;\n"
4939 "    char *uargv, *p;\n"
4940 msgstr ""
4941 "static void *\n"
4942 "thread_start(void *arg)\n"
4943 "{\n"
4944 "    struct thread_info *tinfo = arg;\n"
4945 "    char *uargv, *p;\n"
4946
4947 #. type: Plain text
4948 #: build/C/man3/pthread_create.3:275
4949 #, no-wrap
4950 msgid ""
4951 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
4952 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
4953 msgstr ""
4954 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
4955 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
4956
4957 #. type: Plain text
4958 #: build/C/man3/pthread_create.3:279
4959 #, no-wrap
4960 msgid ""
4961 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
4962 "    if (uargv == NULL)\n"
4963 "        handle_error(\"strdup\");\n"
4964 msgstr ""
4965 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
4966 "    if (uargv == NULL)\n"
4967 "        handle_error(\"strdup\");\n"
4968
4969 #. type: Plain text
4970 #: build/C/man3/pthread_create.3:282
4971 #, no-wrap
4972 msgid ""
4973 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
4974 "        *p = toupper(*p);\n"
4975 msgstr ""
4976 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
4977 "        *p = toupper(*p);\n"
4978
4979 #. type: Plain text
4980 #: build/C/man3/pthread_create.3:285
4981 #, no-wrap
4982 msgid ""
4983 "    return uargv;\n"
4984 "}\n"
4985 msgstr ""
4986 "    return uargv;\n"
4987 "}\n"
4988
4989 #. type: Plain text
4990 #: build/C/man3/pthread_create.3:294
4991 #, no-wrap
4992 msgid ""
4993 "int\n"
4994 "main(int argc, char *argv[])\n"
4995 "{\n"
4996 "    int s, tnum, opt, num_threads;\n"
4997 "    struct thread_info *tinfo;\n"
4998 "    pthread_attr_t attr;\n"
4999 "    int stack_size;\n"
5000 "    void *res;\n"
5001 msgstr ""
5002 "int\n"
5003 "main(int argc, char *argv[])\n"
5004 "{\n"
5005 "    int s, tnum, opt, num_threads;\n"
5006 "    struct thread_info *tinfo;\n"
5007 "    pthread_attr_t attr;\n"
5008 "    int stack_size;\n"
5009 "    void *res;\n"
5010
5011 #. type: Plain text
5012 #: build/C/man3/pthread_create.3:296
5013 #, no-wrap
5014 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5015 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5016
5017 #. type: Plain text
5018 #: build/C/man3/pthread_create.3:303
5019 #, no-wrap
5020 msgid ""
5021 "    stack_size = -1;\n"
5022 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5023 "        switch (opt) {\n"
5024 "        case \\(aqs\\(aq:\n"
5025 "            stack_size = strtoul(optarg, NULL, 0);\n"
5026 "            break;\n"
5027 msgstr ""
5028 "    stack_size = -1;\n"
5029 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5030 "        switch (opt) {\n"
5031 "        case \\(aqs\\(aq:\n"
5032 "            stack_size = strtoul(optarg, NULL, 0);\n"
5033 "            break;\n"
5034
5035 #. type: Plain text
5036 #: build/C/man3/pthread_create.3:310
5037 #, no-wrap
5038 msgid ""
5039 "        default:\n"
5040 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5041 "                    argv[0]);\n"
5042 "            exit(EXIT_FAILURE);\n"
5043 "        }\n"
5044 "    }\n"
5045 msgstr ""
5046 "        default:\n"
5047 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5048 "                    argv[0]);\n"
5049 "            exit(EXIT_FAILURE);\n"
5050 "        }\n"
5051 "    }\n"
5052
5053 #. type: Plain text
5054 #: build/C/man3/pthread_create.3:312
5055 #, no-wrap
5056 msgid "    num_threads = argc - optind;\n"
5057 msgstr "    num_threads = argc - optind;\n"
5058
5059 #. type: Plain text
5060 #: build/C/man3/pthread_create.3:314
5061 #, no-wrap
5062 msgid "    /* Initialize thread creation attributes */\n"
5063 msgstr "    /* Initialize thread creation attributes */\n"
5064
5065 #. type: Plain text
5066 #: build/C/man3/pthread_create.3:318
5067 #, no-wrap
5068 msgid ""
5069 "    s = pthread_attr_init(&attr);\n"
5070 "    if (s != 0)\n"
5071 "        handle_error_en(s, \"pthread_attr_init\");\n"
5072 msgstr ""
5073 "    s = pthread_attr_init(&attr);\n"
5074 "    if (s != 0)\n"
5075 "        handle_error_en(s, \"pthread_attr_init\");\n"
5076
5077 #. type: Plain text
5078 #: build/C/man3/pthread_create.3:324
5079 #, no-wrap
5080 msgid ""
5081 "    if (stack_size E<gt> 0) {\n"
5082 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5083 "        if (s != 0)\n"
5084 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5085 "    }\n"
5086 msgstr ""
5087 "    if (stack_size E<gt> 0) {\n"
5088 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5089 "        if (s != 0)\n"
5090 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5091 "    }\n"
5092
5093 #. type: Plain text
5094 #: build/C/man3/pthread_create.3:326
5095 #, no-wrap
5096 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5097 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5098
5099 #. type: Plain text
5100 #: build/C/man3/pthread_create.3:330
5101 #, no-wrap
5102 msgid ""
5103 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5104 "    if (tinfo == NULL)\n"
5105 "        handle_error(\"calloc\");\n"
5106 msgstr ""
5107 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5108 "    if (tinfo == NULL)\n"
5109 "        handle_error(\"calloc\");\n"
5110
5111 #. type: Plain text
5112 #: build/C/man3/pthread_create.3:332
5113 #, no-wrap
5114 msgid "    /* Create one thread for each command-line argument */\n"
5115 msgstr "    /* Create one thread for each command-line argument */\n"
5116
5117 #. type: Plain text
5118 #: build/C/man3/pthread_create.3:336
5119 #, no-wrap
5120 msgid ""
5121 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5122 "        tinfo[tnum].thread_num = tnum + 1;\n"
5123 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5124 msgstr ""
5125 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5126 "        tinfo[tnum].thread_num = tnum + 1;\n"
5127 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5128
5129 #. type: Plain text
5130 #: build/C/man3/pthread_create.3:339
5131 #, no-wrap
5132 msgid ""
5133 "        /* The pthread_create() call stores the thread ID into\n"
5134 "           corresponding element of tinfo[] */\n"
5135 msgstr ""
5136 "        /* The pthread_create() call stores the thread ID into\n"
5137 "           corresponding element of tinfo[] */\n"
5138
5139 #. type: Plain text
5140 #: build/C/man3/pthread_create.3:345
5141 #, no-wrap
5142 msgid ""
5143 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5144 "                           &thread_start, &tinfo[tnum]);\n"
5145 "        if (s != 0)\n"
5146 "            handle_error_en(s, \"pthread_create\");\n"
5147 "    }\n"
5148 msgstr ""
5149 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5150 "                           &thread_start, &tinfo[tnum]);\n"
5151 "        if (s != 0)\n"
5152 "            handle_error_en(s, \"pthread_create\");\n"
5153 "    }\n"
5154
5155 #. type: Plain text
5156 #: build/C/man3/pthread_create.3:348
5157 #, no-wrap
5158 msgid ""
5159 "    /* Destroy the thread attributes object, since it is no\n"
5160 "       longer needed */\n"
5161 msgstr ""
5162 "    /* Destroy the thread attributes object, since it is no\n"
5163 "       longer needed */\n"
5164
5165 #. type: Plain text
5166 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5167 #, no-wrap
5168 msgid ""
5169 "    s = pthread_attr_destroy(&attr);\n"
5170 "    if (s != 0)\n"
5171 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5172 msgstr ""
5173 "    s = pthread_attr_destroy(&attr);\n"
5174 "    if (s != 0)\n"
5175 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5176
5177 #. type: Plain text
5178 #: build/C/man3/pthread_create.3:354
5179 #, no-wrap
5180 msgid "    /* Now join with each thread, and display its returned value */\n"
5181 msgstr "    /* Now join with each thread, and display its returned value */\n"
5182
5183 #. type: Plain text
5184 #: build/C/man3/pthread_create.3:359
5185 #, no-wrap
5186 msgid ""
5187 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5188 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5189 "        if (s != 0)\n"
5190 "            handle_error_en(s, \"pthread_join\");\n"
5191 msgstr ""
5192 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5193 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5194 "        if (s != 0)\n"
5195 "            handle_error_en(s, \"pthread_join\");\n"
5196
5197 #. type: Plain text
5198 #: build/C/man3/pthread_create.3:364
5199 #, no-wrap
5200 msgid ""
5201 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5202 "                tinfo[tnum].thread_num, (char *) res);\n"
5203 "        free(res);      /* Free memory allocated by thread */\n"
5204 "    }\n"
5205 msgstr ""
5206 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5207 "                tinfo[tnum].thread_num, (char *) res);\n"
5208 "        free(res);      /* Free memory allocated by thread */\n"
5209 "    }\n"
5210
5211 #. type: Plain text
5212 #: build/C/man3/pthread_create.3:368
5213 #, no-wrap
5214 msgid ""
5215 "    free(tinfo);\n"
5216 "    exit(EXIT_SUCCESS);\n"
5217 "}\n"
5218 msgstr ""
5219 "    free(tinfo);\n"
5220 "    exit(EXIT_SUCCESS);\n"
5221 "}\n"
5222
5223 #. type: Plain text
5224 #: build/C/man3/pthread_create.3:382
5225 msgid ""
5226 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5227 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5228 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5229 "(7)"
5230 msgstr ""
5231 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5232 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5233 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5234 "(7)"
5235
5236 #. type: TH
5237 #: build/C/man3/pthread_detach.3:26
5238 #, no-wrap
5239 msgid "PTHREAD_DETACH"
5240 msgstr "PTHREAD_DETACH"
5241
5242 #. type: TH
5243 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5244 #, no-wrap
5245 msgid "2008-11-27"
5246 msgstr "2008-11-27"
5247
5248 #. type: Plain text
5249 #: build/C/man3/pthread_detach.3:29
5250 msgid "pthread_detach - detach a thread"
5251 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5252
5253 #. type: Plain text
5254 #: build/C/man3/pthread_detach.3:34
5255 #, no-wrap
5256 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5257 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5258
5259 #. type: Plain text
5260 #: build/C/man3/pthread_detach.3:46
5261 msgid ""
5262 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5263 "as detached.  When a detached thread terminates, its resources are "
5264 "automatically released back to the system without the need for another "
5265 "thread to join with the terminated thread."
5266 msgstr ""
5267 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5268 "detached (切り離された状態) という印を付ける。\n"
5269 "detached 状態のスレッドが終了すると、\n"
5270 "別のスレッドが終了されたスレッドを join しなくても、\n"
5271 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5272
5273 #. type: Plain text
5274 #: build/C/man3/pthread_detach.3:49
5275 msgid ""
5276 "Attempting to detach an already detached thread results in unspecified "
5277 "behavior."
5278 msgstr ""
5279 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5280 "どのような結果となるかは規定されていない。"
5281
5282 #. type: Plain text
5283 #: build/C/man3/pthread_detach.3:54
5284 msgid ""
5285 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5286 "number."
5287 msgstr ""
5288 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5289 "エラーの場合、エラー番号を返す。"
5290
5291 #. type: Plain text
5292 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5293 msgid "I<thread> is not a joinable thread."
5294 msgstr "I<thread> が join 可能なスレッドではない。"
5295
5296 #. type: Plain text
5297 #: build/C/man3/pthread_detach.3:70
5298 msgid ""
5299 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5300 "or be made joinable again."
5301 msgstr ""
5302 "いったんスレッドを detached 状態にすると、\n"
5303 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5304 "もう一度 join 可能にしたりすることはできない。"
5305
5306 #. type: Plain text
5307 #: build/C/man3/pthread_detach.3:77
5308 msgid ""
5309 "A new thread can be created in a detached state using "
5310 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5311 "I<attr> argument of B<pthread_create>(3)."
5312 msgstr ""
5313 "B<pthread_attr_setdetachstate>(3) を使って\n"
5314 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5315 "新しいスレッドを detached 状態で作成することができる。"
5316
5317 #. type: Plain text
5318 #: build/C/man3/pthread_detach.3:84
5319 msgid ""
5320 "The detached attribute merely determines the behavior of the system when the "
5321 "thread terminates; it does not prevent the thread from being terminated if "
5322 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5323 "thread returns)."
5324 msgstr ""
5325 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5326 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5327 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5328 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5329
5330 #. type: Plain text
5331 #: build/C/man3/pthread_detach.3:93
5332 msgid ""
5333 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5334 "thread that an application creates, so that system resources for the thread "
5335 "can be released.  (But note that the resources of all threads are freed when "
5336 "the process terminates.)"
5337 msgstr ""
5338 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5339 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5340 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5341 "終了するときには、全てのスレッドのリソースが解放される)。"
5342
5343 #. type: Plain text
5344 #: build/C/man3/pthread_detach.3:95
5345 msgid "The following statement detaches the calling thread:"
5346 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5347
5348 #. type: Plain text
5349 #: build/C/man3/pthread_detach.3:97
5350 #, no-wrap
5351 msgid "    pthread_detach(pthread_self());\n"
5352 msgstr "    pthread_detach(pthread_self());\n"
5353
5354 #. type: Plain text
5355 #: build/C/man3/pthread_detach.3:104
5356 msgid ""
5357 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5358 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5359 msgstr ""
5360 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5361 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5362
5363 #. type: TH
5364 #: build/C/man3/pthread_equal.3:26
5365 #, no-wrap
5366 msgid "PTHREAD_EQUAL"
5367 msgstr "PTHREAD_EQUAL"
5368
5369 #. type: TH
5370 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5371 #, no-wrap
5372 msgid "2009-03-30"
5373 msgstr "2009-03-30"
5374
5375 #. type: Plain text
5376 #: build/C/man3/pthread_equal.3:29
5377 msgid "pthread_equal - compare thread IDs"
5378 msgstr "pthread_equal - スレッド ID を比較する"
5379
5380 #. type: Plain text
5381 #: build/C/man3/pthread_equal.3:34
5382 #, no-wrap
5383 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5384 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5385
5386 #. type: Plain text
5387 #: build/C/man3/pthread_equal.3:41
5388 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5389 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5390
5391 #. type: Plain text
5392 #: build/C/man3/pthread_equal.3:45
5393 msgid ""
5394 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5395 "value; otherwise, it returns 0."
5396 msgstr ""
5397 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5398 "そうでなければ 0 を返す。"
5399
5400 #.  SH VERSIONS
5401 #.  Available since glibc 2.0
5402 #. type: Plain text
5403 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5404 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5405 msgid "This function always succeeds."
5406 msgstr "この関数は常に成功する。"
5407
5408 #. type: Plain text
5409 #: build/C/man3/pthread_equal.3:56
5410 msgid ""
5411 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5412 "considered opaque: there is no portable way for applications to directly "
5413 "compare two I<pthread_t> values."
5414 msgstr ""
5415 "B<pthread_equal>() 関数が必要なのは、\n"
5416 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5417 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5418 "移植性を確保できる形で比較する方法はない。"
5419
5420 #. type: Plain text
5421 #: build/C/man3/pthread_equal.3:60
5422 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5423 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5424
5425 #. type: TH
5426 #: build/C/man3/pthread_exit.3:26
5427 #, no-wrap
5428 msgid "PTHREAD_EXIT"
5429 msgstr "PTHREAD_EXIT"
5430
5431 #. type: Plain text
5432 #: build/C/man3/pthread_exit.3:29
5433 msgid "pthread_exit - terminate calling thread"
5434 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5435
5436 #. type: Plain text
5437 #: build/C/man3/pthread_exit.3:34
5438 #, no-wrap
5439 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5440 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5441
5442 #. type: Plain text
5443 #: build/C/man3/pthread_exit.3:45
5444 msgid ""
5445 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5446 "value via I<retval> that (if the thread is joinable)  is available to "
5447 "another thread in the same process that calls B<pthread_join>(3)."
5448 msgstr ""
5449 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5450 "I<retval> 経由で値を返す。\n"
5451 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5452 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5453
5454 #. type: Plain text
5455 #: build/C/man3/pthread_exit.3:55
5456 msgid ""
5457 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5458 "not yet been popped, are popped (in the reverse of the order in which they "
5459 "were pushed)  and executed.  If the thread has any thread-specific data, "
5460 "then, after the clean-up handlers have been executed, the corresponding "
5461 "destructor functions are called, in an unspecified order."
5462 msgstr ""
5463 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5464 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5465 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5466 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5467 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5468 "は規定されていない)。"
5469
5470 #. type: Plain text
5471 #: build/C/man3/pthread_exit.3:62
5472 msgid ""
5473 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5474 "variables, semaphores, and file descriptors) are not released, and functions "
5475 "registered using B<atexit>(3)  are not called."
5476 msgstr ""
5477 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5478 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5479 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5480
5481 #. type: Plain text
5482 #: build/C/man3/pthread_exit.3:71
5483 msgid ""
5484 "After the last thread in a process terminates, the process terminates as by "
5485 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5486 "resources are released and functions registered using B<atexit>(3)  are "
5487 "called."
5488 msgstr ""
5489 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5490 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5491 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5492 "が呼び出される。"
5493
5494 #. type: Plain text
5495 #: build/C/man3/pthread_exit.3:73
5496 msgid "This function does not return to the caller."
5497 msgstr "この関数は呼び出し側には返らない。"
5498
5499 #. type: Plain text
5500 #: build/C/man3/pthread_exit.3:82
5501 msgid ""
5502 "Performing a return from the start function of any thread other than the "
5503 "main thread results in an implicit call to B<pthread_exit>(), using the "
5504 "function's return value as the thread's exit status."
5505 msgstr ""
5506 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5507 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5508 "関数の返り値がスレッドの終了ステータスとして使用される。"
5509
5510 #. type: Plain text
5511 #: build/C/man3/pthread_exit.3:88
5512 msgid ""
5513 "To allow other threads to continue execution, the main thread should "
5514 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5515 msgstr ""
5516 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5517 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5518
5519 #. type: Plain text
5520 #: build/C/man3/pthread_exit.3:93
5521 msgid ""
5522 "The value pointed to by I<retval> should not be located on the calling "
5523 "thread's stack, since the contents of that stack are undefined after the "
5524 "thread terminates."
5525 msgstr ""
5526 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5527 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5528 "である。"
5529
5530 #.  Linux 2.6.27
5531 #.  FIXME . review a later kernel to see if this gets fixed
5532 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5533 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5534 #. type: Plain text
5535 #: build/C/man3/pthread_exit.3:105
5536 msgid ""
5537 "Currently, there are limitations in the kernel implementation logic for "
5538 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5539 "This can manifest in problems such as a locked terminal if a stop signal is "
5540 "sent to a foreground process whose thread group leader has already called "
5541 "B<pthread_exit>()."
5542 msgstr ""
5543 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5544 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5545 "カーネル実装の論理には制限がある。\n"
5546 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5547 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5548 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5549 "場合がある。"
5550
5551 #. type: Plain text
5552 #: build/C/man3/pthread_exit.3:109
5553 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5554 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5555
5556 #. type: TH
5557 #: build/C/man3/pthread_getattr_np.3:26
5558 #, no-wrap
5559 msgid "PTHREAD_GETATTR_NP"
5560 msgstr "PTHREAD_GETATTR_NP"
5561
5562 #. type: Plain text
5563 #: build/C/man3/pthread_getattr_np.3:29
5564 msgid "pthread_getattr_np - get attributes of created thread"
5565 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5566
5567 #. type: Plain text
5568 #: build/C/man3/pthread_getattr_np.3:35
5569 #, no-wrap
5570 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5571 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5572
5573 #. type: Plain text
5574 #: build/C/man3/pthread_getattr_np.3:45
5575 msgid ""
5576 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5577 "object referred to by I<attr> so that it contains actual attribute values "
5578 "describing the running thread I<thread>."
5579 msgstr ""
5580 "B<pthread_getattr_np>() 関数は、\n"
5581 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5582 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5583 "格納して返す。"
5584
5585 #. type: Plain text
5586 #: build/C/man3/pthread_getattr_np.3:52
5587 msgid ""
5588 "The returned attribute values may differ from the corresponding attribute "
5589 "values passed in the I<attr> object that was used to create the thread using "
5590 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5591 msgstr ""
5592 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5593 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5594 "特に、以下の属性は異なる場合がある。"
5595
5596 #. type: Plain text
5597 #: build/C/man3/pthread_getattr_np.3:55
5598 msgid ""
5599 "the detach state, since a joinable thread may have detached itself after "
5600 "creation;"
5601 msgstr ""
5602 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5603 "切り離す (detach する) ことができるからである。"
5604
5605 #. type: Plain text
5606 #: build/C/man3/pthread_getattr_np.3:58
5607 msgid ""
5608 "the stack size, which the implementation may align to a suitable boundary."
5609 msgstr ""
5610 "スタックサイズ。\n"
5611 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5612
5613 #. type: Plain text
5614 #: build/C/man3/pthread_getattr_np.3:63
5615 msgid ""
5616 "and the guard size, which the implementation may round upward to a multiple "
5617 "of the page size, or ignore (i.e., treat as 0), if the application is "
5618 "allocating its own stack."
5619 msgstr ""
5620 "guard size.\n"
5621 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5622 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5623 "(0 として扱われる) ことがあるからである。"
5624
5625 #. type: Plain text
5626 #: build/C/man3/pthread_getattr_np.3:68
5627 msgid ""
5628 "Furthermore, if the stack address attribute was not set in the thread "
5629 "attributes object used to create the thread, then the returned thread "
5630 "attributes object will report the actual stack address that the "
5631 "implementation selected for the thread."
5632 msgstr ""
5633 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5634 "スタックアドレスが設定されていなかった場合、\n"
5635 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5636 "割り当てた実際のスタックアドレスが報告される。"
5637
5638 #. type: Plain text
5639 #: build/C/man3/pthread_getattr_np.3:73
5640 msgid ""
5641 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5642 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5643 msgstr ""
5644 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5645 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5646 "そのオブジェクトを破棄すべきである。"
5647
5648 #. type: Plain text
5649 #: build/C/man3/pthread_getattr_np.3:76
5650 #: build/C/man3/pthread_getcpuclockid.3:49
5651 msgid ""
5652 "On success, this function returns 0; on error, it returns a nonzero error "
5653 "number."
5654 msgstr ""
5655 "成功すると、この関数は 0 を返す。\n"
5656 "エラーの場合、 0 以外のエラー番号を返す。"
5657
5658 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5659 #. type: Plain text
5660 #: build/C/man3/pthread_getattr_np.3:81
5661 msgid "Insufficient memory."
5662 msgstr "メモリが十分になかった。"
5663
5664 #. type: Plain text
5665 #: build/C/man3/pthread_getattr_np.3:96
5666 msgid ""
5667 "In addition, if I<thread> refers to the main thread, then "
5668 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5669 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5670 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5671 msgstr ""
5672 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5673 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5674 "エラーで失敗する可能性がある。\n"
5675 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5676 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5677 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5678
5679 #. type: Plain text
5680 #: build/C/man3/pthread_getattr_np.3:98
5681 msgid "This function is available in glibc since version 2.2.3."
5682 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5683
5684 #. type: Plain text
5685 #: build/C/man3/pthread_getattr_np.3:101
5686 #: build/C/man3/pthread_kill_other_threads_np.3:50
5687 msgid ""
5688 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5689 "\" (nonportable) in the name."
5690 msgstr ""
5691 "この関数は非標準の GNU による拡張である。\n"
5692 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5693 "付いている。"
5694
5695 #. type: Plain text
5696 #: build/C/man3/pthread_getattr_np.3:111
5697 msgid ""
5698 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5699 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5700 "and display its guard size, stack address, and stack size attributes.  "
5701 "Command-line arguments can be used to set these attributes to values other "
5702 "than the default when creating the thread.  The shell sessions below "
5703 "demonstrate the use of the program."
5704 msgstr ""
5705 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5706 "このプログラムは、スレッドを作成し、それから\n"
5707 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5708 "スタックアドレス、スタックサイズを取得し表示する。\n"
5709 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5710 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5711 "下記のシェルのセッションはこのプログラムの使用例である。"
5712
5713 #. type: Plain text
5714 #: build/C/man3/pthread_getattr_np.3:114
5715 msgid ""
5716 "In the first run, on an x86-32 system, a thread is created using default "
5717 "attributes:"
5718 msgstr ""
5719 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5720 "(x86-32 システム上で実行)。"
5721
5722 #. type: Plain text
5723 #: build/C/man3/pthread_getattr_np.3:124
5724 #, no-wrap
5725 msgid ""
5726 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5727 "unlimited\n"
5728 "$B< ./a.out>\n"
5729 "Attributes of created thread:\n"
5730 "        Guard size          = 4096 bytes\n"
5731 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5732 "        Stack size          = 0x201000 (2101248) bytes\n"
5733 msgstr ""
5734 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5735 "unlimited\n"
5736 "$B< ./a.out>\n"
5737 "Attributes of created thread:\n"
5738 "        Guard size          = 4096 bytes\n"
5739 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5740 "        Stack size          = 0x201000 (2101248) bytes\n"
5741
5742 #. type: Plain text
5743 #: build/C/man3/pthread_getattr_np.3:130
5744 msgid ""
5745 "In the following run, we see that if a guard size is specified, it is "
5746 "rounded up to the next multiple of the system page size (4096 bytes on "
5747 "x86-32):"
5748 msgstr ""
5749 "次の実行例では、guard size が指定された場合、\n"
5750 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5751 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5752
5753 #. type: Plain text
5754 #: build/C/man3/pthread_getattr_np.3:138
5755 #, no-wrap
5756 msgid ""
5757 "$B< ./a.out -g 4097>\n"
5758 "Thread attributes object after initializations:\n"
5759 "        Guard size          = 4097 bytes\n"
5760 "        Stack address       = (nil)\n"
5761 "        Stack size          = 0x0 (0) bytes\n"
5762 msgstr ""
5763 "$B< ./a.out -g 4097>\n"
5764 "Thread attributes object after initializations:\n"
5765 "        Guard size          = 4097 bytes\n"
5766 "        Stack address       = (nil)\n"
5767 "        Stack size          = 0x0 (0) bytes\n"
5768
5769 #. type: Plain text
5770 #: build/C/man3/pthread_getattr_np.3:143
5771 #, no-wrap
5772 msgid ""
5773 "Attributes of created thread:\n"
5774 "        Guard size          = 8192 bytes\n"
5775 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5776 "        Stack size          = 0x201000 (2101248) bytes\n"
5777 msgstr ""
5778 "Attributes of created thread:\n"
5779 "        Guard size          = 8192 bytes\n"
5780 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5781 "        Stack size          = 0x201000 (2101248) bytes\n"
5782
5783 #. .in +4n
5784 #. .nf
5785 #. $ ./a.out \-s 0x8000
5786 #. Thread attributes object after initializations:
5787 #.         Guard size          = 4096 bytes
5788 #.         Stack address       = 0xffff8000 (EOS = (nil))
5789 #.         Stack size          = 0x8000 (32768) bytes
5790 #. Attributes of created thread:
5791 #.         Guard size          = 4096 bytes
5792 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5793 #.         Stack size          = 0x8000 (32768) bytes
5794 #. .fi
5795 #. .in
5796 #. type: Plain text
5797 #: build/C/man3/pthread_getattr_np.3:162
5798 msgid ""
5799 "In the last run, the program manually allocates a stack for the thread.  In "
5800 "this case, the guard size attribute is ignored."
5801 msgstr ""
5802 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5803 "この場合には、guard size 属性は無視される。"
5804
5805 #. type: Plain text
5806 #: build/C/man3/pthread_getattr_np.3:167
5807 #, no-wrap
5808 msgid ""
5809 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5810 "Allocated thread stack at 0x804d000\n"
5811 msgstr ""
5812 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5813 "Allocated thread stack at 0x804d000\n"
5814
5815 #. type: Plain text
5816 #: build/C/man3/pthread_getattr_np.3:172
5817 #, no-wrap
5818 msgid ""
5819 "Thread attributes object after initializations:\n"
5820 "        Guard size          = 4096 bytes\n"
5821 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5822 "        Stack size          = 0x8000 (32768) bytes\n"
5823 msgstr ""
5824 "Thread attributes object after initializations:\n"
5825 "        Guard size          = 4096 bytes\n"
5826 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5827 "        Stack size          = 0x8000 (32768) bytes\n"
5828
5829 #. type: Plain text
5830 #: build/C/man3/pthread_getattr_np.3:177
5831 #, no-wrap
5832 msgid ""
5833 "Attributes of created thread:\n"
5834 "        Guard size          = 0 bytes\n"
5835 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5836 "        Stack size          = 0x8000 (32768) bytes\n"
5837 msgstr ""
5838 "Attributes of created thread:\n"
5839 "        Guard size          = 0 bytes\n"
5840 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5841 "        Stack size          = 0x8000 (32768) bytes\n"
5842
5843 #. type: Plain text
5844 #: build/C/man3/pthread_getattr_np.3:198
5845 #, no-wrap
5846 msgid ""
5847 "static void\n"
5848 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5849 "{\n"
5850 "    int s;\n"
5851 "    size_t stack_size, guard_size;\n"
5852 "    void *stack_addr;\n"
5853 msgstr ""
5854 "static void\n"
5855 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5856 "{\n"
5857 "    int s;\n"
5858 "    size_t stack_size, guard_size;\n"
5859 "    void *stack_addr;\n"
5860
5861 #. type: Plain text
5862 #: build/C/man3/pthread_getattr_np.3:203
5863 #, no-wrap
5864 msgid ""
5865 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5866 "    if (s != 0)\n"
5867 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5868 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5869 msgstr ""
5870 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5871 "    if (s != 0)\n"
5872 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5873 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5874
5875 #. type: Plain text
5876 #: build/C/man3/pthread_getattr_np.3:214
5877 #, no-wrap
5878 msgid ""
5879 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5880 "    if (s != 0)\n"
5881 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5882 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5883 "    if (stack_size E<gt> 0)\n"
5884 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5885 "    printf(\"\\en\");\n"
5886 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5887 "            prefix, stack_size, stack_size);\n"
5888 "}\n"
5889 msgstr ""
5890 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5891 "    if (s != 0)\n"
5892 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5893 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5894 "    if (stack_size E<gt> 0)\n"
5895 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5896 "    printf(\"\\en\");\n"
5897 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5898 "            prefix, stack_size, stack_size);\n"
5899 "}\n"
5900
5901 #. type: Plain text
5902 #: build/C/man3/pthread_getattr_np.3:220
5903 #, no-wrap
5904 msgid ""
5905 "static void\n"
5906 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5907 "{\n"
5908 "    int s;\n"
5909 "    pthread_attr_t attr;\n"
5910 msgstr ""
5911 "static void\n"
5912 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5913 "{\n"
5914 "    int s;\n"
5915 "    pthread_attr_t attr;\n"
5916
5917 #. type: Plain text
5918 #: build/C/man3/pthread_getattr_np.3:224
5919 #, no-wrap
5920 msgid ""
5921 "    s = pthread_getattr_np(thread, &attr);\n"
5922 "    if (s != 0)\n"
5923 "        handle_error_en(s, \"pthread_getattr_np\");\n"
5924 msgstr ""
5925 "    s = pthread_getattr_np(thread, &attr);\n"
5926 "    if (s != 0)\n"
5927 "        handle_error_en(s, \"pthread_getattr_np\");\n"
5928
5929 #. type: Plain text
5930 #: build/C/man3/pthread_getattr_np.3:226
5931 #, no-wrap
5932 msgid "    display_stack_related_attributes(&attr, prefix);\n"
5933 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
5934
5935 #. type: Plain text
5936 #: build/C/man3/pthread_getattr_np.3:231
5937 #, no-wrap
5938 msgid ""
5939 "    s = pthread_attr_destroy(&attr);\n"
5940 "    if (s != 0)\n"
5941 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5942 "}\n"
5943 msgstr ""
5944 "    s = pthread_attr_destroy(&attr);\n"
5945 "    if (s != 0)\n"
5946 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5947 "}\n"
5948
5949 #. type: Plain text
5950 #: build/C/man3/pthread_getattr_np.3:237
5951 #, no-wrap
5952 msgid ""
5953 "static void *           /* Start function for thread we create */\n"
5954 "thread_start(void *arg)\n"
5955 "{\n"
5956 "    printf(\"Attributes of created thread:\\en\");\n"
5957 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
5958 msgstr ""
5959 "static void *           /* Start function for thread we create */\n"
5960 "thread_start(void *arg)\n"
5961 "{\n"
5962 "    printf(\"Attributes of created thread:\\en\");\n"
5963 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
5964
5965 #. type: Plain text
5966 #: build/C/man3/pthread_getattr_np.3:251
5967 #, no-wrap
5968 msgid ""
5969 "static void\n"
5970 "usage(char *pname, char *msg)\n"
5971 "{\n"
5972 "    if (msg != NULL)\n"
5973 "        fputs(msg, stderr);\n"
5974 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
5975 "            \" [-g guard-size]\\en\", pname);\n"
5976 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
5977 "    exit(EXIT_FAILURE);\n"
5978 "}\n"
5979 msgstr ""
5980 "static void\n"
5981 "usage(char *pname, char *msg)\n"
5982 "{\n"
5983 "    if (msg != NULL)\n"
5984 "        fputs(msg, stderr);\n"
5985 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
5986 "            \" [-g guard-size]\\en\", pname);\n"
5987 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
5988 "    exit(EXIT_FAILURE);\n"
5989 "}\n"
5990
5991 #. type: Plain text
5992 #: build/C/man3/pthread_getattr_np.3:264
5993 #, no-wrap
5994 msgid ""
5995 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
5996 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
5997 "                              pthread_attr_t *attrp)\n"
5998 "{\n"
5999 "    int s, opt, allocate_stack;\n"
6000 "    long stack_size, guard_size;\n"
6001 "            void *stack_addr;\n"
6002 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6003 "                                           a thread attributes object */\n"
6004 "    allocate_stack = 0;\n"
6005 "    stack_size = -1;\n"
6006 "    guard_size = -1;\n"
6007 msgstr ""
6008 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6009 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6010 "                              pthread_attr_t *attrp)\n"
6011 "{\n"
6012 "    int s, opt, allocate_stack;\n"
6013 "    long stack_size, guard_size;\n"
6014 "            void *stack_addr;\n"
6015 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6016 "                                           a thread attributes object */\n"
6017 "    allocate_stack = 0;\n"
6018 "    stack_size = -1;\n"
6019 "    guard_size = -1;\n"
6020
6021 #. type: Plain text
6022 #: build/C/man3/pthread_getattr_np.3:273
6023 #, no-wrap
6024 msgid ""
6025 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6026 "        switch (opt) {\n"
6027 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6028 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6029 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6030 "        default:    usage(argv[0], NULL);\n"
6031 "        }\n"
6032 "    }\n"
6033 msgstr ""
6034 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6035 "        switch (opt) {\n"
6036 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6037 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6038 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6039 "        default:    usage(argv[0], NULL);\n"
6040 "        }\n"
6041 "    }\n"
6042
6043 #. type: Plain text
6044 #: build/C/man3/pthread_getattr_np.3:276
6045 #, no-wrap
6046 msgid ""
6047 "    if (allocate_stack && stack_size == -1)\n"
6048 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6049 msgstr ""
6050 "    if (allocate_stack && stack_size == -1)\n"
6051 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6052
6053 #. type: Plain text
6054 #: build/C/man3/pthread_getattr_np.3:279
6055 #, no-wrap
6056 msgid ""
6057 "    if (argc E<gt> optind)\n"
6058 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6059 msgstr ""
6060 "    if (argc E<gt> optind)\n"
6061 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6062
6063 #. type: Plain text
6064 #: build/C/man3/pthread_getattr_np.3:282
6065 #, no-wrap
6066 msgid ""
6067 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6068 "        ret_attrp = attrp;\n"
6069 msgstr ""
6070 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6071 "        ret_attrp = attrp;\n"
6072
6073 #. type: Plain text
6074 #: build/C/man3/pthread_getattr_np.3:287
6075 #, no-wrap
6076 msgid ""
6077 "        s = pthread_attr_init(attrp);\n"
6078 "        if (s != 0)\n"
6079 "            handle_error_en(s, \"pthread_attr_init\");\n"
6080 "    }\n"
6081 msgstr ""
6082 "        s = pthread_attr_init(attrp);\n"
6083 "        if (s != 0)\n"
6084 "            handle_error_en(s, \"pthread_attr_init\");\n"
6085 "    }\n"
6086
6087 #. type: Plain text
6088 #: build/C/man3/pthread_getattr_np.3:299
6089 #, no-wrap
6090 msgid ""
6091 "    if (stack_size E<gt>= 0) {\n"
6092 "        if (!allocate_stack) {\n"
6093 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6094 "            if (s != 0)\n"
6095 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6096 "        } else {\n"
6097 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6098 "                               stack_size);\n"
6099 "            if (s != 0)\n"
6100 "                handle_error_en(s, \"posix_memalign\");\n"
6101 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6102 msgstr ""
6103 "    if (stack_size E<gt>= 0) {\n"
6104 "        if (!allocate_stack) {\n"
6105 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6106 "            if (s != 0)\n"
6107 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6108 "        } else {\n"
6109 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6110 "                               stack_size);\n"
6111 "            if (s != 0)\n"
6112 "                handle_error_en(s, \"posix_memalign\");\n"
6113 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6114
6115 #. type: Plain text
6116 #: build/C/man3/pthread_getattr_np.3:305
6117 #, no-wrap
6118 msgid ""
6119 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6120 "            if (s != 0)\n"
6121 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6122 "        }\n"
6123 "    }\n"
6124 msgstr ""
6125 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6126 "            if (s != 0)\n"
6127 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6128 "        }\n"
6129 "    }\n"
6130
6131 #. type: Plain text
6132 #: build/C/man3/pthread_getattr_np.3:311
6133 #, no-wrap
6134 msgid ""
6135 "    if (guard_size E<gt>= 0) {\n"
6136 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6137 "        if (s != 0)\n"
6138 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6139 "    }\n"
6140 msgstr ""
6141 "    if (guard_size E<gt>= 0) {\n"
6142 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6143 "        if (s != 0)\n"
6144 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6145 "    }\n"
6146
6147 #. type: Plain text
6148 #: build/C/man3/pthread_getattr_np.3:314
6149 #, no-wrap
6150 msgid ""
6151 "    return ret_attrp;\n"
6152 "}\n"
6153 msgstr ""
6154 "    return ret_attrp;\n"
6155 "}\n"
6156
6157 #. type: Plain text
6158 #: build/C/man3/pthread_getattr_np.3:323
6159 #, no-wrap
6160 msgid ""
6161 "int\n"
6162 "main(int argc, char *argv[])\n"
6163 "{\n"
6164 "    int s;\n"
6165 "    pthread_t thr;\n"
6166 "    pthread_attr_t attr;\n"
6167 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6168 "                                        a thread attributes object */\n"
6169 msgstr ""
6170 "int\n"
6171 "main(int argc, char *argv[])\n"
6172 "{\n"
6173 "    int s;\n"
6174 "    pthread_t thr;\n"
6175 "    pthread_attr_t attr;\n"
6176 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6177 "                                        a thread attributes object */\n"
6178
6179 #. type: Plain text
6180 #: build/C/man3/pthread_getattr_np.3:325
6181 #, no-wrap
6182 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6183 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6184
6185 #. type: Plain text
6186 #: build/C/man3/pthread_getattr_np.3:331
6187 #, no-wrap
6188 msgid ""
6189 "    if (attrp != NULL) {\n"
6190 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6191 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6192 "        printf(\"\\en\");\n"
6193 "    }\n"
6194 msgstr ""
6195 "    if (attrp != NULL) {\n"
6196 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6197 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6198 "        printf(\"\\en\");\n"
6199 "    }\n"
6200
6201 #. type: Plain text
6202 #: build/C/man3/pthread_getattr_np.3:361
6203 msgid ""
6204 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6205 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6206 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6207 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6208 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6209 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6210 msgstr ""
6211 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6212 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6213 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6214 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6215 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6216 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6217
6218 #. type: TH
6219 #: build/C/man3/pthread_getcpuclockid.3:26
6220 #, no-wrap
6221 msgid "PTHREAD_GETCPUCLOCKID"
6222 msgstr "PTHREAD_GETCPUCLOCKID"
6223
6224 #. type: TH
6225 #: build/C/man3/pthread_getcpuclockid.3:26
6226 #, no-wrap
6227 msgid "2009-02-08"
6228 msgstr "2009-02-08"
6229
6230 #. type: Plain text
6231 #: build/C/man3/pthread_getcpuclockid.3:29
6232 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6233 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6234
6235 #. type: Plain text
6236 #: build/C/man3/pthread_getcpuclockid.3:33
6237 #, no-wrap
6238 msgid ""
6239 "B<#include E<lt>pthread.hE<gt>>\n"
6240 "B<#include E<lt>time.hE<gt>>\n"
6241 msgstr ""
6242 "B<#include E<lt>pthread.hE<gt>>\n"
6243 "B<#include E<lt>time.hE<gt>>\n"
6244
6245 #. type: Plain text
6246 #: build/C/man3/pthread_getcpuclockid.3:35
6247 #, no-wrap
6248 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6249 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6250
6251 #.  The clockid is constructed as follows:
6252 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6253 #.  where CLOCK_IDFIELD_SIZE is 3.
6254 #. type: Plain text
6255 #: build/C/man3/pthread_getcpuclockid.3:46
6256 msgid ""
6257 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6258 "time clock of the thread I<thread>."
6259 msgstr ""
6260 "B<pthread_getcpuclockid>() 関数は、\n"
6261 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6262
6263 #. type: TP
6264 #: build/C/man3/pthread_getcpuclockid.3:50
6265 #, no-wrap
6266 msgid "B<ENOENT>"
6267 msgstr "B<ENOENT>"
6268
6269 #.  CLOCK_THREAD_CPUTIME_ID not defined
6270 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6271 #.  be possible if kernel thread IDs took more than 29 bits (which
6272 #.  they currently cannot).
6273 #. type: Plain text
6274 #: build/C/man3/pthread_getcpuclockid.3:58
6275 msgid "Per-thread CPU time clocks are not supported by the system."
6276 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6277
6278 #. type: Plain text
6279 #: build/C/man3/pthread_getcpuclockid.3:65
6280 msgid "This function is available in glibc since version 2.2."
6281 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6282
6283 #. type: Plain text
6284 #: build/C/man3/pthread_getcpuclockid.3:78
6285 msgid ""
6286 "When I<thread> refers to the calling thread, this function returns an "
6287 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6288 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6289 msgstr ""
6290 "I<thread> が呼び出したスレッドを参照している場合、\n"
6291 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6292 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6293 "を参照する ID が返される。"
6294
6295 #. type: Plain text
6296 #: build/C/man3/pthread_getcpuclockid.3:84
6297 msgid ""
6298 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6299 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6300 "the two threads.  The following shell session shows an example run:"
6301 msgstr ""
6302 "以下のプログラムは、スレッドを作成し、それから\n"
6303 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6304 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6305 "スレッド毎の CPU 時間を取得する。\n"
6306 "下記のシェルのセッションは実行例である。"
6307
6308 #. type: Plain text
6309 #: build/C/man3/pthread_getcpuclockid.3:93
6310 #, no-wrap
6311 msgid ""
6312 "$ B<./a.out>\n"
6313 "Main thread sleeping\n"
6314 "Subthread starting infinite loop\n"
6315 "Main thread consuming some CPU time...\n"
6316 "Process total CPU time:    1.368\n"
6317 "Main thread CPU time:      0.376\n"
6318 "Subthread CPU time:        0.992\n"
6319 msgstr ""
6320 "$ B<./a.out>\n"
6321 "Main thread sleeping\n"
6322 "Subthread starting infinite loop\n"
6323 "Main thread consuming some CPU time...\n"
6324 "Process total CPU time:    1.368\n"
6325 "Main thread CPU time:      0.376\n"
6326 "Subthread CPU time:        0.992\n"
6327
6328 #. type: Plain text
6329 #: build/C/man3/pthread_getcpuclockid.3:99
6330 #, no-wrap
6331 msgid "/* Link with \"-lrt\" */\n"
6332 msgstr "/* \"-lrt\" でリンクする */\n"
6333
6334 #. type: Plain text
6335 #: build/C/man3/pthread_getcpuclockid.3:107
6336 #, no-wrap
6337 msgid ""
6338 "#include E<lt>time.hE<gt>\n"
6339 "#include E<lt>stdio.hE<gt>\n"
6340 "#include E<lt>stdlib.hE<gt>\n"
6341 "#include E<lt>unistd.hE<gt>\n"
6342 "#include E<lt>pthread.hE<gt>\n"
6343 "#include E<lt>string.hE<gt>\n"
6344 "#include E<lt>errno.hE<gt>\n"
6345 msgstr ""
6346 "#include E<lt>time.hE<gt>\n"
6347 "#include E<lt>stdio.hE<gt>\n"
6348 "#include E<lt>stdlib.hE<gt>\n"
6349 "#include E<lt>unistd.hE<gt>\n"
6350 "#include E<lt>pthread.hE<gt>\n"
6351 "#include E<lt>string.hE<gt>\n"
6352 "#include E<lt>errno.hE<gt>\n"
6353
6354 #. type: Plain text
6355 #: build/C/man3/pthread_getcpuclockid.3:121
6356 #, no-wrap
6357 msgid ""
6358 "static void *\n"
6359 "thread_start(void *arg)\n"
6360 "{\n"
6361 "    printf(\"Subthread starting infinite loop\\en\");\n"
6362 "    for (;;)\n"
6363 "        continue;\n"
6364 "}\n"
6365 msgstr ""
6366 "static void *\n"
6367 "thread_start(void *arg)\n"
6368 "{\n"
6369 "    printf(\"Subthread starting infinite loop\\en\");\n"
6370 "    for (;;)\n"
6371 "        continue;\n"
6372 "}\n"
6373
6374 #. type: Plain text
6375 #: build/C/man3/pthread_getcpuclockid.3:126
6376 #, no-wrap
6377 msgid ""
6378 "static void\n"
6379 "pclock(char *msg, clockid_t cid)\n"
6380 "{\n"
6381 "    struct timespec ts;\n"
6382 msgstr ""
6383 "static void\n"
6384 "pclock(char *msg, clockid_t cid)\n"
6385 "{\n"
6386 "    struct timespec ts;\n"
6387
6388 #. type: Plain text
6389 #: build/C/man3/pthread_getcpuclockid.3:132
6390 #, no-wrap
6391 msgid ""
6392 "    printf(\"%s\", msg);\n"
6393 "    if (clock_gettime(cid, &ts) == -1)\n"
6394 "        handle_error(\"clock_gettime\");\n"
6395 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6396 "}\n"
6397 msgstr ""
6398 "    printf(\"%s\", msg);\n"
6399 "    if (clock_gettime(cid, &ts) == -1)\n"
6400 "        handle_error(\"clock_gettime\");\n"
6401 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6402 "}\n"
6403
6404 #. type: Plain text
6405 #: build/C/man3/pthread_getcpuclockid.3:139
6406 #, no-wrap
6407 msgid ""
6408 "int\n"
6409 "main(int argc, char *argv[])\n"
6410 "{\n"
6411 "    pthread_t thread;\n"
6412 "    clockid_t cid;\n"
6413 "    int j, s;\n"
6414 msgstr ""
6415 "int\n"
6416 "main(int argc, char *argv[])\n"
6417 "{\n"
6418 "    pthread_t thread;\n"
6419 "    clockid_t cid;\n"
6420 "    int j, s;\n"
6421
6422 #. type: Plain text
6423 #: build/C/man3/pthread_getcpuclockid.3:143
6424 #, no-wrap
6425 msgid ""
6426 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6427 "    if (s != 0)\n"
6428 "        handle_error_en(s, \"pthread_create\");\n"
6429 msgstr ""
6430 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6431 "    if (s != 0)\n"
6432 "        handle_error_en(s, \"pthread_create\");\n"
6433
6434 #. type: Plain text
6435 #: build/C/man3/pthread_getcpuclockid.3:146
6436 #, no-wrap
6437 msgid ""
6438 "    printf(\"Main thread sleeping\\en\");\n"
6439 "    sleep(1);\n"
6440 msgstr ""
6441 "    printf(\"Main thread sleeping\\en\");\n"
6442 "    sleep(1);\n"
6443
6444 #. type: Plain text
6445 #: build/C/man3/pthread_getcpuclockid.3:150
6446 #, no-wrap
6447 msgid ""
6448 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6449 "    for (j = 0; j E<lt> 2000000; j++)\n"
6450 "        getppid();\n"
6451 msgstr ""
6452 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6453 "    for (j = 0; j E<lt> 2000000; j++)\n"
6454 "        getppid();\n"
6455
6456 #. type: Plain text
6457 #: build/C/man3/pthread_getcpuclockid.3:152
6458 #, no-wrap
6459 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6460 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6461
6462 #. type: Plain text
6463 #: build/C/man3/pthread_getcpuclockid.3:157
6464 #, no-wrap
6465 msgid ""
6466 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6467 "    if (s != 0)\n"
6468 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6469 "    pclock(\"Main thread CPU time:   \", cid);\n"
6470 msgstr ""
6471 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6472 "    if (s != 0)\n"
6473 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6474 "    pclock(\"Main thread CPU time:   \", cid);\n"
6475
6476 #. type: Plain text
6477 #: build/C/man3/pthread_getcpuclockid.3:160
6478 #, no-wrap
6479 msgid ""
6480 "    /* The preceding 4 lines of code could have been replaced by:\n"
6481 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6482 msgstr ""
6483 "    /* The preceding 4 lines of code could have been replaced by:\n"
6484 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6485
6486 #. type: Plain text
6487 #: build/C/man3/pthread_getcpuclockid.3:165
6488 #, no-wrap
6489 msgid ""
6490 "    s = pthread_getcpuclockid(thread, &cid);\n"
6491 "    if (s != 0)\n"
6492 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6493 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6494 msgstr ""
6495 "    s = pthread_getcpuclockid(thread, &cid);\n"
6496 "    if (s != 0)\n"
6497 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6498 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6499
6500 #. type: Plain text
6501 #: build/C/man3/pthread_getcpuclockid.3:168
6502 #, no-wrap
6503 msgid ""
6504 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6505 "}\n"
6506 msgstr ""
6507 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6508 "}\n"
6509
6510 #. type: Plain text
6511 #: build/C/man3/pthread_getcpuclockid.3:177
6512 msgid ""
6513 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6514 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6515 msgstr ""
6516 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6517 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6518
6519 #. type: TH
6520 #: build/C/man3/pthread_join.3:26
6521 #, no-wrap
6522 msgid "PTHREAD_JOIN"
6523 msgstr "PTHREAD_JOIN"
6524
6525 #. type: Plain text
6526 #: build/C/man3/pthread_join.3:29
6527 msgid "pthread_join - join with a terminated thread"
6528 msgstr "pthread_join - 終了したスレッドを join する"
6529
6530 #. type: Plain text
6531 #: build/C/man3/pthread_join.3:34
6532 #, no-wrap
6533 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6534 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6535
6536 #. type: Plain text
6537 #: build/C/man3/pthread_join.3:49
6538 msgid ""
6539 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6540 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6541 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6542 msgstr ""
6543 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6544 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6545 "B<pthread_join>() はすぐに返る。\n"
6546 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6547
6548 #. type: Plain text
6549 #: build/C/man3/pthread_join.3:63
6550 msgid ""
6551 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6552 "the target thread (i.e., the value that the target thread supplied to "
6553 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6554 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6555 msgstr ""
6556 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6557 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6558 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6559 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6560
6561 #. type: Plain text
6562 #: build/C/man3/pthread_join.3:70
6563 msgid ""
6564 "If multiple threads simultaneously try to join with the same thread, the "
6565 "results are undefined.  If the thread calling B<pthread_join>()  is "
6566 "canceled, then the target thread will remain joinable (i.e., it will not be "
6567 "detached)."
6568 msgstr ""
6569 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6570 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6571 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6572 "ならない)。"
6573
6574 #. type: Plain text
6575 #: build/C/man3/pthread_join.3:75
6576 msgid ""
6577 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6578 "number."
6579 msgstr ""
6580 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6581 "エラーの場合、エラー番号を返す。"
6582
6583 #. type: TP
6584 #: build/C/man3/pthread_join.3:76
6585 #, no-wrap
6586 msgid "B<EDEADLK>"
6587 msgstr "B<EDEADLK>"
6588
6589 #.  The following verified by testing on glibc 2.8/NPTL:
6590 #.  The following verified by testing on glibc 2.8/NPTL:
6591 #. type: Plain text
6592 #: build/C/man3/pthread_join.3:85
6593 msgid ""
6594 "A deadlock was detected (e.g., two threads tried to join with each other); "
6595 "or I<thread> specifies the calling thread."
6596 msgstr ""
6597 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6598 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6599
6600 #.  POSIX.1-2001 does not specify this error case.
6601 #. type: Plain text
6602 #: build/C/man3/pthread_join.3:93
6603 msgid "Another thread is already waiting to join with this thread."
6604 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6605
6606 #. type: Plain text
6607 #: build/C/man3/pthread_join.3:104
6608 msgid ""
6609 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6610 "the target thread has terminated."
6611 msgstr ""
6612 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6613 "呼び出し側には、対象スレッドが終了していることが保証される。"
6614
6615 #. type: Plain text
6616 #: build/C/man3/pthread_join.3:107
6617 msgid ""
6618 "Joining with a thread that has previously been joined results in undefined "
6619 "behavior."
6620 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6621
6622 #. type: Plain text
6623 #: build/C/man3/pthread_join.3:115
6624 msgid ""
6625 "Failure to join with a thread that is joinable (i.e., one that is not "
6626 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6627 "zombie thread consumes some system resources, and when enough zombie threads "
6628 "have accumulated, it will no longer be possible to create new threads (or "
6629 "processes)."
6630 msgstr ""
6631 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6632 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6633 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6634 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6635 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6636 "このようなことが起きるのは避けること。"
6637
6638 #. type: Plain text
6639 #: build/C/man3/pthread_join.3:121
6640 msgid ""
6641 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6642 "\"join with any terminated thread\".  If you believe you need this "
6643 "functionality, you probably need to rethink your application design."
6644 msgstr ""
6645 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6646 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6647 "この機能が必要だと思うような場合には、おそらく\n"
6648 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6649
6650 #. type: Plain text
6651 #: build/C/man3/pthread_join.3:124
6652 msgid ""
6653 "All of the threads in a process are peers: any thread can join with any "
6654 "other thread in the process."
6655 msgstr ""
6656 "プロセス内の全てのスレッドは対等であり、\n"
6657 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6658
6659 #. type: Plain text
6660 #: build/C/man3/pthread_join.3:134
6661 msgid ""
6662 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6663 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6664 msgstr ""
6665 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6666 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6667
6668 #. type: TH
6669 #: build/C/man3/pthread_kill.3:26
6670 #, no-wrap
6671 msgid "PTHREAD_KILL"
6672 msgstr "PTHREAD_KILL"
6673
6674 #. type: TH
6675 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigqueue.3:25
6676 #, no-wrap
6677 msgid "2012-08-19"
6678 msgstr "2012-08-19"
6679
6680 #. type: Plain text
6681 #: build/C/man3/pthread_kill.3:29
6682 msgid "pthread_kill - send a signal to a thread"
6683 msgstr "pthread_kill - スレッドにシグナルを送信する"
6684
6685 #. type: Plain text
6686 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6687 #, no-wrap
6688 msgid "B<#include E<lt>signal.hE<gt>>\n"
6689 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6690
6691 #. type: Plain text
6692 #: build/C/man3/pthread_kill.3:34
6693 #, no-wrap
6694 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6695 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6696
6697 #. type: Plain text
6698 #: build/C/man3/pthread_kill.3:47
6699 msgid ""
6700 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6701 "thread in the same process as the caller.  The signal is asynchronously "
6702 "directed to I<thread>."
6703 msgstr ""
6704 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6705 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6706 "シグナルは非同期に I<thread> へ直接送られる。"
6707
6708 #. type: Plain text
6709 #: build/C/man3/pthread_kill.3:52
6710 msgid ""
6711 "If I<sig> is 0, then no signal is sent, but error checking is still "
6712 "performed; this can be used to check for the existence of a thread ID."
6713 msgstr ""
6714 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6715 "エラーチェックだけは実行される。\n"
6716 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6717
6718 #. type: Plain text
6719 #: build/C/man3/pthread_kill.3:57
6720 msgid ""
6721 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6722 "number, and no signal is sent."
6723 msgstr ""
6724 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6725 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6726
6727 #. type: Plain text
6728 #: build/C/man3/pthread_kill.3:61
6729 msgid "An invalid signal was specified."
6730 msgstr "無効なシグナルが指定された。"
6731
6732 #. type: Plain text
6733 #: build/C/man3/pthread_kill.3:75
6734 msgid ""
6735 "Signal dispositions are process-wide: if a signal handler is installed, the "
6736 "handler will be invoked in the thread I<thread>, but if the disposition of "
6737 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6738 "affect the whole process."
6739 msgstr ""
6740 "シグナルの配送はプロセス全体で行われる。\n"
6741 "シグナルハンドラが設定されている場合、\n"
6742 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6743 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6744 "シグナルに対するアクションはプロセス全体に影響がある。"
6745
6746 #. type: Plain text
6747 #: build/C/man3/pthread_kill.3:84
6748 msgid ""
6749 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6750 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6751 msgstr "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6752
6753 #. type: TH
6754 #: build/C/man3/pthread_kill_other_threads_np.3:26
6755 #, no-wrap
6756 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6757 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6758
6759 #. type: TH
6760 #: build/C/man3/pthread_kill_other_threads_np.3:26
6761 #, no-wrap
6762 msgid "2010-09-09"
6763 msgstr "2010-09-09"
6764
6765 #. type: Plain text
6766 #: build/C/man3/pthread_kill_other_threads_np.3:29
6767 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6768 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6769
6770 #. type: Plain text
6771 #: build/C/man3/pthread_kill_other_threads_np.3:34
6772 #, no-wrap
6773 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6774 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6775
6776 #.  .SH VERSIONS
6777 #.  Available since glibc 2.0
6778 #. type: Plain text
6779 #: build/C/man3/pthread_kill_other_threads_np.3:47
6780 msgid ""
6781 "B<pthread_kill_other_threads_np>()  only has an effect in the LinuxThreads "
6782 "threading implementation.  On that implementation, calling this function "
6783 "causes the immediate termination of all threads in the application, except "
6784 "the calling thread.  The cancellation state and cancellation type of the to-"
6785 "be-terminated threads are ignored, and the cleanup handlers are not called "
6786 "in those threads."
6787 msgstr ""
6788 "B<pthread_kill_other_threads_np>() は、\n"
6789 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6790 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6791 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6792 "終了対象のスレッドの cancelability state と cancelability type は\n"
6793 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6794
6795 #. type: Plain text
6796 #: build/C/man3/pthread_kill_other_threads_np.3:59
6797 msgid ""
6798 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6799 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6800 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6801 "the other threads of an application are not automatically terminated (as "
6802 "POSIX.1-2001 requires) during B<execve>(2)."
6803 msgstr ""
6804 "B<pthread_kill_other_threads_np>() は、\n"
6805 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6806 "呼ばれることを目的として用意されている。\n"
6807 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6808 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6809 "終了されないという制限を解決するために設計された。"
6810
6811 #. type: Plain text
6812 #: build/C/man3/pthread_kill_other_threads_np.3:66
6813 msgid ""
6814 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6815 "exists, but does nothing.  (Nothing needs to be done, because the "
6816 "implementation does the right thing during an B<execve>(2).)"
6817 msgstr ""
6818 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6819 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6820 "何もする必要がないということだ)。"
6821
6822 #. type: Plain text
6823 #: build/C/man3/pthread_kill_other_threads_np.3:72
6824 msgid ""
6825 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6826 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6827 msgstr ""
6828 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6829 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6830
6831 #. type: TH
6832 #: build/C/man3/pthread_self.3:26
6833 #, no-wrap
6834 msgid "PTHREAD_SELF"
6835 msgstr "PTHREAD_SELF"
6836
6837 #. type: Plain text
6838 #: build/C/man3/pthread_self.3:29
6839 msgid "pthread_self - obtain ID of the calling thread"
6840 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6841
6842 #. type: Plain text
6843 #: build/C/man3/pthread_self.3:34
6844 #, no-wrap
6845 msgid "B<pthread_t pthread_self(void);>\n"
6846 msgstr "B<pthread_t pthread_self(void);>\n"
6847
6848 #. type: Plain text
6849 #: build/C/man3/pthread_self.3:46
6850 msgid ""
6851 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6852 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6853 "(3)  call that created this thread."
6854 msgstr ""
6855 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6856 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6857 "呼び出しで I<*thread> で返されるのと同じ値である。"
6858
6859 #. type: Plain text
6860 #: build/C/man3/pthread_self.3:48
6861 msgid "This function always succeeds, returning the calling thread's ID."
6862 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6863
6864 #. type: Plain text
6865 #: build/C/man3/pthread_self.3:63
6866 msgid ""
6867 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6868 "represent a thread ID; for example, representation using either an "
6869 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6870 "I<pthread_t> can't portably be compared using the C equality operator "
6871 "(B<==>); use B<pthread_equal>(3)  instead."
6872 msgstr ""
6873 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
6874 "スレッド実装が完全に自由に選択してよいことになっている。\n"
6875 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
6876 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
6877 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
6878 "代わりに B<pthread_equal>(3) を使うこと。"
6879
6880 #. type: Plain text
6881 #: build/C/man3/pthread_self.3:67
6882 msgid ""
6883 "Thread identifiers should be considered opaque: any attempt to use a thread "
6884 "ID other than in pthreads calls is nonportable and can lead to unspecified "
6885 "results."
6886 msgstr ""
6887 "スレッド識別子はその内部構造を意識すべきではない。\n"
6888 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
6889 "移植性がなくなり、どのような結果が得られるかも分からない。"
6890
6891 #. type: Plain text
6892 #: build/C/man3/pthread_self.3:71
6893 msgid ""
6894 "Thread IDs are only guaranteed to be unique within a process.  A thread ID "
6895 "may be reused after a terminated thread has been joined, or a detached "
6896 "thread has terminated."
6897 msgstr ""
6898 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
6899 "終了したスレッドが join されたり、\n"
6900 "切り離された (detached) スレッドが終了されたりした後は、\n"
6901 "そのスレッド ID は再利用されることがある。"
6902
6903 #. type: Plain text
6904 #: build/C/man3/pthread_self.3:76
6905 msgid ""
6906 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
6907 "kernel thread ID returned by a call to B<gettid>(2)."
6908 msgstr ""
6909 "B<pthread_self>() が返すスレッド ID は、\n"
6910 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
6911
6912 #. type: Plain text
6913 #: build/C/man3/pthread_self.3:80
6914 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
6915 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
6916
6917 #. type: TH
6918 #: build/C/man3/pthread_setaffinity_np.3:26
6919 #, no-wrap
6920 msgid "PTHREAD_SETAFFINITY_NP"
6921 msgstr "PTHREAD_SETAFFINITY_NP"
6922
6923 #. type: Plain text
6924 #: build/C/man3/pthread_setaffinity_np.3:30
6925 msgid ""
6926 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
6927 "thread"
6928 msgstr ""
6929 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
6930 "CPU affinity の設定/取得を行う"
6931
6932 #. type: Plain text
6933 #: build/C/man3/pthread_setaffinity_np.3:39
6934 #, no-wrap
6935 msgid ""
6936 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6937 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
6938 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6939 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
6940 msgstr ""
6941 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6942 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
6943 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6944 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
6945
6946 #. type: Plain text
6947 #: build/C/man3/pthread_setaffinity_np.3:54
6948 msgid ""
6949 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
6950 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
6951 "successful, and the thread is not currently running on one of the CPUs in "
6952 "I<cpuset>, then it is migrated to one of those CPUs."
6953 msgstr ""
6954 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
6955 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
6956 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
6957 "場合は、スレッドは指定された CPU のいずれかに移動される。"
6958
6959 #. type: Plain text
6960 #: build/C/man3/pthread_setaffinity_np.3:61
6961 msgid ""
6962 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
6963 "the thread I<thread> in the buffer pointed to by I<cpuset>."
6964 msgstr ""
6965 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
6966 "マスクを、I<cpuset> が指すバッファに入れて返す。"
6967
6968 #. type: Plain text
6969 #: build/C/man3/pthread_setaffinity_np.3:77
6970 msgid ""
6971 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
6972 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
6973 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
6974 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
6975 msgstr ""
6976 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
6977 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
6978 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
6979 "割り当てている場合には、別の値になることもある)。"
6980
6981 #. type: TP
6982 #: build/C/man3/pthread_setaffinity_np.3:81
6983 #, no-wrap
6984 msgid "B<EFAULT>"
6985 msgstr "B<EFAULT>"
6986
6987 #. type: Plain text
6988 #: build/C/man3/pthread_setaffinity_np.3:84
6989 msgid "A supplied memory address was invalid."
6990 msgstr "指定されたメモリアドレスが無効である。"
6991
6992 #. type: Plain text
6993 #: build/C/man3/pthread_setaffinity_np.3:93
6994 msgid ""
6995 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
6996 "processors that are currently physically on the system and permitted to the "
6997 "thread according to any restrictions that may be imposed by the \"cpuset\" "
6998 "mechanism described in B<cpuset>(7)."
6999 msgstr ""
7000 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7001 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7002 "されているプロセッサが一つも含まれていない。\n"
7003 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7004 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7005
7006 #.  FIXME . ?
7007 #.  Loic Domaigne commented: it seems that in the future the
7008 #.  kernel developers want to make cpumask_t dynamic, so
7009 #.  CONFIG_NR_CPUS might become obsolete in the future.
7010 #.  cpumask_t
7011 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7012 #.  of the cpumask_t type.
7013 #. type: Plain text
7014 #: build/C/man3/pthread_setaffinity_np.3:109
7015 msgid ""
7016 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7017 "the set supported by the kernel.  (The kernel configuration option "
7018 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7019 "type used to represent CPU sets.)"
7020 msgstr ""
7021 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7022 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7023 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7024 "データ型がサポートする CPU 集合の範囲が定義される。)"
7025
7026 #. type: Plain text
7027 #: build/C/man3/pthread_setaffinity_np.3:114
7028 msgid ""
7029 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7030 "affinity mask used by the kernel."
7031 msgstr ""
7032 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7033 "affinity マスクの大きさよりも小さい。"
7034
7035 #. type: Plain text
7036 #: build/C/man3/pthread_setaffinity_np.3:137
7037 msgid ""
7038 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7039 "thread will actually run is the intersection of the set specified in the "
7040 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7041 "system may further restrict the set of CPUs on which the thread runs if the "
7042 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7043 "restrictions on the actual set of CPUs on which the thread will run are "
7044 "silently imposed by the kernel."
7045 msgstr ""
7046 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7047 "そのスレッドが実際に実行される CPU 集合は、\n"
7048 "I<cpuset> 引き数で指定された集合と\n"
7049 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7050 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7051 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7052 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7053 "これらの制限は、カーネルにより黙って適用される。"
7054
7055 #. type: Plain text
7056 #: build/C/man3/pthread_setaffinity_np.3:143
7057 msgid ""
7058 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7059 "B<sched_getaffinity>(2)  system calls."
7060 msgstr ""
7061 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7062 "B<sched_getaffinity>(2) を使って実装されている。"
7063
7064 #. type: Plain text
7065 #: build/C/man3/pthread_setaffinity_np.3:154
7066 msgid ""
7067 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7068 "creator's CPU affinity mask."
7069 msgstr ""
7070 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7071 "作成者の CPU affinity マスクを継承する。"
7072
7073 #. type: Plain text
7074 #: build/C/man3/pthread_setaffinity_np.3:162
7075 msgid ""
7076 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7077 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7078 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7079 "check the resulting CPU affinity mask of the thread."
7080 msgstr ""
7081 "以下のプログラムでは、メインスレッドは\n"
7082 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7083 "CPU 0 から 7 が含まれるように設定し\n"
7084 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7085 "その後で B<pthread_getaffinity_np>() を使って\n"
7086 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7087
7088 #. type: Plain text
7089 #: build/C/man3/pthread_setaffinity_np.3:169
7090 #, no-wrap
7091 msgid ""
7092 "#define _GNU_SOURCE\n"
7093 "#include E<lt>pthread.hE<gt>\n"
7094 "#include E<lt>stdio.hE<gt>\n"
7095 "#include E<lt>stdlib.hE<gt>\n"
7096 "#include E<lt>errno.hE<gt>\n"
7097 msgstr ""
7098 "#define _GNU_SOURCE\n"
7099 "#include E<lt>pthread.hE<gt>\n"
7100 "#include E<lt>stdio.hE<gt>\n"
7101 "#include E<lt>stdlib.hE<gt>\n"
7102 "#include E<lt>errno.hE<gt>\n"
7103
7104 #. type: Plain text
7105 #: build/C/man3/pthread_setaffinity_np.3:179
7106 #, no-wrap
7107 msgid ""
7108 "int\n"
7109 "main(int argc, char *argv[])\n"
7110 "{\n"
7111 "    int s, j;\n"
7112 "    cpu_set_t cpuset;\n"
7113 "    pthread_t thread;\n"
7114 msgstr ""
7115 "int\n"
7116 "main(int argc, char *argv[])\n"
7117 "{\n"
7118 "    int s, j;\n"
7119 "    cpu_set_t cpuset;\n"
7120 "    pthread_t thread;\n"
7121
7122 #. type: Plain text
7123 #: build/C/man3/pthread_setaffinity_np.3:181
7124 #, no-wrap
7125 msgid "    thread = pthread_self();\n"
7126 msgstr "    thread = pthread_self();\n"
7127
7128 #. type: Plain text
7129 #: build/C/man3/pthread_setaffinity_np.3:183
7130 #, no-wrap
7131 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7132 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7133
7134 #. type: Plain text
7135 #: build/C/man3/pthread_setaffinity_np.3:187
7136 #, no-wrap
7137 msgid ""
7138 "    CPU_ZERO(&cpuset);\n"
7139 "    for (j = 0; j E<lt> 8; j++)\n"
7140 "        CPU_SET(j, &cpuset);\n"
7141 msgstr ""
7142 "    CPU_ZERO(&cpuset);\n"
7143 "    for (j = 0; j E<lt> 8; j++)\n"
7144 "        CPU_SET(j, &cpuset);\n"
7145
7146 #. type: Plain text
7147 #: build/C/man3/pthread_setaffinity_np.3:191
7148 #, no-wrap
7149 msgid ""
7150 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7151 "    if (s != 0)\n"
7152 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7153 msgstr ""
7154 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7155 "    if (s != 0)\n"
7156 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7157
7158 #. type: Plain text
7159 #: build/C/man3/pthread_setaffinity_np.3:193
7160 #, no-wrap
7161 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7162 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7163
7164 #. type: Plain text
7165 #: build/C/man3/pthread_setaffinity_np.3:197
7166 #, no-wrap
7167 msgid ""
7168 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7169 "    if (s != 0)\n"
7170 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7171 msgstr ""
7172 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7173 "    if (s != 0)\n"
7174 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7175
7176 #. type: Plain text
7177 #: build/C/man3/pthread_setaffinity_np.3:202
7178 #, no-wrap
7179 msgid ""
7180 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7181 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7182 "        if (CPU_ISSET(j, &cpuset))\n"
7183 "            printf(\"    CPU %d\\en\", j);\n"
7184 msgstr ""
7185 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7186 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7187 "        if (CPU_ISSET(j, &cpuset))\n"
7188 "            printf(\"    CPU %d\\en\", j);\n"
7189
7190 #. type: Plain text
7191 #: build/C/man3/pthread_setaffinity_np.3:205
7192 #: build/C/man3/pthread_setschedparam.3:430
7193 #, no-wrap
7194 msgid ""
7195 "    exit(EXIT_SUCCESS);\n"
7196 "}\n"
7197 msgstr ""
7198 "    exit(EXIT_SUCCESS);\n"
7199 "}\n"
7200
7201 #. type: Plain text
7202 #: build/C/man3/pthread_setaffinity_np.3:214
7203 msgid ""
7204 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7205 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7206 "B<cpuset>(7), B<pthreads>(7)"
7207 msgstr ""
7208 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7209 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7210 "B<cpuset>(7), B<pthreads>(7)"
7211
7212 #. type: TH
7213 #: build/C/man3/pthread_setcancelstate.3:26
7214 #, no-wrap
7215 msgid "PTHREAD_SETCANCELSTATE"
7216 msgstr "PTHREAD_SETCANCELSTATE"
7217
7218 #. type: Plain text
7219 #: build/C/man3/pthread_setcancelstate.3:30
7220 msgid ""
7221 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7222 "type"
7223 msgstr ""
7224 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7225 "cancelability type を設定する"
7226
7227 #. type: Plain text
7228 #: build/C/man3/pthread_setcancelstate.3:36
7229 #, no-wrap
7230 msgid ""
7231 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7232 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7233 msgstr ""
7234 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7235 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7236
7237 #. type: Plain text
7238 #: build/C/man3/pthread_setcancelstate.3:51
7239 msgid ""
7240 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7241 "thread to the value given in I<state>.  The previous cancelability state of "
7242 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7243 "I<state> argument must have one of the following values:"
7244 msgstr ""
7245 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7246 "cancelability state に I<state> で指定された\n"
7247 "値を設定する。変更前のスレッドの cancelability state は\n"
7248 "I<oldstate> が指すバッファで返される。\n"
7249 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7250
7251 #. type: TP
7252 #: build/C/man3/pthread_setcancelstate.3:51
7253 #, no-wrap
7254 msgid "B<PTHREAD_CANCEL_ENABLE>"
7255 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7256
7257 #. type: Plain text
7258 #: build/C/man3/pthread_setcancelstate.3:58
7259 msgid ""
7260 "The thread is cancelable.  This is the default cancelability state in all "
7261 "new threads, including the initial thread.  The thread's cancelability type "
7262 "determines when a cancelable thread will respond to a cancellation request."
7263 msgstr ""
7264 "スレッドは取り消し可能 (cancelable) である。\n"
7265 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7266 "cancelability state である。これには最初のスレッドも含まれる。\n"
7267 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7268 "取り消し要求にいつ反応するかが決まる。"
7269
7270 #. type: TP
7271 #: build/C/man3/pthread_setcancelstate.3:58
7272 #, no-wrap
7273 msgid "B<PTHREAD_CANCEL_DISABLE>"
7274 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7275
7276 #. type: Plain text
7277 #: build/C/man3/pthread_setcancelstate.3:63
7278 msgid ""
7279 "The thread is not cancelable.  If a cancellation request is received, it is "
7280 "blocked until cancelability is enabled."
7281 msgstr ""
7282 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7283 "取り消し可能に設定されるまでその要求はブロックされる。"
7284
7285 #. type: Plain text
7286 #: build/C/man3/pthread_setcancelstate.3:75
7287 msgid ""
7288 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7289 "thread to the value given in I<type>.  The previous cancelability type of "
7290 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7291 "argument must have one of the following values:"
7292 msgstr ""
7293 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7294 "cancelability type に I<type> で指定された値を設定する。\n"
7295 "変更前のスレッドの cancelability type は\n"
7296 "I<oldtype> が指すバッファで返される。\n"
7297 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7298
7299 #. type: TP
7300 #: build/C/man3/pthread_setcancelstate.3:75
7301 #, no-wrap
7302 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7303 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7304
7305 #. type: Plain text
7306 #: build/C/man3/pthread_setcancelstate.3:82
7307 msgid ""
7308 "A cancellation request is deferred until the thread next calls a function "
7309 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7310 "cancelability type in all new threads, including the initial thread."
7311 msgstr ""
7312 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7313 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7314 "スレッドでのデフォルトの cancelability type である。\n"
7315 "これには最初のスレッドも含まれる。"
7316
7317 #. type: TP
7318 #: build/C/man3/pthread_setcancelstate.3:82
7319 #, no-wrap
7320 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7321 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7322
7323 #. type: Plain text
7324 #: build/C/man3/pthread_setcancelstate.3:88
7325 msgid ""
7326 "The thread can be canceled at any time.  (Typically, it will be canceled "
7327 "immediately upon receiving a cancellation request, but the system doesn't "
7328 "guarantee this.)"
7329 msgstr ""
7330 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7331 "システムがそのことを保証しているわけではない)。"
7332
7333 #. type: Plain text
7334 #: build/C/man3/pthread_setcancelstate.3:92
7335 msgid ""
7336 "The set-and-get operation performed by each of these functions is atomic "
7337 "with respect to other threads in the process calling the same function."
7338 msgstr ""
7339 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7340 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7341 "アトミックに行われる。"
7342
7343 #. type: Plain text
7344 #: build/C/man3/pthread_setcancelstate.3:99
7345 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7346 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7347
7348 #. type: Plain text
7349 #: build/C/man3/pthread_setcancelstate.3:103
7350 msgid "Invalid value for I<state>."
7351 msgstr "I<state> に無効な値が指定された。"
7352
7353 #. type: Plain text
7354 #: build/C/man3/pthread_setcancelstate.3:107
7355 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7356 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7357
7358 #.  .SH VERSIONS
7359 #.  Available since glibc 2.0
7360 #. type: Plain text
7361 #: build/C/man3/pthread_setcancelstate.3:113
7362 msgid "Invalid value for I<type>."
7363 msgstr "I<type> に無効な値が指定された。"
7364
7365 #. type: Plain text
7366 #: build/C/man3/pthread_setcancelstate.3:118
7367 msgid ""
7368 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7369 "(3)."
7370 msgstr ""
7371 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7372 "B<pthread_cancel>(3) を参照。"
7373
7374 #. type: Plain text
7375 #: build/C/man3/pthread_setcancelstate.3:125
7376 msgid ""
7377 "Briefly disabling cancelability is useful if a thread performs some critical "
7378 "action that must not be interrupted by a cancellation request.  Beware of "
7379 "disabling cancelability for long periods, or around operations that may "
7380 "block for long periods, since that will render the thread unresponsive to "
7381 "cancellation requests."
7382 msgstr ""
7383 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7384 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7385 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7386 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7387 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7388 "スレッドが応答しない状態になってしまうからである。"
7389
7390 #. type: Plain text
7391 #: build/C/man3/pthread_setcancelstate.3:156
7392 msgid ""
7393 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7394 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7395 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7396 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7397 "because the application has no way of knowing what the state of these "
7398 "resources is when the thread is canceled; that is, did cancellation occur "
7399 "before the resources were reserved, while they were reserved, or after they "
7400 "were released? Furthermore, some internal data structures (e.g., the linked "
7401 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7402 "left in an inconsistent state if cancellation occurs in the middle of the "
7403 "function call.  Consequently, clean-up handlers cease to be useful.  "
7404 "Functions that can be safely asynchronously canceled are called I<async-"
7405 "cancel-safe functions>.  POSIX.1-2001 only requires that B<pthread_cancel>"
7406 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7407 "cancel-safe.  In general, other library functions can't be safely called "
7408 "from an asynchronously cancelable thread.  One of the few circumstances in "
7409 "which asynchronous cancelability is useful is for cancellation of a thread "
7410 "that is in a pure compute-bound loop."
7411 msgstr ""
7412 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7413 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7414 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7415 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7416 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7417 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7418 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7419 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7420 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7421 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7422 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7423 "が役に立たないものになってしまう。\n"
7424 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7425 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7426 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7427 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7428 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7429 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7430 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7431
7432 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7433 #. type: Plain text
7434 #: build/C/man3/pthread_setcancelstate.3:174
7435 msgid ""
7436 "The Linux threading implementations permit the I<oldstate> argument of "
7437 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7438 "the previous cancelability state is not returned to the caller.  Many other "
7439 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7440 "does not specify this point, so portable applications should always specify "
7441 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7442 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7443 msgstr ""
7444 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7445 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7446 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7447 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7448 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7449 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7450 "NULL 以外の値を指定するようにすべきである。\n"
7451 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7452 "全く同じことが言える。"
7453
7454 #. type: Plain text
7455 #: build/C/man3/pthread_setcancelstate.3:177
7456 msgid "See B<pthread_cancel>(3)."
7457 msgstr "B<pthread_cancel>(3) を参照。"
7458
7459 #. type: Plain text
7460 #: build/C/man3/pthread_setcancelstate.3:182
7461 msgid ""
7462 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7463 "B<pthreads>(7)"
7464 msgstr ""
7465 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7466 "B<pthreads>(7)"
7467
7468 #. type: TH
7469 #: build/C/man3/pthread_setconcurrency.3:25
7470 #, no-wrap
7471 msgid "PTHREAD_SETCONCURRENCY"
7472 msgstr "PTHREAD_SETCONCURRENCY"
7473
7474 #. type: TH
7475 #: build/C/man3/pthread_setconcurrency.3:25
7476 #, no-wrap
7477 msgid "2009-04-10"
7478 msgstr "2009-04-10"
7479
7480 #. type: Plain text
7481 #: build/C/man3/pthread_setconcurrency.3:29
7482 msgid ""
7483 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7484 "level"
7485 msgstr ""
7486 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7487 "行う"
7488
7489 #. type: Plain text
7490 #: build/C/man3/pthread_setconcurrency.3:35
7491 #, no-wrap
7492 msgid ""
7493 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7494 "B<int pthread_getconcurrency(void);>\n"
7495 msgstr ""
7496 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7497 "B<int pthread_getconcurrency(void);>\n"
7498
7499 #. type: Plain text
7500 #: build/C/man3/pthread_setconcurrency.3:48
7501 msgid ""
7502 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7503 "application's desired concurrency level, specified in I<new_level>.  The "
7504 "implementation only takes this as a hint: POSIX.1 does not specify the level "
7505 "of concurrency that should be provided as a result of calling "
7506 "B<pthread_setconcurrency>()."
7507 msgstr ""
7508 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7509 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7510 "希望する並列処理レベルは I<new_level> で指定する。\n"
7511 "スレッド実装はこの情報を参考情報として利用する。\n"
7512 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7513 "どのような並列度になるべきかは規定されていない。"
7514
7515 #. type: Plain text
7516 #: build/C/man3/pthread_setconcurrency.3:53
7517 msgid ""
7518 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7519 "concurrency level as it deems appropriate."
7520 msgstr ""
7521 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7522 "実装側で適切とみなしたレベルに設定するようになる。"
7523
7524 #. type: Plain text
7525 #: build/C/man3/pthread_setconcurrency.3:56
7526 msgid ""
7527 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7528 "level for this process."
7529 msgstr ""
7530 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7531 "の現在値を返す。"
7532
7533 #. type: Plain text
7534 #: build/C/man3/pthread_setconcurrency.3:61
7535 msgid ""
7536 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7537 "nonzero error number."
7538 msgstr ""
7539 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7540 "エラーの場合、 0 以外のエラー番号を返す。"
7541
7542 #. type: Plain text
7543 #: build/C/man3/pthread_setconcurrency.3:68
7544 msgid ""
7545 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7546 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7547 "B<pthread_setconcurrency>()  has not previously been called."
7548 msgstr ""
7549 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7550 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7551 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7552 "それまでに一度も呼び出されていない場合は 0 が返る。"
7553
7554 #. type: Plain text
7555 #: build/C/man3/pthread_setconcurrency.3:71
7556 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7557 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7558
7559 #. type: Plain text
7560 #: build/C/man3/pthread_setconcurrency.3:75
7561 msgid "I<new_level> is negative."
7562 msgstr "I<new_level> が負である。"
7563
7564 #. type: Plain text
7565 #: build/C/man3/pthread_setconcurrency.3:81
7566 msgid ""
7567 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7568 "I<new_level> would cause a system resource to be exceeded\")."
7569 msgstr ""
7570 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7571 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7572 "超過してしまう」)。"
7573
7574 #. type: Plain text
7575 #: build/C/man3/pthread_setconcurrency.3:83
7576 msgid "These functions are available in glibc since version 2.1."
7577 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7578
7579 #. type: Plain text
7580 #: build/C/man3/pthread_setconcurrency.3:87
7581 msgid "The default concurrency level is 0."
7582 msgstr "デフォルトの concurrency level は 0 である。"
7583
7584 #. type: Plain text
7585 #: build/C/man3/pthread_setconcurrency.3:94
7586 msgid ""
7587 "Concurrency levels are only meaningful for M:N threading implementations, "
7588 "where at any moment a subset of a process's set of user-level threads may be "
7589 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7590 "concurrency level allows the application to give the system a hint as to the "
7591 "number of kernel-scheduling entities that should be provided for efficient "
7592 "execution of the application."
7593 msgstr ""
7594 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7595 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7596 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7597 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7598 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7599 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7600 "ムに伝えることができる。"
7601
7602 #. type: Plain text
7603 #: build/C/man3/pthread_setconcurrency.3:100
7604 msgid ""
7605 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7606 "concurrency level has no meaning.  In other words, on Linux these functions "
7607 "merely exist for compatibility with other systems, and they have no effect "
7608 "on the execution of a program."
7609 msgstr ""
7610 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7611 "並列処理レベルを設定しても何の意味もない。\n"
7612 "言い換えると、 Linux では、これらの関数は、\n"
7613 "他のシステムとの互換性のためだけに存在し、\n"
7614 "プログラムの実行には何の影響も与えないということである。"
7615
7616 #. type: Plain text
7617 #: build/C/man3/pthread_setconcurrency.3:103
7618 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7619 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7620
7621 #. type: TH
7622 #: build/C/man3/pthread_setname_np.3:26
7623 #, no-wrap
7624 msgid "PTHREAD_SETNAME_NP"
7625 msgstr "PTHREAD_SETNAME_NP"
7626
7627 #. type: TH
7628 #: build/C/man3/pthread_setname_np.3:26
7629 #, no-wrap
7630 msgid "2013-02-04"
7631 msgstr "2013-02-04"
7632
7633 #. type: Plain text
7634 #: build/C/man3/pthread_setname_np.3:29
7635 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7636 msgstr "pthread_setname_np, pthread_getname_np - スレッド名のの設定/取得を行う"
7637
7638 #. type: Plain text
7639 #: build/C/man3/pthread_setname_np.3:36
7640 #, no-wrap
7641 msgid ""
7642 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7643 "B<#include E<lt>pthread.hE<gt>>\n"
7644 "B<int pthread_setname_np(pthread_t *>I<thread>B<, const char *>I<name>B<);>\n"
7645 "B<int pthread_getname_np(pthread_t *>I<thread>B<,>\n"
7646 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7647 msgstr ""
7648 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7649 "B<#include E<lt>pthread.hE<gt>>\n"
7650 "B<int pthread_setname_np(pthread_t *>I<thread>B<, const char *>I<name>B<);>\n"
7651 "B<int pthread_getname_np(pthread_t *>I<thread>B<,>\n"
7652 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7653
7654 #. type: Plain text
7655 #: build/C/man3/pthread_setname_np.3:55
7656 msgid ""
7657 "By default, all the threads created using B<pthread_create>()  inherit the "
7658 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7659 "unique name for a thread, which can be useful for debugging multithreaded "
7660 "applications.  The thread name is a meaningful C language string, whose "
7661 "length is restricted to 16 characters, including the terminating null byte.  "
7662 "The I<thread> argument specifies the thread whose name is to be changed; "
7663 "I<name> specifies the new name."
7664 msgstr ""
7665
7666 #. type: Plain text
7667 #: build/C/man3/pthread_setname_np.3:72
7668 msgid ""
7669 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7670 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7671 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7672 "specifies the number of bytes available in I<name>.  The buffer specified by "
7673 "I<name> should be at least 16 characters in length.  The returned thread "
7674 "name in the output buffer will be null terminated."
7675 msgstr ""
7676
7677 #. type: Plain text
7678 #: build/C/man3/pthread_setname_np.3:79
7679 msgid ""
7680 "The B<pthread_setname_np>()  function can fail with the following error:"
7681 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7682
7683 #. type: TP
7684 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7685 #, no-wrap
7686 msgid "B<ERANGE>"
7687 msgstr "B<ERANGE>"
7688
7689 #. type: Plain text
7690 #: build/C/man3/pthread_setname_np.3:84
7691 msgid ""
7692 "The length of the string specified pointed to by I<name> exceeds the allowed "
7693 "limit."
7694 msgstr ""
7695
7696 #. type: Plain text
7697 #: build/C/man3/pthread_setname_np.3:88
7698 msgid ""
7699 "The B<pthread_getname_np>()  function can fail with the following error:"
7700 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7701
7702 #. type: Plain text
7703 #: build/C/man3/pthread_setname_np.3:95
7704 msgid ""
7705 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7706 "name."
7707 msgstr ""
7708
7709 #. type: Plain text
7710 #: build/C/man3/pthread_setname_np.3:100
7711 msgid ""
7712 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7713 "then the call may fail with one of the errors described in B<open>(2)."
7714 msgstr ""
7715
7716 #. type: Plain text
7717 #: build/C/man3/pthread_setname_np.3:102
7718 msgid "These functions first appeared in glibc in version 2.12."
7719 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7720
7721 #. type: Plain text
7722 #: build/C/man3/pthread_setname_np.3:104
7723 msgid "These functions are nonstandard GNU extensions."
7724 msgstr "これらの関数は非標準の GNU による拡張である。"
7725
7726 #. type: Plain text
7727 #: build/C/man3/pthread_setname_np.3:112
7728 msgid ""
7729 "B<pthread_setname_np>()  internally writes to the thread specific comm file "
7730 "under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7731 "B<pthread_getname_np>()  retrieves it from the same location."
7732 msgstr ""
7733
7734 #. type: Plain text
7735 #: build/C/man3/pthread_setname_np.3:118
7736 msgid ""
7737 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7738 "B<pthread_getname_np>()."
7739 msgstr ""
7740 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7741 "の使用例を示している。"
7742
7743 #. type: Plain text
7744 #: build/C/man3/pthread_setname_np.3:120
7745 msgid "The following shell session shows a sample run of the program:"
7746 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7747
7748 #. type: Plain text
7749 #: build/C/man3/pthread_setname_np.3:136
7750 #, no-wrap
7751 msgid ""
7752 "$B< ./a.out>\n"
7753 "Created a thread. Default name is: a.out\n"
7754 "The thread name after setting it is THREADFOO.\n"
7755 "B<^Z>                           # Suspend the program\n"
7756 "[1]+  Stopped           ./a.out\n"
7757 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7758 "  PID   TID CMD                         COMMAND\n"
7759 " 5990  5990 ./a.out                     a.out\n"
7760 " 5990  5991 ./a.out                     THREADFOO\n"
7761 "$ B<cat /proc/5990/task/5990/comm>\n"
7762 "a.out\n"
7763 "$ B<cat /proc/5990/task/5991/comm>\n"
7764 "THREADFOO\n"
7765 msgstr ""
7766 "$B< ./a.out>\n"
7767 "Created a thread. Default name is: a.out\n"
7768 "The thread name after setting it is THREADFOO.\n"
7769 "B<^Z>                           # Suspend the program\n"
7770 "[1]+  Stopped           ./a.out\n"
7771 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7772 "  PID   TID CMD                         COMMAND\n"
7773 " 5990  5990 ./a.out                     a.out\n"
7774 " 5990  5991 ./a.out                     THREADFOO\n"
7775 "$ B<cat /proc/5990/task/5990/comm>\n"
7776 "a.out\n"
7777 "$ B<cat /proc/5990/task/5991/comm>\n"
7778 "THREADFOO\n"
7779
7780 #. type: Plain text
7781 #: build/C/man3/pthread_setname_np.3:148
7782 #, no-wrap
7783 msgid ""
7784 "#define _GNU_SOURCE\n"
7785 "#include E<lt>pthread.hE<gt>\n"
7786 "#include E<lt>stdio.hE<gt>\n"
7787 "#include E<lt>string.hE<gt>\n"
7788 "#include E<lt>unistd.hE<gt>\n"
7789 "#include E<lt>errno.hE<gt>\n"
7790 "#include E<lt>stdlib.hE<gt>\n"
7791 msgstr ""
7792 "#define _GNU_SOURCE\n"
7793 "#include E<lt>pthread.hE<gt>\n"
7794 "#include E<lt>stdio.hE<gt>\n"
7795 "#include E<lt>string.hE<gt>\n"
7796 "#include E<lt>unistd.hE<gt>\n"
7797 "#include E<lt>errno.hE<gt>\n"
7798 "#include E<lt>stdlib.hE<gt>\n"
7799
7800 #. type: Plain text
7801 #: build/C/man3/pthread_setname_np.3:150
7802 #, no-wrap
7803 msgid "#define NAMELEN 16\n"
7804 msgstr "#define NAMELEN 16\n"
7805
7806 #. type: Plain text
7807 #: build/C/man3/pthread_setname_np.3:154
7808 #, no-wrap
7809 msgid ""
7810 "#define errExitEN(en, msg) \\e\n"
7811 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7812 "        } while (0)\n"
7813 msgstr ""
7814 "#define errExitEN(en, msg) \\e\n"
7815 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7816 "        } while (0)\n"
7817
7818 #. type: Plain text
7819 #: build/C/man3/pthread_setname_np.3:161
7820 #, no-wrap
7821 msgid ""
7822 "static void *\n"
7823 "threadfunc(void *parm)\n"
7824 "{\n"
7825 "    sleep(5);          // allow main program to set the thread name\n"
7826 "    return NULL;\n"
7827 "}\n"
7828 msgstr ""
7829 "static void *\n"
7830 "threadfunc(void *parm)\n"
7831 "{\n"
7832 "    sleep(5);          // allow main program to set the thread name\n"
7833 "    return NULL;\n"
7834 "}\n"
7835
7836 #. type: Plain text
7837 #: build/C/man3/pthread_setname_np.3:168
7838 #, no-wrap
7839 msgid ""
7840 "int\n"
7841 "main(int argc, char **argv)\n"
7842 "{\n"
7843 "    pthread_t thread;\n"
7844 "    int rc;\n"
7845 "    char thread_name[NAMELEN];\n"
7846 msgstr ""
7847 "int\n"
7848 "main(int argc, char **argv)\n"
7849 "{\n"
7850 "    pthread_t thread;\n"
7851 "    int rc;\n"
7852 "    char thread_name[NAMELEN];\n"
7853
7854 #. type: Plain text
7855 #: build/C/man3/pthread_setname_np.3:172
7856 #, no-wrap
7857 msgid ""
7858 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7859 "    if (rc != 0)\n"
7860 "        errExitEN(rc, \"pthread_create\");\n"
7861 msgstr ""
7862 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7863 "    if (rc != 0)\n"
7864 "        errExitEN(rc, \"pthread_create\");\n"
7865
7866 #. type: Plain text
7867 #: build/C/man3/pthread_setname_np.3:176
7868 #, no-wrap
7869 msgid ""
7870 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7871 "    if (rc != 0)\n"
7872 "        errExitEN(rc, \"pthread_getname_np\");\n"
7873 msgstr ""
7874 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7875 "    if (rc != 0)\n"
7876 "        errExitEN(rc, \"pthread_getname_np\");\n"
7877
7878 #. type: Plain text
7879 #: build/C/man3/pthread_setname_np.3:181
7880 #, no-wrap
7881 msgid ""
7882 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7883 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7884 "    if (rc != 0)\n"
7885 "        errExitEN(rc, \"pthread_setname_np\");\n"
7886 msgstr ""
7887 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7888 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7889 "    if (rc != 0)\n"
7890 "        errExitEN(rc, \"pthread_setname_np\");\n"
7891
7892 #. type: Plain text
7893 #: build/C/man3/pthread_setname_np.3:183
7894 #, no-wrap
7895 msgid "    sleep(2);\n"
7896 msgstr "    sleep(2);\n"
7897
7898 #. type: Plain text
7899 #: build/C/man3/pthread_setname_np.3:189
7900 #, no-wrap
7901 msgid ""
7902 "    rc = pthread_getname_np(thread, thread_name,\n"
7903 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
7904 "    if (rc != 0)\n"
7905 "        errExitEN(rc, \"pthread_getname_np\");\n"
7906 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
7907 msgstr ""
7908 "    rc = pthread_getname_np(thread, thread_name,\n"
7909 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
7910 "    if (rc != 0)\n"
7911 "        errExitEN(rc, \"pthread_getname_np\");\n"
7912 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
7913
7914 #. type: Plain text
7915 #: build/C/man3/pthread_setname_np.3:193
7916 #, no-wrap
7917 msgid ""
7918 "    rc = pthread_join(thread, NULL);\n"
7919 "    if (rc != 0)\n"
7920 "        errExitEN(rc, \"pthread_join\");\n"
7921 msgstr ""
7922 "    rc = pthread_join(thread, NULL);\n"
7923 "    if (rc != 0)\n"
7924 "        errExitEN(rc, \"pthread_join\");\n"
7925
7926 #. type: Plain text
7927 #: build/C/man3/pthread_setname_np.3:197
7928 #, no-wrap
7929 msgid ""
7930 "    printf(\"Done\\en\");\n"
7931 "    exit(EXIT_SUCCESS);\n"
7932 "}\n"
7933 msgstr ""
7934 "    printf(\"Done\\en\");\n"
7935 "    exit(EXIT_SUCCESS);\n"
7936 "}\n"
7937
7938 #. type: Plain text
7939 #: build/C/man3/pthread_setname_np.3:204
7940 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
7941 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
7942
7943 #. type: TH
7944 #: build/C/man3/pthread_setschedparam.3:26
7945 #, no-wrap
7946 msgid "PTHREAD_SETSCHEDPARAM"
7947 msgstr "PTHREAD_SETSCHEDPARAM"
7948
7949 #. type: Plain text
7950 #: build/C/man3/pthread_setschedparam.3:30
7951 msgid ""
7952 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
7953 "parameters of a thread"
7954 msgstr ""
7955 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
7956 "スケジューリングポリシーとパラメータを設定/取得する"
7957
7958 #. type: Plain text
7959 #: build/C/man3/pthread_setschedparam.3:38
7960 #, no-wrap
7961 msgid ""
7962 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
7963 "B<                      const struct sched_param *>I<param>B<);>\n"
7964 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
7965 "B<                      struct sched_param *>I<param>B<);>\n"
7966 msgstr ""
7967 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
7968 "B<                      const struct sched_param *>I<param>B<);>\n"
7969 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
7970 "B<                      struct sched_param *>I<param>B<);>\n"
7971
7972 #. type: Plain text
7973 #: build/C/man3/pthread_setschedparam.3:46
7974 msgid ""
7975 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
7976 "parameters of the thread I<thread>."
7977 msgstr ""
7978 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
7979 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
7980
7981 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
7982 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
7983 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
7984 #. type: Plain text
7985 #: build/C/man3/pthread_setschedparam.3:57
7986 msgid ""
7987 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
7988 "values for I<policy>, and their semantics, are described in "
7989 "B<sched_setscheduler>(2)."
7990 msgstr ""
7991 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
7992 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
7993 "説明されている。"
7994
7995 #. type: Plain text
7996 #: build/C/man3/pthread_setschedparam.3:63
7997 msgid ""
7998 "The structure pointed to by I<param> specifies the new scheduling parameters "
7999 "for I<thread>.  Scheduling parameters are maintained in the following "
8000 "structure:"
8001 msgstr ""
8002 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8003 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8004
8005 #.  FIXME . nptl/pthread_setschedparam.c has the following
8006 #.    /* If the thread should have higher priority because of some
8007 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8008 #.  Eventually (perhaps after writing the mutexattr pages), we
8009 #.  may want to add something on the topic to this page.
8010 #. type: Plain text
8011 #: build/C/man3/pthread_setschedparam.3:104
8012 msgid ""
8013 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8014 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8015 "and I<param>, respectively.  The returned priority value is that set by the "
8016 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8017 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8018 "does not reflect any temporary priority adjustments as a result of calls to "
8019 "any priority inheritance or priority ceiling functions (see, for example, "
8020 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8021 "(3))."
8022 msgstr ""
8023 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8024 "スケジューリングポリシーとパラメータを、\n"
8025 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8026 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8027 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8028 "B<pthread_create> で設定された値となる。\n"
8029 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8030 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8031 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8032 "行われる一時的な優先度の調整の影響を受けない。"
8033
8034 #. type: Plain text
8035 #: build/C/man3/pthread_setschedparam.3:112
8036 msgid ""
8037 "On success, these functions return 0; on error, they return a nonzero error "
8038 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8039 "parameters of I<thread> are not changed."
8040 msgstr ""
8041 "成功すると、これらの関数は 0 を返す。\n"
8042 "エラーの場合、0 以外のエラー番号を返す。\n"
8043 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8044 "スケジューリングポリシーとパラメータは変更されない。"
8045
8046 #. type: Plain text
8047 #: build/C/man3/pthread_setschedparam.3:114
8048 msgid "Both of these functions can fail with the following error:"
8049 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8050
8051 #. type: Plain text
8052 #: build/C/man3/pthread_setschedparam.3:122
8053 msgid ""
8054 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8055 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8056
8057 #. type: Plain text
8058 #: build/C/man3/pthread_setschedparam.3:129
8059 msgid ""
8060 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8061 "the I<policy>."
8062 msgstr ""
8063 "I<policy> が認識できないポリシーであるか、\n"
8064 "I<param> が I<policy> では意味を持たない値である。"
8065
8066 #. type: Plain text
8067 #: build/C/man3/pthread_setschedparam.3:133
8068 msgid ""
8069 "The caller does not have appropriate privileges to set the specified "
8070 "scheduling policy and parameters."
8071 msgstr ""
8072 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8073 "のに必要な特権を持たない。"
8074
8075 #.  .SH VERSIONS
8076 #.  Available since glibc 2.0
8077 #. type: Plain text
8078 #: build/C/man3/pthread_setschedparam.3:141
8079 msgid ""
8080 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8081 "policy or scheduling parameters to an unsupported value\") error for "
8082 "B<pthread_setschedparam>()."
8083 msgstr ""
8084 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8085 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8086 "パラメータに設定しようとした\") も追加で規定されている。"
8087
8088 #. type: Plain text
8089 #: build/C/man3/pthread_setschedparam.3:149
8090 msgid ""
8091 "For a description of the permissions required to, and the effect of, "
8092 "changing a thread's scheduling policy and priority, and details of the "
8093 "permitted ranges for priorities in each scheduling policy, see "
8094 "B<sched_setscheduler>(2)."
8095 msgstr ""
8096 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8097 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8098 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8099
8100 #. type: Plain text
8101 #: build/C/man3/pthread_setschedparam.3:156
8102 msgid ""
8103 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8104 "B<pthread_getschedparam>(), as well as the use of a number of other "
8105 "scheduling-related pthreads functions."
8106 msgstr ""
8107 "以下のプログラムは B<pthread_setschedparam>() と\n"
8108 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8109 "他のいろいろな関数の使用例を示すものである。"
8110
8111 #. type: Plain text
8112 #: build/C/man3/pthread_setschedparam.3:172
8113 msgid ""
8114 "In the following run, the main thread sets its scheduling policy to "
8115 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8116 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8117 "priority attribute of 20.  The program then sets (using "
8118 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8119 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8120 "created using this attributes object should take their scheduling attributes "
8121 "from the thread attributes object.  The program then creates a thread using "
8122 "the thread attributes object, and that thread displays its scheduling policy "
8123 "and priority."
8124 msgstr ""
8125 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8126 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8127 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8128 "属性 20 で初期化する。\n"
8129 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8130 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8131 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8132 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8133 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8134 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8135 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8136
8137 #. type: Plain text
8138 #: build/C/man3/pthread_setschedparam.3:180
8139 #, no-wrap
8140 msgid ""
8141 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8142 "Password:\n"
8143 "# B<./a.out -mf10 -ar20 -i e>\n"
8144 "Scheduler settings of main thread\n"
8145 "    policy=SCHED_FIFO, priority=10\n"
8146 msgstr ""
8147 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8148 "Password:\n"
8149 "# B<./a.out -mf10 -ar20 -i e>\n"
8150 "Scheduler settings of main thread\n"
8151 "    policy=SCHED_FIFO, priority=10\n"
8152
8153 #. type: Plain text
8154 #: build/C/man3/pthread_setschedparam.3:184
8155 #, no-wrap
8156 msgid ""
8157 "Scheduler settings in \\(aqattr\\(aq\n"
8158 "    policy=SCHED_RR, priority=20\n"
8159 "    inheritsched is EXPLICIT\n"
8160 msgstr ""
8161 "Scheduler settings in \\(aqattr\\(aq\n"
8162 "    policy=SCHED_RR, priority=20\n"
8163 "    inheritsched is EXPLICIT\n"
8164
8165 #. type: Plain text
8166 #: build/C/man3/pthread_setschedparam.3:187
8167 #, no-wrap
8168 msgid ""
8169 "Scheduler attributes of new thread\n"
8170 "    policy=SCHED_RR, priority=20\n"
8171 msgstr ""
8172 "Scheduler attributes of new thread\n"
8173 "    policy=SCHED_RR, priority=20\n"
8174
8175 #. type: Plain text
8176 #: build/C/man3/pthread_setschedparam.3:192
8177 msgid ""
8178 "In the above output, one can see that the scheduling policy and priority "
8179 "were taken from the values specified in the thread attributes object."
8180 msgstr ""
8181 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8182 "オブジェクトで指定された値から取られていることが分かる。"
8183
8184 #. type: Plain text
8185 #: build/C/man3/pthread_setschedparam.3:199
8186 msgid ""
8187 "The next run is the same as the previous, except that the inherit scheduler "
8188 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8189 "using the thread attributes object should ignore the scheduling attributes "
8190 "specified in the attributes object and instead take their scheduling "
8191 "attributes from the creating thread."
8192 msgstr ""
8193 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8194 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8195 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8196 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8197 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8198 "ことを意味する。"
8199
8200 #. type: Plain text
8201 #: build/C/man3/pthread_setschedparam.3:205
8202 #, no-wrap
8203 msgid ""
8204 "# B<./a.out -mf10 -ar20 -i i>\n"
8205 "Scheduler settings of main thread\n"
8206 "    policy=SCHED_FIFO, priority=10\n"
8207 msgstr ""
8208 "# B<./a.out -mf10 -ar20 -i i>\n"
8209 "Scheduler settings of main thread\n"
8210 "    policy=SCHED_FIFO, priority=10\n"
8211
8212 #. type: Plain text
8213 #: build/C/man3/pthread_setschedparam.3:209
8214 #, no-wrap
8215 msgid ""
8216 "Scheduler settings in \\(aqattr\\(aq\n"
8217 "    policy=SCHED_RR, priority=20\n"
8218 "    inheritsched is INHERIT\n"
8219 msgstr ""
8220 "Scheduler settings in \\(aqattr\\(aq\n"
8221 "    policy=SCHED_RR, priority=20\n"
8222 "    inheritsched is INHERIT\n"
8223
8224 #. type: Plain text
8225 #: build/C/man3/pthread_setschedparam.3:212
8226 #, no-wrap
8227 msgid ""
8228 "Scheduler attributes of new thread\n"
8229 "    policy=SCHED_FIFO, priority=10\n"
8230 msgstr ""
8231 "Scheduler attributes of new thread\n"
8232 "    policy=SCHED_FIFO, priority=10\n"
8233
8234 #. type: Plain text
8235 #: build/C/man3/pthread_setschedparam.3:218
8236 msgid ""
8237 "In the above output, one can see that the scheduling policy and priority "
8238 "were taken from the creating thread, rather than the thread attributes "
8239 "object."
8240 msgstr ""
8241 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8242 "スレッド属性オブジェクトからではなく、\n"
8243 "スレッドを作成したスレッドから取れれていることが分かる。"
8244
8245 #. type: Plain text
8246 #: build/C/man3/pthread_setschedparam.3:224
8247 msgid ""
8248 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8249 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8250 "scheduler attribute."
8251 msgstr ""
8252 "なお、 I<-i\\ i> を省略した場合でも、\n"
8253 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8254 "出力は同じになる。"
8255
8256 #. type: Plain text
8257 #: build/C/man3/pthread_setschedparam.3:228
8258 #, no-wrap
8259 msgid "/* pthreads_sched_test.c */\n"
8260 msgstr "/* pthreads_sched_test.c */\n"
8261
8262 #. type: Plain text
8263 #: build/C/man3/pthread_setschedparam.3:234
8264 #, no-wrap
8265 msgid ""
8266 "#include E<lt>pthread.hE<gt>\n"
8267 "#include E<lt>stdio.hE<gt>\n"
8268 "#include E<lt>stdlib.hE<gt>\n"
8269 "#include E<lt>unistd.hE<gt>\n"
8270 "#include E<lt>errno.hE<gt>\n"
8271 msgstr ""
8272 "#include E<lt>pthread.hE<gt>\n"
8273 "#include E<lt>stdio.hE<gt>\n"
8274 "#include E<lt>stdlib.hE<gt>\n"
8275 "#include E<lt>unistd.hE<gt>\n"
8276 "#include E<lt>errno.hE<gt>\n"
8277
8278 #. type: Plain text
8279 #: build/C/man3/pthread_setschedparam.3:243
8280 #, no-wrap
8281 msgid ""
8282 "static void\n"
8283 "usage(char *prog_name, char *msg)\n"
8284 "{\n"
8285 "    if (msg != NULL)\n"
8286 "        fputs(msg, stderr);\n"
8287 msgstr ""
8288 "static void\n"
8289 "usage(char *prog_name, char *msg)\n"
8290 "{\n"
8291 "    if (msg != NULL)\n"
8292 "        fputs(msg, stderr);\n"
8293
8294 #. type: Plain text
8295 #: build/C/man3/pthread_setschedparam.3:260
8296 #, no-wrap
8297 msgid ""
8298 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8299 "    fprintf(stderr, \"Options are:\\en\");\n"
8300 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8301 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8302 "    fpe(\"                 thread attributes object\\en\");\n"
8303 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8304 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8305 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8306 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8307 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8308 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8309 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8310 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8311 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8312 "    exit(EXIT_FAILURE);\n"
8313 "}\n"
8314 msgstr ""
8315 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8316 "    fprintf(stderr, \"Options are:\\en\");\n"
8317 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8318 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8319 "    fpe(\"                 thread attributes object\\en\");\n"
8320 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8321 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8322 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8323 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8324 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8325 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8326 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8327 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8328 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8329 "    exit(EXIT_FAILURE);\n"
8330 "}\n"
8331
8332 #. type: Plain text
8333 #: build/C/man3/pthread_setschedparam.3:271
8334 #, no-wrap
8335 msgid ""
8336 "static int\n"
8337 "get_policy(char p, int *policy)\n"
8338 "{\n"
8339 "    switch (p) {\n"
8340 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8341 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8342 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8343 "    default:  return 0;\n"
8344 "    }\n"
8345 "}\n"
8346 msgstr ""
8347 "static int\n"
8348 "get_policy(char p, int *policy)\n"
8349 "{\n"
8350 "    switch (p) {\n"
8351 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8352 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8353 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8354 "    default:  return 0;\n"
8355 "    }\n"
8356 "}\n"
8357
8358 #. type: Plain text
8359 #: build/C/man3/pthread_setschedparam.3:282
8360 #, no-wrap
8361 msgid ""
8362 "static void\n"
8363 "display_sched_attr(int policy, struct sched_param *param)\n"
8364 "{\n"
8365 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8366 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8367 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8368 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8369 "            \"???\",\n"
8370 "            param-E<gt>sched_priority);\n"
8371 "}\n"
8372 msgstr ""
8373 "static void\n"
8374 "display_sched_attr(int policy, struct sched_param *param)\n"
8375 "{\n"
8376 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8377 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8378 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8379 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8380 "            \"???\",\n"
8381 "            param-E<gt>sched_priority);\n"
8382 "}\n"
8383
8384 #. type: Plain text
8385 #: build/C/man3/pthread_setschedparam.3:288
8386 #, no-wrap
8387 msgid ""
8388 "static void\n"
8389 "display_thread_sched_attr(char *msg)\n"
8390 "{\n"
8391 "    int policy, s;\n"
8392 "    struct sched_param param;\n"
8393 msgstr ""
8394 "static void\n"
8395 "display_thread_sched_attr(char *msg)\n"
8396 "{\n"
8397 "    int policy, s;\n"
8398 "    struct sched_param param;\n"
8399
8400 #. type: Plain text
8401 #: build/C/man3/pthread_setschedparam.3:292
8402 #, no-wrap
8403 msgid ""
8404 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8405 "    if (s != 0)\n"
8406 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8407 msgstr ""
8408 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8409 "    if (s != 0)\n"
8410 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8411
8412 #. type: Plain text
8413 #: build/C/man3/pthread_setschedparam.3:296
8414 #, no-wrap
8415 msgid ""
8416 "    printf(\"%s\\en\", msg);\n"
8417 "    display_sched_attr(policy, &param);\n"
8418 "}\n"
8419 msgstr ""
8420 "    printf(\"%s\\en\", msg);\n"
8421 "    display_sched_attr(policy, &param);\n"
8422 "}\n"
8423
8424 #. type: Plain text
8425 #: build/C/man3/pthread_setschedparam.3:301
8426 #, no-wrap
8427 msgid ""
8428 "static void *\n"
8429 "thread_start(void *arg)\n"
8430 "{\n"
8431 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8432 msgstr ""
8433 "static void *\n"
8434 "thread_start(void *arg)\n"
8435 "{\n"
8436 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8437
8438 #. type: Plain text
8439 #: build/C/man3/pthread_setschedparam.3:304
8440 #, no-wrap
8441 msgid ""
8442 "    return NULL;\n"
8443 "}\n"
8444 msgstr ""
8445 "    return NULL;\n"
8446 "}\n"
8447
8448 #. type: Plain text
8449 #: build/C/man3/pthread_setschedparam.3:314
8450 #, no-wrap
8451 msgid ""
8452 "int\n"
8453 "main(int argc, char *argv[])\n"
8454 "{\n"
8455 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8456 "    pthread_t thread;\n"
8457 "    pthread_attr_t attr;\n"
8458 "    pthread_attr_t *attrp;\n"
8459 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8460 "    struct sched_param param;\n"
8461 msgstr ""
8462 "int\n"
8463 "main(int argc, char *argv[])\n"
8464 "{\n"
8465 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8466 "    pthread_t thread;\n"
8467 "    pthread_attr_t attr;\n"
8468 "    pthread_attr_t *attrp;\n"
8469 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8470 "    struct sched_param param;\n"
8471
8472 #. type: Plain text
8473 #: build/C/man3/pthread_setschedparam.3:316
8474 #, no-wrap
8475 msgid "    /* Process command-line options */\n"
8476 msgstr "    /* Process command-line options */\n"
8477
8478 #. type: Plain text
8479 #: build/C/man3/pthread_setschedparam.3:321
8480 #, no-wrap
8481 msgid ""
8482 "    use_null_attrib = 0;\n"
8483 "    attr_sched_str = NULL;\n"
8484 "    main_sched_str = NULL;\n"
8485 "    inheritsched_str = NULL;\n"
8486 msgstr ""
8487 "    use_null_attrib = 0;\n"
8488 "    attr_sched_str = NULL;\n"
8489 "    main_sched_str = NULL;\n"
8490 "    inheritsched_str = NULL;\n"
8491
8492 #. type: Plain text
8493 #: build/C/man3/pthread_setschedparam.3:331
8494 #, no-wrap
8495 msgid ""
8496 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8497 "        switch (opt) {\n"
8498 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8499 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8500 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8501 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8502 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8503 "        }\n"
8504 "    }\n"
8505 msgstr ""
8506 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8507 "        switch (opt) {\n"
8508 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8509 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8510 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8511 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8512 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8513 "        }\n"
8514 "    }\n"
8515
8516 #. type: Plain text
8517 #: build/C/man3/pthread_setschedparam.3:335
8518 #, no-wrap
8519 msgid ""
8520 "    if (use_null_attrib &&\n"
8521 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8522 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8523 msgstr ""
8524 "    if (use_null_attrib &&\n"
8525 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8526 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8527
8528 #. type: Plain text
8529 #: build/C/man3/pthread_setschedparam.3:338
8530 #, no-wrap
8531 msgid ""
8532 "    /* Optionally set scheduling attributes of main thread,\n"
8533 "       and display the attributes */\n"
8534 msgstr ""
8535 "    /* Optionally set scheduling attributes of main thread,\n"
8536 "       and display the attributes */\n"
8537
8538 #. type: Plain text
8539 #: build/C/man3/pthread_setschedparam.3:343
8540 #, no-wrap
8541 msgid ""
8542 "    if (main_sched_str != NULL) {\n"
8543 "        if (!get_policy(main_sched_str[0], &policy))\n"
8544 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8545 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8546 msgstr ""
8547 "    if (main_sched_str != NULL) {\n"
8548 "        if (!get_policy(main_sched_str[0], &policy))\n"
8549 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8550 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8551
8552 #. type: Plain text
8553 #: build/C/man3/pthread_setschedparam.3:348
8554 #, no-wrap
8555 msgid ""
8556 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8557 "        if (s != 0)\n"
8558 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8559 "    }\n"
8560 msgstr ""
8561 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8562 "        if (s != 0)\n"
8563 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8564 "    }\n"
8565
8566 #. type: Plain text
8567 #: build/C/man3/pthread_setschedparam.3:351
8568 #, no-wrap
8569 msgid ""
8570 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8571 "    printf(\"\\en\");\n"
8572 msgstr ""
8573 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8574 "    printf(\"\\en\");\n"
8575
8576 #. type: Plain text
8577 #: build/C/man3/pthread_setschedparam.3:353
8578 #, no-wrap
8579 msgid "    /* Initialize thread attributes object according to options */\n"
8580 msgstr "    /* Initialize thread attributes object according to options */\n"
8581
8582 #. type: Plain text
8583 #: build/C/man3/pthread_setschedparam.3:362
8584 #, no-wrap
8585 msgid ""
8586 "    if (!use_null_attrib) {\n"
8587 "        s = pthread_attr_init(&attr);\n"
8588 "        if (s != 0)\n"
8589 "            handle_error_en(s, \"pthread_attr_init\");\n"
8590 "        attrp = &attr;\n"
8591 "    }\n"
8592 msgstr ""
8593 "    if (!use_null_attrib) {\n"
8594 "        s = pthread_attr_init(&attr);\n"
8595 "        if (s != 0)\n"
8596 "            handle_error_en(s, \"pthread_attr_init\");\n"
8597 "        attrp = &attr;\n"
8598 "    }\n"
8599
8600 #. type: Plain text
8601 #: build/C/man3/pthread_setschedparam.3:370
8602 #, no-wrap
8603 msgid ""
8604 "    if (inheritsched_str != NULL) {\n"
8605 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8606 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8607 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8608 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8609 "        else\n"
8610 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8611 msgstr ""
8612 "    if (inheritsched_str != NULL) {\n"
8613 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8614 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8615 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8616 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8617 "        else\n"
8618 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8619
8620 #. type: Plain text
8621 #: build/C/man3/pthread_setschedparam.3:375
8622 #, no-wrap
8623 msgid ""
8624 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8625 "        if (s != 0)\n"
8626 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8627 "    }\n"
8628 msgstr ""
8629 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8630 "        if (s != 0)\n"
8631 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8632 "    }\n"
8633
8634 #. type: Plain text
8635 #: build/C/man3/pthread_setschedparam.3:381
8636 #, no-wrap
8637 msgid ""
8638 "    if (attr_sched_str != NULL) {\n"
8639 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8640 "            usage(argv[0],\n"
8641 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8642 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8643 msgstr ""
8644 "    if (attr_sched_str != NULL) {\n"
8645 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8646 "            usage(argv[0],\n"
8647 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8648 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8649
8650 #. type: Plain text
8651 #: build/C/man3/pthread_setschedparam.3:389
8652 #, no-wrap
8653 msgid ""
8654 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8655 "        if (s != 0)\n"
8656 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8657 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8658 "        if (s != 0)\n"
8659 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8660 "    }\n"
8661 msgstr ""
8662 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8663 "        if (s != 0)\n"
8664 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8665 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8666 "        if (s != 0)\n"
8667 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8668 "    }\n"
8669
8670 #. type: Plain text
8671 #: build/C/man3/pthread_setschedparam.3:392
8672 #, no-wrap
8673 msgid ""
8674 "    /* If we initialized a thread attributes object, display\n"
8675 "       the scheduling attributes that were set in the object */\n"
8676 msgstr ""
8677 "    /* If we initialized a thread attributes object, display\n"
8678 "       the scheduling attributes that were set in the object */\n"
8679
8680 #. type: Plain text
8681 #: build/C/man3/pthread_setschedparam.3:400
8682 #, no-wrap
8683 msgid ""
8684 "    if (attrp != NULL) {\n"
8685 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8686 "        if (s != 0)\n"
8687 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8688 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8689 "        if (s != 0)\n"
8690 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8691 msgstr ""
8692 "    if (attrp != NULL) {\n"
8693 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8694 "        if (s != 0)\n"
8695 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8696 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8697 "        if (s != 0)\n"
8698 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8699
8700 #. type: Plain text
8701 #: build/C/man3/pthread_setschedparam.3:403
8702 #, no-wrap
8703 msgid ""
8704 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8705 "        display_sched_attr(policy, &param);\n"
8706 msgstr ""
8707 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8708 "        display_sched_attr(policy, &param);\n"
8709
8710 #. type: Plain text
8711 #: build/C/man3/pthread_setschedparam.3:411
8712 #, no-wrap
8713 msgid ""
8714 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8715 "        printf(\"    inheritsched is %s\\en\",\n"
8716 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8717 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8718 "                \"???\");\n"
8719 "        printf(\"\\en\");\n"
8720 "    }\n"
8721 msgstr ""
8722 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8723 "        printf(\"    inheritsched is %s\\en\",\n"
8724 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8725 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8726 "                \"???\");\n"
8727 "        printf(\"\\en\");\n"
8728 "    }\n"
8729
8730 #. type: Plain text
8731 #: build/C/man3/pthread_setschedparam.3:413
8732 #, no-wrap
8733 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8734 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8735
8736 #. type: Plain text
8737 #: build/C/man3/pthread_setschedparam.3:417
8738 #, no-wrap
8739 msgid ""
8740 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8741 "    if (s != 0)\n"
8742 "        handle_error_en(s, \"pthread_create\");\n"
8743 msgstr ""
8744 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8745 "    if (s != 0)\n"
8746 "        handle_error_en(s, \"pthread_create\");\n"
8747
8748 #. type: Plain text
8749 #: build/C/man3/pthread_setschedparam.3:419
8750 #, no-wrap
8751 msgid "    /* Destroy unneeded thread attributes object */\n"
8752 msgstr "    /* Destroy unneeded thread attributes object */\n"
8753
8754 #. type: Plain text
8755 #: build/C/man3/pthread_setschedparam.3:427
8756 #, no-wrap
8757 msgid ""
8758 "    s = pthread_join(thread, NULL);\n"
8759 "    if (s != 0)\n"
8760 "        handle_error_en(s, \"pthread_join\");\n"
8761 msgstr ""
8762 "    s = pthread_join(thread, NULL);\n"
8763 "    if (s != 0)\n"
8764 "        handle_error_en(s, \"pthread_join\");\n"
8765
8766 #. type: Plain text
8767 #: build/C/man3/pthread_setschedparam.3:445
8768 msgid ""
8769 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8770 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8771 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8772 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8773 "B<pthreads>(7)"
8774 msgstr ""
8775 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8776 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8777 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8778 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8779 "B<pthreads>(7)"
8780
8781 #. type: TH
8782 #: build/C/man3/pthread_setschedprio.3:26
8783 #, no-wrap
8784 msgid "PTHREAD_SETSCHEDPRIO"
8785 msgstr "PTHREAD_SETSCHEDPRIO"
8786
8787 #. type: TH
8788 #: build/C/man3/pthread_setschedprio.3:26
8789 #, no-wrap
8790 msgid "2008-11-06"
8791 msgstr "2008-11-06"
8792
8793 #. type: Plain text
8794 #: build/C/man3/pthread_setschedprio.3:29
8795 msgid "pthread_setschedprio - set scheduling priority of a thread"
8796 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8797
8798 #. type: Plain text
8799 #: build/C/man3/pthread_setschedprio.3:34
8800 #, no-wrap
8801 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8802 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8803
8804 #.  FIXME . nptl/pthread_setschedprio.c has the following
8805 #.    /* If the thread should have higher priority because of some
8806 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8807 #.  Eventually (perhaps after writing the mutexattr pages), we
8808 #.  may want to add something on the topic to this page.
8809 #.  nptl/pthread_setschedparam.c has a similar case.
8810 #. type: Plain text
8811 #: build/C/man3/pthread_setschedprio.3:53
8812 msgid ""
8813 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8814 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8815 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8816 "of a thread.)"
8817 msgstr ""
8818 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8819 "優先度に I<prio> で指定された値を設定する\n"
8820 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8821 "と優先度の両方を変更する)。"
8822
8823 #. type: Plain text
8824 #: build/C/man3/pthread_setschedprio.3:61
8825 msgid ""
8826 "On success, this function returns 0; on error, it returns a nonzero error "
8827 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8828 "I<thread> is not changed."
8829 msgstr ""
8830 "成功すると、この関数は 0 を返す。\n"
8831 "エラーの場合、0 以外のエラー番号を返す。\n"
8832 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8833 "スケジューリング優先度は変更されない。"
8834
8835 #. type: Plain text
8836 #: build/C/man3/pthread_setschedprio.3:66
8837 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8838 msgstr ""
8839 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8840
8841 #. type: Plain text
8842 #: build/C/man3/pthread_setschedprio.3:70
8843 msgid ""
8844 "The caller does not have appropriate privileges to set the specified "
8845 "priority."
8846 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8847
8848 #. type: Plain text
8849 #: build/C/man3/pthread_setschedprio.3:81
8850 msgid ""
8851 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8852 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
8853 msgstr ""
8854 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
8855 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
8856 "に設定しようとした\") も追加で規定されている。"
8857
8858 #. type: Plain text
8859 #: build/C/man3/pthread_setschedprio.3:83
8860 msgid "This function is available in glibc since version 2.3.4."
8861 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
8862
8863 #. type: Plain text
8864 #: build/C/man3/pthread_setschedprio.3:91
8865 msgid ""
8866 "For a description of the permissions required to, and the effect of, "
8867 "changing a thread's scheduling priority, and details of the permitted ranges "
8868 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
8869 msgstr ""
8870 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
8871 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8872 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8873
8874 #. type: Plain text
8875 #: build/C/man3/pthread_setschedprio.3:105
8876 msgid ""
8877 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8878 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8879 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8880 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8881 "B<pthreads>(7)"
8882 msgstr ""
8883 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8884 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8885 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8886 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8887 "B<pthreads>(7)"
8888
8889 #. type: TH
8890 #: build/C/man3/pthread_sigmask.3:26
8891 #, no-wrap
8892 msgid "PTHREAD_SIGMASK"
8893 msgstr "PTHREAD_SIGMASK"
8894
8895 #. type: Plain text
8896 #: build/C/man3/pthread_sigmask.3:29
8897 msgid "pthread_sigmask - examine and change mask of blocked signals"
8898 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
8899
8900 #. type: Plain text
8901 #: build/C/man3/pthread_sigmask.3:35
8902 #, no-wrap
8903 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
8904 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
8905
8906 #. type: Plain text
8907 #: build/C/man3/pthread_sigmask.3:46
8908 msgid ""
8909 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
8910 "difference that its use in multithreaded programs is explicitly specified by "
8911 "POSIX.1-2001.  Other differences are noted in this page."
8912 msgstr ""
8913 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
8914 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
8915 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
8916
8917 #. type: Plain text
8918 #: build/C/man3/pthread_sigmask.3:49
8919 msgid ""
8920 "For a description of the arguments and operation of this function, see "
8921 "B<sigprocmask>(2)."
8922 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
8923
8924 #. type: Plain text
8925 #: build/C/man3/pthread_sigmask.3:54
8926 msgid ""
8927 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
8928 "number."
8929 msgstr ""
8930 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
8931 "エラーの場合、エラー番号を返す。"
8932
8933 #. type: Plain text
8934 #: build/C/man3/pthread_sigmask.3:57
8935 msgid "See B<sigprocmask>(2)."
8936 msgstr "B<sigprocmask>(2) を参照。"
8937
8938 #. type: Plain text
8939 #: build/C/man3/pthread_sigmask.3:61
8940 msgid "A new thread inherits a copy of its creator's signal mask."
8941 msgstr ""
8942 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
8943 "継承する。"
8944
8945 #. type: Plain text
8946 #: build/C/man3/pthread_sigmask.3:66
8947 msgid ""
8948 "The program below blocks some signals in the main thread, and then creates a "
8949 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
8950 "shell session demonstrates its use:"
8951 msgstr ""
8952 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
8953 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
8954 "専用のスレッドを作成する。\n"
8955 "下記のシェルのセッションはその利用例を示したものである。"
8956
8957 #. type: Plain text
8958 #: build/C/man3/pthread_sigmask.3:77
8959 #, no-wrap
8960 msgid ""
8961 "$B< ./a.out &>\n"
8962 "[1] 5423\n"
8963 "$B< kill -QUIT %1>\n"
8964 "Signal handling thread got signal 3\n"
8965 "$B< kill -USR1 %1>\n"
8966 "Signal handling thread got signal 10\n"
8967 "$B< kill -TERM %1>\n"
8968 "[1]+  Terminated              ./a.out\n"
8969 msgstr ""
8970 "$B< ./a.out &>\n"
8971 "[1] 5423\n"
8972 "$B< kill -QUIT %1>\n"
8973 "Signal handling thread got signal 3\n"
8974 "$B< kill -USR1 %1>\n"
8975 "Signal handling thread got signal 10\n"
8976 "$B< kill -TERM %1>\n"
8977 "[1]+  Terminated              ./a.out\n"
8978
8979 #. type: Plain text
8980 #: build/C/man3/pthread_sigmask.3:88
8981 #, no-wrap
8982 msgid ""
8983 "#include E<lt>pthread.hE<gt>\n"
8984 "#include E<lt>stdio.hE<gt>\n"
8985 "#include E<lt>stdlib.hE<gt>\n"
8986 "#include E<lt>unistd.hE<gt>\n"
8987 "#include E<lt>signal.hE<gt>\n"
8988 "#include E<lt>errno.hE<gt>\n"
8989 msgstr ""
8990 "#include E<lt>pthread.hE<gt>\n"
8991 "#include E<lt>stdio.hE<gt>\n"
8992 "#include E<lt>stdlib.hE<gt>\n"
8993 "#include E<lt>unistd.hE<gt>\n"
8994 "#include E<lt>signal.hE<gt>\n"
8995 "#include E<lt>errno.hE<gt>\n"
8996
8997 #. type: Plain text
8998 #: build/C/man3/pthread_sigmask.3:90
8999 #, no-wrap
9000 msgid "/* Simple error handling functions */\n"
9001 msgstr "/* Simple error handling functions */\n"
9002
9003 #. type: Plain text
9004 #: build/C/man3/pthread_sigmask.3:99
9005 #, no-wrap
9006 msgid ""
9007 "static void *\n"
9008 "sig_thread(void *arg)\n"
9009 "{\n"
9010 "    sigset_t *set = arg;\n"
9011 "    int s, sig;\n"
9012 msgstr ""
9013 "static void *\n"
9014 "sig_thread(void *arg)\n"
9015 "{\n"
9016 "    sigset_t *set = arg;\n"
9017 "    int s, sig;\n"
9018
9019 #. type: Plain text
9020 #: build/C/man3/pthread_sigmask.3:107
9021 #, no-wrap
9022 msgid ""
9023 "    for (;;) {\n"
9024 "        s = sigwait(set, &sig);\n"
9025 "        if (s != 0)\n"
9026 "            handle_error_en(s, \"sigwait\");\n"
9027 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9028 "    }\n"
9029 "}\n"
9030 msgstr ""
9031 "    for (;;) {\n"
9032 "        s = sigwait(set, &sig);\n"
9033 "        if (s != 0)\n"
9034 "            handle_error_en(s, \"sigwait\");\n"
9035 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9036 "    }\n"
9037 "}\n"
9038
9039 #. type: Plain text
9040 #: build/C/man3/pthread_sigmask.3:114
9041 #, no-wrap
9042 msgid ""
9043 "int\n"
9044 "main(int argc, char *argv[])\n"
9045 "{\n"
9046 "    pthread_t thread;\n"
9047 "    sigset_t set;\n"
9048 "    int s;\n"
9049 msgstr ""
9050 "int\n"
9051 "main(int argc, char *argv[])\n"
9052 "{\n"
9053 "    pthread_t thread;\n"
9054 "    sigset_t set;\n"
9055 "    int s;\n"
9056
9057 #. type: Plain text
9058 #: build/C/man3/pthread_sigmask.3:117
9059 #, no-wrap
9060 msgid ""
9061 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9062 "       will inherit a copy of the signal mask. */\n"
9063 msgstr ""
9064 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9065 "       will inherit a copy of the signal mask. */\n"
9066
9067 #. type: Plain text
9068 #: build/C/man3/pthread_sigmask.3:124
9069 #, no-wrap
9070 msgid ""
9071 "    sigemptyset(&set);\n"
9072 "    sigaddset(&set, SIGQUIT);\n"
9073 "    sigaddset(&set, SIGUSR1);\n"
9074 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9075 "    if (s != 0)\n"
9076 "        handle_error_en(s, \"pthread_sigmask\");\n"
9077 msgstr ""
9078 "    sigemptyset(&set);\n"
9079 "    sigaddset(&set, SIGQUIT);\n"
9080 "    sigaddset(&set, SIGUSR1);\n"
9081 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9082 "    if (s != 0)\n"
9083 "        handle_error_en(s, \"pthread_sigmask\");\n"
9084
9085 #. type: Plain text
9086 #: build/C/man3/pthread_sigmask.3:128
9087 #, no-wrap
9088 msgid ""
9089 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9090 "    if (s != 0)\n"
9091 "        handle_error_en(s, \"pthread_create\");\n"
9092 msgstr ""
9093 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9094 "    if (s != 0)\n"
9095 "        handle_error_en(s, \"pthread_create\");\n"
9096
9097 #. type: Plain text
9098 #: build/C/man3/pthread_sigmask.3:131
9099 #, no-wrap
9100 msgid ""
9101 "    /* Main thread carries on to create other threads and/or do\n"
9102 "       other work */\n"
9103 msgstr ""
9104 "    /* Main thread carries on to create other threads and/or do\n"
9105 "       other work */\n"
9106
9107 #. type: Plain text
9108 #: build/C/man3/pthread_sigmask.3:134
9109 #, no-wrap
9110 msgid ""
9111 "    pause();            /* Dummy pause so we can test program */\n"
9112 "}\n"
9113 msgstr ""
9114 "    pause();            /* Dummy pause so we can test program */\n"
9115 "}\n"
9116
9117 #. type: Plain text
9118 #: build/C/man3/pthread_sigmask.3:144
9119 msgid ""
9120 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9121 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9122 msgstr "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9123
9124 #. type: TH
9125 #: build/C/man3/pthread_sigqueue.3:25
9126 #, no-wrap
9127 msgid "PTHREAD_SIGQUEUE"
9128 msgstr "PTHREAD_SIGQUEUE"
9129
9130 #. type: Plain text
9131 #: build/C/man3/pthread_sigqueue.3:28
9132 msgid "pthread_sigqueue - queue a signal and data to a thread"
9133 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9134
9135 #. type: Plain text
9136 #: build/C/man3/pthread_sigqueue.3:34
9137 #, no-wrap
9138 msgid ""
9139 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9140 "B<                     const union sigval >I<value>B<);>\n"
9141 msgstr ""
9142 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9143 "B<                     const union sigval >I<value>B<);>\n"
9144
9145 #. type: Plain text
9146 #: build/C/man3/pthread_sigqueue.3:45
9147 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9148 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9149
9150 #. type: Plain text
9151 #: build/C/man3/pthread_sigqueue.3:53
9152 msgid ""
9153 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9154 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9155 "thread in the same process as the calling thread."
9156 msgstr ""
9157 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9158 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9159 "同じプロセス内のスレッドにシグナルを送信する。"
9160
9161 #. type: Plain text
9162 #: build/C/man3/pthread_sigqueue.3:65
9163 msgid ""
9164 "The I<thread> argument is the ID of a thread in the same process as the "
9165 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9166 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9167 "details."
9168 msgstr ""
9169 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9170 "I<sig> 引き数は送信するシグナルを指定する。\n"
9171 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9172 "詳細は B<sigqueue>(3) を参照。"
9173
9174 #. type: Plain text
9175 #: build/C/man3/pthread_sigqueue.3:70
9176 msgid ""
9177 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9178 "number."
9179 msgstr ""
9180 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9181 "エラーの場合、エラー番号を返す。"
9182
9183 #. type: Plain text
9184 #: build/C/man3/pthread_sigqueue.3:77
9185 msgid ""
9186 "The limit of signals which may be queued has been reached.  (See B<signal>"
9187 "(7)  for further information.)"
9188 msgstr ""
9189 "キューに入れられるシグナル数が上限に達していた\n"
9190 "(詳しい情報は (B<signal>(7) を参照)。"
9191
9192 #. type: Plain text
9193 #: build/C/man3/pthread_sigqueue.3:81
9194 msgid "I<sig> was invalid."
9195 msgstr "I<sig> が無効であった。"
9196
9197 #. type: TP
9198 #: build/C/man3/pthread_sigqueue.3:81
9199 #, no-wrap
9200 msgid "B<ENOSYS>"
9201 msgstr "B<ENOSYS>"
9202
9203 #. type: Plain text
9204 #: build/C/man3/pthread_sigqueue.3:85
9205 msgid "B<pthread_sigqueue>()  is not supported on this system."
9206 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9207
9208 #. type: Plain text
9209 #: build/C/man3/pthread_sigqueue.3:89
9210 msgid "I<thread> is not valid."
9211 msgstr "I<thread> が無効である。"
9212
9213 #. type: Plain text
9214 #: build/C/man3/pthread_sigqueue.3:93
9215 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9216 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9217
9218 #. type: Plain text
9219 #: build/C/man3/pthread_sigqueue.3:95
9220 msgid "This function is a GNU extension."
9221 msgstr "この関数は GNU による拡張である。"
9222
9223 #. type: Plain text
9224 #: build/C/man3/pthread_sigqueue.3:103
9225 msgid ""
9226 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9227 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9228 msgstr ""
9229 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9230 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9231
9232 #. type: TH
9233 #: build/C/man3/pthread_testcancel.3:26
9234 #, no-wrap
9235 msgid "PTHREAD_TESTCANCEL"
9236 msgstr "PTHREAD_TESTCANCEL"
9237
9238 #. type: TH
9239 #: build/C/man3/pthread_testcancel.3:26
9240 #, no-wrap
9241 msgid "2012-04-14"
9242 msgstr "2012-04-14"
9243
9244 #. type: Plain text
9245 #: build/C/man3/pthread_testcancel.3:29
9246 msgid ""
9247 "pthread_testcancel - request delivery of any pending cancellation request"
9248 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9249
9250 #. type: Plain text
9251 #: build/C/man3/pthread_testcancel.3:34
9252 #, no-wrap
9253 msgid "B<void pthread_testcancel(void);>\n"
9254 msgstr "B<void pthread_testcancel(void);>\n"
9255
9256 #. type: Plain text
9257 #: build/C/man3/pthread_testcancel.3:43
9258 msgid ""
9259 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9260 "calling thread, so that a thread that is otherwise executing code that "
9261 "contains no cancellation points will respond to a cancellation request."
9262 msgstr ""
9263 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9264 "ポイント (cancellation point) が作成される。\n"
9265 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9266 "いるスレッドが取り消し要求に対応することができるようになる。"
9267
9268 #. type: Plain text
9269 #: build/C/man3/pthread_testcancel.3:50
9270 msgid ""
9271 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9272 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9273 "no effect."
9274 msgstr ""
9275 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9276 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9277 "呼び出しても何の影響もない。"
9278
9279 #. type: Plain text
9280 #: build/C/man3/pthread_testcancel.3:54
9281 msgid ""
9282 "This function does not return a value.  If the calling thread is canceled as "
9283 "a consequence of a call to this function, then the function does not return."
9284 msgstr ""
9285 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9286 "キャンセルされた場合、この関数が返ることはない。"
9287
9288 #. type: Plain text
9289 #: build/C/man3/pthread_testcancel.3:63
9290 msgid "See B<pthread_cleanup_push>(3)."
9291 msgstr "B<pthread_cleanup_push>(3) を参照。"
9292
9293 #. type: Plain text
9294 #: build/C/man3/pthread_testcancel.3:68
9295 msgid ""
9296 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9297 "(3), B<pthreads>(7)"
9298 msgstr ""
9299 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9300 "(3), B<pthreads>(7)"
9301
9302 #. type: TH
9303 #: build/C/man3/pthread_tryjoin_np.3:26
9304 #, no-wrap
9305 msgid "PTHREAD_TRYJOIN_NP"
9306 msgstr "PTHREAD_TRYJOIN_NP"
9307
9308 #. type: Plain text
9309 #: build/C/man3/pthread_tryjoin_np.3:30
9310 msgid ""
9311 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9312 "thread"
9313 msgstr ""
9314 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9315 "試みる"
9316
9317 #. type: Plain text
9318 #: build/C/man3/pthread_tryjoin_np.3:36
9319 #, no-wrap
9320 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9321 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9322
9323 #. type: Plain text
9324 #: build/C/man3/pthread_tryjoin_np.3:39
9325 #, no-wrap
9326 msgid ""
9327 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9328 "B<                         const struct timespec *>I<abstime>B<);>\n"
9329 msgstr ""
9330 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9331 "B<                         const struct timespec *>I<abstime>B<);>\n"
9332
9333 #. type: Plain text
9334 #: build/C/man3/pthread_tryjoin_np.3:46
9335 msgid ""
9336 "These functions operate in the same way as B<pthread_join>(3), except for "
9337 "the differences described on this page."
9338 msgstr ""
9339 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9340 "このページで説明する違いがある。"
9341
9342 #. type: Plain text
9343 #: build/C/man3/pthread_tryjoin_np.3:58
9344 msgid ""
9345 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9346 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9347 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9348 "B<pthread_join>(3), the call returns an error."
9349 msgstr ""
9350 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9351 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9352 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9353 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9354
9355 #. type: Plain text
9356 #: build/C/man3/pthread_tryjoin_np.3:76
9357 msgid ""
9358 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9359 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9360 "specified in I<abstime>.  If the timeout expires before I<thread> "
9361 "terminates, the call returns an error.  The I<abstime> argument is a "
9362 "structure of the following form, specifying an absolute time measured since "
9363 "the Epoch (see B<time>(2)):"
9364 msgstr ""
9365 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9366 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9367 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9368 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9369 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9370
9371 #. type: Plain text
9372 #: build/C/man3/pthread_tryjoin_np.3:83
9373 #, no-wrap
9374 msgid ""
9375 "struct timespec {\n"
9376 "    time_t tv_sec;     /* seconds */\n"
9377 "    long   tv_nsec;    /* nanoseconds */\n"
9378 "};\n"
9379 msgstr ""
9380 "struct timespec {\n"
9381 "    time_t tv_sec;     /* seconds */\n"
9382 "    long   tv_nsec;    /* nanoseconds */\n"
9383 "};\n"
9384
9385 #. type: Plain text
9386 #: build/C/man3/pthread_tryjoin_np.3:89
9387 msgid ""
9388 "On success, these functions return 0; on error, they return an error number."
9389 msgstr ""
9390 "成功すると、これらの関数は 0 を返す。\n"
9391 "エラーの場合、エラー番号を返す。"
9392
9393 #. type: Plain text
9394 #: build/C/man3/pthread_tryjoin_np.3:94
9395 msgid ""
9396 "These functions can fail with the same errors as B<pthread_join>(3).  "
9397 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9398 msgstr ""
9399 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9400 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9401
9402 #. type: TP
9403 #: build/C/man3/pthread_tryjoin_np.3:94
9404 #, no-wrap
9405 msgid "B<EBUSY>"
9406 msgstr "B<EBUSY>"
9407
9408 #. type: Plain text
9409 #: build/C/man3/pthread_tryjoin_np.3:98
9410 msgid "I<thread> had not yet terminated at the time of the call."
9411 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9412
9413 #. type: Plain text
9414 #: build/C/man3/pthread_tryjoin_np.3:101
9415 msgid ""
9416 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9417 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9418
9419 #. type: TP
9420 #: build/C/man3/pthread_tryjoin_np.3:101
9421 #, no-wrap
9422 msgid "B<ETIMEDOUT>"
9423 msgstr "B<ETIMEDOUT>"
9424
9425 #. type: Plain text
9426 #: build/C/man3/pthread_tryjoin_np.3:106
9427 msgid "The call timed out before I<thread> terminated."
9428 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9429
9430 #. type: Plain text
9431 #: build/C/man3/pthread_tryjoin_np.3:110
9432 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9433 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9434
9435 #. type: Plain text
9436 #: build/C/man3/pthread_tryjoin_np.3:112
9437 msgid "These functions first appeared in glibc in version 2.3.3."
9438 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9439
9440 #. type: Plain text
9441 #: build/C/man3/pthread_tryjoin_np.3:117
9442 msgid "The following code waits to join for up to 5 seconds:"
9443 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9444
9445 #. type: Plain text
9446 #: build/C/man3/pthread_tryjoin_np.3:121
9447 #, no-wrap
9448 msgid ""
9449 "    struct timespec ts;\n"
9450 "    int s;\n"
9451 msgstr ""
9452 "    struct timespec ts;\n"
9453 "    int s;\n"
9454
9455 #. type: Plain text
9456 #: build/C/man3/pthread_tryjoin_np.3:123
9457 #, no-wrap
9458 msgid "    ...\n"
9459 msgstr "    ...\n"
9460
9461 #. type: Plain text
9462 #: build/C/man3/pthread_tryjoin_np.3:127
9463 #, no-wrap
9464 msgid ""
9465 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9466 "\t/* Handle error */\n"
9467 "    }\n"
9468 msgstr ""
9469 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9470 "\t/* Handle error */\n"
9471 "    }\n"
9472
9473 #. type: Plain text
9474 #: build/C/man3/pthread_tryjoin_np.3:129
9475 #, no-wrap
9476 msgid "    ts.tv_sec += 5;\n"
9477 msgstr "    ts.tv_sec += 5;\n"
9478
9479 #. type: Plain text
9480 #: build/C/man3/pthread_tryjoin_np.3:134
9481 #, no-wrap
9482 msgid ""
9483 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9484 "    if (s != 0) {\n"
9485 "        /* Handle error */\n"
9486 "    }\n"
9487 msgstr ""
9488 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9489 "    if (s != 0) {\n"
9490 "        /* Handle error */\n"
9491 "    }\n"
9492
9493 #. type: Plain text
9494 #: build/C/man3/pthread_tryjoin_np.3:140
9495 msgid ""
9496 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9497 msgstr ""
9498 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9499
9500 #. type: TH
9501 #: build/C/man3/pthread_yield.3:25
9502 #, no-wrap
9503 msgid "PTHREAD_YIELD"
9504 msgstr "PTHREAD_YIELD"
9505
9506 #. type: TH
9507 #: build/C/man3/pthread_yield.3:25
9508 #, no-wrap
9509 msgid "2013-03-05"
9510 msgstr "2013-03-05"
9511
9512 #. type: Plain text
9513 #: build/C/man3/pthread_yield.3:28
9514 msgid "pthread_yield - yield the processor"
9515 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9516
9517 #. type: Plain text
9518 #: build/C/man3/pthread_yield.3:34
9519 #, no-wrap
9520 msgid "B<int pthread_yield(void);>\n"
9521 msgstr "B<int pthread_yield(void);>\n"
9522
9523 #. type: Plain text
9524 #: build/C/man3/pthread_yield.3:44
9525 msgid ""
9526 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9527 "thread is placed at the end of the run queue for its static priority and "
9528 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9529 "(2)"
9530 msgstr ""
9531 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9532 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9533 "別のスレッドが実行されるようにスケジューリングされる。\n"
9534 "詳細は B<sched_yield>(2) を参照。"
9535
9536 #. type: Plain text
9537 #: build/C/man3/pthread_yield.3:49
9538 msgid ""
9539 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9540 "number."
9541 msgstr ""
9542 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9543 "エラーの場合、エラー番号を返す。"
9544
9545 #. type: Plain text
9546 #: build/C/man3/pthread_yield.3:53
9547 msgid ""
9548 "On Linux, this call always succeeds (but portable and future-proof "
9549 "applications should nevertheless handle a possible error return)."
9550 msgstr ""
9551 "Linux では、この関数の呼び出しは常に成功する\n"
9552 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9553 "正のエラーの返り値を処理するようにすべきである)。"
9554
9555 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9556 #. type: Plain text
9557 #: build/C/man3/pthread_yield.3:59
9558 msgid ""
9559 "This call is nonstandard, but present on several other systems.  Use the "
9560 "standardized B<sched_yield>(2)  instead."
9561 msgstr ""
9562 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9563 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9564
9565 #. type: Plain text
9566 #: build/C/man3/pthread_yield.3:62
9567 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9568 msgstr ""
9569 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9570
9571 #. type: Plain text
9572 #: build/C/man3/pthread_yield.3:66
9573 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9574 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9575
9576 #. type: TH
9577 #: build/C/man7/pthreads.7:26
9578 #, no-wrap
9579 msgid "PTHREADS"
9580 msgstr "PTHREADS"
9581
9582 #. type: TH
9583 #: build/C/man7/pthreads.7:26
9584 #, no-wrap
9585 msgid "2010-11-14"
9586 msgstr "2010-11-14"
9587
9588 #. type: Plain text
9589 #: build/C/man7/pthreads.7:29
9590 msgid "pthreads - POSIX threads"
9591 msgstr "pthreads - POSIX スレッド"
9592
9593 #. type: Plain text
9594 #: build/C/man7/pthreads.7:36
9595 msgid ""
9596 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9597 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9598 "can contain multiple threads, all of which are executing the same program.  "
9599 "These threads share the same global memory (data and heap segments), but "
9600 "each thread has its own stack (automatic variables)."
9601 msgstr ""
9602 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9603 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9604 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9605 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9606 "スレッドは自分専用のスタック (自動変数) を持つ。"
9607
9608 #. type: Plain text
9609 #: build/C/man7/pthreads.7:39
9610 msgid ""
9611 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9612 "these attributes are process-wide rather than per-thread):"
9613 msgstr ""
9614 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9615 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9616
9617 #. type: IP
9618 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9619 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9620 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9621 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9622 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9623 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9624 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9625 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9626 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9627 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9628 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9629 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9630 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9631 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9632 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9633 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9634 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9635 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9636 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9637 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9638 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9639 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9640 #: build/C/man7/pthreads.7:835
9641 #, no-wrap
9642 msgid "-"
9643 msgstr "-"
9644
9645 #. type: Plain text
9646 #: build/C/man7/pthreads.7:41
9647 msgid "process ID"
9648 msgstr "プロセス ID"
9649
9650 #. type: Plain text
9651 #: build/C/man7/pthreads.7:43
9652 msgid "parent process ID"
9653 msgstr "親プロセス ID"
9654
9655 #. type: Plain text
9656 #: build/C/man7/pthreads.7:45
9657 msgid "process group ID and session ID"
9658 msgstr "プロセスグループ ID とセッション ID"
9659
9660 #. type: Plain text
9661 #: build/C/man7/pthreads.7:47
9662 msgid "controlling terminal"
9663 msgstr "制御端末"
9664
9665 #. type: Plain text
9666 #: build/C/man7/pthreads.7:49
9667 msgid "user and group IDs"
9668 msgstr "ユーザ ID とグループ ID"
9669
9670 #. type: Plain text
9671 #: build/C/man7/pthreads.7:51
9672 msgid "open file descriptors"
9673 msgstr "オープンするファイルディスクリプタ"
9674
9675 #. type: Plain text
9676 #: build/C/man7/pthreads.7:54
9677 msgid "record locks (see B<fcntl>(2))"
9678 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9679
9680 #. type: Plain text
9681 #: build/C/man7/pthreads.7:56
9682 msgid "signal dispositions"
9683 msgstr "シグナルの配置"
9684
9685 #. type: Plain text
9686 #: build/C/man7/pthreads.7:59
9687 msgid "file mode creation mask (B<umask>(2))"
9688 msgstr "ファイルモード作成マスク (B<umask>(2))"
9689
9690 #. type: Plain text
9691 #: build/C/man7/pthreads.7:65
9692 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9693 msgstr ""
9694 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9695
9696 #. type: Plain text
9697 #: build/C/man7/pthreads.7:70
9698 msgid ""
9699 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9700 msgstr ""
9701 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9702
9703 #. type: Plain text
9704 #: build/C/man7/pthreads.7:73
9705 msgid "nice value (B<setpriority>(2))"
9706 msgstr "nice 値 (B<setpriority>(2))"
9707
9708 #. type: Plain text
9709 #: build/C/man7/pthreads.7:76
9710 msgid "resource limits (B<setrlimit>(2))"
9711 msgstr "リソース制限 (B<setrlimit>(2))"
9712
9713 #. type: Plain text
9714 #: build/C/man7/pthreads.7:81
9715 msgid ""
9716 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9717 "(B<getrusage>(2))"
9718 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9719
9720 #. type: Plain text
9721 #: build/C/man7/pthreads.7:84
9722 msgid ""
9723 "As well as the stack, POSIX.1 specifies that various other attributes are "
9724 "distinct for each thread, including:"
9725 msgstr ""
9726 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9727 "るかを規定している:"
9728
9729 #. type: Plain text
9730 #: build/C/man7/pthreads.7:88
9731 msgid "thread ID (the I<pthread_t> data type)"
9732 msgstr "スレッド ID (B<pthread_t> データ型)"
9733
9734 #. type: Plain text
9735 #: build/C/man7/pthreads.7:91
9736 msgid "signal mask (B<pthread_sigmask>(3))"
9737 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9738
9739 #. type: Plain text
9740 #: build/C/man7/pthreads.7:95
9741 msgid "the I<errno> variable"
9742 msgstr "I<errno> 変数"
9743
9744 #. type: Plain text
9745 #: build/C/man7/pthreads.7:98
9746 msgid "alternate signal stack (B<sigaltstack>(2))"
9747 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9748
9749 #. type: Plain text
9750 #: build/C/man7/pthreads.7:103
9751 msgid ""
9752 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9753 "B<sched_setparam>(2))"
9754 msgstr ""
9755 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9756 "と B<sched_setparam>(2))"
9757
9758 #. type: Plain text
9759 #: build/C/man7/pthreads.7:105
9760 msgid "The following Linux-specific features are also per-thread:"
9761 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9762
9763 #. type: Plain text
9764 #: build/C/man7/pthreads.7:108
9765 msgid "capabilities (see B<capabilities>(7))"
9766 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9767
9768 #. type: Plain text
9769 #: build/C/man7/pthreads.7:111
9770 msgid "CPU affinity (B<sched_setaffinity>(2))"
9771 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9772
9773 #. type: SS
9774 #: build/C/man7/pthreads.7:111
9775 #, no-wrap
9776 msgid "Pthreads function return values"
9777 msgstr "pthreads 関数の返り値"
9778
9779 #. type: Plain text
9780 #: build/C/man7/pthreads.7:118
9781 msgid ""
9782 "Most pthreads functions return 0 on success, and an error number of "
9783 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9784 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9785 "the function can never fail with the error B<EINTR>."
9786 msgstr ""
9787 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9788 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9789 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9790 "は決してないと規定している。"
9791
9792 #. type: SS
9793 #: build/C/man7/pthreads.7:118
9794 #, no-wrap
9795 msgid "Thread IDs"
9796 msgstr "スレッド ID"
9797
9798 #. type: Plain text
9799 #: build/C/man7/pthreads.7:132
9800 msgid ""
9801 "Each of the threads in a process has a unique thread identifier (stored in "
9802 "the type I<pthread_t>).  This identifier is returned to the caller of "
9803 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9804 "using B<pthread_self>(3).  Thread IDs are only guaranteed to be unique "
9805 "within a process.  A thread ID may be reused after a terminated thread has "
9806 "been joined, or a detached thread has terminated.  In all pthreads functions "
9807 "that accept a thread ID as an argument, that ID by definition refers to a "
9808 "thread in the same process as the caller."
9809 msgstr ""
9810 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9811 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9812 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9813 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9814 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9815 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9816 "じプロセス内の一つのスレッドを参照する。"
9817
9818 #. type: SS
9819 #: build/C/man7/pthreads.7:132
9820 #, no-wrap
9821 msgid "Thread-safe functions"
9822 msgstr "スレッドセーフな関数"
9823
9824 #. type: Plain text
9825 #: build/C/man7/pthreads.7:136
9826 msgid ""
9827 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9828 "same results regardless of whether it is)  called from multiple threads at "
9829 "the same time."
9830 msgstr ""
9831 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9832 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9833
9834 #. type: Plain text
9835 #: build/C/man7/pthreads.7:140
9836 msgid ""
9837 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9838 "standard shall be thread-safe, except for the following functions:"
9839 msgstr ""
9840 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9841 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9842
9843 #. type: Plain text
9844 #: build/C/man7/pthreads.7:234
9845 #, no-wrap
9846 msgid ""
9847 "asctime()\n"
9848 "basename()\n"
9849 "catgets()\n"
9850 "crypt()\n"
9851 "ctermid() if passed a non-NULL argument\n"
9852 "ctime()\n"
9853 "dbm_clearerr()\n"
9854 "dbm_close()\n"
9855 "dbm_delete()\n"
9856 "dbm_error()\n"
9857 "dbm_fetch()\n"
9858 "dbm_firstkey()\n"
9859 "dbm_nextkey()\n"
9860 "dbm_open()\n"
9861 "dbm_store()\n"
9862 "dirname()\n"
9863 "dlerror()\n"
9864 "drand48()\n"
9865 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9866 "encrypt()\n"
9867 "endgrent()\n"
9868 "endpwent()\n"
9869 "endutxent()\n"
9870 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9871 "ftw()\n"
9872 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9873 "getc_unlocked()\n"
9874 "getchar_unlocked()\n"
9875 "getdate()\n"
9876 "getenv()\n"
9877 "getgrent()\n"
9878 "getgrgid()\n"
9879 "getgrnam()\n"
9880 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9881 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9882 "gethostent()\n"
9883 "getlogin()\n"
9884 "getnetbyaddr()\n"
9885 "getnetbyname()\n"
9886 "getnetent()\n"
9887 "getopt()\n"
9888 "getprotobyname()\n"
9889 "getprotobynumber()\n"
9890 "getprotoent()\n"
9891 "getpwent()\n"
9892 "getpwnam()\n"
9893 "getpwuid()\n"
9894 "getservbyname()\n"
9895 "getservbyport()\n"
9896 "getservent()\n"
9897 "getutxent()\n"
9898 "getutxid()\n"
9899 "getutxline()\n"
9900 "gmtime()\n"
9901 "hcreate()\n"
9902 "hdestroy()\n"
9903 "hsearch()\n"
9904 "inet_ntoa()\n"
9905 "l64a()\n"
9906 "lgamma()\n"
9907 "lgammaf()\n"
9908 "lgammal()\n"
9909 "localeconv()\n"
9910 "localtime()\n"
9911 "lrand48()\n"
9912 "mrand48()\n"
9913 "nftw()\n"
9914 "nl_langinfo()\n"
9915 "ptsname()\n"
9916 "putc_unlocked()\n"
9917 "putchar_unlocked()\n"
9918 "putenv()\n"
9919 "pututxline()\n"
9920 "rand()\n"
9921 "readdir()\n"
9922 "setenv()\n"
9923 "setgrent()\n"
9924 "setkey()\n"
9925 "setpwent()\n"
9926 "setutxent()\n"
9927 "strerror()\n"
9928 "strsignal() [Added in POSIX.1-2008]\n"
9929 "strtok()\n"
9930 "system() [Added in POSIX.1-2008]\n"
9931 "tmpnam() if passed a non-NULL argument\n"
9932 "ttyname()\n"
9933 "unsetenv()\n"
9934 "wcrtomb() if its final argument is NULL\n"
9935 "wcsrtombs() if its final argument is NULL\n"
9936 "wcstombs()\n"
9937 "wctomb()\n"
9938 msgstr ""
9939 "asctime()\n"
9940 "basename()\n"
9941 "catgets()\n"
9942 "crypt()\n"
9943 "ctermid() (NULL でない引き数を渡された場合)\n"
9944 "ctime()\n"
9945 "dbm_clearerr()\n"
9946 "dbm_close()\n"
9947 "dbm_delete()\n"
9948 "dbm_error()\n"
9949 "dbm_fetch()\n"
9950 "dbm_firstkey()\n"
9951 "dbm_nextkey()\n"
9952 "dbm_open()\n"
9953 "dbm_store()\n"
9954 "dirname()\n"
9955 "dlerror()\n"
9956 "drand48()\n"
9957 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9958 "encrypt()\n"
9959 "endgrent()\n"
9960 "endpwent()\n"
9961 "endutxent()\n"
9962 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9963 "ftw()\n"
9964 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9965 "getc_unlocked()\n"
9966 "getchar_unlocked()\n"
9967 "getdate()\n"
9968 "getenv()\n"
9969 "getgrent()\n"
9970 "getgrgid()\n"
9971 "getgrnam()\n"
9972 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9973 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9974 "gethostent()\n"
9975 "getlogin()\n"
9976 "getnetbyaddr()\n"
9977 "getnetbyname()\n"
9978 "getnetent()\n"
9979 "getopt()\n"
9980 "getprotobyname()\n"
9981 "getprotobynumber()\n"
9982 "getprotoent()\n"
9983 "getpwent()\n"
9984 "getpwnam()\n"
9985 "getpwuid()\n"
9986 "getservbyname()\n"
9987 "getservbyport()\n"
9988 "getservent()\n"
9989 "getutxent()\n"
9990 "getutxid()\n"
9991 "getutxline()\n"
9992 "gmtime()\n"
9993 "hcreate()\n"
9994 "hdestroy()\n"
9995 "hsearch()\n"
9996 "inet_ntoa()\n"
9997 "l64a()\n"
9998 "lgamma()\n"
9999 "lgammaf()\n"
10000 "lgammal()\n"
10001 "localeconv()\n"
10002 "localtime()\n"
10003 "lrand48()\n"
10004 "mrand48()\n"
10005 "nftw()\n"
10006 "nl_langinfo()\n"
10007 "ptsname()\n"
10008 "putc_unlocked()\n"
10009 "putchar_unlocked()\n"
10010 "putenv()\n"
10011 "pututxline()\n"
10012 "rand()\n"
10013 "readdir()\n"
10014 "setenv()\n"
10015 "setgrent()\n"
10016 "setkey()\n"
10017 "setpwent()\n"
10018 "setutxent()\n"
10019 "strerror()\n"
10020 "strsignal() [POSIX.1-2008 で追加された]\n"
10021 "strtok()\n"
10022 "system() [POSIX.1-2008 で追加された]\n"
10023 "tmpnam() (NULL でない引き数を渡された場合)\n"
10024 "ttyname()\n"
10025 "unsetenv()\n"
10026 "wcrtomb() (最後の引き数が NULL の場合)\n"
10027 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10028 "wcstombs()\n"
10029 "wctomb()\n"
10030
10031 #. type: SS
10032 #: build/C/man7/pthreads.7:236
10033 #, no-wrap
10034 msgid "Async-cancel-safe functions"
10035 msgstr "async-cancel-safe 関数"
10036
10037 #. type: Plain text
10038 #: build/C/man7/pthreads.7:240
10039 msgid ""
10040 "An async-cancel-safe function is one that can be safely called in an "
10041 "application where asynchronous cancelability is enabled (see "
10042 "B<pthread_setcancelstate>(3))."
10043 msgstr ""
10044 "async-cancel-safe 関数は、\n"
10045 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10046 "安全に呼び出すことができる関数のことである\n"
10047 "(B<pthread_setcancelstate>(3) を参照)。"
10048
10049 #. type: Plain text
10050 #: build/C/man7/pthreads.7:243
10051 msgid ""
10052 "Only the following functions are required to be async-cancel-safe by "
10053 "POSIX.1-2001 and POSIX.1-2008:"
10054 msgstr ""
10055 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10056 "なければならないとされている。"
10057
10058 #. type: Plain text
10059 #: build/C/man7/pthreads.7:249
10060 #, no-wrap
10061 msgid ""
10062 "pthread_cancel()\n"
10063 "pthread_setcancelstate()\n"
10064 "pthread_setcanceltype()\n"
10065 msgstr ""
10066 "pthread_cancel()\n"
10067 "pthread_setcancelstate()\n"
10068 "pthread_setcanceltype()\n"
10069
10070 #. type: SS
10071 #: build/C/man7/pthreads.7:251
10072 #, no-wrap
10073 msgid "Cancellation points"
10074 msgstr "取り消しポイント (cancellation points)"
10075
10076 #. type: Plain text
10077 #: build/C/man7/pthreads.7:258
10078 msgid ""
10079 "POSIX.1 specifies that certain functions must, and certain other functions "
10080 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10081 "type is deferred, and a cancellation request is pending for the thread, then "
10082 "the thread is canceled when it calls a function that is a cancellation point."
10083 msgstr ""
10084 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10085 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10086 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10087 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10088 "時点で、そのスレッドのキャンセルが 行われる。"
10089
10090 #. type: Plain text
10091 #: build/C/man7/pthreads.7:261
10092 msgid ""
10093 "The following functions are required to be cancellation points by "
10094 "POSIX.1-2001 and/or POSIX.1-2008:"
10095 msgstr ""
10096 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10097 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10098
10099 #. type: Plain text
10100 #: build/C/man7/pthreads.7:324
10101 #, no-wrap
10102 msgid ""
10103 "accept()\n"
10104 "aio_suspend()\n"
10105 "clock_nanosleep()\n"
10106 "close()\n"
10107 "connect()\n"
10108 "creat()\n"
10109 "fcntl() F_SETLKW\n"
10110 "fdatasync()\n"
10111 "fsync()\n"
10112 "getmsg()\n"
10113 "getpmsg()\n"
10114 "lockf() F_LOCK\n"
10115 "mq_receive()\n"
10116 "mq_send()\n"
10117 "mq_timedreceive()\n"
10118 "mq_timedsend()\n"
10119 "msgrcv()\n"
10120 "msgsnd()\n"
10121 "msync()\n"
10122 "nanosleep()\n"
10123 "open()\n"
10124 "openat() [Added in POSIX.1-2008]\n"
10125 "pause()\n"
10126 "poll()\n"
10127 "pread()\n"
10128 "pselect()\n"
10129 "pthread_cond_timedwait()\n"
10130 "pthread_cond_wait()\n"
10131 "pthread_join()\n"
10132 "pthread_testcancel()\n"
10133 "putmsg()\n"
10134 "putpmsg()\n"
10135 "pwrite()\n"
10136 "read()\n"
10137 "readv()\n"
10138 "recv()\n"
10139 "recvfrom()\n"
10140 "recvmsg()\n"
10141 "select()\n"
10142 "sem_timedwait()\n"
10143 "sem_wait()\n"
10144 "send()\n"
10145 "sendmsg()\n"
10146 "sendto()\n"
10147 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10148 "sigsuspend()\n"
10149 "sigtimedwait()\n"
10150 "sigwait()\n"
10151 "sigwaitinfo()\n"
10152 "sleep()\n"
10153 "system()\n"
10154 "tcdrain()\n"
10155 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10156 "wait()\n"
10157 "waitid()\n"
10158 "waitpid()\n"
10159 "write()\n"
10160 "writev()\n"
10161 msgstr ""
10162 "accept()\n"
10163 "aio_suspend()\n"
10164 "clock_nanosleep()\n"
10165 "close()\n"
10166 "connect()\n"
10167 "creat()\n"
10168 "fcntl() F_SETLKW\n"
10169 "fdatasync()\n"
10170 "fsync()\n"
10171 "getmsg()\n"
10172 "getpmsg()\n"
10173 "lockf() F_LOCK\n"
10174 "mq_receive()\n"
10175 "mq_send()\n"
10176 "mq_timedreceive()\n"
10177 "mq_timedsend()\n"
10178 "msgrcv()\n"
10179 "msgsnd()\n"
10180 "msync()\n"
10181 "nanosleep()\n"
10182 "open()\n"
10183 "openat() [POSIX.1-2008 で追加された]\n"
10184 "pause()\n"
10185 "poll()\n"
10186 "pread()\n"
10187 "pselect()\n"
10188 "pthread_cond_timedwait()\n"
10189 "pthread_cond_wait()\n"
10190 "pthread_join()\n"
10191 "pthread_testcancel()\n"
10192 "putmsg()\n"
10193 "putpmsg()\n"
10194 "pwrite()\n"
10195 "read()\n"
10196 "readv()\n"
10197 "recv()\n"
10198 "recvfrom()\n"
10199 "recvmsg()\n"
10200 "select()\n"
10201 "sem_timedwait()\n"
10202 "sem_wait()\n"
10203 "send()\n"
10204 "sendmsg()\n"
10205 "sendto()\n"
10206 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10207 "sigsuspend()\n"
10208 "sigtimedwait()\n"
10209 "sigwait()\n"
10210 "sigwaitinfo()\n"
10211 "sleep()\n"
10212 "system()\n"
10213 "tcdrain()\n"
10214 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10215 "wait()\n"
10216 "waitid()\n"
10217 "waitpid()\n"
10218 "write()\n"
10219 "writev()\n"
10220
10221 #. type: Plain text
10222 #: build/C/man7/pthreads.7:329
10223 msgid ""
10224 "The following functions may be cancellation points according to POSIX.1-2001 "
10225 "and/or POSIX.1-2008:"
10226 msgstr ""
10227 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10228 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10229
10230 #. type: Plain text
10231 #: build/C/man7/pthreads.7:557
10232 #, no-wrap
10233 msgid ""
10234 "access()\n"
10235 "asctime()\n"
10236 "asctime_r()\n"
10237 "catclose()\n"
10238 "catgets()\n"
10239 "catopen()\n"
10240 "chmod() [Added in POSIX.1-2008]\n"
10241 "chown() [Added in POSIX.1-2008]\n"
10242 "closedir()\n"
10243 "closelog()\n"
10244 "ctermid()\n"
10245 "ctime()\n"
10246 "ctime_r()\n"
10247 "dbm_close()\n"
10248 "dbm_delete()\n"
10249 "dbm_fetch()\n"
10250 "dbm_nextkey()\n"
10251 "dbm_open()\n"
10252 "dbm_store()\n"
10253 "dlclose()\n"
10254 "dlopen()\n"
10255 "dprintf() [Added in POSIX.1-2008]\n"
10256 "endgrent()\n"
10257 "endhostent()\n"
10258 "endnetent()\n"
10259 "endprotoent()\n"
10260 "endpwent()\n"
10261 "endservent()\n"
10262 "endutxent()\n"
10263 "faccessat() [Added in POSIX.1-2008]\n"
10264 "fchmod() [Added in POSIX.1-2008]\n"
10265 "fchmodat() [Added in POSIX.1-2008]\n"
10266 "fchown() [Added in POSIX.1-2008]\n"
10267 "fchownat() [Added in POSIX.1-2008]\n"
10268 "fclose()\n"
10269 "fcntl() (for any value of cmd argument)\n"
10270 "fflush()\n"
10271 "fgetc()\n"
10272 "fgetpos()\n"
10273 "fgets()\n"
10274 "fgetwc()\n"
10275 "fgetws()\n"
10276 "fmtmsg()\n"
10277 "fopen()\n"
10278 "fpathconf()\n"
10279 "fprintf()\n"
10280 "fputc()\n"
10281 "fputs()\n"
10282 "fputwc()\n"
10283 "fputws()\n"
10284 "fread()\n"
10285 "freopen()\n"
10286 "fscanf()\n"
10287 "fseek()\n"
10288 "fseeko()\n"
10289 "fsetpos()\n"
10290 "fstat()\n"
10291 "fstatat() [Added in POSIX.1-2008]\n"
10292 "ftell()\n"
10293 "ftello()\n"
10294 "ftw()\n"
10295 "futimens() [Added in POSIX.1-2008]\n"
10296 "fwprintf()\n"
10297 "fwrite()\n"
10298 "fwscanf()\n"
10299 "getaddrinfo()\n"
10300 "getc()\n"
10301 "getc_unlocked()\n"
10302 "getchar()\n"
10303 "getchar_unlocked()\n"
10304 "getcwd()\n"
10305 "getdate()\n"
10306 "getdelim() [Added in POSIX.1-2008]\n"
10307 "getgrent()\n"
10308 "getgrgid()\n"
10309 "getgrgid_r()\n"
10310 "getgrnam()\n"
10311 "getgrnam_r()\n"
10312 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10313 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10314 "gethostent()\n"
10315 "gethostid()\n"
10316 "gethostname()\n"
10317 "getline() [Added in POSIX.1-2008]\n"
10318 "getlogin()\n"
10319 "getlogin_r()\n"
10320 "getnameinfo()\n"
10321 "getnetbyaddr()\n"
10322 "getnetbyname()\n"
10323 "getnetent()\n"
10324 "getopt() (if opterr is nonzero)\n"
10325 "getprotobyname()\n"
10326 "getprotobynumber()\n"
10327 "getprotoent()\n"
10328 "getpwent()\n"
10329 "getpwnam()\n"
10330 "getpwnam_r()\n"
10331 "getpwuid()\n"
10332 "getpwuid_r()\n"
10333 "gets()\n"
10334 "getservbyname()\n"
10335 "getservbyport()\n"
10336 "getservent()\n"
10337 "getutxent()\n"
10338 "getutxid()\n"
10339 "getutxline()\n"
10340 "getwc()\n"
10341 "getwchar()\n"
10342 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10343 "glob()\n"
10344 "iconv_close()\n"
10345 "iconv_open()\n"
10346 "ioctl()\n"
10347 "link()\n"
10348 "linkat() [Added in POSIX.1-2008]\n"
10349 "lio_listio() [Added in POSIX.1-2008]\n"
10350 "localtime()\n"
10351 "localtime_r()\n"
10352 "lockf() [Added in POSIX.1-2008]\n"
10353 "lseek()\n"
10354 "lstat()\n"
10355 "mkdir() [Added in POSIX.1-2008]\n"
10356 "mkdirat() [Added in POSIX.1-2008]\n"
10357 "mkdtemp() [Added in POSIX.1-2008]\n"
10358 "mkfifo() [Added in POSIX.1-2008]\n"
10359 "mkfifoat() [Added in POSIX.1-2008]\n"
10360 "mknod() [Added in POSIX.1-2008]\n"
10361 "mknodat() [Added in POSIX.1-2008]\n"
10362 "mkstemp()\n"
10363 "mktime()\n"
10364 "nftw()\n"
10365 "opendir()\n"
10366 "openlog()\n"
10367 "pathconf()\n"
10368 "pclose()\n"
10369 "perror()\n"
10370 "popen()\n"
10371 "posix_fadvise()\n"
10372 "posix_fallocate()\n"
10373 "posix_madvise()\n"
10374 "posix_openpt()\n"
10375 "posix_spawn()\n"
10376 "posix_spawnp()\n"
10377 "posix_trace_clear()\n"
10378 "posix_trace_close()\n"
10379 "posix_trace_create()\n"
10380 "posix_trace_create_withlog()\n"
10381 "posix_trace_eventtypelist_getnext_id()\n"
10382 "posix_trace_eventtypelist_rewind()\n"
10383 "posix_trace_flush()\n"
10384 "posix_trace_get_attr()\n"
10385 "posix_trace_get_filter()\n"
10386 "posix_trace_get_status()\n"
10387 "posix_trace_getnext_event()\n"
10388 "posix_trace_open()\n"
10389 "posix_trace_rewind()\n"
10390 "posix_trace_set_filter()\n"
10391 "posix_trace_shutdown()\n"
10392 "posix_trace_timedgetnext_event()\n"
10393 "posix_typed_mem_open()\n"
10394 "printf()\n"
10395 "psiginfo() [Added in POSIX.1-2008]\n"
10396 "psignal() [Added in POSIX.1-2008]\n"
10397 "pthread_rwlock_rdlock()\n"
10398 "pthread_rwlock_timedrdlock()\n"
10399 "pthread_rwlock_timedwrlock()\n"
10400 "pthread_rwlock_wrlock()\n"
10401 "putc()\n"
10402 "putc_unlocked()\n"
10403 "putchar()\n"
10404 "putchar_unlocked()\n"
10405 "puts()\n"
10406 "pututxline()\n"
10407 "putwc()\n"
10408 "putwchar()\n"
10409 "readdir()\n"
10410 "readdir_r()\n"
10411 "readlink() [Added in POSIX.1-2008]\n"
10412 "readlinkat() [Added in POSIX.1-2008]\n"
10413 "remove()\n"
10414 "rename()\n"
10415 "renameat() [Added in POSIX.1-2008]\n"
10416 "rewind()\n"
10417 "rewinddir()\n"
10418 "scandir() [Added in POSIX.1-2008]\n"
10419 "scanf()\n"
10420 "seekdir()\n"
10421 "semop()\n"
10422 "setgrent()\n"
10423 "sethostent()\n"
10424 "setnetent()\n"
10425 "setprotoent()\n"
10426 "setpwent()\n"
10427 "setservent()\n"
10428 "setutxent()\n"
10429 "sigpause() [Added in POSIX.1-2008]\n"
10430 "stat()\n"
10431 "strerror()\n"
10432 "strerror_r()\n"
10433 "strftime()\n"
10434 "symlink()\n"
10435 "symlinkat() [Added in POSIX.1-2008]\n"
10436 "sync()\n"
10437 "syslog()\n"
10438 "tmpfile()\n"
10439 "tmpnam()\n"
10440 "ttyname()\n"
10441 "ttyname_r()\n"
10442 "tzset()\n"
10443 "ungetc()\n"
10444 "ungetwc()\n"
10445 "unlink()\n"
10446 "unlinkat() [Added in POSIX.1-2008]\n"
10447 "utime() [Added in POSIX.1-2008]\n"
10448 "utimensat() [Added in POSIX.1-2008]\n"
10449 "utimes() [Added in POSIX.1-2008]\n"
10450 "vdprintf() [Added in POSIX.1-2008]\n"
10451 "vfprintf()\n"
10452 "vfwprintf()\n"
10453 "vprintf()\n"
10454 "vwprintf()\n"
10455 "wcsftime()\n"
10456 "wordexp()\n"
10457 "wprintf()\n"
10458 "wscanf()\n"
10459 msgstr ""
10460 "access()\n"
10461 "asctime()\n"
10462 "asctime_r()\n"
10463 "catclose()\n"
10464 "catgets()\n"
10465 "catopen()\n"
10466 "chmod() [POSIX.1-2008 で追加された]\n"
10467 "chown() [POSIX.1-2008 で追加された]\n"
10468 "closedir()\n"
10469 "closelog()\n"
10470 "ctermid()\n"
10471 "ctime()\n"
10472 "ctime_r()\n"
10473 "dbm_close()\n"
10474 "dbm_delete()\n"
10475 "dbm_fetch()\n"
10476 "dbm_nextkey()\n"
10477 "dbm_open()\n"
10478 "dbm_store()\n"
10479 "dlclose()\n"
10480 "dlopen()\n"
10481 "dprintf() [POSIX.1-2008 で追加された]\n"
10482 "endgrent()\n"
10483 "endhostent()\n"
10484 "endnetent()\n"
10485 "endprotoent()\n"
10486 "endpwent()\n"
10487 "endservent()\n"
10488 "endutxent()\n"
10489 "faccessat() [POSIX.1-2008 で追加された]\n"
10490 "fchmod() [POSIX.1-2008 で追加された]\n"
10491 "fchmodat() [POSIX.1-2008 で追加された]\n"
10492 "fchown() [POSIX.1-2008 で追加された]\n"
10493 "fchownat() [POSIX.1-2008 で追加された]\n"
10494 "fclose()\n"
10495 "fcntl() (cmd 引き数が何であっても)\n"
10496 "fflush()\n"
10497 "fgetc()\n"
10498 "fgetpos()\n"
10499 "fgets()\n"
10500 "fgetwc()\n"
10501 "fgetws()\n"
10502 "fmtmsg()\n"
10503 "fopen()\n"
10504 "fpathconf()\n"
10505 "fprintf()\n"
10506 "fputc()\n"
10507 "fputs()\n"
10508 "fputwc()\n"
10509 "fputws()\n"
10510 "fread()\n"
10511 "freopen()\n"
10512 "fscanf()\n"
10513 "fseek()\n"
10514 "fseeko()\n"
10515 "fsetpos()\n"
10516 "fstat()\n"
10517 "fstatat() [POSIX.1-2008 で追加された]\n"
10518 "ftell()\n"
10519 "ftello()\n"
10520 "ftw()\n"
10521 "futimens() [POSIX.1-2008 で追加された]\n"
10522 "fwprintf()\n"
10523 "fwrite()\n"
10524 "fwscanf()\n"
10525 "getaddrinfo()\n"
10526 "getc()\n"
10527 "getc_unlocked()\n"
10528 "getchar()\n"
10529 "getchar_unlocked()\n"
10530 "getcwd()\n"
10531 "getdate()\n"
10532 "getdelim() [POSIX.1-2008 で追加された]\n"
10533 "getgrent()\n"
10534 "getgrgid()\n"
10535 "getgrgid_r()\n"
10536 "getgrnam()\n"
10537 "getgrnam_r()\n"
10538 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10539 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10540 "gethostent()\n"
10541 "gethostid()\n"
10542 "gethostname()\n"
10543 "getline() [POSIX.1-2008 で追加された]\n"
10544 "getlogin()\n"
10545 "getlogin_r()\n"
10546 "getnameinfo()\n"
10547 "getnetbyaddr()\n"
10548 "getnetbyname()\n"
10549 "getnetent()\n"
10550 "getopt() (opterr が 0 以外の場合)\n"
10551 "getprotobyname()\n"
10552 "getprotobynumber()\n"
10553 "getprotoent()\n"
10554 "getpwent()\n"
10555 "getpwnam()\n"
10556 "getpwnam_r()\n"
10557 "getpwuid()\n"
10558 "getpwuid_r()\n"
10559 "gets()\n"
10560 "getservbyname()\n"
10561 "getservbyport()\n"
10562 "getservent()\n"
10563 "getutxent()\n"
10564 "getutxid()\n"
10565 "getutxline()\n"
10566 "getwc()\n"
10567 "getwchar()\n"
10568 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10569 "glob()\n"
10570 "iconv_close()\n"
10571 "iconv_open()\n"
10572 "ioctl()\n"
10573 "link()\n"
10574 "linkat() [POSIX.1-2008 で追加された]\n"
10575 "lio_listio() [POSIX.1-2008 で追加された]\n"
10576 "localtime()\n"
10577 "localtime_r()\n"
10578 "lockf() [POSIX.1-2008 で追加された]\n"
10579 "lseek()\n"
10580 "lstat()\n"
10581 "mkdir() [POSIX.1-2008 で追加された]\n"
10582 "mkdirat() [POSIX.1-2008 で追加された]\n"
10583 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10584 "mkfifo() [POSIX.1-2008 で追加された]\n"
10585 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10586 "mknod() [POSIX.1-2008 で追加された]\n"
10587 "mknodat() [POSIX.1-2008 で追加された]\n"
10588 "mkstemp()\n"
10589 "mktime()\n"
10590 "nftw()\n"
10591 "opendir()\n"
10592 "openlog()\n"
10593 "pathconf()\n"
10594 "pclose()\n"
10595 "perror()\n"
10596 "popen()\n"
10597 "posix_fadvise()\n"
10598 "posix_fallocate()\n"
10599 "posix_madvise()\n"
10600 "posix_openpt()\n"
10601 "posix_spawn()\n"
10602 "posix_spawnp()\n"
10603 "posix_trace_clear()\n"
10604 "posix_trace_close()\n"
10605 "posix_trace_create()\n"
10606 "posix_trace_create_withlog()\n"
10607 "posix_trace_eventtypelist_getnext_id()\n"
10608 "posix_trace_eventtypelist_rewind()\n"
10609 "posix_trace_flush()\n"
10610 "posix_trace_get_attr()\n"
10611 "posix_trace_get_filter()\n"
10612 "posix_trace_get_status()\n"
10613 "posix_trace_getnext_event()\n"
10614 "posix_trace_open()\n"
10615 "posix_trace_rewind()\n"
10616 "posix_trace_set_filter()\n"
10617 "posix_trace_shutdown()\n"
10618 "posix_trace_timedgetnext_event()\n"
10619 "posix_typed_mem_open()\n"
10620 "printf()\n"
10621 "psiginfo() [POSIX.1-2008 で追加された]\n"
10622 "psignal() [POSIX.1-2008 で追加された]\n"
10623 "pthread_rwlock_rdlock()\n"
10624 "pthread_rwlock_timedrdlock()\n"
10625 "pthread_rwlock_timedwrlock()\n"
10626 "pthread_rwlock_wrlock()\n"
10627 "putc()\n"
10628 "putc_unlocked()\n"
10629 "putchar()\n"
10630 "putchar_unlocked()\n"
10631 "puts()\n"
10632 "pututxline()\n"
10633 "putwc()\n"
10634 "putwchar()\n"
10635 "readdir()\n"
10636 "readdir_r()\n"
10637 "readlink() [POSIX.1-2008 で追加された]\n"
10638 "readlinkat() [POSIX.1-2008 で追加された]\n"
10639 "remove()\n"
10640 "rename()\n"
10641 "renameat() [POSIX.1-2008 で追加された]\n"
10642 "rewind()\n"
10643 "rewinddir()\n"
10644 "scandir() [POSIX.1-2008 で追加された]\n"
10645 "scanf()\n"
10646 "seekdir()\n"
10647 "semop()\n"
10648 "setgrent()\n"
10649 "sethostent()\n"
10650 "setnetent()\n"
10651 "setprotoent()\n"
10652 "setpwent()\n"
10653 "setservent()\n"
10654 "setutxent()\n"
10655 "sigpause() [POSIX.1-2008 で追加された]\n"
10656 "stat()\n"
10657 "strerror()\n"
10658 "strerror_r()\n"
10659 "strftime()\n"
10660 "symlink()\n"
10661 "symlinkat() [POSIX.1-2008 で追加された]\n"
10662 "sync()\n"
10663 "syslog()\n"
10664 "tmpfile()\n"
10665 "tmpnam()\n"
10666 "ttyname()\n"
10667 "ttyname_r()\n"
10668 "tzset()\n"
10669 "ungetc()\n"
10670 "ungetwc()\n"
10671 "unlink()\n"
10672 "unlinkat() [POSIX.1-2008 で追加された]\n"
10673 "utime() [POSIX.1-2008 で追加された]\n"
10674 "utimensat() [POSIX.1-2008 で追加された]\n"
10675 "utimes() [POSIX.1-2008 で追加された]\n"
10676 "vdprintf() [POSIX.1-2008 で追加された]\n"
10677 "vfprintf()\n"
10678 "vfwprintf()\n"
10679 "vprintf()\n"
10680 "vwprintf()\n"
10681 "wcsftime()\n"
10682 "wordexp()\n"
10683 "wprintf()\n"
10684 "wscanf()\n"
10685
10686 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10687 #.  files, it looks as though at least the following nonstandard
10688 #.  functions are cancellation points:
10689 #.  endnetgrent
10690 #.  endspent
10691 #.  epoll_pwait
10692 #.  epoll_wait
10693 #.  fcloseall
10694 #.  fdopendir
10695 #.  fflush_unlocked
10696 #.  fgetc_unlocked
10697 #.  fgetgrent
10698 #.  fgetgrent_r
10699 #.  fgetpwent
10700 #.  fgetpwent_r
10701 #.  fgets_unlocked
10702 #.  fgetspent
10703 #.  fgetspent_r
10704 #.  fgetwc_unlocked
10705 #.  fgetws_unlocked
10706 #.  fputc_unlocked
10707 #.  fputs_unlocked
10708 #.  fputwc_unlocked
10709 #.  fputws_unlocked
10710 #.  fread_unlocked
10711 #.  fwrite_unlocked
10712 #.  gai_suspend
10713 #.  getaddrinfo_a
10714 #.  getdate_r
10715 #.  getgrent_r
10716 #.  getgrouplist
10717 #.  gethostbyaddr_r
10718 #.  gethostbyname2
10719 #.  gethostbyname2_r
10720 #.  gethostbyname_r
10721 #.  gethostent_r
10722 #.  getnetbyaddr_r
10723 #.  getnetbyname_r
10724 #.  getnetent_r
10725 #.  getnetgrent
10726 #.  getnetgrent_r
10727 #.  getprotobyname_r
10728 #.  getprotobynumber_r
10729 #.  getprotoent_r
10730 #.  getpw
10731 #.  getpwent_r
10732 #.  getservbyname_r
10733 #.  getservbyport_r
10734 #.  getservent_r
10735 #.  getspent
10736 #.  getspent_r
10737 #.  getspnam
10738 #.  getspnam_r
10739 #.  getutmp
10740 #.  getutmpx
10741 #.  getw
10742 #.  getwc_unlocked
10743 #.  getwchar_unlocked
10744 #.  initgroups
10745 #.  innetgr
10746 #.  mkostemp
10747 #.  mkostemp64
10748 #.  mkstemp64
10749 #.  ppoll
10750 #.  pthread_timedjoin_np
10751 #.  putgrent
10752 #.  putpwent
10753 #.  putspent
10754 #.  putw
10755 #.  putwc_unlocked
10756 #.  putwchar_unlocked
10757 #.  rcmd
10758 #.  rcmd_af
10759 #.  rexec
10760 #.  rexec_af
10761 #.  rresvport
10762 #.  rresvport_af
10763 #.  ruserok
10764 #.  ruserok_af
10765 #.  setnetgrent
10766 #.  setspent
10767 #.  sgetspent
10768 #.  sgetspent_r
10769 #.  updwtmpx
10770 #.  utmpxname
10771 #.  vfscanf
10772 #.  vfwscanf
10773 #.  vscanf
10774 #.  vsyslog
10775 #.  vwscanf
10776 #. type: Plain text
10777 #: build/C/man7/pthreads.7:655
10778 msgid ""
10779 "An implementation may also mark other functions not specified in the "
10780 "standard as cancellation points.  In particular, an implementation is likely "
10781 "to mark any nonstandard function that may block as a cancellation point.  "
10782 "(This includes most functions that can touch files.)"
10783 msgstr ""
10784 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10785 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10786 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10787 "関数がこれに含まれる)。"
10788
10789 #. type: SS
10790 #: build/C/man7/pthreads.7:655
10791 #, no-wrap
10792 msgid "Compiling on Linux"
10793 msgstr "Linux でのコンパイル"
10794
10795 #. type: Plain text
10796 #: build/C/man7/pthreads.7:658
10797 msgid ""
10798 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10799 "pthread>."
10800 msgstr ""
10801 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10802 "きである。"
10803
10804 #. type: SS
10805 #: build/C/man7/pthreads.7:658
10806 #, no-wrap
10807 msgid "Linux implementations of POSIX threads"
10808 msgstr "POSIX スレッドの Linux での実装"
10809
10810 #. type: Plain text
10811 #: build/C/man7/pthreads.7:661
10812 msgid ""
10813 "Over time, two threading implementations have been provided by the GNU C "
10814 "library on Linux:"
10815 msgstr ""
10816 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10817 "た。"
10818
10819 #. type: TP
10820 #: build/C/man7/pthreads.7:661
10821 #, no-wrap
10822 msgid "B<LinuxThreads>"
10823 msgstr "B<LinuxThreads>"
10824
10825 #. type: Plain text
10826 #: build/C/man7/pthreads.7:665
10827 msgid ""
10828 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10829 "implementation is no longer supported."
10830 msgstr ""
10831 "最初の Pthreads の実装。\n"
10832 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10833
10834 #. type: TP
10835 #: build/C/man7/pthreads.7:665
10836 #, no-wrap
10837 msgid "B<NPTL> (Native POSIX Threads Library)"
10838 msgstr "B<NPTL> (Native POSIX Threads Library)"
10839
10840 #. type: Plain text
10841 #: build/C/man7/pthreads.7:673
10842 msgid ""
10843 "This is the modern Pthreads implementation.  By comparison with "
10844 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10845 "POSIX.1 specification and better performance when creating large numbers of "
10846 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10847 "are present in the Linux 2.6 kernel."
10848 msgstr ""
10849 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
10850 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
10851 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
10852 "装されている機能が必要である。"
10853
10854 #. type: Plain text
10855 #: build/C/man7/pthreads.7:683
10856 msgid ""
10857 "Both of these are so-called 1:1 implementations, meaning that each thread "
10858 "maps to a kernel scheduling entity.  Both threading implementations employ "
10859 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
10860 "primitives (mutexes, thread joining, and so on) are implemented using the "
10861 "Linux B<futex>(2)  system call."
10862 msgstr ""
10863 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
10864 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
10865 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
10866 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
10867 "使って実装されている。"
10868
10869 #. type: SS
10870 #: build/C/man7/pthreads.7:683
10871 #, no-wrap
10872 msgid "LinuxThreads"
10873 msgstr "LinuxThreads"
10874
10875 #. type: Plain text
10876 #: build/C/man7/pthreads.7:685
10877 msgid "The notable features of this implementation are the following:"
10878 msgstr "この実装の大きな特徴は以下の通りである:"
10879
10880 #. type: Plain text
10881 #: build/C/man7/pthreads.7:692
10882 msgid ""
10883 "In addition to the main (initial) thread, and the threads that the program "
10884 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
10885 "thread.  This thread handles thread creation and termination.  (Problems can "
10886 "result if this thread is inadvertently killed.)"
10887 msgstr ""
10888 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
10889 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
10890 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
10891 "kill されると、問題が起こることがある)。"
10892
10893 #. type: Plain text
10894 #: build/C/man7/pthreads.7:704
10895 msgid ""
10896 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
10897 "the first three real-time signals are used (see also B<signal>(7)).  On "
10898 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
10899 "avoid the use of whichever set of signals is employed by the implementation."
10900 msgstr ""
10901 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
10902 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
10903 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
10904 "用されているシグナルを どれも使わないようにしなければならない。"
10905
10906 #. type: Plain text
10907 #: build/C/man7/pthreads.7:711
10908 msgid ""
10909 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
10910 "implemented as processes which share more information than usual, but which "
10911 "do not share a common process ID.)  LinuxThreads threads (including the "
10912 "manager thread)  are visible as separate processes using B<ps>(1)."
10913 msgstr ""
10914 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
10915 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
10916 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
10917 "を使うと別のプロセスのように見える。"
10918
10919 #. type: Plain text
10920 #: build/C/man7/pthreads.7:714
10921 msgid ""
10922 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
10923 "number of ways, including the following:"
10924 msgstr ""
10925 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
10926 "示すような点がある:"
10927
10928 #. type: Plain text
10929 #: build/C/man7/pthreads.7:718
10930 msgid "Calls to B<getpid>(2)  return a different value in each thread."
10931 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
10932
10933 #. type: Plain text
10934 #: build/C/man7/pthreads.7:727
10935 msgid ""
10936 "Calls to B<getppid>(2)  in threads other than the main thread return the "
10937 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
10938 "should return the same value as B<getppid>(2)  in the main thread."
10939 msgstr ""
10940 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
10941 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
10942 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
10943
10944 #. type: Plain text
10945 #: build/C/man7/pthreads.7:737
10946 msgid ""
10947 "When one thread creates a new child process using B<fork>(2), any thread "
10948 "should be able to B<wait>(2)  on the child.  However, the implementation "
10949 "only allows the thread that created the child to B<wait>(2)  on it."
10950 msgstr ""
10951 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
10952 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
10953 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
10954 "る。"
10955
10956 #. type: Plain text
10957 #: build/C/man7/pthreads.7:744
10958 msgid ""
10959 "When a thread calls B<execve>(2), all other threads are terminated (as "
10960 "required by POSIX.1).  However, the resulting process has the same PID as "
10961 "the thread that called B<execve>(2): it should have the same PID as the main "
10962 "thread."
10963 msgstr ""
10964 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
10965 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
10966 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
10967 "る。"
10968
10969 #. type: Plain text
10970 #: build/C/man7/pthreads.7:751
10971 msgid ""
10972 "Threads do not share user and group IDs.  This can cause complications with "
10973 "set-user-ID programs and can cause failures in Pthreads functions if an "
10974 "application changes its credentials using B<seteuid>(2)  or similar."
10975 msgstr ""
10976 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
10977 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
10978 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
10979
10980 #. type: Plain text
10981 #: build/C/man7/pthreads.7:753
10982 msgid "Threads do not share a common session ID and process group ID."
10983 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
10984
10985 #. type: Plain text
10986 #: build/C/man7/pthreads.7:756
10987 msgid "Threads do not share record locks created using B<fcntl>(2)."
10988 msgstr ""
10989 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
10990
10991 #. type: Plain text
10992 #: build/C/man7/pthreads.7:762
10993 msgid ""
10994 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
10995 "rather than process-wide."
10996 msgstr ""
10997 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
10998 "単位の情報である。"
10999
11000 #. type: Plain text
11001 #: build/C/man7/pthreads.7:765
11002 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11003 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11004
11005 #. type: Plain text
11006 #: build/C/man7/pthreads.7:767
11007 msgid "Threads do not share interval timers."
11008 msgstr "スレッド間でインターバル・タイマを共有しない。"
11009
11010 #.  FIXME . bug report filed for NPTL nice nonconformance
11011 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11012 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11013 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11014 #.  Monitor this to see if it makes it into mainline.
11015 #. type: Plain text
11016 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11017 msgid "Threads do not share a common nice value."
11018 msgstr "スレッドは共通の nice 値を共有しない。"
11019
11020 #. type: Plain text
11021 #: build/C/man7/pthreads.7:779
11022 msgid ""
11023 "POSIX.1 distinguishes the notions of signals that are directed to the "
11024 "process as a whole and signals that are directed to individual threads.  "
11025 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11026 "example) should be handled by a single, arbitrarily selected thread within "
11027 "the process.  LinuxThreads does not support the notion of process-directed "
11028 "signals: signals may only be sent to specific threads."
11029 msgstr ""
11030 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11031 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11032 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11033 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11034 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11035 "ルは特定のスレッドにだけ送ることができる。"
11036
11037 #. type: Plain text
11038 #: build/C/man7/pthreads.7:788
11039 msgid ""
11040 "Threads have distinct alternate signal stack settings.  However, a new "
11041 "thread's alternate signal stack settings are copied from the thread that "
11042 "created it, so that the threads initially share an alternate signal stack.  "
11043 "(A new thread should start with no alternate signal stack defined.  If two "
11044 "threads handle signals on their shared alternate signal stack at the same "
11045 "time, unpredictable program failures are likely to occur.)"
11046 msgstr ""
11047 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11048 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11049 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11050 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11051 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11052 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11053
11054 #. type: SS
11055 #: build/C/man7/pthreads.7:788
11056 #, no-wrap
11057 msgid "NPTL"
11058 msgstr "NPTL"
11059
11060 #. type: Plain text
11061 #: build/C/man7/pthreads.7:797
11062 msgid ""
11063 "With NPTL, all of the threads in a process are placed in the same thread "
11064 "group; all members of a thread group share the same PID.  NPTL does not "
11065 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11066 "signals (see also B<signal>(7)); these signals cannot be used in "
11067 "applications."
11068 msgstr ""
11069 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11070 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11071 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11072 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11073 "ションでは使用できない。"
11074
11075 #. type: Plain text
11076 #: build/C/man7/pthreads.7:799
11077 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11078 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11079
11080 #. type: Plain text
11081 #: build/C/man7/pthreads.7:808
11082 msgid "Some NPTL nonconformances only occur with older kernels:"
11083 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11084
11085 #. type: Plain text
11086 #: build/C/man7/pthreads.7:814
11087 msgid ""
11088 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11089 "rather than process-wide (fixed in kernel 2.6.9)."
11090 msgstr ""
11091 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11092 "単位の情報である (カーネル 2.6.9 で修正された)。"
11093
11094 #. type: Plain text
11095 #: build/C/man7/pthreads.7:816
11096 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11097 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11098
11099 #. type: Plain text
11100 #: build/C/man7/pthreads.7:818
11101 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11102 msgstr ""
11103 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11104
11105 #. type: Plain text
11106 #: build/C/man7/pthreads.7:822
11107 msgid ""
11108 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11109 "(fixed in kernel 2.6.16)."
11110 msgstr ""
11111 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11112 "きる (カーネル 2.6.16 で修正された)。"
11113
11114 #. type: Plain text
11115 #: build/C/man7/pthreads.7:827
11116 msgid ""
11117 "Only the main thread is permitted to make the process into a process group "
11118 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11119 msgstr ""
11120 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11121 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11122
11123 #. type: Plain text
11124 #: build/C/man7/pthreads.7:833
11125 msgid ""
11126 "Threads have distinct alternate signal stack settings.  However, a new "
11127 "thread's alternate signal stack settings are copied from the thread that "
11128 "created it, so that the threads initially share an alternate signal stack "
11129 "(fixed in kernel 2.6.16)."
11130 msgstr ""
11131 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11132 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11133 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11134 "ル 2.6.16 で修正された)。"
11135
11136 #. type: Plain text
11137 #: build/C/man7/pthreads.7:835
11138 msgid "Note the following further points about the NPTL implementation:"
11139 msgstr "NPTL の実装では以下の点についても注意すること:"
11140
11141 #. type: Plain text
11142 #: build/C/man7/pthreads.7:849
11143 msgid ""
11144 "If the stack size soft resource limit (see the description of "
11145 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11146 "I<unlimited>, then this value defines the default stack size for new "
11147 "threads.  To be effective, this limit must be set before the program is "
11148 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11149 "stacksize> in the C shell)."
11150 msgstr ""
11151 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11152 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11153 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11154 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11155 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11156 "は I<limit stacksize>)  を使って設定する。"
11157
11158 #. type: SS
11159 #: build/C/man7/pthreads.7:849
11160 #, no-wrap
11161 msgid "Determining the threading implementation"
11162 msgstr "スレッド実装の判定"
11163
11164 #. type: Plain text
11165 #: build/C/man7/pthreads.7:854
11166 msgid ""
11167 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11168 "system's threading implementation, for example:"
11169 msgstr ""
11170 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11171 "装を判定することができる。 以下に例を示す:"
11172
11173 #. type: Plain text
11174 #: build/C/man7/pthreads.7:859
11175 #, no-wrap
11176 msgid ""
11177 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11178 "NPTL 2.3.4\n"
11179 msgstr ""
11180 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11181 "NPTL 2.3.4\n"
11182
11183 #. type: Plain text
11184 #: build/C/man7/pthreads.7:864
11185 msgid ""
11186 "With older glibc versions, a command such as the following should be "
11187 "sufficient to determine the default threading implementation:"
11188 msgstr ""
11189 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11190 "ド実装を判定することができる。"
11191
11192 #. type: Plain text
11193 #: build/C/man7/pthreads.7:870
11194 #, no-wrap
11195 msgid ""
11196 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11197 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11198 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11199 msgstr ""
11200 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11201 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11202 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11203
11204 #. type: SS
11205 #: build/C/man7/pthreads.7:872
11206 #, no-wrap
11207 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11208 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11209
11210 #. type: Plain text
11211 #: build/C/man7/pthreads.7:887
11212 msgid ""
11213 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11214 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11215 "override the dynamic linker's default choice of threading implementation.  "
11216 "This variable tells the dynamic linker to assume that it is running on top "
11217 "of a particular kernel version.  By specifying a kernel version that does "
11218 "not provide the support required by NPTL, we can force the use of "
11219 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11220 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11221 "For example:"
11222 msgstr ""
11223 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11224 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11225 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11226 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11227 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11228 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11229 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11230 "ン を動作させる場合だろう)。 以下に例を示す:"
11231
11232 #. type: Plain text
11233 #: build/C/man7/pthreads.7:893
11234 #, no-wrap
11235 msgid ""
11236 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11237 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11238 "        linuxthreads-0.10 by Xavier Leroy\n"
11239 msgstr ""
11240 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11241 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11242 "        linuxthreads-0.10 by Xavier Leroy\n"
11243
11244 #. type: Plain text
11245 #: build/C/man7/pthreads.7:905
11246 msgid ""
11247 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11248 "(7), B<signal>(7),"
11249 msgstr ""
11250 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11251 "B<signal>(7),"
11252
11253 #. type: Plain text
11254 #: build/C/man7/pthreads.7:929
11255 msgid ""
11256 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11257 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11258 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11259 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11260 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11261 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11262 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11263 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11264 msgstr ""
11265 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11266 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11267 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11268 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11269 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11270 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11271 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11272 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11273 "and B<pthread_testcancel>(3)"
11274
11275 #~ msgid "2009-03-31"
11276 #~ msgstr "2009-03-31"
11277
11278 #~ msgid ""
11279 #~ "B<getcontext>(2), B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), "
11280 #~ "B<sigsetjmp>(3)"
11281 #~ msgstr ""
11282 #~ "B<getcontext>(2), B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), "
11283 #~ "B<sigsetjmp>(3)"
11284
11285 #~ msgid "2009-01-28"
11286 #~ msgstr "2009-01-28"
11287
11288 #~ msgid "2011-10-16"
11289 #~ msgstr "2011-10-16"
11290
11291 #~ msgid "2011-09-23"
11292 #~ msgstr "2011-09-23"