OSDN Git Service

(split) LDP: Translate several number of pages
[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-04-30 20:29+0900\n"
10 "PO-Revision-Date: 2013-05-05 03:27+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.51 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.51 の一部\n"
639 "である。プロジェクトの説明とバグ報告に関する情報は\n"
640 "http://www.kernel.org/doc/man-pages/ に書かれている。"
641
642 #. type: TH
643 #: build/C/man3/makecontext.3:28
644 #, no-wrap
645 msgid "MAKECONTEXT"
646 msgstr "MAKECONTEXT"
647
648 #. type: TH
649 #: build/C/man3/makecontext.3:28
650 #, no-wrap
651 msgid "2013-02-12"
652 msgstr "2013-02-12"
653
654 #. type: TH
655 #: build/C/man3/makecontext.3:28
656 #, no-wrap
657 msgid "GNU"
658 msgstr "GNU"
659
660 #. type: Plain text
661 #: build/C/man3/makecontext.3:31
662 msgid "makecontext, swapcontext - manipulate user context"
663 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
664
665 #. type: Plain text
666 #: build/C/man3/makecontext.3:36
667 msgid ""
668 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
669 ">I<argc>B<, ...);>"
670 msgstr ""
671 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
672 ">I<argc>B<, ...);>"
673
674 #. type: Plain text
675 #: build/C/man3/makecontext.3:38
676 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
677 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
678
679 #. type: Plain text
680 #: build/C/man3/makecontext.3:49
681 msgid ""
682 "In a System V-like environment, one has the type I<ucontext_t> defined in "
683 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
684 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
685 "level context switching between multiple threads of control within a process."
686 msgstr ""
687 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
688 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
689 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
690 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
691 "ようになっている。"
692
693 #. type: Plain text
694 #: build/C/man3/makecontext.3:52
695 msgid "For the type and the first two functions, see B<getcontext>(3)."
696 msgstr ""
697 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
698
699 #. type: Plain text
700 #: build/C/man3/makecontext.3:64
701 msgid ""
702 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
703 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
704 "B<makecontext>(), the caller must allocate a new stack for this context and "
705 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
706 "and assign its address to I<ucp-E<gt>uc_link>."
707 msgstr ""
708 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
709 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
710 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
711 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
712 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
713 "らない。"
714
715 #. type: Plain text
716 #: build/C/man3/makecontext.3:78
717 msgid ""
718 "When this context is later activated (using B<setcontext>(3)  or "
719 "B<swapcontext>())  the function I<func> is called, and passed the series of "
720 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
721 "number of these arguments in I<argc>.  When this function returns, the "
722 "successor context is activated.  If the successor context pointer is NULL, "
723 "the thread exits."
724 msgstr ""
725 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
726 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
727 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
728 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
729 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
730
731 #. type: Plain text
732 #: build/C/man3/makecontext.3:84
733 msgid ""
734 "The B<swapcontext>()  function saves the current context in the structure "
735 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
736 msgstr ""
737 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
738 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
739
740 #. type: Plain text
741 #: build/C/man3/makecontext.3:96
742 msgid ""
743 "When successful, B<swapcontext>()  does not return.  (But we may return "
744 "later, in case I<oucp> is activated, in which case it looks like "
745 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
746 "sets I<errno> appropriately."
747 msgstr ""
748 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
749 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
750 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
751 "て設定する。"
752
753 #. type: TP
754 #: build/C/man3/makecontext.3:97
755 #: build/C/man3/pthread_attr_setaffinity_np.3:102
756 #: build/C/man3/pthread_getattr_np.3:77
757 #, no-wrap
758 msgid "B<ENOMEM>"
759 msgstr "B<ENOMEM>"
760
761 #. type: Plain text
762 #: build/C/man3/makecontext.3:100
763 msgid "Insufficient stack space left."
764 msgstr "スタックに割り当てる空間が残っていない。"
765
766 #. type: SH
767 #: build/C/man3/makecontext.3:100
768 #: build/C/man3/pthread_attr_setaffinity_np.3:106
769 #: build/C/man3/pthread_attr_setguardsize.3:104
770 #: build/C/man3/pthread_attr_setstack.3:110
771 #: build/C/man3/pthread_attr_setstackaddr.3:81
772 #: build/C/man3/pthread_attr_setstacksize.3:81
773 #: build/C/man3/pthread_getattr_np.3:96
774 #: build/C/man3/pthread_getcpuclockid.3:63
775 #: build/C/man3/pthread_setaffinity_np.3:119
776 #: build/C/man3/pthread_setconcurrency.3:81
777 #: build/C/man3/pthread_setname_np.3:100
778 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
779 #: build/C/man3/pthread_tryjoin_np.3:110
780 #, no-wrap
781 msgid "VERSIONS"
782 msgstr "バージョン"
783
784 #. type: Plain text
785 #: build/C/man3/makecontext.3:105
786 msgid ""
787 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
788 "2.1."
789 msgstr ""
790 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
791 "されている。"
792
793 #. type: Plain text
794 #: build/C/man3/makecontext.3:113
795 msgid ""
796 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
797 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
798 "recommending that applications be rewritten to use POSIX threads instead."
799 msgstr ""
800 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
801 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
802 "POSIX スレッドを使って書き直すことが 推奨されている。"
803
804 #. type: Plain text
805 #: build/C/man3/makecontext.3:121
806 msgid ""
807 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
808 "namely, this struct contains the start and length of a memory area to be "
809 "used as the stack, regardless of the direction of growth of the stack.  "
810 "Thus, it is not necessary for the user program to worry about this direction."
811 msgstr ""
812 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
813 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
814 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
815 "て、ユーザプログラムはこの件については心配しなくてよい。"
816
817 #. type: Plain text
818 #: build/C/man3/makecontext.3:137
819 msgid ""
820 "On architectures where I<int> and pointer types are the same size (e.g., "
821 "x86-32, where both types are 32 bits), you may be able to get away with "
822 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
823 "However, doing this is not guaranteed to be portable, is undefined according "
824 "to the standards, and won't work on architectures where pointers are larger "
825 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
826 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
827 "g., x86-64)."
828 msgstr ""
829 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
830 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
831 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
832 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
833 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
834 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
835 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
836 "できるようになっている。"
837
838 #. type: SH
839 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
840 #: build/C/man3/pthread_attr_setdetachstate.3:108
841 #: build/C/man3/pthread_attr_setguardsize.3:155
842 #: build/C/man3/pthread_attr_setinheritsched.3:119
843 #: build/C/man3/pthread_attr_setschedparam.3:95
844 #: build/C/man3/pthread_attr_setschedpolicy.3:91
845 #: build/C/man3/pthread_attr_setstack.3:153
846 #: build/C/man3/pthread_attr_setstacksize.3:108
847 #: build/C/man3/pthread_cancel.3:132 build/C/man3/pthread_cleanup_push.3:151
848 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
849 #: build/C/man3/pthread_getattr_np.3:101
850 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
851 #: build/C/man3/pthread_setaffinity_np.3:154
852 #: build/C/man3/pthread_setcancelstate.3:174
853 #: build/C/man3/pthread_setname_np.3:112
854 #: build/C/man3/pthread_setschedparam.3:149 build/C/man3/pthread_sigmask.3:61
855 #: build/C/man3/pthread_testcancel.3:60 build/C/man3/pthread_tryjoin_np.3:115
856 #, no-wrap
857 msgid "EXAMPLE"
858 msgstr "例"
859
860 #. type: Plain text
861 #: build/C/man3/makecontext.3:145
862 msgid ""
863 "The example program below demonstrates the use of B<getcontext>(3), "
864 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
865 "following output:"
866 msgstr ""
867 "以下のサンプル・プログラムは、 B<getcontext>(3), B<makecontext>(), "
868 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
869 "と、以下のような出力が得られる:"
870
871 #. type: Plain text
872 #: build/C/man3/makecontext.3:157
873 #, no-wrap
874 msgid ""
875 "$B< ./a.out>\n"
876 "main: swapcontext(&uctx_main, &uctx_func2)\n"
877 "func2: started\n"
878 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
879 "func1: started\n"
880 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
881 "func2: returning\n"
882 "func1: returning\n"
883 "main: exiting\n"
884 msgstr ""
885 "$B< ./a.out>\n"
886 "main: swapcontext(&uctx_main, &uctx_func2)\n"
887 "func2: started\n"
888 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
889 "func1: started\n"
890 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
891 "func2: returning\n"
892 "func1: returning\n"
893 "main: exiting\n"
894
895 #. type: SS
896 #: build/C/man3/makecontext.3:159 build/C/man3/pthread_attr_init.3:148
897 #: build/C/man3/pthread_cancel.3:148 build/C/man3/pthread_cleanup_push.3:227
898 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
899 #: build/C/man3/pthread_getcpuclockid.3:95
900 #: build/C/man3/pthread_setname_np.3:138
901 #: build/C/man3/pthread_setschedparam.3:224 build/C/man3/pthread_sigmask.3:79
902 #, no-wrap
903 msgid "Program source"
904 msgstr "プログラムのソース"
905
906 #. type: Plain text
907 #: build/C/man3/makecontext.3:165
908 #, no-wrap
909 msgid ""
910 "#include E<lt>ucontext.hE<gt>\n"
911 "#include E<lt>stdio.hE<gt>\n"
912 "#include E<lt>stdlib.hE<gt>\n"
913 msgstr ""
914 "#include E<lt>ucontext.hE<gt>\n"
915 "#include E<lt>stdio.hE<gt>\n"
916 "#include E<lt>stdlib.hE<gt>\n"
917
918 #. type: Plain text
919 #: build/C/man3/makecontext.3:167
920 #, no-wrap
921 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
922 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
923
924 #. type: Plain text
925 #: build/C/man3/makecontext.3:170
926 #, no-wrap
927 msgid ""
928 "#define handle_error(msg) \\e\n"
929 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
930 msgstr ""
931 "#define handle_error(msg) \\e\n"
932 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
933
934 #. type: Plain text
935 #: build/C/man3/makecontext.3:180
936 #, no-wrap
937 msgid ""
938 "static void\n"
939 "func1(void)\n"
940 "{\n"
941 "    printf(\"func1: started\\en\");\n"
942 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
943 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
944 "        handle_error(\"swapcontext\");\n"
945 "    printf(\"func1: returning\\en\");\n"
946 "}\n"
947 msgstr ""
948 "static void\n"
949 "func1(void)\n"
950 "{\n"
951 "    printf(\"func1: started\\en\");\n"
952 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
953 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
954 "        handle_error(\"swapcontext\");\n"
955 "    printf(\"func1: returning\\en\");\n"
956 "}\n"
957
958 #. type: Plain text
959 #: build/C/man3/makecontext.3:190
960 #, no-wrap
961 msgid ""
962 "static void\n"
963 "func2(void)\n"
964 "{\n"
965 "    printf(\"func2: started\\en\");\n"
966 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
967 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
968 "        handle_error(\"swapcontext\");\n"
969 "    printf(\"func2: returning\\en\");\n"
970 "}\n"
971 msgstr ""
972 "static void\n"
973 "func2(void)\n"
974 "{\n"
975 "    printf(\"func2: started\\en\");\n"
976 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
977 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
978 "        handle_error(\"swapcontext\");\n"
979 "    printf(\"func2: returning\\en\");\n"
980 "}\n"
981
982 #. type: Plain text
983 #: build/C/man3/makecontext.3:196
984 #, no-wrap
985 msgid ""
986 "int\n"
987 "main(int argc, char *argv[])\n"
988 "{\n"
989 "    char func1_stack[16384];\n"
990 "    char func2_stack[16384];\n"
991 msgstr ""
992 "int\n"
993 "main(int argc, char *argv[])\n"
994 "{\n"
995 "    char func1_stack[16384];\n"
996 "    char func2_stack[16384];\n"
997
998 #. type: Plain text
999 #: build/C/man3/makecontext.3:203
1000 #, no-wrap
1001 msgid ""
1002 "    if (getcontext(&uctx_func1) == -1)\n"
1003 "        handle_error(\"getcontext\");\n"
1004 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1005 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1006 "    uctx_func1.uc_link = &uctx_main;\n"
1007 "    makecontext(&uctx_func1, func1, 0);\n"
1008 msgstr ""
1009 "    if (getcontext(&uctx_func1) == -1)\n"
1010 "        handle_error(\"getcontext\");\n"
1011 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1012 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1013 "    uctx_func1.uc_link = &uctx_main;\n"
1014 "    makecontext(&uctx_func1, func1, 0);\n"
1015
1016 #. type: Plain text
1017 #: build/C/man3/makecontext.3:211
1018 #, no-wrap
1019 msgid ""
1020 "    if (getcontext(&uctx_func2) == -1)\n"
1021 "        handle_error(\"getcontext\");\n"
1022 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1023 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1024 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1025 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1026 "    makecontext(&uctx_func2, func2, 0);\n"
1027 msgstr ""
1028 "    if (getcontext(&uctx_func2) == -1)\n"
1029 "        handle_error(\"getcontext\");\n"
1030 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1031 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1032 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1033 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1034 "    makecontext(&uctx_func2, func2, 0);\n"
1035
1036 #. type: Plain text
1037 #: build/C/man3/makecontext.3:215
1038 #, no-wrap
1039 msgid ""
1040 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1041 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1042 "        handle_error(\"swapcontext\");\n"
1043 msgstr ""
1044 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1045 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1046 "        handle_error(\"swapcontext\");\n"
1047
1048 #. type: Plain text
1049 #: build/C/man3/makecontext.3:219
1050 #, no-wrap
1051 msgid ""
1052 "    printf(\"main: exiting\\en\");\n"
1053 "    exit(EXIT_SUCCESS);\n"
1054 "}\n"
1055 msgstr ""
1056 "    printf(\"main: exiting\\en\");\n"
1057 "    exit(EXIT_SUCCESS);\n"
1058 "}\n"
1059
1060 #. type: Plain text
1061 #: build/C/man3/makecontext.3:226
1062 msgid ""
1063 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1064 "B<sigsetjmp>(3)"
1065 msgstr ""
1066 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1067 "B<sigsetjmp>(3)"
1068
1069 #. type: TH
1070 #: build/C/man3/pthread_attr_init.3:26
1071 #, no-wrap
1072 msgid "PTHREAD_ATTR_INIT"
1073 msgstr "PTHREAD_ATTR_INIT"
1074
1075 #. type: TH
1076 #: build/C/man3/pthread_attr_init.3:26
1077 #, no-wrap
1078 msgid "2008-11-11"
1079 msgstr "2008-11-11"
1080
1081 #. type: Plain text
1082 #: build/C/man3/pthread_attr_init.3:30
1083 msgid ""
1084 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1085 "attributes object"
1086 msgstr ""
1087 "pthread_attr_init, pthread_attr_destroy - \n"
1088 "スレッド属性オブジェクトの初期化と破棄を行う"
1089
1090 #. type: Plain text
1091 #: build/C/man3/pthread_attr_init.3:33
1092 #: build/C/man3/pthread_attr_setdetachstate.3:33
1093 #: build/C/man3/pthread_attr_setguardsize.3:33
1094 #: build/C/man3/pthread_attr_setinheritsched.3:33
1095 #: build/C/man3/pthread_attr_setschedparam.3:33
1096 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1097 #: build/C/man3/pthread_attr_setscope.3:33
1098 #: build/C/man3/pthread_attr_setstack.3:33
1099 #: build/C/man3/pthread_attr_setstackaddr.3:33
1100 #: build/C/man3/pthread_attr_setstacksize.3:33
1101 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1102 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1103 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1104 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1105 #: build/C/man3/pthread_join.3:32
1106 #: build/C/man3/pthread_kill_other_threads_np.3:32
1107 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1108 #: build/C/man3/pthread_setconcurrency.3:32
1109 #: build/C/man3/pthread_setschedparam.3:33
1110 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1111 #: build/C/man3/pthread_testcancel.3:32
1112 #, no-wrap
1113 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1114 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1115
1116 #. type: Plain text
1117 #: build/C/man3/pthread_attr_init.3:36
1118 #, no-wrap
1119 msgid ""
1120 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1121 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1122 msgstr ""
1123 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1124 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1125
1126 #. type: Plain text
1127 #: build/C/man3/pthread_attr_init.3:38
1128 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1129 #: build/C/man3/pthread_attr_setdetachstate.3:40
1130 #: build/C/man3/pthread_attr_setguardsize.3:40
1131 #: build/C/man3/pthread_attr_setinheritsched.3:40
1132 #: build/C/man3/pthread_attr_setschedparam.3:40
1133 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1134 #: build/C/man3/pthread_attr_setscope.3:40
1135 #: build/C/man3/pthread_attr_setstack.3:40
1136 #: build/C/man3/pthread_attr_setstackaddr.3:40
1137 #: build/C/man3/pthread_attr_setstacksize.3:40
1138 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1139 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1140 #: build/C/man3/pthread_getattr_np.3:37
1141 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1142 #: build/C/man3/pthread_setaffinity_np.3:41
1143 #: build/C/man3/pthread_setcancelstate.3:38
1144 #: build/C/man3/pthread_setconcurrency.3:37
1145 #: build/C/man3/pthread_setschedparam.3:40
1146 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1147 #, no-wrap
1148 msgid "Compile and link with I<-pthread>.\n"
1149 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1150
1151 #. type: Plain text
1152 #: build/C/man3/pthread_attr_init.3:50
1153 msgid ""
1154 "The B<pthread_attr_init>()  function initializes the thread attributes "
1155 "object pointed to by I<attr> with default attribute values.  After this "
1156 "call, individual attributes of the object can be set using various related "
1157 "functions (listed under SEE ALSO), and then the object can be used in one or "
1158 "more B<pthread_create>(3)  calls that create threads."
1159 msgstr ""
1160 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1161 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1162 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1163 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1164 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1165 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1166
1167 #. type: Plain text
1168 #: build/C/man3/pthread_attr_init.3:55
1169 msgid ""
1170 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1171 "already been initialized results in undefined behavior."
1172 msgstr ""
1173 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1174 "B<pthread_attr_init>() を呼び出した場合、\n"
1175 "どのような動作になるかは不定である。"
1176
1177 #. type: Plain text
1178 #: build/C/man3/pthread_attr_init.3:62
1179 msgid ""
1180 "When a thread attributes object is no longer required, it should be "
1181 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1182 "thread attributes object has no effect on threads that were created using "
1183 "that object."
1184 msgstr ""
1185 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1186 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1187 "スレッド属性オブジェクトを破棄しても、\n"
1188 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1189
1190 #. type: Plain text
1191 #: build/C/man3/pthread_attr_init.3:68
1192 msgid ""
1193 "Once a thread attributes object has been destroyed, it can be reinitialized "
1194 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1195 "attributes object has undefined results."
1196 msgstr ""
1197 "いったん破棄したスレッド属性オブジェクトは、\n"
1198 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1199 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1200 "使った場合の結果は不定である。"
1201
1202 #. type: Plain text
1203 #: build/C/man3/pthread_attr_init.3:71
1204 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1205 #: build/C/man3/pthread_attr_setdetachstate.3:80
1206 #: build/C/man3/pthread_attr_setguardsize.3:93
1207 #: build/C/man3/pthread_attr_setinheritsched.3:87
1208 #: build/C/man3/pthread_attr_setschedparam.3:77
1209 #: build/C/man3/pthread_attr_setschedpolicy.3:75
1210 #: build/C/man3/pthread_attr_setscope.3:94
1211 #: build/C/man3/pthread_attr_setstack.3:88
1212 #: build/C/man3/pthread_attr_setstackaddr.3:77
1213 #: build/C/man3/pthread_attr_setstacksize.3:64
1214 #: build/C/man3/pthread_setaffinity_np.3:80
1215 #: build/C/man3/pthread_setcancelstate.3:95
1216 #: build/C/man3/pthread_setname_np.3:75
1217 msgid ""
1218 "On success, these functions return 0; on error, they return a nonzero error "
1219 "number."
1220 msgstr ""
1221 "成功すると、これらの関数は 0 を返す。\n"
1222 "エラーの場合、0 以外のエラー番号を返す。"
1223
1224 #. type: Plain text
1225 #: build/C/man3/pthread_attr_init.3:79
1226 msgid ""
1227 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1228 "Linux these functions always succeed (but portable and future-proof "
1229 "applications should nevertheless handle a possible error return)."
1230 msgstr ""
1231 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1232 "記載されている。\n"
1233 "Linux では、これらの関数は常に成功する\n"
1234 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1235 "正のエラーの返り値を処理するようにすべきである)。"
1236
1237 #. type: Plain text
1238 #: build/C/man3/pthread_attr_init.3:81
1239 #: build/C/man3/pthread_attr_setdetachstate.3:89
1240 #: build/C/man3/pthread_attr_setguardsize.3:108
1241 #: build/C/man3/pthread_attr_setinheritsched.3:103
1242 #: build/C/man3/pthread_attr_setschedparam.3:91
1243 #: build/C/man3/pthread_attr_setschedpolicy.3:91
1244 #: build/C/man3/pthread_attr_setscope.3:109
1245 #: build/C/man3/pthread_attr_setstack.3:114
1246 #: build/C/man3/pthread_attr_setstacksize.3:85
1247 #: build/C/man3/pthread_cancel.3:124 build/C/man3/pthread_cleanup_push.3:127
1248 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1249 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1250 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1251 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:52
1252 #: build/C/man3/pthread_setcancelstate.3:115
1253 #: build/C/man3/pthread_setconcurrency.3:85
1254 #: build/C/man3/pthread_setschedparam.3:143
1255 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
1256 #: build/C/man3/pthread_testcancel.3:60
1257 msgid "POSIX.1-2001."
1258 msgstr "POSIX.1-2001."
1259
1260 #. type: Plain text
1261 #: build/C/man3/pthread_attr_init.3:87
1262 msgid ""
1263 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1264 "object other than via pthreads functions is nonportable and produces "
1265 "undefined results."
1266 msgstr ""
1267 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1268 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1269 "どのような結果が得られるかも分からない。"
1270
1271 #. type: Plain text
1272 #: build/C/man3/pthread_attr_init.3:96
1273 msgid ""
1274 "The program below optionally makes use of B<pthread_attr_init>()  and "
1275 "various related functions to initialize a thread attributes object that is "
1276 "used to create a single thread.  Once created, the thread uses the "
1277 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1278 "the thread's attributes, and then displays those attributes."
1279 msgstr ""
1280 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1281 "スレッド属性オブジェクトの初期化を行い、\n"
1282 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1283 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1284 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1285 "取得した属性を表示する。"
1286
1287 #. type: Plain text
1288 #: build/C/man3/pthread_attr_init.3:105
1289 msgid ""
1290 "If the program is run with no command-line argument, then it passes NULL as "
1291 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1292 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1293 "threading implementation, we see the following:"
1294 msgstr ""
1295 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1296 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1297 "この場合、スレッドはデフォルトの属性で作成される。\n"
1298 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1299 "動作させると、以下のような出力が得られる。"
1300
1301 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1302 #. type: Plain text
1303 #: build/C/man3/pthread_attr_init.3:121
1304 #, no-wrap
1305 msgid ""
1306 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1307 "unlimited\n"
1308 "$B< ./a.out>\n"
1309 "Thread attributes:\n"
1310 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1311 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1312 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1313 "        Scheduling policy   = SCHED_OTHER\n"
1314 "        Scheduling priority = 0\n"
1315 "        Guard size          = 4096 bytes\n"
1316 "        Stack address       = 0x40196000\n"
1317 "        Stack size          = 0x201000 bytes\n"
1318 msgstr ""
1319 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1320 "unlimited\n"
1321 "$B< ./a.out>\n"
1322 "Thread attributes:\n"
1323 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1324 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1325 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1326 "        Scheduling policy   = SCHED_OTHER\n"
1327 "        Scheduling priority = 0\n"
1328 "        Guard size          = 4096 bytes\n"
1329 "        Stack address       = 0x40196000\n"
1330 "        Stack size          = 0x201000 bytes\n"
1331
1332 #. type: Plain text
1333 #: build/C/man3/pthread_attr_init.3:131
1334 msgid ""
1335 "When we supply a stack size as a command-line argument, the program "
1336 "initializes a thread attributes object, sets various attributes in that "
1337 "object, and passes a pointer to the object in the call to B<pthread_create>"
1338 "(3).  Running the program on Linux/x86-32 with the NPTL threading "
1339 "implementation, we see the following:"
1340 msgstr ""
1341 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1342 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1343 "そのオブジェクトの各種属性を設定し、\n"
1344 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1345 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1346 "動作させると、以下のような出力が得られる。"
1347
1348 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1349 #. type: Plain text
1350 #: build/C/man3/pthread_attr_init.3:146
1351 #, no-wrap
1352 msgid ""
1353 "$B< ./a.out 0x3000000>\n"
1354 "posix_memalign() allocated at 0x40197000\n"
1355 "Thread attributes:\n"
1356 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1357 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1358 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1359 "        Scheduling policy   = SCHED_OTHER\n"
1360 "        Scheduling priority = 0\n"
1361 "        Guard size          = 0 bytes\n"
1362 "        Stack address       = 0x40197000\n"
1363 "        Stack size          = 0x3000000 bytes\n"
1364 msgstr ""
1365 "$B< ./a.out 0x3000000>\n"
1366 "posix_memalign() allocated at 0x40197000\n"
1367 "Thread attributes:\n"
1368 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1369 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1370 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1371 "        Scheduling policy   = SCHED_OTHER\n"
1372 "        Scheduling priority = 0\n"
1373 "        Guard size          = 0 bytes\n"
1374 "        Stack address       = 0x40197000\n"
1375 "        Stack size          = 0x3000000 bytes\n"
1376
1377 #. type: Plain text
1378 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1379 #, no-wrap
1380 msgid ""
1381 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1382 "#include E<lt>pthread.hE<gt>\n"
1383 "#include E<lt>stdio.hE<gt>\n"
1384 "#include E<lt>stdlib.hE<gt>\n"
1385 "#include E<lt>unistd.hE<gt>\n"
1386 "#include E<lt>errno.hE<gt>\n"
1387 msgstr ""
1388 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1389 "#include E<lt>pthread.hE<gt>\n"
1390 "#include E<lt>stdio.hE<gt>\n"
1391 "#include E<lt>stdlib.hE<gt>\n"
1392 "#include E<lt>unistd.hE<gt>\n"
1393 "#include E<lt>errno.hE<gt>\n"
1394
1395 #. type: Plain text
1396 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:159
1397 #: build/C/man3/pthread_cleanup_push.3:239 build/C/man3/pthread_create.3:254
1398 #: build/C/man3/pthread_getattr_np.3:191
1399 #: build/C/man3/pthread_getcpuclockid.3:113
1400 #: build/C/man3/pthread_setaffinity_np.3:172
1401 #: build/C/man3/pthread_setschedparam.3:237 build/C/man3/pthread_sigmask.3:93
1402 #, no-wrap
1403 msgid ""
1404 "#define handle_error_en(en, msg) \\e\n"
1405 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1406 msgstr ""
1407 "#define handle_error_en(en, msg) \\e\n"
1408 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1409
1410 #. type: Plain text
1411 #: build/C/man3/pthread_attr_init.3:168
1412 #, no-wrap
1413 msgid ""
1414 "static void\n"
1415 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1416 "{\n"
1417 "    int s, i;\n"
1418 "    size_t v;\n"
1419 "    void *stkaddr;\n"
1420 "    struct sched_param sp;\n"
1421 msgstr ""
1422 "static void\n"
1423 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1424 "{\n"
1425 "    int s, i;\n"
1426 "    size_t v;\n"
1427 "    void *stkaddr;\n"
1428 "    struct sched_param sp;\n"
1429
1430 #. type: Plain text
1431 #: build/C/man3/pthread_attr_init.3:176
1432 #, no-wrap
1433 msgid ""
1434 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1435 "    if (s != 0)\n"
1436 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1437 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1438 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1439 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1440 "            \"???\");\n"
1441 msgstr ""
1442 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1443 "    if (s != 0)\n"
1444 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1445 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1446 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1447 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1448 "            \"???\");\n"
1449
1450 #. type: Plain text
1451 #: build/C/man3/pthread_attr_init.3:184
1452 #, no-wrap
1453 msgid ""
1454 "    s = pthread_attr_getscope(attr, &i);\n"
1455 "    if (s != 0)\n"
1456 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1457 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1458 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1459 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1460 "            \"???\");\n"
1461 msgstr ""
1462 "    s = pthread_attr_getscope(attr, &i);\n"
1463 "    if (s != 0)\n"
1464 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1465 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1466 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1467 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1468 "            \"???\");\n"
1469
1470 #. type: Plain text
1471 #: build/C/man3/pthread_attr_init.3:192
1472 #, no-wrap
1473 msgid ""
1474 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1475 "    if (s != 0)\n"
1476 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1477 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1478 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1479 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1480 "            \"???\");\n"
1481 msgstr ""
1482 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1483 "    if (s != 0)\n"
1484 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1485 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1486 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1487 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1488 "            \"???\");\n"
1489
1490 #. type: Plain text
1491 #: build/C/man3/pthread_attr_init.3:201
1492 #, no-wrap
1493 msgid ""
1494 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1495 "    if (s != 0)\n"
1496 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1497 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1498 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1499 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1500 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1501 "            \"???\");\n"
1502 msgstr ""
1503 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1504 "    if (s != 0)\n"
1505 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1506 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1507 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1508 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1509 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1510 "            \"???\");\n"
1511
1512 #. type: Plain text
1513 #: build/C/man3/pthread_attr_init.3:206
1514 #, no-wrap
1515 msgid ""
1516 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1517 "    if (s != 0)\n"
1518 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1519 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1520 msgstr ""
1521 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1522 "    if (s != 0)\n"
1523 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1524 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1525
1526 #. type: Plain text
1527 #: build/C/man3/pthread_attr_init.3:211
1528 #, no-wrap
1529 msgid ""
1530 "    s = pthread_attr_getguardsize(attr, &v);\n"
1531 "    if (s != 0)\n"
1532 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1533 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1534 msgstr ""
1535 "    s = pthread_attr_getguardsize(attr, &v);\n"
1536 "    if (s != 0)\n"
1537 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1538 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1539
1540 #. type: Plain text
1541 #: build/C/man3/pthread_attr_init.3:218
1542 #, no-wrap
1543 msgid ""
1544 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1545 "    if (s != 0)\n"
1546 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1547 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1548 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1549 "}\n"
1550 msgstr ""
1551 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1552 "    if (s != 0)\n"
1553 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1554 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1555 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1556 "}\n"
1557
1558 #. type: Plain text
1559 #: build/C/man3/pthread_attr_init.3:224
1560 #, no-wrap
1561 msgid ""
1562 "static void *\n"
1563 "thread_start(void *arg)\n"
1564 "{\n"
1565 "    int s;\n"
1566 "    pthread_attr_t gattr;\n"
1567 msgstr ""
1568 "static void *\n"
1569 "thread_start(void *arg)\n"
1570 "{\n"
1571 "    int s;\n"
1572 "    pthread_attr_t gattr;\n"
1573
1574 #. type: Plain text
1575 #: build/C/man3/pthread_attr_init.3:228
1576 #, no-wrap
1577 msgid ""
1578 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1579 "       retrieves the attributes of the thread specified in its\n"
1580 "       first argument */\n"
1581 msgstr ""
1582 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1583 "       retrieves the attributes of the thread specified in its\n"
1584 "       first argument */\n"
1585
1586 #. type: Plain text
1587 #: build/C/man3/pthread_attr_init.3:232
1588 #, no-wrap
1589 msgid ""
1590 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1591 "    if (s != 0)\n"
1592 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1593 msgstr ""
1594 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1595 "    if (s != 0)\n"
1596 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1597
1598 #. type: Plain text
1599 #: build/C/man3/pthread_attr_init.3:235
1600 #, no-wrap
1601 msgid ""
1602 "    printf(\"Thread attributes:\\en\");\n"
1603 "    display_pthread_attr(&gattr, \"\\et\");\n"
1604 msgstr ""
1605 "    printf(\"Thread attributes:\\en\");\n"
1606 "    display_pthread_attr(&gattr, \"\\et\");\n"
1607
1608 #. type: Plain text
1609 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1610 #, no-wrap
1611 msgid ""
1612 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1613 "}\n"
1614 msgstr ""
1615 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1616 "}\n"
1617
1618 #. type: Plain text
1619 #: build/C/man3/pthread_attr_init.3:246
1620 #, no-wrap
1621 msgid ""
1622 "int\n"
1623 "main(int argc, char *argv[])\n"
1624 "{\n"
1625 "    pthread_t thr;\n"
1626 "    pthread_attr_t attr;\n"
1627 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1628 "    int s;\n"
1629 msgstr ""
1630 "int\n"
1631 "main(int argc, char *argv[])\n"
1632 "{\n"
1633 "    pthread_t thr;\n"
1634 "    pthread_attr_t attr;\n"
1635 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1636 "    int s;\n"
1637
1638 #. type: Plain text
1639 #: build/C/man3/pthread_attr_init.3:248
1640 #: build/C/man3/pthread_setschedparam.3:355
1641 #, no-wrap
1642 msgid "    attrp = NULL;\n"
1643 msgstr "    attrp = NULL;\n"
1644
1645 #. type: Plain text
1646 #: build/C/man3/pthread_attr_init.3:252
1647 #, no-wrap
1648 msgid ""
1649 "    /* If a command-line argument was supplied, use it to set the\n"
1650 "       stack-size attribute and set a few other thread attributes,\n"
1651 "       and set attrp pointing to thread attributes object */\n"
1652 msgstr ""
1653 "    /* If a command-line argument was supplied, use it to set the\n"
1654 "       stack-size attribute and set a few other thread attributes,\n"
1655 "       and set attrp pointing to thread attributes object */\n"
1656
1657 #. type: Plain text
1658 #: build/C/man3/pthread_attr_init.3:256
1659 #, no-wrap
1660 msgid ""
1661 "    if (argc E<gt> 1) {\n"
1662 "        int stack_size;\n"
1663 "        void *sp;\n"
1664 msgstr ""
1665 "    if (argc E<gt> 1) {\n"
1666 "        int stack_size;\n"
1667 "        void *sp;\n"
1668
1669 #. type: Plain text
1670 #: build/C/man3/pthread_attr_init.3:258
1671 #, no-wrap
1672 msgid "        attrp = &attr;\n"
1673 msgstr "        attrp = &attr;\n"
1674
1675 #. type: Plain text
1676 #: build/C/man3/pthread_attr_init.3:262
1677 #, no-wrap
1678 msgid ""
1679 "        s = pthread_attr_init(&attr);\n"
1680 "        if (s != 0)\n"
1681 "            handle_error_en(s, \"pthread_attr_init\");\n"
1682 msgstr ""
1683 "        s = pthread_attr_init(&attr);\n"
1684 "        if (s != 0)\n"
1685 "            handle_error_en(s, \"pthread_attr_init\");\n"
1686
1687 #. type: Plain text
1688 #: build/C/man3/pthread_attr_init.3:266
1689 #, no-wrap
1690 msgid ""
1691 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1692 "        if (s != 0)\n"
1693 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1694 msgstr ""
1695 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1696 "        if (s != 0)\n"
1697 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1698
1699 #. type: Plain text
1700 #: build/C/man3/pthread_attr_init.3:270
1701 #, no-wrap
1702 msgid ""
1703 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1704 "        if (s != 0)\n"
1705 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1706 msgstr ""
1707 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1708 "        if (s != 0)\n"
1709 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1710
1711 #. type: Plain text
1712 #: build/C/man3/pthread_attr_init.3:272
1713 #, no-wrap
1714 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1715 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1716
1717 #. type: Plain text
1718 #: build/C/man3/pthread_attr_init.3:276
1719 #, no-wrap
1720 msgid ""
1721 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1722 "        if (s != 0)\n"
1723 "            handle_error_en(s, \"posix_memalign\");\n"
1724 msgstr ""
1725 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1726 "        if (s != 0)\n"
1727 "            handle_error_en(s, \"posix_memalign\");\n"
1728
1729 #. type: Plain text
1730 #: build/C/man3/pthread_attr_init.3:278
1731 #, no-wrap
1732 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1733 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1734
1735 #. type: Plain text
1736 #: build/C/man3/pthread_attr_init.3:283
1737 #, no-wrap
1738 msgid ""
1739 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1740 "        if (s != 0)\n"
1741 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1742 "    }\n"
1743 msgstr ""
1744 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1745 "        if (s != 0)\n"
1746 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1747 "    }\n"
1748
1749 #. type: Plain text
1750 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1751 #, no-wrap
1752 msgid ""
1753 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1754 "    if (s != 0)\n"
1755 "        handle_error_en(s, \"pthread_create\");\n"
1756 msgstr ""
1757 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1758 "    if (s != 0)\n"
1759 "        handle_error_en(s, \"pthread_create\");\n"
1760
1761 #. type: Plain text
1762 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1763 #, no-wrap
1764 msgid ""
1765 "    if (attrp != NULL) {\n"
1766 "        s = pthread_attr_destroy(attrp);\n"
1767 "        if (s != 0)\n"
1768 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1769 "    }\n"
1770 msgstr ""
1771 "    if (attrp != NULL) {\n"
1772 "        s = pthread_attr_destroy(attrp);\n"
1773 "        if (s != 0)\n"
1774 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1775 "    }\n"
1776
1777 #. type: Plain text
1778 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1779 #, no-wrap
1780 msgid ""
1781 "    pause();    /* Terminates when other thread calls exit() */\n"
1782 "}\n"
1783 msgstr ""
1784 "    pause();    /* Terminates when other thread calls exit() */\n"
1785 "}\n"
1786
1787 #. type: Plain text
1788 #: build/C/man3/pthread_attr_init.3:313
1789 msgid ""
1790 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1791 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1792 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1793 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1794 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1795 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1796 msgstr ""
1797 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1798 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1799 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1800 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1801 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1802 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1803
1804 #. type: TH
1805 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1806 #, no-wrap
1807 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1808 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1809
1810 #. type: TH
1811 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1812 #: build/C/man3/pthread_getattr_np.3:26
1813 #: build/C/man3/pthread_setaffinity_np.3:26
1814 #: build/C/man3/pthread_tryjoin_np.3:26
1815 #, no-wrap
1816 msgid "2010-09-10"
1817 msgstr "2010-09-10"
1818
1819 #. type: Plain text
1820 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1821 msgid ""
1822 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1823 "affinity attribute in thread attributes object"
1824 msgstr ""
1825 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1826 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1827
1828 #. type: Plain text
1829 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1830 #: build/C/man3/pthread_getattr_np.3:33
1831 #: build/C/man3/pthread_setaffinity_np.3:34
1832 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1833 #, no-wrap
1834 msgid ""
1835 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1836 "B<#include E<lt>pthread.hE<gt>>\n"
1837 msgstr ""
1838 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1839 "B<#include E<lt>pthread.hE<gt>>\n"
1840
1841 #. type: Plain text
1842 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1843 #, no-wrap
1844 msgid ""
1845 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1846 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1847 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1848 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1849 msgstr ""
1850 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1851 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1852 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1853 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1854
1855 #. type: Plain text
1856 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1857 msgid ""
1858 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1859 "attribute of the thread attributes object referred to by I<attr> to the "
1860 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1861 "mask of a thread created using the thread attributes object I<attr>."
1862 msgstr ""
1863 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1864 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1865 "I<cpuset> で指定された値に設定する。\n"
1866 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1867 "作成されたスレッドの CPU affinity マスクが決定される。"
1868
1869 #. type: Plain text
1870 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1871 msgid ""
1872 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1873 "attribute of the thread attributes object referred to by I<attr> in the "
1874 "buffer pointed to by I<cpuset>."
1875 msgstr ""
1876 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1877 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1878 "I<cpuset> が指すバッファに入れて返す。"
1879
1880 #. type: Plain text
1881 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1882 msgid ""
1883 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1884 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
1885 "(cpu_set_t)>."
1886 msgstr ""
1887 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1888 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1889 "指定することだろう。"
1890
1891 #. type: Plain text
1892 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1893 #: build/C/man3/pthread_setaffinity_np.3:67
1894 msgid ""
1895 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1896 "description of a set of macros that can be used to manipulate and inspect "
1897 "CPU sets, see B<CPU_SET>(3)."
1898 msgstr ""
1899 "CPU affinity マスクの詳細については、 \n"
1900 "B<sched_setaffinity>(2) を参照してほしい。\n"
1901 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1902 "B<CPU_SET>(3) を参照してほしい。"
1903
1904 #. type: TP
1905 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1906 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1907 #: build/C/man3/pthread_attr_setdetachstate.3:83
1908 #: build/C/man3/pthread_attr_setinheritsched.3:90
1909 #: build/C/man3/pthread_attr_setschedpolicy.3:78
1910 #: build/C/man3/pthread_attr_setscope.3:97
1911 #: build/C/man3/pthread_attr_setstack.3:91
1912 #: build/C/man3/pthread_attr_setstacksize.3:67
1913 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1914 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1915 #: build/C/man3/pthread_kill.3:58 build/C/man3/pthread_setaffinity_np.3:84
1916 #: build/C/man3/pthread_setaffinity_np.3:93
1917 #: build/C/man3/pthread_setaffinity_np.3:109
1918 #: build/C/man3/pthread_setcancelstate.3:99
1919 #: build/C/man3/pthread_setcancelstate.3:107
1920 #: build/C/man3/pthread_setconcurrency.3:71
1921 #: build/C/man3/pthread_setschedparam.3:122
1922 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1923 #, no-wrap
1924 msgid "B<EINVAL>"
1925 msgstr "B<EINVAL>"
1926
1927 #.  cpumask_t
1928 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1929 #.  of the cpumask_t type.
1930 #. type: Plain text
1931 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1932 msgid ""
1933 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1934 "outside the set supported by the kernel.  (The kernel configuration option "
1935 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1936 "type used to represent CPU sets.)"
1937 msgstr ""
1938 "(B<pthread_attr_setaffinity_np>())\n"
1939 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1940 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1941 "は、\n"
1942 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
1943
1944 #. type: Plain text
1945 #: build/C/man3/pthread_attr_setaffinity_np.3:102
1946 msgid ""
1947 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
1948 "attributes object referred to by I<attr> lies outside the range specified by "
1949 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
1950 msgstr ""
1951 "(B<pthread_attr_getaffinity_np>())\n"
1952 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
1953 "I<cpusetsize> により指定された範囲の中になかった\n"
1954 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
1955
1956 #. type: Plain text
1957 #: build/C/man3/pthread_attr_setaffinity_np.3:106
1958 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
1959 msgstr ""
1960 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
1961
1962 #. type: Plain text
1963 #: build/C/man3/pthread_attr_setaffinity_np.3:108
1964 #: build/C/man3/pthread_setaffinity_np.3:121
1965 msgid "These functions are provided by glibc since version 2.3.4."
1966 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
1967
1968 #. type: Plain text
1969 #: build/C/man3/pthread_attr_setaffinity_np.3:111
1970 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
1971 #: build/C/man3/pthread_setaffinity_np.3:124
1972 #: build/C/man3/pthread_tryjoin_np.3:115
1973 msgid ""
1974 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
1975 "\" (nonportable) in the names."
1976 msgstr ""
1977 "これらの関数は非標準の GNU による拡張である。\n"
1978 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
1979 "付いている。"
1980
1981 #. type: Plain text
1982 #: build/C/man3/pthread_attr_setaffinity_np.3:118
1983 #: build/C/man3/pthread_setaffinity_np.3:150
1984 msgid ""
1985 "In glibc 2.3.3 only, versions of these functions were provided that did not "
1986 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
1987 "underlying system calls was always I<sizeof(cpu_set_t)>."
1988 msgstr ""
1989 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
1990 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
1991 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
1992 "常に I<sizeof(cpu_set_t)> であった。"
1993
1994 #. type: Plain text
1995 #: build/C/man3/pthread_attr_setaffinity_np.3:124
1996 msgid ""
1997 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
1998 "(3), B<cpuset>(7), B<pthreads>(7)"
1999 msgstr ""
2000 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2001 "(3), B<cpuset>(7), B<pthreads>(7)"
2002
2003 #. type: TH
2004 #: build/C/man3/pthread_attr_setdetachstate.3:26
2005 #, no-wrap
2006 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2007 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2008
2009 #. type: TH
2010 #: build/C/man3/pthread_attr_setdetachstate.3:26
2011 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2012 #, no-wrap
2013 msgid "2010-02-03"
2014 msgstr "2010-02-03"
2015
2016 #. type: Plain text
2017 #: build/C/man3/pthread_attr_setdetachstate.3:30
2018 msgid ""
2019 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2020 "state attribute in thread attributes object"
2021 msgstr ""
2022 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2023 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2024
2025 #. type: Plain text
2026 #: build/C/man3/pthread_attr_setdetachstate.3:38
2027 #, no-wrap
2028 msgid ""
2029 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2030 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2031 msgstr ""
2032 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2033 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2034
2035 #. type: Plain text
2036 #: build/C/man3/pthread_attr_setdetachstate.3:53
2037 msgid ""
2038 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2039 "attribute of the thread attributes object referred to by I<attr> to the "
2040 "value specified in I<detachstate>.  The detach state attribute determines "
2041 "whether a thread created using the thread attributes object I<attr> will be "
2042 "created in a joinable or a detached state."
2043 msgstr ""
2044 "B<pthread_attr_setdetachstate>() 関数は、\n"
2045 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2046 "I<detachstate> で指定された値に設定する。\n"
2047 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2048 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2049 "detached (切り離された) 状態で作成されるかが決定される。"
2050
2051 #. type: Plain text
2052 #: build/C/man3/pthread_attr_setdetachstate.3:56
2053 msgid "The following values may be specified in I<detachstate>:"
2054 msgstr "I<detachstate> には以下の値を指定できる。"
2055
2056 #. type: TP
2057 #: build/C/man3/pthread_attr_setdetachstate.3:56
2058 #, no-wrap
2059 msgid "B<PTHREAD_CREATE_DETACHED>"
2060 msgstr "B<PTHREAD_CREATE_DETACHED>"
2061
2062 #. type: Plain text
2063 #: build/C/man3/pthread_attr_setdetachstate.3:61
2064 msgid ""
2065 "Threads that are created using I<attr> will be created in a detached state."
2066 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2067
2068 #. type: TP
2069 #: build/C/man3/pthread_attr_setdetachstate.3:61
2070 #, no-wrap
2071 msgid "B<PTHREAD_CREATE_JOINABLE>"
2072 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2073
2074 #. type: Plain text
2075 #: build/C/man3/pthread_attr_setdetachstate.3:66
2076 msgid ""
2077 "Threads that are created using I<attr> will be created in a joinable state."
2078 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2079
2080 #. type: Plain text
2081 #: build/C/man3/pthread_attr_setdetachstate.3:70
2082 msgid ""
2083 "The default setting of the detach state attribute in a newly initialized "
2084 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2085 msgstr ""
2086 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2087 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2088
2089 #. type: Plain text
2090 #: build/C/man3/pthread_attr_setdetachstate.3:77
2091 msgid ""
2092 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2093 "the thread attributes object I<attr> in the buffer pointed to by "
2094 "I<detachstate>."
2095 msgstr ""
2096 "B<pthread_attr_getdetachstate>() は、\n"
2097 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2098 "I<detachstate> が指すバッファに入れて返す。"
2099
2100 #. type: Plain text
2101 #: build/C/man3/pthread_attr_setdetachstate.3:83
2102 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2103 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2104
2105 #. type: Plain text
2106 #: build/C/man3/pthread_attr_setdetachstate.3:87
2107 msgid "An invalid value was specified in I<detachstate>."
2108 msgstr "無効な値が I<detachstate> で指定された。"
2109
2110 #. type: Plain text
2111 #: build/C/man3/pthread_attr_setdetachstate.3:93
2112 msgid ""
2113 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2114 msgstr ""
2115 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2116 "B<pthread_create>(3) を参照。"
2117
2118 #. type: Plain text
2119 #: build/C/man3/pthread_attr_setdetachstate.3:101
2120 msgid ""
2121 "A thread that is created in a joinable state should eventually either be "
2122 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2123 "B<pthread_create>(3)."
2124 msgstr ""
2125 "join 可能状態で作成されたスレッドは、最終的に\n"
2126 "B<pthread_join>(3) を使って join するか、\n"
2127 "B<pthread_detach>(3) を使って切り離すか、\n"
2128 "のどちらかを行うべきである。"
2129
2130 #. type: Plain text
2131 #: build/C/man3/pthread_attr_setdetachstate.3:108
2132 msgid ""
2133 "It is an error to specify the thread ID of a thread that was created in a "
2134 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2135 "(3)."
2136 msgstr ""
2137 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2138 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2139 "エラーである。"
2140
2141 #. type: Plain text
2142 #: build/C/man3/pthread_attr_setdetachstate.3:111
2143 #: build/C/man3/pthread_attr_setstack.3:156
2144 msgid "See B<pthread_attr_init>(3)."
2145 msgstr "B<pthread_attr_init>(3) を参照。"
2146
2147 #. type: Plain text
2148 #: build/C/man3/pthread_attr_setdetachstate.3:117
2149 msgid ""
2150 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2151 "B<pthread_join>(3), B<pthreads>(7)"
2152 msgstr ""
2153 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2154 "B<pthread_join>(3), B<pthreads>(7)"
2155
2156 #. type: TH
2157 #: build/C/man3/pthread_attr_setguardsize.3:26
2158 #, no-wrap
2159 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2160 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2161
2162 #. type: TH
2163 #: build/C/man3/pthread_attr_setguardsize.3:26
2164 #: build/C/man3/pthread_attr_setscope.3:26
2165 #: build/C/man3/pthread_attr_setstack.3:26
2166 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2167 #, no-wrap
2168 msgid "2008-10-24"
2169 msgstr "2008-10-24"
2170
2171 #. type: Plain text
2172 #: build/C/man3/pthread_attr_setguardsize.3:30
2173 msgid ""
2174 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2175 "attribute in thread attributes object"
2176 msgstr ""
2177 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2178 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2179
2180 #. type: Plain text
2181 #: build/C/man3/pthread_attr_setguardsize.3:38
2182 #, no-wrap
2183 msgid ""
2184 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2185 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2186 msgstr ""
2187 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2188 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2189
2190 #. type: Plain text
2191 #: build/C/man3/pthread_attr_setguardsize.3:49
2192 msgid ""
2193 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2194 "of the thread attributes object referred to by I<attr> to the value "
2195 "specified in I<guardsize>."
2196 msgstr ""
2197 "B<pthread_attr_setguardsize>() 関数は、\n"
2198 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2199 "I<guardsize> で指定された値に設定する。"
2200
2201 #. type: Plain text
2202 #: build/C/man3/pthread_attr_setguardsize.3:59
2203 msgid ""
2204 "If I<guardsize> is greater than 0, then for each new thread created using "
2205 "I<attr> the system allocates an additional region of at least I<guardsize> "
2206 "bytes at the end of the thread's stack to act as the guard area for the "
2207 "stack (but see BUGS)."
2208 msgstr ""
2209 "I<guardsize> が 0 より大きい場合、\n"
2210 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2211 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2212 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2213 "機能する (ただし「バグ」の節も参照)。"
2214
2215 #. type: Plain text
2216 #: build/C/man3/pthread_attr_setguardsize.3:65
2217 msgid ""
2218 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2219 "guard area."
2220 msgstr ""
2221 "I<guardsize> が 0 の場合、\n"
2222 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2223
2224 #. type: Plain text
2225 #: build/C/man3/pthread_attr_setguardsize.3:67
2226 msgid "The default guard size is the same as the system page size."
2227 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2228
2229 #. type: Plain text
2230 #: build/C/man3/pthread_attr_setguardsize.3:82
2231 msgid ""
2232 "If the stack address attribute has been set in I<attr> (using "
2233 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2234 "that the caller is allocating the thread's stack, then the guard size "
2235 "attribute is ignored (i.e., no guard area is created by the system): it is "
2236 "the application's responsibility to handle stack overflow (perhaps by using "
2237 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2238 "it has allocated)."
2239 msgstr ""
2240 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2241 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2242 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2243 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2244 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2245 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2246 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2247
2248 #. type: Plain text
2249 #: build/C/man3/pthread_attr_setguardsize.3:90
2250 msgid ""
2251 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2252 "attribute of the thread attributes object referred to by I<attr> in the "
2253 "buffer pointed to by I<guardsize>."
2254 msgstr ""
2255 "B<pthread_attr_getguardsize>() は、\n"
2256 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2257 "I<guardsize> が指すバッファに入れて返す。"
2258
2259 #. type: Plain text
2260 #: build/C/man3/pthread_attr_setguardsize.3:104
2261 msgid ""
2262 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2263 "invalid.  On Linux these functions always succeed (but portable and future-"
2264 "proof applications should nevertheless handle a possible error return)."
2265 msgstr ""
2266 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2267 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2268 "Linux では、これらの関数は常に成功する\n"
2269 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2270 "正のエラーの返り値を処理するようにすべきである)。"
2271
2272 #. type: Plain text
2273 #: build/C/man3/pthread_attr_setguardsize.3:106
2274 #: build/C/man3/pthread_attr_setstackaddr.3:83
2275 #: build/C/man3/pthread_attr_setstacksize.3:83
2276 msgid "These functions are provided by glibc since version 2.1."
2277 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2278
2279 #. type: Plain text
2280 #: build/C/man3/pthread_attr_setguardsize.3:122
2281 msgid ""
2282 "A guard area consists of virtual memory pages that are protected to prevent "
2283 "read and write access.  If a thread overflows its stack into the guard area, "
2284 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2285 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2286 "guard size is internally rounded up to the system page size when creating a "
2287 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2288 "size that was set by B<pthread_attr_setguardsize>().)"
2289 msgstr ""
2290 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2291 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2292 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2293 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2294 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2295 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2296 "(その場合も B<pthread_attr_getguardsize>() では\n"
2297 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2298
2299 #. type: Plain text
2300 #: build/C/man3/pthread_attr_setguardsize.3:126
2301 msgid ""
2302 "Setting a guard size of 0 may be useful to save memory in an application "
2303 "that creates many threads and knows that stack overflow can never occur."
2304 msgstr ""
2305 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2306 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2307 "することで、メモリを節約できることもある。"
2308
2309 #. type: Plain text
2310 #: build/C/man3/pthread_attr_setguardsize.3:130
2311 msgid ""
2312 "Choosing a guard size larger than the default size may be necessary for "
2313 "detecting stack overflows if a thread allocates large data structures on the "
2314 "stack."
2315 msgstr ""
2316 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2317 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2318 "大きな guard size を選ぶ必要があるかもしれない。"
2319
2320 #. type: SH
2321 #: build/C/man3/pthread_attr_setguardsize.3:130
2322 #: build/C/man3/pthread_attr_setinheritsched.3:103
2323 #: build/C/man3/pthread_attr_setstacksize.3:96
2324 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2325 #, no-wrap
2326 msgid "BUGS"
2327 msgstr "バグ"
2328
2329 #. type: Plain text
2330 #: build/C/man3/pthread_attr_setguardsize.3:141
2331 msgid ""
2332 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2333 "within the stack size allocation, rather than allocating extra space at the "
2334 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2335 "error from B<pthread_create>(3)  if the guard size value is too large, "
2336 "leaving no space for the actual stack.)"
2337 msgstr ""
2338 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2339 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2340 "末尾に追加の領域を割り当てることが求められている。\n"
2341 "(このため、ガード領域が大きすぎて、\n"
2342 "実際のスタック用の場所がなくなってしまう場合、\n"
2343 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2344
2345 #.  glibc includes the guardsize within the allocated stack size,
2346 #.  which looks pretty clearly to be in violation of POSIX.
2347 #.  Filed bug, 22 Oct 2008:
2348 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2349 #.  Older reports:
2350 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2351 #.  Reportedly, LinuxThreads did the right thing, allocating
2352 #.  extra space at the end of the stack:
2353 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2354 #. type: Plain text
2355 #: build/C/man3/pthread_attr_setguardsize.3:155
2356 msgid ""
2357 "The obsolete LinuxThreads implementation did the right thing, allocating "
2358 "extra space at the end of the stack for the guard area."
2359 msgstr ""
2360 "廃止予定の LinuxThreads 実装では、\n"
2361 "POSIX.1 で求められている通りの動作で、\n"
2362 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2363
2364 #. type: Plain text
2365 #: build/C/man3/pthread_attr_setguardsize.3:158
2366 msgid "See B<pthread_getattr_np>(3)."
2367 msgstr "B<pthread_getattr_np>(3) を参照。"
2368
2369 #. type: Plain text
2370 #: build/C/man3/pthread_attr_setguardsize.3:166
2371 msgid ""
2372 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2373 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2374 msgstr ""
2375 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2376 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2377
2378 #. type: TH
2379 #: build/C/man3/pthread_attr_setinheritsched.3:26
2380 #, no-wrap
2381 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2382 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2383
2384 #. type: TH
2385 #: build/C/man3/pthread_attr_setinheritsched.3:26
2386 #: build/C/man3/pthread_attr_setschedparam.3:26
2387 #: build/C/man3/pthread_attr_setstacksize.3:26
2388 #, no-wrap
2389 msgid "2012-03-15"
2390 msgstr "2012-03-15"
2391
2392 #. type: Plain text
2393 #: build/C/man3/pthread_attr_setinheritsched.3:30
2394 msgid ""
2395 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit "
2396 "scheduler attribute in thread attributes object"
2397 msgstr ""
2398 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - \n"
2399 "スレッド属性オブジェクトの inherit scheduler 属性の設定/取得を行う"
2400
2401 #. type: Plain text
2402 #: build/C/man3/pthread_attr_setinheritsched.3:38
2403 #, no-wrap
2404 msgid ""
2405 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2406 "B<                                 int >I<inheritsched>B<);>\n"
2407 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2408 "B<                                 int *>I<inheritsched>B<);>\n"
2409 msgstr ""
2410 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2411 "B<                                 int >I<inheritsched>B<);>\n"
2412 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2413 "B<                                 int *>I<inheritsched>B<);>\n"
2414
2415 #. type: Plain text
2416 #: build/C/man3/pthread_attr_setinheritsched.3:55
2417 msgid ""
2418 "The B<pthread_attr_setinheritsched>()  function sets the inherit scheduler "
2419 "attribute of the thread attributes object referred to by I<attr> to the "
2420 "value specified in I<inheritsched>.  The inherit scheduler attribute "
2421 "determines whether a thread created using the thread attributes object "
2422 "I<attr> will inherit its scheduling attributes from the calling thread or "
2423 "whether it will take them from I<attr>."
2424 msgstr ""
2425 "B<pthread_attr_setinheritsched>() 関数は、\n"
2426 "I<attr> が参照するスレッド属性オブジェクトの inherit scheduler 属性を\n"
2427 "I<inheritsched> で指定された値に設定する。\n"
2428 "inherit scheduler 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2429 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承\n"
2430 "するか、I<attr> からスケジューリング属性を取得するかが決定される。"
2431
2432 #. type: Plain text
2433 #: build/C/man3/pthread_attr_setinheritsched.3:58
2434 msgid "The following values may be specified in I<inheritsched>:"
2435 msgstr "以下の値を I<inheritsched> に指定できる。"
2436
2437 #. type: TP
2438 #: build/C/man3/pthread_attr_setinheritsched.3:58
2439 #, no-wrap
2440 msgid "B<PTHREAD_INHERIT_SCHED>"
2441 msgstr "B<PTHREAD_INHERIT_SCHED>"
2442
2443 #. type: Plain text
2444 #: build/C/man3/pthread_attr_setinheritsched.3:66
2445 msgid ""
2446 "Threads that are created using I<attr> inherit scheduling attributes from "
2447 "the creating thread; the scheduling attributes in I<attr> are ignored."
2448 msgstr ""
2449 "I<attr> を使って作成されたスレッドは、\n"
2450 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2451 "I<attr> 内のスケジューリング属性は無視される。"
2452
2453 #. type: TP
2454 #: build/C/man3/pthread_attr_setinheritsched.3:66
2455 #, no-wrap
2456 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2457 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2458
2459 #.  FIXME what are the defaults for scheduler settings?
2460 #. type: Plain text
2461 #: build/C/man3/pthread_attr_setinheritsched.3:73
2462 msgid ""
2463 "Threads that are created using I<attr> take their scheduling attributes from "
2464 "the values specified by the attributes object."
2465 msgstr ""
2466 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2467 "指定された値からスケジューリング属性を取得する。"
2468
2469 #. type: Plain text
2470 #: build/C/man3/pthread_attr_setinheritsched.3:77
2471 msgid ""
2472 "The default setting of the inherit scheduler attribute in a newly "
2473 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2474 msgstr ""
2475 "新たに初期化されたスレッド属性オブジェクトの inherit scheduler 属性の\n"
2476 "デフォルト設定は B<PTHREAD_INHERIT_SCHED> である。"
2477
2478 #. type: Plain text
2479 #: build/C/man3/pthread_attr_setinheritsched.3:84
2480 msgid ""
2481 "The B<pthread_attr_getinheritsched>()  returns the inherit scheduler "
2482 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2483 "by I<inheritsched>."
2484 msgstr ""
2485 "B<pthread_attr_getinheritsched>() は、\n"
2486 "スレッド属性オブジェクト I<attr> の inherit scheduler 属性を\n"
2487 "I<inheritsched> が指すバッファに入れて返す。"
2488
2489 #. type: Plain text
2490 #: build/C/man3/pthread_attr_setinheritsched.3:90
2491 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2492 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2493
2494 #. type: Plain text
2495 #: build/C/man3/pthread_attr_setinheritsched.3:94
2496 msgid "Invalid value in I<inheritsched>."
2497 msgstr "I<inheritsched> に無効な値が指定された。"
2498
2499 #.  .SH VERSIONS
2500 #.  Available since glibc 2.0.
2501 #. type: Plain text
2502 #: build/C/man3/pthread_attr_setinheritsched.3:101
2503 msgid ""
2504 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2505 "to set the attribute to an unsupported value\") for "
2506 "B<pthread_attr_setinheritsched>()."
2507 msgstr ""
2508 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2509 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2510 "も追加で規定されている。"
2511
2512 #.  FIXME . Track status of the following bug:
2513 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2514 #. type: Plain text
2515 #: build/C/man3/pthread_attr_setinheritsched.3:119
2516 msgid ""
2517 "As at glibc 2.8, if a thread attributes object is initialized using "
2518 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2519 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2520 "if the inherit scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2521 "then a thread created using the attribute object wrongly inherits its "
2522 "scheduling attributes from the creating thread.  This bug does not occur if "
2523 "either the scheduling policy or scheduling priority attribute is explicitly "
2524 "set in the thread attributes object before calling B<pthread_create>(3)."
2525 msgstr ""
2526 "glibc 2.8 の時点では、スレッド属性オブジェクトが\n"
2527 "B<pthread_attr_init>(3) を使って初期化された場合、\n"
2528 "スレッド属性オブジェクトのスケジューリングポリシーが B<SCHED_OTHER> に、\n"
2529 "スケジューリング優先度が 0 に設定される。一方、その後 inherit\n"
2530 "scheduling 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ\n"
2531 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するス\n"
2532 "レッドのスケジューリング属性が間違って継承されてしまう。\n"
2533 "B<pthread_create>(3) を呼び出す前にスケジューリングポリシー属性か\n"
2534 "スケジューリング優先度属性のどちらかが明示的に設定された場合には、\n"
2535 "このバグは発生しない。"
2536
2537 #. type: Plain text
2538 #: build/C/man3/pthread_attr_setinheritsched.3:122
2539 #: build/C/man3/pthread_attr_setschedparam.3:98
2540 #: build/C/man3/pthread_attr_setschedpolicy.3:94
2541 msgid "See B<pthread_setschedparam>(3)."
2542 msgstr "B<pthread_setschedparam>(3) を参照。"
2543
2544 #. type: Plain text
2545 #: build/C/man3/pthread_attr_setinheritsched.3:133
2546 msgid ""
2547 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2548 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2549 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2550 "(3), B<pthreads>(7)"
2551 msgstr ""
2552 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2553 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2554 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2555 "(3), B<pthreads>(7)"
2556
2557 #. type: TH
2558 #: build/C/man3/pthread_attr_setschedparam.3:26
2559 #, no-wrap
2560 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2561 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2562
2563 #. type: Plain text
2564 #: build/C/man3/pthread_attr_setschedparam.3:30
2565 msgid ""
2566 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2567 "parameter attributes in thread attributes object"
2568 msgstr ""
2569 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2570 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2571
2572 #. type: Plain text
2573 #: build/C/man3/pthread_attr_setschedparam.3:38
2574 #, no-wrap
2575 msgid ""
2576 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2577 "B<                               const struct sched_param *>I<param>B<);>\n"
2578 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2579 "B<                               struct sched_param *>I<param>B<);>\n"
2580 msgstr ""
2581 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2582 "B<                               const struct sched_param *>I<param>B<);>\n"
2583 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2584 "B<                               struct sched_param *>I<param>B<);>\n"
2585
2586 #. type: Plain text
2587 #: build/C/man3/pthread_attr_setschedparam.3:52
2588 msgid ""
2589 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2590 "attributes of the thread attributes object referred to by I<attr> to the "
2591 "values specified in the buffer pointed to by I<param>.  These attributes "
2592 "determine the scheduling parameters of a thread created using the thread "
2593 "attributes object I<attr>."
2594 msgstr ""
2595 "B<pthread_attr_setschedparam>() 関数は、\n"
2596 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2597 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2598 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2599 "作成されるスレッドのスケジューリングパラメータが決定される。"
2600
2601 #. type: Plain text
2602 #: build/C/man3/pthread_attr_setschedparam.3:59
2603 msgid ""
2604 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2605 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2606 "by I<param>."
2607 msgstr ""
2608 "B<pthread_attr_getschedparam>() は、\n"
2609 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2610 "I<param> が指すバッファに入れて返す。"
2611
2612 #. type: Plain text
2613 #: build/C/man3/pthread_attr_setschedparam.3:61
2614 msgid "Scheduling parameters are maintained in the following structure:"
2615 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2616
2617 #. type: Plain text
2618 #: build/C/man3/pthread_attr_setschedparam.3:67
2619 #: build/C/man3/pthread_setschedparam.3:69
2620 #, no-wrap
2621 msgid ""
2622 "struct sched_param {\n"
2623 "    int sched_priority;     /* Scheduling priority */\n"
2624 "};\n"
2625 msgstr ""
2626 "struct sched_param {\n"
2627 "    int sched_priority;     /* Scheduling priority */\n"
2628 "};\n"
2629
2630 #. type: Plain text
2631 #: build/C/man3/pthread_attr_setschedparam.3:74
2632 #: build/C/man3/pthread_setschedparam.3:76
2633 msgid ""
2634 "As can be seen, only one scheduling parameter is supported.  For details of "
2635 "the permitted ranges for scheduling priorities in each scheduling policy, "
2636 "see B<sched_setscheduler>(2)."
2637 msgstr ""
2638 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2639 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2640 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2641
2642 #.  .SH VERSIONS
2643 #.  Available since glibc 2.0.
2644 #. type: Plain text
2645 #: build/C/man3/pthread_attr_setschedparam.3:89
2646 msgid ""
2647 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2648 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2649 "(but portable and future-proof applications should nevertheless handle a "
2650 "possible error return)."
2651 msgstr ""
2652 "POSIX.1 では、\n"
2653 "B<pthread_attr_setschedparam>() について\n"
2654 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2655 "Linux では、これらの関数は常に成功する\n"
2656 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2657 "正のエラーの返り値を処理するようにすべきである)。"
2658
2659 #. type: Plain text
2660 #: build/C/man3/pthread_attr_setschedparam.3:95
2661 msgid ""
2662 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2663 "policies supported on Linux."
2664 msgstr ""
2665 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2666 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2667
2668 #. type: Plain text
2669 #: build/C/man3/pthread_attr_setschedparam.3:110
2670 msgid ""
2671 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2672 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2673 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2674 "(3), B<pthreads>(7)"
2675 msgstr ""
2676 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2677 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2678 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2679 "(3), B<pthreads>(7)"
2680
2681 #. type: TH
2682 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2683 #, no-wrap
2684 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2685 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2686
2687 #. type: Plain text
2688 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2689 msgid ""
2690 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2691 "scheduling policy attribute in thread attributes object"
2692 msgstr ""
2693 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2694 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2695
2696 #. type: Plain text
2697 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2698 #, no-wrap
2699 msgid ""
2700 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2701 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2702 msgstr ""
2703 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2704 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2705
2706 #. type: Plain text
2707 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2708 msgid ""
2709 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2710 "attribute of the thread attributes object referred to by I<attr> to the "
2711 "value specified in I<policy>.  This attribute determines the scheduling "
2712 "policy of a thread created using the thread attributes object I<attr>."
2713 msgstr ""
2714 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2715 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2716 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2717 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2718 "作成されるスレッドのスケジューリングポリシーが決定される。"
2719
2720 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2721 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2722 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2723 #. type: Plain text
2724 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2725 msgid ""
2726 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2727 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2728 msgstr ""
2729 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2730 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2731 "である。"
2732
2733 #. type: Plain text
2734 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2735 msgid ""
2736 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2737 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2738 "by I<policy>."
2739 msgstr ""
2740 "B<pthread_attr_getschedpolicy>() は、\n"
2741 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2742 "I<policy> が指すバッファに入れて返す。"
2743
2744 #. type: Plain text
2745 #: build/C/man3/pthread_attr_setschedpolicy.3:78
2746 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2747 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2748
2749 #. type: Plain text
2750 #: build/C/man3/pthread_attr_setschedpolicy.3:82
2751 msgid "Invalid value in I<policy>."
2752 msgstr "I<policy> に無効な値が指定された。"
2753
2754 #.  .SH VERSIONS
2755 #.  Available since glibc 2.0.
2756 #. type: Plain text
2757 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2758 msgid ""
2759 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2760 "to set the attribute to an unsupported value\") for "
2761 "B<pthread_attr_setschedpolicy>()."
2762 msgstr ""
2763 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2764 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2765 "も追加で規定されている。"
2766
2767 #. type: Plain text
2768 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2769 msgid ""
2770 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2771 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2772 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2773 "(3), B<pthreads>(7)"
2774 msgstr ""
2775 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2776 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2777 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2778 "(3), B<pthreads>(7)"
2779
2780 #. type: TH
2781 #: build/C/man3/pthread_attr_setscope.3:26
2782 #, no-wrap
2783 msgid "PTHREAD_ATTR_SETSCOPE"
2784 msgstr "PTHREAD_ATTR_SETSCOPE"
2785
2786 #. type: Plain text
2787 #: build/C/man3/pthread_attr_setscope.3:30
2788 msgid ""
2789 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2790 "attribute in thread attributes object"
2791 msgstr ""
2792 "pthread_attr_setscope, pthread_attr_getscope - \n"
2793 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2794
2795 #. type: Plain text
2796 #: build/C/man3/pthread_attr_setscope.3:38
2797 #, no-wrap
2798 msgid ""
2799 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2800 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2801 msgstr ""
2802 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2803 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2804
2805 #. type: Plain text
2806 #: build/C/man3/pthread_attr_setscope.3:53
2807 msgid ""
2808 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2809 "of the thread attributes object referred to by I<attr> to the value "
2810 "specified in I<scope>.  The contention scope attribute defines the set of "
2811 "threads against which a thread competes for resources such as the CPU.  "
2812 "POSIX.1-2001 specifies two possible values for I<scope>:"
2813 msgstr ""
2814 "B<pthread_attr_setscope>() 関数は、\n"
2815 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2816 "属性を I<scope> で指定された値に設定する。\n"
2817 "contention scope 属性により、\n"
2818 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2819 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2820
2821 #. type: TP
2822 #: build/C/man3/pthread_attr_setscope.3:53
2823 #, no-wrap
2824 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2825 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2826
2827 #. type: Plain text
2828 #: build/C/man3/pthread_attr_setscope.3:61
2829 msgid ""
2830 "The thread competes for resources with all other threads in all processes on "
2831 "the system that are in the same scheduling allocation domain (a group of one "
2832 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2833 "to one another according to their scheduling policy and priority."
2834 msgstr ""
2835 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2836 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2837 "スレッドとリソースを取り合う。 \n"
2838 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2839 "優先度に基づき、互いに相対的にスケジューリングされる。"
2840
2841 #. type: TP
2842 #: build/C/man3/pthread_attr_setscope.3:61
2843 #, no-wrap
2844 msgid "B<PTHREAD_SCOPE_PROCESS>"
2845 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2846
2847 #. type: Plain text
2848 #: build/C/man3/pthread_attr_setscope.3:76
2849 msgid ""
2850 "The thread competes for resources with all other threads in the same process "
2851 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2852 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2853 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2854 "leaves it unspecified how these threads contend with other threads in other "
2855 "process on the system or with other threads in the same process that were "
2856 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2857 msgstr ""
2858 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2859 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2860 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2861 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2862 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2863 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2864 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2865 "規定されないままになっている。"
2866
2867 #. type: Plain text
2868 #: build/C/man3/pthread_attr_setscope.3:83
2869 msgid ""
2870 "POSIX.1-2001 requires that an implementation support only one of these "
2871 "contention scopes, but permits both to be supported.  Linux supports "
2872 "B<PTHREAD_SCOPE_SYSTEM>, but not B<PTHREAD_SCOPE_PROCESS>."
2873 msgstr ""
2874 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention\n"
2875 "scope のうち 1 つをサポートすることだけであるが、\n"
2876 "両方をサポートすることも認めている。\n"
2877 "Linux は B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、\n"
2878 "B<PTHREAD_SCOPE_PROCESS> はサポートしていない。"
2879
2880 #. type: Plain text
2881 #: build/C/man3/pthread_attr_setscope.3:91
2882 msgid ""
2883 "The B<pthread_attr_getscope>()  function returns the contention scope "
2884 "attribute of the thread attributes object referred to by I<attr> in the "
2885 "buffer pointed to by I<scope>."
2886 msgstr ""
2887 "B<pthread_attr_getscope>() は、\n"
2888 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2889 "I<scope> が指すバッファに入れて返す。"
2890
2891 #. type: Plain text
2892 #: build/C/man3/pthread_attr_setscope.3:97
2893 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2894 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2895
2896 #. type: Plain text
2897 #: build/C/man3/pthread_attr_setscope.3:101
2898 msgid "An invalid value was specified in I<scope>."
2899 msgstr "I<scope> に無効な値が指定された。"
2900
2901 #. type: TP
2902 #: build/C/man3/pthread_attr_setscope.3:101
2903 #, no-wrap
2904 msgid "B<ENOTSUP>"
2905 msgstr "B<ENOTSUP>"
2906
2907 #. type: Plain text
2908 #: build/C/man3/pthread_attr_setscope.3:107
2909 msgid ""
2910 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2911 "supported on Linux."
2912 msgstr ""
2913 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
2914 "この値は Linux でサポートされていない。"
2915
2916 #. type: Plain text
2917 #: build/C/man3/pthread_attr_setscope.3:117
2918 msgid ""
2919 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
2920 "space thread is bound directly to a single kernel-scheduling entity.  This "
2921 "is the case on Linux for the obsolete LinuxThreads implementation and the "
2922 "modern NPTL implementation, which are both 1:1 threading implementations."
2923 msgstr ""
2924 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
2925 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
2926 "直接結び付けられる。\n"
2927 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
2928 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
2929
2930 #. type: Plain text
2931 #: build/C/man3/pthread_attr_setscope.3:120
2932 msgid ""
2933 "POSIX.1-2001 specifies that the default contention scope is implementation-"
2934 "defined."
2935 msgstr ""
2936 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
2937 "実装時で定義されるものと規定されている。"
2938
2939 #. type: Plain text
2940 #: build/C/man3/pthread_attr_setscope.3:130
2941 msgid ""
2942 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2943 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2944 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2945 msgstr ""
2946 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2947 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2948 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2949
2950 #. type: TH
2951 #: build/C/man3/pthread_attr_setstack.3:26
2952 #, no-wrap
2953 msgid "PTHREAD_ATTR_SETSTACK"
2954 msgstr "PTHREAD_ATTR_SETSTACK"
2955
2956 #. type: Plain text
2957 #: build/C/man3/pthread_attr_setstack.3:30
2958 msgid ""
2959 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
2960 "thread attributes object"
2961 msgstr ""
2962 "pthread_attr_setstack, pthread_attr_getstack - \n"
2963 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
2964
2965 #. type: Plain text
2966 #: build/C/man3/pthread_attr_setstack.3:38
2967 #, no-wrap
2968 msgid ""
2969 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
2970 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
2971 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
2972 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
2973 msgstr ""
2974 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
2975 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
2976 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
2977 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
2978
2979 #. type: Plain text
2980 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_sigqueue.3:41
2981 msgid ""
2982 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2983 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
2984
2985 #. type: Plain text
2986 #: build/C/man3/pthread_attr_setstack.3:50
2987 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
2988 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
2989
2990 #. type: Plain text
2991 #: build/C/man3/pthread_attr_setstack.3:52
2992 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
2993 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
2994
2995 #. type: Plain text
2996 #: build/C/man3/pthread_attr_setstack.3:68
2997 msgid ""
2998 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
2999 "size attributes of the thread attributes object referred to by I<attr> to "
3000 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3001 "attributes specify the location and size of the stack that should be used by "
3002 "a thread that is created using the thread attributes object I<attr>."
3003 msgstr ""
3004 "B<pthread_attr_setstack>() 関数は、\n"
3005 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3006 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3007 "指定された値に設定する。\n"
3008 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3009 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3010
3011 #. type: Plain text
3012 #: build/C/man3/pthread_attr_setstack.3:74
3013 msgid ""
3014 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3015 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3016 "allocated buffer should be both readable and writable."
3017 msgstr ""
3018 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3019 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3020 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3021 "べきである。"
3022
3023 #. type: Plain text
3024 #: build/C/man3/pthread_attr_setstack.3:85
3025 msgid ""
3026 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3027 "size attributes of the thread attributes object referred to by I<attr> in "
3028 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3029 msgstr ""
3030 "B<pthread_attr_getstack>() 関数は、\n"
3031 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3032 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3033 "指すバッファに入れて返す。"
3034
3035 #. type: Plain text
3036 #: build/C/man3/pthread_attr_setstack.3:91
3037 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3038 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3039
3040 #. type: Plain text
3041 #: build/C/man3/pthread_attr_setstack.3:102
3042 msgid ""
3043 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3044 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3045 "stacksize> is not suitably aligned."
3046 msgstr ""
3047 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3048 "システムによっては、 I<stackaddr> か\n"
3049 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3050 "このエラーが発生する。"
3051
3052 #. type: Plain text
3053 #: build/C/man3/pthread_attr_setstack.3:110
3054 msgid ""
3055 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3056 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3057 "caller."
3058 msgstr ""
3059 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3060 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3061 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3062
3063 #. type: Plain text
3064 #: build/C/man3/pthread_attr_setstack.3:112
3065 msgid "These functions are provided by glibc since version 2.2."
3066 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3067
3068 #. type: Plain text
3069 #: build/C/man3/pthread_attr_setstack.3:122
3070 msgid ""
3071 "These functions are provided for applications that must ensure that a "
3072 "thread's stack is placed in a particular location.  For most applications, "
3073 "this is not necessary, and the use of these functions should be avoided.  "
3074 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3075 "stack size other than the default.)"
3076 msgstr ""
3077 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3078 "しなければならないアプリケーションのために提供されている。\n"
3079 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3080 "これらの関数を使うのは避けるべきである。\n"
3081 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3082 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3083
3084 #. type: Plain text
3085 #: build/C/man3/pthread_attr_setstack.3:133
3086 msgid ""
3087 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3088 "responsibility of allocating the stack.  Any guard size value that was set "
3089 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3090 "is the application's responsibility to allocate a guard area (one or more "
3091 "pages protected against reading and writing)  to handle the possibility of "
3092 "stack overflow."
3093 msgstr ""
3094 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3095 "スタックの割り当てに責任を持つ必要がある。\n"
3096 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3097 "guard size の値は無視される。\n"
3098 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3099 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3100 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3101
3102 #. type: Plain text
3103 #: build/C/man3/pthread_attr_setstack.3:144
3104 msgid ""
3105 "The address specified in I<stackaddr> should be suitably aligned: for full "
3106 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3107 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3108 "should also be a multiple of the system page size."
3109 msgstr ""
3110 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3111 "完全な移植性を持たせるためには、\n"
3112 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3113 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3114 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3115
3116 #. type: Plain text
3117 #: build/C/man3/pthread_attr_setstack.3:153
3118 msgid ""
3119 "If I<attr> is used to create multiple threads, then the caller must change "
3120 "the stack address attribute between calls to B<pthread_create>(3); "
3121 "otherwise, the threads will attempt to use the same memory area for their "
3122 "stacks, and chaos will ensue."
3123 msgstr ""
3124 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3125 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3126 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3127 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3128 "使おうとするため、訳の分からない状況が発生してしまう。"
3129
3130 #. type: Plain text
3131 #: build/C/man3/pthread_attr_setstack.3:168
3132 msgid ""
3133 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3134 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3135 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3136 msgstr ""
3137 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3138 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3139 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3140
3141 #. type: TH
3142 #: build/C/man3/pthread_attr_setstackaddr.3:26
3143 #, no-wrap
3144 msgid "PTHREAD_ATTR_SETSTACKADDR"
3145 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3146
3147 #. type: Plain text
3148 #: build/C/man3/pthread_attr_setstackaddr.3:30
3149 msgid ""
3150 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3151 "attribute in thread attributes object"
3152 msgstr ""
3153 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3154 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3155
3156 #. type: Plain text
3157 #: build/C/man3/pthread_attr_setstackaddr.3:38
3158 #, no-wrap
3159 msgid ""
3160 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3161 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3162 msgstr ""
3163 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3164 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3165
3166 #. type: Plain text
3167 #: build/C/man3/pthread_attr_setstackaddr.3:49
3168 msgid ""
3169 "These functions are obsolete: B<do not use them.> Use "
3170 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3171 msgstr ""
3172 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3173 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3174 "うこと。"
3175
3176 #. type: Plain text
3177 #: build/C/man3/pthread_attr_setstackaddr.3:60
3178 msgid ""
3179 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3180 "attribute of the thread attributes object referred to by I<attr> to the "
3181 "value specified in I<stackaddr>.  This attribute specifies the location of "
3182 "the stack that should be used by a thread that is created using the thread "
3183 "attributes object I<attr>."
3184 msgstr ""
3185 "B<pthread_attr_setstackaddr>() 関数は、\n"
3186 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3187 "属性を I<stackaddr> で指定された値に設定する。\n"
3188 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3189 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3190
3191 #. type: Plain text
3192 #: build/C/man3/pthread_attr_setstackaddr.3:66
3193 msgid ""
3194 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3195 "that was allocated by the caller.  The pages of the allocated buffer should "
3196 "be both readable and writable."
3197 msgstr ""
3198 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3199 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3200 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3201 "なっているべきである。"
3202
3203 #. type: Plain text
3204 #: build/C/man3/pthread_attr_setstackaddr.3:74
3205 msgid ""
3206 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3207 "attribute of the thread attributes object referred to by I<attr> in the "
3208 "buffer pointed to by I<stackaddr>."
3209 msgstr ""
3210 "B<pthread_attr_getstackaddr>() は、\n"
3211 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3212 "I<stackaddr> が指すバッファに入れて返す。"
3213
3214 #. type: Plain text
3215 #: build/C/man3/pthread_attr_setstackaddr.3:81
3216 msgid ""
3217 "No errors are defined (but applications should nevertheless handle a "
3218 "possible error return)."
3219 msgstr ""
3220 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3221 "返り値を処理するようにすべきである)。"
3222
3223 #. type: Plain text
3224 #: build/C/man3/pthread_attr_setstackaddr.3:86
3225 msgid ""
3226 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3227 "POSIX.1-2008 removes the specification of these functions."
3228 msgstr ""
3229 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3230 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3231
3232 #. type: Plain text
3233 #: build/C/man3/pthread_attr_setstackaddr.3:110
3234 msgid ""
3235 "I<Do not use these functions!> They cannot be portably used, since they "
3236 "provide no way of specifying the direction of growth or the range of the "
3237 "stack.  For example, on architectures with a stack that grows downward, "
3238 "I<stackaddr> specifies the next address past the I<highest> address of the "
3239 "allocated stack area.  However, on architectures with a stack that grows "
3240 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3241 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3242 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3243 "in the allocated stack area (and the I<stacksize> argument specifies the "
3244 "range of the stack)."
3245 msgstr ""
3246 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3247 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3248 "かを指定する手段が提供されていないからである。\n"
3249 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3250 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3251 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3252 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3253 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3254 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3255 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3256 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3257
3258 #. type: Plain text
3259 #: build/C/man3/pthread_attr_setstackaddr.3:116
3260 msgid ""
3261 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3262 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3263 msgstr ""
3264 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3265 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3266
3267 #. type: TH
3268 #: build/C/man3/pthread_attr_setstacksize.3:26
3269 #, no-wrap
3270 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3271 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3272
3273 #. type: Plain text
3274 #: build/C/man3/pthread_attr_setstacksize.3:30
3275 msgid ""
3276 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3277 "attribute in thread attributes object"
3278 msgstr ""
3279 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3280 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3281
3282 #. type: Plain text
3283 #: build/C/man3/pthread_attr_setstacksize.3:38
3284 #, no-wrap
3285 msgid ""
3286 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3287 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3288 msgstr ""
3289 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3290 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3291
3292 #. type: Plain text
3293 #: build/C/man3/pthread_attr_setstacksize.3:49
3294 msgid ""
3295 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3296 "of the thread attributes object referred to by I<attr> to the value "
3297 "specified in I<stacksize>."
3298 msgstr ""
3299 "B<pthread_attr_setstacksize>() 関数は、\n"
3300 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3301 "属性を I<stacksize> で指定された値に設定する。"
3302
3303 #. type: Plain text
3304 #: build/C/man3/pthread_attr_setstacksize.3:53
3305 msgid ""
3306 "The stack size attribute determines the minimum size (in bytes) that will be "
3307 "allocated for threads created using the thread attributes object I<attr>."
3308 msgstr ""
3309 "スタックサイズ属性により、\n"
3310 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3311 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3312
3313 #. type: Plain text
3314 #: build/C/man3/pthread_attr_setstacksize.3:61
3315 msgid ""
3316 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3317 "attribute of the thread attributes object referred to by I<attr> in the "
3318 "buffer pointed to by I<stacksize>."
3319 msgstr ""
3320 "B<pthread_attr_getstacksize>() は、\n"
3321 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3322 "I<stacksize> が指すバッファに入れて返す。"
3323
3324 #. type: Plain text
3325 #: build/C/man3/pthread_attr_setstacksize.3:67
3326 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3327 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3328
3329 #. type: Plain text
3330 #: build/C/man3/pthread_attr_setstacksize.3:72
3331 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3332 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3333
3334 #.  e.g., MacOS
3335 #. type: Plain text
3336 #: build/C/man3/pthread_attr_setstacksize.3:81
3337 msgid ""
3338 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3339 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3340 msgstr ""
3341 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3342 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3343 "エラー B<EINVAL> で失敗する。"
3344
3345 #. type: Plain text
3346 #: build/C/man3/pthread_attr_setstacksize.3:88
3347 msgid ""
3348 "For details on the default stack size of new threads, see B<pthread_create>"
3349 "(3)."
3350 msgstr ""
3351 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3352 "B<pthread_create>(3) を参照。"
3353
3354 #. type: Plain text
3355 #: build/C/man3/pthread_attr_setstacksize.3:91
3356 msgid ""
3357 "A thread's stack size is fixed at the time of thread creation.  Only the "
3358 "main thread can dynamically grow its stack."
3359 msgstr ""
3360 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3361 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3362
3363 #. type: Plain text
3364 #: build/C/man3/pthread_attr_setstacksize.3:96
3365 msgid ""
3366 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3367 "the size and location of a caller-allocated stack that is to be used by a "
3368 "thread."
3369 msgstr ""
3370 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3371 "アプリケーションは、スレッドが使用するスタックとして、\n"
3372 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3373
3374 #. type: Plain text
3375 #: build/C/man3/pthread_attr_setstacksize.3:108
3376 msgid ""
3377 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3378 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3379 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3380 "stack will be at least I<stacksize> bytes."
3381 msgstr ""
3382 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3383 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3384 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3385 "これは POSIX.1-2001 に違反している。\n"
3386 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3387 "少なくとも I<stacksize> バイトになると書かれている。"
3388
3389 #. type: Plain text
3390 #: build/C/man3/pthread_attr_setstacksize.3:111
3391 #: build/C/man3/pthread_join.3:127
3392 msgid "See B<pthread_create>(3)."
3393 msgstr "B<pthread_create>(3) を参照。"
3394
3395 #. type: Plain text
3396 #: build/C/man3/pthread_attr_setstacksize.3:118
3397 msgid ""
3398 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3399 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3400 msgstr ""
3401 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3402 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3403
3404 #. type: TH
3405 #: build/C/man3/pthread_cancel.3:26
3406 #, no-wrap
3407 msgid "PTHREAD_CANCEL"
3408 msgstr "PTHREAD_CANCEL"
3409
3410 #. type: TH
3411 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3412 #, no-wrap
3413 msgid "2008-11-17"
3414 msgstr "2008-11-17"
3415
3416 #. type: Plain text
3417 #: build/C/man3/pthread_cancel.3:29
3418 msgid "pthread_cancel - send a cancellation request to a thread"
3419 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3420
3421 #. type: Plain text
3422 #: build/C/man3/pthread_cancel.3:34
3423 #, no-wrap
3424 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3425 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3426
3427 #. type: Plain text
3428 #: build/C/man3/pthread_cancel.3:46
3429 msgid ""
3430 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3431 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3432 "request depends on two attributes that are under the control of that thread: "
3433 "its cancelability I<state> and I<type>."
3434 msgstr ""
3435 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3436 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3437 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3438 "I<state> と I<type>により決まる。"
3439
3440 #. type: Plain text
3441 #: build/C/man3/pthread_cancel.3:58
3442 msgid ""
3443 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3444 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3445 "has disabled cancellation, then a cancellation request remains queued until "
3446 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3447 "its cancelability type determines when cancellation occurs."
3448 msgstr ""
3449 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3450 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3451 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3452 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3453 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3454 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3455
3456 #. type: Plain text
3457 #: build/C/man3/pthread_cancel.3:74
3458 msgid ""
3459 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3460 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3461 "Asynchronous cancelability means that the thread can be canceled at any time "
3462 "(usually immediately, but the system does not guarantee this).  Deferred "
3463 "cancelability means that cancellation will be delayed until the thread next "
3464 "calls a function that is a I<cancellation point>.  A list of functions that "
3465 "are or may be cancellation points is provided in I<pthreads>(7)."
3466 msgstr ""
3467 "スレッドのキャンセル種別 (cancelability type) は\n"
3468 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3469 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3470 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3471 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3472 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3473 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3474 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3475 "遅延される。取り消しポイントに設定されていたり設定\n"
3476 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3477
3478 #. type: Plain text
3479 #: build/C/man3/pthread_cancel.3:78
3480 msgid ""
3481 "When a cancellation requested is acted on, the following steps occur for "
3482 "I<thread> (in this order):"
3483 msgstr ""
3484 "キャンセル要求が実行されると、\n"
3485 "I<thread> では以下のステップが (この順序で) 行われる。"
3486
3487 #. type: IP
3488 #: build/C/man3/pthread_cancel.3:78 build/C/man3/pthread_cleanup_push.3:69
3489 #, no-wrap
3490 msgid "1."
3491 msgstr "1."
3492
3493 #. type: Plain text
3494 #: build/C/man3/pthread_cancel.3:83
3495 msgid ""
3496 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3497 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3498 msgstr ""
3499 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3500 "取り出され (pop され)、呼び出される。\n"
3501 "(B<pthread_cleanup_push>(3) 参照)"
3502
3503 #. type: IP
3504 #: build/C/man3/pthread_cancel.3:83 build/C/man3/pthread_cleanup_push.3:73
3505 #, no-wrap
3506 msgid "2."
3507 msgstr "2."
3508
3509 #. type: Plain text
3510 #: build/C/man3/pthread_cancel.3:88
3511 msgid ""
3512 "Thread-specific data destructors are called, in an unspecified order.  (See "
3513 "B<pthread_key_create>(3).)"
3514 msgstr ""
3515 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3516 "呼び出し順序は規定されていない。\n"
3517 "(B<pthread_key_create>(3) 参照)"
3518
3519 #. type: IP
3520 #: build/C/man3/pthread_cancel.3:88 build/C/man3/pthread_cleanup_push.3:81
3521 #, no-wrap
3522 msgid "3."
3523 msgstr "3."
3524
3525 #. type: Plain text
3526 #: build/C/man3/pthread_cancel.3:92
3527 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3528 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3529
3530 #. type: Plain text
3531 #: build/C/man3/pthread_cancel.3:100
3532 msgid ""
3533 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3534 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3535 "caller whether the cancellation request was successfully queued."
3536 msgstr ""
3537 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3538 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3539 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3540
3541 #. type: Plain text
3542 #: build/C/man3/pthread_cancel.3:109
3543 msgid ""
3544 "After a canceled thread has terminated, a join with that thread using "
3545 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3546 "status.  (Joining with a thread is the only way to know that cancellation "
3547 "has completed.)"
3548 msgstr ""
3549 "キャンセルされたスレッドが終了された後に、\n"
3550 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3551 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3552 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3553
3554 #. type: Plain text
3555 #: build/C/man3/pthread_cancel.3:114
3556 msgid ""
3557 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3558 "error number."
3559 msgstr ""
3560 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3561 "エラーの場合、0 以外のエラー番号を返す。"
3562
3563 #. type: TP
3564 #: build/C/man3/pthread_cancel.3:115 build/C/man3/pthread_detach.3:59
3565 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3566 #: build/C/man3/pthread_kill.3:61 build/C/man3/pthread_setaffinity_np.3:114
3567 #: build/C/man3/pthread_setschedparam.3:114
3568 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3569 #, no-wrap
3570 msgid "B<ESRCH>"
3571 msgstr "B<ESRCH>"
3572
3573 #. type: Plain text
3574 #: build/C/man3/pthread_cancel.3:122 build/C/man3/pthread_detach.3:64
3575 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3576 #: build/C/man3/pthread_kill.3:66 build/C/man3/pthread_setaffinity_np.3:119
3577 #: build/C/man3/pthread_setschedparam.3:119
3578 #: build/C/man3/pthread_setschedprio.3:75
3579 msgid "No thread with the ID I<thread> could be found."
3580 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3581
3582 #. type: Plain text
3583 #: build/C/man3/pthread_cancel.3:132
3584 msgid ""
3585 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3586 "threading implementation, the first real-time signal (i.e., signal 32) is "
3587 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3588 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3589 msgstr ""
3590 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3591 "は、\n"
3592 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3593 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3594 "ム\n"
3595 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3596
3597 #. type: Plain text
3598 #: build/C/man3/pthread_cancel.3:138
3599 msgid ""
3600 "The program below creates a thread and then cancels it.  The main thread "
3601 "joins with the canceled thread to check that its exit status was "
3602 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3603 "run the program:"
3604 msgstr ""
3605 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3606 "る。\n"
3607 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3608 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3609 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3610
3611 #. type: Plain text
3612 #: build/C/man3/pthread_cancel.3:146
3613 #, no-wrap
3614 msgid ""
3615 "$ ./a.out\n"
3616 "thread_func(): started; cancellation disabled\n"
3617 "main(): sending cancellation request\n"
3618 "thread_func(): about to enable cancellation\n"
3619 "main(): thread was canceled\n"
3620 msgstr ""
3621 "$ ./a.out\n"
3622 "thread_func(): started; cancellation disabled\n"
3623 "main(): sending cancellation request\n"
3624 "thread_func(): about to enable cancellation\n"
3625 "main(): thread was canceled\n"
3626
3627 #. type: Plain text
3628 #: build/C/man3/pthread_cancel.3:156
3629 #, no-wrap
3630 msgid ""
3631 "#include E<lt>pthread.hE<gt>\n"
3632 "#include E<lt>stdio.hE<gt>\n"
3633 "#include E<lt>errno.hE<gt>\n"
3634 "#include E<lt>stdlib.hE<gt>\n"
3635 "#include E<lt>unistd.hE<gt>\n"
3636 msgstr ""
3637 "#include E<lt>pthread.hE<gt>\n"
3638 "#include E<lt>stdio.hE<gt>\n"
3639 "#include E<lt>errno.hE<gt>\n"
3640 "#include E<lt>stdlib.hE<gt>\n"
3641 "#include E<lt>unistd.hE<gt>\n"
3642
3643 #. type: Plain text
3644 #: build/C/man3/pthread_cancel.3:164
3645 #, no-wrap
3646 msgid ""
3647 "static void *\n"
3648 "thread_func(void *ignored_argument)\n"
3649 "{\n"
3650 "    int s;\n"
3651 msgstr ""
3652 "static void *\n"
3653 "thread_func(void *ignored_argument)\n"
3654 "{\n"
3655 "    int s;\n"
3656
3657 #. type: Plain text
3658 #: build/C/man3/pthread_cancel.3:167
3659 #, no-wrap
3660 msgid ""
3661 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3662 "       immediately react to a cancellation request */\n"
3663 msgstr ""
3664 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3665 "       immediately react to a cancellation request */\n"
3666
3667 #. type: Plain text
3668 #: build/C/man3/pthread_cancel.3:171
3669 #, no-wrap
3670 msgid ""
3671 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3672 "    if (s != 0)\n"
3673 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3674 msgstr ""
3675 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3676 "    if (s != 0)\n"
3677 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3678
3679 #. type: Plain text
3680 #: build/C/man3/pthread_cancel.3:175
3681 #, no-wrap
3682 msgid ""
3683 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3684 "    sleep(5);\n"
3685 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3686 msgstr ""
3687 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3688 "    sleep(5);\n"
3689 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3690
3691 #. type: Plain text
3692 #: build/C/man3/pthread_cancel.3:179
3693 #, no-wrap
3694 msgid ""
3695 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3696 "    if (s != 0)\n"
3697 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3698 msgstr ""
3699 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3700 "    if (s != 0)\n"
3701 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3702
3703 #. type: Plain text
3704 #: build/C/man3/pthread_cancel.3:181
3705 #, no-wrap
3706 msgid "    /* sleep() is a cancellation point */\n"
3707 msgstr "    /* sleep() is a cancellation point */\n"
3708
3709 #. type: Plain text
3710 #: build/C/man3/pthread_cancel.3:183
3711 #, no-wrap
3712 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3713 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3714
3715 #. type: Plain text
3716 #: build/C/man3/pthread_cancel.3:185
3717 #, no-wrap
3718 msgid "    /* Should never get here */\n"
3719 msgstr "    /* Should never get here */\n"
3720
3721 #. type: Plain text
3722 #: build/C/man3/pthread_cancel.3:189
3723 #, no-wrap
3724 msgid ""
3725 "    printf(\"thread_func(): not canceled!\\en\");\n"
3726 "    return NULL;\n"
3727 "}\n"
3728 msgstr ""
3729 "    printf(\"thread_func(): not canceled!\\en\");\n"
3730 "    return NULL;\n"
3731 "}\n"
3732
3733 #. type: Plain text
3734 #: build/C/man3/pthread_cancel.3:196
3735 #, no-wrap
3736 msgid ""
3737 "int\n"
3738 "main(void)\n"
3739 "{\n"
3740 "    pthread_t thr;\n"
3741 "    void *res;\n"
3742 "    int s;\n"
3743 msgstr ""
3744 "int\n"
3745 "main(void)\n"
3746 "{\n"
3747 "    pthread_t thr;\n"
3748 "    void *res;\n"
3749 "    int s;\n"
3750
3751 #. type: Plain text
3752 #: build/C/man3/pthread_cancel.3:198
3753 #, no-wrap
3754 msgid "    /* Start a thread and then send it a cancellation request */\n"
3755 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3756
3757 #. type: Plain text
3758 #: build/C/man3/pthread_cancel.3:202
3759 #, no-wrap
3760 msgid ""
3761 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3762 "    if (s != 0)\n"
3763 "        handle_error_en(s, \"pthread_create\");\n"
3764 msgstr ""
3765 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3766 "    if (s != 0)\n"
3767 "        handle_error_en(s, \"pthread_create\");\n"
3768
3769 #. type: Plain text
3770 #: build/C/man3/pthread_cancel.3:204
3771 #, no-wrap
3772 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3773 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3774
3775 #. type: Plain text
3776 #: build/C/man3/pthread_cancel.3:209
3777 #, no-wrap
3778 msgid ""
3779 "    printf(\"main(): sending cancellation request\\en\");\n"
3780 "    s = pthread_cancel(thr);\n"
3781 "    if (s != 0)\n"
3782 "        handle_error_en(s, \"pthread_cancel\");\n"
3783 msgstr ""
3784 "    printf(\"main(): sending cancellation request\\en\");\n"
3785 "    s = pthread_cancel(thr);\n"
3786 "    if (s != 0)\n"
3787 "        handle_error_en(s, \"pthread_cancel\");\n"
3788
3789 #. type: Plain text
3790 #: build/C/man3/pthread_cancel.3:211
3791 #, no-wrap
3792 msgid "    /* Join with thread to see what its exit status was */\n"
3793 msgstr "    /* Join with thread to see what its exit status was */\n"
3794
3795 #. type: Plain text
3796 #: build/C/man3/pthread_cancel.3:215 build/C/man3/pthread_cleanup_push.3:303
3797 #, no-wrap
3798 msgid ""
3799 "    s = pthread_join(thr, &res);\n"
3800 "    if (s != 0)\n"
3801 "        handle_error_en(s, \"pthread_join\");\n"
3802 msgstr ""
3803 "    s = pthread_join(thr, &res);\n"
3804 "    if (s != 0)\n"
3805 "        handle_error_en(s, \"pthread_join\");\n"
3806
3807 #. type: Plain text
3808 #: build/C/man3/pthread_cancel.3:222
3809 #, no-wrap
3810 msgid ""
3811 "    if (res == PTHREAD_CANCELED)\n"
3812 "        printf(\"main(): thread was canceled\\en\");\n"
3813 "    else\n"
3814 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3815 "    exit(EXIT_SUCCESS);\n"
3816 "}\n"
3817 msgstr ""
3818 "    if (res == PTHREAD_CANCELED)\n"
3819 "        printf(\"main(): thread was canceled\\en\");\n"
3820 "    else\n"
3821 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3822 "    exit(EXIT_SUCCESS);\n"
3823 "}\n"
3824
3825 #. type: Plain text
3826 #: build/C/man3/pthread_cancel.3:235
3827 msgid ""
3828 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3829 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3830 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3831 msgstr ""
3832 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3833 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3834 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3835
3836 #. type: TH
3837 #: build/C/man3/pthread_cleanup_push.3:26
3838 #, no-wrap
3839 msgid "PTHREAD_CLEANUP_PUSH"
3840 msgstr "PTHREAD_CLEANUP_PUSH"
3841
3842 #. type: TH
3843 #: build/C/man3/pthread_cleanup_push.3:26
3844 #: build/C/man3/pthread_setcancelstate.3:26
3845 #, no-wrap
3846 msgid "2008-11-24"
3847 msgstr "2008-11-24"
3848
3849 #. type: Plain text
3850 #: build/C/man3/pthread_cleanup_push.3:30
3851 msgid ""
3852 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3853 "clean-up handlers"
3854 msgstr ""
3855 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3856 "キャンセルクリーンアップハンドラの push/pop を行う"
3857
3858 #. type: Plain text
3859 #: build/C/man3/pthread_cleanup_push.3:37
3860 #, no-wrap
3861 msgid ""
3862 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3863 "B<                          void *>I<arg>B<);>\n"
3864 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3865 msgstr ""
3866 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3867 "B<                          void *>I<arg>B<);>\n"
3868 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3869
3870 #. type: Plain text
3871 #: build/C/man3/pthread_cleanup_push.3:48
3872 msgid ""
3873 "These functions manipulate the calling thread's stack of thread-cancellation "
3874 "clean-up handlers.  A clean-up handler is a function that is automatically "
3875 "executed when a thread is canceled (or in various other circumstances "
3876 "described below); it might, for example, unlock a mutex so that it becomes "
3877 "available to other threads in the process."
3878 msgstr ""
3879 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3880 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3881 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3882 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3883 "他のスレッドが利用できるようにする関数などが考えられる。"
3884
3885 #. type: Plain text
3886 #: build/C/man3/pthread_cleanup_push.3:59
3887 msgid ""
3888 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3889 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3890 "be given I<arg> as its argument."
3891 msgstr ""
3892 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3893 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3894 "起動される際には、 I<arg> が関数の引き数と渡される。"
3895
3896 #. type: Plain text
3897 #: build/C/man3/pthread_cleanup_push.3:66
3898 msgid ""
3899 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3900 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3901 "nonzero."
3902 msgstr ""
3903 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3904 "スタックの一番上のルーチンを削除する。\n"
3905 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3906
3907 #. type: Plain text
3908 #: build/C/man3/pthread_cleanup_push.3:69
3909 msgid ""
3910 "A cancellation clean-up handler is popped from the stack and executed in the "
3911 "following circumstances:"
3912 msgstr ""
3913 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3914 "スタックから取り出され実行される。"
3915
3916 #. type: Plain text
3917 #: build/C/man3/pthread_cleanup_push.3:73
3918 msgid ""
3919 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3920 "and executed in the reverse of the order in which they were pushed onto the "
3921 "stack."
3922 msgstr ""
3923 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3924 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3925 "実行は、スタックに登録されたのと逆の順序で行われる。"
3926
3927 #. type: Plain text
3928 #: build/C/man3/pthread_cleanup_push.3:81
3929 msgid ""
3930 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
3931 "handlers are executed as described in the preceding point.  (Clean-up "
3932 "handlers are I<not> called if the thread terminates by performing a "
3933 "I<return> from the thread start function.)"
3934 msgstr ""
3935 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
3936 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
3937 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
3938 "は、クリーンアップハンドラはI<呼び出されない>。)"
3939
3940 #. type: Plain text
3941 #: build/C/man3/pthread_cleanup_push.3:87
3942 msgid ""
3943 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
3944 "argument, the top-most clean-up handler is popped and executed."
3945 msgstr ""
3946 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
3947 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
3948 "実行される。"
3949
3950 #. type: Plain text
3951 #: build/C/man3/pthread_cleanup_push.3:99
3952 msgid ""
3953 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
3954 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
3955 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
3956 "calls to these functions are paired within the same function, and at the "
3957 "same lexical nesting level.  (In other words, a clean-up handler is "
3958 "established only during the execution of a specified section of code.)"
3959 msgstr ""
3960 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
3961 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
3962 "して実装することを許容している。\n"
3963 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
3964 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
3965 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
3966 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
3967
3968 #. type: Plain text
3969 #: build/C/man3/pthread_cleanup_push.3:119
3970 msgid ""
3971 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
3972 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
3973 "()  without the matching call of the pair since the jump buffer was filled "
3974 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
3975 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
3976 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
3977 "(3))  inside the handler."
3978 msgstr ""
3979 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
3980 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
3981 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
3982 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
3983 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
3984 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
3985 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
3986 "結果になるかは不定である。"
3987
3988 #. type: Plain text
3989 #: build/C/man3/pthread_cleanup_push.3:121
3990 msgid "These functions do not return a value."
3991 msgstr "これらの関数は値を返さない。"
3992
3993 #.  SH VERSIONS
3994 #.  Available since glibc 2.0
3995 #. type: Plain text
3996 #: build/C/man3/pthread_cleanup_push.3:125
3997 msgid "There are no errors."
3998 msgstr "エラーはない。"
3999
4000 #. type: Plain text
4001 #: build/C/man3/pthread_cleanup_push.3:136
4002 msgid ""
4003 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4004 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4005 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4006 "declared within the scope of paired calls to these functions will be visible "
4007 "within only that scope."
4008 msgstr ""
4009 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4010 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4011 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4012 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4013 "ということを意味している。"
4014
4015 #.  The text was actually added in the 2004 TC2
4016 #. type: Plain text
4017 #: build/C/man3/pthread_cleanup_push.3:151
4018 msgid ""
4019 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4020 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4021 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4022 "avoid doing this."
4023 msgstr ""
4024 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4025 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4026 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4027 "不定であると書かれている。\n"
4028 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4029
4030 #. type: Plain text
4031 #: build/C/man3/pthread_cleanup_push.3:166
4032 msgid ""
4033 "The program below provides a simple example of the use of the functions "
4034 "described in this page.  The program creates a thread that executes a loop "
4035 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4036 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4037 "what command-line arguments are supplied, the main thread sends the other "
4038 "thread a cancellation request, or sets a global variable that causes the "
4039 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4040 msgstr ""
4041 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4042 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4043 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4044 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4045 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4046 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4047 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4048 "設定したりする。"
4049
4050 #. type: Plain text
4051 #: build/C/man3/pthread_cleanup_push.3:169
4052 msgid ""
4053 "In the following shell session, the main thread sends a cancellation request "
4054 "to the other thread:"
4055 msgstr ""
4056 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4057 "キャンセル要求を送信する。"
4058
4059 #. type: Plain text
4060 #: build/C/man3/pthread_cleanup_push.3:179
4061 #, no-wrap
4062 msgid ""
4063 "$ B<./a.out>\n"
4064 "New thread started\n"
4065 "cnt = 0\n"
4066 "cnt = 1\n"
4067 "Canceling thread\n"
4068 "Called clean-up handler\n"
4069 "Thread was canceled; cnt = 0\n"
4070 msgstr ""
4071 "$ B<./a.out>\n"
4072 "New thread started\n"
4073 "cnt = 0\n"
4074 "cnt = 1\n"
4075 "Canceling thread\n"
4076 "Called clean-up handler\n"
4077 "Thread was canceled; cnt = 0\n"
4078
4079 #. type: Plain text
4080 #: build/C/man3/pthread_cleanup_push.3:187
4081 msgid ""
4082 "From the above, we see that the thread was canceled, and that the "
4083 "cancellation clean-up handler was called and it reset the value of the "
4084 "global variable I<cnt> to 0."
4085 msgstr ""
4086 "上記の実行例から、スレッドがキャンセルされ、\n"
4087 "キャンセルクリーンアップハンドラが呼び出され、\n"
4088 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4089
4090 #. type: Plain text
4091 #: build/C/man3/pthread_cleanup_push.3:190
4092 msgid ""
4093 "In the next run, the main program sets a global variable that causes other "
4094 "thread to terminate normally:"
4095 msgstr ""
4096 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4097 "もう一つのスレッドが正常終了するようにしている。"
4098
4099 #. type: Plain text
4100 #: build/C/man3/pthread_cleanup_push.3:198
4101 #, no-wrap
4102 msgid ""
4103 "$ B<./a.out x>\n"
4104 "New thread started\n"
4105 "cnt = 0\n"
4106 "cnt = 1\n"
4107 "Thread terminated normally; cnt = 2\n"
4108 msgstr ""
4109 "$ B<./a.out x>\n"
4110 "New thread started\n"
4111 "cnt = 0\n"
4112 "cnt = 1\n"
4113 "Thread terminated normally; cnt = 2\n"
4114
4115 #. type: Plain text
4116 #: build/C/man3/pthread_cleanup_push.3:206
4117 msgid ""
4118 "From the above, we see that the clean-up handler was not executed (because "
4119 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4120 msgstr ""
4121 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4122 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4123 "分かる。"
4124
4125 #. type: Plain text
4126 #: build/C/man3/pthread_cleanup_push.3:211
4127 msgid ""
4128 "In the next run, the main program sets a global variable that causes the "
4129 "other thread to terminate normally, and supplies a nonzero value for "
4130 "I<cleanup_pop_arg>:"
4131 msgstr ""
4132 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4133 "もう一つのスレッドが正常終了するようにし、さらに\n"
4134 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4135
4136 #. type: Plain text
4137 #: build/C/man3/pthread_cleanup_push.3:220
4138 #, no-wrap
4139 msgid ""
4140 "$ B<./a.out x 1>\n"
4141 "New thread started\n"
4142 "cnt = 0\n"
4143 "cnt = 1\n"
4144 "Called clean-up handler\n"
4145 "Thread terminated normally; cnt = 0\n"
4146 msgstr ""
4147 "$ B<./a.out x 1>\n"
4148 "New thread started\n"
4149 "cnt = 0\n"
4150 "cnt = 1\n"
4151 "Called clean-up handler\n"
4152 "Thread terminated normally; cnt = 0\n"
4153
4154 #. type: Plain text
4155 #: build/C/man3/pthread_cleanup_push.3:227
4156 msgid ""
4157 "In the above, we see that although the thread was not canceled, the clean-up "
4158 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4159 "()  was nonzero."
4160 msgstr ""
4161 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4162 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4163 "に 0 以外を渡したからである。"
4164
4165 #. type: Plain text
4166 #: build/C/man3/pthread_cleanup_push.3:236
4167 #, no-wrap
4168 msgid ""
4169 "#include E<lt>pthread.hE<gt>\n"
4170 "#include E<lt>sys/types.hE<gt>\n"
4171 "#include E<lt>stdio.hE<gt>\n"
4172 "#include E<lt>stdlib.hE<gt>\n"
4173 "#include E<lt>unistd.hE<gt>\n"
4174 "#include E<lt>errno.hE<gt>\n"
4175 msgstr ""
4176 "#include E<lt>pthread.hE<gt>\n"
4177 "#include E<lt>sys/types.hE<gt>\n"
4178 "#include E<lt>stdio.hE<gt>\n"
4179 "#include E<lt>stdlib.hE<gt>\n"
4180 "#include E<lt>unistd.hE<gt>\n"
4181 "#include E<lt>errno.hE<gt>\n"
4182
4183 #. type: Plain text
4184 #: build/C/man3/pthread_cleanup_push.3:243
4185 #, no-wrap
4186 msgid ""
4187 "static int done = 0;\n"
4188 "static int cleanup_pop_arg = 0;\n"
4189 "static int cnt = 0;\n"
4190 msgstr ""
4191 "static int done = 0;\n"
4192 "static int cleanup_pop_arg = 0;\n"
4193 "static int cnt = 0;\n"
4194
4195 #. type: Plain text
4196 #: build/C/man3/pthread_cleanup_push.3:250
4197 #, no-wrap
4198 msgid ""
4199 "static void\n"
4200 "cleanup_handler(void *arg)\n"
4201 "{\n"
4202 "    printf(\"Called clean-up handler\\en\");\n"
4203 "    cnt = 0;\n"
4204 "}\n"
4205 msgstr ""
4206 "static void\n"
4207 "cleanup_handler(void *arg)\n"
4208 "{\n"
4209 "    printf(\"Called clean-up handler\\en\");\n"
4210 "    cnt = 0;\n"
4211 "}\n"
4212
4213 #. type: Plain text
4214 #: build/C/man3/pthread_cleanup_push.3:255
4215 #, no-wrap
4216 msgid ""
4217 "static void *\n"
4218 "thread_start(void *arg)\n"
4219 "{\n"
4220 "    time_t start, curr;\n"
4221 msgstr ""
4222 "static void *\n"
4223 "thread_start(void *arg)\n"
4224 "{\n"
4225 "    time_t start, curr;\n"
4226
4227 #. type: Plain text
4228 #: build/C/man3/pthread_cleanup_push.3:257
4229 #, no-wrap
4230 msgid "    printf(\"New thread started\\en\");\n"
4231 msgstr "    printf(\"New thread started\\en\");\n"
4232
4233 #. type: Plain text
4234 #: build/C/man3/pthread_cleanup_push.3:259
4235 #, no-wrap
4236 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4237 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4238
4239 #. type: Plain text
4240 #: build/C/man3/pthread_cleanup_push.3:261
4241 #, no-wrap
4242 msgid "    curr = start = time(NULL);\n"
4243 msgstr "    curr = start = time(NULL);\n"
4244
4245 #. type: Plain text
4246 #: build/C/man3/pthread_cleanup_push.3:270
4247 #, no-wrap
4248 msgid ""
4249 "    while (!done) {\n"
4250 "        pthread_testcancel();           /* A cancellation point */\n"
4251 "        if (curr E<lt> time(NULL)) {\n"
4252 "            curr = time(NULL);\n"
4253 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4254 "            cnt++;\n"
4255 "        }\n"
4256 "    }\n"
4257 msgstr ""
4258 "    while (!done) {\n"
4259 "        pthread_testcancel();           /* A cancellation point */\n"
4260 "        if (curr E<lt> time(NULL)) {\n"
4261 "            curr = time(NULL);\n"
4262 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4263 "            cnt++;\n"
4264 "        }\n"
4265 "    }\n"
4266
4267 #. type: Plain text
4268 #: build/C/man3/pthread_cleanup_push.3:274
4269 #, no-wrap
4270 msgid ""
4271 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4272 "    return NULL;\n"
4273 "}\n"
4274 msgstr ""
4275 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4276 "    return NULL;\n"
4277 "}\n"
4278
4279 #. type: Plain text
4280 #: build/C/man3/pthread_cleanup_push.3:281
4281 #, no-wrap
4282 msgid ""
4283 "int\n"
4284 "main(int argc, char *argv[])\n"
4285 "{\n"
4286 "    pthread_t thr;\n"
4287 "    int s;\n"
4288 "    void *res;\n"
4289 msgstr ""
4290 "int\n"
4291 "main(int argc, char *argv[])\n"
4292 "{\n"
4293 "    pthread_t thr;\n"
4294 "    int s;\n"
4295 "    void *res;\n"
4296
4297 #. type: Plain text
4298 #: build/C/man3/pthread_cleanup_push.3:285
4299 #, no-wrap
4300 msgid ""
4301 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4302 "    if (s != 0)\n"
4303 "        handle_error_en(s, \"pthread_create\");\n"
4304 msgstr ""
4305 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4306 "    if (s != 0)\n"
4307 "        handle_error_en(s, \"pthread_create\");\n"
4308
4309 #. type: Plain text
4310 #: build/C/man3/pthread_cleanup_push.3:287
4311 #, no-wrap
4312 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4313 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4314
4315 #. type: Plain text
4316 #: build/C/man3/pthread_cleanup_push.3:292
4317 #, no-wrap
4318 msgid ""
4319 "    if (argc E<gt> 1) {\n"
4320 "        if (argc E<gt> 2)\n"
4321 "            cleanup_pop_arg = atoi(argv[2]);\n"
4322 "        done = 1;\n"
4323 msgstr ""
4324 "    if (argc E<gt> 1) {\n"
4325 "        if (argc E<gt> 2)\n"
4326 "            cleanup_pop_arg = atoi(argv[2]);\n"
4327 "        done = 1;\n"
4328
4329 #. type: Plain text
4330 #: build/C/man3/pthread_cleanup_push.3:299
4331 #, no-wrap
4332 msgid ""
4333 "    } else {\n"
4334 "        printf(\"Canceling thread\\en\");\n"
4335 "        s = pthread_cancel(thr);\n"
4336 "        if (s != 0)\n"
4337 "            handle_error_en(s, \"pthread_cancel\");\n"
4338 "    }\n"
4339 msgstr ""
4340 "    } else {\n"
4341 "        printf(\"Canceling thread\\en\");\n"
4342 "        s = pthread_cancel(thr);\n"
4343 "        if (s != 0)\n"
4344 "            handle_error_en(s, \"pthread_cancel\");\n"
4345 "    }\n"
4346
4347 #. type: Plain text
4348 #: build/C/man3/pthread_cleanup_push.3:310
4349 #, no-wrap
4350 msgid ""
4351 "    if (res == PTHREAD_CANCELED)\n"
4352 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4353 "    else\n"
4354 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4355 "    exit(EXIT_SUCCESS);\n"
4356 "}\n"
4357 msgstr ""
4358 "    if (res == PTHREAD_CANCELED)\n"
4359 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4360 "    else\n"
4361 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4362 "    exit(EXIT_SUCCESS);\n"
4363 "}\n"
4364
4365 #. type: Plain text
4366 #: build/C/man3/pthread_cleanup_push.3:317
4367 msgid ""
4368 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4369 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4370 msgstr ""
4371 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4372 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4373
4374 #. type: TH
4375 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4376 #, no-wrap
4377 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4378 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4379
4380 #. type: TH
4381 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4382 #, no-wrap
4383 msgid "2008-12-04"
4384 msgstr "2008-12-04"
4385
4386 #. type: Plain text
4387 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4388 msgid ""
4389 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4390 "thread cancellation clean-up handlers while saving cancelability type"
4391 msgstr ""
4392 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4393 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4394 "の push/pop を行う"
4395
4396 #. type: Plain text
4397 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4398 #, no-wrap
4399 msgid ""
4400 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4401 "B<                                   void *>I<arg>B<);>\n"
4402 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4403 msgstr ""
4404 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4405 "B<                                   void *>I<arg>B<);>\n"
4406 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4407
4408 #. type: Plain text
4409 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4410 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4411 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4412 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4413 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4414 #: build/C/man3/pthread_yield.3:37
4415 msgid "Compile and link with I<-pthread>."
4416 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4417
4418 #. type: Plain text
4419 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4420 msgid ""
4421 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4422 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4423 msgstr ""
4424 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4425 "だが、このページで説明する点が異なる。"
4426
4427 #. type: Plain text
4428 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4429 msgid ""
4430 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4431 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4432 "addition, it also saves the thread's current cancelability type, and sets "
4433 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4434 "this ensures that cancellation clean-up will occur even if the thread's "
4435 "cancelability type was \"asynchronous\" before the call."
4436 msgstr ""
4437 "B<pthread_cleanup_push>(3) と同様に、\n"
4438 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4439 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4440 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4441 "保存し、cancelability type は \"deferred\" に設定する\n"
4442 "(B<pthread_setcanceltype>(3) 参照)。\n"
4443 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4444 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4445 "が保証される。"
4446
4447 #. type: Plain text
4448 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4449 msgid ""
4450 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4451 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4452 "up handlers.  In addition, it restores the thread's cancelability type to "
4453 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4454 msgstr ""
4455 "B<pthread_cleanup_pop>(3) と同様に、\n"
4456 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4457 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4458 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4459 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4460
4461 #. type: Plain text
4462 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4463 msgid ""
4464 "The caller must ensure that calls to these functions are paired within the "
4465 "same function, and at the same lexical nesting level.  Other restrictions "
4466 "apply, as described in B<pthread_cleanup_push>(3)."
4467 msgstr ""
4468 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4469 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4470 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4471 "適用される。"
4472
4473 #. type: Plain text
4474 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4475 msgid "This sequence of calls:"
4476 msgstr "以下の一連の呼び出し"
4477
4478 #. type: Plain text
4479 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4480 #, no-wrap
4481 msgid ""
4482 "pthread_cleanup_push_defer_np(routine, arg);\n"
4483 "pthread_cleanup_pop_restore_np(execute);\n"
4484 msgstr ""
4485 "pthread_cleanup_push_defer_np(routine, arg);\n"
4486 "pthread_cleanup_pop_restore_np(execute);\n"
4487
4488 #. type: Plain text
4489 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4490 msgid "is equivalent to (but shorter and more efficient than):"
4491 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4492
4493 #. type: Plain text
4494 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4495 #, no-wrap
4496 msgid "int oldtype;\n"
4497 msgstr "int oldtype;\n"
4498
4499 #. type: Plain text
4500 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4501 #, no-wrap
4502 msgid ""
4503 "pthread_cleanup_push(routine, arg);\n"
4504 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4505 "\\&...\n"
4506 "pthread_setcanceltype(oldtype, NULL);\n"
4507 "pthread_cleanup_pop(execute);\n"
4508 msgstr ""
4509 "pthread_cleanup_push(routine, arg);\n"
4510 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4511 "\\&...\n"
4512 "pthread_setcanceltype(oldtype, NULL);\n"
4513 "pthread_cleanup_pop(execute);\n"
4514
4515 #. type: Plain text
4516 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4517 msgid ""
4518 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4519 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4520 msgstr ""
4521 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4522 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4523
4524 #. type: TH
4525 #: build/C/man3/pthread_create.3:26
4526 #, no-wrap
4527 msgid "PTHREAD_CREATE"
4528 msgstr "PTHREAD_CREATE"
4529
4530 #. type: TH
4531 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_sigmask.3:26
4532 #, no-wrap
4533 msgid "2012-08-03"
4534 msgstr "2012-08-03"
4535
4536 #. type: Plain text
4537 #: build/C/man3/pthread_create.3:29
4538 msgid "pthread_create - create a new thread"
4539 msgstr "pthread_create - 新しいスレッドを作成する"
4540
4541 #. type: Plain text
4542 #: build/C/man3/pthread_create.3:35
4543 #, no-wrap
4544 msgid ""
4545 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4546 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4547 msgstr ""
4548 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4549 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4550
4551 #. type: Plain text
4552 #: build/C/man3/pthread_create.3:47
4553 msgid ""
4554 "The B<pthread_create>()  function starts a new thread in the calling "
4555 "process.  The new thread starts execution by invoking I<start_routine>(); "
4556 "I<arg> is passed as the sole argument of I<start_routine>()."
4557 msgstr ""
4558 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4559 "る。\n"
4560 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4561 "I<start_routine>() は引き数を一つだけ取り、\n"
4562 "I<arg> が I<start_routine>() の引き数として渡される。"
4563
4564 #. type: Plain text
4565 #: build/C/man3/pthread_create.3:49
4566 msgid "The new thread terminates in one of the following ways:"
4567 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4568
4569 #. type: IP
4570 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4571 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4572 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4573 #: build/C/man3/pthread_getattr_np.3:58
4574 #, no-wrap
4575 msgid "*"
4576 msgstr "*"
4577
4578 #. type: Plain text
4579 #: build/C/man3/pthread_create.3:55
4580 msgid ""
4581 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4582 "available to another thread in the same process that calls B<pthread_join>"
4583 "(3)."
4584 msgstr ""
4585 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4586 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4587 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4588 "別のスレッドで参照できる。"
4589
4590 #. type: Plain text
4591 #: build/C/man3/pthread_create.3:63
4592 msgid ""
4593 "It returns from I<start_routine>().  This is equivalent to calling "
4594 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4595 msgstr ""
4596 "スレッドが I<start_routine>() から返る。これは、\n"
4597 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4598
4599 #. type: Plain text
4600 #: build/C/man3/pthread_create.3:66
4601 msgid "It is canceled (see B<pthread_cancel>(3))."
4602 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4603
4604 #. type: Plain text
4605 #: build/C/man3/pthread_create.3:72
4606 msgid ""
4607 "Any of the threads in the process calls B<exit>(3), or the main thread "
4608 "performs a return from I<main>().  This causes the termination of all "
4609 "threads in the process."
4610 msgstr ""
4611 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4612 "メインスレッドで I<main>() 内で return が実行される。\n"
4613 "この場合は、プロセス内の全てのスレッドが終了される。"
4614
4615 #. type: Plain text
4616 #: build/C/man3/pthread_create.3:86
4617 msgid ""
4618 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4619 "are used at thread creation time to determine attributes for the new thread; "
4620 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4621 "functions.  If I<attr> is NULL, then the thread is created with default "
4622 "attributes."
4623 msgstr ""
4624 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4625 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4626 "新しいスレッドの属性が決定される。\n"
4627 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4628 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4629
4630 #. type: Plain text
4631 #: build/C/man3/pthread_create.3:93
4632 msgid ""
4633 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4634 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4635 "used to refer to the thread in subsequent calls to other pthreads functions."
4636 msgstr ""
4637 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4638 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4639 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4640
4641 #. type: Plain text
4642 #: build/C/man3/pthread_create.3:101
4643 msgid ""
4644 "The new thread inherits a copy of the creating thread's signal mask "
4645 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4646 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4647 "thread's alternate signal stack (B<sigaltstack>(2))."
4648 msgstr ""
4649 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4650 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4651 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4652 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4653 "(B<sigaltstack>(2)) を継承しない。"
4654
4655 #. type: Plain text
4656 #: build/C/man3/pthread_create.3:104
4657 msgid ""
4658 "The new thread inherits the calling thread's floating-point environment "
4659 "(B<fenv>(3))."
4660 msgstr ""
4661 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4662 "を継承する。"
4663
4664 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4665 #. type: Plain text
4666 #: build/C/man3/pthread_create.3:109
4667 msgid ""
4668 "The initial value of the new thread's CPU-time clock is 0 (see "
4669 "B<pthread_getcpuclockid>(3))."
4670 msgstr ""
4671 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4672 "(B<pthread_getcpuclockid>(3) 参照)。"
4673
4674 #. type: SS
4675 #: build/C/man3/pthread_create.3:109
4676 #, no-wrap
4677 msgid "Linux-specific details"
4678 msgstr "Linux 固有の詳細"
4679
4680 #. type: Plain text
4681 #: build/C/man3/pthread_create.3:115
4682 msgid ""
4683 "The new thread inherits copies of the calling thread's capability sets (see "
4684 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4685 msgstr ""
4686 "新しいスレッドは、呼び出したスレッドの\n"
4687 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4688 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4689 "コピーをを継承しない。"
4690
4691 #. type: Plain text
4692 #: build/C/man3/pthread_create.3:122
4693 msgid ""
4694 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4695 "number, and the contents of I<*thread> are undefined."
4696 msgstr ""
4697 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4698 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4699
4700 #. type: TP
4701 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4702 #, no-wrap
4703 msgid "B<EAGAIN>"
4704 msgstr "B<EAGAIN>"
4705
4706 #. type: Plain text
4707 #: build/C/man3/pthread_create.3:137
4708 msgid ""
4709 "Insufficient resources to create another thread, or a system-imposed limit "
4710 "on the number of threads was encountered.  The latter case may occur in two "
4711 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4712 "which limits the number of process for a real user ID, was reached; or the "
4713 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4714 "threads-max>, was reached."
4715 msgstr ""
4716 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4717 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4718 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4719 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4720 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4721 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4722
4723 #. type: Plain text
4724 #: build/C/man3/pthread_create.3:141
4725 msgid "Invalid settings in I<attr>."
4726 msgstr "I<attr> で指定された設定が不正である。"
4727
4728 #. type: TP
4729 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4730 #: build/C/man3/pthread_setschedprio.3:66
4731 #, no-wrap
4732 msgid "B<EPERM>"
4733 msgstr "B<EPERM>"
4734
4735 #. type: Plain text
4736 #: build/C/man3/pthread_create.3:146
4737 msgid ""
4738 "No permission to set the scheduling policy and parameters specified in "
4739 "I<attr>."
4740 msgstr ""
4741 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4742 "設定する許可がない。"
4743
4744 #. type: Plain text
4745 #: build/C/man3/pthread_create.3:160
4746 msgid ""
4747 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4748 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4749 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4750 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4751 msgstr ""
4752 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4753 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4754 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4755 "B<pthread_create>() の呼び出し後に、\n"
4756 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4757 "次に実行されるかは決まっていない。"
4758
4759 #. type: Plain text
4760 #: build/C/man3/pthread_create.3:180
4761 msgid ""
4762 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4763 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4764 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4765 "has been joined are the last of its resources released back to the system.  "
4766 "When a detached thread terminates, its resources are automatically released "
4767 "back to the system: it is not possible to join with the thread in order to "
4768 "obtain its exit status.  Making a thread detached is useful for some types "
4769 "of daemon threads whose exit status the application does not need to care "
4770 "about.  By default, a new thread is created in a joinable state, unless "
4771 "I<attr> was set to create the thread in a detached state (using "
4772 "B<pthread_attr_setdetachstate>(3))."
4773 msgstr ""
4774 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4775 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4776 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4777 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4778 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4779 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4780 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4781 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4782 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4783 "デーモン (daemon) スレッドでは有用である。\n"
4784 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4785 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4786 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4787 "作成される。"
4788
4789 #.  FIXME . Perhaps some of the following detail should be in
4790 #.  a future pthread_attr_setstacksize(3) page.
4791 #. type: Plain text
4792 #: build/C/man3/pthread_create.3:196
4793 msgid ""
4794 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4795 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4796 "resource limit I<at the time the program started> has any value other than "
4797 "\"unlimited\", then it determines the default stack size of new threads.  "
4798 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4799 "explicitly set in the I<attr> argument used to create a thread, in order to "
4800 "obtain a stack size other than the default."
4801 msgstr ""
4802 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4803 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4804 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4805 "フォルトのスタックサイズとなる。\n"
4806 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4807 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4808 "デフォルト値以外のスタックサイズを得ることができる。"
4809
4810 #. type: Plain text
4811 #: build/C/man3/pthread_create.3:202
4812 msgid ""
4813 "In the obsolete LinuxThreads implementation, each of the threads in a "
4814 "process has a different process ID.  This is in violation of the POSIX "
4815 "threads specification, and is the source of many other nonconformances to "
4816 "the standard; see B<pthreads>(7)."
4817 msgstr ""
4818 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4819 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4820 "他の多くの標準非準拠の点の原因になっている。\n"
4821 "B<pthreads>(7) を参照のこと。"
4822
4823 #. type: Plain text
4824 #: build/C/man3/pthread_create.3:206
4825 msgid ""
4826 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4827 "number of other functions in the pthreads API."
4828 msgstr ""
4829 "以下のプログラムは、 B<pthread_create>() や\n"
4830 "pthreads API の他のいろいろな関数の使用例を示している。"
4831
4832 #. type: Plain text
4833 #: build/C/man3/pthread_create.3:211
4834 msgid ""
4835 "In the following run, on a system providing the NPTL threading "
4836 "implementation, the stack size defaults to the value given by the \"stack "
4837 "size\" resource limit:"
4838 msgstr ""
4839 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4840 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4841 "になる。"
4842
4843 #. type: Plain text
4844 #: build/C/man3/pthread_create.3:223
4845 #, no-wrap
4846 msgid ""
4847 "$B< ulimit -s>\n"
4848 "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4849 "$B< ./a.out hola salut servus>\n"
4850 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4851 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4852 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4853 "Joined with thread 1; returned value was HOLA\n"
4854 "Joined with thread 2; returned value was SALUT\n"
4855 "Joined with thread 3; returned value was SERVUS\n"
4856 msgstr ""
4857 "$B< ulimit -s>\n"
4858 "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4859 "$B< ./a.out hola salut servus>\n"
4860 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4861 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4862 "Thread 3: top of stack near 0xb6dce3b8; 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
4867 #. type: Plain text
4868 #: build/C/man3/pthread_create.3:229
4869 msgid ""
4870 "In the next run, the program explicitly sets a stack size of 1MB (using "
4871 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4872 msgstr ""
4873 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4874 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4875 "明示的に設定している。"
4876
4877 #. type: Plain text
4878 #: build/C/man3/pthread_create.3:239
4879 #, no-wrap
4880 msgid ""
4881 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4882 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4883 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4884 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4885 "Joined with thread 1; returned value was HOLA\n"
4886 "Joined with thread 2; returned value was SALUT\n"
4887 "Joined with thread 3; returned value was SERVUS\n"
4888 msgstr ""
4889 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4890 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4891 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4892 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4893 "Joined with thread 1; returned value was HOLA\n"
4894 "Joined with thread 2; returned value was SALUT\n"
4895 "Joined with thread 3; returned value was SERVUS\n"
4896
4897 #. type: Plain text
4898 #: build/C/man3/pthread_create.3:251
4899 #, no-wrap
4900 msgid ""
4901 "#include E<lt>pthread.hE<gt>\n"
4902 "#include E<lt>string.hE<gt>\n"
4903 "#include E<lt>stdio.hE<gt>\n"
4904 "#include E<lt>stdlib.hE<gt>\n"
4905 "#include E<lt>unistd.hE<gt>\n"
4906 "#include E<lt>errno.hE<gt>\n"
4907 "#include E<lt>ctype.hE<gt>\n"
4908 msgstr ""
4909 "#include E<lt>pthread.hE<gt>\n"
4910 "#include E<lt>string.hE<gt>\n"
4911 "#include E<lt>stdio.hE<gt>\n"
4912 "#include E<lt>stdlib.hE<gt>\n"
4913 "#include E<lt>unistd.hE<gt>\n"
4914 "#include E<lt>errno.hE<gt>\n"
4915 "#include E<lt>ctype.hE<gt>\n"
4916
4917 #. type: Plain text
4918 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:110
4919 #, no-wrap
4920 msgid ""
4921 "#define handle_error(msg) \\e\n"
4922 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4923 msgstr ""
4924 "#define handle_error(msg) \\e\n"
4925 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4926
4927 #. type: Plain text
4928 #: build/C/man3/pthread_create.3:263
4929 #, no-wrap
4930 msgid ""
4931 "struct thread_info {    /* Used as argument to thread_start() */\n"
4932 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4933 "    int       thread_num;       /* Application-defined thread # */\n"
4934 "    char     *argv_string;      /* From command-line argument */\n"
4935 "};\n"
4936 msgstr ""
4937 "struct thread_info {    /* Used as argument to thread_start() */\n"
4938 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4939 "    int       thread_num;       /* Application-defined thread # */\n"
4940 "    char     *argv_string;      /* From command-line argument */\n"
4941 "};\n"
4942
4943 #. type: Plain text
4944 #: build/C/man3/pthread_create.3:266
4945 #, no-wrap
4946 msgid ""
4947 "/* Thread start function: display address near top of our stack,\n"
4948 "   and return upper-cased copy of argv_string */\n"
4949 msgstr ""
4950 "/* Thread start function: display address near top of our stack,\n"
4951 "   and return upper-cased copy of argv_string */\n"
4952
4953 #. type: Plain text
4954 #: build/C/man3/pthread_create.3:272
4955 #, no-wrap
4956 msgid ""
4957 "static void *\n"
4958 "thread_start(void *arg)\n"
4959 "{\n"
4960 "    struct thread_info *tinfo = arg;\n"
4961 "    char *uargv, *p;\n"
4962 msgstr ""
4963 "static void *\n"
4964 "thread_start(void *arg)\n"
4965 "{\n"
4966 "    struct thread_info *tinfo = arg;\n"
4967 "    char *uargv, *p;\n"
4968
4969 #. type: Plain text
4970 #: build/C/man3/pthread_create.3:275
4971 #, no-wrap
4972 msgid ""
4973 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
4974 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
4975 msgstr ""
4976 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
4977 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
4978
4979 #. type: Plain text
4980 #: build/C/man3/pthread_create.3:279
4981 #, no-wrap
4982 msgid ""
4983 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
4984 "    if (uargv == NULL)\n"
4985 "        handle_error(\"strdup\");\n"
4986 msgstr ""
4987 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
4988 "    if (uargv == NULL)\n"
4989 "        handle_error(\"strdup\");\n"
4990
4991 #. type: Plain text
4992 #: build/C/man3/pthread_create.3:282
4993 #, no-wrap
4994 msgid ""
4995 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
4996 "        *p = toupper(*p);\n"
4997 msgstr ""
4998 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
4999 "        *p = toupper(*p);\n"
5000
5001 #. type: Plain text
5002 #: build/C/man3/pthread_create.3:285
5003 #, no-wrap
5004 msgid ""
5005 "    return uargv;\n"
5006 "}\n"
5007 msgstr ""
5008 "    return uargv;\n"
5009 "}\n"
5010
5011 #. type: Plain text
5012 #: build/C/man3/pthread_create.3:294
5013 #, no-wrap
5014 msgid ""
5015 "int\n"
5016 "main(int argc, char *argv[])\n"
5017 "{\n"
5018 "    int s, tnum, opt, num_threads;\n"
5019 "    struct thread_info *tinfo;\n"
5020 "    pthread_attr_t attr;\n"
5021 "    int stack_size;\n"
5022 "    void *res;\n"
5023 msgstr ""
5024 "int\n"
5025 "main(int argc, char *argv[])\n"
5026 "{\n"
5027 "    int s, tnum, opt, num_threads;\n"
5028 "    struct thread_info *tinfo;\n"
5029 "    pthread_attr_t attr;\n"
5030 "    int stack_size;\n"
5031 "    void *res;\n"
5032
5033 #. type: Plain text
5034 #: build/C/man3/pthread_create.3:296
5035 #, no-wrap
5036 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5037 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5038
5039 #. type: Plain text
5040 #: build/C/man3/pthread_create.3:303
5041 #, no-wrap
5042 msgid ""
5043 "    stack_size = -1;\n"
5044 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5045 "        switch (opt) {\n"
5046 "        case \\(aqs\\(aq:\n"
5047 "            stack_size = strtoul(optarg, NULL, 0);\n"
5048 "            break;\n"
5049 msgstr ""
5050 "    stack_size = -1;\n"
5051 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5052 "        switch (opt) {\n"
5053 "        case \\(aqs\\(aq:\n"
5054 "            stack_size = strtoul(optarg, NULL, 0);\n"
5055 "            break;\n"
5056
5057 #. type: Plain text
5058 #: build/C/man3/pthread_create.3:310
5059 #, no-wrap
5060 msgid ""
5061 "        default:\n"
5062 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5063 "                    argv[0]);\n"
5064 "            exit(EXIT_FAILURE);\n"
5065 "        }\n"
5066 "    }\n"
5067 msgstr ""
5068 "        default:\n"
5069 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5070 "                    argv[0]);\n"
5071 "            exit(EXIT_FAILURE);\n"
5072 "        }\n"
5073 "    }\n"
5074
5075 #. type: Plain text
5076 #: build/C/man3/pthread_create.3:312
5077 #, no-wrap
5078 msgid "    num_threads = argc - optind;\n"
5079 msgstr "    num_threads = argc - optind;\n"
5080
5081 #. type: Plain text
5082 #: build/C/man3/pthread_create.3:314
5083 #, no-wrap
5084 msgid "    /* Initialize thread creation attributes */\n"
5085 msgstr "    /* Initialize thread creation attributes */\n"
5086
5087 #. type: Plain text
5088 #: build/C/man3/pthread_create.3:318
5089 #, no-wrap
5090 msgid ""
5091 "    s = pthread_attr_init(&attr);\n"
5092 "    if (s != 0)\n"
5093 "        handle_error_en(s, \"pthread_attr_init\");\n"
5094 msgstr ""
5095 "    s = pthread_attr_init(&attr);\n"
5096 "    if (s != 0)\n"
5097 "        handle_error_en(s, \"pthread_attr_init\");\n"
5098
5099 #. type: Plain text
5100 #: build/C/man3/pthread_create.3:324
5101 #, no-wrap
5102 msgid ""
5103 "    if (stack_size E<gt> 0) {\n"
5104 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5105 "        if (s != 0)\n"
5106 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5107 "    }\n"
5108 msgstr ""
5109 "    if (stack_size E<gt> 0) {\n"
5110 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5111 "        if (s != 0)\n"
5112 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5113 "    }\n"
5114
5115 #. type: Plain text
5116 #: build/C/man3/pthread_create.3:326
5117 #, no-wrap
5118 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5119 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5120
5121 #. type: Plain text
5122 #: build/C/man3/pthread_create.3:330
5123 #, no-wrap
5124 msgid ""
5125 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5126 "    if (tinfo == NULL)\n"
5127 "        handle_error(\"calloc\");\n"
5128 msgstr ""
5129 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5130 "    if (tinfo == NULL)\n"
5131 "        handle_error(\"calloc\");\n"
5132
5133 #. type: Plain text
5134 #: build/C/man3/pthread_create.3:332
5135 #, no-wrap
5136 msgid "    /* Create one thread for each command-line argument */\n"
5137 msgstr "    /* Create one thread for each command-line argument */\n"
5138
5139 #. type: Plain text
5140 #: build/C/man3/pthread_create.3:336
5141 #, no-wrap
5142 msgid ""
5143 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5144 "        tinfo[tnum].thread_num = tnum + 1;\n"
5145 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5146 msgstr ""
5147 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5148 "        tinfo[tnum].thread_num = tnum + 1;\n"
5149 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5150
5151 #. type: Plain text
5152 #: build/C/man3/pthread_create.3:339
5153 #, no-wrap
5154 msgid ""
5155 "        /* The pthread_create() call stores the thread ID into\n"
5156 "           corresponding element of tinfo[] */\n"
5157 msgstr ""
5158 "        /* The pthread_create() call stores the thread ID into\n"
5159 "           corresponding element of tinfo[] */\n"
5160
5161 #. type: Plain text
5162 #: build/C/man3/pthread_create.3:345
5163 #, no-wrap
5164 msgid ""
5165 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5166 "                           &thread_start, &tinfo[tnum]);\n"
5167 "        if (s != 0)\n"
5168 "            handle_error_en(s, \"pthread_create\");\n"
5169 "    }\n"
5170 msgstr ""
5171 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5172 "                           &thread_start, &tinfo[tnum]);\n"
5173 "        if (s != 0)\n"
5174 "            handle_error_en(s, \"pthread_create\");\n"
5175 "    }\n"
5176
5177 #. type: Plain text
5178 #: build/C/man3/pthread_create.3:348
5179 #, no-wrap
5180 msgid ""
5181 "    /* Destroy the thread attributes object, since it is no\n"
5182 "       longer needed */\n"
5183 msgstr ""
5184 "    /* Destroy the thread attributes object, since it is no\n"
5185 "       longer needed */\n"
5186
5187 #. type: Plain text
5188 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5189 #, no-wrap
5190 msgid ""
5191 "    s = pthread_attr_destroy(&attr);\n"
5192 "    if (s != 0)\n"
5193 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5194 msgstr ""
5195 "    s = pthread_attr_destroy(&attr);\n"
5196 "    if (s != 0)\n"
5197 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5198
5199 #. type: Plain text
5200 #: build/C/man3/pthread_create.3:354
5201 #, no-wrap
5202 msgid "    /* Now join with each thread, and display its returned value */\n"
5203 msgstr "    /* Now join with each thread, and display its returned value */\n"
5204
5205 #. type: Plain text
5206 #: build/C/man3/pthread_create.3:359
5207 #, no-wrap
5208 msgid ""
5209 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5210 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5211 "        if (s != 0)\n"
5212 "            handle_error_en(s, \"pthread_join\");\n"
5213 msgstr ""
5214 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5215 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5216 "        if (s != 0)\n"
5217 "            handle_error_en(s, \"pthread_join\");\n"
5218
5219 #. type: Plain text
5220 #: build/C/man3/pthread_create.3:364
5221 #, no-wrap
5222 msgid ""
5223 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5224 "                tinfo[tnum].thread_num, (char *) res);\n"
5225 "        free(res);      /* Free memory allocated by thread */\n"
5226 "    }\n"
5227 msgstr ""
5228 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5229 "                tinfo[tnum].thread_num, (char *) res);\n"
5230 "        free(res);      /* Free memory allocated by thread */\n"
5231 "    }\n"
5232
5233 #. type: Plain text
5234 #: build/C/man3/pthread_create.3:368
5235 #, no-wrap
5236 msgid ""
5237 "    free(tinfo);\n"
5238 "    exit(EXIT_SUCCESS);\n"
5239 "}\n"
5240 msgstr ""
5241 "    free(tinfo);\n"
5242 "    exit(EXIT_SUCCESS);\n"
5243 "}\n"
5244
5245 #. type: Plain text
5246 #: build/C/man3/pthread_create.3:382
5247 msgid ""
5248 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5249 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5250 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5251 "(7)"
5252 msgstr ""
5253 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5254 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5255 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5256 "(7)"
5257
5258 #. type: TH
5259 #: build/C/man3/pthread_detach.3:26
5260 #, no-wrap
5261 msgid "PTHREAD_DETACH"
5262 msgstr "PTHREAD_DETACH"
5263
5264 #. type: TH
5265 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5266 #, no-wrap
5267 msgid "2008-11-27"
5268 msgstr "2008-11-27"
5269
5270 #. type: Plain text
5271 #: build/C/man3/pthread_detach.3:29
5272 msgid "pthread_detach - detach a thread"
5273 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5274
5275 #. type: Plain text
5276 #: build/C/man3/pthread_detach.3:34
5277 #, no-wrap
5278 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5279 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5280
5281 #. type: Plain text
5282 #: build/C/man3/pthread_detach.3:46
5283 msgid ""
5284 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5285 "as detached.  When a detached thread terminates, its resources are "
5286 "automatically released back to the system without the need for another "
5287 "thread to join with the terminated thread."
5288 msgstr ""
5289 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5290 "detached (切り離された状態) という印を付ける。\n"
5291 "detached 状態のスレッドが終了すると、\n"
5292 "別のスレッドが終了されたスレッドを join しなくても、\n"
5293 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5294
5295 #. type: Plain text
5296 #: build/C/man3/pthread_detach.3:49
5297 msgid ""
5298 "Attempting to detach an already detached thread results in unspecified "
5299 "behavior."
5300 msgstr ""
5301 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5302 "どのような結果となるかは規定されていない。"
5303
5304 #. type: Plain text
5305 #: build/C/man3/pthread_detach.3:54
5306 msgid ""
5307 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5308 "number."
5309 msgstr ""
5310 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5311 "エラーの場合、エラー番号を返す。"
5312
5313 #. type: Plain text
5314 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5315 msgid "I<thread> is not a joinable thread."
5316 msgstr "I<thread> が join 可能なスレッドではない。"
5317
5318 #. type: Plain text
5319 #: build/C/man3/pthread_detach.3:70
5320 msgid ""
5321 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5322 "or be made joinable again."
5323 msgstr ""
5324 "いったんスレッドを detached 状態にすると、\n"
5325 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5326 "もう一度 join 可能にしたりすることはできない。"
5327
5328 #. type: Plain text
5329 #: build/C/man3/pthread_detach.3:77
5330 msgid ""
5331 "A new thread can be created in a detached state using "
5332 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5333 "I<attr> argument of B<pthread_create>(3)."
5334 msgstr ""
5335 "B<pthread_attr_setdetachstate>(3) を使って\n"
5336 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5337 "新しいスレッドを detached 状態で作成することができる。"
5338
5339 #. type: Plain text
5340 #: build/C/man3/pthread_detach.3:84
5341 msgid ""
5342 "The detached attribute merely determines the behavior of the system when the "
5343 "thread terminates; it does not prevent the thread from being terminated if "
5344 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5345 "thread returns)."
5346 msgstr ""
5347 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5348 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5349 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5350 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5351
5352 #. type: Plain text
5353 #: build/C/man3/pthread_detach.3:93
5354 msgid ""
5355 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5356 "thread that an application creates, so that system resources for the thread "
5357 "can be released.  (But note that the resources of all threads are freed when "
5358 "the process terminates.)"
5359 msgstr ""
5360 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5361 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5362 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5363 "終了するときには、全てのスレッドのリソースが解放される)。"
5364
5365 #. type: Plain text
5366 #: build/C/man3/pthread_detach.3:95
5367 msgid "The following statement detaches the calling thread:"
5368 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5369
5370 #. type: Plain text
5371 #: build/C/man3/pthread_detach.3:97
5372 #, no-wrap
5373 msgid "    pthread_detach(pthread_self());\n"
5374 msgstr "    pthread_detach(pthread_self());\n"
5375
5376 #. type: Plain text
5377 #: build/C/man3/pthread_detach.3:104
5378 msgid ""
5379 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5380 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5381 msgstr ""
5382 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5383 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5384
5385 #. type: TH
5386 #: build/C/man3/pthread_equal.3:26
5387 #, no-wrap
5388 msgid "PTHREAD_EQUAL"
5389 msgstr "PTHREAD_EQUAL"
5390
5391 #. type: TH
5392 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5393 #, no-wrap
5394 msgid "2009-03-30"
5395 msgstr "2009-03-30"
5396
5397 #. type: Plain text
5398 #: build/C/man3/pthread_equal.3:29
5399 msgid "pthread_equal - compare thread IDs"
5400 msgstr "pthread_equal - スレッド ID を比較する"
5401
5402 #. type: Plain text
5403 #: build/C/man3/pthread_equal.3:34
5404 #, no-wrap
5405 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5406 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5407
5408 #. type: Plain text
5409 #: build/C/man3/pthread_equal.3:41
5410 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5411 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5412
5413 #. type: Plain text
5414 #: build/C/man3/pthread_equal.3:45
5415 msgid ""
5416 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5417 "value; otherwise, it returns 0."
5418 msgstr ""
5419 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5420 "そうでなければ 0 を返す。"
5421
5422 #.  SH VERSIONS
5423 #.  Available since glibc 2.0
5424 #. type: Plain text
5425 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5426 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5427 msgid "This function always succeeds."
5428 msgstr "この関数は常に成功する。"
5429
5430 #. type: Plain text
5431 #: build/C/man3/pthread_equal.3:56
5432 msgid ""
5433 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5434 "considered opaque: there is no portable way for applications to directly "
5435 "compare two I<pthread_t> values."
5436 msgstr ""
5437 "B<pthread_equal>() 関数が必要なのは、\n"
5438 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5439 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5440 "移植性を確保できる形で比較する方法はない。"
5441
5442 #. type: Plain text
5443 #: build/C/man3/pthread_equal.3:60
5444 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5445 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5446
5447 #. type: TH
5448 #: build/C/man3/pthread_exit.3:26
5449 #, no-wrap
5450 msgid "PTHREAD_EXIT"
5451 msgstr "PTHREAD_EXIT"
5452
5453 #. type: Plain text
5454 #: build/C/man3/pthread_exit.3:29
5455 msgid "pthread_exit - terminate calling thread"
5456 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5457
5458 #. type: Plain text
5459 #: build/C/man3/pthread_exit.3:34
5460 #, no-wrap
5461 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5462 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5463
5464 #. type: Plain text
5465 #: build/C/man3/pthread_exit.3:45
5466 msgid ""
5467 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5468 "value via I<retval> that (if the thread is joinable)  is available to "
5469 "another thread in the same process that calls B<pthread_join>(3)."
5470 msgstr ""
5471 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5472 "I<retval> 経由で値を返す。\n"
5473 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5474 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5475
5476 #. type: Plain text
5477 #: build/C/man3/pthread_exit.3:55
5478 msgid ""
5479 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5480 "not yet been popped, are popped (in the reverse of the order in which they "
5481 "were pushed)  and executed.  If the thread has any thread-specific data, "
5482 "then, after the clean-up handlers have been executed, the corresponding "
5483 "destructor functions are called, in an unspecified order."
5484 msgstr ""
5485 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5486 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5487 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5488 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5489 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5490 "は規定されていない)。"
5491
5492 #. type: Plain text
5493 #: build/C/man3/pthread_exit.3:62
5494 msgid ""
5495 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5496 "variables, semaphores, and file descriptors) are not released, and functions "
5497 "registered using B<atexit>(3)  are not called."
5498 msgstr ""
5499 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5500 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5501 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5502
5503 #. type: Plain text
5504 #: build/C/man3/pthread_exit.3:71
5505 msgid ""
5506 "After the last thread in a process terminates, the process terminates as by "
5507 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5508 "resources are released and functions registered using B<atexit>(3)  are "
5509 "called."
5510 msgstr ""
5511 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5512 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5513 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5514 "が呼び出される。"
5515
5516 #. type: Plain text
5517 #: build/C/man3/pthread_exit.3:73
5518 msgid "This function does not return to the caller."
5519 msgstr "この関数は呼び出し側には返らない。"
5520
5521 #. type: Plain text
5522 #: build/C/man3/pthread_exit.3:82
5523 msgid ""
5524 "Performing a return from the start function of any thread other than the "
5525 "main thread results in an implicit call to B<pthread_exit>(), using the "
5526 "function's return value as the thread's exit status."
5527 msgstr ""
5528 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5529 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5530 "関数の返り値がスレッドの終了ステータスとして使用される。"
5531
5532 #. type: Plain text
5533 #: build/C/man3/pthread_exit.3:88
5534 msgid ""
5535 "To allow other threads to continue execution, the main thread should "
5536 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5537 msgstr ""
5538 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5539 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5540
5541 #. type: Plain text
5542 #: build/C/man3/pthread_exit.3:93
5543 msgid ""
5544 "The value pointed to by I<retval> should not be located on the calling "
5545 "thread's stack, since the contents of that stack are undefined after the "
5546 "thread terminates."
5547 msgstr ""
5548 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5549 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5550 "である。"
5551
5552 #.  Linux 2.6.27
5553 #.  FIXME . review a later kernel to see if this gets fixed
5554 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5555 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5556 #. type: Plain text
5557 #: build/C/man3/pthread_exit.3:105
5558 msgid ""
5559 "Currently, there are limitations in the kernel implementation logic for "
5560 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5561 "This can manifest in problems such as a locked terminal if a stop signal is "
5562 "sent to a foreground process whose thread group leader has already called "
5563 "B<pthread_exit>()."
5564 msgstr ""
5565 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5566 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5567 "カーネル実装の論理には制限がある。\n"
5568 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5569 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5570 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5571 "場合がある。"
5572
5573 #. type: Plain text
5574 #: build/C/man3/pthread_exit.3:109
5575 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5576 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5577
5578 #. type: TH
5579 #: build/C/man3/pthread_getattr_np.3:26
5580 #, no-wrap
5581 msgid "PTHREAD_GETATTR_NP"
5582 msgstr "PTHREAD_GETATTR_NP"
5583
5584 #. type: Plain text
5585 #: build/C/man3/pthread_getattr_np.3:29
5586 msgid "pthread_getattr_np - get attributes of created thread"
5587 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5588
5589 #. type: Plain text
5590 #: build/C/man3/pthread_getattr_np.3:35
5591 #, no-wrap
5592 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5593 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5594
5595 #. type: Plain text
5596 #: build/C/man3/pthread_getattr_np.3:45
5597 msgid ""
5598 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5599 "object referred to by I<attr> so that it contains actual attribute values "
5600 "describing the running thread I<thread>."
5601 msgstr ""
5602 "B<pthread_getattr_np>() 関数は、\n"
5603 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5604 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5605 "格納して返す。"
5606
5607 #. type: Plain text
5608 #: build/C/man3/pthread_getattr_np.3:52
5609 msgid ""
5610 "The returned attribute values may differ from the corresponding attribute "
5611 "values passed in the I<attr> object that was used to create the thread using "
5612 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5613 msgstr ""
5614 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5615 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5616 "特に、以下の属性は異なる場合がある。"
5617
5618 #. type: Plain text
5619 #: build/C/man3/pthread_getattr_np.3:55
5620 msgid ""
5621 "the detach state, since a joinable thread may have detached itself after "
5622 "creation;"
5623 msgstr ""
5624 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5625 "切り離す (detach する) ことができるからである。"
5626
5627 #. type: Plain text
5628 #: build/C/man3/pthread_getattr_np.3:58
5629 msgid ""
5630 "the stack size, which the implementation may align to a suitable boundary."
5631 msgstr ""
5632 "スタックサイズ。\n"
5633 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5634
5635 #. type: Plain text
5636 #: build/C/man3/pthread_getattr_np.3:63
5637 msgid ""
5638 "and the guard size, which the implementation may round upward to a multiple "
5639 "of the page size, or ignore (i.e., treat as 0), if the application is "
5640 "allocating its own stack."
5641 msgstr ""
5642 "guard size.\n"
5643 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5644 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5645 "(0 として扱われる) ことがあるからである。"
5646
5647 #. type: Plain text
5648 #: build/C/man3/pthread_getattr_np.3:68
5649 msgid ""
5650 "Furthermore, if the stack address attribute was not set in the thread "
5651 "attributes object used to create the thread, then the returned thread "
5652 "attributes object will report the actual stack address that the "
5653 "implementation selected for the thread."
5654 msgstr ""
5655 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5656 "スタックアドレスが設定されていなかった場合、\n"
5657 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5658 "割り当てた実際のスタックアドレスが報告される。"
5659
5660 #. type: Plain text
5661 #: build/C/man3/pthread_getattr_np.3:73
5662 msgid ""
5663 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5664 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5665 msgstr ""
5666 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5667 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5668 "そのオブジェクトを破棄すべきである。"
5669
5670 #. type: Plain text
5671 #: build/C/man3/pthread_getattr_np.3:76
5672 #: build/C/man3/pthread_getcpuclockid.3:49
5673 msgid ""
5674 "On success, this function returns 0; on error, it returns a nonzero error "
5675 "number."
5676 msgstr ""
5677 "成功すると、この関数は 0 を返す。\n"
5678 "エラーの場合、 0 以外のエラー番号を返す。"
5679
5680 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5681 #. type: Plain text
5682 #: build/C/man3/pthread_getattr_np.3:81
5683 msgid "Insufficient memory."
5684 msgstr "メモリが十分になかった。"
5685
5686 #. type: Plain text
5687 #: build/C/man3/pthread_getattr_np.3:96
5688 msgid ""
5689 "In addition, if I<thread> refers to the main thread, then "
5690 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5691 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5692 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5693 msgstr ""
5694 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5695 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5696 "エラーで失敗する可能性がある。\n"
5697 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5698 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5699 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5700
5701 #. type: Plain text
5702 #: build/C/man3/pthread_getattr_np.3:98
5703 msgid "This function is available in glibc since version 2.2.3."
5704 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5705
5706 #. type: Plain text
5707 #: build/C/man3/pthread_getattr_np.3:101
5708 #: build/C/man3/pthread_kill_other_threads_np.3:50
5709 msgid ""
5710 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5711 "\" (nonportable) in the name."
5712 msgstr ""
5713 "この関数は非標準の GNU による拡張である。\n"
5714 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5715 "付いている。"
5716
5717 #. type: Plain text
5718 #: build/C/man3/pthread_getattr_np.3:111
5719 msgid ""
5720 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5721 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5722 "and display its guard size, stack address, and stack size attributes.  "
5723 "Command-line arguments can be used to set these attributes to values other "
5724 "than the default when creating the thread.  The shell sessions below "
5725 "demonstrate the use of the program."
5726 msgstr ""
5727 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5728 "このプログラムは、スレッドを作成し、それから\n"
5729 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5730 "スタックアドレス、スタックサイズを取得し表示する。\n"
5731 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5732 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5733 "下記のシェルのセッションはこのプログラムの使用例である。"
5734
5735 #. type: Plain text
5736 #: build/C/man3/pthread_getattr_np.3:114
5737 msgid ""
5738 "In the first run, on an x86-32 system, a thread is created using default "
5739 "attributes:"
5740 msgstr ""
5741 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5742 "(x86-32 システム上で実行)。"
5743
5744 #. type: Plain text
5745 #: build/C/man3/pthread_getattr_np.3:124
5746 #, no-wrap
5747 msgid ""
5748 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5749 "unlimited\n"
5750 "$B< ./a.out>\n"
5751 "Attributes of created thread:\n"
5752 "        Guard size          = 4096 bytes\n"
5753 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5754 "        Stack size          = 0x201000 (2101248) bytes\n"
5755 msgstr ""
5756 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5757 "unlimited\n"
5758 "$B< ./a.out>\n"
5759 "Attributes of created thread:\n"
5760 "        Guard size          = 4096 bytes\n"
5761 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5762 "        Stack size          = 0x201000 (2101248) bytes\n"
5763
5764 #. type: Plain text
5765 #: build/C/man3/pthread_getattr_np.3:130
5766 msgid ""
5767 "In the following run, we see that if a guard size is specified, it is "
5768 "rounded up to the next multiple of the system page size (4096 bytes on "
5769 "x86-32):"
5770 msgstr ""
5771 "次の実行例では、guard size が指定された場合、\n"
5772 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5773 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5774
5775 #. type: Plain text
5776 #: build/C/man3/pthread_getattr_np.3:138
5777 #, no-wrap
5778 msgid ""
5779 "$B< ./a.out -g 4097>\n"
5780 "Thread attributes object after initializations:\n"
5781 "        Guard size          = 4097 bytes\n"
5782 "        Stack address       = (nil)\n"
5783 "        Stack size          = 0x0 (0) bytes\n"
5784 msgstr ""
5785 "$B< ./a.out -g 4097>\n"
5786 "Thread attributes object after initializations:\n"
5787 "        Guard size          = 4097 bytes\n"
5788 "        Stack address       = (nil)\n"
5789 "        Stack size          = 0x0 (0) bytes\n"
5790
5791 #. type: Plain text
5792 #: build/C/man3/pthread_getattr_np.3:143
5793 #, no-wrap
5794 msgid ""
5795 "Attributes of created thread:\n"
5796 "        Guard size          = 8192 bytes\n"
5797 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5798 "        Stack size          = 0x201000 (2101248) bytes\n"
5799 msgstr ""
5800 "Attributes of created thread:\n"
5801 "        Guard size          = 8192 bytes\n"
5802 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5803 "        Stack size          = 0x201000 (2101248) bytes\n"
5804
5805 #. .in +4n
5806 #. .nf
5807 #. $ ./a.out \-s 0x8000
5808 #. Thread attributes object after initializations:
5809 #.         Guard size          = 4096 bytes
5810 #.         Stack address       = 0xffff8000 (EOS = (nil))
5811 #.         Stack size          = 0x8000 (32768) bytes
5812 #. Attributes of created thread:
5813 #.         Guard size          = 4096 bytes
5814 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5815 #.         Stack size          = 0x8000 (32768) bytes
5816 #. .fi
5817 #. .in
5818 #. type: Plain text
5819 #: build/C/man3/pthread_getattr_np.3:162
5820 msgid ""
5821 "In the last run, the program manually allocates a stack for the thread.  In "
5822 "this case, the guard size attribute is ignored."
5823 msgstr ""
5824 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5825 "この場合には、guard size 属性は無視される。"
5826
5827 #. type: Plain text
5828 #: build/C/man3/pthread_getattr_np.3:167
5829 #, no-wrap
5830 msgid ""
5831 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5832 "Allocated thread stack at 0x804d000\n"
5833 msgstr ""
5834 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5835 "Allocated thread stack at 0x804d000\n"
5836
5837 #. type: Plain text
5838 #: build/C/man3/pthread_getattr_np.3:172
5839 #, no-wrap
5840 msgid ""
5841 "Thread attributes object after initializations:\n"
5842 "        Guard size          = 4096 bytes\n"
5843 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5844 "        Stack size          = 0x8000 (32768) bytes\n"
5845 msgstr ""
5846 "Thread attributes object after initializations:\n"
5847 "        Guard size          = 4096 bytes\n"
5848 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5849 "        Stack size          = 0x8000 (32768) bytes\n"
5850
5851 #. type: Plain text
5852 #: build/C/man3/pthread_getattr_np.3:177
5853 #, no-wrap
5854 msgid ""
5855 "Attributes of created thread:\n"
5856 "        Guard size          = 0 bytes\n"
5857 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5858 "        Stack size          = 0x8000 (32768) bytes\n"
5859 msgstr ""
5860 "Attributes of created thread:\n"
5861 "        Guard size          = 0 bytes\n"
5862 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5863 "        Stack size          = 0x8000 (32768) bytes\n"
5864
5865 #. type: Plain text
5866 #: build/C/man3/pthread_getattr_np.3:198
5867 #, no-wrap
5868 msgid ""
5869 "static void\n"
5870 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5871 "{\n"
5872 "    int s;\n"
5873 "    size_t stack_size, guard_size;\n"
5874 "    void *stack_addr;\n"
5875 msgstr ""
5876 "static void\n"
5877 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5878 "{\n"
5879 "    int s;\n"
5880 "    size_t stack_size, guard_size;\n"
5881 "    void *stack_addr;\n"
5882
5883 #. type: Plain text
5884 #: build/C/man3/pthread_getattr_np.3:203
5885 #, no-wrap
5886 msgid ""
5887 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5888 "    if (s != 0)\n"
5889 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5890 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5891 msgstr ""
5892 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5893 "    if (s != 0)\n"
5894 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5895 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5896
5897 #. type: Plain text
5898 #: build/C/man3/pthread_getattr_np.3:214
5899 #, no-wrap
5900 msgid ""
5901 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5902 "    if (s != 0)\n"
5903 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5904 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5905 "    if (stack_size E<gt> 0)\n"
5906 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5907 "    printf(\"\\en\");\n"
5908 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5909 "            prefix, stack_size, stack_size);\n"
5910 "}\n"
5911 msgstr ""
5912 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5913 "    if (s != 0)\n"
5914 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5915 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5916 "    if (stack_size E<gt> 0)\n"
5917 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5918 "    printf(\"\\en\");\n"
5919 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5920 "            prefix, stack_size, stack_size);\n"
5921 "}\n"
5922
5923 #. type: Plain text
5924 #: build/C/man3/pthread_getattr_np.3:220
5925 #, no-wrap
5926 msgid ""
5927 "static void\n"
5928 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5929 "{\n"
5930 "    int s;\n"
5931 "    pthread_attr_t attr;\n"
5932 msgstr ""
5933 "static void\n"
5934 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5935 "{\n"
5936 "    int s;\n"
5937 "    pthread_attr_t attr;\n"
5938
5939 #. type: Plain text
5940 #: build/C/man3/pthread_getattr_np.3:224
5941 #, no-wrap
5942 msgid ""
5943 "    s = pthread_getattr_np(thread, &attr);\n"
5944 "    if (s != 0)\n"
5945 "        handle_error_en(s, \"pthread_getattr_np\");\n"
5946 msgstr ""
5947 "    s = pthread_getattr_np(thread, &attr);\n"
5948 "    if (s != 0)\n"
5949 "        handle_error_en(s, \"pthread_getattr_np\");\n"
5950
5951 #. type: Plain text
5952 #: build/C/man3/pthread_getattr_np.3:226
5953 #, no-wrap
5954 msgid "    display_stack_related_attributes(&attr, prefix);\n"
5955 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
5956
5957 #. type: Plain text
5958 #: build/C/man3/pthread_getattr_np.3:231
5959 #, no-wrap
5960 msgid ""
5961 "    s = pthread_attr_destroy(&attr);\n"
5962 "    if (s != 0)\n"
5963 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5964 "}\n"
5965 msgstr ""
5966 "    s = pthread_attr_destroy(&attr);\n"
5967 "    if (s != 0)\n"
5968 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5969 "}\n"
5970
5971 #. type: Plain text
5972 #: build/C/man3/pthread_getattr_np.3:237
5973 #, no-wrap
5974 msgid ""
5975 "static void *           /* Start function for thread we create */\n"
5976 "thread_start(void *arg)\n"
5977 "{\n"
5978 "    printf(\"Attributes of created thread:\\en\");\n"
5979 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
5980 msgstr ""
5981 "static void *           /* Start function for thread we create */\n"
5982 "thread_start(void *arg)\n"
5983 "{\n"
5984 "    printf(\"Attributes of created thread:\\en\");\n"
5985 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
5986
5987 #. type: Plain text
5988 #: build/C/man3/pthread_getattr_np.3:251
5989 #, no-wrap
5990 msgid ""
5991 "static void\n"
5992 "usage(char *pname, char *msg)\n"
5993 "{\n"
5994 "    if (msg != NULL)\n"
5995 "        fputs(msg, stderr);\n"
5996 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
5997 "            \" [-g guard-size]\\en\", pname);\n"
5998 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
5999 "    exit(EXIT_FAILURE);\n"
6000 "}\n"
6001 msgstr ""
6002 "static void\n"
6003 "usage(char *pname, char *msg)\n"
6004 "{\n"
6005 "    if (msg != NULL)\n"
6006 "        fputs(msg, stderr);\n"
6007 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6008 "            \" [-g guard-size]\\en\", pname);\n"
6009 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6010 "    exit(EXIT_FAILURE);\n"
6011 "}\n"
6012
6013 #. type: Plain text
6014 #: build/C/man3/pthread_getattr_np.3:264
6015 #, no-wrap
6016 msgid ""
6017 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6018 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6019 "                              pthread_attr_t *attrp)\n"
6020 "{\n"
6021 "    int s, opt, allocate_stack;\n"
6022 "    long stack_size, guard_size;\n"
6023 "            void *stack_addr;\n"
6024 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6025 "                                           a thread attributes object */\n"
6026 "    allocate_stack = 0;\n"
6027 "    stack_size = -1;\n"
6028 "    guard_size = -1;\n"
6029 msgstr ""
6030 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6031 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6032 "                              pthread_attr_t *attrp)\n"
6033 "{\n"
6034 "    int s, opt, allocate_stack;\n"
6035 "    long stack_size, guard_size;\n"
6036 "            void *stack_addr;\n"
6037 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6038 "                                           a thread attributes object */\n"
6039 "    allocate_stack = 0;\n"
6040 "    stack_size = -1;\n"
6041 "    guard_size = -1;\n"
6042
6043 #. type: Plain text
6044 #: build/C/man3/pthread_getattr_np.3:273
6045 #, no-wrap
6046 msgid ""
6047 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6048 "        switch (opt) {\n"
6049 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6050 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6051 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6052 "        default:    usage(argv[0], NULL);\n"
6053 "        }\n"
6054 "    }\n"
6055 msgstr ""
6056 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6057 "        switch (opt) {\n"
6058 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6059 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6060 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6061 "        default:    usage(argv[0], NULL);\n"
6062 "        }\n"
6063 "    }\n"
6064
6065 #. type: Plain text
6066 #: build/C/man3/pthread_getattr_np.3:276
6067 #, no-wrap
6068 msgid ""
6069 "    if (allocate_stack && stack_size == -1)\n"
6070 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6071 msgstr ""
6072 "    if (allocate_stack && stack_size == -1)\n"
6073 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6074
6075 #. type: Plain text
6076 #: build/C/man3/pthread_getattr_np.3:279
6077 #, no-wrap
6078 msgid ""
6079 "    if (argc E<gt> optind)\n"
6080 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6081 msgstr ""
6082 "    if (argc E<gt> optind)\n"
6083 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6084
6085 #. type: Plain text
6086 #: build/C/man3/pthread_getattr_np.3:282
6087 #, no-wrap
6088 msgid ""
6089 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6090 "        ret_attrp = attrp;\n"
6091 msgstr ""
6092 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6093 "        ret_attrp = attrp;\n"
6094
6095 #. type: Plain text
6096 #: build/C/man3/pthread_getattr_np.3:287
6097 #, no-wrap
6098 msgid ""
6099 "        s = pthread_attr_init(attrp);\n"
6100 "        if (s != 0)\n"
6101 "            handle_error_en(s, \"pthread_attr_init\");\n"
6102 "    }\n"
6103 msgstr ""
6104 "        s = pthread_attr_init(attrp);\n"
6105 "        if (s != 0)\n"
6106 "            handle_error_en(s, \"pthread_attr_init\");\n"
6107 "    }\n"
6108
6109 #. type: Plain text
6110 #: build/C/man3/pthread_getattr_np.3:299
6111 #, no-wrap
6112 msgid ""
6113 "    if (stack_size E<gt>= 0) {\n"
6114 "        if (!allocate_stack) {\n"
6115 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6116 "            if (s != 0)\n"
6117 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6118 "        } else {\n"
6119 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6120 "                               stack_size);\n"
6121 "            if (s != 0)\n"
6122 "                handle_error_en(s, \"posix_memalign\");\n"
6123 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6124 msgstr ""
6125 "    if (stack_size E<gt>= 0) {\n"
6126 "        if (!allocate_stack) {\n"
6127 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6128 "            if (s != 0)\n"
6129 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6130 "        } else {\n"
6131 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6132 "                               stack_size);\n"
6133 "            if (s != 0)\n"
6134 "                handle_error_en(s, \"posix_memalign\");\n"
6135 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6136
6137 #. type: Plain text
6138 #: build/C/man3/pthread_getattr_np.3:305
6139 #, no-wrap
6140 msgid ""
6141 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6142 "            if (s != 0)\n"
6143 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6144 "        }\n"
6145 "    }\n"
6146 msgstr ""
6147 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6148 "            if (s != 0)\n"
6149 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6150 "        }\n"
6151 "    }\n"
6152
6153 #. type: Plain text
6154 #: build/C/man3/pthread_getattr_np.3:311
6155 #, no-wrap
6156 msgid ""
6157 "    if (guard_size E<gt>= 0) {\n"
6158 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6159 "        if (s != 0)\n"
6160 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6161 "    }\n"
6162 msgstr ""
6163 "    if (guard_size E<gt>= 0) {\n"
6164 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6165 "        if (s != 0)\n"
6166 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6167 "    }\n"
6168
6169 #. type: Plain text
6170 #: build/C/man3/pthread_getattr_np.3:314
6171 #, no-wrap
6172 msgid ""
6173 "    return ret_attrp;\n"
6174 "}\n"
6175 msgstr ""
6176 "    return ret_attrp;\n"
6177 "}\n"
6178
6179 #. type: Plain text
6180 #: build/C/man3/pthread_getattr_np.3:323
6181 #, no-wrap
6182 msgid ""
6183 "int\n"
6184 "main(int argc, char *argv[])\n"
6185 "{\n"
6186 "    int s;\n"
6187 "    pthread_t thr;\n"
6188 "    pthread_attr_t attr;\n"
6189 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6190 "                                        a thread attributes object */\n"
6191 msgstr ""
6192 "int\n"
6193 "main(int argc, char *argv[])\n"
6194 "{\n"
6195 "    int s;\n"
6196 "    pthread_t thr;\n"
6197 "    pthread_attr_t attr;\n"
6198 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6199 "                                        a thread attributes object */\n"
6200
6201 #. type: Plain text
6202 #: build/C/man3/pthread_getattr_np.3:325
6203 #, no-wrap
6204 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6205 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6206
6207 #. type: Plain text
6208 #: build/C/man3/pthread_getattr_np.3:331
6209 #, no-wrap
6210 msgid ""
6211 "    if (attrp != NULL) {\n"
6212 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6213 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6214 "        printf(\"\\en\");\n"
6215 "    }\n"
6216 msgstr ""
6217 "    if (attrp != NULL) {\n"
6218 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6219 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6220 "        printf(\"\\en\");\n"
6221 "    }\n"
6222
6223 #. type: Plain text
6224 #: build/C/man3/pthread_getattr_np.3:361
6225 msgid ""
6226 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6227 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6228 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6229 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6230 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6231 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6232 msgstr ""
6233 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6234 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6235 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6236 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6237 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6238 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6239
6240 #. type: TH
6241 #: build/C/man3/pthread_getcpuclockid.3:26
6242 #, no-wrap
6243 msgid "PTHREAD_GETCPUCLOCKID"
6244 msgstr "PTHREAD_GETCPUCLOCKID"
6245
6246 #. type: TH
6247 #: build/C/man3/pthread_getcpuclockid.3:26
6248 #, no-wrap
6249 msgid "2009-02-08"
6250 msgstr "2009-02-08"
6251
6252 #. type: Plain text
6253 #: build/C/man3/pthread_getcpuclockid.3:29
6254 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6255 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6256
6257 #. type: Plain text
6258 #: build/C/man3/pthread_getcpuclockid.3:33
6259 #, no-wrap
6260 msgid ""
6261 "B<#include E<lt>pthread.hE<gt>>\n"
6262 "B<#include E<lt>time.hE<gt>>\n"
6263 msgstr ""
6264 "B<#include E<lt>pthread.hE<gt>>\n"
6265 "B<#include E<lt>time.hE<gt>>\n"
6266
6267 #. type: Plain text
6268 #: build/C/man3/pthread_getcpuclockid.3:35
6269 #, no-wrap
6270 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6271 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6272
6273 #.  The clockid is constructed as follows:
6274 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6275 #.  where CLOCK_IDFIELD_SIZE is 3.
6276 #. type: Plain text
6277 #: build/C/man3/pthread_getcpuclockid.3:46
6278 msgid ""
6279 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6280 "time clock of the thread I<thread>."
6281 msgstr ""
6282 "B<pthread_getcpuclockid>() 関数は、\n"
6283 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6284
6285 #. type: TP
6286 #: build/C/man3/pthread_getcpuclockid.3:50
6287 #, no-wrap
6288 msgid "B<ENOENT>"
6289 msgstr "B<ENOENT>"
6290
6291 #.  CLOCK_THREAD_CPUTIME_ID not defined
6292 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6293 #.  be possible if kernel thread IDs took more than 29 bits (which
6294 #.  they currently cannot).
6295 #. type: Plain text
6296 #: build/C/man3/pthread_getcpuclockid.3:58
6297 msgid "Per-thread CPU time clocks are not supported by the system."
6298 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6299
6300 #. type: Plain text
6301 #: build/C/man3/pthread_getcpuclockid.3:65
6302 msgid "This function is available in glibc since version 2.2."
6303 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6304
6305 #. type: Plain text
6306 #: build/C/man3/pthread_getcpuclockid.3:78
6307 msgid ""
6308 "When I<thread> refers to the calling thread, this function returns an "
6309 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6310 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6311 msgstr ""
6312 "I<thread> が呼び出したスレッドを参照している場合、\n"
6313 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6314 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6315 "を参照する ID が返される。"
6316
6317 #. type: Plain text
6318 #: build/C/man3/pthread_getcpuclockid.3:84
6319 msgid ""
6320 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6321 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6322 "the two threads.  The following shell session shows an example run:"
6323 msgstr ""
6324 "以下のプログラムは、スレッドを作成し、それから\n"
6325 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6326 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6327 "スレッド毎の CPU 時間を取得する。\n"
6328 "下記のシェルのセッションは実行例である。"
6329
6330 #. type: Plain text
6331 #: build/C/man3/pthread_getcpuclockid.3:93
6332 #, no-wrap
6333 msgid ""
6334 "$ B<./a.out>\n"
6335 "Main thread sleeping\n"
6336 "Subthread starting infinite loop\n"
6337 "Main thread consuming some CPU time...\n"
6338 "Process total CPU time:    1.368\n"
6339 "Main thread CPU time:      0.376\n"
6340 "Subthread CPU time:        0.992\n"
6341 msgstr ""
6342 "$ B<./a.out>\n"
6343 "Main thread sleeping\n"
6344 "Subthread starting infinite loop\n"
6345 "Main thread consuming some CPU time...\n"
6346 "Process total CPU time:    1.368\n"
6347 "Main thread CPU time:      0.376\n"
6348 "Subthread CPU time:        0.992\n"
6349
6350 #. type: Plain text
6351 #: build/C/man3/pthread_getcpuclockid.3:99
6352 #, no-wrap
6353 msgid "/* Link with \"-lrt\" */\n"
6354 msgstr "/* \"-lrt\" でリンクする */\n"
6355
6356 #. type: Plain text
6357 #: build/C/man3/pthread_getcpuclockid.3:107
6358 #, no-wrap
6359 msgid ""
6360 "#include E<lt>time.hE<gt>\n"
6361 "#include E<lt>stdio.hE<gt>\n"
6362 "#include E<lt>stdlib.hE<gt>\n"
6363 "#include E<lt>unistd.hE<gt>\n"
6364 "#include E<lt>pthread.hE<gt>\n"
6365 "#include E<lt>string.hE<gt>\n"
6366 "#include E<lt>errno.hE<gt>\n"
6367 msgstr ""
6368 "#include E<lt>time.hE<gt>\n"
6369 "#include E<lt>stdio.hE<gt>\n"
6370 "#include E<lt>stdlib.hE<gt>\n"
6371 "#include E<lt>unistd.hE<gt>\n"
6372 "#include E<lt>pthread.hE<gt>\n"
6373 "#include E<lt>string.hE<gt>\n"
6374 "#include E<lt>errno.hE<gt>\n"
6375
6376 #. type: Plain text
6377 #: build/C/man3/pthread_getcpuclockid.3:121
6378 #, no-wrap
6379 msgid ""
6380 "static void *\n"
6381 "thread_start(void *arg)\n"
6382 "{\n"
6383 "    printf(\"Subthread starting infinite loop\\en\");\n"
6384 "    for (;;)\n"
6385 "        continue;\n"
6386 "}\n"
6387 msgstr ""
6388 "static void *\n"
6389 "thread_start(void *arg)\n"
6390 "{\n"
6391 "    printf(\"Subthread starting infinite loop\\en\");\n"
6392 "    for (;;)\n"
6393 "        continue;\n"
6394 "}\n"
6395
6396 #. type: Plain text
6397 #: build/C/man3/pthread_getcpuclockid.3:126
6398 #, no-wrap
6399 msgid ""
6400 "static void\n"
6401 "pclock(char *msg, clockid_t cid)\n"
6402 "{\n"
6403 "    struct timespec ts;\n"
6404 msgstr ""
6405 "static void\n"
6406 "pclock(char *msg, clockid_t cid)\n"
6407 "{\n"
6408 "    struct timespec ts;\n"
6409
6410 #. type: Plain text
6411 #: build/C/man3/pthread_getcpuclockid.3:132
6412 #, no-wrap
6413 msgid ""
6414 "    printf(\"%s\", msg);\n"
6415 "    if (clock_gettime(cid, &ts) == -1)\n"
6416 "        handle_error(\"clock_gettime\");\n"
6417 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6418 "}\n"
6419 msgstr ""
6420 "    printf(\"%s\", msg);\n"
6421 "    if (clock_gettime(cid, &ts) == -1)\n"
6422 "        handle_error(\"clock_gettime\");\n"
6423 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6424 "}\n"
6425
6426 #. type: Plain text
6427 #: build/C/man3/pthread_getcpuclockid.3:139
6428 #, no-wrap
6429 msgid ""
6430 "int\n"
6431 "main(int argc, char *argv[])\n"
6432 "{\n"
6433 "    pthread_t thread;\n"
6434 "    clockid_t cid;\n"
6435 "    int j, s;\n"
6436 msgstr ""
6437 "int\n"
6438 "main(int argc, char *argv[])\n"
6439 "{\n"
6440 "    pthread_t thread;\n"
6441 "    clockid_t cid;\n"
6442 "    int j, s;\n"
6443
6444 #. type: Plain text
6445 #: build/C/man3/pthread_getcpuclockid.3:143
6446 #, no-wrap
6447 msgid ""
6448 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6449 "    if (s != 0)\n"
6450 "        handle_error_en(s, \"pthread_create\");\n"
6451 msgstr ""
6452 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6453 "    if (s != 0)\n"
6454 "        handle_error_en(s, \"pthread_create\");\n"
6455
6456 #. type: Plain text
6457 #: build/C/man3/pthread_getcpuclockid.3:146
6458 #, no-wrap
6459 msgid ""
6460 "    printf(\"Main thread sleeping\\en\");\n"
6461 "    sleep(1);\n"
6462 msgstr ""
6463 "    printf(\"Main thread sleeping\\en\");\n"
6464 "    sleep(1);\n"
6465
6466 #. type: Plain text
6467 #: build/C/man3/pthread_getcpuclockid.3:150
6468 #, no-wrap
6469 msgid ""
6470 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6471 "    for (j = 0; j E<lt> 2000000; j++)\n"
6472 "        getppid();\n"
6473 msgstr ""
6474 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6475 "    for (j = 0; j E<lt> 2000000; j++)\n"
6476 "        getppid();\n"
6477
6478 #. type: Plain text
6479 #: build/C/man3/pthread_getcpuclockid.3:152
6480 #, no-wrap
6481 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6482 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6483
6484 #. type: Plain text
6485 #: build/C/man3/pthread_getcpuclockid.3:157
6486 #, no-wrap
6487 msgid ""
6488 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6489 "    if (s != 0)\n"
6490 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6491 "    pclock(\"Main thread CPU time:   \", cid);\n"
6492 msgstr ""
6493 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6494 "    if (s != 0)\n"
6495 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6496 "    pclock(\"Main thread CPU time:   \", cid);\n"
6497
6498 #. type: Plain text
6499 #: build/C/man3/pthread_getcpuclockid.3:160
6500 #, no-wrap
6501 msgid ""
6502 "    /* The preceding 4 lines of code could have been replaced by:\n"
6503 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6504 msgstr ""
6505 "    /* The preceding 4 lines of code could have been replaced by:\n"
6506 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6507
6508 #. type: Plain text
6509 #: build/C/man3/pthread_getcpuclockid.3:165
6510 #, no-wrap
6511 msgid ""
6512 "    s = pthread_getcpuclockid(thread, &cid);\n"
6513 "    if (s != 0)\n"
6514 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6515 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6516 msgstr ""
6517 "    s = pthread_getcpuclockid(thread, &cid);\n"
6518 "    if (s != 0)\n"
6519 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6520 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6521
6522 #. type: Plain text
6523 #: build/C/man3/pthread_getcpuclockid.3:168
6524 #, no-wrap
6525 msgid ""
6526 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6527 "}\n"
6528 msgstr ""
6529 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6530 "}\n"
6531
6532 #. type: Plain text
6533 #: build/C/man3/pthread_getcpuclockid.3:177
6534 msgid ""
6535 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6536 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6537 msgstr ""
6538 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6539 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6540
6541 #. type: TH
6542 #: build/C/man3/pthread_join.3:26
6543 #, no-wrap
6544 msgid "PTHREAD_JOIN"
6545 msgstr "PTHREAD_JOIN"
6546
6547 #. type: Plain text
6548 #: build/C/man3/pthread_join.3:29
6549 msgid "pthread_join - join with a terminated thread"
6550 msgstr "pthread_join - 終了したスレッドを join する"
6551
6552 #. type: Plain text
6553 #: build/C/man3/pthread_join.3:34
6554 #, no-wrap
6555 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6556 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6557
6558 #. type: Plain text
6559 #: build/C/man3/pthread_join.3:49
6560 msgid ""
6561 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6562 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6563 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6564 msgstr ""
6565 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6566 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6567 "B<pthread_join>() はすぐに返る。\n"
6568 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6569
6570 #. type: Plain text
6571 #: build/C/man3/pthread_join.3:63
6572 msgid ""
6573 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6574 "the target thread (i.e., the value that the target thread supplied to "
6575 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6576 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6577 msgstr ""
6578 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6579 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6580 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6581 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6582
6583 #. type: Plain text
6584 #: build/C/man3/pthread_join.3:70
6585 msgid ""
6586 "If multiple threads simultaneously try to join with the same thread, the "
6587 "results are undefined.  If the thread calling B<pthread_join>()  is "
6588 "canceled, then the target thread will remain joinable (i.e., it will not be "
6589 "detached)."
6590 msgstr ""
6591 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6592 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6593 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6594 "ならない)。"
6595
6596 #. type: Plain text
6597 #: build/C/man3/pthread_join.3:75
6598 msgid ""
6599 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6600 "number."
6601 msgstr ""
6602 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6603 "エラーの場合、エラー番号を返す。"
6604
6605 #. type: TP
6606 #: build/C/man3/pthread_join.3:76
6607 #, no-wrap
6608 msgid "B<EDEADLK>"
6609 msgstr "B<EDEADLK>"
6610
6611 #.  The following verified by testing on glibc 2.8/NPTL:
6612 #.  The following verified by testing on glibc 2.8/NPTL:
6613 #. type: Plain text
6614 #: build/C/man3/pthread_join.3:85
6615 msgid ""
6616 "A deadlock was detected (e.g., two threads tried to join with each other); "
6617 "or I<thread> specifies the calling thread."
6618 msgstr ""
6619 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6620 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6621
6622 #.  POSIX.1-2001 does not specify this error case.
6623 #. type: Plain text
6624 #: build/C/man3/pthread_join.3:93
6625 msgid "Another thread is already waiting to join with this thread."
6626 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6627
6628 #. type: Plain text
6629 #: build/C/man3/pthread_join.3:104
6630 msgid ""
6631 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6632 "the target thread has terminated."
6633 msgstr ""
6634 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6635 "呼び出し側には、対象スレッドが終了していることが保証される。"
6636
6637 #. type: Plain text
6638 #: build/C/man3/pthread_join.3:107
6639 msgid ""
6640 "Joining with a thread that has previously been joined results in undefined "
6641 "behavior."
6642 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6643
6644 #. type: Plain text
6645 #: build/C/man3/pthread_join.3:115
6646 msgid ""
6647 "Failure to join with a thread that is joinable (i.e., one that is not "
6648 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6649 "zombie thread consumes some system resources, and when enough zombie threads "
6650 "have accumulated, it will no longer be possible to create new threads (or "
6651 "processes)."
6652 msgstr ""
6653 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6654 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6655 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6656 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6657 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6658 "このようなことが起きるのは避けること。"
6659
6660 #. type: Plain text
6661 #: build/C/man3/pthread_join.3:121
6662 msgid ""
6663 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6664 "\"join with any terminated thread\".  If you believe you need this "
6665 "functionality, you probably need to rethink your application design."
6666 msgstr ""
6667 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6668 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6669 "この機能が必要だと思うような場合には、おそらく\n"
6670 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6671
6672 #. type: Plain text
6673 #: build/C/man3/pthread_join.3:124
6674 msgid ""
6675 "All of the threads in a process are peers: any thread can join with any "
6676 "other thread in the process."
6677 msgstr ""
6678 "プロセス内の全てのスレッドは対等であり、\n"
6679 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6680
6681 #. type: Plain text
6682 #: build/C/man3/pthread_join.3:134
6683 msgid ""
6684 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6685 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6686 msgstr ""
6687 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6688 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6689
6690 #. type: TH
6691 #: build/C/man3/pthread_kill.3:26
6692 #, no-wrap
6693 msgid "PTHREAD_KILL"
6694 msgstr "PTHREAD_KILL"
6695
6696 #. type: TH
6697 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigqueue.3:25
6698 #, no-wrap
6699 msgid "2012-08-19"
6700 msgstr "2012-08-19"
6701
6702 #. type: Plain text
6703 #: build/C/man3/pthread_kill.3:29
6704 msgid "pthread_kill - send a signal to a thread"
6705 msgstr "pthread_kill - スレッドにシグナルを送信する"
6706
6707 #. type: Plain text
6708 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6709 #, no-wrap
6710 msgid "B<#include E<lt>signal.hE<gt>>\n"
6711 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6712
6713 #. type: Plain text
6714 #: build/C/man3/pthread_kill.3:34
6715 #, no-wrap
6716 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6717 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6718
6719 #. type: Plain text
6720 #: build/C/man3/pthread_kill.3:47
6721 msgid ""
6722 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6723 "thread in the same process as the caller.  The signal is asynchronously "
6724 "directed to I<thread>."
6725 msgstr ""
6726 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6727 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6728 "シグナルは非同期に I<thread> へ直接送られる。"
6729
6730 #. type: Plain text
6731 #: build/C/man3/pthread_kill.3:52
6732 msgid ""
6733 "If I<sig> is 0, then no signal is sent, but error checking is still "
6734 "performed; this can be used to check for the existence of a thread ID."
6735 msgstr ""
6736 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6737 "エラーチェックだけは実行される。\n"
6738 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6739
6740 #. type: Plain text
6741 #: build/C/man3/pthread_kill.3:57
6742 msgid ""
6743 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6744 "number, and no signal is sent."
6745 msgstr ""
6746 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6747 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6748
6749 #. type: Plain text
6750 #: build/C/man3/pthread_kill.3:61
6751 msgid "An invalid signal was specified."
6752 msgstr "無効なシグナルが指定された。"
6753
6754 #. type: Plain text
6755 #: build/C/man3/pthread_kill.3:75
6756 msgid ""
6757 "Signal dispositions are process-wide: if a signal handler is installed, the "
6758 "handler will be invoked in the thread I<thread>, but if the disposition of "
6759 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6760 "affect the whole process."
6761 msgstr ""
6762 "シグナルの配送はプロセス全体で行われる。\n"
6763 "シグナルハンドラが設定されている場合、\n"
6764 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6765 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6766 "シグナルに対するアクションはプロセス全体に影響がある。"
6767
6768 #. type: Plain text
6769 #: build/C/man3/pthread_kill.3:84
6770 msgid ""
6771 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6772 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6773 msgstr ""
6774 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6775 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6776
6777 #. type: TH
6778 #: build/C/man3/pthread_kill_other_threads_np.3:26
6779 #, no-wrap
6780 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6781 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6782
6783 #. type: TH
6784 #: build/C/man3/pthread_kill_other_threads_np.3:26
6785 #, no-wrap
6786 msgid "2010-09-09"
6787 msgstr "2010-09-09"
6788
6789 #. type: Plain text
6790 #: build/C/man3/pthread_kill_other_threads_np.3:29
6791 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6792 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6793
6794 #. type: Plain text
6795 #: build/C/man3/pthread_kill_other_threads_np.3:34
6796 #, no-wrap
6797 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6798 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6799
6800 #.  .SH VERSIONS
6801 #.  Available since glibc 2.0
6802 #. type: Plain text
6803 #: build/C/man3/pthread_kill_other_threads_np.3:47
6804 msgid ""
6805 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
6806 "threading implementation.  On that implementation, calling this function "
6807 "causes the immediate termination of all threads in the application, except "
6808 "the calling thread.  The cancellation state and cancellation type of the to-"
6809 "be-terminated threads are ignored, and the cleanup handlers are not called "
6810 "in those threads."
6811 msgstr ""
6812 "B<pthread_kill_other_threads_np>() は、\n"
6813 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6814 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6815 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6816 "終了対象のスレッドの cancelability state と cancelability type は\n"
6817 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6818
6819 #. type: Plain text
6820 #: build/C/man3/pthread_kill_other_threads_np.3:59
6821 msgid ""
6822 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6823 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6824 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6825 "the other threads of an application are not automatically terminated (as "
6826 "POSIX.1-2001 requires) during B<execve>(2)."
6827 msgstr ""
6828 "B<pthread_kill_other_threads_np>() は、\n"
6829 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6830 "呼ばれることを目的として用意されている。\n"
6831 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6832 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6833 "終了されないという制限を解決するために設計された。"
6834
6835 #. type: Plain text
6836 #: build/C/man3/pthread_kill_other_threads_np.3:66
6837 msgid ""
6838 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6839 "exists, but does nothing.  (Nothing needs to be done, because the "
6840 "implementation does the right thing during an B<execve>(2).)"
6841 msgstr ""
6842 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6843 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6844 "何もする必要がないということだ)。"
6845
6846 #. type: Plain text
6847 #: build/C/man3/pthread_kill_other_threads_np.3:72
6848 msgid ""
6849 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6850 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6851 msgstr ""
6852 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6853 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6854
6855 #. type: TH
6856 #: build/C/man3/pthread_self.3:26
6857 #, no-wrap
6858 msgid "PTHREAD_SELF"
6859 msgstr "PTHREAD_SELF"
6860
6861 #. type: Plain text
6862 #: build/C/man3/pthread_self.3:29
6863 msgid "pthread_self - obtain ID of the calling thread"
6864 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6865
6866 #. type: Plain text
6867 #: build/C/man3/pthread_self.3:34
6868 #, no-wrap
6869 msgid "B<pthread_t pthread_self(void);>\n"
6870 msgstr "B<pthread_t pthread_self(void);>\n"
6871
6872 #. type: Plain text
6873 #: build/C/man3/pthread_self.3:46
6874 msgid ""
6875 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6876 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6877 "(3)  call that created this thread."
6878 msgstr ""
6879 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6880 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6881 "呼び出しで I<*thread> で返されるのと同じ値である。"
6882
6883 #. type: Plain text
6884 #: build/C/man3/pthread_self.3:48
6885 msgid "This function always succeeds, returning the calling thread's ID."
6886 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6887
6888 #. type: Plain text
6889 #: build/C/man3/pthread_self.3:63
6890 msgid ""
6891 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6892 "represent a thread ID; for example, representation using either an "
6893 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6894 "I<pthread_t> can't portably be compared using the C equality operator "
6895 "(B<==>); use B<pthread_equal>(3)  instead."
6896 msgstr ""
6897 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
6898 "スレッド実装が完全に自由に選択してよいことになっている。\n"
6899 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
6900 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
6901 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
6902 "代わりに B<pthread_equal>(3) を使うこと。"
6903
6904 #. type: Plain text
6905 #: build/C/man3/pthread_self.3:67
6906 msgid ""
6907 "Thread identifiers should be considered opaque: any attempt to use a thread "
6908 "ID other than in pthreads calls is nonportable and can lead to unspecified "
6909 "results."
6910 msgstr ""
6911 "スレッド識別子はその内部構造を意識すべきではない。\n"
6912 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
6913 "移植性がなくなり、どのような結果が得られるかも分からない。"
6914
6915 #. type: Plain text
6916 #: build/C/man3/pthread_self.3:71
6917 msgid ""
6918 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
6919 "may be reused after a terminated thread has been joined, or a detached "
6920 "thread has terminated."
6921 msgstr ""
6922 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
6923 "終了したスレッドが join されたり、\n"
6924 "切り離された (detached) スレッドが終了されたりした後は、\n"
6925 "そのスレッド ID は再利用されることがある。"
6926
6927 #. type: Plain text
6928 #: build/C/man3/pthread_self.3:76
6929 msgid ""
6930 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
6931 "kernel thread ID returned by a call to B<gettid>(2)."
6932 msgstr ""
6933 "B<pthread_self>() が返すスレッド ID は、\n"
6934 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
6935
6936 #. type: Plain text
6937 #: build/C/man3/pthread_self.3:80
6938 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
6939 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
6940
6941 #. type: TH
6942 #: build/C/man3/pthread_setaffinity_np.3:26
6943 #, no-wrap
6944 msgid "PTHREAD_SETAFFINITY_NP"
6945 msgstr "PTHREAD_SETAFFINITY_NP"
6946
6947 #. type: Plain text
6948 #: build/C/man3/pthread_setaffinity_np.3:30
6949 msgid ""
6950 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
6951 "thread"
6952 msgstr ""
6953 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
6954 "CPU affinity の設定/取得を行う"
6955
6956 #. type: Plain text
6957 #: build/C/man3/pthread_setaffinity_np.3:39
6958 #, no-wrap
6959 msgid ""
6960 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6961 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
6962 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6963 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
6964 msgstr ""
6965 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6966 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
6967 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6968 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
6969
6970 #. type: Plain text
6971 #: build/C/man3/pthread_setaffinity_np.3:54
6972 msgid ""
6973 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
6974 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
6975 "successful, and the thread is not currently running on one of the CPUs in "
6976 "I<cpuset>, then it is migrated to one of those CPUs."
6977 msgstr ""
6978 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
6979 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
6980 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
6981 "場合は、スレッドは指定された CPU のいずれかに移動される。"
6982
6983 #. type: Plain text
6984 #: build/C/man3/pthread_setaffinity_np.3:61
6985 msgid ""
6986 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
6987 "the thread I<thread> in the buffer pointed to by I<cpuset>."
6988 msgstr ""
6989 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
6990 "マスクを、I<cpuset> が指すバッファに入れて返す。"
6991
6992 #. type: Plain text
6993 #: build/C/man3/pthread_setaffinity_np.3:77
6994 msgid ""
6995 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
6996 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
6997 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
6998 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
6999 msgstr ""
7000 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7001 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7002 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7003 "割り当てている場合には、別の値になることもある)。"
7004
7005 #. type: TP
7006 #: build/C/man3/pthread_setaffinity_np.3:81
7007 #, no-wrap
7008 msgid "B<EFAULT>"
7009 msgstr "B<EFAULT>"
7010
7011 #. type: Plain text
7012 #: build/C/man3/pthread_setaffinity_np.3:84
7013 msgid "A supplied memory address was invalid."
7014 msgstr "指定されたメモリアドレスが無効である。"
7015
7016 #. type: Plain text
7017 #: build/C/man3/pthread_setaffinity_np.3:93
7018 msgid ""
7019 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7020 "processors that are currently physically on the system and permitted to the "
7021 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7022 "mechanism described in B<cpuset>(7)."
7023 msgstr ""
7024 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7025 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7026 "されているプロセッサが一つも含まれていない。\n"
7027 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7028 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7029
7030 #.  FIXME . ?
7031 #.  Loic Domaigne commented: it seems that in the future the
7032 #.  kernel developers want to make cpumask_t dynamic, so
7033 #.  CONFIG_NR_CPUS might become obsolete in the future.
7034 #.  cpumask_t
7035 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7036 #.  of the cpumask_t type.
7037 #. type: Plain text
7038 #: build/C/man3/pthread_setaffinity_np.3:109
7039 msgid ""
7040 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7041 "the set supported by the kernel.  (The kernel configuration option "
7042 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7043 "type used to represent CPU sets.)"
7044 msgstr ""
7045 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7046 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7047 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7048 "データ型がサポートする CPU 集合の範囲が定義される。)"
7049
7050 #. type: Plain text
7051 #: build/C/man3/pthread_setaffinity_np.3:114
7052 msgid ""
7053 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7054 "affinity mask used by the kernel."
7055 msgstr ""
7056 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7057 "affinity マスクの大きさよりも小さい。"
7058
7059 #. type: Plain text
7060 #: build/C/man3/pthread_setaffinity_np.3:137
7061 msgid ""
7062 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7063 "thread will actually run is the intersection of the set specified in the "
7064 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7065 "system may further restrict the set of CPUs on which the thread runs if the "
7066 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7067 "restrictions on the actual set of CPUs on which the thread will run are "
7068 "silently imposed by the kernel."
7069 msgstr ""
7070 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7071 "そのスレッドが実際に実行される CPU 集合は、\n"
7072 "I<cpuset> 引き数で指定された集合と\n"
7073 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7074 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7075 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7076 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7077 "これらの制限は、カーネルにより黙って適用される。"
7078
7079 #. type: Plain text
7080 #: build/C/man3/pthread_setaffinity_np.3:143
7081 msgid ""
7082 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7083 "B<sched_getaffinity>(2)  system calls."
7084 msgstr ""
7085 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7086 "B<sched_getaffinity>(2) を使って実装されている。"
7087
7088 #. type: Plain text
7089 #: build/C/man3/pthread_setaffinity_np.3:154
7090 msgid ""
7091 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7092 "creator's CPU affinity mask."
7093 msgstr ""
7094 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7095 "作成者の CPU affinity マスクを継承する。"
7096
7097 #. type: Plain text
7098 #: build/C/man3/pthread_setaffinity_np.3:162
7099 msgid ""
7100 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7101 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7102 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7103 "check the resulting CPU affinity mask of the thread."
7104 msgstr ""
7105 "以下のプログラムでは、メインスレッドは\n"
7106 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7107 "CPU 0 から 7 が含まれるように設定し\n"
7108 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7109 "その後で B<pthread_getaffinity_np>() を使って\n"
7110 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7111
7112 #. type: Plain text
7113 #: build/C/man3/pthread_setaffinity_np.3:169
7114 #, no-wrap
7115 msgid ""
7116 "#define _GNU_SOURCE\n"
7117 "#include E<lt>pthread.hE<gt>\n"
7118 "#include E<lt>stdio.hE<gt>\n"
7119 "#include E<lt>stdlib.hE<gt>\n"
7120 "#include E<lt>errno.hE<gt>\n"
7121 msgstr ""
7122 "#define _GNU_SOURCE\n"
7123 "#include E<lt>pthread.hE<gt>\n"
7124 "#include E<lt>stdio.hE<gt>\n"
7125 "#include E<lt>stdlib.hE<gt>\n"
7126 "#include E<lt>errno.hE<gt>\n"
7127
7128 #. type: Plain text
7129 #: build/C/man3/pthread_setaffinity_np.3:179
7130 #, no-wrap
7131 msgid ""
7132 "int\n"
7133 "main(int argc, char *argv[])\n"
7134 "{\n"
7135 "    int s, j;\n"
7136 "    cpu_set_t cpuset;\n"
7137 "    pthread_t thread;\n"
7138 msgstr ""
7139 "int\n"
7140 "main(int argc, char *argv[])\n"
7141 "{\n"
7142 "    int s, j;\n"
7143 "    cpu_set_t cpuset;\n"
7144 "    pthread_t thread;\n"
7145
7146 #. type: Plain text
7147 #: build/C/man3/pthread_setaffinity_np.3:181
7148 #, no-wrap
7149 msgid "    thread = pthread_self();\n"
7150 msgstr "    thread = pthread_self();\n"
7151
7152 #. type: Plain text
7153 #: build/C/man3/pthread_setaffinity_np.3:183
7154 #, no-wrap
7155 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7156 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7157
7158 #. type: Plain text
7159 #: build/C/man3/pthread_setaffinity_np.3:187
7160 #, no-wrap
7161 msgid ""
7162 "    CPU_ZERO(&cpuset);\n"
7163 "    for (j = 0; j E<lt> 8; j++)\n"
7164 "        CPU_SET(j, &cpuset);\n"
7165 msgstr ""
7166 "    CPU_ZERO(&cpuset);\n"
7167 "    for (j = 0; j E<lt> 8; j++)\n"
7168 "        CPU_SET(j, &cpuset);\n"
7169
7170 #. type: Plain text
7171 #: build/C/man3/pthread_setaffinity_np.3:191
7172 #, no-wrap
7173 msgid ""
7174 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7175 "    if (s != 0)\n"
7176 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7177 msgstr ""
7178 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7179 "    if (s != 0)\n"
7180 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7181
7182 #. type: Plain text
7183 #: build/C/man3/pthread_setaffinity_np.3:193
7184 #, no-wrap
7185 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7186 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7187
7188 #. type: Plain text
7189 #: build/C/man3/pthread_setaffinity_np.3:197
7190 #, no-wrap
7191 msgid ""
7192 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7193 "    if (s != 0)\n"
7194 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7195 msgstr ""
7196 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7197 "    if (s != 0)\n"
7198 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7199
7200 #. type: Plain text
7201 #: build/C/man3/pthread_setaffinity_np.3:202
7202 #, no-wrap
7203 msgid ""
7204 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7205 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7206 "        if (CPU_ISSET(j, &cpuset))\n"
7207 "            printf(\"    CPU %d\\en\", j);\n"
7208 msgstr ""
7209 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7210 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7211 "        if (CPU_ISSET(j, &cpuset))\n"
7212 "            printf(\"    CPU %d\\en\", j);\n"
7213
7214 #. type: Plain text
7215 #: build/C/man3/pthread_setaffinity_np.3:205
7216 #: build/C/man3/pthread_setschedparam.3:430
7217 #, no-wrap
7218 msgid ""
7219 "    exit(EXIT_SUCCESS);\n"
7220 "}\n"
7221 msgstr ""
7222 "    exit(EXIT_SUCCESS);\n"
7223 "}\n"
7224
7225 #. type: Plain text
7226 #: build/C/man3/pthread_setaffinity_np.3:214
7227 msgid ""
7228 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7229 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7230 "B<cpuset>(7), B<pthreads>(7)"
7231 msgstr ""
7232 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7233 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7234 "B<cpuset>(7), B<pthreads>(7)"
7235
7236 #. type: TH
7237 #: build/C/man3/pthread_setcancelstate.3:26
7238 #, no-wrap
7239 msgid "PTHREAD_SETCANCELSTATE"
7240 msgstr "PTHREAD_SETCANCELSTATE"
7241
7242 #. type: Plain text
7243 #: build/C/man3/pthread_setcancelstate.3:30
7244 msgid ""
7245 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7246 "type"
7247 msgstr ""
7248 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7249 "cancelability type を設定する"
7250
7251 #. type: Plain text
7252 #: build/C/man3/pthread_setcancelstate.3:36
7253 #, no-wrap
7254 msgid ""
7255 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7256 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7257 msgstr ""
7258 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7259 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7260
7261 #. type: Plain text
7262 #: build/C/man3/pthread_setcancelstate.3:51
7263 msgid ""
7264 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7265 "thread to the value given in I<state>.  The previous cancelability state of "
7266 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7267 "I<state> argument must have one of the following values:"
7268 msgstr ""
7269 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7270 "cancelability state に I<state> で指定された\n"
7271 "値を設定する。変更前のスレッドの cancelability state は\n"
7272 "I<oldstate> が指すバッファで返される。\n"
7273 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7274
7275 #. type: TP
7276 #: build/C/man3/pthread_setcancelstate.3:51
7277 #, no-wrap
7278 msgid "B<PTHREAD_CANCEL_ENABLE>"
7279 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7280
7281 #. type: Plain text
7282 #: build/C/man3/pthread_setcancelstate.3:58
7283 msgid ""
7284 "The thread is cancelable.  This is the default cancelability state in all "
7285 "new threads, including the initial thread.  The thread's cancelability type "
7286 "determines when a cancelable thread will respond to a cancellation request."
7287 msgstr ""
7288 "スレッドは取り消し可能 (cancelable) である。\n"
7289 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7290 "cancelability state である。これには最初のスレッドも含まれる。\n"
7291 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7292 "取り消し要求にいつ反応するかが決まる。"
7293
7294 #. type: TP
7295 #: build/C/man3/pthread_setcancelstate.3:58
7296 #, no-wrap
7297 msgid "B<PTHREAD_CANCEL_DISABLE>"
7298 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7299
7300 #. type: Plain text
7301 #: build/C/man3/pthread_setcancelstate.3:63
7302 msgid ""
7303 "The thread is not cancelable.  If a cancellation request is received, it is "
7304 "blocked until cancelability is enabled."
7305 msgstr ""
7306 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7307 "取り消し可能に設定されるまでその要求はブロックされる。"
7308
7309 #. type: Plain text
7310 #: build/C/man3/pthread_setcancelstate.3:75
7311 msgid ""
7312 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7313 "thread to the value given in I<type>.  The previous cancelability type of "
7314 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7315 "argument must have one of the following values:"
7316 msgstr ""
7317 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7318 "cancelability type に I<type> で指定された値を設定する。\n"
7319 "変更前のスレッドの cancelability type は\n"
7320 "I<oldtype> が指すバッファで返される。\n"
7321 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7322
7323 #. type: TP
7324 #: build/C/man3/pthread_setcancelstate.3:75
7325 #, no-wrap
7326 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7327 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7328
7329 #. type: Plain text
7330 #: build/C/man3/pthread_setcancelstate.3:82
7331 msgid ""
7332 "A cancellation request is deferred until the thread next calls a function "
7333 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7334 "cancelability type in all new threads, including the initial thread."
7335 msgstr ""
7336 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7337 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7338 "スレッドでのデフォルトの cancelability type である。\n"
7339 "これには最初のスレッドも含まれる。"
7340
7341 #. type: TP
7342 #: build/C/man3/pthread_setcancelstate.3:82
7343 #, no-wrap
7344 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7345 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7346
7347 #. type: Plain text
7348 #: build/C/man3/pthread_setcancelstate.3:88
7349 msgid ""
7350 "The thread can be canceled at any time.  (Typically, it will be canceled "
7351 "immediately upon receiving a cancellation request, but the system doesn't "
7352 "guarantee this.)"
7353 msgstr ""
7354 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7355 "システムがそのことを保証しているわけではない)。"
7356
7357 #. type: Plain text
7358 #: build/C/man3/pthread_setcancelstate.3:92
7359 msgid ""
7360 "The set-and-get operation performed by each of these functions is atomic "
7361 "with respect to other threads in the process calling the same function."
7362 msgstr ""
7363 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7364 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7365 "アトミックに行われる。"
7366
7367 #. type: Plain text
7368 #: build/C/man3/pthread_setcancelstate.3:99
7369 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7370 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7371
7372 #. type: Plain text
7373 #: build/C/man3/pthread_setcancelstate.3:103
7374 msgid "Invalid value for I<state>."
7375 msgstr "I<state> に無効な値が指定された。"
7376
7377 #. type: Plain text
7378 #: build/C/man3/pthread_setcancelstate.3:107
7379 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7380 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7381
7382 #.  .SH VERSIONS
7383 #.  Available since glibc 2.0
7384 #. type: Plain text
7385 #: build/C/man3/pthread_setcancelstate.3:113
7386 msgid "Invalid value for I<type>."
7387 msgstr "I<type> に無効な値が指定された。"
7388
7389 #. type: Plain text
7390 #: build/C/man3/pthread_setcancelstate.3:118
7391 msgid ""
7392 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7393 "(3)."
7394 msgstr ""
7395 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7396 "B<pthread_cancel>(3) を参照。"
7397
7398 #. type: Plain text
7399 #: build/C/man3/pthread_setcancelstate.3:125
7400 msgid ""
7401 "Briefly disabling cancelability is useful if a thread performs some critical "
7402 "action that must not be interrupted by a cancellation request.  Beware of "
7403 "disabling cancelability for long periods, or around operations that may "
7404 "block for long periods, since that will render the thread unresponsive to "
7405 "cancellation requests."
7406 msgstr ""
7407 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7408 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7409 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7410 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7411 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7412 "スレッドが応答しない状態になってしまうからである。"
7413
7414 #. type: Plain text
7415 #: build/C/man3/pthread_setcancelstate.3:156
7416 msgid ""
7417 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7418 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7419 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7420 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7421 "because the application has no way of knowing what the state of these "
7422 "resources is when the thread is canceled; that is, did cancellation occur "
7423 "before the resources were reserved, while they were reserved, or after they "
7424 "were released? Furthermore, some internal data structures (e.g., the linked "
7425 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7426 "left in an inconsistent state if cancellation occurs in the middle of the "
7427 "function call.  Consequently, clean-up handlers cease to be useful.  "
7428 "Functions that can be safely asynchronously canceled are called I<async-"
7429 "cancel-safe functions>.  POSIX.1-2001 requires only that B<pthread_cancel>"
7430 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7431 "cancel-safe.  In general, other library functions can't be safely called "
7432 "from an asynchronously cancelable thread.  One of the few circumstances in "
7433 "which asynchronous cancelability is useful is for cancellation of a thread "
7434 "that is in a pure compute-bound loop."
7435 msgstr ""
7436 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7437 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7438 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7439 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7440 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7441 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7442 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7443 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7444 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7445 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7446 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7447 "が役に立たないものになってしまう。\n"
7448 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7449 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7450 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7451 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7452 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7453 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7454 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7455
7456 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7457 #. type: Plain text
7458 #: build/C/man3/pthread_setcancelstate.3:174
7459 msgid ""
7460 "The Linux threading implementations permit the I<oldstate> argument of "
7461 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7462 "the previous cancelability state is not returned to the caller.  Many other "
7463 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7464 "does not specify this point, so portable applications should always specify "
7465 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7466 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7467 msgstr ""
7468 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7469 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7470 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7471 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7472 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7473 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7474 "NULL 以外の値を指定するようにすべきである。\n"
7475 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7476 "全く同じことが言える。"
7477
7478 #. type: Plain text
7479 #: build/C/man3/pthread_setcancelstate.3:177
7480 msgid "See B<pthread_cancel>(3)."
7481 msgstr "B<pthread_cancel>(3) を参照。"
7482
7483 #. type: Plain text
7484 #: build/C/man3/pthread_setcancelstate.3:182
7485 msgid ""
7486 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7487 "B<pthreads>(7)"
7488 msgstr ""
7489 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7490 "B<pthreads>(7)"
7491
7492 #. type: TH
7493 #: build/C/man3/pthread_setconcurrency.3:25
7494 #, no-wrap
7495 msgid "PTHREAD_SETCONCURRENCY"
7496 msgstr "PTHREAD_SETCONCURRENCY"
7497
7498 #. type: TH
7499 #: build/C/man3/pthread_setconcurrency.3:25
7500 #, no-wrap
7501 msgid "2009-04-10"
7502 msgstr "2009-04-10"
7503
7504 #. type: Plain text
7505 #: build/C/man3/pthread_setconcurrency.3:29
7506 msgid ""
7507 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7508 "level"
7509 msgstr ""
7510 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7511 "行う"
7512
7513 #. type: Plain text
7514 #: build/C/man3/pthread_setconcurrency.3:35
7515 #, no-wrap
7516 msgid ""
7517 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7518 "B<int pthread_getconcurrency(void);>\n"
7519 msgstr ""
7520 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7521 "B<int pthread_getconcurrency(void);>\n"
7522
7523 #. type: Plain text
7524 #: build/C/man3/pthread_setconcurrency.3:48
7525 msgid ""
7526 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7527 "application's desired concurrency level, specified in I<new_level>.  The "
7528 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7529 "of concurrency that should be provided as a result of calling "
7530 "B<pthread_setconcurrency>()."
7531 msgstr ""
7532 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7533 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7534 "希望する並列処理レベルは I<new_level> で指定する。\n"
7535 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7536 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7537 "どのような並列度になるべきかは規定されていない。"
7538
7539 #. type: Plain text
7540 #: build/C/man3/pthread_setconcurrency.3:53
7541 msgid ""
7542 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7543 "concurrency level as it deems appropriate."
7544 msgstr ""
7545 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7546 "実装側で適切とみなしたレベルに設定するようになる。"
7547
7548 #. type: Plain text
7549 #: build/C/man3/pthread_setconcurrency.3:56
7550 msgid ""
7551 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7552 "level for this process."
7553 msgstr ""
7554 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7555 "の現在値を返す。"
7556
7557 #. type: Plain text
7558 #: build/C/man3/pthread_setconcurrency.3:61
7559 msgid ""
7560 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7561 "nonzero error number."
7562 msgstr ""
7563 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7564 "エラーの場合、 0 以外のエラー番号を返す。"
7565
7566 #. type: Plain text
7567 #: build/C/man3/pthread_setconcurrency.3:68
7568 msgid ""
7569 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7570 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7571 "B<pthread_setconcurrency>()  has not previously been called."
7572 msgstr ""
7573 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7574 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7575 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7576 "それまでに一度も呼び出されていない場合は 0 が返る。"
7577
7578 #. type: Plain text
7579 #: build/C/man3/pthread_setconcurrency.3:71
7580 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7581 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7582
7583 #. type: Plain text
7584 #: build/C/man3/pthread_setconcurrency.3:75
7585 msgid "I<new_level> is negative."
7586 msgstr "I<new_level> が負である。"
7587
7588 #. type: Plain text
7589 #: build/C/man3/pthread_setconcurrency.3:81
7590 msgid ""
7591 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7592 "I<new_level> would cause a system resource to be exceeded\")."
7593 msgstr ""
7594 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7595 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7596 "超過してしまう」)。"
7597
7598 #. type: Plain text
7599 #: build/C/man3/pthread_setconcurrency.3:83
7600 msgid "These functions are available in glibc since version 2.1."
7601 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7602
7603 #. type: Plain text
7604 #: build/C/man3/pthread_setconcurrency.3:87
7605 msgid "The default concurrency level is 0."
7606 msgstr "デフォルトの concurrency level は 0 である。"
7607
7608 #. type: Plain text
7609 #: build/C/man3/pthread_setconcurrency.3:94
7610 msgid ""
7611 "Concurrency levels are meaningful only for M:N threading implementations, "
7612 "where at any moment a subset of a process's set of user-level threads may be "
7613 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7614 "concurrency level allows the application to give the system a hint as to the "
7615 "number of kernel-scheduling entities that should be provided for efficient "
7616 "execution of the application."
7617 msgstr ""
7618 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7619 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7620 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7621 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7622 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7623 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7624 "ムに伝えることができる。"
7625
7626 #. type: Plain text
7627 #: build/C/man3/pthread_setconcurrency.3:100
7628 msgid ""
7629 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7630 "concurrency level has no meaning.  In other words, on Linux these functions "
7631 "merely exist for compatibility with other systems, and they have no effect "
7632 "on the execution of a program."
7633 msgstr ""
7634 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7635 "並列処理レベルを設定しても何の意味もない。\n"
7636 "言い換えると、 Linux では、これらの関数は、\n"
7637 "他のシステムとの互換性のためだけに存在し、\n"
7638 "プログラムの実行には何の影響も与えないということである。"
7639
7640 #. type: Plain text
7641 #: build/C/man3/pthread_setconcurrency.3:103
7642 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7643 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7644
7645 #. type: TH
7646 #: build/C/man3/pthread_setname_np.3:26
7647 #, no-wrap
7648 msgid "PTHREAD_SETNAME_NP"
7649 msgstr "PTHREAD_SETNAME_NP"
7650
7651 #. type: TH
7652 #: build/C/man3/pthread_setname_np.3:26
7653 #, no-wrap
7654 msgid "2013-04-02"
7655 msgstr "2013-04-02"
7656
7657 #. type: Plain text
7658 #: build/C/man3/pthread_setname_np.3:29
7659 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7660 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
7661
7662 #. type: Plain text
7663 #: build/C/man3/pthread_setname_np.3:36
7664 #, no-wrap
7665 msgid ""
7666 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7667 "B<#include E<lt>pthread.hE<gt>>\n"
7668 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7669 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7670 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7671 msgstr ""
7672 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7673 "B<#include E<lt>pthread.hE<gt>>\n"
7674 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7675 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7676 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7677
7678 #. type: Plain text
7679 #: build/C/man3/pthread_setname_np.3:55
7680 msgid ""
7681 "By default, all the threads created using B<pthread_create>()  inherit the "
7682 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7683 "unique name for a thread, which can be useful for debugging multithreaded "
7684 "applications.  The thread name is a meaningful C language string, whose "
7685 "length is restricted to 16 characters, including the terminating null byte.  "
7686 "The I<thread> argument specifies the thread whose name is to be changed; "
7687 "I<name> specifies the new name."
7688 msgstr "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデバッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さは 16 文字に限定されており、 終端の NULL バイトも 16 文字に含まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には新しい名前を指定する。"
7689
7690 #. type: Plain text
7691 #: build/C/man3/pthread_setname_np.3:72
7692 msgid ""
7693 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7694 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7695 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7696 "specifies the number of bytes available in I<name>.  The buffer specified by "
7697 "I<name> should be at least 16 characters in length.  The returned thread "
7698 "name in the output buffer will be null terminated."
7699 msgstr "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はスレッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定する。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 出力バッファに返されたスレッド名は NULL 終端される。"
7700
7701 #. type: Plain text
7702 #: build/C/man3/pthread_setname_np.3:79
7703 msgid ""
7704 "The B<pthread_setname_np>()  function can fail with the following error:"
7705 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7706
7707 #. type: TP
7708 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7709 #, no-wrap
7710 msgid "B<ERANGE>"
7711 msgstr "B<ERANGE>"
7712
7713 #. type: Plain text
7714 #: build/C/man3/pthread_setname_np.3:84
7715 msgid ""
7716 "The length of the string specified pointed to by I<name> exceeds the allowed "
7717 "limit."
7718 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
7719
7720 #. type: Plain text
7721 #: build/C/man3/pthread_setname_np.3:88
7722 msgid ""
7723 "The B<pthread_getname_np>()  function can fail with the following error:"
7724 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7725
7726 #. type: Plain text
7727 #: build/C/man3/pthread_setname_np.3:95
7728 msgid ""
7729 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7730 "name."
7731 msgstr "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎる。"
7732
7733 #. type: Plain text
7734 #: build/C/man3/pthread_setname_np.3:100
7735 msgid ""
7736 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7737 "then the call may fail with one of the errors described in B<open>(2)."
7738 msgstr "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は B<open>(2) で説明されているエラーのいずれかで失敗する。"
7739
7740 #. type: Plain text
7741 #: build/C/man3/pthread_setname_np.3:102
7742 msgid "These functions first appeared in glibc in version 2.12."
7743 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7744
7745 #. type: Plain text
7746 #: build/C/man3/pthread_setname_np.3:104
7747 msgid "These functions are nonstandard GNU extensions."
7748 msgstr "これらの関数は非標準の GNU による拡張である。"
7749
7750 #. type: Plain text
7751 #: build/C/man3/pthread_setname_np.3:112
7752 msgid ""
7753 "B<pthread_setname_np>()  internally writes to the thread specific comm file "
7754 "under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7755 "B<pthread_getname_np>()  retrieves it from the same location."
7756 msgstr "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の comm ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 B<pthread_getname_np>() はこのファイルから読み出しを行う。"
7757
7758 #. type: Plain text
7759 #: build/C/man3/pthread_setname_np.3:118
7760 msgid ""
7761 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7762 "B<pthread_getname_np>()."
7763 msgstr ""
7764 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7765 "の使用例を示している。"
7766
7767 #. type: Plain text
7768 #: build/C/man3/pthread_setname_np.3:120
7769 msgid "The following shell session shows a sample run of the program:"
7770 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7771
7772 #. type: Plain text
7773 #: build/C/man3/pthread_setname_np.3:136
7774 #, no-wrap
7775 msgid ""
7776 "$B< ./a.out>\n"
7777 "Created a thread. Default name is: a.out\n"
7778 "The thread name after setting it is THREADFOO.\n"
7779 "B<^Z>                           # Suspend the program\n"
7780 "[1]+  Stopped           ./a.out\n"
7781 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7782 "  PID   TID CMD                         COMMAND\n"
7783 " 5990  5990 ./a.out                     a.out\n"
7784 " 5990  5991 ./a.out                     THREADFOO\n"
7785 "$ B<cat /proc/5990/task/5990/comm>\n"
7786 "a.out\n"
7787 "$ B<cat /proc/5990/task/5991/comm>\n"
7788 "THREADFOO\n"
7789 msgstr ""
7790 "$B< ./a.out>\n"
7791 "Created a thread. Default name is: a.out\n"
7792 "The thread name after setting it is THREADFOO.\n"
7793 "B<^Z>                           # Suspend the program\n"
7794 "[1]+  Stopped           ./a.out\n"
7795 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7796 "  PID   TID CMD                         COMMAND\n"
7797 " 5990  5990 ./a.out                     a.out\n"
7798 " 5990  5991 ./a.out                     THREADFOO\n"
7799 "$ B<cat /proc/5990/task/5990/comm>\n"
7800 "a.out\n"
7801 "$ B<cat /proc/5990/task/5991/comm>\n"
7802 "THREADFOO\n"
7803
7804 #. type: Plain text
7805 #: build/C/man3/pthread_setname_np.3:148
7806 #, no-wrap
7807 msgid ""
7808 "#define _GNU_SOURCE\n"
7809 "#include E<lt>pthread.hE<gt>\n"
7810 "#include E<lt>stdio.hE<gt>\n"
7811 "#include E<lt>string.hE<gt>\n"
7812 "#include E<lt>unistd.hE<gt>\n"
7813 "#include E<lt>errno.hE<gt>\n"
7814 "#include E<lt>stdlib.hE<gt>\n"
7815 msgstr ""
7816 "#define _GNU_SOURCE\n"
7817 "#include E<lt>pthread.hE<gt>\n"
7818 "#include E<lt>stdio.hE<gt>\n"
7819 "#include E<lt>string.hE<gt>\n"
7820 "#include E<lt>unistd.hE<gt>\n"
7821 "#include E<lt>errno.hE<gt>\n"
7822 "#include E<lt>stdlib.hE<gt>\n"
7823
7824 #. type: Plain text
7825 #: build/C/man3/pthread_setname_np.3:150
7826 #, no-wrap
7827 msgid "#define NAMELEN 16\n"
7828 msgstr "#define NAMELEN 16\n"
7829
7830 #. type: Plain text
7831 #: build/C/man3/pthread_setname_np.3:154
7832 #, no-wrap
7833 msgid ""
7834 "#define errExitEN(en, msg) \\e\n"
7835 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7836 "        } while (0)\n"
7837 msgstr ""
7838 "#define errExitEN(en, msg) \\e\n"
7839 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7840 "        } while (0)\n"
7841
7842 #. type: Plain text
7843 #: build/C/man3/pthread_setname_np.3:161
7844 #, no-wrap
7845 msgid ""
7846 "static void *\n"
7847 "threadfunc(void *parm)\n"
7848 "{\n"
7849 "    sleep(5);          // allow main program to set the thread name\n"
7850 "    return NULL;\n"
7851 "}\n"
7852 msgstr ""
7853 "static void *\n"
7854 "threadfunc(void *parm)\n"
7855 "{\n"
7856 "    sleep(5);          // allow main program to set the thread name\n"
7857 "    return NULL;\n"
7858 "}\n"
7859
7860 #. type: Plain text
7861 #: build/C/man3/pthread_setname_np.3:168
7862 #, no-wrap
7863 msgid ""
7864 "int\n"
7865 "main(int argc, char **argv)\n"
7866 "{\n"
7867 "    pthread_t thread;\n"
7868 "    int rc;\n"
7869 "    char thread_name[NAMELEN];\n"
7870 msgstr ""
7871 "int\n"
7872 "main(int argc, char **argv)\n"
7873 "{\n"
7874 "    pthread_t thread;\n"
7875 "    int rc;\n"
7876 "    char thread_name[NAMELEN];\n"
7877
7878 #. type: Plain text
7879 #: build/C/man3/pthread_setname_np.3:172
7880 #, no-wrap
7881 msgid ""
7882 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7883 "    if (rc != 0)\n"
7884 "        errExitEN(rc, \"pthread_create\");\n"
7885 msgstr ""
7886 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7887 "    if (rc != 0)\n"
7888 "        errExitEN(rc, \"pthread_create\");\n"
7889
7890 #. type: Plain text
7891 #: build/C/man3/pthread_setname_np.3:176
7892 #, no-wrap
7893 msgid ""
7894 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7895 "    if (rc != 0)\n"
7896 "        errExitEN(rc, \"pthread_getname_np\");\n"
7897 msgstr ""
7898 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7899 "    if (rc != 0)\n"
7900 "        errExitEN(rc, \"pthread_getname_np\");\n"
7901
7902 #. type: Plain text
7903 #: build/C/man3/pthread_setname_np.3:181
7904 #, no-wrap
7905 msgid ""
7906 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7907 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7908 "    if (rc != 0)\n"
7909 "        errExitEN(rc, \"pthread_setname_np\");\n"
7910 msgstr ""
7911 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7912 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7913 "    if (rc != 0)\n"
7914 "        errExitEN(rc, \"pthread_setname_np\");\n"
7915
7916 #. type: Plain text
7917 #: build/C/man3/pthread_setname_np.3:183
7918 #, no-wrap
7919 msgid "    sleep(2);\n"
7920 msgstr "    sleep(2);\n"
7921
7922 #. type: Plain text
7923 #: build/C/man3/pthread_setname_np.3:189
7924 #, no-wrap
7925 msgid ""
7926 "    rc = pthread_getname_np(thread, thread_name,\n"
7927 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
7928 "    if (rc != 0)\n"
7929 "        errExitEN(rc, \"pthread_getname_np\");\n"
7930 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
7931 msgstr ""
7932 "    rc = pthread_getname_np(thread, thread_name,\n"
7933 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
7934 "    if (rc != 0)\n"
7935 "        errExitEN(rc, \"pthread_getname_np\");\n"
7936 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
7937
7938 #. type: Plain text
7939 #: build/C/man3/pthread_setname_np.3:193
7940 #, no-wrap
7941 msgid ""
7942 "    rc = pthread_join(thread, NULL);\n"
7943 "    if (rc != 0)\n"
7944 "        errExitEN(rc, \"pthread_join\");\n"
7945 msgstr ""
7946 "    rc = pthread_join(thread, NULL);\n"
7947 "    if (rc != 0)\n"
7948 "        errExitEN(rc, \"pthread_join\");\n"
7949
7950 #. type: Plain text
7951 #: build/C/man3/pthread_setname_np.3:197
7952 #, no-wrap
7953 msgid ""
7954 "    printf(\"Done\\en\");\n"
7955 "    exit(EXIT_SUCCESS);\n"
7956 "}\n"
7957 msgstr ""
7958 "    printf(\"Done\\en\");\n"
7959 "    exit(EXIT_SUCCESS);\n"
7960 "}\n"
7961
7962 #. type: Plain text
7963 #: build/C/man3/pthread_setname_np.3:204
7964 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
7965 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
7966
7967 #. type: TH
7968 #: build/C/man3/pthread_setschedparam.3:26
7969 #, no-wrap
7970 msgid "PTHREAD_SETSCHEDPARAM"
7971 msgstr "PTHREAD_SETSCHEDPARAM"
7972
7973 #. type: Plain text
7974 #: build/C/man3/pthread_setschedparam.3:30
7975 msgid ""
7976 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
7977 "parameters of a thread"
7978 msgstr ""
7979 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
7980 "スケジューリングポリシーとパラメータを設定/取得する"
7981
7982 #. type: Plain text
7983 #: build/C/man3/pthread_setschedparam.3:38
7984 #, no-wrap
7985 msgid ""
7986 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
7987 "B<                      const struct sched_param *>I<param>B<);>\n"
7988 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
7989 "B<                      struct sched_param *>I<param>B<);>\n"
7990 msgstr ""
7991 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
7992 "B<                      const struct sched_param *>I<param>B<);>\n"
7993 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
7994 "B<                      struct sched_param *>I<param>B<);>\n"
7995
7996 #. type: Plain text
7997 #: build/C/man3/pthread_setschedparam.3:46
7998 msgid ""
7999 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8000 "parameters of the thread I<thread>."
8001 msgstr ""
8002 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8003 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8004
8005 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8006 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8007 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8008 #. type: Plain text
8009 #: build/C/man3/pthread_setschedparam.3:57
8010 msgid ""
8011 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8012 "values for I<policy>, and their semantics, are described in "
8013 "B<sched_setscheduler>(2)."
8014 msgstr ""
8015 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8016 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8017 "説明されている。"
8018
8019 #. type: Plain text
8020 #: build/C/man3/pthread_setschedparam.3:63
8021 msgid ""
8022 "The structure pointed to by I<param> specifies the new scheduling parameters "
8023 "for I<thread>.  Scheduling parameters are maintained in the following "
8024 "structure:"
8025 msgstr ""
8026 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8027 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8028
8029 #.  FIXME . nptl/pthread_setschedparam.c has the following
8030 #.    /* If the thread should have higher priority because of some
8031 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8032 #.  Eventually (perhaps after writing the mutexattr pages), we
8033 #.  may want to add something on the topic to this page.
8034 #. type: Plain text
8035 #: build/C/man3/pthread_setschedparam.3:104
8036 msgid ""
8037 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8038 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8039 "and I<param>, respectively.  The returned priority value is that set by the "
8040 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8041 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8042 "does not reflect any temporary priority adjustments as a result of calls to "
8043 "any priority inheritance or priority ceiling functions (see, for example, "
8044 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8045 "(3))."
8046 msgstr ""
8047 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8048 "スケジューリングポリシーとパラメータを、\n"
8049 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8050 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8051 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8052 "B<pthread_create> で設定された値となる。\n"
8053 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8054 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8055 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8056 "行われる一時的な優先度の調整の影響を受けない。"
8057
8058 #. type: Plain text
8059 #: build/C/man3/pthread_setschedparam.3:112
8060 msgid ""
8061 "On success, these functions return 0; on error, they return a nonzero error "
8062 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8063 "parameters of I<thread> are not changed."
8064 msgstr ""
8065 "成功すると、これらの関数は 0 を返す。\n"
8066 "エラーの場合、0 以外のエラー番号を返す。\n"
8067 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8068 "スケジューリングポリシーとパラメータは変更されない。"
8069
8070 #. type: Plain text
8071 #: build/C/man3/pthread_setschedparam.3:114
8072 msgid "Both of these functions can fail with the following error:"
8073 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8074
8075 #. type: Plain text
8076 #: build/C/man3/pthread_setschedparam.3:122
8077 msgid ""
8078 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8079 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8080
8081 #. type: Plain text
8082 #: build/C/man3/pthread_setschedparam.3:129
8083 msgid ""
8084 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8085 "the I<policy>."
8086 msgstr ""
8087 "I<policy> が認識できないポリシーであるか、\n"
8088 "I<param> が I<policy> では意味を持たない値である。"
8089
8090 #. type: Plain text
8091 #: build/C/man3/pthread_setschedparam.3:133
8092 msgid ""
8093 "The caller does not have appropriate privileges to set the specified "
8094 "scheduling policy and parameters."
8095 msgstr ""
8096 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8097 "のに必要な特権を持たない。"
8098
8099 #.  .SH VERSIONS
8100 #.  Available since glibc 2.0
8101 #. type: Plain text
8102 #: build/C/man3/pthread_setschedparam.3:141
8103 msgid ""
8104 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8105 "policy or scheduling parameters to an unsupported value\") error for "
8106 "B<pthread_setschedparam>()."
8107 msgstr ""
8108 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8109 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8110 "パラメータに設定しようとした\") も追加で規定されている。"
8111
8112 #. type: Plain text
8113 #: build/C/man3/pthread_setschedparam.3:149
8114 msgid ""
8115 "For a description of the permissions required to, and the effect of, "
8116 "changing a thread's scheduling policy and priority, and details of the "
8117 "permitted ranges for priorities in each scheduling policy, see "
8118 "B<sched_setscheduler>(2)."
8119 msgstr ""
8120 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8121 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8122 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8123
8124 #. type: Plain text
8125 #: build/C/man3/pthread_setschedparam.3:156
8126 msgid ""
8127 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8128 "B<pthread_getschedparam>(), as well as the use of a number of other "
8129 "scheduling-related pthreads functions."
8130 msgstr ""
8131 "以下のプログラムは B<pthread_setschedparam>() と\n"
8132 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8133 "他のいろいろな関数の使用例を示すものである。"
8134
8135 #. type: Plain text
8136 #: build/C/man3/pthread_setschedparam.3:172
8137 msgid ""
8138 "In the following run, the main thread sets its scheduling policy to "
8139 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8140 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8141 "priority attribute of 20.  The program then sets (using "
8142 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8143 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8144 "created using this attributes object should take their scheduling attributes "
8145 "from the thread attributes object.  The program then creates a thread using "
8146 "the thread attributes object, and that thread displays its scheduling policy "
8147 "and priority."
8148 msgstr ""
8149 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8150 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8151 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8152 "属性 20 で初期化する。\n"
8153 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8154 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8155 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8156 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8157 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8158 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8159 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8160
8161 #. type: Plain text
8162 #: build/C/man3/pthread_setschedparam.3:180
8163 #, no-wrap
8164 msgid ""
8165 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8166 "Password:\n"
8167 "# B<./a.out -mf10 -ar20 -i e>\n"
8168 "Scheduler settings of main thread\n"
8169 "    policy=SCHED_FIFO, priority=10\n"
8170 msgstr ""
8171 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8172 "Password:\n"
8173 "# B<./a.out -mf10 -ar20 -i e>\n"
8174 "Scheduler settings of main thread\n"
8175 "    policy=SCHED_FIFO, priority=10\n"
8176
8177 #. type: Plain text
8178 #: build/C/man3/pthread_setschedparam.3:184
8179 #, no-wrap
8180 msgid ""
8181 "Scheduler settings in \\(aqattr\\(aq\n"
8182 "    policy=SCHED_RR, priority=20\n"
8183 "    inheritsched is EXPLICIT\n"
8184 msgstr ""
8185 "Scheduler settings in \\(aqattr\\(aq\n"
8186 "    policy=SCHED_RR, priority=20\n"
8187 "    inheritsched is EXPLICIT\n"
8188
8189 #. type: Plain text
8190 #: build/C/man3/pthread_setschedparam.3:187
8191 #, no-wrap
8192 msgid ""
8193 "Scheduler attributes of new thread\n"
8194 "    policy=SCHED_RR, priority=20\n"
8195 msgstr ""
8196 "Scheduler attributes of new thread\n"
8197 "    policy=SCHED_RR, priority=20\n"
8198
8199 #. type: Plain text
8200 #: build/C/man3/pthread_setschedparam.3:192
8201 msgid ""
8202 "In the above output, one can see that the scheduling policy and priority "
8203 "were taken from the values specified in the thread attributes object."
8204 msgstr ""
8205 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8206 "オブジェクトで指定された値から取られていることが分かる。"
8207
8208 #. type: Plain text
8209 #: build/C/man3/pthread_setschedparam.3:199
8210 msgid ""
8211 "The next run is the same as the previous, except that the inherit scheduler "
8212 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8213 "using the thread attributes object should ignore the scheduling attributes "
8214 "specified in the attributes object and instead take their scheduling "
8215 "attributes from the creating thread."
8216 msgstr ""
8217 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8218 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8219 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8220 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8221 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8222 "ことを意味する。"
8223
8224 #. type: Plain text
8225 #: build/C/man3/pthread_setschedparam.3:205
8226 #, no-wrap
8227 msgid ""
8228 "# B<./a.out -mf10 -ar20 -i i>\n"
8229 "Scheduler settings of main thread\n"
8230 "    policy=SCHED_FIFO, priority=10\n"
8231 msgstr ""
8232 "# B<./a.out -mf10 -ar20 -i i>\n"
8233 "Scheduler settings of main thread\n"
8234 "    policy=SCHED_FIFO, priority=10\n"
8235
8236 #. type: Plain text
8237 #: build/C/man3/pthread_setschedparam.3:209
8238 #, no-wrap
8239 msgid ""
8240 "Scheduler settings in \\(aqattr\\(aq\n"
8241 "    policy=SCHED_RR, priority=20\n"
8242 "    inheritsched is INHERIT\n"
8243 msgstr ""
8244 "Scheduler settings in \\(aqattr\\(aq\n"
8245 "    policy=SCHED_RR, priority=20\n"
8246 "    inheritsched is INHERIT\n"
8247
8248 #. type: Plain text
8249 #: build/C/man3/pthread_setschedparam.3:212
8250 #, no-wrap
8251 msgid ""
8252 "Scheduler attributes of new thread\n"
8253 "    policy=SCHED_FIFO, priority=10\n"
8254 msgstr ""
8255 "Scheduler attributes of new thread\n"
8256 "    policy=SCHED_FIFO, priority=10\n"
8257
8258 #. type: Plain text
8259 #: build/C/man3/pthread_setschedparam.3:218
8260 msgid ""
8261 "In the above output, one can see that the scheduling policy and priority "
8262 "were taken from the creating thread, rather than the thread attributes "
8263 "object."
8264 msgstr ""
8265 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8266 "スレッド属性オブジェクトからではなく、\n"
8267 "スレッドを作成したスレッドから取れれていることが分かる。"
8268
8269 #. type: Plain text
8270 #: build/C/man3/pthread_setschedparam.3:224
8271 msgid ""
8272 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8273 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8274 "scheduler attribute."
8275 msgstr ""
8276 "なお、 I<-i\\ i> を省略した場合でも、\n"
8277 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8278 "出力は同じになる。"
8279
8280 #. type: Plain text
8281 #: build/C/man3/pthread_setschedparam.3:228
8282 #, no-wrap
8283 msgid "/* pthreads_sched_test.c */\n"
8284 msgstr "/* pthreads_sched_test.c */\n"
8285
8286 #. type: Plain text
8287 #: build/C/man3/pthread_setschedparam.3:234
8288 #, no-wrap
8289 msgid ""
8290 "#include E<lt>pthread.hE<gt>\n"
8291 "#include E<lt>stdio.hE<gt>\n"
8292 "#include E<lt>stdlib.hE<gt>\n"
8293 "#include E<lt>unistd.hE<gt>\n"
8294 "#include E<lt>errno.hE<gt>\n"
8295 msgstr ""
8296 "#include E<lt>pthread.hE<gt>\n"
8297 "#include E<lt>stdio.hE<gt>\n"
8298 "#include E<lt>stdlib.hE<gt>\n"
8299 "#include E<lt>unistd.hE<gt>\n"
8300 "#include E<lt>errno.hE<gt>\n"
8301
8302 #. type: Plain text
8303 #: build/C/man3/pthread_setschedparam.3:243
8304 #, no-wrap
8305 msgid ""
8306 "static void\n"
8307 "usage(char *prog_name, char *msg)\n"
8308 "{\n"
8309 "    if (msg != NULL)\n"
8310 "        fputs(msg, stderr);\n"
8311 msgstr ""
8312 "static void\n"
8313 "usage(char *prog_name, char *msg)\n"
8314 "{\n"
8315 "    if (msg != NULL)\n"
8316 "        fputs(msg, stderr);\n"
8317
8318 #. type: Plain text
8319 #: build/C/man3/pthread_setschedparam.3:260
8320 #, no-wrap
8321 msgid ""
8322 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8323 "    fprintf(stderr, \"Options are:\\en\");\n"
8324 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8325 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8326 "    fpe(\"                 thread attributes object\\en\");\n"
8327 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8328 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8329 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8330 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8331 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8332 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8333 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8334 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8335 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8336 "    exit(EXIT_FAILURE);\n"
8337 "}\n"
8338 msgstr ""
8339 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8340 "    fprintf(stderr, \"Options are:\\en\");\n"
8341 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8342 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8343 "    fpe(\"                 thread attributes object\\en\");\n"
8344 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8345 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8346 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8347 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8348 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8349 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8350 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8351 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8352 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8353 "    exit(EXIT_FAILURE);\n"
8354 "}\n"
8355
8356 #. type: Plain text
8357 #: build/C/man3/pthread_setschedparam.3:271
8358 #, no-wrap
8359 msgid ""
8360 "static int\n"
8361 "get_policy(char p, int *policy)\n"
8362 "{\n"
8363 "    switch (p) {\n"
8364 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8365 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8366 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8367 "    default:  return 0;\n"
8368 "    }\n"
8369 "}\n"
8370 msgstr ""
8371 "static int\n"
8372 "get_policy(char p, int *policy)\n"
8373 "{\n"
8374 "    switch (p) {\n"
8375 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8376 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8377 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8378 "    default:  return 0;\n"
8379 "    }\n"
8380 "}\n"
8381
8382 #. type: Plain text
8383 #: build/C/man3/pthread_setschedparam.3:282
8384 #, no-wrap
8385 msgid ""
8386 "static void\n"
8387 "display_sched_attr(int policy, struct sched_param *param)\n"
8388 "{\n"
8389 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8390 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8391 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8392 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8393 "            \"???\",\n"
8394 "            param-E<gt>sched_priority);\n"
8395 "}\n"
8396 msgstr ""
8397 "static void\n"
8398 "display_sched_attr(int policy, struct sched_param *param)\n"
8399 "{\n"
8400 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8401 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8402 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8403 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8404 "            \"???\",\n"
8405 "            param-E<gt>sched_priority);\n"
8406 "}\n"
8407
8408 #. type: Plain text
8409 #: build/C/man3/pthread_setschedparam.3:288
8410 #, no-wrap
8411 msgid ""
8412 "static void\n"
8413 "display_thread_sched_attr(char *msg)\n"
8414 "{\n"
8415 "    int policy, s;\n"
8416 "    struct sched_param param;\n"
8417 msgstr ""
8418 "static void\n"
8419 "display_thread_sched_attr(char *msg)\n"
8420 "{\n"
8421 "    int policy, s;\n"
8422 "    struct sched_param param;\n"
8423
8424 #. type: Plain text
8425 #: build/C/man3/pthread_setschedparam.3:292
8426 #, no-wrap
8427 msgid ""
8428 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8429 "    if (s != 0)\n"
8430 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8431 msgstr ""
8432 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8433 "    if (s != 0)\n"
8434 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8435
8436 #. type: Plain text
8437 #: build/C/man3/pthread_setschedparam.3:296
8438 #, no-wrap
8439 msgid ""
8440 "    printf(\"%s\\en\", msg);\n"
8441 "    display_sched_attr(policy, &param);\n"
8442 "}\n"
8443 msgstr ""
8444 "    printf(\"%s\\en\", msg);\n"
8445 "    display_sched_attr(policy, &param);\n"
8446 "}\n"
8447
8448 #. type: Plain text
8449 #: build/C/man3/pthread_setschedparam.3:301
8450 #, no-wrap
8451 msgid ""
8452 "static void *\n"
8453 "thread_start(void *arg)\n"
8454 "{\n"
8455 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8456 msgstr ""
8457 "static void *\n"
8458 "thread_start(void *arg)\n"
8459 "{\n"
8460 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8461
8462 #. type: Plain text
8463 #: build/C/man3/pthread_setschedparam.3:304
8464 #, no-wrap
8465 msgid ""
8466 "    return NULL;\n"
8467 "}\n"
8468 msgstr ""
8469 "    return NULL;\n"
8470 "}\n"
8471
8472 #. type: Plain text
8473 #: build/C/man3/pthread_setschedparam.3:314
8474 #, no-wrap
8475 msgid ""
8476 "int\n"
8477 "main(int argc, char *argv[])\n"
8478 "{\n"
8479 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8480 "    pthread_t thread;\n"
8481 "    pthread_attr_t attr;\n"
8482 "    pthread_attr_t *attrp;\n"
8483 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8484 "    struct sched_param param;\n"
8485 msgstr ""
8486 "int\n"
8487 "main(int argc, char *argv[])\n"
8488 "{\n"
8489 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8490 "    pthread_t thread;\n"
8491 "    pthread_attr_t attr;\n"
8492 "    pthread_attr_t *attrp;\n"
8493 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8494 "    struct sched_param param;\n"
8495
8496 #. type: Plain text
8497 #: build/C/man3/pthread_setschedparam.3:316
8498 #, no-wrap
8499 msgid "    /* Process command-line options */\n"
8500 msgstr "    /* Process command-line options */\n"
8501
8502 #. type: Plain text
8503 #: build/C/man3/pthread_setschedparam.3:321
8504 #, no-wrap
8505 msgid ""
8506 "    use_null_attrib = 0;\n"
8507 "    attr_sched_str = NULL;\n"
8508 "    main_sched_str = NULL;\n"
8509 "    inheritsched_str = NULL;\n"
8510 msgstr ""
8511 "    use_null_attrib = 0;\n"
8512 "    attr_sched_str = NULL;\n"
8513 "    main_sched_str = NULL;\n"
8514 "    inheritsched_str = NULL;\n"
8515
8516 #. type: Plain text
8517 #: build/C/man3/pthread_setschedparam.3:331
8518 #, no-wrap
8519 msgid ""
8520 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8521 "        switch (opt) {\n"
8522 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8523 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8524 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8525 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8526 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8527 "        }\n"
8528 "    }\n"
8529 msgstr ""
8530 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8531 "        switch (opt) {\n"
8532 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8533 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8534 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8535 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8536 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8537 "        }\n"
8538 "    }\n"
8539
8540 #. type: Plain text
8541 #: build/C/man3/pthread_setschedparam.3:335
8542 #, no-wrap
8543 msgid ""
8544 "    if (use_null_attrib &&\n"
8545 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8546 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8547 msgstr ""
8548 "    if (use_null_attrib &&\n"
8549 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8550 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8551
8552 #. type: Plain text
8553 #: build/C/man3/pthread_setschedparam.3:338
8554 #, no-wrap
8555 msgid ""
8556 "    /* Optionally set scheduling attributes of main thread,\n"
8557 "       and display the attributes */\n"
8558 msgstr ""
8559 "    /* Optionally set scheduling attributes of main thread,\n"
8560 "       and display the attributes */\n"
8561
8562 #. type: Plain text
8563 #: build/C/man3/pthread_setschedparam.3:343
8564 #, no-wrap
8565 msgid ""
8566 "    if (main_sched_str != NULL) {\n"
8567 "        if (!get_policy(main_sched_str[0], &policy))\n"
8568 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8569 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8570 msgstr ""
8571 "    if (main_sched_str != NULL) {\n"
8572 "        if (!get_policy(main_sched_str[0], &policy))\n"
8573 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8574 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8575
8576 #. type: Plain text
8577 #: build/C/man3/pthread_setschedparam.3:348
8578 #, no-wrap
8579 msgid ""
8580 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8581 "        if (s != 0)\n"
8582 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8583 "    }\n"
8584 msgstr ""
8585 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8586 "        if (s != 0)\n"
8587 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8588 "    }\n"
8589
8590 #. type: Plain text
8591 #: build/C/man3/pthread_setschedparam.3:351
8592 #, no-wrap
8593 msgid ""
8594 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8595 "    printf(\"\\en\");\n"
8596 msgstr ""
8597 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8598 "    printf(\"\\en\");\n"
8599
8600 #. type: Plain text
8601 #: build/C/man3/pthread_setschedparam.3:353
8602 #, no-wrap
8603 msgid "    /* Initialize thread attributes object according to options */\n"
8604 msgstr "    /* Initialize thread attributes object according to options */\n"
8605
8606 #. type: Plain text
8607 #: build/C/man3/pthread_setschedparam.3:362
8608 #, no-wrap
8609 msgid ""
8610 "    if (!use_null_attrib) {\n"
8611 "        s = pthread_attr_init(&attr);\n"
8612 "        if (s != 0)\n"
8613 "            handle_error_en(s, \"pthread_attr_init\");\n"
8614 "        attrp = &attr;\n"
8615 "    }\n"
8616 msgstr ""
8617 "    if (!use_null_attrib) {\n"
8618 "        s = pthread_attr_init(&attr);\n"
8619 "        if (s != 0)\n"
8620 "            handle_error_en(s, \"pthread_attr_init\");\n"
8621 "        attrp = &attr;\n"
8622 "    }\n"
8623
8624 #. type: Plain text
8625 #: build/C/man3/pthread_setschedparam.3:370
8626 #, no-wrap
8627 msgid ""
8628 "    if (inheritsched_str != NULL) {\n"
8629 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8630 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8631 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8632 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8633 "        else\n"
8634 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8635 msgstr ""
8636 "    if (inheritsched_str != NULL) {\n"
8637 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8638 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8639 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8640 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8641 "        else\n"
8642 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8643
8644 #. type: Plain text
8645 #: build/C/man3/pthread_setschedparam.3:375
8646 #, no-wrap
8647 msgid ""
8648 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8649 "        if (s != 0)\n"
8650 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8651 "    }\n"
8652 msgstr ""
8653 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8654 "        if (s != 0)\n"
8655 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8656 "    }\n"
8657
8658 #. type: Plain text
8659 #: build/C/man3/pthread_setschedparam.3:381
8660 #, no-wrap
8661 msgid ""
8662 "    if (attr_sched_str != NULL) {\n"
8663 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8664 "            usage(argv[0],\n"
8665 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8666 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8667 msgstr ""
8668 "    if (attr_sched_str != NULL) {\n"
8669 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8670 "            usage(argv[0],\n"
8671 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8672 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8673
8674 #. type: Plain text
8675 #: build/C/man3/pthread_setschedparam.3:389
8676 #, no-wrap
8677 msgid ""
8678 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8679 "        if (s != 0)\n"
8680 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8681 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8682 "        if (s != 0)\n"
8683 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8684 "    }\n"
8685 msgstr ""
8686 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8687 "        if (s != 0)\n"
8688 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8689 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8690 "        if (s != 0)\n"
8691 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8692 "    }\n"
8693
8694 #. type: Plain text
8695 #: build/C/man3/pthread_setschedparam.3:392
8696 #, no-wrap
8697 msgid ""
8698 "    /* If we initialized a thread attributes object, display\n"
8699 "       the scheduling attributes that were set in the object */\n"
8700 msgstr ""
8701 "    /* If we initialized a thread attributes object, display\n"
8702 "       the scheduling attributes that were set in the object */\n"
8703
8704 #. type: Plain text
8705 #: build/C/man3/pthread_setschedparam.3:400
8706 #, no-wrap
8707 msgid ""
8708 "    if (attrp != NULL) {\n"
8709 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8710 "        if (s != 0)\n"
8711 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8712 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8713 "        if (s != 0)\n"
8714 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8715 msgstr ""
8716 "    if (attrp != NULL) {\n"
8717 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8718 "        if (s != 0)\n"
8719 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8720 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8721 "        if (s != 0)\n"
8722 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8723
8724 #. type: Plain text
8725 #: build/C/man3/pthread_setschedparam.3:403
8726 #, no-wrap
8727 msgid ""
8728 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8729 "        display_sched_attr(policy, &param);\n"
8730 msgstr ""
8731 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8732 "        display_sched_attr(policy, &param);\n"
8733
8734 #. type: Plain text
8735 #: build/C/man3/pthread_setschedparam.3:411
8736 #, no-wrap
8737 msgid ""
8738 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8739 "        printf(\"    inheritsched is %s\\en\",\n"
8740 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8741 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8742 "                \"???\");\n"
8743 "        printf(\"\\en\");\n"
8744 "    }\n"
8745 msgstr ""
8746 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8747 "        printf(\"    inheritsched is %s\\en\",\n"
8748 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8749 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8750 "                \"???\");\n"
8751 "        printf(\"\\en\");\n"
8752 "    }\n"
8753
8754 #. type: Plain text
8755 #: build/C/man3/pthread_setschedparam.3:413
8756 #, no-wrap
8757 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8758 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8759
8760 #. type: Plain text
8761 #: build/C/man3/pthread_setschedparam.3:417
8762 #, no-wrap
8763 msgid ""
8764 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8765 "    if (s != 0)\n"
8766 "        handle_error_en(s, \"pthread_create\");\n"
8767 msgstr ""
8768 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8769 "    if (s != 0)\n"
8770 "        handle_error_en(s, \"pthread_create\");\n"
8771
8772 #. type: Plain text
8773 #: build/C/man3/pthread_setschedparam.3:419
8774 #, no-wrap
8775 msgid "    /* Destroy unneeded thread attributes object */\n"
8776 msgstr "    /* Destroy unneeded thread attributes object */\n"
8777
8778 #. type: Plain text
8779 #: build/C/man3/pthread_setschedparam.3:427
8780 #, no-wrap
8781 msgid ""
8782 "    s = pthread_join(thread, NULL);\n"
8783 "    if (s != 0)\n"
8784 "        handle_error_en(s, \"pthread_join\");\n"
8785 msgstr ""
8786 "    s = pthread_join(thread, NULL);\n"
8787 "    if (s != 0)\n"
8788 "        handle_error_en(s, \"pthread_join\");\n"
8789
8790 #. type: Plain text
8791 #: build/C/man3/pthread_setschedparam.3:445
8792 msgid ""
8793 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8794 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8795 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8796 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8797 "B<pthreads>(7)"
8798 msgstr ""
8799 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8800 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8801 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8802 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8803 "B<pthreads>(7)"
8804
8805 #. type: TH
8806 #: build/C/man3/pthread_setschedprio.3:26
8807 #, no-wrap
8808 msgid "PTHREAD_SETSCHEDPRIO"
8809 msgstr "PTHREAD_SETSCHEDPRIO"
8810
8811 #. type: TH
8812 #: build/C/man3/pthread_setschedprio.3:26
8813 #, no-wrap
8814 msgid "2008-11-06"
8815 msgstr "2008-11-06"
8816
8817 #. type: Plain text
8818 #: build/C/man3/pthread_setschedprio.3:29
8819 msgid "pthread_setschedprio - set scheduling priority of a thread"
8820 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8821
8822 #. type: Plain text
8823 #: build/C/man3/pthread_setschedprio.3:34
8824 #, no-wrap
8825 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8826 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8827
8828 #.  FIXME . nptl/pthread_setschedprio.c has the following
8829 #.    /* If the thread should have higher priority because of some
8830 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8831 #.  Eventually (perhaps after writing the mutexattr pages), we
8832 #.  may want to add something on the topic to this page.
8833 #.  nptl/pthread_setschedparam.c has a similar case.
8834 #. type: Plain text
8835 #: build/C/man3/pthread_setschedprio.3:53
8836 msgid ""
8837 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8838 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8839 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8840 "of a thread.)"
8841 msgstr ""
8842 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8843 "優先度に I<prio> で指定された値を設定する\n"
8844 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8845 "と優先度の両方を変更する)。"
8846
8847 #. type: Plain text
8848 #: build/C/man3/pthread_setschedprio.3:61
8849 msgid ""
8850 "On success, this function returns 0; on error, it returns a nonzero error "
8851 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8852 "I<thread> is not changed."
8853 msgstr ""
8854 "成功すると、この関数は 0 を返す。\n"
8855 "エラーの場合、0 以外のエラー番号を返す。\n"
8856 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8857 "スケジューリング優先度は変更されない。"
8858
8859 #. type: Plain text
8860 #: build/C/man3/pthread_setschedprio.3:66
8861 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8862 msgstr ""
8863 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8864
8865 #. type: Plain text
8866 #: build/C/man3/pthread_setschedprio.3:70
8867 msgid ""
8868 "The caller does not have appropriate privileges to set the specified "
8869 "priority."
8870 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8871
8872 #. type: Plain text
8873 #: build/C/man3/pthread_setschedprio.3:81
8874 msgid ""
8875 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8876 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
8877 msgstr ""
8878 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
8879 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
8880 "に設定しようとした\") も追加で規定されている。"
8881
8882 #. type: Plain text
8883 #: build/C/man3/pthread_setschedprio.3:83
8884 msgid "This function is available in glibc since version 2.3.4."
8885 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
8886
8887 #. type: Plain text
8888 #: build/C/man3/pthread_setschedprio.3:91
8889 msgid ""
8890 "For a description of the permissions required to, and the effect of, "
8891 "changing a thread's scheduling priority, and details of the permitted ranges "
8892 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
8893 msgstr ""
8894 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
8895 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8896 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8897
8898 #. type: Plain text
8899 #: build/C/man3/pthread_setschedprio.3:105
8900 msgid ""
8901 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8902 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8903 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8904 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8905 "B<pthreads>(7)"
8906 msgstr ""
8907 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8908 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8909 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8910 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8911 "B<pthreads>(7)"
8912
8913 #. type: TH
8914 #: build/C/man3/pthread_sigmask.3:26
8915 #, no-wrap
8916 msgid "PTHREAD_SIGMASK"
8917 msgstr "PTHREAD_SIGMASK"
8918
8919 #. type: Plain text
8920 #: build/C/man3/pthread_sigmask.3:29
8921 msgid "pthread_sigmask - examine and change mask of blocked signals"
8922 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
8923
8924 #. type: Plain text
8925 #: build/C/man3/pthread_sigmask.3:35
8926 #, no-wrap
8927 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
8928 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
8929
8930 #. type: Plain text
8931 #: build/C/man3/pthread_sigmask.3:46
8932 msgid ""
8933 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
8934 "difference that its use in multithreaded programs is explicitly specified by "
8935 "POSIX.1-2001.  Other differences are noted in this page."
8936 msgstr ""
8937 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
8938 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
8939 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
8940
8941 #. type: Plain text
8942 #: build/C/man3/pthread_sigmask.3:49
8943 msgid ""
8944 "For a description of the arguments and operation of this function, see "
8945 "B<sigprocmask>(2)."
8946 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
8947
8948 #. type: Plain text
8949 #: build/C/man3/pthread_sigmask.3:54
8950 msgid ""
8951 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
8952 "number."
8953 msgstr ""
8954 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
8955 "エラーの場合、エラー番号を返す。"
8956
8957 #. type: Plain text
8958 #: build/C/man3/pthread_sigmask.3:57
8959 msgid "See B<sigprocmask>(2)."
8960 msgstr "B<sigprocmask>(2) を参照。"
8961
8962 #. type: Plain text
8963 #: build/C/man3/pthread_sigmask.3:61
8964 msgid "A new thread inherits a copy of its creator's signal mask."
8965 msgstr ""
8966 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
8967 "継承する。"
8968
8969 #. type: Plain text
8970 #: build/C/man3/pthread_sigmask.3:66
8971 msgid ""
8972 "The program below blocks some signals in the main thread, and then creates a "
8973 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
8974 "shell session demonstrates its use:"
8975 msgstr ""
8976 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
8977 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
8978 "専用のスレッドを作成する。\n"
8979 "下記のシェルのセッションはその利用例を示したものである。"
8980
8981 #. type: Plain text
8982 #: build/C/man3/pthread_sigmask.3:77
8983 #, no-wrap
8984 msgid ""
8985 "$B< ./a.out &>\n"
8986 "[1] 5423\n"
8987 "$B< kill -QUIT %1>\n"
8988 "Signal handling thread got signal 3\n"
8989 "$B< kill -USR1 %1>\n"
8990 "Signal handling thread got signal 10\n"
8991 "$B< kill -TERM %1>\n"
8992 "[1]+  Terminated              ./a.out\n"
8993 msgstr ""
8994 "$B< ./a.out &>\n"
8995 "[1] 5423\n"
8996 "$B< kill -QUIT %1>\n"
8997 "Signal handling thread got signal 3\n"
8998 "$B< kill -USR1 %1>\n"
8999 "Signal handling thread got signal 10\n"
9000 "$B< kill -TERM %1>\n"
9001 "[1]+  Terminated              ./a.out\n"
9002
9003 #. type: Plain text
9004 #: build/C/man3/pthread_sigmask.3:88
9005 #, no-wrap
9006 msgid ""
9007 "#include E<lt>pthread.hE<gt>\n"
9008 "#include E<lt>stdio.hE<gt>\n"
9009 "#include E<lt>stdlib.hE<gt>\n"
9010 "#include E<lt>unistd.hE<gt>\n"
9011 "#include E<lt>signal.hE<gt>\n"
9012 "#include E<lt>errno.hE<gt>\n"
9013 msgstr ""
9014 "#include E<lt>pthread.hE<gt>\n"
9015 "#include E<lt>stdio.hE<gt>\n"
9016 "#include E<lt>stdlib.hE<gt>\n"
9017 "#include E<lt>unistd.hE<gt>\n"
9018 "#include E<lt>signal.hE<gt>\n"
9019 "#include E<lt>errno.hE<gt>\n"
9020
9021 #. type: Plain text
9022 #: build/C/man3/pthread_sigmask.3:90
9023 #, no-wrap
9024 msgid "/* Simple error handling functions */\n"
9025 msgstr "/* Simple error handling functions */\n"
9026
9027 #. type: Plain text
9028 #: build/C/man3/pthread_sigmask.3:99
9029 #, no-wrap
9030 msgid ""
9031 "static void *\n"
9032 "sig_thread(void *arg)\n"
9033 "{\n"
9034 "    sigset_t *set = arg;\n"
9035 "    int s, sig;\n"
9036 msgstr ""
9037 "static void *\n"
9038 "sig_thread(void *arg)\n"
9039 "{\n"
9040 "    sigset_t *set = arg;\n"
9041 "    int s, sig;\n"
9042
9043 #. type: Plain text
9044 #: build/C/man3/pthread_sigmask.3:107
9045 #, no-wrap
9046 msgid ""
9047 "    for (;;) {\n"
9048 "        s = sigwait(set, &sig);\n"
9049 "        if (s != 0)\n"
9050 "            handle_error_en(s, \"sigwait\");\n"
9051 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9052 "    }\n"
9053 "}\n"
9054 msgstr ""
9055 "    for (;;) {\n"
9056 "        s = sigwait(set, &sig);\n"
9057 "        if (s != 0)\n"
9058 "            handle_error_en(s, \"sigwait\");\n"
9059 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9060 "    }\n"
9061 "}\n"
9062
9063 #. type: Plain text
9064 #: build/C/man3/pthread_sigmask.3:114
9065 #, no-wrap
9066 msgid ""
9067 "int\n"
9068 "main(int argc, char *argv[])\n"
9069 "{\n"
9070 "    pthread_t thread;\n"
9071 "    sigset_t set;\n"
9072 "    int s;\n"
9073 msgstr ""
9074 "int\n"
9075 "main(int argc, char *argv[])\n"
9076 "{\n"
9077 "    pthread_t thread;\n"
9078 "    sigset_t set;\n"
9079 "    int s;\n"
9080
9081 #. type: Plain text
9082 #: build/C/man3/pthread_sigmask.3:117
9083 #, no-wrap
9084 msgid ""
9085 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9086 "       will inherit a copy of the signal mask. */\n"
9087 msgstr ""
9088 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9089 "       will inherit a copy of the signal mask. */\n"
9090
9091 #. type: Plain text
9092 #: build/C/man3/pthread_sigmask.3:124
9093 #, no-wrap
9094 msgid ""
9095 "    sigemptyset(&set);\n"
9096 "    sigaddset(&set, SIGQUIT);\n"
9097 "    sigaddset(&set, SIGUSR1);\n"
9098 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9099 "    if (s != 0)\n"
9100 "        handle_error_en(s, \"pthread_sigmask\");\n"
9101 msgstr ""
9102 "    sigemptyset(&set);\n"
9103 "    sigaddset(&set, SIGQUIT);\n"
9104 "    sigaddset(&set, SIGUSR1);\n"
9105 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9106 "    if (s != 0)\n"
9107 "        handle_error_en(s, \"pthread_sigmask\");\n"
9108
9109 #. type: Plain text
9110 #: build/C/man3/pthread_sigmask.3:128
9111 #, no-wrap
9112 msgid ""
9113 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9114 "    if (s != 0)\n"
9115 "        handle_error_en(s, \"pthread_create\");\n"
9116 msgstr ""
9117 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9118 "    if (s != 0)\n"
9119 "        handle_error_en(s, \"pthread_create\");\n"
9120
9121 #. type: Plain text
9122 #: build/C/man3/pthread_sigmask.3:131
9123 #, no-wrap
9124 msgid ""
9125 "    /* Main thread carries on to create other threads and/or do\n"
9126 "       other work */\n"
9127 msgstr ""
9128 "    /* Main thread carries on to create other threads and/or do\n"
9129 "       other work */\n"
9130
9131 #. type: Plain text
9132 #: build/C/man3/pthread_sigmask.3:134
9133 #, no-wrap
9134 msgid ""
9135 "    pause();            /* Dummy pause so we can test program */\n"
9136 "}\n"
9137 msgstr ""
9138 "    pause();            /* Dummy pause so we can test program */\n"
9139 "}\n"
9140
9141 #. type: Plain text
9142 #: build/C/man3/pthread_sigmask.3:144
9143 msgid ""
9144 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9145 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9146 msgstr ""
9147 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9148 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9149
9150 #. type: TH
9151 #: build/C/man3/pthread_sigqueue.3:25
9152 #, no-wrap
9153 msgid "PTHREAD_SIGQUEUE"
9154 msgstr "PTHREAD_SIGQUEUE"
9155
9156 #. type: Plain text
9157 #: build/C/man3/pthread_sigqueue.3:28
9158 msgid "pthread_sigqueue - queue a signal and data to a thread"
9159 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9160
9161 #. type: Plain text
9162 #: build/C/man3/pthread_sigqueue.3:34
9163 #, no-wrap
9164 msgid ""
9165 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9166 "B<                     const union sigval >I<value>B<);>\n"
9167 msgstr ""
9168 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9169 "B<                     const union sigval >I<value>B<);>\n"
9170
9171 #. type: Plain text
9172 #: build/C/man3/pthread_sigqueue.3:45
9173 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9174 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9175
9176 #. type: Plain text
9177 #: build/C/man3/pthread_sigqueue.3:53
9178 msgid ""
9179 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9180 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9181 "thread in the same process as the calling thread."
9182 msgstr ""
9183 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9184 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9185 "同じプロセス内のスレッドにシグナルを送信する。"
9186
9187 #. type: Plain text
9188 #: build/C/man3/pthread_sigqueue.3:65
9189 msgid ""
9190 "The I<thread> argument is the ID of a thread in the same process as the "
9191 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9192 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9193 "details."
9194 msgstr ""
9195 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9196 "I<sig> 引き数は送信するシグナルを指定する。\n"
9197 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9198 "詳細は B<sigqueue>(3) を参照。"
9199
9200 #. type: Plain text
9201 #: build/C/man3/pthread_sigqueue.3:70
9202 msgid ""
9203 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9204 "number."
9205 msgstr ""
9206 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9207 "エラーの場合、エラー番号を返す。"
9208
9209 #. type: Plain text
9210 #: build/C/man3/pthread_sigqueue.3:77
9211 msgid ""
9212 "The limit of signals which may be queued has been reached.  (See B<signal>"
9213 "(7)  for further information.)"
9214 msgstr ""
9215 "キューに入れられるシグナル数が上限に達していた\n"
9216 "(詳しい情報は (B<signal>(7) を参照)。"
9217
9218 #. type: Plain text
9219 #: build/C/man3/pthread_sigqueue.3:81
9220 msgid "I<sig> was invalid."
9221 msgstr "I<sig> が無効であった。"
9222
9223 #. type: TP
9224 #: build/C/man3/pthread_sigqueue.3:81
9225 #, no-wrap
9226 msgid "B<ENOSYS>"
9227 msgstr "B<ENOSYS>"
9228
9229 #. type: Plain text
9230 #: build/C/man3/pthread_sigqueue.3:85
9231 msgid "B<pthread_sigqueue>()  is not supported on this system."
9232 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9233
9234 #. type: Plain text
9235 #: build/C/man3/pthread_sigqueue.3:89
9236 msgid "I<thread> is not valid."
9237 msgstr "I<thread> が無効である。"
9238
9239 #. type: Plain text
9240 #: build/C/man3/pthread_sigqueue.3:93
9241 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9242 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9243
9244 #. type: Plain text
9245 #: build/C/man3/pthread_sigqueue.3:95
9246 msgid "This function is a GNU extension."
9247 msgstr "この関数は GNU による拡張である。"
9248
9249 #. type: Plain text
9250 #: build/C/man3/pthread_sigqueue.3:103
9251 msgid ""
9252 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9253 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9254 msgstr ""
9255 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9256 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9257
9258 #. type: TH
9259 #: build/C/man3/pthread_testcancel.3:26
9260 #, no-wrap
9261 msgid "PTHREAD_TESTCANCEL"
9262 msgstr "PTHREAD_TESTCANCEL"
9263
9264 #. type: TH
9265 #: build/C/man3/pthread_testcancel.3:26
9266 #, no-wrap
9267 msgid "2012-04-14"
9268 msgstr "2012-04-14"
9269
9270 #. type: Plain text
9271 #: build/C/man3/pthread_testcancel.3:29
9272 msgid ""
9273 "pthread_testcancel - request delivery of any pending cancellation request"
9274 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9275
9276 #. type: Plain text
9277 #: build/C/man3/pthread_testcancel.3:34
9278 #, no-wrap
9279 msgid "B<void pthread_testcancel(void);>\n"
9280 msgstr "B<void pthread_testcancel(void);>\n"
9281
9282 #. type: Plain text
9283 #: build/C/man3/pthread_testcancel.3:43
9284 msgid ""
9285 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9286 "calling thread, so that a thread that is otherwise executing code that "
9287 "contains no cancellation points will respond to a cancellation request."
9288 msgstr ""
9289 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9290 "ポイント (cancellation point) が作成される。\n"
9291 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9292 "いるスレッドが取り消し要求に対応することができるようになる。"
9293
9294 #. type: Plain text
9295 #: build/C/man3/pthread_testcancel.3:50
9296 msgid ""
9297 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9298 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9299 "no effect."
9300 msgstr ""
9301 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9302 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9303 "呼び出しても何の影響もない。"
9304
9305 #. type: Plain text
9306 #: build/C/man3/pthread_testcancel.3:54
9307 msgid ""
9308 "This function does not return a value.  If the calling thread is canceled as "
9309 "a consequence of a call to this function, then the function does not return."
9310 msgstr ""
9311 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9312 "キャンセルされた場合、この関数が返ることはない。"
9313
9314 #. type: Plain text
9315 #: build/C/man3/pthread_testcancel.3:63
9316 msgid "See B<pthread_cleanup_push>(3)."
9317 msgstr "B<pthread_cleanup_push>(3) を参照。"
9318
9319 #. type: Plain text
9320 #: build/C/man3/pthread_testcancel.3:68
9321 msgid ""
9322 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9323 "(3), B<pthreads>(7)"
9324 msgstr ""
9325 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9326 "(3), B<pthreads>(7)"
9327
9328 #. type: TH
9329 #: build/C/man3/pthread_tryjoin_np.3:26
9330 #, no-wrap
9331 msgid "PTHREAD_TRYJOIN_NP"
9332 msgstr "PTHREAD_TRYJOIN_NP"
9333
9334 #. type: Plain text
9335 #: build/C/man3/pthread_tryjoin_np.3:30
9336 msgid ""
9337 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9338 "thread"
9339 msgstr ""
9340 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9341 "試みる"
9342
9343 #. type: Plain text
9344 #: build/C/man3/pthread_tryjoin_np.3:36
9345 #, no-wrap
9346 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9347 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9348
9349 #. type: Plain text
9350 #: build/C/man3/pthread_tryjoin_np.3:39
9351 #, no-wrap
9352 msgid ""
9353 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9354 "B<                         const struct timespec *>I<abstime>B<);>\n"
9355 msgstr ""
9356 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9357 "B<                         const struct timespec *>I<abstime>B<);>\n"
9358
9359 #. type: Plain text
9360 #: build/C/man3/pthread_tryjoin_np.3:46
9361 msgid ""
9362 "These functions operate in the same way as B<pthread_join>(3), except for "
9363 "the differences described on this page."
9364 msgstr ""
9365 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9366 "このページで説明する違いがある。"
9367
9368 #. type: Plain text
9369 #: build/C/man3/pthread_tryjoin_np.3:58
9370 msgid ""
9371 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9372 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9373 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9374 "B<pthread_join>(3), the call returns an error."
9375 msgstr ""
9376 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9377 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9378 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9379 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9380
9381 #. type: Plain text
9382 #: build/C/man3/pthread_tryjoin_np.3:76
9383 msgid ""
9384 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9385 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9386 "specified in I<abstime>.  If the timeout expires before I<thread> "
9387 "terminates, the call returns an error.  The I<abstime> argument is a "
9388 "structure of the following form, specifying an absolute time measured since "
9389 "the Epoch (see B<time>(2)):"
9390 msgstr ""
9391 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9392 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9393 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9394 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9395 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9396
9397 #. type: Plain text
9398 #: build/C/man3/pthread_tryjoin_np.3:83
9399 #, no-wrap
9400 msgid ""
9401 "struct timespec {\n"
9402 "    time_t tv_sec;     /* seconds */\n"
9403 "    long   tv_nsec;    /* nanoseconds */\n"
9404 "};\n"
9405 msgstr ""
9406 "struct timespec {\n"
9407 "    time_t tv_sec;     /* seconds */\n"
9408 "    long   tv_nsec;    /* nanoseconds */\n"
9409 "};\n"
9410
9411 #. type: Plain text
9412 #: build/C/man3/pthread_tryjoin_np.3:89
9413 msgid ""
9414 "On success, these functions return 0; on error, they return an error number."
9415 msgstr ""
9416 "成功すると、これらの関数は 0 を返す。\n"
9417 "エラーの場合、エラー番号を返す。"
9418
9419 #. type: Plain text
9420 #: build/C/man3/pthread_tryjoin_np.3:94
9421 msgid ""
9422 "These functions can fail with the same errors as B<pthread_join>(3).  "
9423 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9424 msgstr ""
9425 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9426 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9427
9428 #. type: TP
9429 #: build/C/man3/pthread_tryjoin_np.3:94
9430 #, no-wrap
9431 msgid "B<EBUSY>"
9432 msgstr "B<EBUSY>"
9433
9434 #. type: Plain text
9435 #: build/C/man3/pthread_tryjoin_np.3:98
9436 msgid "I<thread> had not yet terminated at the time of the call."
9437 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9438
9439 #. type: Plain text
9440 #: build/C/man3/pthread_tryjoin_np.3:101
9441 msgid ""
9442 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9443 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9444
9445 #. type: TP
9446 #: build/C/man3/pthread_tryjoin_np.3:101
9447 #, no-wrap
9448 msgid "B<ETIMEDOUT>"
9449 msgstr "B<ETIMEDOUT>"
9450
9451 #. type: Plain text
9452 #: build/C/man3/pthread_tryjoin_np.3:106
9453 msgid "The call timed out before I<thread> terminated."
9454 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9455
9456 #. type: Plain text
9457 #: build/C/man3/pthread_tryjoin_np.3:110
9458 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9459 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9460
9461 #. type: Plain text
9462 #: build/C/man3/pthread_tryjoin_np.3:112
9463 msgid "These functions first appeared in glibc in version 2.3.3."
9464 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9465
9466 #. type: Plain text
9467 #: build/C/man3/pthread_tryjoin_np.3:117
9468 msgid "The following code waits to join for up to 5 seconds:"
9469 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9470
9471 #. type: Plain text
9472 #: build/C/man3/pthread_tryjoin_np.3:121
9473 #, no-wrap
9474 msgid ""
9475 "    struct timespec ts;\n"
9476 "    int s;\n"
9477 msgstr ""
9478 "    struct timespec ts;\n"
9479 "    int s;\n"
9480
9481 #. type: Plain text
9482 #: build/C/man3/pthread_tryjoin_np.3:123
9483 #, no-wrap
9484 msgid "    ...\n"
9485 msgstr "    ...\n"
9486
9487 #. type: Plain text
9488 #: build/C/man3/pthread_tryjoin_np.3:127
9489 #, no-wrap
9490 msgid ""
9491 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9492 "\t/* Handle error */\n"
9493 "    }\n"
9494 msgstr ""
9495 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9496 "\t/* Handle error */\n"
9497 "    }\n"
9498
9499 #. type: Plain text
9500 #: build/C/man3/pthread_tryjoin_np.3:129
9501 #, no-wrap
9502 msgid "    ts.tv_sec += 5;\n"
9503 msgstr "    ts.tv_sec += 5;\n"
9504
9505 #. type: Plain text
9506 #: build/C/man3/pthread_tryjoin_np.3:134
9507 #, no-wrap
9508 msgid ""
9509 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9510 "    if (s != 0) {\n"
9511 "        /* Handle error */\n"
9512 "    }\n"
9513 msgstr ""
9514 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9515 "    if (s != 0) {\n"
9516 "        /* Handle error */\n"
9517 "    }\n"
9518
9519 #. type: Plain text
9520 #: build/C/man3/pthread_tryjoin_np.3:140
9521 msgid ""
9522 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9523 msgstr ""
9524 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9525
9526 #. type: TH
9527 #: build/C/man3/pthread_yield.3:25
9528 #, no-wrap
9529 msgid "PTHREAD_YIELD"
9530 msgstr "PTHREAD_YIELD"
9531
9532 #. type: TH
9533 #: build/C/man3/pthread_yield.3:25
9534 #, no-wrap
9535 msgid "2013-03-05"
9536 msgstr "2013-03-05"
9537
9538 #. type: Plain text
9539 #: build/C/man3/pthread_yield.3:28
9540 msgid "pthread_yield - yield the processor"
9541 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9542
9543 #. type: Plain text
9544 #: build/C/man3/pthread_yield.3:34
9545 #, no-wrap
9546 msgid "B<int pthread_yield(void);>\n"
9547 msgstr "B<int pthread_yield(void);>\n"
9548
9549 #. type: Plain text
9550 #: build/C/man3/pthread_yield.3:44
9551 msgid ""
9552 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9553 "thread is placed at the end of the run queue for its static priority and "
9554 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9555 "(2)"
9556 msgstr ""
9557 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9558 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9559 "別のスレッドが実行されるようにスケジューリングされる。\n"
9560 "詳細は B<sched_yield>(2) を参照。"
9561
9562 #. type: Plain text
9563 #: build/C/man3/pthread_yield.3:49
9564 msgid ""
9565 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9566 "number."
9567 msgstr ""
9568 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9569 "エラーの場合、エラー番号を返す。"
9570
9571 #. type: Plain text
9572 #: build/C/man3/pthread_yield.3:53
9573 msgid ""
9574 "On Linux, this call always succeeds (but portable and future-proof "
9575 "applications should nevertheless handle a possible error return)."
9576 msgstr ""
9577 "Linux では、この関数の呼び出しは常に成功する\n"
9578 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9579 "正のエラーの返り値を処理するようにすべきである)。"
9580
9581 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9582 #. type: Plain text
9583 #: build/C/man3/pthread_yield.3:59
9584 msgid ""
9585 "This call is nonstandard, but present on several other systems.  Use the "
9586 "standardized B<sched_yield>(2)  instead."
9587 msgstr ""
9588 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9589 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9590
9591 #. type: Plain text
9592 #: build/C/man3/pthread_yield.3:62
9593 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9594 msgstr ""
9595 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9596
9597 #. type: Plain text
9598 #: build/C/man3/pthread_yield.3:66
9599 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9600 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9601
9602 #. type: TH
9603 #: build/C/man7/pthreads.7:26
9604 #, no-wrap
9605 msgid "PTHREADS"
9606 msgstr "PTHREADS"
9607
9608 #. type: TH
9609 #: build/C/man7/pthreads.7:26
9610 #, no-wrap
9611 msgid "2010-11-14"
9612 msgstr "2010-11-14"
9613
9614 #. type: Plain text
9615 #: build/C/man7/pthreads.7:29
9616 msgid "pthreads - POSIX threads"
9617 msgstr "pthreads - POSIX スレッド"
9618
9619 #. type: Plain text
9620 #: build/C/man7/pthreads.7:36
9621 msgid ""
9622 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9623 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9624 "can contain multiple threads, all of which are executing the same program.  "
9625 "These threads share the same global memory (data and heap segments), but "
9626 "each thread has its own stack (automatic variables)."
9627 msgstr ""
9628 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9629 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9630 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9631 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9632 "スレッドは自分専用のスタック (自動変数) を持つ。"
9633
9634 #. type: Plain text
9635 #: build/C/man7/pthreads.7:39
9636 msgid ""
9637 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9638 "these attributes are process-wide rather than per-thread):"
9639 msgstr ""
9640 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9641 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9642
9643 #. type: IP
9644 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9645 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9646 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9647 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9648 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9649 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9650 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9651 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9652 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9653 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9654 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9655 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9656 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9657 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9658 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9659 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9660 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9661 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9662 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9663 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9664 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9665 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9666 #: build/C/man7/pthreads.7:835
9667 #, no-wrap
9668 msgid "-"
9669 msgstr "-"
9670
9671 #. type: Plain text
9672 #: build/C/man7/pthreads.7:41
9673 msgid "process ID"
9674 msgstr "プロセス ID"
9675
9676 #. type: Plain text
9677 #: build/C/man7/pthreads.7:43
9678 msgid "parent process ID"
9679 msgstr "親プロセス ID"
9680
9681 #. type: Plain text
9682 #: build/C/man7/pthreads.7:45
9683 msgid "process group ID and session ID"
9684 msgstr "プロセスグループ ID とセッション ID"
9685
9686 #. type: Plain text
9687 #: build/C/man7/pthreads.7:47
9688 msgid "controlling terminal"
9689 msgstr "制御端末"
9690
9691 #. type: Plain text
9692 #: build/C/man7/pthreads.7:49
9693 msgid "user and group IDs"
9694 msgstr "ユーザ ID とグループ ID"
9695
9696 #. type: Plain text
9697 #: build/C/man7/pthreads.7:51
9698 msgid "open file descriptors"
9699 msgstr "オープンするファイルディスクリプタ"
9700
9701 #. type: Plain text
9702 #: build/C/man7/pthreads.7:54
9703 msgid "record locks (see B<fcntl>(2))"
9704 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9705
9706 #. type: Plain text
9707 #: build/C/man7/pthreads.7:56
9708 msgid "signal dispositions"
9709 msgstr "シグナルの配置"
9710
9711 #. type: Plain text
9712 #: build/C/man7/pthreads.7:59
9713 msgid "file mode creation mask (B<umask>(2))"
9714 msgstr "ファイルモード作成マスク (B<umask>(2))"
9715
9716 #. type: Plain text
9717 #: build/C/man7/pthreads.7:65
9718 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9719 msgstr ""
9720 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9721
9722 #. type: Plain text
9723 #: build/C/man7/pthreads.7:70
9724 msgid ""
9725 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9726 msgstr ""
9727 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9728
9729 #. type: Plain text
9730 #: build/C/man7/pthreads.7:73
9731 msgid "nice value (B<setpriority>(2))"
9732 msgstr "nice 値 (B<setpriority>(2))"
9733
9734 #. type: Plain text
9735 #: build/C/man7/pthreads.7:76
9736 msgid "resource limits (B<setrlimit>(2))"
9737 msgstr "リソース制限 (B<setrlimit>(2))"
9738
9739 #. type: Plain text
9740 #: build/C/man7/pthreads.7:81
9741 msgid ""
9742 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9743 "(B<getrusage>(2))"
9744 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9745
9746 #. type: Plain text
9747 #: build/C/man7/pthreads.7:84
9748 msgid ""
9749 "As well as the stack, POSIX.1 specifies that various other attributes are "
9750 "distinct for each thread, including:"
9751 msgstr ""
9752 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9753 "るかを規定している:"
9754
9755 #. type: Plain text
9756 #: build/C/man7/pthreads.7:88
9757 msgid "thread ID (the I<pthread_t> data type)"
9758 msgstr "スレッド ID (B<pthread_t> データ型)"
9759
9760 #. type: Plain text
9761 #: build/C/man7/pthreads.7:91
9762 msgid "signal mask (B<pthread_sigmask>(3))"
9763 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9764
9765 #. type: Plain text
9766 #: build/C/man7/pthreads.7:95
9767 msgid "the I<errno> variable"
9768 msgstr "I<errno> 変数"
9769
9770 #. type: Plain text
9771 #: build/C/man7/pthreads.7:98
9772 msgid "alternate signal stack (B<sigaltstack>(2))"
9773 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9774
9775 #. type: Plain text
9776 #: build/C/man7/pthreads.7:103
9777 msgid ""
9778 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9779 "B<sched_setparam>(2))"
9780 msgstr ""
9781 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9782 "と B<sched_setparam>(2))"
9783
9784 #. type: Plain text
9785 #: build/C/man7/pthreads.7:105
9786 msgid "The following Linux-specific features are also per-thread:"
9787 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9788
9789 #. type: Plain text
9790 #: build/C/man7/pthreads.7:108
9791 msgid "capabilities (see B<capabilities>(7))"
9792 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9793
9794 #. type: Plain text
9795 #: build/C/man7/pthreads.7:111
9796 msgid "CPU affinity (B<sched_setaffinity>(2))"
9797 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9798
9799 #. type: SS
9800 #: build/C/man7/pthreads.7:111
9801 #, no-wrap
9802 msgid "Pthreads function return values"
9803 msgstr "pthreads 関数の返り値"
9804
9805 #. type: Plain text
9806 #: build/C/man7/pthreads.7:118
9807 msgid ""
9808 "Most pthreads functions return 0 on success, and an error number of "
9809 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9810 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9811 "the function can never fail with the error B<EINTR>."
9812 msgstr ""
9813 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9814 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9815 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9816 "は決してないと規定している。"
9817
9818 #. type: SS
9819 #: build/C/man7/pthreads.7:118
9820 #, no-wrap
9821 msgid "Thread IDs"
9822 msgstr "スレッド ID"
9823
9824 #. type: Plain text
9825 #: build/C/man7/pthreads.7:132
9826 msgid ""
9827 "Each of the threads in a process has a unique thread identifier (stored in "
9828 "the type I<pthread_t>).  This identifier is returned to the caller of "
9829 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9830 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
9831 "within a process.  A thread ID may be reused after a terminated thread has "
9832 "been joined, or a detached thread has terminated.  In all pthreads functions "
9833 "that accept a thread ID as an argument, that ID by definition refers to a "
9834 "thread in the same process as the caller."
9835 msgstr ""
9836 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9837 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9838 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9839 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9840 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9841 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9842 "じプロセス内の一つのスレッドを参照する。"
9843
9844 #. type: SS
9845 #: build/C/man7/pthreads.7:132
9846 #, no-wrap
9847 msgid "Thread-safe functions"
9848 msgstr "スレッドセーフな関数"
9849
9850 #. type: Plain text
9851 #: build/C/man7/pthreads.7:136
9852 msgid ""
9853 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9854 "same results regardless of whether it is)  called from multiple threads at "
9855 "the same time."
9856 msgstr ""
9857 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9858 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9859
9860 #. type: Plain text
9861 #: build/C/man7/pthreads.7:140
9862 msgid ""
9863 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9864 "standard shall be thread-safe, except for the following functions:"
9865 msgstr ""
9866 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9867 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9868
9869 #. type: Plain text
9870 #: build/C/man7/pthreads.7:234
9871 #, no-wrap
9872 msgid ""
9873 "asctime()\n"
9874 "basename()\n"
9875 "catgets()\n"
9876 "crypt()\n"
9877 "ctermid() if passed a non-NULL argument\n"
9878 "ctime()\n"
9879 "dbm_clearerr()\n"
9880 "dbm_close()\n"
9881 "dbm_delete()\n"
9882 "dbm_error()\n"
9883 "dbm_fetch()\n"
9884 "dbm_firstkey()\n"
9885 "dbm_nextkey()\n"
9886 "dbm_open()\n"
9887 "dbm_store()\n"
9888 "dirname()\n"
9889 "dlerror()\n"
9890 "drand48()\n"
9891 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9892 "encrypt()\n"
9893 "endgrent()\n"
9894 "endpwent()\n"
9895 "endutxent()\n"
9896 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9897 "ftw()\n"
9898 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9899 "getc_unlocked()\n"
9900 "getchar_unlocked()\n"
9901 "getdate()\n"
9902 "getenv()\n"
9903 "getgrent()\n"
9904 "getgrgid()\n"
9905 "getgrnam()\n"
9906 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9907 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9908 "gethostent()\n"
9909 "getlogin()\n"
9910 "getnetbyaddr()\n"
9911 "getnetbyname()\n"
9912 "getnetent()\n"
9913 "getopt()\n"
9914 "getprotobyname()\n"
9915 "getprotobynumber()\n"
9916 "getprotoent()\n"
9917 "getpwent()\n"
9918 "getpwnam()\n"
9919 "getpwuid()\n"
9920 "getservbyname()\n"
9921 "getservbyport()\n"
9922 "getservent()\n"
9923 "getutxent()\n"
9924 "getutxid()\n"
9925 "getutxline()\n"
9926 "gmtime()\n"
9927 "hcreate()\n"
9928 "hdestroy()\n"
9929 "hsearch()\n"
9930 "inet_ntoa()\n"
9931 "l64a()\n"
9932 "lgamma()\n"
9933 "lgammaf()\n"
9934 "lgammal()\n"
9935 "localeconv()\n"
9936 "localtime()\n"
9937 "lrand48()\n"
9938 "mrand48()\n"
9939 "nftw()\n"
9940 "nl_langinfo()\n"
9941 "ptsname()\n"
9942 "putc_unlocked()\n"
9943 "putchar_unlocked()\n"
9944 "putenv()\n"
9945 "pututxline()\n"
9946 "rand()\n"
9947 "readdir()\n"
9948 "setenv()\n"
9949 "setgrent()\n"
9950 "setkey()\n"
9951 "setpwent()\n"
9952 "setutxent()\n"
9953 "strerror()\n"
9954 "strsignal() [Added in POSIX.1-2008]\n"
9955 "strtok()\n"
9956 "system() [Added in POSIX.1-2008]\n"
9957 "tmpnam() if passed a non-NULL argument\n"
9958 "ttyname()\n"
9959 "unsetenv()\n"
9960 "wcrtomb() if its final argument is NULL\n"
9961 "wcsrtombs() if its final argument is NULL\n"
9962 "wcstombs()\n"
9963 "wctomb()\n"
9964 msgstr ""
9965 "asctime()\n"
9966 "basename()\n"
9967 "catgets()\n"
9968 "crypt()\n"
9969 "ctermid() (NULL でない引き数を渡された場合)\n"
9970 "ctime()\n"
9971 "dbm_clearerr()\n"
9972 "dbm_close()\n"
9973 "dbm_delete()\n"
9974 "dbm_error()\n"
9975 "dbm_fetch()\n"
9976 "dbm_firstkey()\n"
9977 "dbm_nextkey()\n"
9978 "dbm_open()\n"
9979 "dbm_store()\n"
9980 "dirname()\n"
9981 "dlerror()\n"
9982 "drand48()\n"
9983 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9984 "encrypt()\n"
9985 "endgrent()\n"
9986 "endpwent()\n"
9987 "endutxent()\n"
9988 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9989 "ftw()\n"
9990 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9991 "getc_unlocked()\n"
9992 "getchar_unlocked()\n"
9993 "getdate()\n"
9994 "getenv()\n"
9995 "getgrent()\n"
9996 "getgrgid()\n"
9997 "getgrnam()\n"
9998 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
9999 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10000 "gethostent()\n"
10001 "getlogin()\n"
10002 "getnetbyaddr()\n"
10003 "getnetbyname()\n"
10004 "getnetent()\n"
10005 "getopt()\n"
10006 "getprotobyname()\n"
10007 "getprotobynumber()\n"
10008 "getprotoent()\n"
10009 "getpwent()\n"
10010 "getpwnam()\n"
10011 "getpwuid()\n"
10012 "getservbyname()\n"
10013 "getservbyport()\n"
10014 "getservent()\n"
10015 "getutxent()\n"
10016 "getutxid()\n"
10017 "getutxline()\n"
10018 "gmtime()\n"
10019 "hcreate()\n"
10020 "hdestroy()\n"
10021 "hsearch()\n"
10022 "inet_ntoa()\n"
10023 "l64a()\n"
10024 "lgamma()\n"
10025 "lgammaf()\n"
10026 "lgammal()\n"
10027 "localeconv()\n"
10028 "localtime()\n"
10029 "lrand48()\n"
10030 "mrand48()\n"
10031 "nftw()\n"
10032 "nl_langinfo()\n"
10033 "ptsname()\n"
10034 "putc_unlocked()\n"
10035 "putchar_unlocked()\n"
10036 "putenv()\n"
10037 "pututxline()\n"
10038 "rand()\n"
10039 "readdir()\n"
10040 "setenv()\n"
10041 "setgrent()\n"
10042 "setkey()\n"
10043 "setpwent()\n"
10044 "setutxent()\n"
10045 "strerror()\n"
10046 "strsignal() [POSIX.1-2008 で追加された]\n"
10047 "strtok()\n"
10048 "system() [POSIX.1-2008 で追加された]\n"
10049 "tmpnam() (NULL でない引き数を渡された場合)\n"
10050 "ttyname()\n"
10051 "unsetenv()\n"
10052 "wcrtomb() (最後の引き数が NULL の場合)\n"
10053 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10054 "wcstombs()\n"
10055 "wctomb()\n"
10056
10057 #. type: SS
10058 #: build/C/man7/pthreads.7:236
10059 #, no-wrap
10060 msgid "Async-cancel-safe functions"
10061 msgstr "async-cancel-safe 関数"
10062
10063 #. type: Plain text
10064 #: build/C/man7/pthreads.7:240
10065 msgid ""
10066 "An async-cancel-safe function is one that can be safely called in an "
10067 "application where asynchronous cancelability is enabled (see "
10068 "B<pthread_setcancelstate>(3))."
10069 msgstr ""
10070 "async-cancel-safe 関数は、\n"
10071 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10072 "安全に呼び出すことができる関数のことである\n"
10073 "(B<pthread_setcancelstate>(3) を参照)。"
10074
10075 #. type: Plain text
10076 #: build/C/man7/pthreads.7:243
10077 msgid ""
10078 "Only the following functions are required to be async-cancel-safe by "
10079 "POSIX.1-2001 and POSIX.1-2008:"
10080 msgstr ""
10081 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10082 "なければならないとされている。"
10083
10084 #. type: Plain text
10085 #: build/C/man7/pthreads.7:249
10086 #, no-wrap
10087 msgid ""
10088 "pthread_cancel()\n"
10089 "pthread_setcancelstate()\n"
10090 "pthread_setcanceltype()\n"
10091 msgstr ""
10092 "pthread_cancel()\n"
10093 "pthread_setcancelstate()\n"
10094 "pthread_setcanceltype()\n"
10095
10096 #. type: SS
10097 #: build/C/man7/pthreads.7:251
10098 #, no-wrap
10099 msgid "Cancellation points"
10100 msgstr "取り消しポイント (cancellation points)"
10101
10102 #. type: Plain text
10103 #: build/C/man7/pthreads.7:258
10104 msgid ""
10105 "POSIX.1 specifies that certain functions must, and certain other functions "
10106 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10107 "type is deferred, and a cancellation request is pending for the thread, then "
10108 "the thread is canceled when it calls a function that is a cancellation point."
10109 msgstr ""
10110 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10111 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10112 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10113 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10114 "時点で、そのスレッドのキャンセルが 行われる。"
10115
10116 #. type: Plain text
10117 #: build/C/man7/pthreads.7:261
10118 msgid ""
10119 "The following functions are required to be cancellation points by "
10120 "POSIX.1-2001 and/or POSIX.1-2008:"
10121 msgstr ""
10122 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10123 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10124
10125 #. type: Plain text
10126 #: build/C/man7/pthreads.7:324
10127 #, no-wrap
10128 msgid ""
10129 "accept()\n"
10130 "aio_suspend()\n"
10131 "clock_nanosleep()\n"
10132 "close()\n"
10133 "connect()\n"
10134 "creat()\n"
10135 "fcntl() F_SETLKW\n"
10136 "fdatasync()\n"
10137 "fsync()\n"
10138 "getmsg()\n"
10139 "getpmsg()\n"
10140 "lockf() F_LOCK\n"
10141 "mq_receive()\n"
10142 "mq_send()\n"
10143 "mq_timedreceive()\n"
10144 "mq_timedsend()\n"
10145 "msgrcv()\n"
10146 "msgsnd()\n"
10147 "msync()\n"
10148 "nanosleep()\n"
10149 "open()\n"
10150 "openat() [Added in POSIX.1-2008]\n"
10151 "pause()\n"
10152 "poll()\n"
10153 "pread()\n"
10154 "pselect()\n"
10155 "pthread_cond_timedwait()\n"
10156 "pthread_cond_wait()\n"
10157 "pthread_join()\n"
10158 "pthread_testcancel()\n"
10159 "putmsg()\n"
10160 "putpmsg()\n"
10161 "pwrite()\n"
10162 "read()\n"
10163 "readv()\n"
10164 "recv()\n"
10165 "recvfrom()\n"
10166 "recvmsg()\n"
10167 "select()\n"
10168 "sem_timedwait()\n"
10169 "sem_wait()\n"
10170 "send()\n"
10171 "sendmsg()\n"
10172 "sendto()\n"
10173 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10174 "sigsuspend()\n"
10175 "sigtimedwait()\n"
10176 "sigwait()\n"
10177 "sigwaitinfo()\n"
10178 "sleep()\n"
10179 "system()\n"
10180 "tcdrain()\n"
10181 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10182 "wait()\n"
10183 "waitid()\n"
10184 "waitpid()\n"
10185 "write()\n"
10186 "writev()\n"
10187 msgstr ""
10188 "accept()\n"
10189 "aio_suspend()\n"
10190 "clock_nanosleep()\n"
10191 "close()\n"
10192 "connect()\n"
10193 "creat()\n"
10194 "fcntl() F_SETLKW\n"
10195 "fdatasync()\n"
10196 "fsync()\n"
10197 "getmsg()\n"
10198 "getpmsg()\n"
10199 "lockf() F_LOCK\n"
10200 "mq_receive()\n"
10201 "mq_send()\n"
10202 "mq_timedreceive()\n"
10203 "mq_timedsend()\n"
10204 "msgrcv()\n"
10205 "msgsnd()\n"
10206 "msync()\n"
10207 "nanosleep()\n"
10208 "open()\n"
10209 "openat() [POSIX.1-2008 で追加された]\n"
10210 "pause()\n"
10211 "poll()\n"
10212 "pread()\n"
10213 "pselect()\n"
10214 "pthread_cond_timedwait()\n"
10215 "pthread_cond_wait()\n"
10216 "pthread_join()\n"
10217 "pthread_testcancel()\n"
10218 "putmsg()\n"
10219 "putpmsg()\n"
10220 "pwrite()\n"
10221 "read()\n"
10222 "readv()\n"
10223 "recv()\n"
10224 "recvfrom()\n"
10225 "recvmsg()\n"
10226 "select()\n"
10227 "sem_timedwait()\n"
10228 "sem_wait()\n"
10229 "send()\n"
10230 "sendmsg()\n"
10231 "sendto()\n"
10232 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10233 "sigsuspend()\n"
10234 "sigtimedwait()\n"
10235 "sigwait()\n"
10236 "sigwaitinfo()\n"
10237 "sleep()\n"
10238 "system()\n"
10239 "tcdrain()\n"
10240 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10241 "wait()\n"
10242 "waitid()\n"
10243 "waitpid()\n"
10244 "write()\n"
10245 "writev()\n"
10246
10247 #. type: Plain text
10248 #: build/C/man7/pthreads.7:329
10249 msgid ""
10250 "The following functions may be cancellation points according to POSIX.1-2001 "
10251 "and/or POSIX.1-2008:"
10252 msgstr ""
10253 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10254 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10255
10256 #. type: Plain text
10257 #: build/C/man7/pthreads.7:557
10258 #, no-wrap
10259 msgid ""
10260 "access()\n"
10261 "asctime()\n"
10262 "asctime_r()\n"
10263 "catclose()\n"
10264 "catgets()\n"
10265 "catopen()\n"
10266 "chmod() [Added in POSIX.1-2008]\n"
10267 "chown() [Added in POSIX.1-2008]\n"
10268 "closedir()\n"
10269 "closelog()\n"
10270 "ctermid()\n"
10271 "ctime()\n"
10272 "ctime_r()\n"
10273 "dbm_close()\n"
10274 "dbm_delete()\n"
10275 "dbm_fetch()\n"
10276 "dbm_nextkey()\n"
10277 "dbm_open()\n"
10278 "dbm_store()\n"
10279 "dlclose()\n"
10280 "dlopen()\n"
10281 "dprintf() [Added in POSIX.1-2008]\n"
10282 "endgrent()\n"
10283 "endhostent()\n"
10284 "endnetent()\n"
10285 "endprotoent()\n"
10286 "endpwent()\n"
10287 "endservent()\n"
10288 "endutxent()\n"
10289 "faccessat() [Added in POSIX.1-2008]\n"
10290 "fchmod() [Added in POSIX.1-2008]\n"
10291 "fchmodat() [Added in POSIX.1-2008]\n"
10292 "fchown() [Added in POSIX.1-2008]\n"
10293 "fchownat() [Added in POSIX.1-2008]\n"
10294 "fclose()\n"
10295 "fcntl() (for any value of cmd argument)\n"
10296 "fflush()\n"
10297 "fgetc()\n"
10298 "fgetpos()\n"
10299 "fgets()\n"
10300 "fgetwc()\n"
10301 "fgetws()\n"
10302 "fmtmsg()\n"
10303 "fopen()\n"
10304 "fpathconf()\n"
10305 "fprintf()\n"
10306 "fputc()\n"
10307 "fputs()\n"
10308 "fputwc()\n"
10309 "fputws()\n"
10310 "fread()\n"
10311 "freopen()\n"
10312 "fscanf()\n"
10313 "fseek()\n"
10314 "fseeko()\n"
10315 "fsetpos()\n"
10316 "fstat()\n"
10317 "fstatat() [Added in POSIX.1-2008]\n"
10318 "ftell()\n"
10319 "ftello()\n"
10320 "ftw()\n"
10321 "futimens() [Added in POSIX.1-2008]\n"
10322 "fwprintf()\n"
10323 "fwrite()\n"
10324 "fwscanf()\n"
10325 "getaddrinfo()\n"
10326 "getc()\n"
10327 "getc_unlocked()\n"
10328 "getchar()\n"
10329 "getchar_unlocked()\n"
10330 "getcwd()\n"
10331 "getdate()\n"
10332 "getdelim() [Added in POSIX.1-2008]\n"
10333 "getgrent()\n"
10334 "getgrgid()\n"
10335 "getgrgid_r()\n"
10336 "getgrnam()\n"
10337 "getgrnam_r()\n"
10338 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10339 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10340 "gethostent()\n"
10341 "gethostid()\n"
10342 "gethostname()\n"
10343 "getline() [Added in POSIX.1-2008]\n"
10344 "getlogin()\n"
10345 "getlogin_r()\n"
10346 "getnameinfo()\n"
10347 "getnetbyaddr()\n"
10348 "getnetbyname()\n"
10349 "getnetent()\n"
10350 "getopt() (if opterr is nonzero)\n"
10351 "getprotobyname()\n"
10352 "getprotobynumber()\n"
10353 "getprotoent()\n"
10354 "getpwent()\n"
10355 "getpwnam()\n"
10356 "getpwnam_r()\n"
10357 "getpwuid()\n"
10358 "getpwuid_r()\n"
10359 "gets()\n"
10360 "getservbyname()\n"
10361 "getservbyport()\n"
10362 "getservent()\n"
10363 "getutxent()\n"
10364 "getutxid()\n"
10365 "getutxline()\n"
10366 "getwc()\n"
10367 "getwchar()\n"
10368 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10369 "glob()\n"
10370 "iconv_close()\n"
10371 "iconv_open()\n"
10372 "ioctl()\n"
10373 "link()\n"
10374 "linkat() [Added in POSIX.1-2008]\n"
10375 "lio_listio() [Added in POSIX.1-2008]\n"
10376 "localtime()\n"
10377 "localtime_r()\n"
10378 "lockf() [Added in POSIX.1-2008]\n"
10379 "lseek()\n"
10380 "lstat()\n"
10381 "mkdir() [Added in POSIX.1-2008]\n"
10382 "mkdirat() [Added in POSIX.1-2008]\n"
10383 "mkdtemp() [Added in POSIX.1-2008]\n"
10384 "mkfifo() [Added in POSIX.1-2008]\n"
10385 "mkfifoat() [Added in POSIX.1-2008]\n"
10386 "mknod() [Added in POSIX.1-2008]\n"
10387 "mknodat() [Added in POSIX.1-2008]\n"
10388 "mkstemp()\n"
10389 "mktime()\n"
10390 "nftw()\n"
10391 "opendir()\n"
10392 "openlog()\n"
10393 "pathconf()\n"
10394 "pclose()\n"
10395 "perror()\n"
10396 "popen()\n"
10397 "posix_fadvise()\n"
10398 "posix_fallocate()\n"
10399 "posix_madvise()\n"
10400 "posix_openpt()\n"
10401 "posix_spawn()\n"
10402 "posix_spawnp()\n"
10403 "posix_trace_clear()\n"
10404 "posix_trace_close()\n"
10405 "posix_trace_create()\n"
10406 "posix_trace_create_withlog()\n"
10407 "posix_trace_eventtypelist_getnext_id()\n"
10408 "posix_trace_eventtypelist_rewind()\n"
10409 "posix_trace_flush()\n"
10410 "posix_trace_get_attr()\n"
10411 "posix_trace_get_filter()\n"
10412 "posix_trace_get_status()\n"
10413 "posix_trace_getnext_event()\n"
10414 "posix_trace_open()\n"
10415 "posix_trace_rewind()\n"
10416 "posix_trace_set_filter()\n"
10417 "posix_trace_shutdown()\n"
10418 "posix_trace_timedgetnext_event()\n"
10419 "posix_typed_mem_open()\n"
10420 "printf()\n"
10421 "psiginfo() [Added in POSIX.1-2008]\n"
10422 "psignal() [Added in POSIX.1-2008]\n"
10423 "pthread_rwlock_rdlock()\n"
10424 "pthread_rwlock_timedrdlock()\n"
10425 "pthread_rwlock_timedwrlock()\n"
10426 "pthread_rwlock_wrlock()\n"
10427 "putc()\n"
10428 "putc_unlocked()\n"
10429 "putchar()\n"
10430 "putchar_unlocked()\n"
10431 "puts()\n"
10432 "pututxline()\n"
10433 "putwc()\n"
10434 "putwchar()\n"
10435 "readdir()\n"
10436 "readdir_r()\n"
10437 "readlink() [Added in POSIX.1-2008]\n"
10438 "readlinkat() [Added in POSIX.1-2008]\n"
10439 "remove()\n"
10440 "rename()\n"
10441 "renameat() [Added in POSIX.1-2008]\n"
10442 "rewind()\n"
10443 "rewinddir()\n"
10444 "scandir() [Added in POSIX.1-2008]\n"
10445 "scanf()\n"
10446 "seekdir()\n"
10447 "semop()\n"
10448 "setgrent()\n"
10449 "sethostent()\n"
10450 "setnetent()\n"
10451 "setprotoent()\n"
10452 "setpwent()\n"
10453 "setservent()\n"
10454 "setutxent()\n"
10455 "sigpause() [Added in POSIX.1-2008]\n"
10456 "stat()\n"
10457 "strerror()\n"
10458 "strerror_r()\n"
10459 "strftime()\n"
10460 "symlink()\n"
10461 "symlinkat() [Added in POSIX.1-2008]\n"
10462 "sync()\n"
10463 "syslog()\n"
10464 "tmpfile()\n"
10465 "tmpnam()\n"
10466 "ttyname()\n"
10467 "ttyname_r()\n"
10468 "tzset()\n"
10469 "ungetc()\n"
10470 "ungetwc()\n"
10471 "unlink()\n"
10472 "unlinkat() [Added in POSIX.1-2008]\n"
10473 "utime() [Added in POSIX.1-2008]\n"
10474 "utimensat() [Added in POSIX.1-2008]\n"
10475 "utimes() [Added in POSIX.1-2008]\n"
10476 "vdprintf() [Added in POSIX.1-2008]\n"
10477 "vfprintf()\n"
10478 "vfwprintf()\n"
10479 "vprintf()\n"
10480 "vwprintf()\n"
10481 "wcsftime()\n"
10482 "wordexp()\n"
10483 "wprintf()\n"
10484 "wscanf()\n"
10485 msgstr ""
10486 "access()\n"
10487 "asctime()\n"
10488 "asctime_r()\n"
10489 "catclose()\n"
10490 "catgets()\n"
10491 "catopen()\n"
10492 "chmod() [POSIX.1-2008 で追加された]\n"
10493 "chown() [POSIX.1-2008 で追加された]\n"
10494 "closedir()\n"
10495 "closelog()\n"
10496 "ctermid()\n"
10497 "ctime()\n"
10498 "ctime_r()\n"
10499 "dbm_close()\n"
10500 "dbm_delete()\n"
10501 "dbm_fetch()\n"
10502 "dbm_nextkey()\n"
10503 "dbm_open()\n"
10504 "dbm_store()\n"
10505 "dlclose()\n"
10506 "dlopen()\n"
10507 "dprintf() [POSIX.1-2008 で追加された]\n"
10508 "endgrent()\n"
10509 "endhostent()\n"
10510 "endnetent()\n"
10511 "endprotoent()\n"
10512 "endpwent()\n"
10513 "endservent()\n"
10514 "endutxent()\n"
10515 "faccessat() [POSIX.1-2008 で追加された]\n"
10516 "fchmod() [POSIX.1-2008 で追加された]\n"
10517 "fchmodat() [POSIX.1-2008 で追加された]\n"
10518 "fchown() [POSIX.1-2008 で追加された]\n"
10519 "fchownat() [POSIX.1-2008 で追加された]\n"
10520 "fclose()\n"
10521 "fcntl() (cmd 引き数が何であっても)\n"
10522 "fflush()\n"
10523 "fgetc()\n"
10524 "fgetpos()\n"
10525 "fgets()\n"
10526 "fgetwc()\n"
10527 "fgetws()\n"
10528 "fmtmsg()\n"
10529 "fopen()\n"
10530 "fpathconf()\n"
10531 "fprintf()\n"
10532 "fputc()\n"
10533 "fputs()\n"
10534 "fputwc()\n"
10535 "fputws()\n"
10536 "fread()\n"
10537 "freopen()\n"
10538 "fscanf()\n"
10539 "fseek()\n"
10540 "fseeko()\n"
10541 "fsetpos()\n"
10542 "fstat()\n"
10543 "fstatat() [POSIX.1-2008 で追加された]\n"
10544 "ftell()\n"
10545 "ftello()\n"
10546 "ftw()\n"
10547 "futimens() [POSIX.1-2008 で追加された]\n"
10548 "fwprintf()\n"
10549 "fwrite()\n"
10550 "fwscanf()\n"
10551 "getaddrinfo()\n"
10552 "getc()\n"
10553 "getc_unlocked()\n"
10554 "getchar()\n"
10555 "getchar_unlocked()\n"
10556 "getcwd()\n"
10557 "getdate()\n"
10558 "getdelim() [POSIX.1-2008 で追加された]\n"
10559 "getgrent()\n"
10560 "getgrgid()\n"
10561 "getgrgid_r()\n"
10562 "getgrnam()\n"
10563 "getgrnam_r()\n"
10564 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10565 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10566 "gethostent()\n"
10567 "gethostid()\n"
10568 "gethostname()\n"
10569 "getline() [POSIX.1-2008 で追加された]\n"
10570 "getlogin()\n"
10571 "getlogin_r()\n"
10572 "getnameinfo()\n"
10573 "getnetbyaddr()\n"
10574 "getnetbyname()\n"
10575 "getnetent()\n"
10576 "getopt() (opterr が 0 以外の場合)\n"
10577 "getprotobyname()\n"
10578 "getprotobynumber()\n"
10579 "getprotoent()\n"
10580 "getpwent()\n"
10581 "getpwnam()\n"
10582 "getpwnam_r()\n"
10583 "getpwuid()\n"
10584 "getpwuid_r()\n"
10585 "gets()\n"
10586 "getservbyname()\n"
10587 "getservbyport()\n"
10588 "getservent()\n"
10589 "getutxent()\n"
10590 "getutxid()\n"
10591 "getutxline()\n"
10592 "getwc()\n"
10593 "getwchar()\n"
10594 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10595 "glob()\n"
10596 "iconv_close()\n"
10597 "iconv_open()\n"
10598 "ioctl()\n"
10599 "link()\n"
10600 "linkat() [POSIX.1-2008 で追加された]\n"
10601 "lio_listio() [POSIX.1-2008 で追加された]\n"
10602 "localtime()\n"
10603 "localtime_r()\n"
10604 "lockf() [POSIX.1-2008 で追加された]\n"
10605 "lseek()\n"
10606 "lstat()\n"
10607 "mkdir() [POSIX.1-2008 で追加された]\n"
10608 "mkdirat() [POSIX.1-2008 で追加された]\n"
10609 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10610 "mkfifo() [POSIX.1-2008 で追加された]\n"
10611 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10612 "mknod() [POSIX.1-2008 で追加された]\n"
10613 "mknodat() [POSIX.1-2008 で追加された]\n"
10614 "mkstemp()\n"
10615 "mktime()\n"
10616 "nftw()\n"
10617 "opendir()\n"
10618 "openlog()\n"
10619 "pathconf()\n"
10620 "pclose()\n"
10621 "perror()\n"
10622 "popen()\n"
10623 "posix_fadvise()\n"
10624 "posix_fallocate()\n"
10625 "posix_madvise()\n"
10626 "posix_openpt()\n"
10627 "posix_spawn()\n"
10628 "posix_spawnp()\n"
10629 "posix_trace_clear()\n"
10630 "posix_trace_close()\n"
10631 "posix_trace_create()\n"
10632 "posix_trace_create_withlog()\n"
10633 "posix_trace_eventtypelist_getnext_id()\n"
10634 "posix_trace_eventtypelist_rewind()\n"
10635 "posix_trace_flush()\n"
10636 "posix_trace_get_attr()\n"
10637 "posix_trace_get_filter()\n"
10638 "posix_trace_get_status()\n"
10639 "posix_trace_getnext_event()\n"
10640 "posix_trace_open()\n"
10641 "posix_trace_rewind()\n"
10642 "posix_trace_set_filter()\n"
10643 "posix_trace_shutdown()\n"
10644 "posix_trace_timedgetnext_event()\n"
10645 "posix_typed_mem_open()\n"
10646 "printf()\n"
10647 "psiginfo() [POSIX.1-2008 で追加された]\n"
10648 "psignal() [POSIX.1-2008 で追加された]\n"
10649 "pthread_rwlock_rdlock()\n"
10650 "pthread_rwlock_timedrdlock()\n"
10651 "pthread_rwlock_timedwrlock()\n"
10652 "pthread_rwlock_wrlock()\n"
10653 "putc()\n"
10654 "putc_unlocked()\n"
10655 "putchar()\n"
10656 "putchar_unlocked()\n"
10657 "puts()\n"
10658 "pututxline()\n"
10659 "putwc()\n"
10660 "putwchar()\n"
10661 "readdir()\n"
10662 "readdir_r()\n"
10663 "readlink() [POSIX.1-2008 で追加された]\n"
10664 "readlinkat() [POSIX.1-2008 で追加された]\n"
10665 "remove()\n"
10666 "rename()\n"
10667 "renameat() [POSIX.1-2008 で追加された]\n"
10668 "rewind()\n"
10669 "rewinddir()\n"
10670 "scandir() [POSIX.1-2008 で追加された]\n"
10671 "scanf()\n"
10672 "seekdir()\n"
10673 "semop()\n"
10674 "setgrent()\n"
10675 "sethostent()\n"
10676 "setnetent()\n"
10677 "setprotoent()\n"
10678 "setpwent()\n"
10679 "setservent()\n"
10680 "setutxent()\n"
10681 "sigpause() [POSIX.1-2008 で追加された]\n"
10682 "stat()\n"
10683 "strerror()\n"
10684 "strerror_r()\n"
10685 "strftime()\n"
10686 "symlink()\n"
10687 "symlinkat() [POSIX.1-2008 で追加された]\n"
10688 "sync()\n"
10689 "syslog()\n"
10690 "tmpfile()\n"
10691 "tmpnam()\n"
10692 "ttyname()\n"
10693 "ttyname_r()\n"
10694 "tzset()\n"
10695 "ungetc()\n"
10696 "ungetwc()\n"
10697 "unlink()\n"
10698 "unlinkat() [POSIX.1-2008 で追加された]\n"
10699 "utime() [POSIX.1-2008 で追加された]\n"
10700 "utimensat() [POSIX.1-2008 で追加された]\n"
10701 "utimes() [POSIX.1-2008 で追加された]\n"
10702 "vdprintf() [POSIX.1-2008 で追加された]\n"
10703 "vfprintf()\n"
10704 "vfwprintf()\n"
10705 "vprintf()\n"
10706 "vwprintf()\n"
10707 "wcsftime()\n"
10708 "wordexp()\n"
10709 "wprintf()\n"
10710 "wscanf()\n"
10711
10712 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10713 #.  files, it looks as though at least the following nonstandard
10714 #.  functions are cancellation points:
10715 #.  endnetgrent
10716 #.  endspent
10717 #.  epoll_pwait
10718 #.  epoll_wait
10719 #.  fcloseall
10720 #.  fdopendir
10721 #.  fflush_unlocked
10722 #.  fgetc_unlocked
10723 #.  fgetgrent
10724 #.  fgetgrent_r
10725 #.  fgetpwent
10726 #.  fgetpwent_r
10727 #.  fgets_unlocked
10728 #.  fgetspent
10729 #.  fgetspent_r
10730 #.  fgetwc_unlocked
10731 #.  fgetws_unlocked
10732 #.  fputc_unlocked
10733 #.  fputs_unlocked
10734 #.  fputwc_unlocked
10735 #.  fputws_unlocked
10736 #.  fread_unlocked
10737 #.  fwrite_unlocked
10738 #.  gai_suspend
10739 #.  getaddrinfo_a
10740 #.  getdate_r
10741 #.  getgrent_r
10742 #.  getgrouplist
10743 #.  gethostbyaddr_r
10744 #.  gethostbyname2
10745 #.  gethostbyname2_r
10746 #.  gethostbyname_r
10747 #.  gethostent_r
10748 #.  getnetbyaddr_r
10749 #.  getnetbyname_r
10750 #.  getnetent_r
10751 #.  getnetgrent
10752 #.  getnetgrent_r
10753 #.  getprotobyname_r
10754 #.  getprotobynumber_r
10755 #.  getprotoent_r
10756 #.  getpw
10757 #.  getpwent_r
10758 #.  getservbyname_r
10759 #.  getservbyport_r
10760 #.  getservent_r
10761 #.  getspent
10762 #.  getspent_r
10763 #.  getspnam
10764 #.  getspnam_r
10765 #.  getutmp
10766 #.  getutmpx
10767 #.  getw
10768 #.  getwc_unlocked
10769 #.  getwchar_unlocked
10770 #.  initgroups
10771 #.  innetgr
10772 #.  mkostemp
10773 #.  mkostemp64
10774 #.  mkstemp64
10775 #.  ppoll
10776 #.  pthread_timedjoin_np
10777 #.  putgrent
10778 #.  putpwent
10779 #.  putspent
10780 #.  putw
10781 #.  putwc_unlocked
10782 #.  putwchar_unlocked
10783 #.  rcmd
10784 #.  rcmd_af
10785 #.  rexec
10786 #.  rexec_af
10787 #.  rresvport
10788 #.  rresvport_af
10789 #.  ruserok
10790 #.  ruserok_af
10791 #.  setnetgrent
10792 #.  setspent
10793 #.  sgetspent
10794 #.  sgetspent_r
10795 #.  updwtmpx
10796 #.  utmpxname
10797 #.  vfscanf
10798 #.  vfwscanf
10799 #.  vscanf
10800 #.  vsyslog
10801 #.  vwscanf
10802 #. type: Plain text
10803 #: build/C/man7/pthreads.7:655
10804 msgid ""
10805 "An implementation may also mark other functions not specified in the "
10806 "standard as cancellation points.  In particular, an implementation is likely "
10807 "to mark any nonstandard function that may block as a cancellation point.  "
10808 "(This includes most functions that can touch files.)"
10809 msgstr ""
10810 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10811 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10812 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10813 "関数がこれに含まれる)。"
10814
10815 #. type: SS
10816 #: build/C/man7/pthreads.7:655
10817 #, no-wrap
10818 msgid "Compiling on Linux"
10819 msgstr "Linux でのコンパイル"
10820
10821 #. type: Plain text
10822 #: build/C/man7/pthreads.7:658
10823 msgid ""
10824 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10825 "pthread>."
10826 msgstr ""
10827 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10828 "きである。"
10829
10830 #. type: SS
10831 #: build/C/man7/pthreads.7:658
10832 #, no-wrap
10833 msgid "Linux implementations of POSIX threads"
10834 msgstr "POSIX スレッドの Linux での実装"
10835
10836 #. type: Plain text
10837 #: build/C/man7/pthreads.7:661
10838 msgid ""
10839 "Over time, two threading implementations have been provided by the GNU C "
10840 "library on Linux:"
10841 msgstr ""
10842 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10843 "た。"
10844
10845 #. type: TP
10846 #: build/C/man7/pthreads.7:661
10847 #, no-wrap
10848 msgid "B<LinuxThreads>"
10849 msgstr "B<LinuxThreads>"
10850
10851 #. type: Plain text
10852 #: build/C/man7/pthreads.7:665
10853 msgid ""
10854 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10855 "implementation is no longer supported."
10856 msgstr ""
10857 "最初の Pthreads の実装。\n"
10858 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10859
10860 #. type: TP
10861 #: build/C/man7/pthreads.7:665
10862 #, no-wrap
10863 msgid "B<NPTL> (Native POSIX Threads Library)"
10864 msgstr "B<NPTL> (Native POSIX Threads Library)"
10865
10866 #. type: Plain text
10867 #: build/C/man7/pthreads.7:673
10868 msgid ""
10869 "This is the modern Pthreads implementation.  By comparison with "
10870 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10871 "POSIX.1 specification and better performance when creating large numbers of "
10872 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10873 "are present in the Linux 2.6 kernel."
10874 msgstr ""
10875 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
10876 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
10877 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
10878 "装されている機能が必要である。"
10879
10880 #. type: Plain text
10881 #: build/C/man7/pthreads.7:683
10882 msgid ""
10883 "Both of these are so-called 1:1 implementations, meaning that each thread "
10884 "maps to a kernel scheduling entity.  Both threading implementations employ "
10885 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
10886 "primitives (mutexes, thread joining, and so on) are implemented using the "
10887 "Linux B<futex>(2)  system call."
10888 msgstr ""
10889 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
10890 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
10891 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
10892 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
10893 "使って実装されている。"
10894
10895 #. type: SS
10896 #: build/C/man7/pthreads.7:683
10897 #, no-wrap
10898 msgid "LinuxThreads"
10899 msgstr "LinuxThreads"
10900
10901 #. type: Plain text
10902 #: build/C/man7/pthreads.7:685
10903 msgid "The notable features of this implementation are the following:"
10904 msgstr "この実装の大きな特徴は以下の通りである:"
10905
10906 #. type: Plain text
10907 #: build/C/man7/pthreads.7:692
10908 msgid ""
10909 "In addition to the main (initial) thread, and the threads that the program "
10910 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
10911 "thread.  This thread handles thread creation and termination.  (Problems can "
10912 "result if this thread is inadvertently killed.)"
10913 msgstr ""
10914 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
10915 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
10916 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
10917 "kill されると、問題が起こることがある)。"
10918
10919 #. type: Plain text
10920 #: build/C/man7/pthreads.7:704
10921 msgid ""
10922 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
10923 "the first three real-time signals are used (see also B<signal>(7)).  On "
10924 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
10925 "avoid the use of whichever set of signals is employed by the implementation."
10926 msgstr ""
10927 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
10928 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
10929 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
10930 "用されているシグナルを どれも使わないようにしなければならない。"
10931
10932 #. type: Plain text
10933 #: build/C/man7/pthreads.7:711
10934 msgid ""
10935 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
10936 "implemented as processes which share more information than usual, but which "
10937 "do not share a common process ID.)  LinuxThreads threads (including the "
10938 "manager thread)  are visible as separate processes using B<ps>(1)."
10939 msgstr ""
10940 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
10941 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
10942 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
10943 "を使うと別のプロセスのように見える。"
10944
10945 #. type: Plain text
10946 #: build/C/man7/pthreads.7:714
10947 msgid ""
10948 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
10949 "number of ways, including the following:"
10950 msgstr ""
10951 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
10952 "示すような点がある:"
10953
10954 #. type: Plain text
10955 #: build/C/man7/pthreads.7:718
10956 msgid "Calls to B<getpid>(2)  return a different value in each thread."
10957 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
10958
10959 #. type: Plain text
10960 #: build/C/man7/pthreads.7:727
10961 msgid ""
10962 "Calls to B<getppid>(2)  in threads other than the main thread return the "
10963 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
10964 "should return the same value as B<getppid>(2)  in the main thread."
10965 msgstr ""
10966 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
10967 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
10968 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
10969
10970 #. type: Plain text
10971 #: build/C/man7/pthreads.7:737
10972 msgid ""
10973 "When one thread creates a new child process using B<fork>(2), any thread "
10974 "should be able to B<wait>(2)  on the child.  However, the implementation "
10975 "only allows the thread that created the child to B<wait>(2)  on it."
10976 msgstr ""
10977 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
10978 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
10979 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
10980 "る。"
10981
10982 #. type: Plain text
10983 #: build/C/man7/pthreads.7:744
10984 msgid ""
10985 "When a thread calls B<execve>(2), all other threads are terminated (as "
10986 "required by POSIX.1).  However, the resulting process has the same PID as "
10987 "the thread that called B<execve>(2): it should have the same PID as the main "
10988 "thread."
10989 msgstr ""
10990 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
10991 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
10992 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
10993 "る。"
10994
10995 #. type: Plain text
10996 #: build/C/man7/pthreads.7:751
10997 msgid ""
10998 "Threads do not share user and group IDs.  This can cause complications with "
10999 "set-user-ID programs and can cause failures in Pthreads functions if an "
11000 "application changes its credentials using B<seteuid>(2)  or similar."
11001 msgstr ""
11002 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11003 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11004 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11005
11006 #. type: Plain text
11007 #: build/C/man7/pthreads.7:753
11008 msgid "Threads do not share a common session ID and process group ID."
11009 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11010
11011 #. type: Plain text
11012 #: build/C/man7/pthreads.7:756
11013 msgid "Threads do not share record locks created using B<fcntl>(2)."
11014 msgstr ""
11015 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11016
11017 #. type: Plain text
11018 #: build/C/man7/pthreads.7:762
11019 msgid ""
11020 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11021 "rather than process-wide."
11022 msgstr ""
11023 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11024 "単位の情報である。"
11025
11026 #. type: Plain text
11027 #: build/C/man7/pthreads.7:765
11028 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11029 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11030
11031 #. type: Plain text
11032 #: build/C/man7/pthreads.7:767
11033 msgid "Threads do not share interval timers."
11034 msgstr "スレッド間でインターバル・タイマを共有しない。"
11035
11036 #.  FIXME . bug report filed for NPTL nice nonconformance
11037 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11038 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11039 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11040 #.  Monitor this to see if it makes it into mainline.
11041 #. type: Plain text
11042 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11043 msgid "Threads do not share a common nice value."
11044 msgstr "スレッドは共通の nice 値を共有しない。"
11045
11046 #. type: Plain text
11047 #: build/C/man7/pthreads.7:779
11048 msgid ""
11049 "POSIX.1 distinguishes the notions of signals that are directed to the "
11050 "process as a whole and signals that are directed to individual threads.  "
11051 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11052 "example) should be handled by a single, arbitrarily selected thread within "
11053 "the process.  LinuxThreads does not support the notion of process-directed "
11054 "signals: signals may be sent only to specific threads."
11055 msgstr ""
11056 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11057 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11058 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11059 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11060 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11061 "ルは特定のスレッドにだけ送ることができる。"
11062
11063 #. type: Plain text
11064 #: build/C/man7/pthreads.7:788
11065 msgid ""
11066 "Threads have distinct alternate signal stack settings.  However, a new "
11067 "thread's alternate signal stack settings are copied from the thread that "
11068 "created it, so that the threads initially share an alternate signal stack.  "
11069 "(A new thread should start with no alternate signal stack defined.  If two "
11070 "threads handle signals on their shared alternate signal stack at the same "
11071 "time, unpredictable program failures are likely to occur.)"
11072 msgstr ""
11073 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11074 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11075 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11076 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11077 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11078 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11079
11080 #. type: SS
11081 #: build/C/man7/pthreads.7:788
11082 #, no-wrap
11083 msgid "NPTL"
11084 msgstr "NPTL"
11085
11086 #. type: Plain text
11087 #: build/C/man7/pthreads.7:797
11088 msgid ""
11089 "With NPTL, all of the threads in a process are placed in the same thread "
11090 "group; all members of a thread group share the same PID.  NPTL does not "
11091 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11092 "signals (see also B<signal>(7)); these signals cannot be used in "
11093 "applications."
11094 msgstr ""
11095 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11096 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11097 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11098 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11099 "ションでは使用できない。"
11100
11101 #. type: Plain text
11102 #: build/C/man7/pthreads.7:799
11103 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11104 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11105
11106 #. type: Plain text
11107 #: build/C/man7/pthreads.7:808
11108 msgid "Some NPTL nonconformances occur only with older kernels:"
11109 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11110
11111 #. type: Plain text
11112 #: build/C/man7/pthreads.7:814
11113 msgid ""
11114 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11115 "rather than process-wide (fixed in kernel 2.6.9)."
11116 msgstr ""
11117 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11118 "単位の情報である (カーネル 2.6.9 で修正された)。"
11119
11120 #. type: Plain text
11121 #: build/C/man7/pthreads.7:816
11122 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11123 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11124
11125 #. type: Plain text
11126 #: build/C/man7/pthreads.7:818
11127 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11128 msgstr ""
11129 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11130
11131 #. type: Plain text
11132 #: build/C/man7/pthreads.7:822
11133 msgid ""
11134 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11135 "(fixed in kernel 2.6.16)."
11136 msgstr ""
11137 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11138 "きる (カーネル 2.6.16 で修正された)。"
11139
11140 #. type: Plain text
11141 #: build/C/man7/pthreads.7:827
11142 msgid ""
11143 "Only the main thread is permitted to make the process into a process group "
11144 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11145 msgstr ""
11146 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11147 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11148
11149 #. type: Plain text
11150 #: build/C/man7/pthreads.7:833
11151 msgid ""
11152 "Threads have distinct alternate signal stack settings.  However, a new "
11153 "thread's alternate signal stack settings are copied from the thread that "
11154 "created it, so that the threads initially share an alternate signal stack "
11155 "(fixed in kernel 2.6.16)."
11156 msgstr ""
11157 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11158 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11159 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11160 "ル 2.6.16 で修正された)。"
11161
11162 #. type: Plain text
11163 #: build/C/man7/pthreads.7:835
11164 msgid "Note the following further points about the NPTL implementation:"
11165 msgstr "NPTL の実装では以下の点についても注意すること:"
11166
11167 #. type: Plain text
11168 #: build/C/man7/pthreads.7:849
11169 msgid ""
11170 "If the stack size soft resource limit (see the description of "
11171 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11172 "I<unlimited>, then this value defines the default stack size for new "
11173 "threads.  To be effective, this limit must be set before the program is "
11174 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11175 "stacksize> in the C shell)."
11176 msgstr ""
11177 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11178 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11179 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11180 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11181 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11182 "は I<limit stacksize>)  を使って設定する。"
11183
11184 #. type: SS
11185 #: build/C/man7/pthreads.7:849
11186 #, no-wrap
11187 msgid "Determining the threading implementation"
11188 msgstr "スレッド実装の判定"
11189
11190 #. type: Plain text
11191 #: build/C/man7/pthreads.7:854
11192 msgid ""
11193 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11194 "system's threading implementation, for example:"
11195 msgstr ""
11196 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11197 "装を判定することができる。 以下に例を示す:"
11198
11199 #. type: Plain text
11200 #: build/C/man7/pthreads.7:859
11201 #, no-wrap
11202 msgid ""
11203 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11204 "NPTL 2.3.4\n"
11205 msgstr ""
11206 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11207 "NPTL 2.3.4\n"
11208
11209 #. type: Plain text
11210 #: build/C/man7/pthreads.7:864
11211 msgid ""
11212 "With older glibc versions, a command such as the following should be "
11213 "sufficient to determine the default threading implementation:"
11214 msgstr ""
11215 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11216 "ド実装を判定することができる。"
11217
11218 #. type: Plain text
11219 #: build/C/man7/pthreads.7:870
11220 #, no-wrap
11221 msgid ""
11222 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11223 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11224 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11225 msgstr ""
11226 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11227 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11228 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11229
11230 #. type: SS
11231 #: build/C/man7/pthreads.7:872
11232 #, no-wrap
11233 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11234 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11235
11236 #. type: Plain text
11237 #: build/C/man7/pthreads.7:887
11238 msgid ""
11239 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11240 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11241 "override the dynamic linker's default choice of threading implementation.  "
11242 "This variable tells the dynamic linker to assume that it is running on top "
11243 "of a particular kernel version.  By specifying a kernel version that does "
11244 "not provide the support required by NPTL, we can force the use of "
11245 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11246 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11247 "For example:"
11248 msgstr ""
11249 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11250 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11251 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11252 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11253 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11254 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11255 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11256 "ン を動作させる場合だろう)。 以下に例を示す:"
11257
11258 #. type: Plain text
11259 #: build/C/man7/pthreads.7:893
11260 #, no-wrap
11261 msgid ""
11262 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11263 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11264 "        linuxthreads-0.10 by Xavier Leroy\n"
11265 msgstr ""
11266 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11267 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11268 "        linuxthreads-0.10 by Xavier Leroy\n"
11269
11270 #. type: Plain text
11271 #: build/C/man7/pthreads.7:905
11272 msgid ""
11273 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11274 "(7), B<signal>(7),"
11275 msgstr ""
11276 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11277 "B<signal>(7),"
11278
11279 #. type: Plain text
11280 #: build/C/man7/pthreads.7:929
11281 msgid ""
11282 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11283 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11284 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11285 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11286 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11287 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11288 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11289 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11290 msgstr ""
11291 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11292 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11293 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11294 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11295 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11296 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11297 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11298 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11299 "and B<pthread_testcancel>(3)"