OSDN Git Service

(split) LDP: Update PO files (3.52 editirial change)
[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-07-15 16:08+0900\n"
10 "PO-Revision-Date: 2013-07-16 02:02+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/getcontext.3:25
20 #, no-wrap
21 msgid "GETCONTEXT"
22 msgstr "GETCONTEXT"
23
24 #. type: TH
25 #: build/C/man3/getcontext.3:25
26 #, no-wrap
27 msgid "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:49
220 msgid ""
221 "In a System V-like environment, one has the two types I<mcontext_t> and "
222 "I<ucontext_t> defined in I<E<lt>ucontext.hE<gt>> and the four functions "
223 "B<getcontext>(), B<setcontext>(), B<makecontext>(3)  and B<swapcontext>(3)  "
224 "that allow user-level context switching between multiple threads of control "
225 "within a process."
226 msgstr ""
227 "System V 的な環境では、 I<mcontext_t> および I<ucontext_t> という 2 つの型"
228 "と、 B<getcontext>(), B<setcontext>(), B<makecontext>(3), B<swapcontext>(3)  "
229 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
230 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
231 "ようになっている。"
232
233 #. type: Plain text
234 #: build/C/man3/getcontext.3:57
235 msgid ""
236 "The I<mcontext_t> type is machine-dependent and opaque.  The I<ucontext_t> "
237 "type is a structure that has at least the following fields:"
238 msgstr ""
239 "I<mcontext_t> 型はマシン依存で、外部からは隠蔽されている。 I<ucontext_t> 型は"
240 "構造体で、少なくとも以下の 4 つのフィールドを持つ。"
241
242 #. type: Plain text
243 #: build/C/man3/getcontext.3:67
244 #, no-wrap
245 msgid ""
246 "typedef struct ucontext {\n"
247 "    struct ucontext *uc_link;\n"
248 "    sigset_t         uc_sigmask;\n"
249 "    stack_t          uc_stack;\n"
250 "    mcontext_t       uc_mcontext;\n"
251 "    ...\n"
252 "} ucontext_t;\n"
253 msgstr ""
254 "typedef struct ucontext {\n"
255 "    struct ucontext *uc_link;\n"
256 "    sigset_t         uc_sigmask;\n"
257 "    stack_t          uc_stack;\n"
258 "    mcontext_t       uc_mcontext;\n"
259 "    ...\n"
260 "} ucontext_t;\n"
261
262 #. type: Plain text
263 #: build/C/man3/getcontext.3:94
264 msgid ""
265 "with I<sigset_t> and I<stack_t> defined in I<E<lt>signal.hE<gt>>.  Here "
266 "I<uc_link> points to the context that will be resumed when the current "
267 "context terminates (in case the current context was created using "
268 "B<makecontext>(3)), I<uc_sigmask> is the set of signals blocked in this "
269 "context (see B<sigprocmask>(2)), I<uc_stack> is the stack used by this "
270 "context (see B<sigaltstack>(2)), and I<uc_mcontext> is the machine-specific "
271 "representation of the saved context, that includes the calling thread's "
272 "machine registers."
273 msgstr ""
274 "I<sigset_t> と I<stack_t> は I<E<lt>signal.hE<gt>> で定義されている。 ここで "
275 "I<uc_link> は、 現在のコンテキストが終了したとき、 続いて切り替わるコンテキス"
276 "トへのポインタである (現在のコンテキストが B<makecontext>(3)  で生成されたも"
277 "のの場合)。 I<uc_sigmask> はこのコンテキストでブロックされている シグナル群で"
278 "ある (B<sigprocmask>(2)  を見よ)。 I<uc_stack> はこのコンテキストが用いている"
279 "スタックである (B<signalstack>(2)  を見よ)。 I<uc_mcontext> は保存されている"
280 "コンテキストの マシン特有の表現形式であり、 ここには呼び出したスレッドのマシ"
281 "ンレジスタが格納される。"
282
283 #. type: Plain text
284 #: build/C/man3/getcontext.3:101
285 msgid ""
286 "The function B<getcontext>()  initializes the structure pointed at by I<ucp> "
287 "to the currently active context."
288 msgstr ""
289 "B<getcontext>()  関数は、 ポインタ I<ucp> が指す構造体を、 現在アクティブなコ"
290 "ンテキストに初期化する。"
291
292 #. type: Plain text
293 #: build/C/man3/getcontext.3:114
294 msgid ""
295 "The function B<setcontext>()  restores the user context pointed at by "
296 "I<ucp>.  A successful call does not return.  The context should have been "
297 "obtained by a call of B<getcontext>(), or B<makecontext>(3), or passed as "
298 "third argument to a signal handler."
299 msgstr ""
300 "B<setcontext>()  関数は、ポインタ I<ucp> が指すユーザコンテキストをリストアす"
301 "る。 呼び出しに成功すると返らない。 このコンテキストは、以前に B<getcontext>"
302 "()  または B<makecontext>(3)  で得られたものか、 あるいはシグナルの第三引数と"
303 "して与えられたものになる。"
304
305 #. type: Plain text
306 #: build/C/man3/getcontext.3:118
307 msgid ""
308 "If the context was obtained by a call of B<getcontext>(), program execution "
309 "continues as if this call just returned."
310 msgstr ""
311 "コンテキストが B<getcontext>()  の呼び出しによって得られていたものの場合は、 "
312 "プログラムはこの呼び出しから返った直後からのように実行を継続する。"
313
314 #. type: Plain text
315 #: build/C/man3/getcontext.3:135
316 msgid ""
317 "If the context was obtained by a call of B<makecontext>(3), program "
318 "execution continues by a call to the function I<func> specified as the "
319 "second argument of that call to B<makecontext>(3).  When the function "
320 "I<func> returns, we continue with the I<uc_link> member of the structure "
321 "I<ucp> specified as the first argument of that call to B<makecontext>(3).  "
322 "When this member is NULL, the thread exits."
323 msgstr ""
324 "コンテキストが B<makecontext>(3)  の呼び出しによって得られていたものの場合"
325 "は、 プログラムの実行はその B<makecontext>(3)  呼び出しの第二引数で指定された"
326 "関数 I<func> を呼び出すかたちで継続する。 I<func> から返ると、 B<makecontext>"
327 "(3)  呼び出しの第一引数で指定されていた I<ucp> 構造体の I<uc_link> メンバで継"
328 "続する。 このメンバが NULL だった場合は、そのスレッドは終了する。"
329
330 #. type: Plain text
331 #: build/C/man3/getcontext.3:142
332 msgid ""
333 "If the context was obtained by a call to a signal handler, then old standard "
334 "text says that \"program execution continues with the program instruction "
335 "following the instruction interrupted by the signal\".  However, this "
336 "sentence was removed in SUSv2, and the present verdict is \"the result is "
337 "unspecified\"."
338 msgstr ""
339 "コンテキストがシグナルハンドラの呼び出しによって得られていたものの場合は、 古"
340 "い標準によれば 「プログラムの実行はシグナルによって割り込まれた命令の次の命令"
341 "から継続される」。 しかしこの文は SUSv2 で削除されたので、 現在の判断は「結果"
342 "は定義されていない」である。"
343
344 #. type: SH
345 #: build/C/man3/getcontext.3:142 build/C/man3/makecontext.3:84
346 #: build/C/man3/pthread_attr_init.3:68
347 #: build/C/man3/pthread_attr_setaffinity_np.3:76
348 #: build/C/man3/pthread_attr_setdetachstate.3:77
349 #: build/C/man3/pthread_attr_setguardsize.3:90
350 #: build/C/man3/pthread_attr_setinheritsched.3:93
351 #: build/C/man3/pthread_attr_setschedparam.3:85
352 #: build/C/man3/pthread_attr_setschedpolicy.3:83
353 #: build/C/man3/pthread_attr_setscope.3:103
354 #: build/C/man3/pthread_attr_setstack.3:85
355 #: build/C/man3/pthread_attr_setstackaddr.3:74
356 #: build/C/man3/pthread_attr_setstacksize.3:61
357 #: build/C/man3/pthread_cancel.3:112 build/C/man3/pthread_cleanup_push.3:121
358 #: build/C/man3/pthread_create.3:115 build/C/man3/pthread_detach.3:49
359 #: build/C/man3/pthread_equal.3:41 build/C/man3/pthread_exit.3:71
360 #: build/C/man3/pthread_getattr_np.3:73
361 #: build/C/man3/pthread_getcpuclockid.3:46 build/C/man3/pthread_join.3:70
362 #: build/C/man3/pthread_kill.3: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:151
377 msgid ""
378 "When successful, B<getcontext>()  returns 0 and B<setcontext>()  does not "
379 "return.  On error, both return -1 and set I<errno> appropriately."
380 msgstr ""
381 "成功すると、 B<getcontext>()  は 0 を返し、 B<setcontext>()  は返らない。 失"
382 "敗すると、両者とも -1 を返し、I<errno> をエラーに応じて設定する。"
383
384 #. type: SH
385 #: build/C/man3/getcontext.3:151 build/C/man3/makecontext.3:96
386 #: build/C/man3/pthread_attr_init.3:71
387 #: build/C/man3/pthread_attr_setaffinity_np.3:79
388 #: build/C/man3/pthread_attr_setdetachstate.3:80
389 #: build/C/man3/pthread_attr_setguardsize.3:93
390 #: build/C/man3/pthread_attr_setinheritsched.3:96
391 #: build/C/man3/pthread_attr_setschedparam.3:88
392 #: build/C/man3/pthread_attr_setschedpolicy.3:86
393 #: build/C/man3/pthread_attr_setscope.3:106
394 #: build/C/man3/pthread_attr_setstack.3:88
395 #: build/C/man3/pthread_attr_setstackaddr.3:77
396 #: build/C/man3/pthread_attr_setstacksize.3:64
397 #: build/C/man3/pthread_cancel.3:117 build/C/man3/pthread_cleanup_push.3:123
398 #: build/C/man3/pthread_create.3:122 build/C/man3/pthread_detach.3:54
399 #: build/C/man3/pthread_equal.3:45 build/C/man3/pthread_exit.3:73
400 #: build/C/man3/pthread_getattr_np.3:76
401 #: build/C/man3/pthread_getcpuclockid.3:49 build/C/man3/pthread_join.3:75
402 #: build/C/man3/pthread_kill.3: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:153
417 msgid "None defined."
418 msgstr "定義されていない。"
419
420 #. type: SH
421 #: build/C/man3/getcontext.3:153 build/C/man3/makecontext.3:105
422 #: build/C/man3/pthread_attr_init.3:79
423 #: build/C/man3/pthread_attr_setaffinity_np.3:108
424 #: build/C/man3/pthread_attr_setdetachstate.3:87
425 #: build/C/man3/pthread_attr_setguardsize.3:106
426 #: build/C/man3/pthread_attr_setinheritsched.3:110
427 #: build/C/man3/pthread_attr_setschedparam.3:100
428 #: build/C/man3/pthread_attr_setschedpolicy.3:100
429 #: build/C/man3/pthread_attr_setscope.3:119
430 #: build/C/man3/pthread_attr_setstack.3:112
431 #: build/C/man3/pthread_attr_setstackaddr.3:83
432 #: build/C/man3/pthread_attr_setstacksize.3:83
433 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_cleanup_push.3:127
434 #: build/C/man3/pthread_cleanup_push_defer_np.3:101
435 #: build/C/man3/pthread_create.3:146 build/C/man3/pthread_detach.3:64
436 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
437 #: build/C/man3/pthread_getattr_np.3:98
438 #: build/C/man3/pthread_getcpuclockid.3:65 build/C/man3/pthread_join.3:98
439 #: build/C/man3/pthread_kill.3: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:159
455 msgid ""
456 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specification of B<getcontext>"
457 "(), citing portability issues, and recommending that applications be "
458 "rewritten to use POSIX threads instead."
459 msgstr ""
460 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<getcontext>()  の"
461 "仕様が削除された。 代わりに、アプリケーションを POSIX スレッドを使って書き直"
462 "すことが 推奨されている。"
463
464 #. type: SH
465 #: build/C/man3/getcontext.3:159 build/C/man3/makecontext.3:113
466 #: build/C/man3/pthread_attr_init.3:81
467 #: build/C/man3/pthread_attr_setaffinity_np.3:111
468 #: build/C/man3/pthread_attr_setdetachstate.3:89
469 #: build/C/man3/pthread_attr_setguardsize.3:108
470 #: build/C/man3/pthread_attr_setschedparam.3:102
471 #: build/C/man3/pthread_attr_setscope.3:121
472 #: build/C/man3/pthread_attr_setstack.3:114
473 #: build/C/man3/pthread_attr_setstackaddr.3:86
474 #: build/C/man3/pthread_attr_setstacksize.3:85
475 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
476 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
477 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
478 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
479 #: build/C/man3/pthread_kill.3: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:176
494 msgid ""
495 "The earliest incarnation of this mechanism was the B<setjmp>(3)/B<longjmp>"
496 "(3)  mechanism.  Since that does not define the handling of the signal "
497 "context, the next stage was the B<sigsetjmp>(3)/B<siglongjmp>(3)  pair.  The "
498 "present mechanism gives much more control.  On the other hand, there is no "
499 "easy way to detect whether a return from B<getcontext>()  is from the first "
500 "call, or via a B<setcontext>()  call.  The user has to invent her own "
501 "bookkeeping device, and a register variable won't do since registers are "
502 "restored."
503 msgstr ""
504 "このメカニズムの最古の実装は、 B<setjmp>(3)/B<longjmp>(3)  機構であった。 こ"
505 "れらにはシグナルコンテキストの取り扱いが定義されていなかったので、 次の段階で"
506 "は B<sigsetjmp>(3)/B<siglongjmp>(3)  のペアが現われた。 現在の機構ではずっと"
507 "細かな制御ができる。 一方 B<getcontext>()  から返ったとき、 これが最初の呼び"
508 "出しであったか、 それとも B<setcontext>()  呼び出しからのものであるかを 区別"
509 "する容易な方法がなくなってしまった。 ユーザは「しおり」機構を自分で作らなけれ"
510 "ばならない。 レジスタ変数は (レジスタはリストアされてしまうので) これをやって"
511 "くれない。"
512
513 #. type: Plain text
514 #: build/C/man3/getcontext.3:187
515 msgid ""
516 "When a signal occurs, the current user context is saved and a new context is "
517 "created by the kernel for the signal handler.  Do not leave the handler "
518 "using B<longjmp>(3): it is undefined what would happen with contexts.  Use "
519 "B<siglongjmp>(3)  or B<setcontext>()  instead."
520 msgstr ""
521 "シグナルが発生すると、 現在のユーザコンテキストは保存され、 シグナルハンドラ"
522 "用のコンテキストがカーネルによって生成される。 今後はハンドラに B<longjmp>"
523 "(3)  を使わせないこと: この関数のコンテキスト下での動作は定義されていない。 "
524 "代わりに B<siglongjmp>(3)  か B<setcontext>()  を使うこと。"
525
526 #. type: SH
527 #: build/C/man3/getcontext.3:187 build/C/man3/makecontext.3:220
528 #: build/C/man3/pthread_attr_init.3:297
529 #: build/C/man3/pthread_attr_setaffinity_np.3:118
530 #: build/C/man3/pthread_attr_setdetachstate.3:111
531 #: build/C/man3/pthread_attr_setguardsize.3:158
532 #: build/C/man3/pthread_attr_setinheritsched.3:131
533 #: build/C/man3/pthread_attr_setschedparam.3:109
534 #: build/C/man3/pthread_attr_setschedpolicy.3:105
535 #: build/C/man3/pthread_attr_setscope.3:132
536 #: build/C/man3/pthread_attr_setstack.3: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:226 build/C/man3/pthread_cleanup_push.3:315
540 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
541 #: build/C/man3/pthread_create.3:369 build/C/man3/pthread_detach.3:97
542 #: build/C/man3/pthread_equal.3:56 build/C/man3/pthread_exit.3:105
543 #: build/C/man3/pthread_getattr_np.3:345
544 #: build/C/man3/pthread_getcpuclockid.3: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:194
562 msgid ""
563 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
564 "B<makecontext>(3), B<sigsetjmp>(3)"
565 msgstr ""
566 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
567 "B<makecontext>(3), B<sigsetjmp>(3)"
568
569 #. type: SH
570 #: build/C/man3/getcontext.3:194 build/C/man3/makecontext.3:226
571 #: build/C/man3/pthread_attr_init.3:313
572 #: build/C/man3/pthread_attr_setaffinity_np.3:124
573 #: build/C/man3/pthread_attr_setdetachstate.3:117
574 #: build/C/man3/pthread_attr_setguardsize.3:166
575 #: build/C/man3/pthread_attr_setinheritsched.3:143
576 #: build/C/man3/pthread_attr_setschedparam.3:121
577 #: build/C/man3/pthread_attr_setschedpolicy.3:116
578 #: build/C/man3/pthread_attr_setscope.3:142
579 #: build/C/man3/pthread_attr_setstack.3: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:238 build/C/man3/pthread_cleanup_push.3:321
583 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
584 #: build/C/man3/pthread_create.3:382 build/C/man3/pthread_detach.3:104
585 #: build/C/man3/pthread_equal.3:60 build/C/man3/pthread_exit.3:109
586 #: build/C/man3/pthread_getattr_np.3:361
587 #: build/C/man3/pthread_getcpuclockid.3: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:201 build/C/man3/makecontext.3:233
605 #: build/C/man3/pthread_attr_init.3:320
606 #: build/C/man3/pthread_attr_setaffinity_np.3:131
607 #: build/C/man3/pthread_attr_setdetachstate.3:124
608 #: build/C/man3/pthread_attr_setguardsize.3:173
609 #: build/C/man3/pthread_attr_setinheritsched.3:150
610 #: build/C/man3/pthread_attr_setschedparam.3:128
611 #: build/C/man3/pthread_attr_setschedpolicy.3:123
612 #: build/C/man3/pthread_attr_setscope.3:149
613 #: build/C/man3/pthread_attr_setstack.3: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:245 build/C/man3/pthread_cleanup_push.3:328
617 #: build/C/man3/pthread_cleanup_push_defer_np.3:117
618 #: build/C/man3/pthread_create.3:389 build/C/man3/pthread_detach.3:111
619 #: build/C/man3/pthread_equal.3:67 build/C/man3/pthread_exit.3:116
620 #: build/C/man3/pthread_getattr_np.3:368
621 #: build/C/man3/pthread_getcpuclockid.3: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.52 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.52 の一部\n"
639 "である。プロジェクトの説明とバグ報告に関する情報は\n"
640 "http://www.kernel.org/doc/man-pages/ に書かれている。"
641
642 #. type: TH
643 #: build/C/man3/makecontext.3:28
644 #, no-wrap
645 msgid "MAKECONTEXT"
646 msgstr "MAKECONTEXT"
647
648 #. type: TH
649 #: build/C/man3/makecontext.3:28
650 #, no-wrap
651 msgid "2013-02-12"
652 msgstr "2013-02-12"
653
654 #. type: TH
655 #: build/C/man3/makecontext.3:28
656 #, no-wrap
657 msgid "GNU"
658 msgstr "GNU"
659
660 #. type: Plain text
661 #: build/C/man3/makecontext.3:31
662 msgid "makecontext, swapcontext - manipulate user context"
663 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
664
665 #. type: Plain text
666 #: build/C/man3/makecontext.3:36
667 msgid ""
668 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
669 ">I<argc>B<, ...);>"
670 msgstr ""
671 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
672 ">I<argc>B<, ...);>"
673
674 #. type: Plain text
675 #: build/C/man3/makecontext.3:38
676 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
677 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
678
679 #. type: Plain text
680 #: build/C/man3/makecontext.3:49
681 msgid ""
682 "In a System V-like environment, one has the type I<ucontext_t> defined in "
683 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
684 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
685 "level context switching between multiple threads of control within a process."
686 msgstr ""
687 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
688 "と、 B<getcontext>(3), B<setcontext>(3), B<makecontext>(), B<swapcontext>()  "
689 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
690 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
691 "ようになっている。"
692
693 #. type: Plain text
694 #: build/C/man3/makecontext.3:52
695 msgid "For the type and the first two functions, see B<getcontext>(3)."
696 msgstr ""
697 "これらの型と、最初の 2 つの関数については、 B<getcontext>(3) を参照のこと。"
698
699 #. type: Plain text
700 #: build/C/man3/makecontext.3:64
701 msgid ""
702 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
703 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
704 "B<makecontext>(), the caller must allocate a new stack for this context and "
705 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
706 "and assign its address to I<ucp-E<gt>uc_link>."
707 msgstr ""
708 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
709 "(I<ucp> は以前の B<getcontext>(3)  呼び出しで得られたものである)。 "
710 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
711 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
712 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
713 "らない。"
714
715 #. type: Plain text
716 #: build/C/man3/makecontext.3:78
717 msgid ""
718 "When this context is later activated (using B<setcontext>(3)  or "
719 "B<swapcontext>())  the function I<func> is called, and passed the series of "
720 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
721 "number of these arguments in I<argc>.  When this function returns, the "
722 "successor context is activated.  If the successor context pointer is NULL, "
723 "the thread exits."
724 msgstr ""
725 "このコンテキストが将来 (B<setcontext>(3)  または B<swapcontext>()  によっ"
726 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
727 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
728 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
729 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
730
731 #. type: Plain text
732 #: build/C/man3/makecontext.3:84
733 msgid ""
734 "The B<swapcontext>()  function saves the current context in the structure "
735 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
736 msgstr ""
737 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
738 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
739
740 #. type: Plain text
741 #: build/C/man3/makecontext.3:96
742 msgid ""
743 "When successful, B<swapcontext>()  does not return.  (But we may return "
744 "later, in case I<oucp> is activated, in which case it looks like "
745 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
746 "sets I<errno> appropriately."
747 msgstr ""
748 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
749 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
750 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
751 "て設定する。"
752
753 #. type: TP
754 #: build/C/man3/makecontext.3:97
755 #: build/C/man3/pthread_attr_setaffinity_np.3:102
756 #: build/C/man3/pthread_getattr_np.3:77
757 #, no-wrap
758 msgid "B<ENOMEM>"
759 msgstr "B<ENOMEM>"
760
761 #. type: Plain text
762 #: build/C/man3/makecontext.3:100
763 msgid "Insufficient stack space left."
764 msgstr "スタックに割り当てる空間が残っていない。"
765
766 #. type: SH
767 #: build/C/man3/makecontext.3:100
768 #: build/C/man3/pthread_attr_setaffinity_np.3:106
769 #: build/C/man3/pthread_attr_setguardsize.3:104
770 #: build/C/man3/pthread_attr_setstack.3:110
771 #: build/C/man3/pthread_attr_setstackaddr.3:81
772 #: build/C/man3/pthread_attr_setstacksize.3:81
773 #: build/C/man3/pthread_getattr_np.3:96
774 #: build/C/man3/pthread_getcpuclockid.3:63
775 #: build/C/man3/pthread_setaffinity_np.3:119
776 #: build/C/man3/pthread_setconcurrency.3:81
777 #: build/C/man3/pthread_setname_np.3:100
778 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
779 #: build/C/man3/pthread_tryjoin_np.3:110
780 #, no-wrap
781 msgid "VERSIONS"
782 msgstr "バージョン"
783
784 #. type: Plain text
785 #: build/C/man3/makecontext.3:105
786 msgid ""
787 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
788 "2.1."
789 msgstr ""
790 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
791 "されている。"
792
793 #. type: Plain text
794 #: build/C/man3/makecontext.3:113
795 msgid ""
796 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
797 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
798 "recommending that applications be rewritten to use POSIX threads instead."
799 msgstr ""
800 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
801 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
802 "POSIX スレッドを使って書き直すことが 推奨されている。"
803
804 #. type: Plain text
805 #: build/C/man3/makecontext.3:121
806 msgid ""
807 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
808 "namely, this struct contains the start and length of a memory area to be "
809 "used as the stack, regardless of the direction of growth of the stack.  "
810 "Thus, it is not necessary for the user program to worry about this direction."
811 msgstr ""
812 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
813 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
814 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
815 "て、ユーザプログラムはこの件については心配しなくてよい。"
816
817 #. type: Plain text
818 #: build/C/man3/makecontext.3:137
819 msgid ""
820 "On architectures where I<int> and pointer types are the same size (e.g., "
821 "x86-32, where both types are 32 bits), you may be able to get away with "
822 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
823 "However, doing this is not guaranteed to be portable, is undefined according "
824 "to the standards, and won't work on architectures where pointers are larger "
825 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
826 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
827 "g., x86-64)."
828 msgstr ""
829 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
830 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
831 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
832 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
833 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
834 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
835 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
836 "できるようになっている。"
837
838 #. type: SH
839 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
840 #: build/C/man3/pthread_attr_setdetachstate.3:108
841 #: build/C/man3/pthread_attr_setguardsize.3:155
842 #: build/C/man3/pthread_attr_setinheritsched.3:128
843 #: build/C/man3/pthread_attr_setschedparam.3:106
844 #: build/C/man3/pthread_attr_setschedpolicy.3:102
845 #: build/C/man3/pthread_attr_setstack.3:153
846 #: build/C/man3/pthread_attr_setstacksize.3:108
847 #: build/C/man3/pthread_cancel.3:135 build/C/man3/pthread_cleanup_push.3:155
848 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
849 #: build/C/man3/pthread_getattr_np.3:101
850 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
851 #: build/C/man3/pthread_setaffinity_np.3:154
852 #: build/C/man3/pthread_setcancelstate.3:174
853 #: build/C/man3/pthread_setname_np.3: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:151 build/C/man3/pthread_cleanup_push.3:231
898 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
899 #: build/C/man3/pthread_getcpuclockid.3: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:96
1208 #: build/C/man3/pthread_attr_setschedparam.3:88
1209 #: build/C/man3/pthread_attr_setschedpolicy.3:86
1210 #: build/C/man3/pthread_attr_setscope.3:106
1211 #: build/C/man3/pthread_attr_setstack.3:88
1212 #: build/C/man3/pthread_attr_setstackaddr.3:77
1213 #: build/C/man3/pthread_attr_setstacksize.3:64
1214 #: build/C/man3/pthread_setaffinity_np.3:80
1215 #: build/C/man3/pthread_setcancelstate.3:95
1216 #: build/C/man3/pthread_setname_np.3:75
1217 msgid ""
1218 "On success, these functions return 0; on error, they return a nonzero error "
1219 "number."
1220 msgstr ""
1221 "成功すると、これらの関数は 0 を返す。\n"
1222 "エラーの場合、0 以外のエラー番号を返す。"
1223
1224 #. type: Plain text
1225 #: build/C/man3/pthread_attr_init.3:79
1226 msgid ""
1227 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1228 "Linux these functions always succeed (but portable and future-proof "
1229 "applications should nevertheless handle a possible error return)."
1230 msgstr ""
1231 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1232 "記載されている。\n"
1233 "Linux では、これらの関数は常に成功する\n"
1234 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1235 "正のエラーの返り値を処理するようにすべきである)。"
1236
1237 #. type: Plain text
1238 #: build/C/man3/pthread_attr_init.3:81
1239 #: build/C/man3/pthread_attr_setdetachstate.3:89
1240 #: build/C/man3/pthread_attr_setguardsize.3:108
1241 #: build/C/man3/pthread_attr_setinheritsched.3:112
1242 #: build/C/man3/pthread_attr_setschedparam.3:102
1243 #: build/C/man3/pthread_attr_setschedpolicy.3:102
1244 #: build/C/man3/pthread_attr_setscope.3:121
1245 #: build/C/man3/pthread_attr_setstack.3:114
1246 #: build/C/man3/pthread_attr_setstacksize.3:85
1247 #: build/C/man3/pthread_cancel.3:127 build/C/man3/pthread_cleanup_push.3:129
1248 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1249 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1250 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1251 #: build/C/man3/pthread_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:162
1397 #: build/C/man3/pthread_cleanup_push.3:243 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:99
1909 #: build/C/man3/pthread_attr_setschedpolicy.3:89
1910 #: build/C/man3/pthread_attr_setscope.3:109
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 #, no-wrap
2012 msgid "2010-02-03"
2013 msgstr "2010-02-03"
2014
2015 #. type: Plain text
2016 #: build/C/man3/pthread_attr_setdetachstate.3:30
2017 msgid ""
2018 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2019 "state attribute in thread attributes object"
2020 msgstr ""
2021 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2022 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2023
2024 #. type: Plain text
2025 #: build/C/man3/pthread_attr_setdetachstate.3:38
2026 #, no-wrap
2027 msgid ""
2028 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2029 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2030 msgstr ""
2031 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2032 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2033
2034 #. type: Plain text
2035 #: build/C/man3/pthread_attr_setdetachstate.3:53
2036 msgid ""
2037 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2038 "attribute of the thread attributes object referred to by I<attr> to the "
2039 "value specified in I<detachstate>.  The detach state attribute determines "
2040 "whether a thread created using the thread attributes object I<attr> will be "
2041 "created in a joinable or a detached state."
2042 msgstr ""
2043 "B<pthread_attr_setdetachstate>() 関数は、\n"
2044 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2045 "I<detachstate> で指定された値に設定する。\n"
2046 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2047 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2048 "detached (切り離された) 状態で作成されるかが決定される。"
2049
2050 #. type: Plain text
2051 #: build/C/man3/pthread_attr_setdetachstate.3:56
2052 msgid "The following values may be specified in I<detachstate>:"
2053 msgstr "I<detachstate> には以下の値を指定できる。"
2054
2055 #. type: TP
2056 #: build/C/man3/pthread_attr_setdetachstate.3:56
2057 #, no-wrap
2058 msgid "B<PTHREAD_CREATE_DETACHED>"
2059 msgstr "B<PTHREAD_CREATE_DETACHED>"
2060
2061 #. type: Plain text
2062 #: build/C/man3/pthread_attr_setdetachstate.3:61
2063 msgid ""
2064 "Threads that are created using I<attr> will be created in a detached state."
2065 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2066
2067 #. type: TP
2068 #: build/C/man3/pthread_attr_setdetachstate.3:61
2069 #, no-wrap
2070 msgid "B<PTHREAD_CREATE_JOINABLE>"
2071 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2072
2073 #. type: Plain text
2074 #: build/C/man3/pthread_attr_setdetachstate.3:66
2075 msgid ""
2076 "Threads that are created using I<attr> will be created in a joinable state."
2077 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2078
2079 #. type: Plain text
2080 #: build/C/man3/pthread_attr_setdetachstate.3:70
2081 msgid ""
2082 "The default setting of the detach state attribute in a newly initialized "
2083 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2084 msgstr ""
2085 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2086 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2087
2088 #. type: Plain text
2089 #: build/C/man3/pthread_attr_setdetachstate.3:77
2090 msgid ""
2091 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2092 "the thread attributes object I<attr> in the buffer pointed to by "
2093 "I<detachstate>."
2094 msgstr ""
2095 "B<pthread_attr_getdetachstate>() は、\n"
2096 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2097 "I<detachstate> が指すバッファに入れて返す。"
2098
2099 #. type: Plain text
2100 #: build/C/man3/pthread_attr_setdetachstate.3:83
2101 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2102 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2103
2104 #. type: Plain text
2105 #: build/C/man3/pthread_attr_setdetachstate.3:87
2106 msgid "An invalid value was specified in I<detachstate>."
2107 msgstr "無効な値が I<detachstate> で指定された。"
2108
2109 #. type: Plain text
2110 #: build/C/man3/pthread_attr_setdetachstate.3:93
2111 msgid ""
2112 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2113 msgstr ""
2114 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2115 "B<pthread_create>(3) を参照。"
2116
2117 #. type: Plain text
2118 #: build/C/man3/pthread_attr_setdetachstate.3:101
2119 msgid ""
2120 "A thread that is created in a joinable state should eventually either be "
2121 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2122 "B<pthread_create>(3)."
2123 msgstr ""
2124 "join 可能状態で作成されたスレッドは、最終的に\n"
2125 "B<pthread_join>(3) を使って join するか、\n"
2126 "B<pthread_detach>(3) を使って切り離すか、\n"
2127 "のどちらかを行うべきである。"
2128
2129 #. type: Plain text
2130 #: build/C/man3/pthread_attr_setdetachstate.3:108
2131 msgid ""
2132 "It is an error to specify the thread ID of a thread that was created in a "
2133 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2134 "(3)."
2135 msgstr ""
2136 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2137 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2138 "エラーである。"
2139
2140 #. type: Plain text
2141 #: build/C/man3/pthread_attr_setdetachstate.3:111
2142 #: build/C/man3/pthread_attr_setstack.3:156
2143 msgid "See B<pthread_attr_init>(3)."
2144 msgstr "B<pthread_attr_init>(3) を参照。"
2145
2146 #. type: Plain text
2147 #: build/C/man3/pthread_attr_setdetachstate.3:117
2148 msgid ""
2149 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2150 "B<pthread_join>(3), B<pthreads>(7)"
2151 msgstr ""
2152 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2153 "B<pthread_join>(3), B<pthreads>(7)"
2154
2155 #. type: TH
2156 #: build/C/man3/pthread_attr_setguardsize.3:26
2157 #, no-wrap
2158 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2159 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2160
2161 #. type: TH
2162 #: build/C/man3/pthread_attr_setguardsize.3:26
2163 #: build/C/man3/pthread_attr_setstack.3:26
2164 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2165 #, no-wrap
2166 msgid "2008-10-24"
2167 msgstr "2008-10-24"
2168
2169 #. type: Plain text
2170 #: build/C/man3/pthread_attr_setguardsize.3:30
2171 msgid ""
2172 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2173 "attribute in thread attributes object"
2174 msgstr ""
2175 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2176 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2177
2178 #. type: Plain text
2179 #: build/C/man3/pthread_attr_setguardsize.3:38
2180 #, no-wrap
2181 msgid ""
2182 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2183 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2184 msgstr ""
2185 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2186 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2187
2188 #. type: Plain text
2189 #: build/C/man3/pthread_attr_setguardsize.3:49
2190 msgid ""
2191 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2192 "of the thread attributes object referred to by I<attr> to the value "
2193 "specified in I<guardsize>."
2194 msgstr ""
2195 "B<pthread_attr_setguardsize>() 関数は、\n"
2196 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2197 "I<guardsize> で指定された値に設定する。"
2198
2199 #. type: Plain text
2200 #: build/C/man3/pthread_attr_setguardsize.3:59
2201 msgid ""
2202 "If I<guardsize> is greater than 0, then for each new thread created using "
2203 "I<attr> the system allocates an additional region of at least I<guardsize> "
2204 "bytes at the end of the thread's stack to act as the guard area for the "
2205 "stack (but see BUGS)."
2206 msgstr ""
2207 "I<guardsize> が 0 より大きい場合、\n"
2208 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2209 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2210 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2211 "機能する (ただし「バグ」の節も参照)。"
2212
2213 #. type: Plain text
2214 #: build/C/man3/pthread_attr_setguardsize.3:65
2215 msgid ""
2216 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2217 "guard area."
2218 msgstr ""
2219 "I<guardsize> が 0 の場合、\n"
2220 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2221
2222 #. type: Plain text
2223 #: build/C/man3/pthread_attr_setguardsize.3:67
2224 msgid "The default guard size is the same as the system page size."
2225 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2226
2227 #. type: Plain text
2228 #: build/C/man3/pthread_attr_setguardsize.3:82
2229 msgid ""
2230 "If the stack address attribute has been set in I<attr> (using "
2231 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2232 "that the caller is allocating the thread's stack, then the guard size "
2233 "attribute is ignored (i.e., no guard area is created by the system): it is "
2234 "the application's responsibility to handle stack overflow (perhaps by using "
2235 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2236 "it has allocated)."
2237 msgstr ""
2238 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2239 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2240 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2241 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2242 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2243 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2244 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2245
2246 #. type: Plain text
2247 #: build/C/man3/pthread_attr_setguardsize.3:90
2248 msgid ""
2249 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2250 "attribute of the thread attributes object referred to by I<attr> in the "
2251 "buffer pointed to by I<guardsize>."
2252 msgstr ""
2253 "B<pthread_attr_getguardsize>() は、\n"
2254 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2255 "I<guardsize> が指すバッファに入れて返す。"
2256
2257 #. type: Plain text
2258 #: build/C/man3/pthread_attr_setguardsize.3:104
2259 msgid ""
2260 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2261 "invalid.  On Linux these functions always succeed (but portable and future-"
2262 "proof applications should nevertheless handle a possible error return)."
2263 msgstr ""
2264 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2265 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2266 "Linux では、これらの関数は常に成功する\n"
2267 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2268 "正のエラーの返り値を処理するようにすべきである)。"
2269
2270 #. type: Plain text
2271 #: build/C/man3/pthread_attr_setguardsize.3:106
2272 #: build/C/man3/pthread_attr_setstackaddr.3:83
2273 #: build/C/man3/pthread_attr_setstacksize.3:83
2274 msgid "These functions are provided by glibc since version 2.1."
2275 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2276
2277 #. type: Plain text
2278 #: build/C/man3/pthread_attr_setguardsize.3:122
2279 msgid ""
2280 "A guard area consists of virtual memory pages that are protected to prevent "
2281 "read and write access.  If a thread overflows its stack into the guard area, "
2282 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2283 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2284 "guard size is internally rounded up to the system page size when creating a "
2285 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2286 "size that was set by B<pthread_attr_setguardsize>().)"
2287 msgstr ""
2288 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2289 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2290 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2291 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2292 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2293 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2294 "(その場合も B<pthread_attr_getguardsize>() では\n"
2295 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2296
2297 #. type: Plain text
2298 #: build/C/man3/pthread_attr_setguardsize.3:126
2299 msgid ""
2300 "Setting a guard size of 0 may be useful to save memory in an application "
2301 "that creates many threads and knows that stack overflow can never occur."
2302 msgstr ""
2303 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2304 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2305 "することで、メモリを節約できることもある。"
2306
2307 #. type: Plain text
2308 #: build/C/man3/pthread_attr_setguardsize.3:130
2309 msgid ""
2310 "Choosing a guard size larger than the default size may be necessary for "
2311 "detecting stack overflows if a thread allocates large data structures on the "
2312 "stack."
2313 msgstr ""
2314 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2315 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2316 "大きな guard size を選ぶ必要があるかもしれない。"
2317
2318 #. type: SH
2319 #: build/C/man3/pthread_attr_setguardsize.3:130
2320 #: build/C/man3/pthread_attr_setinheritsched.3:112
2321 #: build/C/man3/pthread_attr_setstacksize.3:96
2322 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2323 #, no-wrap
2324 msgid "BUGS"
2325 msgstr "バグ"
2326
2327 #. type: Plain text
2328 #: build/C/man3/pthread_attr_setguardsize.3:141
2329 msgid ""
2330 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2331 "within the stack size allocation, rather than allocating extra space at the "
2332 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2333 "error from B<pthread_create>(3)  if the guard size value is too large, "
2334 "leaving no space for the actual stack.)"
2335 msgstr ""
2336 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2337 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2338 "末尾に追加の領域を割り当てることが求められている。\n"
2339 "(このため、ガード領域が大きすぎて、\n"
2340 "実際のスタック用の場所がなくなってしまう場合、\n"
2341 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2342
2343 #.  glibc includes the guardsize within the allocated stack size,
2344 #.  which looks pretty clearly to be in violation of POSIX.
2345 #.  Filed bug, 22 Oct 2008:
2346 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2347 #.  Older reports:
2348 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2349 #.  Reportedly, LinuxThreads did the right thing, allocating
2350 #.  extra space at the end of the stack:
2351 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2352 #. type: Plain text
2353 #: build/C/man3/pthread_attr_setguardsize.3:155
2354 msgid ""
2355 "The obsolete LinuxThreads implementation did the right thing, allocating "
2356 "extra space at the end of the stack for the guard area."
2357 msgstr ""
2358 "廃止予定の LinuxThreads 実装では、\n"
2359 "POSIX.1 で求められている通りの動作で、\n"
2360 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2361
2362 #. type: Plain text
2363 #: build/C/man3/pthread_attr_setguardsize.3:158
2364 msgid "See B<pthread_getattr_np>(3)."
2365 msgstr "B<pthread_getattr_np>(3) を参照。"
2366
2367 #. type: Plain text
2368 #: build/C/man3/pthread_attr_setguardsize.3:166
2369 msgid ""
2370 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2371 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2372 msgstr ""
2373 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2374 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2375
2376 #. type: TH
2377 #: build/C/man3/pthread_attr_setinheritsched.3:26
2378 #, no-wrap
2379 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2380 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2381
2382 #. type: TH
2383 #: build/C/man3/pthread_attr_setinheritsched.3:26
2384 #: build/C/man3/pthread_attr_setscope.3:26
2385 #, no-wrap
2386 msgid "2013-04-19"
2387 msgstr "2013-04-19"
2388
2389 #. type: Plain text
2390 #: build/C/man3/pthread_attr_setinheritsched.3:30
2391 msgid ""
2392 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit-"
2393 "scheduler attribute in thread attributes object"
2394 msgstr "pthread_attr_setinheritsched, pthread_attr_getinheritsched - スレッド属性オブジェクトの inherit-scheduler 属性の設定/取得を行う"
2395
2396 #. type: Plain text
2397 #: build/C/man3/pthread_attr_setinheritsched.3:38
2398 #, no-wrap
2399 msgid ""
2400 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2401 "B<                                 int >I<inheritsched>B<);>\n"
2402 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2403 "B<                                 int *>I<inheritsched>B<);>\n"
2404 msgstr ""
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
2410 #. type: Plain text
2411 #: build/C/man3/pthread_attr_setinheritsched.3:55
2412 msgid ""
2413 "The B<pthread_attr_setinheritsched>()  function sets the inherit-scheduler "
2414 "attribute of the thread attributes object referred to by I<attr> to the "
2415 "value specified in I<inheritsched>.  The inherit-scheduler attribute "
2416 "determines whether a thread created using the thread attributes object "
2417 "I<attr> will inherit its scheduling attributes from the calling thread or "
2418 "whether it will take them from I<attr>."
2419 msgstr "B<pthread_attr_setinheritsched>() 関数は、 I<attr> が参照するスレッド属性オブジェクトの inherit-scheduler 属性を I<inheritsched> で指定された値に設定する。 inherit-scheduler 属性により、スレッド属性オブジェクト I<attr> を使って作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承するか、 I<attr> からスケジューリング属性を取得するかが決定される。"
2420
2421 #. type: Plain text
2422 #: build/C/man3/pthread_attr_setinheritsched.3:64
2423 msgid ""
2424 "The following scheduling attributes are affected by the inherit-scheduler "
2425 "attribute: scheduling policy (B<pthread_attr_setschedpolicy>(3)), scheduling "
2426 "priority (B<pthread_attr_setschedparam>(3)), and contention scope "
2427 "(B<pthread_attr_setscope>(3))."
2428 msgstr ""
2429
2430 #. type: Plain text
2431 #: build/C/man3/pthread_attr_setinheritsched.3:67
2432 msgid "The following values may be specified in I<inheritsched>:"
2433 msgstr "以下の値を I<inheritsched> に指定できる。"
2434
2435 #. type: TP
2436 #: build/C/man3/pthread_attr_setinheritsched.3:67
2437 #, no-wrap
2438 msgid "B<PTHREAD_INHERIT_SCHED>"
2439 msgstr "B<PTHREAD_INHERIT_SCHED>"
2440
2441 #. type: Plain text
2442 #: build/C/man3/pthread_attr_setinheritsched.3:75
2443 msgid ""
2444 "Threads that are created using I<attr> inherit scheduling attributes from "
2445 "the creating thread; the scheduling attributes in I<attr> are ignored."
2446 msgstr ""
2447 "I<attr> を使って作成されたスレッドは、\n"
2448 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2449 "I<attr> 内のスケジューリング属性は無視される。"
2450
2451 #. type: TP
2452 #: build/C/man3/pthread_attr_setinheritsched.3:75
2453 #, no-wrap
2454 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2455 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2456
2457 #.  FIXME what are the defaults for scheduler settings?
2458 #. type: Plain text
2459 #: build/C/man3/pthread_attr_setinheritsched.3:82
2460 msgid ""
2461 "Threads that are created using I<attr> take their scheduling attributes from "
2462 "the values specified by the attributes object."
2463 msgstr ""
2464 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2465 "指定された値からスケジューリング属性を取得する。"
2466
2467 #. type: Plain text
2468 #: build/C/man3/pthread_attr_setinheritsched.3:86
2469 msgid ""
2470 "The default setting of the inherit-scheduler attribute in a newly "
2471 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2472 msgstr "新たに初期化されたスレッド属性オブジェクトの inherit-scheduler 属性のデフォルト設定は B<PTHREAD_INHERIT_SCHED> である。"
2473
2474 #. type: Plain text
2475 #: build/C/man3/pthread_attr_setinheritsched.3:93
2476 msgid ""
2477 "The B<pthread_attr_getinheritsched>()  returns the inherit-scheduler "
2478 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2479 "by I<inheritsched>."
2480 msgstr "B<pthread_attr_getinheritsched>() は、 スレッド属性オブジェクト I<attr> の inherit-scheduler 属性を I<inheritsched> が指すバッファに入れて返す。"
2481
2482 #. type: Plain text
2483 #: build/C/man3/pthread_attr_setinheritsched.3:99
2484 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2485 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2486
2487 #. type: Plain text
2488 #: build/C/man3/pthread_attr_setinheritsched.3:103
2489 msgid "Invalid value in I<inheritsched>."
2490 msgstr "I<inheritsched> に無効な値が指定された。"
2491
2492 #.  .SH VERSIONS
2493 #.  Available since glibc 2.0.
2494 #. type: Plain text
2495 #: build/C/man3/pthread_attr_setinheritsched.3:110
2496 msgid ""
2497 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2498 "to set the attribute to an unsupported value\") for "
2499 "B<pthread_attr_setinheritsched>()."
2500 msgstr ""
2501 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2502 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2503 "も追加で規定されている。"
2504
2505 #.  FIXME . Track status of the following bug:
2506 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2507 #. type: Plain text
2508 #: build/C/man3/pthread_attr_setinheritsched.3:128
2509 msgid ""
2510 "As at glibc 2.8, if a thread attributes object is initialized using "
2511 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2512 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2513 "if the inherit-scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2514 "then a thread created using the attribute object wrongly inherits its "
2515 "scheduling attributes from the creating thread.  This bug does not occur if "
2516 "either the scheduling policy or scheduling priority attribute is explicitly "
2517 "set in the thread attributes object before calling B<pthread_create>(3)."
2518 msgstr "glibc 2.8 の時点では、スレッド属性オブジェクトが B<pthread_attr_init>(3) を使って初期化された場合、 スレッド属性オブジェクトのスケジューリングポリシーが B<SCHED_OTHER> に、 スケジューリング優先度が 0 に設定される。一方、その後 inherit-scheduler 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するスレッドのスケジューリング属性が間違って継承されてしまう。 B<pthread_create>(3) を呼び出す前にスケジューリングポリシー属性かスケジューリング優先度属性のどちらかが明示的に設定された場合には、 このバグは発生しない。"
2519
2520 #. type: Plain text
2521 #: build/C/man3/pthread_attr_setinheritsched.3:131
2522 #: build/C/man3/pthread_attr_setschedparam.3:109
2523 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2524 msgid "See B<pthread_setschedparam>(3)."
2525 msgstr "B<pthread_setschedparam>(3) を参照。"
2526
2527 #. type: Plain text
2528 #: build/C/man3/pthread_attr_setinheritsched.3:143
2529 msgid ""
2530 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2531 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2532 "B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>"
2533 "(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2534 msgstr "B<sched_setscheduler>(2), B<pthread_attr_init>(3), B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), B<pthread_attr_setscope>(3), B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>(3), B<pthreads>(7)"
2535
2536 #. type: TH
2537 #: build/C/man3/pthread_attr_setschedparam.3:26
2538 #, no-wrap
2539 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2540 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2541
2542 #. type: TH
2543 #: build/C/man3/pthread_attr_setschedparam.3:26
2544 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2545 #: build/C/man3/pthread_setname_np.3:26
2546 #, no-wrap
2547 msgid "2013-06-21"
2548 msgstr "2013-06-21"
2549
2550 #. type: Plain text
2551 #: build/C/man3/pthread_attr_setschedparam.3:30
2552 msgid ""
2553 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2554 "parameter attributes in thread attributes object"
2555 msgstr ""
2556 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2557 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2558
2559 #. type: Plain text
2560 #: build/C/man3/pthread_attr_setschedparam.3:38
2561 #, no-wrap
2562 msgid ""
2563 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2564 "B<                               const struct sched_param *>I<param>B<);>\n"
2565 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2566 "B<                               struct sched_param *>I<param>B<);>\n"
2567 msgstr ""
2568 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2569 "B<                               const struct sched_param *>I<param>B<);>\n"
2570 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2571 "B<                               struct sched_param *>I<param>B<);>\n"
2572
2573 #. type: Plain text
2574 #: build/C/man3/pthread_attr_setschedparam.3:52
2575 msgid ""
2576 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2577 "attributes of the thread attributes object referred to by I<attr> to the "
2578 "values specified in the buffer pointed to by I<param>.  These attributes "
2579 "determine the scheduling parameters of a thread created using the thread "
2580 "attributes object I<attr>."
2581 msgstr ""
2582 "B<pthread_attr_setschedparam>() 関数は、\n"
2583 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2584 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2585 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2586 "作成されるスレッドのスケジューリングパラメータが決定される。"
2587
2588 #. type: Plain text
2589 #: build/C/man3/pthread_attr_setschedparam.3:59
2590 msgid ""
2591 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2592 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2593 "by I<param>."
2594 msgstr ""
2595 "B<pthread_attr_getschedparam>() は、\n"
2596 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2597 "I<param> が指すバッファに入れて返す。"
2598
2599 #. type: Plain text
2600 #: build/C/man3/pthread_attr_setschedparam.3:61
2601 msgid "Scheduling parameters are maintained in the following structure:"
2602 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2603
2604 #. type: Plain text
2605 #: build/C/man3/pthread_attr_setschedparam.3:67
2606 #: build/C/man3/pthread_setschedparam.3:69
2607 #, no-wrap
2608 msgid ""
2609 "struct sched_param {\n"
2610 "    int sched_priority;     /* Scheduling priority */\n"
2611 "};\n"
2612 msgstr ""
2613 "struct sched_param {\n"
2614 "    int sched_priority;     /* Scheduling priority */\n"
2615 "};\n"
2616
2617 #. type: Plain text
2618 #: build/C/man3/pthread_attr_setschedparam.3:74
2619 #: build/C/man3/pthread_setschedparam.3:76
2620 msgid ""
2621 "As can be seen, only one scheduling parameter is supported.  For details of "
2622 "the permitted ranges for scheduling priorities in each scheduling policy, "
2623 "see B<sched_setscheduler>(2)."
2624 msgstr ""
2625 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2626 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2627 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2628
2629 #. type: Plain text
2630 #: build/C/man3/pthread_attr_setschedparam.3:85
2631 msgid ""
2632 "In order for the parameter setting made by B<pthread_attr_setschedparam>()  "
2633 "to have effect when calling B<pthread_create>(3), the caller must use "
2634 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2635 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2636 msgstr ""
2637
2638 #.  .SH VERSIONS
2639 #.  Available since glibc 2.0.
2640 #. type: Plain text
2641 #: build/C/man3/pthread_attr_setschedparam.3:100
2642 msgid ""
2643 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2644 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2645 "(but portable and future-proof applications should nevertheless handle a "
2646 "possible error return)."
2647 msgstr ""
2648 "POSIX.1 では、\n"
2649 "B<pthread_attr_setschedparam>() について\n"
2650 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2651 "Linux では、これらの関数は常に成功する\n"
2652 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2653 "正のエラーの返り値を処理するようにすべきである)。"
2654
2655 #. type: Plain text
2656 #: build/C/man3/pthread_attr_setschedparam.3:106
2657 msgid ""
2658 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2659 "policies supported on Linux."
2660 msgstr ""
2661 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2662 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2663
2664 #. type: Plain text
2665 #: build/C/man3/pthread_attr_setschedparam.3:121
2666 msgid ""
2667 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2668 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2669 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2670 "(3), B<pthreads>(7)"
2671 msgstr ""
2672 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2673 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2674 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2675 "(3), B<pthreads>(7)"
2676
2677 #. type: TH
2678 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2679 #, no-wrap
2680 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2681 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2682
2683 #. type: Plain text
2684 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2685 msgid ""
2686 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2687 "scheduling policy attribute in thread attributes object"
2688 msgstr ""
2689 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2690 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2691
2692 #. type: Plain text
2693 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2694 #, no-wrap
2695 msgid ""
2696 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2697 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2698 msgstr ""
2699 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2700 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2701
2702 #. type: Plain text
2703 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2704 msgid ""
2705 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2706 "attribute of the thread attributes object referred to by I<attr> to the "
2707 "value specified in I<policy>.  This attribute determines the scheduling "
2708 "policy of a thread created using the thread attributes object I<attr>."
2709 msgstr ""
2710 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2711 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2712 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2713 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2714 "作成されるスレッドのスケジューリングポリシーが決定される。"
2715
2716 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2717 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2718 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2719 #. type: Plain text
2720 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2721 msgid ""
2722 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2723 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2724 msgstr ""
2725 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2726 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2727 "である。"
2728
2729 #. type: Plain text
2730 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2731 msgid ""
2732 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2733 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2734 "by I<policy>."
2735 msgstr ""
2736 "B<pthread_attr_getschedpolicy>() は、\n"
2737 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2738 "I<policy> が指すバッファに入れて返す。"
2739
2740 #. type: Plain text
2741 #: build/C/man3/pthread_attr_setschedpolicy.3:83
2742 msgid ""
2743 "In order for the policy setting made by B<pthread_attr_setschedpolicy>()  to "
2744 "have effect when calling B<pthread_create>(3), the caller must use "
2745 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2746 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2747 msgstr ""
2748
2749 #. type: Plain text
2750 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2751 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2752 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2753
2754 #. type: Plain text
2755 #: build/C/man3/pthread_attr_setschedpolicy.3:93
2756 msgid "Invalid value in I<policy>."
2757 msgstr "I<policy> に無効な値が指定された。"
2758
2759 #.  .SH VERSIONS
2760 #.  Available since glibc 2.0.
2761 #. type: Plain text
2762 #: build/C/man3/pthread_attr_setschedpolicy.3:100
2763 msgid ""
2764 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2765 "to set the attribute to an unsupported value\") for "
2766 "B<pthread_attr_setschedpolicy>()."
2767 msgstr ""
2768 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2769 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2770 "も追加で規定されている。"
2771
2772 #. type: Plain text
2773 #: build/C/man3/pthread_attr_setschedpolicy.3:116
2774 msgid ""
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 msgstr ""
2780 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2781 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2782 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2783 "(3), B<pthreads>(7)"
2784
2785 #. type: TH
2786 #: build/C/man3/pthread_attr_setscope.3:26
2787 #, no-wrap
2788 msgid "PTHREAD_ATTR_SETSCOPE"
2789 msgstr "PTHREAD_ATTR_SETSCOPE"
2790
2791 #. type: Plain text
2792 #: build/C/man3/pthread_attr_setscope.3:30
2793 msgid ""
2794 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2795 "attribute in thread attributes object"
2796 msgstr ""
2797 "pthread_attr_setscope, pthread_attr_getscope - \n"
2798 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2799
2800 #. type: Plain text
2801 #: build/C/man3/pthread_attr_setscope.3:38
2802 #, no-wrap
2803 msgid ""
2804 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2805 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2806 msgstr ""
2807 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2808 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2809
2810 #. type: Plain text
2811 #: build/C/man3/pthread_attr_setscope.3:53
2812 msgid ""
2813 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2814 "of the thread attributes object referred to by I<attr> to the value "
2815 "specified in I<scope>.  The contention scope attribute defines the set of "
2816 "threads against which a thread competes for resources such as the CPU.  "
2817 "POSIX.1-2001 specifies two possible values for I<scope>:"
2818 msgstr ""
2819 "B<pthread_attr_setscope>() 関数は、\n"
2820 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2821 "属性を I<scope> で指定された値に設定する。\n"
2822 "contention scope 属性により、\n"
2823 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2824 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2825
2826 #. type: TP
2827 #: build/C/man3/pthread_attr_setscope.3:53
2828 #, no-wrap
2829 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2830 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2831
2832 #. type: Plain text
2833 #: build/C/man3/pthread_attr_setscope.3:61
2834 msgid ""
2835 "The thread competes for resources with all other threads in all processes on "
2836 "the system that are in the same scheduling allocation domain (a group of one "
2837 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2838 "to one another according to their scheduling policy and priority."
2839 msgstr ""
2840 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2841 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2842 "スレッドとリソースを取り合う。 \n"
2843 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2844 "優先度に基づき、互いに相対的にスケジューリングされる。"
2845
2846 #. type: TP
2847 #: build/C/man3/pthread_attr_setscope.3:61
2848 #, no-wrap
2849 msgid "B<PTHREAD_SCOPE_PROCESS>"
2850 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2851
2852 #. type: Plain text
2853 #: build/C/man3/pthread_attr_setscope.3:76
2854 msgid ""
2855 "The thread competes for resources with all other threads in the same process "
2856 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2857 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2858 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2859 "leaves it unspecified how these threads contend with other threads in other "
2860 "process on the system or with other threads in the same process that were "
2861 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2862 msgstr ""
2863 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2864 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2865 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2866 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2867 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2868 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2869 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2870 "規定されないままになっている。"
2871
2872 #. type: Plain text
2873 #: build/C/man3/pthread_attr_setscope.3:83
2874 msgid ""
2875 "POSIX.1-2001 requires that an implementation support at least one of these "
2876 "contention scopes.  Linux supports B<PTHREAD_SCOPE_SYSTEM>, but not "
2877 "B<PTHREAD_SCOPE_PROCESS>."
2878 msgstr "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention scope のうち少なくとも 1 つをサポートすることだけである。 Linux は B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、 B<PTHREAD_SCOPE_PROCESS> はサポートしていない。"
2879
2880 #. type: Plain text
2881 #: build/C/man3/pthread_attr_setscope.3:95
2882 msgid ""
2883 "On systems that support multiple contention scopes, then, in order for the "
2884 "parameter setting made by B<pthread_attr_setscope>()  to have effect when "
2885 "calling B<pthread_create>(3), the caller must use "
2886 "B<pthread_attr_setinheritsched>(3)  to set the inherit-scheduler attribute "
2887 "of the attributes object I<attr> to B<PTHREAD_EXPLICIT_SCHED>."
2888 msgstr ""
2889
2890 #. type: Plain text
2891 #: build/C/man3/pthread_attr_setscope.3:103
2892 msgid ""
2893 "The B<pthread_attr_getscope>()  function returns the contention scope "
2894 "attribute of the thread attributes object referred to by I<attr> in the "
2895 "buffer pointed to by I<scope>."
2896 msgstr ""
2897 "B<pthread_attr_getscope>() は、\n"
2898 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2899 "I<scope> が指すバッファに入れて返す。"
2900
2901 #. type: Plain text
2902 #: build/C/man3/pthread_attr_setscope.3:109
2903 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2904 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2905
2906 #. type: Plain text
2907 #: build/C/man3/pthread_attr_setscope.3:113
2908 msgid "An invalid value was specified in I<scope>."
2909 msgstr "I<scope> に無効な値が指定された。"
2910
2911 #. type: TP
2912 #: build/C/man3/pthread_attr_setscope.3:113
2913 #, no-wrap
2914 msgid "B<ENOTSUP>"
2915 msgstr "B<ENOTSUP>"
2916
2917 #. type: Plain text
2918 #: build/C/man3/pthread_attr_setscope.3:119
2919 msgid ""
2920 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2921 "supported on Linux."
2922 msgstr ""
2923 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
2924 "この値は Linux でサポートされていない。"
2925
2926 #. type: Plain text
2927 #: build/C/man3/pthread_attr_setscope.3:129
2928 msgid ""
2929 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
2930 "space thread is bound directly to a single kernel-scheduling entity.  This "
2931 "is the case on Linux for the obsolete LinuxThreads implementation and the "
2932 "modern NPTL implementation, which are both 1:1 threading implementations."
2933 msgstr ""
2934 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
2935 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
2936 "直接結び付けられる。\n"
2937 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
2938 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
2939
2940 #. type: Plain text
2941 #: build/C/man3/pthread_attr_setscope.3:132
2942 msgid ""
2943 "POSIX.1-2001 specifies that the default contention scope is implementation-"
2944 "defined."
2945 msgstr ""
2946 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
2947 "実装時で定義されるものと規定されている。"
2948
2949 #. type: Plain text
2950 #: build/C/man3/pthread_attr_setscope.3:142
2951 msgid ""
2952 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2953 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2954 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2955 msgstr ""
2956 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2957 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2958 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2959
2960 #. type: TH
2961 #: build/C/man3/pthread_attr_setstack.3:26
2962 #, no-wrap
2963 msgid "PTHREAD_ATTR_SETSTACK"
2964 msgstr "PTHREAD_ATTR_SETSTACK"
2965
2966 #. type: Plain text
2967 #: build/C/man3/pthread_attr_setstack.3:30
2968 msgid ""
2969 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
2970 "thread attributes object"
2971 msgstr ""
2972 "pthread_attr_setstack, pthread_attr_getstack - \n"
2973 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
2974
2975 #. type: Plain text
2976 #: build/C/man3/pthread_attr_setstack.3:38
2977 #, no-wrap
2978 msgid ""
2979 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
2980 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
2981 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
2982 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
2983 msgstr ""
2984 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
2985 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
2986 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
2987 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
2988
2989 #. type: Plain text
2990 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_sigqueue.3:41
2991 msgid ""
2992 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
2993 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
2994
2995 #. type: Plain text
2996 #: build/C/man3/pthread_attr_setstack.3:50
2997 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
2998 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
2999
3000 #. type: Plain text
3001 #: build/C/man3/pthread_attr_setstack.3:52
3002 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3003 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3004
3005 #. type: Plain text
3006 #: build/C/man3/pthread_attr_setstack.3:68
3007 msgid ""
3008 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3009 "size attributes of the thread attributes object referred to by I<attr> to "
3010 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3011 "attributes specify the location and size of the stack that should be used by "
3012 "a thread that is created using the thread attributes object I<attr>."
3013 msgstr ""
3014 "B<pthread_attr_setstack>() 関数は、\n"
3015 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3016 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3017 "指定された値に設定する。\n"
3018 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3019 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3020
3021 #. type: Plain text
3022 #: build/C/man3/pthread_attr_setstack.3:74
3023 msgid ""
3024 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3025 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3026 "allocated buffer should be both readable and writable."
3027 msgstr ""
3028 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3029 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3030 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3031 "べきである。"
3032
3033 #. type: Plain text
3034 #: build/C/man3/pthread_attr_setstack.3:85
3035 msgid ""
3036 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3037 "size attributes of the thread attributes object referred to by I<attr> in "
3038 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3039 msgstr ""
3040 "B<pthread_attr_getstack>() 関数は、\n"
3041 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3042 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3043 "指すバッファに入れて返す。"
3044
3045 #. type: Plain text
3046 #: build/C/man3/pthread_attr_setstack.3:91
3047 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3048 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3049
3050 #. type: Plain text
3051 #: build/C/man3/pthread_attr_setstack.3:102
3052 msgid ""
3053 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3054 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3055 "stacksize> is not suitably aligned."
3056 msgstr ""
3057 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3058 "システムによっては、 I<stackaddr> か\n"
3059 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3060 "このエラーが発生する。"
3061
3062 #. type: Plain text
3063 #: build/C/man3/pthread_attr_setstack.3:110
3064 msgid ""
3065 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3066 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3067 "caller."
3068 msgstr ""
3069 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3070 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3071 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3072
3073 #. type: Plain text
3074 #: build/C/man3/pthread_attr_setstack.3:112
3075 msgid "These functions are provided by glibc since version 2.2."
3076 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3077
3078 #. type: Plain text
3079 #: build/C/man3/pthread_attr_setstack.3:122
3080 msgid ""
3081 "These functions are provided for applications that must ensure that a "
3082 "thread's stack is placed in a particular location.  For most applications, "
3083 "this is not necessary, and the use of these functions should be avoided.  "
3084 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3085 "stack size other than the default.)"
3086 msgstr ""
3087 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3088 "しなければならないアプリケーションのために提供されている。\n"
3089 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3090 "これらの関数を使うのは避けるべきである。\n"
3091 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3092 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3093
3094 #. type: Plain text
3095 #: build/C/man3/pthread_attr_setstack.3:133
3096 msgid ""
3097 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3098 "responsibility of allocating the stack.  Any guard size value that was set "
3099 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3100 "is the application's responsibility to allocate a guard area (one or more "
3101 "pages protected against reading and writing)  to handle the possibility of "
3102 "stack overflow."
3103 msgstr ""
3104 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3105 "スタックの割り当てに責任を持つ必要がある。\n"
3106 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3107 "guard size の値は無視される。\n"
3108 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3109 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3110 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3111
3112 #. type: Plain text
3113 #: build/C/man3/pthread_attr_setstack.3:144
3114 msgid ""
3115 "The address specified in I<stackaddr> should be suitably aligned: for full "
3116 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3117 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3118 "should also be a multiple of the system page size."
3119 msgstr ""
3120 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3121 "完全な移植性を持たせるためには、\n"
3122 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3123 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3124 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3125
3126 #. type: Plain text
3127 #: build/C/man3/pthread_attr_setstack.3:153
3128 msgid ""
3129 "If I<attr> is used to create multiple threads, then the caller must change "
3130 "the stack address attribute between calls to B<pthread_create>(3); "
3131 "otherwise, the threads will attempt to use the same memory area for their "
3132 "stacks, and chaos will ensue."
3133 msgstr ""
3134 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3135 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3136 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3137 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3138 "使おうとするため、訳の分からない状況が発生してしまう。"
3139
3140 #. type: Plain text
3141 #: build/C/man3/pthread_attr_setstack.3:168
3142 msgid ""
3143 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3144 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3145 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3146 msgstr ""
3147 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3148 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3149 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3150
3151 #. type: TH
3152 #: build/C/man3/pthread_attr_setstackaddr.3:26
3153 #, no-wrap
3154 msgid "PTHREAD_ATTR_SETSTACKADDR"
3155 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3156
3157 #. type: Plain text
3158 #: build/C/man3/pthread_attr_setstackaddr.3:30
3159 msgid ""
3160 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3161 "attribute in thread attributes object"
3162 msgstr ""
3163 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3164 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3165
3166 #. type: Plain text
3167 #: build/C/man3/pthread_attr_setstackaddr.3:38
3168 #, no-wrap
3169 msgid ""
3170 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3171 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3172 msgstr ""
3173 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3174 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3175
3176 #. type: Plain text
3177 #: build/C/man3/pthread_attr_setstackaddr.3:49
3178 msgid ""
3179 "These functions are obsolete: B<do not use them.> Use "
3180 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3181 msgstr ""
3182 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3183 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3184 "うこと。"
3185
3186 #. type: Plain text
3187 #: build/C/man3/pthread_attr_setstackaddr.3:60
3188 msgid ""
3189 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3190 "attribute of the thread attributes object referred to by I<attr> to the "
3191 "value specified in I<stackaddr>.  This attribute specifies the location of "
3192 "the stack that should be used by a thread that is created using the thread "
3193 "attributes object I<attr>."
3194 msgstr ""
3195 "B<pthread_attr_setstackaddr>() 関数は、\n"
3196 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3197 "属性を I<stackaddr> で指定された値に設定する。\n"
3198 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3199 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3200
3201 #. type: Plain text
3202 #: build/C/man3/pthread_attr_setstackaddr.3:66
3203 msgid ""
3204 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3205 "that was allocated by the caller.  The pages of the allocated buffer should "
3206 "be both readable and writable."
3207 msgstr ""
3208 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3209 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3210 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3211 "なっているべきである。"
3212
3213 #. type: Plain text
3214 #: build/C/man3/pthread_attr_setstackaddr.3:74
3215 msgid ""
3216 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3217 "attribute of the thread attributes object referred to by I<attr> in the "
3218 "buffer pointed to by I<stackaddr>."
3219 msgstr ""
3220 "B<pthread_attr_getstackaddr>() は、\n"
3221 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3222 "I<stackaddr> が指すバッファに入れて返す。"
3223
3224 #. type: Plain text
3225 #: build/C/man3/pthread_attr_setstackaddr.3:81
3226 msgid ""
3227 "No errors are defined (but applications should nevertheless handle a "
3228 "possible error return)."
3229 msgstr ""
3230 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3231 "返り値を処理するようにすべきである)。"
3232
3233 #. type: Plain text
3234 #: build/C/man3/pthread_attr_setstackaddr.3:86
3235 msgid ""
3236 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3237 "POSIX.1-2008 removes the specification of these functions."
3238 msgstr ""
3239 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3240 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3241
3242 #. type: Plain text
3243 #: build/C/man3/pthread_attr_setstackaddr.3:110
3244 msgid ""
3245 "I<Do not use these functions!> They cannot be portably used, since they "
3246 "provide no way of specifying the direction of growth or the range of the "
3247 "stack.  For example, on architectures with a stack that grows downward, "
3248 "I<stackaddr> specifies the next address past the I<highest> address of the "
3249 "allocated stack area.  However, on architectures with a stack that grows "
3250 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3251 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3252 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3253 "in the allocated stack area (and the I<stacksize> argument specifies the "
3254 "range of the stack)."
3255 msgstr ""
3256 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3257 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3258 "かを指定する手段が提供されていないからである。\n"
3259 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3260 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3261 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3262 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3263 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3264 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3265 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3266 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3267
3268 #. type: Plain text
3269 #: build/C/man3/pthread_attr_setstackaddr.3:116
3270 msgid ""
3271 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3272 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3273 msgstr ""
3274 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3275 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3276
3277 #. type: TH
3278 #: build/C/man3/pthread_attr_setstacksize.3:26
3279 #, no-wrap
3280 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3281 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3282
3283 #. type: TH
3284 #: build/C/man3/pthread_attr_setstacksize.3:26
3285 #, no-wrap
3286 msgid "2012-03-15"
3287 msgstr "2012-03-15"
3288
3289 #. type: Plain text
3290 #: build/C/man3/pthread_attr_setstacksize.3:30
3291 msgid ""
3292 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3293 "attribute in thread attributes object"
3294 msgstr ""
3295 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3296 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3297
3298 #. type: Plain text
3299 #: build/C/man3/pthread_attr_setstacksize.3:38
3300 #, no-wrap
3301 msgid ""
3302 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3303 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3304 msgstr ""
3305 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3306 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3307
3308 #. type: Plain text
3309 #: build/C/man3/pthread_attr_setstacksize.3:49
3310 msgid ""
3311 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3312 "of the thread attributes object referred to by I<attr> to the value "
3313 "specified in I<stacksize>."
3314 msgstr ""
3315 "B<pthread_attr_setstacksize>() 関数は、\n"
3316 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3317 "属性を I<stacksize> で指定された値に設定する。"
3318
3319 #. type: Plain text
3320 #: build/C/man3/pthread_attr_setstacksize.3:53
3321 msgid ""
3322 "The stack size attribute determines the minimum size (in bytes) that will be "
3323 "allocated for threads created using the thread attributes object I<attr>."
3324 msgstr ""
3325 "スタックサイズ属性により、\n"
3326 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3327 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3328
3329 #. type: Plain text
3330 #: build/C/man3/pthread_attr_setstacksize.3:61
3331 msgid ""
3332 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3333 "attribute of the thread attributes object referred to by I<attr> in the "
3334 "buffer pointed to by I<stacksize>."
3335 msgstr ""
3336 "B<pthread_attr_getstacksize>() は、\n"
3337 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3338 "I<stacksize> が指すバッファに入れて返す。"
3339
3340 #. type: Plain text
3341 #: build/C/man3/pthread_attr_setstacksize.3:67
3342 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3343 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3344
3345 #. type: Plain text
3346 #: build/C/man3/pthread_attr_setstacksize.3:72
3347 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3348 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3349
3350 #.  e.g., MacOS
3351 #. type: Plain text
3352 #: build/C/man3/pthread_attr_setstacksize.3:81
3353 msgid ""
3354 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3355 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3356 msgstr ""
3357 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3358 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3359 "エラー B<EINVAL> で失敗する。"
3360
3361 #. type: Plain text
3362 #: build/C/man3/pthread_attr_setstacksize.3:88
3363 msgid ""
3364 "For details on the default stack size of new threads, see B<pthread_create>"
3365 "(3)."
3366 msgstr ""
3367 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3368 "B<pthread_create>(3) を参照。"
3369
3370 #. type: Plain text
3371 #: build/C/man3/pthread_attr_setstacksize.3:91
3372 msgid ""
3373 "A thread's stack size is fixed at the time of thread creation.  Only the "
3374 "main thread can dynamically grow its stack."
3375 msgstr ""
3376 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3377 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3378
3379 #. type: Plain text
3380 #: build/C/man3/pthread_attr_setstacksize.3:96
3381 msgid ""
3382 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3383 "the size and location of a caller-allocated stack that is to be used by a "
3384 "thread."
3385 msgstr ""
3386 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3387 "アプリケーションは、スレッドが使用するスタックとして、\n"
3388 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3389
3390 #. type: Plain text
3391 #: build/C/man3/pthread_attr_setstacksize.3:108
3392 msgid ""
3393 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3394 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3395 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3396 "stack will be at least I<stacksize> bytes."
3397 msgstr ""
3398 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3399 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3400 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3401 "これは POSIX.1-2001 に違反している。\n"
3402 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3403 "少なくとも I<stacksize> バイトになると書かれている。"
3404
3405 #. type: Plain text
3406 #: build/C/man3/pthread_attr_setstacksize.3:111
3407 #: build/C/man3/pthread_join.3:127
3408 msgid "See B<pthread_create>(3)."
3409 msgstr "B<pthread_create>(3) を参照。"
3410
3411 #. type: Plain text
3412 #: build/C/man3/pthread_attr_setstacksize.3:118
3413 msgid ""
3414 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3415 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3416 msgstr ""
3417 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3418 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3419
3420 #. type: TH
3421 #: build/C/man3/pthread_cancel.3:26
3422 #, no-wrap
3423 msgid "PTHREAD_CANCEL"
3424 msgstr "PTHREAD_CANCEL"
3425
3426 #. type: TH
3427 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3428 #, no-wrap
3429 msgid "2008-11-17"
3430 msgstr "2008-11-17"
3431
3432 #. type: Plain text
3433 #: build/C/man3/pthread_cancel.3:29
3434 msgid "pthread_cancel - send a cancellation request to a thread"
3435 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3436
3437 #. type: Plain text
3438 #: build/C/man3/pthread_cancel.3:34
3439 #, no-wrap
3440 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3441 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3442
3443 #. type: Plain text
3444 #: build/C/man3/pthread_cancel.3:49
3445 msgid ""
3446 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3447 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3448 "request depends on two attributes that are under the control of that thread: "
3449 "its cancelability I<state> and I<type>."
3450 msgstr ""
3451 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3452 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3453 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3454 "I<state> と I<type>により決まる。"
3455
3456 #. type: Plain text
3457 #: build/C/man3/pthread_cancel.3:61
3458 msgid ""
3459 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3460 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3461 "has disabled cancellation, then a cancellation request remains queued until "
3462 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3463 "its cancelability type determines when cancellation occurs."
3464 msgstr ""
3465 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3466 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3467 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3468 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3469 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3470 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3471
3472 #. type: Plain text
3473 #: build/C/man3/pthread_cancel.3:77
3474 msgid ""
3475 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3476 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3477 "Asynchronous cancelability means that the thread can be canceled at any time "
3478 "(usually immediately, but the system does not guarantee this).  Deferred "
3479 "cancelability means that cancellation will be delayed until the thread next "
3480 "calls a function that is a I<cancellation point>.  A list of functions that "
3481 "are or may be cancellation points is provided in I<pthreads>(7)."
3482 msgstr ""
3483 "スレッドのキャンセル種別 (cancelability type) は\n"
3484 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3485 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3486 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3487 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3488 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3489 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3490 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3491 "遅延される。取り消しポイントに設定されていたり設定\n"
3492 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3493
3494 #. type: Plain text
3495 #: build/C/man3/pthread_cancel.3:81
3496 msgid ""
3497 "When a cancellation requested is acted on, the following steps occur for "
3498 "I<thread> (in this order):"
3499 msgstr ""
3500 "キャンセル要求が実行されると、\n"
3501 "I<thread> では以下のステップが (この順序で) 行われる。"
3502
3503 #. type: IP
3504 #: build/C/man3/pthread_cancel.3:81 build/C/man3/pthread_cleanup_push.3:69
3505 #, no-wrap
3506 msgid "1."
3507 msgstr "1."
3508
3509 #. type: Plain text
3510 #: build/C/man3/pthread_cancel.3:86
3511 msgid ""
3512 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3513 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3514 msgstr ""
3515 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3516 "取り出され (pop され)、呼び出される。\n"
3517 "(B<pthread_cleanup_push>(3) 参照)"
3518
3519 #. type: IP
3520 #: build/C/man3/pthread_cancel.3:86 build/C/man3/pthread_cleanup_push.3:73
3521 #, no-wrap
3522 msgid "2."
3523 msgstr "2."
3524
3525 #. type: Plain text
3526 #: build/C/man3/pthread_cancel.3:91
3527 msgid ""
3528 "Thread-specific data destructors are called, in an unspecified order.  (See "
3529 "B<pthread_key_create>(3).)"
3530 msgstr ""
3531 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3532 "呼び出し順序は規定されていない。\n"
3533 "(B<pthread_key_create>(3) 参照)"
3534
3535 #. type: IP
3536 #: build/C/man3/pthread_cancel.3:91 build/C/man3/pthread_cleanup_push.3:83
3537 #, no-wrap
3538 msgid "3."
3539 msgstr "3."
3540
3541 #. type: Plain text
3542 #: build/C/man3/pthread_cancel.3:95
3543 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3544 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3545
3546 #. type: Plain text
3547 #: build/C/man3/pthread_cancel.3:103
3548 msgid ""
3549 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3550 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3551 "caller whether the cancellation request was successfully queued."
3552 msgstr ""
3553 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3554 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3555 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3556
3557 #. type: Plain text
3558 #: build/C/man3/pthread_cancel.3:112
3559 msgid ""
3560 "After a canceled thread has terminated, a join with that thread using "
3561 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3562 "status.  (Joining with a thread is the only way to know that cancellation "
3563 "has completed.)"
3564 msgstr ""
3565 "キャンセルされたスレッドが終了された後に、\n"
3566 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3567 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3568 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3569
3570 #. type: Plain text
3571 #: build/C/man3/pthread_cancel.3:117
3572 msgid ""
3573 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3574 "error number."
3575 msgstr ""
3576 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3577 "エラーの場合、0 以外のエラー番号を返す。"
3578
3579 #. type: TP
3580 #: build/C/man3/pthread_cancel.3:118 build/C/man3/pthread_detach.3:59
3581 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3582 #: build/C/man3/pthread_kill.3:61 build/C/man3/pthread_setaffinity_np.3:114
3583 #: build/C/man3/pthread_setschedparam.3:114
3584 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3585 #, no-wrap
3586 msgid "B<ESRCH>"
3587 msgstr "B<ESRCH>"
3588
3589 #. type: Plain text
3590 #: build/C/man3/pthread_cancel.3:125 build/C/man3/pthread_detach.3:64
3591 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3592 #: build/C/man3/pthread_kill.3:66 build/C/man3/pthread_setaffinity_np.3:119
3593 #: build/C/man3/pthread_setschedparam.3:119
3594 #: build/C/man3/pthread_setschedprio.3:75
3595 msgid "No thread with the ID I<thread> could be found."
3596 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3597
3598 #. type: Plain text
3599 #: build/C/man3/pthread_cancel.3:135
3600 msgid ""
3601 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3602 "threading implementation, the first real-time signal (i.e., signal 32) is "
3603 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3604 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3605 msgstr ""
3606 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3607 "は、\n"
3608 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3609 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3610 "ム\n"
3611 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3612
3613 #. type: Plain text
3614 #: build/C/man3/pthread_cancel.3:141
3615 msgid ""
3616 "The program below creates a thread and then cancels it.  The main thread "
3617 "joins with the canceled thread to check that its exit status was "
3618 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3619 "run the program:"
3620 msgstr ""
3621 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3622 "る。\n"
3623 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3624 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3625 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3626
3627 #. type: Plain text
3628 #: build/C/man3/pthread_cancel.3:149
3629 #, no-wrap
3630 msgid ""
3631 "$ ./a.out\n"
3632 "thread_func(): started; cancellation disabled\n"
3633 "main(): sending cancellation request\n"
3634 "thread_func(): about to enable cancellation\n"
3635 "main(): thread was canceled\n"
3636 msgstr ""
3637 "$ ./a.out\n"
3638 "thread_func(): started; cancellation disabled\n"
3639 "main(): sending cancellation request\n"
3640 "thread_func(): about to enable cancellation\n"
3641 "main(): thread was canceled\n"
3642
3643 #. type: Plain text
3644 #: build/C/man3/pthread_cancel.3:159
3645 #, no-wrap
3646 msgid ""
3647 "#include E<lt>pthread.hE<gt>\n"
3648 "#include E<lt>stdio.hE<gt>\n"
3649 "#include E<lt>errno.hE<gt>\n"
3650 "#include E<lt>stdlib.hE<gt>\n"
3651 "#include E<lt>unistd.hE<gt>\n"
3652 msgstr ""
3653 "#include E<lt>pthread.hE<gt>\n"
3654 "#include E<lt>stdio.hE<gt>\n"
3655 "#include E<lt>errno.hE<gt>\n"
3656 "#include E<lt>stdlib.hE<gt>\n"
3657 "#include E<lt>unistd.hE<gt>\n"
3658
3659 #. type: Plain text
3660 #: build/C/man3/pthread_cancel.3:167
3661 #, no-wrap
3662 msgid ""
3663 "static void *\n"
3664 "thread_func(void *ignored_argument)\n"
3665 "{\n"
3666 "    int s;\n"
3667 msgstr ""
3668 "static void *\n"
3669 "thread_func(void *ignored_argument)\n"
3670 "{\n"
3671 "    int s;\n"
3672
3673 #. type: Plain text
3674 #: build/C/man3/pthread_cancel.3:170
3675 #, no-wrap
3676 msgid ""
3677 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3678 "       immediately react to a cancellation request */\n"
3679 msgstr ""
3680 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3681 "       immediately react to a cancellation request */\n"
3682
3683 #. type: Plain text
3684 #: build/C/man3/pthread_cancel.3:174
3685 #, no-wrap
3686 msgid ""
3687 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3688 "    if (s != 0)\n"
3689 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3690 msgstr ""
3691 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3692 "    if (s != 0)\n"
3693 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3694
3695 #. type: Plain text
3696 #: build/C/man3/pthread_cancel.3:178
3697 #, no-wrap
3698 msgid ""
3699 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3700 "    sleep(5);\n"
3701 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3702 msgstr ""
3703 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3704 "    sleep(5);\n"
3705 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3706
3707 #. type: Plain text
3708 #: build/C/man3/pthread_cancel.3:182
3709 #, no-wrap
3710 msgid ""
3711 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3712 "    if (s != 0)\n"
3713 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3714 msgstr ""
3715 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3716 "    if (s != 0)\n"
3717 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3718
3719 #. type: Plain text
3720 #: build/C/man3/pthread_cancel.3:184
3721 #, no-wrap
3722 msgid "    /* sleep() is a cancellation point */\n"
3723 msgstr "    /* sleep() is a cancellation point */\n"
3724
3725 #. type: Plain text
3726 #: build/C/man3/pthread_cancel.3:186
3727 #, no-wrap
3728 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3729 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3730
3731 #. type: Plain text
3732 #: build/C/man3/pthread_cancel.3:188
3733 #, no-wrap
3734 msgid "    /* Should never get here */\n"
3735 msgstr "    /* Should never get here */\n"
3736
3737 #. type: Plain text
3738 #: build/C/man3/pthread_cancel.3:192
3739 #, no-wrap
3740 msgid ""
3741 "    printf(\"thread_func(): not canceled!\\en\");\n"
3742 "    return NULL;\n"
3743 "}\n"
3744 msgstr ""
3745 "    printf(\"thread_func(): not canceled!\\en\");\n"
3746 "    return NULL;\n"
3747 "}\n"
3748
3749 #. type: Plain text
3750 #: build/C/man3/pthread_cancel.3:199
3751 #, no-wrap
3752 msgid ""
3753 "int\n"
3754 "main(void)\n"
3755 "{\n"
3756 "    pthread_t thr;\n"
3757 "    void *res;\n"
3758 "    int s;\n"
3759 msgstr ""
3760 "int\n"
3761 "main(void)\n"
3762 "{\n"
3763 "    pthread_t thr;\n"
3764 "    void *res;\n"
3765 "    int s;\n"
3766
3767 #. type: Plain text
3768 #: build/C/man3/pthread_cancel.3:201
3769 #, no-wrap
3770 msgid "    /* Start a thread and then send it a cancellation request */\n"
3771 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3772
3773 #. type: Plain text
3774 #: build/C/man3/pthread_cancel.3:205
3775 #, no-wrap
3776 msgid ""
3777 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3778 "    if (s != 0)\n"
3779 "        handle_error_en(s, \"pthread_create\");\n"
3780 msgstr ""
3781 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3782 "    if (s != 0)\n"
3783 "        handle_error_en(s, \"pthread_create\");\n"
3784
3785 #. type: Plain text
3786 #: build/C/man3/pthread_cancel.3:207
3787 #, no-wrap
3788 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3789 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3790
3791 #. type: Plain text
3792 #: build/C/man3/pthread_cancel.3:212
3793 #, no-wrap
3794 msgid ""
3795 "    printf(\"main(): sending cancellation request\\en\");\n"
3796 "    s = pthread_cancel(thr);\n"
3797 "    if (s != 0)\n"
3798 "        handle_error_en(s, \"pthread_cancel\");\n"
3799 msgstr ""
3800 "    printf(\"main(): sending cancellation request\\en\");\n"
3801 "    s = pthread_cancel(thr);\n"
3802 "    if (s != 0)\n"
3803 "        handle_error_en(s, \"pthread_cancel\");\n"
3804
3805 #. type: Plain text
3806 #: build/C/man3/pthread_cancel.3:214
3807 #, no-wrap
3808 msgid "    /* Join with thread to see what its exit status was */\n"
3809 msgstr "    /* Join with thread to see what its exit status was */\n"
3810
3811 #. type: Plain text
3812 #: build/C/man3/pthread_cancel.3:218 build/C/man3/pthread_cleanup_push.3:307
3813 #, no-wrap
3814 msgid ""
3815 "    s = pthread_join(thr, &res);\n"
3816 "    if (s != 0)\n"
3817 "        handle_error_en(s, \"pthread_join\");\n"
3818 msgstr ""
3819 "    s = pthread_join(thr, &res);\n"
3820 "    if (s != 0)\n"
3821 "        handle_error_en(s, \"pthread_join\");\n"
3822
3823 #. type: Plain text
3824 #: build/C/man3/pthread_cancel.3:225
3825 #, no-wrap
3826 msgid ""
3827 "    if (res == PTHREAD_CANCELED)\n"
3828 "        printf(\"main(): thread was canceled\\en\");\n"
3829 "    else\n"
3830 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3831 "    exit(EXIT_SUCCESS);\n"
3832 "}\n"
3833 msgstr ""
3834 "    if (res == PTHREAD_CANCELED)\n"
3835 "        printf(\"main(): thread was canceled\\en\");\n"
3836 "    else\n"
3837 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3838 "    exit(EXIT_SUCCESS);\n"
3839 "}\n"
3840
3841 #. type: Plain text
3842 #: build/C/man3/pthread_cancel.3:238
3843 msgid ""
3844 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3845 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3846 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3847 msgstr ""
3848 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3849 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3850 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3851
3852 #. type: TH
3853 #: build/C/man3/pthread_cleanup_push.3:26
3854 #, no-wrap
3855 msgid "PTHREAD_CLEANUP_PUSH"
3856 msgstr "PTHREAD_CLEANUP_PUSH"
3857
3858 #. type: TH
3859 #: build/C/man3/pthread_cleanup_push.3:26
3860 #: build/C/man3/pthread_setcancelstate.3:26
3861 #, no-wrap
3862 msgid "2008-11-24"
3863 msgstr "2008-11-24"
3864
3865 #. type: Plain text
3866 #: build/C/man3/pthread_cleanup_push.3:30
3867 msgid ""
3868 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3869 "clean-up handlers"
3870 msgstr ""
3871 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3872 "キャンセルクリーンアップハンドラの push/pop を行う"
3873
3874 #. type: Plain text
3875 #: build/C/man3/pthread_cleanup_push.3:37
3876 #, no-wrap
3877 msgid ""
3878 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3879 "B<                          void *>I<arg>B<);>\n"
3880 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3881 msgstr ""
3882 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3883 "B<                          void *>I<arg>B<);>\n"
3884 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3885
3886 #. type: Plain text
3887 #: build/C/man3/pthread_cleanup_push.3:48
3888 msgid ""
3889 "These functions manipulate the calling thread's stack of thread-cancellation "
3890 "clean-up handlers.  A clean-up handler is a function that is automatically "
3891 "executed when a thread is canceled (or in various other circumstances "
3892 "described below); it might, for example, unlock a mutex so that it becomes "
3893 "available to other threads in the process."
3894 msgstr ""
3895 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3896 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3897 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3898 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3899 "他のスレッドが利用できるようにする関数などが考えられる。"
3900
3901 #. type: Plain text
3902 #: build/C/man3/pthread_cleanup_push.3:59
3903 msgid ""
3904 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3905 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3906 "be given I<arg> as its argument."
3907 msgstr ""
3908 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3909 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3910 "起動される際には、 I<arg> が関数の引き数と渡される。"
3911
3912 #. type: Plain text
3913 #: build/C/man3/pthread_cleanup_push.3:66
3914 msgid ""
3915 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3916 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3917 "nonzero."
3918 msgstr ""
3919 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3920 "スタックの一番上のルーチンを削除する。\n"
3921 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3922
3923 #. type: Plain text
3924 #: build/C/man3/pthread_cleanup_push.3:69
3925 msgid ""
3926 "A cancellation clean-up handler is popped from the stack and executed in the "
3927 "following circumstances:"
3928 msgstr ""
3929 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3930 "スタックから取り出され実行される。"
3931
3932 #. type: Plain text
3933 #: build/C/man3/pthread_cleanup_push.3:73
3934 msgid ""
3935 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3936 "and executed in the reverse of the order in which they were pushed onto the "
3937 "stack."
3938 msgstr ""
3939 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3940 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3941 "実行は、スタックに登録されたのと逆の順序で行われる。"
3942
3943 #. type: Plain text
3944 #: build/C/man3/pthread_cleanup_push.3:83
3945 msgid ""
3946 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
3947 "handlers are executed as described in the preceding point.  (Clean-up "
3948 "handlers are I<not> called if the thread terminates by performing a "
3949 "I<return> from the thread start function.)"
3950 msgstr ""
3951 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
3952 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
3953 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
3954 "は、クリーンアップハンドラはI<呼び出されない>。)"
3955
3956 #. type: Plain text
3957 #: build/C/man3/pthread_cleanup_push.3:89
3958 msgid ""
3959 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
3960 "argument, the top-most clean-up handler is popped and executed."
3961 msgstr ""
3962 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
3963 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
3964 "実行される。"
3965
3966 #. type: Plain text
3967 #: build/C/man3/pthread_cleanup_push.3:101
3968 msgid ""
3969 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
3970 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
3971 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
3972 "calls to these functions are paired within the same function, and at the "
3973 "same lexical nesting level.  (In other words, a clean-up handler is "
3974 "established only during the execution of a specified section of code.)"
3975 msgstr ""
3976 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
3977 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
3978 "して実装することを許容している。\n"
3979 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
3980 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
3981 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
3982 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
3983
3984 #. type: Plain text
3985 #: build/C/man3/pthread_cleanup_push.3:121
3986 msgid ""
3987 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
3988 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
3989 "()  without the matching call of the pair since the jump buffer was filled "
3990 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
3991 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
3992 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
3993 "(3))  inside the handler."
3994 msgstr ""
3995 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
3996 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
3997 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
3998 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
3999 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4000 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4001 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4002 "結果になるかは不定である。"
4003
4004 #. type: Plain text
4005 #: build/C/man3/pthread_cleanup_push.3:123
4006 msgid "These functions do not return a value."
4007 msgstr "これらの関数は値を返さない。"
4008
4009 #.  SH VERSIONS
4010 #.  Available since glibc 2.0
4011 #. type: Plain text
4012 #: build/C/man3/pthread_cleanup_push.3:127
4013 msgid "There are no errors."
4014 msgstr "エラーはない。"
4015
4016 #. type: Plain text
4017 #: build/C/man3/pthread_cleanup_push.3:140
4018 msgid ""
4019 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4020 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4021 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4022 "declared within the scope of paired calls to these functions will be visible "
4023 "within only that scope."
4024 msgstr ""
4025 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4026 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4027 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4028 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4029 "ということを意味している。"
4030
4031 #.  The text was actually added in the 2004 TC2
4032 #. type: Plain text
4033 #: build/C/man3/pthread_cleanup_push.3:155
4034 msgid ""
4035 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4036 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4037 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4038 "avoid doing this."
4039 msgstr ""
4040 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4041 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4042 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4043 "不定であると書かれている。\n"
4044 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4045
4046 #. type: Plain text
4047 #: build/C/man3/pthread_cleanup_push.3:170
4048 msgid ""
4049 "The program below provides a simple example of the use of the functions "
4050 "described in this page.  The program creates a thread that executes a loop "
4051 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4052 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4053 "what command-line arguments are supplied, the main thread sends the other "
4054 "thread a cancellation request, or sets a global variable that causes the "
4055 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4056 msgstr ""
4057 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4058 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4059 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4060 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4061 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4062 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4063 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4064 "設定したりする。"
4065
4066 #. type: Plain text
4067 #: build/C/man3/pthread_cleanup_push.3:173
4068 msgid ""
4069 "In the following shell session, the main thread sends a cancellation request "
4070 "to the other thread:"
4071 msgstr ""
4072 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4073 "キャンセル要求を送信する。"
4074
4075 #. type: Plain text
4076 #: build/C/man3/pthread_cleanup_push.3:183
4077 #, no-wrap
4078 msgid ""
4079 "$ B<./a.out>\n"
4080 "New thread started\n"
4081 "cnt = 0\n"
4082 "cnt = 1\n"
4083 "Canceling thread\n"
4084 "Called clean-up handler\n"
4085 "Thread was canceled; cnt = 0\n"
4086 msgstr ""
4087 "$ B<./a.out>\n"
4088 "New thread started\n"
4089 "cnt = 0\n"
4090 "cnt = 1\n"
4091 "Canceling thread\n"
4092 "Called clean-up handler\n"
4093 "Thread was canceled; cnt = 0\n"
4094
4095 #. type: Plain text
4096 #: build/C/man3/pthread_cleanup_push.3:191
4097 msgid ""
4098 "From the above, we see that the thread was canceled, and that the "
4099 "cancellation clean-up handler was called and it reset the value of the "
4100 "global variable I<cnt> to 0."
4101 msgstr ""
4102 "上記の実行例から、スレッドがキャンセルされ、\n"
4103 "キャンセルクリーンアップハンドラが呼び出され、\n"
4104 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4105
4106 #. type: Plain text
4107 #: build/C/man3/pthread_cleanup_push.3:194
4108 msgid ""
4109 "In the next run, the main program sets a global variable that causes other "
4110 "thread to terminate normally:"
4111 msgstr ""
4112 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4113 "もう一つのスレッドが正常終了するようにしている。"
4114
4115 #. type: Plain text
4116 #: build/C/man3/pthread_cleanup_push.3:202
4117 #, no-wrap
4118 msgid ""
4119 "$ B<./a.out x>\n"
4120 "New thread started\n"
4121 "cnt = 0\n"
4122 "cnt = 1\n"
4123 "Thread terminated normally; cnt = 2\n"
4124 msgstr ""
4125 "$ B<./a.out x>\n"
4126 "New thread started\n"
4127 "cnt = 0\n"
4128 "cnt = 1\n"
4129 "Thread terminated normally; cnt = 2\n"
4130
4131 #. type: Plain text
4132 #: build/C/man3/pthread_cleanup_push.3:210
4133 msgid ""
4134 "From the above, we see that the clean-up handler was not executed (because "
4135 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4136 msgstr ""
4137 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4138 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4139 "分かる。"
4140
4141 #. type: Plain text
4142 #: build/C/man3/pthread_cleanup_push.3:215
4143 msgid ""
4144 "In the next run, the main program sets a global variable that causes the "
4145 "other thread to terminate normally, and supplies a nonzero value for "
4146 "I<cleanup_pop_arg>:"
4147 msgstr ""
4148 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4149 "もう一つのスレッドが正常終了するようにし、さらに\n"
4150 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4151
4152 #. type: Plain text
4153 #: build/C/man3/pthread_cleanup_push.3:224
4154 #, no-wrap
4155 msgid ""
4156 "$ B<./a.out x 1>\n"
4157 "New thread started\n"
4158 "cnt = 0\n"
4159 "cnt = 1\n"
4160 "Called clean-up handler\n"
4161 "Thread terminated normally; cnt = 0\n"
4162 msgstr ""
4163 "$ B<./a.out x 1>\n"
4164 "New thread started\n"
4165 "cnt = 0\n"
4166 "cnt = 1\n"
4167 "Called clean-up handler\n"
4168 "Thread terminated normally; cnt = 0\n"
4169
4170 #. type: Plain text
4171 #: build/C/man3/pthread_cleanup_push.3:231
4172 msgid ""
4173 "In the above, we see that although the thread was not canceled, the clean-up "
4174 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4175 "()  was nonzero."
4176 msgstr ""
4177 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4178 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4179 "に 0 以外を渡したからである。"
4180
4181 #. type: Plain text
4182 #: build/C/man3/pthread_cleanup_push.3:240
4183 #, no-wrap
4184 msgid ""
4185 "#include E<lt>pthread.hE<gt>\n"
4186 "#include E<lt>sys/types.hE<gt>\n"
4187 "#include E<lt>stdio.hE<gt>\n"
4188 "#include E<lt>stdlib.hE<gt>\n"
4189 "#include E<lt>unistd.hE<gt>\n"
4190 "#include E<lt>errno.hE<gt>\n"
4191 msgstr ""
4192 "#include E<lt>pthread.hE<gt>\n"
4193 "#include E<lt>sys/types.hE<gt>\n"
4194 "#include E<lt>stdio.hE<gt>\n"
4195 "#include E<lt>stdlib.hE<gt>\n"
4196 "#include E<lt>unistd.hE<gt>\n"
4197 "#include E<lt>errno.hE<gt>\n"
4198
4199 #. type: Plain text
4200 #: build/C/man3/pthread_cleanup_push.3:247
4201 #, no-wrap
4202 msgid ""
4203 "static int done = 0;\n"
4204 "static int cleanup_pop_arg = 0;\n"
4205 "static int cnt = 0;\n"
4206 msgstr ""
4207 "static int done = 0;\n"
4208 "static int cleanup_pop_arg = 0;\n"
4209 "static int cnt = 0;\n"
4210
4211 #. type: Plain text
4212 #: build/C/man3/pthread_cleanup_push.3:254
4213 #, no-wrap
4214 msgid ""
4215 "static void\n"
4216 "cleanup_handler(void *arg)\n"
4217 "{\n"
4218 "    printf(\"Called clean-up handler\\en\");\n"
4219 "    cnt = 0;\n"
4220 "}\n"
4221 msgstr ""
4222 "static void\n"
4223 "cleanup_handler(void *arg)\n"
4224 "{\n"
4225 "    printf(\"Called clean-up handler\\en\");\n"
4226 "    cnt = 0;\n"
4227 "}\n"
4228
4229 #. type: Plain text
4230 #: build/C/man3/pthread_cleanup_push.3:259
4231 #, no-wrap
4232 msgid ""
4233 "static void *\n"
4234 "thread_start(void *arg)\n"
4235 "{\n"
4236 "    time_t start, curr;\n"
4237 msgstr ""
4238 "static void *\n"
4239 "thread_start(void *arg)\n"
4240 "{\n"
4241 "    time_t start, curr;\n"
4242
4243 #. type: Plain text
4244 #: build/C/man3/pthread_cleanup_push.3:261
4245 #, no-wrap
4246 msgid "    printf(\"New thread started\\en\");\n"
4247 msgstr "    printf(\"New thread started\\en\");\n"
4248
4249 #. type: Plain text
4250 #: build/C/man3/pthread_cleanup_push.3:263
4251 #, no-wrap
4252 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4253 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4254
4255 #. type: Plain text
4256 #: build/C/man3/pthread_cleanup_push.3:265
4257 #, no-wrap
4258 msgid "    curr = start = time(NULL);\n"
4259 msgstr "    curr = start = time(NULL);\n"
4260
4261 #. type: Plain text
4262 #: build/C/man3/pthread_cleanup_push.3:274
4263 #, no-wrap
4264 msgid ""
4265 "    while (!done) {\n"
4266 "        pthread_testcancel();           /* A cancellation point */\n"
4267 "        if (curr E<lt> time(NULL)) {\n"
4268 "            curr = time(NULL);\n"
4269 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4270 "            cnt++;\n"
4271 "        }\n"
4272 "    }\n"
4273 msgstr ""
4274 "    while (!done) {\n"
4275 "        pthread_testcancel();           /* A cancellation point */\n"
4276 "        if (curr E<lt> time(NULL)) {\n"
4277 "            curr = time(NULL);\n"
4278 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4279 "            cnt++;\n"
4280 "        }\n"
4281 "    }\n"
4282
4283 #. type: Plain text
4284 #: build/C/man3/pthread_cleanup_push.3:278
4285 #, no-wrap
4286 msgid ""
4287 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4288 "    return NULL;\n"
4289 "}\n"
4290 msgstr ""
4291 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4292 "    return NULL;\n"
4293 "}\n"
4294
4295 #. type: Plain text
4296 #: build/C/man3/pthread_cleanup_push.3:285
4297 #, no-wrap
4298 msgid ""
4299 "int\n"
4300 "main(int argc, char *argv[])\n"
4301 "{\n"
4302 "    pthread_t thr;\n"
4303 "    int s;\n"
4304 "    void *res;\n"
4305 msgstr ""
4306 "int\n"
4307 "main(int argc, char *argv[])\n"
4308 "{\n"
4309 "    pthread_t thr;\n"
4310 "    int s;\n"
4311 "    void *res;\n"
4312
4313 #. type: Plain text
4314 #: build/C/man3/pthread_cleanup_push.3:289
4315 #, no-wrap
4316 msgid ""
4317 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4318 "    if (s != 0)\n"
4319 "        handle_error_en(s, \"pthread_create\");\n"
4320 msgstr ""
4321 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4322 "    if (s != 0)\n"
4323 "        handle_error_en(s, \"pthread_create\");\n"
4324
4325 #. type: Plain text
4326 #: build/C/man3/pthread_cleanup_push.3:291
4327 #, no-wrap
4328 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4329 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4330
4331 #. type: Plain text
4332 #: build/C/man3/pthread_cleanup_push.3:296
4333 #, no-wrap
4334 msgid ""
4335 "    if (argc E<gt> 1) {\n"
4336 "        if (argc E<gt> 2)\n"
4337 "            cleanup_pop_arg = atoi(argv[2]);\n"
4338 "        done = 1;\n"
4339 msgstr ""
4340 "    if (argc E<gt> 1) {\n"
4341 "        if (argc E<gt> 2)\n"
4342 "            cleanup_pop_arg = atoi(argv[2]);\n"
4343 "        done = 1;\n"
4344
4345 #. type: Plain text
4346 #: build/C/man3/pthread_cleanup_push.3:303
4347 #, no-wrap
4348 msgid ""
4349 "    } else {\n"
4350 "        printf(\"Canceling thread\\en\");\n"
4351 "        s = pthread_cancel(thr);\n"
4352 "        if (s != 0)\n"
4353 "            handle_error_en(s, \"pthread_cancel\");\n"
4354 "    }\n"
4355 msgstr ""
4356 "    } else {\n"
4357 "        printf(\"Canceling thread\\en\");\n"
4358 "        s = pthread_cancel(thr);\n"
4359 "        if (s != 0)\n"
4360 "            handle_error_en(s, \"pthread_cancel\");\n"
4361 "    }\n"
4362
4363 #. type: Plain text
4364 #: build/C/man3/pthread_cleanup_push.3:314
4365 #, no-wrap
4366 msgid ""
4367 "    if (res == PTHREAD_CANCELED)\n"
4368 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4369 "    else\n"
4370 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4371 "    exit(EXIT_SUCCESS);\n"
4372 "}\n"
4373 msgstr ""
4374 "    if (res == PTHREAD_CANCELED)\n"
4375 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4376 "    else\n"
4377 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4378 "    exit(EXIT_SUCCESS);\n"
4379 "}\n"
4380
4381 #. type: Plain text
4382 #: build/C/man3/pthread_cleanup_push.3:321
4383 msgid ""
4384 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4385 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4386 msgstr ""
4387 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4388 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4389
4390 #. type: TH
4391 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4392 #, no-wrap
4393 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4394 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4395
4396 #. type: TH
4397 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4398 #, no-wrap
4399 msgid "2008-12-04"
4400 msgstr "2008-12-04"
4401
4402 #. type: Plain text
4403 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4404 msgid ""
4405 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4406 "thread cancellation clean-up handlers while saving cancelability type"
4407 msgstr ""
4408 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4409 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4410 "の push/pop を行う"
4411
4412 #. type: Plain text
4413 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4414 #, no-wrap
4415 msgid ""
4416 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4417 "B<                                   void *>I<arg>B<);>\n"
4418 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4419 msgstr ""
4420 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4421 "B<                                   void *>I<arg>B<);>\n"
4422 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4423
4424 #. type: Plain text
4425 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4426 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4427 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4428 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4429 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4430 #: build/C/man3/pthread_yield.3:37
4431 msgid "Compile and link with I<-pthread>."
4432 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4433
4434 #. type: Plain text
4435 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4436 msgid ""
4437 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4438 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4439 msgstr ""
4440 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4441 "だが、このページで説明する点が異なる。"
4442
4443 #. type: Plain text
4444 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4445 msgid ""
4446 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4447 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4448 "addition, it also saves the thread's current cancelability type, and sets "
4449 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4450 "this ensures that cancellation clean-up will occur even if the thread's "
4451 "cancelability type was \"asynchronous\" before the call."
4452 msgstr ""
4453 "B<pthread_cleanup_push>(3) と同様に、\n"
4454 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4455 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4456 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4457 "保存し、cancelability type は \"deferred\" に設定する\n"
4458 "(B<pthread_setcanceltype>(3) 参照)。\n"
4459 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4460 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4461 "が保証される。"
4462
4463 #. type: Plain text
4464 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4465 msgid ""
4466 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4467 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4468 "up handlers.  In addition, it restores the thread's cancelability type to "
4469 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4470 msgstr ""
4471 "B<pthread_cleanup_pop>(3) と同様に、\n"
4472 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4473 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4474 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4475 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4476
4477 #. type: Plain text
4478 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4479 msgid ""
4480 "The caller must ensure that calls to these functions are paired within the "
4481 "same function, and at the same lexical nesting level.  Other restrictions "
4482 "apply, as described in B<pthread_cleanup_push>(3)."
4483 msgstr ""
4484 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4485 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4486 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4487 "適用される。"
4488
4489 #. type: Plain text
4490 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4491 msgid "This sequence of calls:"
4492 msgstr "以下の一連の呼び出し"
4493
4494 #. type: Plain text
4495 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4496 #, no-wrap
4497 msgid ""
4498 "pthread_cleanup_push_defer_np(routine, arg);\n"
4499 "pthread_cleanup_pop_restore_np(execute);\n"
4500 msgstr ""
4501 "pthread_cleanup_push_defer_np(routine, arg);\n"
4502 "pthread_cleanup_pop_restore_np(execute);\n"
4503
4504 #. type: Plain text
4505 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4506 msgid "is equivalent to (but shorter and more efficient than):"
4507 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4508
4509 #. type: Plain text
4510 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4511 #, no-wrap
4512 msgid "int oldtype;\n"
4513 msgstr "int oldtype;\n"
4514
4515 #. type: Plain text
4516 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4517 #, no-wrap
4518 msgid ""
4519 "pthread_cleanup_push(routine, arg);\n"
4520 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4521 "\\&...\n"
4522 "pthread_setcanceltype(oldtype, NULL);\n"
4523 "pthread_cleanup_pop(execute);\n"
4524 msgstr ""
4525 "pthread_cleanup_push(routine, arg);\n"
4526 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4527 "\\&...\n"
4528 "pthread_setcanceltype(oldtype, NULL);\n"
4529 "pthread_cleanup_pop(execute);\n"
4530
4531 #. type: Plain text
4532 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4533 msgid ""
4534 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4535 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4536 msgstr ""
4537 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4538 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4539
4540 #. type: TH
4541 #: build/C/man3/pthread_create.3:26
4542 #, no-wrap
4543 msgid "PTHREAD_CREATE"
4544 msgstr "PTHREAD_CREATE"
4545
4546 #. type: TH
4547 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_sigmask.3:26
4548 #, no-wrap
4549 msgid "2012-08-03"
4550 msgstr "2012-08-03"
4551
4552 #. type: Plain text
4553 #: build/C/man3/pthread_create.3:29
4554 msgid "pthread_create - create a new thread"
4555 msgstr "pthread_create - 新しいスレッドを作成する"
4556
4557 #. type: Plain text
4558 #: build/C/man3/pthread_create.3:35
4559 #, no-wrap
4560 msgid ""
4561 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4562 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4563 msgstr ""
4564 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4565 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4566
4567 #. type: Plain text
4568 #: build/C/man3/pthread_create.3:47
4569 msgid ""
4570 "The B<pthread_create>()  function starts a new thread in the calling "
4571 "process.  The new thread starts execution by invoking I<start_routine>(); "
4572 "I<arg> is passed as the sole argument of I<start_routine>()."
4573 msgstr ""
4574 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4575 "る。\n"
4576 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4577 "I<start_routine>() は引き数を一つだけ取り、\n"
4578 "I<arg> が I<start_routine>() の引き数として渡される。"
4579
4580 #. type: Plain text
4581 #: build/C/man3/pthread_create.3:49
4582 msgid "The new thread terminates in one of the following ways:"
4583 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4584
4585 #. type: IP
4586 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4587 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4588 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4589 #: build/C/man3/pthread_getattr_np.3:58
4590 #, no-wrap
4591 msgid "*"
4592 msgstr "*"
4593
4594 #. type: Plain text
4595 #: build/C/man3/pthread_create.3:55
4596 msgid ""
4597 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4598 "available to another thread in the same process that calls B<pthread_join>"
4599 "(3)."
4600 msgstr ""
4601 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4602 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4603 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4604 "別のスレッドで参照できる。"
4605
4606 #. type: Plain text
4607 #: build/C/man3/pthread_create.3:63
4608 msgid ""
4609 "It returns from I<start_routine>().  This is equivalent to calling "
4610 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4611 msgstr ""
4612 "スレッドが I<start_routine>() から返る。これは、\n"
4613 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4614
4615 #. type: Plain text
4616 #: build/C/man3/pthread_create.3:66
4617 msgid "It is canceled (see B<pthread_cancel>(3))."
4618 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4619
4620 #. type: Plain text
4621 #: build/C/man3/pthread_create.3:72
4622 msgid ""
4623 "Any of the threads in the process calls B<exit>(3), or the main thread "
4624 "performs a return from I<main>().  This causes the termination of all "
4625 "threads in the process."
4626 msgstr ""
4627 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4628 "メインスレッドで I<main>() 内で return が実行される。\n"
4629 "この場合は、プロセス内の全てのスレッドが終了される。"
4630
4631 #. type: Plain text
4632 #: build/C/man3/pthread_create.3:86
4633 msgid ""
4634 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4635 "are used at thread creation time to determine attributes for the new thread; "
4636 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4637 "functions.  If I<attr> is NULL, then the thread is created with default "
4638 "attributes."
4639 msgstr ""
4640 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4641 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4642 "新しいスレッドの属性が決定される。\n"
4643 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4644 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4645
4646 #. type: Plain text
4647 #: build/C/man3/pthread_create.3:93
4648 msgid ""
4649 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4650 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4651 "used to refer to the thread in subsequent calls to other pthreads functions."
4652 msgstr ""
4653 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4654 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4655 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4656
4657 #. type: Plain text
4658 #: build/C/man3/pthread_create.3:101
4659 msgid ""
4660 "The new thread inherits a copy of the creating thread's signal mask "
4661 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4662 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4663 "thread's alternate signal stack (B<sigaltstack>(2))."
4664 msgstr ""
4665 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4666 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4667 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4668 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4669 "(B<sigaltstack>(2)) を継承しない。"
4670
4671 #. type: Plain text
4672 #: build/C/man3/pthread_create.3:104
4673 msgid ""
4674 "The new thread inherits the calling thread's floating-point environment "
4675 "(B<fenv>(3))."
4676 msgstr ""
4677 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4678 "を継承する。"
4679
4680 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4681 #. type: Plain text
4682 #: build/C/man3/pthread_create.3:109
4683 msgid ""
4684 "The initial value of the new thread's CPU-time clock is 0 (see "
4685 "B<pthread_getcpuclockid>(3))."
4686 msgstr ""
4687 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4688 "(B<pthread_getcpuclockid>(3) 参照)。"
4689
4690 #. type: SS
4691 #: build/C/man3/pthread_create.3:109
4692 #, no-wrap
4693 msgid "Linux-specific details"
4694 msgstr "Linux 固有の詳細"
4695
4696 #. type: Plain text
4697 #: build/C/man3/pthread_create.3:115
4698 msgid ""
4699 "The new thread inherits copies of the calling thread's capability sets (see "
4700 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4701 msgstr ""
4702 "新しいスレッドは、呼び出したスレッドの\n"
4703 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4704 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4705 "コピーをを継承しない。"
4706
4707 #. type: Plain text
4708 #: build/C/man3/pthread_create.3:122
4709 msgid ""
4710 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4711 "number, and the contents of I<*thread> are undefined."
4712 msgstr ""
4713 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4714 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4715
4716 #. type: TP
4717 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4718 #, no-wrap
4719 msgid "B<EAGAIN>"
4720 msgstr "B<EAGAIN>"
4721
4722 #. type: Plain text
4723 #: build/C/man3/pthread_create.3:137
4724 msgid ""
4725 "Insufficient resources to create another thread, or a system-imposed limit "
4726 "on the number of threads was encountered.  The latter case may occur in two "
4727 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4728 "which limits the number of process for a real user ID, was reached; or the "
4729 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4730 "threads-max>, was reached."
4731 msgstr ""
4732 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4733 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4734 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4735 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4736 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4737 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4738
4739 #. type: Plain text
4740 #: build/C/man3/pthread_create.3:141
4741 msgid "Invalid settings in I<attr>."
4742 msgstr "I<attr> で指定された設定が不正である。"
4743
4744 #. type: TP
4745 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4746 #: build/C/man3/pthread_setschedprio.3:66
4747 #, no-wrap
4748 msgid "B<EPERM>"
4749 msgstr "B<EPERM>"
4750
4751 #. type: Plain text
4752 #: build/C/man3/pthread_create.3:146
4753 msgid ""
4754 "No permission to set the scheduling policy and parameters specified in "
4755 "I<attr>."
4756 msgstr ""
4757 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4758 "設定する許可がない。"
4759
4760 #. type: Plain text
4761 #: build/C/man3/pthread_create.3:160
4762 msgid ""
4763 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4764 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4765 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4766 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4767 msgstr ""
4768 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4769 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4770 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4771 "B<pthread_create>() の呼び出し後に、\n"
4772 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4773 "次に実行されるかは決まっていない。"
4774
4775 #. type: Plain text
4776 #: build/C/man3/pthread_create.3:180
4777 msgid ""
4778 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4779 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4780 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4781 "has been joined are the last of its resources released back to the system.  "
4782 "When a detached thread terminates, its resources are automatically released "
4783 "back to the system: it is not possible to join with the thread in order to "
4784 "obtain its exit status.  Making a thread detached is useful for some types "
4785 "of daemon threads whose exit status the application does not need to care "
4786 "about.  By default, a new thread is created in a joinable state, unless "
4787 "I<attr> was set to create the thread in a detached state (using "
4788 "B<pthread_attr_setdetachstate>(3))."
4789 msgstr ""
4790 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4791 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4792 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4793 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4794 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4795 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4796 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4797 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4798 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4799 "デーモン (daemon) スレッドでは有用である。\n"
4800 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4801 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4802 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4803 "作成される。"
4804
4805 #.  FIXME . Perhaps some of the following detail should be in
4806 #.  a future pthread_attr_setstacksize(3) page.
4807 #. type: Plain text
4808 #: build/C/man3/pthread_create.3:196
4809 msgid ""
4810 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4811 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4812 "resource limit I<at the time the program started> has any value other than "
4813 "\"unlimited\", then it determines the default stack size of new threads.  "
4814 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4815 "explicitly set in the I<attr> argument used to create a thread, in order to "
4816 "obtain a stack size other than the default."
4817 msgstr ""
4818 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4819 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4820 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4821 "フォルトのスタックサイズとなる。\n"
4822 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4823 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4824 "デフォルト値以外のスタックサイズを得ることができる。"
4825
4826 #. type: Plain text
4827 #: build/C/man3/pthread_create.3:202
4828 msgid ""
4829 "In the obsolete LinuxThreads implementation, each of the threads in a "
4830 "process has a different process ID.  This is in violation of the POSIX "
4831 "threads specification, and is the source of many other nonconformances to "
4832 "the standard; see B<pthreads>(7)."
4833 msgstr ""
4834 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4835 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4836 "他の多くの標準非準拠の点の原因になっている。\n"
4837 "B<pthreads>(7) を参照のこと。"
4838
4839 #. type: Plain text
4840 #: build/C/man3/pthread_create.3:206
4841 msgid ""
4842 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4843 "number of other functions in the pthreads API."
4844 msgstr ""
4845 "以下のプログラムは、 B<pthread_create>() や\n"
4846 "pthreads API の他のいろいろな関数の使用例を示している。"
4847
4848 #. type: Plain text
4849 #: build/C/man3/pthread_create.3:211
4850 msgid ""
4851 "In the following run, on a system providing the NPTL threading "
4852 "implementation, the stack size defaults to the value given by the \"stack "
4853 "size\" resource limit:"
4854 msgstr ""
4855 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4856 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4857 "になる。"
4858
4859 #. type: Plain text
4860 #: build/C/man3/pthread_create.3:223
4861 #, no-wrap
4862 msgid ""
4863 "$B< ulimit -s>\n"
4864 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4865 "$B< ./a.out hola salut servus>\n"
4866 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4867 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4868 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4869 "Joined with thread 1; returned value was HOLA\n"
4870 "Joined with thread 2; returned value was SALUT\n"
4871 "Joined with thread 3; returned value was SERVUS\n"
4872 msgstr ""
4873 "$B< ulimit -s>\n"
4874 "8192            # The stack size limit is 8 MB (0x800000 bytes)\n"
4875 "$B< ./a.out hola salut servus>\n"
4876 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4877 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4878 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4879 "Joined with thread 1; returned value was HOLA\n"
4880 "Joined with thread 2; returned value was SALUT\n"
4881 "Joined with thread 3; returned value was SERVUS\n"
4882
4883 #. type: Plain text
4884 #: build/C/man3/pthread_create.3:229
4885 msgid ""
4886 "In the next run, the program explicitly sets a stack size of 1MB (using "
4887 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4888 msgstr ""
4889 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4890 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4891 "明示的に設定している。"
4892
4893 #. type: Plain text
4894 #: build/C/man3/pthread_create.3:239
4895 #, no-wrap
4896 msgid ""
4897 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4898 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4899 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4900 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4901 "Joined with thread 1; returned value was HOLA\n"
4902 "Joined with thread 2; returned value was SALUT\n"
4903 "Joined with thread 3; returned value was SERVUS\n"
4904 msgstr ""
4905 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4906 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4907 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4908 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4909 "Joined with thread 1; returned value was HOLA\n"
4910 "Joined with thread 2; returned value was SALUT\n"
4911 "Joined with thread 3; returned value was SERVUS\n"
4912
4913 #. type: Plain text
4914 #: build/C/man3/pthread_create.3:251
4915 #, no-wrap
4916 msgid ""
4917 "#include E<lt>pthread.hE<gt>\n"
4918 "#include E<lt>string.hE<gt>\n"
4919 "#include E<lt>stdio.hE<gt>\n"
4920 "#include E<lt>stdlib.hE<gt>\n"
4921 "#include E<lt>unistd.hE<gt>\n"
4922 "#include E<lt>errno.hE<gt>\n"
4923 "#include E<lt>ctype.hE<gt>\n"
4924 msgstr ""
4925 "#include E<lt>pthread.hE<gt>\n"
4926 "#include E<lt>string.hE<gt>\n"
4927 "#include E<lt>stdio.hE<gt>\n"
4928 "#include E<lt>stdlib.hE<gt>\n"
4929 "#include E<lt>unistd.hE<gt>\n"
4930 "#include E<lt>errno.hE<gt>\n"
4931 "#include E<lt>ctype.hE<gt>\n"
4932
4933 #. type: Plain text
4934 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:110
4935 #, no-wrap
4936 msgid ""
4937 "#define handle_error(msg) \\e\n"
4938 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4939 msgstr ""
4940 "#define handle_error(msg) \\e\n"
4941 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4942
4943 #. type: Plain text
4944 #: build/C/man3/pthread_create.3:263
4945 #, no-wrap
4946 msgid ""
4947 "struct thread_info {    /* Used as argument to thread_start() */\n"
4948 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4949 "    int       thread_num;       /* Application-defined thread # */\n"
4950 "    char     *argv_string;      /* From command-line argument */\n"
4951 "};\n"
4952 msgstr ""
4953 "struct thread_info {    /* Used as argument to thread_start() */\n"
4954 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4955 "    int       thread_num;       /* Application-defined thread # */\n"
4956 "    char     *argv_string;      /* From command-line argument */\n"
4957 "};\n"
4958
4959 #. type: Plain text
4960 #: build/C/man3/pthread_create.3:266
4961 #, no-wrap
4962 msgid ""
4963 "/* Thread start function: display address near top of our stack,\n"
4964 "   and return upper-cased copy of argv_string */\n"
4965 msgstr ""
4966 "/* Thread start function: display address near top of our stack,\n"
4967 "   and return upper-cased copy of argv_string */\n"
4968
4969 #. type: Plain text
4970 #: build/C/man3/pthread_create.3:272
4971 #, no-wrap
4972 msgid ""
4973 "static void *\n"
4974 "thread_start(void *arg)\n"
4975 "{\n"
4976 "    struct thread_info *tinfo = arg;\n"
4977 "    char *uargv, *p;\n"
4978 msgstr ""
4979 "static void *\n"
4980 "thread_start(void *arg)\n"
4981 "{\n"
4982 "    struct thread_info *tinfo = arg;\n"
4983 "    char *uargv, *p;\n"
4984
4985 #. type: Plain text
4986 #: build/C/man3/pthread_create.3:275
4987 #, no-wrap
4988 msgid ""
4989 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
4990 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
4991 msgstr ""
4992 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
4993 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
4994
4995 #. type: Plain text
4996 #: build/C/man3/pthread_create.3:279
4997 #, no-wrap
4998 msgid ""
4999 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5000 "    if (uargv == NULL)\n"
5001 "        handle_error(\"strdup\");\n"
5002 msgstr ""
5003 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5004 "    if (uargv == NULL)\n"
5005 "        handle_error(\"strdup\");\n"
5006
5007 #. type: Plain text
5008 #: build/C/man3/pthread_create.3:282
5009 #, no-wrap
5010 msgid ""
5011 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5012 "        *p = toupper(*p);\n"
5013 msgstr ""
5014 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5015 "        *p = toupper(*p);\n"
5016
5017 #. type: Plain text
5018 #: build/C/man3/pthread_create.3:285
5019 #, no-wrap
5020 msgid ""
5021 "    return uargv;\n"
5022 "}\n"
5023 msgstr ""
5024 "    return uargv;\n"
5025 "}\n"
5026
5027 #. type: Plain text
5028 #: build/C/man3/pthread_create.3:294
5029 #, no-wrap
5030 msgid ""
5031 "int\n"
5032 "main(int argc, char *argv[])\n"
5033 "{\n"
5034 "    int s, tnum, opt, num_threads;\n"
5035 "    struct thread_info *tinfo;\n"
5036 "    pthread_attr_t attr;\n"
5037 "    int stack_size;\n"
5038 "    void *res;\n"
5039 msgstr ""
5040 "int\n"
5041 "main(int argc, char *argv[])\n"
5042 "{\n"
5043 "    int s, tnum, opt, num_threads;\n"
5044 "    struct thread_info *tinfo;\n"
5045 "    pthread_attr_t attr;\n"
5046 "    int stack_size;\n"
5047 "    void *res;\n"
5048
5049 #. type: Plain text
5050 #: build/C/man3/pthread_create.3:296
5051 #, no-wrap
5052 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5053 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5054
5055 #. type: Plain text
5056 #: build/C/man3/pthread_create.3:303
5057 #, no-wrap
5058 msgid ""
5059 "    stack_size = -1;\n"
5060 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5061 "        switch (opt) {\n"
5062 "        case \\(aqs\\(aq:\n"
5063 "            stack_size = strtoul(optarg, NULL, 0);\n"
5064 "            break;\n"
5065 msgstr ""
5066 "    stack_size = -1;\n"
5067 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5068 "        switch (opt) {\n"
5069 "        case \\(aqs\\(aq:\n"
5070 "            stack_size = strtoul(optarg, NULL, 0);\n"
5071 "            break;\n"
5072
5073 #. type: Plain text
5074 #: build/C/man3/pthread_create.3:310
5075 #, no-wrap
5076 msgid ""
5077 "        default:\n"
5078 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5079 "                    argv[0]);\n"
5080 "            exit(EXIT_FAILURE);\n"
5081 "        }\n"
5082 "    }\n"
5083 msgstr ""
5084 "        default:\n"
5085 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5086 "                    argv[0]);\n"
5087 "            exit(EXIT_FAILURE);\n"
5088 "        }\n"
5089 "    }\n"
5090
5091 #. type: Plain text
5092 #: build/C/man3/pthread_create.3:312
5093 #, no-wrap
5094 msgid "    num_threads = argc - optind;\n"
5095 msgstr "    num_threads = argc - optind;\n"
5096
5097 #. type: Plain text
5098 #: build/C/man3/pthread_create.3:314
5099 #, no-wrap
5100 msgid "    /* Initialize thread creation attributes */\n"
5101 msgstr "    /* Initialize thread creation attributes */\n"
5102
5103 #. type: Plain text
5104 #: build/C/man3/pthread_create.3:318
5105 #, no-wrap
5106 msgid ""
5107 "    s = pthread_attr_init(&attr);\n"
5108 "    if (s != 0)\n"
5109 "        handle_error_en(s, \"pthread_attr_init\");\n"
5110 msgstr ""
5111 "    s = pthread_attr_init(&attr);\n"
5112 "    if (s != 0)\n"
5113 "        handle_error_en(s, \"pthread_attr_init\");\n"
5114
5115 #. type: Plain text
5116 #: build/C/man3/pthread_create.3:324
5117 #, no-wrap
5118 msgid ""
5119 "    if (stack_size E<gt> 0) {\n"
5120 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5121 "        if (s != 0)\n"
5122 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5123 "    }\n"
5124 msgstr ""
5125 "    if (stack_size E<gt> 0) {\n"
5126 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5127 "        if (s != 0)\n"
5128 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5129 "    }\n"
5130
5131 #. type: Plain text
5132 #: build/C/man3/pthread_create.3:326
5133 #, no-wrap
5134 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5135 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5136
5137 #. type: Plain text
5138 #: build/C/man3/pthread_create.3:330
5139 #, no-wrap
5140 msgid ""
5141 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5142 "    if (tinfo == NULL)\n"
5143 "        handle_error(\"calloc\");\n"
5144 msgstr ""
5145 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5146 "    if (tinfo == NULL)\n"
5147 "        handle_error(\"calloc\");\n"
5148
5149 #. type: Plain text
5150 #: build/C/man3/pthread_create.3:332
5151 #, no-wrap
5152 msgid "    /* Create one thread for each command-line argument */\n"
5153 msgstr "    /* Create one thread for each command-line argument */\n"
5154
5155 #. type: Plain text
5156 #: build/C/man3/pthread_create.3:336
5157 #, no-wrap
5158 msgid ""
5159 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5160 "        tinfo[tnum].thread_num = tnum + 1;\n"
5161 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5162 msgstr ""
5163 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5164 "        tinfo[tnum].thread_num = tnum + 1;\n"
5165 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5166
5167 #. type: Plain text
5168 #: build/C/man3/pthread_create.3:339
5169 #, no-wrap
5170 msgid ""
5171 "        /* The pthread_create() call stores the thread ID into\n"
5172 "           corresponding element of tinfo[] */\n"
5173 msgstr ""
5174 "        /* The pthread_create() call stores the thread ID into\n"
5175 "           corresponding element of tinfo[] */\n"
5176
5177 #. type: Plain text
5178 #: build/C/man3/pthread_create.3:345
5179 #, no-wrap
5180 msgid ""
5181 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5182 "                           &thread_start, &tinfo[tnum]);\n"
5183 "        if (s != 0)\n"
5184 "            handle_error_en(s, \"pthread_create\");\n"
5185 "    }\n"
5186 msgstr ""
5187 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5188 "                           &thread_start, &tinfo[tnum]);\n"
5189 "        if (s != 0)\n"
5190 "            handle_error_en(s, \"pthread_create\");\n"
5191 "    }\n"
5192
5193 #. type: Plain text
5194 #: build/C/man3/pthread_create.3:348
5195 #, no-wrap
5196 msgid ""
5197 "    /* Destroy the thread attributes object, since it is no\n"
5198 "       longer needed */\n"
5199 msgstr ""
5200 "    /* Destroy the thread attributes object, since it is no\n"
5201 "       longer needed */\n"
5202
5203 #. type: Plain text
5204 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5205 #, no-wrap
5206 msgid ""
5207 "    s = pthread_attr_destroy(&attr);\n"
5208 "    if (s != 0)\n"
5209 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5210 msgstr ""
5211 "    s = pthread_attr_destroy(&attr);\n"
5212 "    if (s != 0)\n"
5213 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5214
5215 #. type: Plain text
5216 #: build/C/man3/pthread_create.3:354
5217 #, no-wrap
5218 msgid "    /* Now join with each thread, and display its returned value */\n"
5219 msgstr "    /* Now join with each thread, and display its returned value */\n"
5220
5221 #. type: Plain text
5222 #: build/C/man3/pthread_create.3:359
5223 #, no-wrap
5224 msgid ""
5225 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5226 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5227 "        if (s != 0)\n"
5228 "            handle_error_en(s, \"pthread_join\");\n"
5229 msgstr ""
5230 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5231 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5232 "        if (s != 0)\n"
5233 "            handle_error_en(s, \"pthread_join\");\n"
5234
5235 #. type: Plain text
5236 #: build/C/man3/pthread_create.3:364
5237 #, no-wrap
5238 msgid ""
5239 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5240 "                tinfo[tnum].thread_num, (char *) res);\n"
5241 "        free(res);      /* Free memory allocated by thread */\n"
5242 "    }\n"
5243 msgstr ""
5244 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5245 "                tinfo[tnum].thread_num, (char *) res);\n"
5246 "        free(res);      /* Free memory allocated by thread */\n"
5247 "    }\n"
5248
5249 #. type: Plain text
5250 #: build/C/man3/pthread_create.3:368
5251 #, no-wrap
5252 msgid ""
5253 "    free(tinfo);\n"
5254 "    exit(EXIT_SUCCESS);\n"
5255 "}\n"
5256 msgstr ""
5257 "    free(tinfo);\n"
5258 "    exit(EXIT_SUCCESS);\n"
5259 "}\n"
5260
5261 #. type: Plain text
5262 #: build/C/man3/pthread_create.3:382
5263 msgid ""
5264 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5265 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5266 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5267 "(7)"
5268 msgstr ""
5269 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5270 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5271 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5272 "(7)"
5273
5274 #. type: TH
5275 #: build/C/man3/pthread_detach.3:26
5276 #, no-wrap
5277 msgid "PTHREAD_DETACH"
5278 msgstr "PTHREAD_DETACH"
5279
5280 #. type: TH
5281 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5282 #, no-wrap
5283 msgid "2008-11-27"
5284 msgstr "2008-11-27"
5285
5286 #. type: Plain text
5287 #: build/C/man3/pthread_detach.3:29
5288 msgid "pthread_detach - detach a thread"
5289 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5290
5291 #. type: Plain text
5292 #: build/C/man3/pthread_detach.3:34
5293 #, no-wrap
5294 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5295 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5296
5297 #. type: Plain text
5298 #: build/C/man3/pthread_detach.3:46
5299 msgid ""
5300 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5301 "as detached.  When a detached thread terminates, its resources are "
5302 "automatically released back to the system without the need for another "
5303 "thread to join with the terminated thread."
5304 msgstr ""
5305 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5306 "detached (切り離された状態) という印を付ける。\n"
5307 "detached 状態のスレッドが終了すると、\n"
5308 "別のスレッドが終了されたスレッドを join しなくても、\n"
5309 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5310
5311 #. type: Plain text
5312 #: build/C/man3/pthread_detach.3:49
5313 msgid ""
5314 "Attempting to detach an already detached thread results in unspecified "
5315 "behavior."
5316 msgstr ""
5317 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5318 "どのような結果となるかは規定されていない。"
5319
5320 #. type: Plain text
5321 #: build/C/man3/pthread_detach.3:54
5322 msgid ""
5323 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5324 "number."
5325 msgstr ""
5326 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5327 "エラーの場合、エラー番号を返す。"
5328
5329 #. type: Plain text
5330 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5331 msgid "I<thread> is not a joinable thread."
5332 msgstr "I<thread> が join 可能なスレッドではない。"
5333
5334 #. type: Plain text
5335 #: build/C/man3/pthread_detach.3:70
5336 msgid ""
5337 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5338 "or be made joinable again."
5339 msgstr ""
5340 "いったんスレッドを detached 状態にすると、\n"
5341 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5342 "もう一度 join 可能にしたりすることはできない。"
5343
5344 #. type: Plain text
5345 #: build/C/man3/pthread_detach.3:77
5346 msgid ""
5347 "A new thread can be created in a detached state using "
5348 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5349 "I<attr> argument of B<pthread_create>(3)."
5350 msgstr ""
5351 "B<pthread_attr_setdetachstate>(3) を使って\n"
5352 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5353 "新しいスレッドを detached 状態で作成することができる。"
5354
5355 #. type: Plain text
5356 #: build/C/man3/pthread_detach.3:84
5357 msgid ""
5358 "The detached attribute merely determines the behavior of the system when the "
5359 "thread terminates; it does not prevent the thread from being terminated if "
5360 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5361 "thread returns)."
5362 msgstr ""
5363 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5364 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5365 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5366 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5367
5368 #. type: Plain text
5369 #: build/C/man3/pthread_detach.3:93
5370 msgid ""
5371 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5372 "thread that an application creates, so that system resources for the thread "
5373 "can be released.  (But note that the resources of all threads are freed when "
5374 "the process terminates.)"
5375 msgstr ""
5376 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5377 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5378 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5379 "終了するときには、全てのスレッドのリソースが解放される)。"
5380
5381 #. type: Plain text
5382 #: build/C/man3/pthread_detach.3:95
5383 msgid "The following statement detaches the calling thread:"
5384 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5385
5386 #. type: Plain text
5387 #: build/C/man3/pthread_detach.3:97
5388 #, no-wrap
5389 msgid "    pthread_detach(pthread_self());\n"
5390 msgstr "    pthread_detach(pthread_self());\n"
5391
5392 #. type: Plain text
5393 #: build/C/man3/pthread_detach.3:104
5394 msgid ""
5395 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5396 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5397 msgstr ""
5398 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5399 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5400
5401 #. type: TH
5402 #: build/C/man3/pthread_equal.3:26
5403 #, no-wrap
5404 msgid "PTHREAD_EQUAL"
5405 msgstr "PTHREAD_EQUAL"
5406
5407 #. type: TH
5408 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5409 #, no-wrap
5410 msgid "2009-03-30"
5411 msgstr "2009-03-30"
5412
5413 #. type: Plain text
5414 #: build/C/man3/pthread_equal.3:29
5415 msgid "pthread_equal - compare thread IDs"
5416 msgstr "pthread_equal - スレッド ID を比較する"
5417
5418 #. type: Plain text
5419 #: build/C/man3/pthread_equal.3:34
5420 #, no-wrap
5421 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5422 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5423
5424 #. type: Plain text
5425 #: build/C/man3/pthread_equal.3:41
5426 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5427 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5428
5429 #. type: Plain text
5430 #: build/C/man3/pthread_equal.3:45
5431 msgid ""
5432 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5433 "value; otherwise, it returns 0."
5434 msgstr ""
5435 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5436 "そうでなければ 0 を返す。"
5437
5438 #.  SH VERSIONS
5439 #.  Available since glibc 2.0
5440 #. type: Plain text
5441 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5442 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5443 msgid "This function always succeeds."
5444 msgstr "この関数は常に成功する。"
5445
5446 #. type: Plain text
5447 #: build/C/man3/pthread_equal.3:56
5448 msgid ""
5449 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5450 "considered opaque: there is no portable way for applications to directly "
5451 "compare two I<pthread_t> values."
5452 msgstr ""
5453 "B<pthread_equal>() 関数が必要なのは、\n"
5454 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5455 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5456 "移植性を確保できる形で比較する方法はない。"
5457
5458 #. type: Plain text
5459 #: build/C/man3/pthread_equal.3:60
5460 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5461 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5462
5463 #. type: TH
5464 #: build/C/man3/pthread_exit.3:26
5465 #, no-wrap
5466 msgid "PTHREAD_EXIT"
5467 msgstr "PTHREAD_EXIT"
5468
5469 #. type: Plain text
5470 #: build/C/man3/pthread_exit.3:29
5471 msgid "pthread_exit - terminate calling thread"
5472 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5473
5474 #. type: Plain text
5475 #: build/C/man3/pthread_exit.3:34
5476 #, no-wrap
5477 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5478 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5479
5480 #. type: Plain text
5481 #: build/C/man3/pthread_exit.3:45
5482 msgid ""
5483 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5484 "value via I<retval> that (if the thread is joinable)  is available to "
5485 "another thread in the same process that calls B<pthread_join>(3)."
5486 msgstr ""
5487 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5488 "I<retval> 経由で値を返す。\n"
5489 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5490 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5491
5492 #. type: Plain text
5493 #: build/C/man3/pthread_exit.3:55
5494 msgid ""
5495 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5496 "not yet been popped, are popped (in the reverse of the order in which they "
5497 "were pushed)  and executed.  If the thread has any thread-specific data, "
5498 "then, after the clean-up handlers have been executed, the corresponding "
5499 "destructor functions are called, in an unspecified order."
5500 msgstr ""
5501 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5502 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5503 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5504 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5505 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5506 "は規定されていない)。"
5507
5508 #. type: Plain text
5509 #: build/C/man3/pthread_exit.3:62
5510 msgid ""
5511 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5512 "variables, semaphores, and file descriptors) are not released, and functions "
5513 "registered using B<atexit>(3)  are not called."
5514 msgstr ""
5515 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5516 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5517 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5518
5519 #. type: Plain text
5520 #: build/C/man3/pthread_exit.3:71
5521 msgid ""
5522 "After the last thread in a process terminates, the process terminates as by "
5523 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5524 "resources are released and functions registered using B<atexit>(3)  are "
5525 "called."
5526 msgstr ""
5527 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5528 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5529 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5530 "が呼び出される。"
5531
5532 #. type: Plain text
5533 #: build/C/man3/pthread_exit.3:73
5534 msgid "This function does not return to the caller."
5535 msgstr "この関数は呼び出し側には返らない。"
5536
5537 #. type: Plain text
5538 #: build/C/man3/pthread_exit.3:82
5539 msgid ""
5540 "Performing a return from the start function of any thread other than the "
5541 "main thread results in an implicit call to B<pthread_exit>(), using the "
5542 "function's return value as the thread's exit status."
5543 msgstr ""
5544 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5545 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5546 "関数の返り値がスレッドの終了ステータスとして使用される。"
5547
5548 #. type: Plain text
5549 #: build/C/man3/pthread_exit.3:88
5550 msgid ""
5551 "To allow other threads to continue execution, the main thread should "
5552 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5553 msgstr ""
5554 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5555 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5556
5557 #. type: Plain text
5558 #: build/C/man3/pthread_exit.3:93
5559 msgid ""
5560 "The value pointed to by I<retval> should not be located on the calling "
5561 "thread's stack, since the contents of that stack are undefined after the "
5562 "thread terminates."
5563 msgstr ""
5564 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5565 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5566 "である。"
5567
5568 #.  Linux 2.6.27
5569 #.  FIXME . review a later kernel to see if this gets fixed
5570 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5571 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5572 #. type: Plain text
5573 #: build/C/man3/pthread_exit.3:105
5574 msgid ""
5575 "Currently, there are limitations in the kernel implementation logic for "
5576 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5577 "This can manifest in problems such as a locked terminal if a stop signal is "
5578 "sent to a foreground process whose thread group leader has already called "
5579 "B<pthread_exit>()."
5580 msgstr ""
5581 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5582 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5583 "カーネル実装の論理には制限がある。\n"
5584 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5585 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5586 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5587 "場合がある。"
5588
5589 #. type: Plain text
5590 #: build/C/man3/pthread_exit.3:109
5591 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5592 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5593
5594 #. type: TH
5595 #: build/C/man3/pthread_getattr_np.3:26
5596 #, no-wrap
5597 msgid "PTHREAD_GETATTR_NP"
5598 msgstr "PTHREAD_GETATTR_NP"
5599
5600 #. type: Plain text
5601 #: build/C/man3/pthread_getattr_np.3:29
5602 msgid "pthread_getattr_np - get attributes of created thread"
5603 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5604
5605 #. type: Plain text
5606 #: build/C/man3/pthread_getattr_np.3:35
5607 #, no-wrap
5608 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5609 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5610
5611 #. type: Plain text
5612 #: build/C/man3/pthread_getattr_np.3:45
5613 msgid ""
5614 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5615 "object referred to by I<attr> so that it contains actual attribute values "
5616 "describing the running thread I<thread>."
5617 msgstr ""
5618 "B<pthread_getattr_np>() 関数は、\n"
5619 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5620 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5621 "格納して返す。"
5622
5623 #. type: Plain text
5624 #: build/C/man3/pthread_getattr_np.3:52
5625 msgid ""
5626 "The returned attribute values may differ from the corresponding attribute "
5627 "values passed in the I<attr> object that was used to create the thread using "
5628 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5629 msgstr ""
5630 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5631 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5632 "特に、以下の属性は異なる場合がある。"
5633
5634 #. type: Plain text
5635 #: build/C/man3/pthread_getattr_np.3:55
5636 msgid ""
5637 "the detach state, since a joinable thread may have detached itself after "
5638 "creation;"
5639 msgstr ""
5640 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5641 "切り離す (detach する) ことができるからである。"
5642
5643 #. type: Plain text
5644 #: build/C/man3/pthread_getattr_np.3:58
5645 msgid ""
5646 "the stack size, which the implementation may align to a suitable boundary."
5647 msgstr ""
5648 "スタックサイズ。\n"
5649 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5650
5651 #. type: Plain text
5652 #: build/C/man3/pthread_getattr_np.3:63
5653 msgid ""
5654 "and the guard size, which the implementation may round upward to a multiple "
5655 "of the page size, or ignore (i.e., treat as 0), if the application is "
5656 "allocating its own stack."
5657 msgstr ""
5658 "guard size.\n"
5659 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5660 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5661 "(0 として扱われる) ことがあるからである。"
5662
5663 #. type: Plain text
5664 #: build/C/man3/pthread_getattr_np.3:68
5665 msgid ""
5666 "Furthermore, if the stack address attribute was not set in the thread "
5667 "attributes object used to create the thread, then the returned thread "
5668 "attributes object will report the actual stack address that the "
5669 "implementation selected for the thread."
5670 msgstr ""
5671 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5672 "スタックアドレスが設定されていなかった場合、\n"
5673 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5674 "割り当てた実際のスタックアドレスが報告される。"
5675
5676 #. type: Plain text
5677 #: build/C/man3/pthread_getattr_np.3:73
5678 msgid ""
5679 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5680 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5681 msgstr ""
5682 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5683 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5684 "そのオブジェクトを破棄すべきである。"
5685
5686 #. type: Plain text
5687 #: build/C/man3/pthread_getattr_np.3:76
5688 #: build/C/man3/pthread_getcpuclockid.3:49
5689 msgid ""
5690 "On success, this function returns 0; on error, it returns a nonzero error "
5691 "number."
5692 msgstr ""
5693 "成功すると、この関数は 0 を返す。\n"
5694 "エラーの場合、 0 以外のエラー番号を返す。"
5695
5696 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5697 #. type: Plain text
5698 #: build/C/man3/pthread_getattr_np.3:81
5699 msgid "Insufficient memory."
5700 msgstr "メモリが十分になかった。"
5701
5702 #. type: Plain text
5703 #: build/C/man3/pthread_getattr_np.3:96
5704 msgid ""
5705 "In addition, if I<thread> refers to the main thread, then "
5706 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5707 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5708 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5709 msgstr ""
5710 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5711 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5712 "エラーで失敗する可能性がある。\n"
5713 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5714 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5715 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5716
5717 #. type: Plain text
5718 #: build/C/man3/pthread_getattr_np.3:98
5719 msgid "This function is available in glibc since version 2.2.3."
5720 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5721
5722 #. type: Plain text
5723 #: build/C/man3/pthread_getattr_np.3:101
5724 #: build/C/man3/pthread_kill_other_threads_np.3:50
5725 msgid ""
5726 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5727 "\" (nonportable) in the name."
5728 msgstr ""
5729 "この関数は非標準の GNU による拡張である。\n"
5730 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5731 "付いている。"
5732
5733 #. type: Plain text
5734 #: build/C/man3/pthread_getattr_np.3:111
5735 msgid ""
5736 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5737 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5738 "and display its guard size, stack address, and stack size attributes.  "
5739 "Command-line arguments can be used to set these attributes to values other "
5740 "than the default when creating the thread.  The shell sessions below "
5741 "demonstrate the use of the program."
5742 msgstr ""
5743 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5744 "このプログラムは、スレッドを作成し、それから\n"
5745 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5746 "スタックアドレス、スタックサイズを取得し表示する。\n"
5747 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5748 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5749 "下記のシェルのセッションはこのプログラムの使用例である。"
5750
5751 #. type: Plain text
5752 #: build/C/man3/pthread_getattr_np.3:114
5753 msgid ""
5754 "In the first run, on an x86-32 system, a thread is created using default "
5755 "attributes:"
5756 msgstr ""
5757 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5758 "(x86-32 システム上で実行)。"
5759
5760 #. type: Plain text
5761 #: build/C/man3/pthread_getattr_np.3:124
5762 #, no-wrap
5763 msgid ""
5764 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5765 "unlimited\n"
5766 "$B< ./a.out>\n"
5767 "Attributes of created thread:\n"
5768 "        Guard size          = 4096 bytes\n"
5769 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5770 "        Stack size          = 0x201000 (2101248) bytes\n"
5771 msgstr ""
5772 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5773 "unlimited\n"
5774 "$B< ./a.out>\n"
5775 "Attributes of created thread:\n"
5776 "        Guard size          = 4096 bytes\n"
5777 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5778 "        Stack size          = 0x201000 (2101248) bytes\n"
5779
5780 #. type: Plain text
5781 #: build/C/man3/pthread_getattr_np.3:130
5782 msgid ""
5783 "In the following run, we see that if a guard size is specified, it is "
5784 "rounded up to the next multiple of the system page size (4096 bytes on "
5785 "x86-32):"
5786 msgstr ""
5787 "次の実行例では、guard size が指定された場合、\n"
5788 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5789 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5790
5791 #. type: Plain text
5792 #: build/C/man3/pthread_getattr_np.3:138
5793 #, no-wrap
5794 msgid ""
5795 "$B< ./a.out -g 4097>\n"
5796 "Thread attributes object after initializations:\n"
5797 "        Guard size          = 4097 bytes\n"
5798 "        Stack address       = (nil)\n"
5799 "        Stack size          = 0x0 (0) bytes\n"
5800 msgstr ""
5801 "$B< ./a.out -g 4097>\n"
5802 "Thread attributes object after initializations:\n"
5803 "        Guard size          = 4097 bytes\n"
5804 "        Stack address       = (nil)\n"
5805 "        Stack size          = 0x0 (0) bytes\n"
5806
5807 #. type: Plain text
5808 #: build/C/man3/pthread_getattr_np.3:143
5809 #, no-wrap
5810 msgid ""
5811 "Attributes of created thread:\n"
5812 "        Guard size          = 8192 bytes\n"
5813 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5814 "        Stack size          = 0x201000 (2101248) bytes\n"
5815 msgstr ""
5816 "Attributes of created thread:\n"
5817 "        Guard size          = 8192 bytes\n"
5818 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5819 "        Stack size          = 0x201000 (2101248) bytes\n"
5820
5821 #. .in +4n
5822 #. .nf
5823 #. $ ./a.out \-s 0x8000
5824 #. Thread attributes object after initializations:
5825 #.         Guard size          = 4096 bytes
5826 #.         Stack address       = 0xffff8000 (EOS = (nil))
5827 #.         Stack size          = 0x8000 (32768) bytes
5828 #. Attributes of created thread:
5829 #.         Guard size          = 4096 bytes
5830 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5831 #.         Stack size          = 0x8000 (32768) bytes
5832 #. .fi
5833 #. .in
5834 #. type: Plain text
5835 #: build/C/man3/pthread_getattr_np.3:162
5836 msgid ""
5837 "In the last run, the program manually allocates a stack for the thread.  In "
5838 "this case, the guard size attribute is ignored."
5839 msgstr ""
5840 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5841 "この場合には、guard size 属性は無視される。"
5842
5843 #. type: Plain text
5844 #: build/C/man3/pthread_getattr_np.3:167
5845 #, no-wrap
5846 msgid ""
5847 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5848 "Allocated thread stack at 0x804d000\n"
5849 msgstr ""
5850 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5851 "Allocated thread stack at 0x804d000\n"
5852
5853 #. type: Plain text
5854 #: build/C/man3/pthread_getattr_np.3:172
5855 #, no-wrap
5856 msgid ""
5857 "Thread attributes object after initializations:\n"
5858 "        Guard size          = 4096 bytes\n"
5859 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5860 "        Stack size          = 0x8000 (32768) bytes\n"
5861 msgstr ""
5862 "Thread attributes object after initializations:\n"
5863 "        Guard size          = 4096 bytes\n"
5864 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5865 "        Stack size          = 0x8000 (32768) bytes\n"
5866
5867 #. type: Plain text
5868 #: build/C/man3/pthread_getattr_np.3:177
5869 #, no-wrap
5870 msgid ""
5871 "Attributes of created thread:\n"
5872 "        Guard size          = 0 bytes\n"
5873 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5874 "        Stack size          = 0x8000 (32768) bytes\n"
5875 msgstr ""
5876 "Attributes of created thread:\n"
5877 "        Guard size          = 0 bytes\n"
5878 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5879 "        Stack size          = 0x8000 (32768) bytes\n"
5880
5881 #. type: Plain text
5882 #: build/C/man3/pthread_getattr_np.3:198
5883 #, no-wrap
5884 msgid ""
5885 "static void\n"
5886 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5887 "{\n"
5888 "    int s;\n"
5889 "    size_t stack_size, guard_size;\n"
5890 "    void *stack_addr;\n"
5891 msgstr ""
5892 "static void\n"
5893 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5894 "{\n"
5895 "    int s;\n"
5896 "    size_t stack_size, guard_size;\n"
5897 "    void *stack_addr;\n"
5898
5899 #. type: Plain text
5900 #: build/C/man3/pthread_getattr_np.3:203
5901 #, no-wrap
5902 msgid ""
5903 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5904 "    if (s != 0)\n"
5905 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5906 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5907 msgstr ""
5908 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5909 "    if (s != 0)\n"
5910 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5911 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5912
5913 #. type: Plain text
5914 #: build/C/man3/pthread_getattr_np.3:214
5915 #, no-wrap
5916 msgid ""
5917 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5918 "    if (s != 0)\n"
5919 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5920 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5921 "    if (stack_size E<gt> 0)\n"
5922 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5923 "    printf(\"\\en\");\n"
5924 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5925 "            prefix, stack_size, stack_size);\n"
5926 "}\n"
5927 msgstr ""
5928 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5929 "    if (s != 0)\n"
5930 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5931 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5932 "    if (stack_size E<gt> 0)\n"
5933 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5934 "    printf(\"\\en\");\n"
5935 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5936 "            prefix, stack_size, stack_size);\n"
5937 "}\n"
5938
5939 #. type: Plain text
5940 #: build/C/man3/pthread_getattr_np.3:220
5941 #, no-wrap
5942 msgid ""
5943 "static void\n"
5944 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5945 "{\n"
5946 "    int s;\n"
5947 "    pthread_attr_t attr;\n"
5948 msgstr ""
5949 "static void\n"
5950 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5951 "{\n"
5952 "    int s;\n"
5953 "    pthread_attr_t attr;\n"
5954
5955 #. type: Plain text
5956 #: build/C/man3/pthread_getattr_np.3:224
5957 #, no-wrap
5958 msgid ""
5959 "    s = pthread_getattr_np(thread, &attr);\n"
5960 "    if (s != 0)\n"
5961 "        handle_error_en(s, \"pthread_getattr_np\");\n"
5962 msgstr ""
5963 "    s = pthread_getattr_np(thread, &attr);\n"
5964 "    if (s != 0)\n"
5965 "        handle_error_en(s, \"pthread_getattr_np\");\n"
5966
5967 #. type: Plain text
5968 #: build/C/man3/pthread_getattr_np.3:226
5969 #, no-wrap
5970 msgid "    display_stack_related_attributes(&attr, prefix);\n"
5971 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
5972
5973 #. type: Plain text
5974 #: build/C/man3/pthread_getattr_np.3:231
5975 #, no-wrap
5976 msgid ""
5977 "    s = pthread_attr_destroy(&attr);\n"
5978 "    if (s != 0)\n"
5979 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5980 "}\n"
5981 msgstr ""
5982 "    s = pthread_attr_destroy(&attr);\n"
5983 "    if (s != 0)\n"
5984 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5985 "}\n"
5986
5987 #. type: Plain text
5988 #: build/C/man3/pthread_getattr_np.3:237
5989 #, no-wrap
5990 msgid ""
5991 "static void *           /* Start function for thread we create */\n"
5992 "thread_start(void *arg)\n"
5993 "{\n"
5994 "    printf(\"Attributes of created thread:\\en\");\n"
5995 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
5996 msgstr ""
5997 "static void *           /* Start function for thread we create */\n"
5998 "thread_start(void *arg)\n"
5999 "{\n"
6000 "    printf(\"Attributes of created thread:\\en\");\n"
6001 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6002
6003 #. type: Plain text
6004 #: build/C/man3/pthread_getattr_np.3:251
6005 #, no-wrap
6006 msgid ""
6007 "static void\n"
6008 "usage(char *pname, char *msg)\n"
6009 "{\n"
6010 "    if (msg != NULL)\n"
6011 "        fputs(msg, stderr);\n"
6012 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6013 "            \" [-g guard-size]\\en\", pname);\n"
6014 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6015 "    exit(EXIT_FAILURE);\n"
6016 "}\n"
6017 msgstr ""
6018 "static void\n"
6019 "usage(char *pname, char *msg)\n"
6020 "{\n"
6021 "    if (msg != NULL)\n"
6022 "        fputs(msg, stderr);\n"
6023 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6024 "            \" [-g guard-size]\\en\", pname);\n"
6025 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6026 "    exit(EXIT_FAILURE);\n"
6027 "}\n"
6028
6029 #. type: Plain text
6030 #: build/C/man3/pthread_getattr_np.3:264
6031 #, no-wrap
6032 msgid ""
6033 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6034 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6035 "                              pthread_attr_t *attrp)\n"
6036 "{\n"
6037 "    int s, opt, allocate_stack;\n"
6038 "    long stack_size, guard_size;\n"
6039 "            void *stack_addr;\n"
6040 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6041 "                                           a thread attributes object */\n"
6042 "    allocate_stack = 0;\n"
6043 "    stack_size = -1;\n"
6044 "    guard_size = -1;\n"
6045 msgstr ""
6046 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6047 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6048 "                              pthread_attr_t *attrp)\n"
6049 "{\n"
6050 "    int s, opt, allocate_stack;\n"
6051 "    long stack_size, guard_size;\n"
6052 "            void *stack_addr;\n"
6053 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6054 "                                           a thread attributes object */\n"
6055 "    allocate_stack = 0;\n"
6056 "    stack_size = -1;\n"
6057 "    guard_size = -1;\n"
6058
6059 #. type: Plain text
6060 #: build/C/man3/pthread_getattr_np.3:273
6061 #, no-wrap
6062 msgid ""
6063 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6064 "        switch (opt) {\n"
6065 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6066 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6067 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6068 "        default:    usage(argv[0], NULL);\n"
6069 "        }\n"
6070 "    }\n"
6071 msgstr ""
6072 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6073 "        switch (opt) {\n"
6074 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6075 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6076 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6077 "        default:    usage(argv[0], NULL);\n"
6078 "        }\n"
6079 "    }\n"
6080
6081 #. type: Plain text
6082 #: build/C/man3/pthread_getattr_np.3:276
6083 #, no-wrap
6084 msgid ""
6085 "    if (allocate_stack && stack_size == -1)\n"
6086 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6087 msgstr ""
6088 "    if (allocate_stack && stack_size == -1)\n"
6089 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6090
6091 #. type: Plain text
6092 #: build/C/man3/pthread_getattr_np.3:279
6093 #, no-wrap
6094 msgid ""
6095 "    if (argc E<gt> optind)\n"
6096 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6097 msgstr ""
6098 "    if (argc E<gt> optind)\n"
6099 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6100
6101 #. type: Plain text
6102 #: build/C/man3/pthread_getattr_np.3:282
6103 #, no-wrap
6104 msgid ""
6105 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6106 "        ret_attrp = attrp;\n"
6107 msgstr ""
6108 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6109 "        ret_attrp = attrp;\n"
6110
6111 #. type: Plain text
6112 #: build/C/man3/pthread_getattr_np.3:287
6113 #, no-wrap
6114 msgid ""
6115 "        s = pthread_attr_init(attrp);\n"
6116 "        if (s != 0)\n"
6117 "            handle_error_en(s, \"pthread_attr_init\");\n"
6118 "    }\n"
6119 msgstr ""
6120 "        s = pthread_attr_init(attrp);\n"
6121 "        if (s != 0)\n"
6122 "            handle_error_en(s, \"pthread_attr_init\");\n"
6123 "    }\n"
6124
6125 #. type: Plain text
6126 #: build/C/man3/pthread_getattr_np.3:299
6127 #, no-wrap
6128 msgid ""
6129 "    if (stack_size E<gt>= 0) {\n"
6130 "        if (!allocate_stack) {\n"
6131 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6132 "            if (s != 0)\n"
6133 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6134 "        } else {\n"
6135 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6136 "                               stack_size);\n"
6137 "            if (s != 0)\n"
6138 "                handle_error_en(s, \"posix_memalign\");\n"
6139 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6140 msgstr ""
6141 "    if (stack_size E<gt>= 0) {\n"
6142 "        if (!allocate_stack) {\n"
6143 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6144 "            if (s != 0)\n"
6145 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6146 "        } else {\n"
6147 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6148 "                               stack_size);\n"
6149 "            if (s != 0)\n"
6150 "                handle_error_en(s, \"posix_memalign\");\n"
6151 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6152
6153 #. type: Plain text
6154 #: build/C/man3/pthread_getattr_np.3:305
6155 #, no-wrap
6156 msgid ""
6157 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6158 "            if (s != 0)\n"
6159 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6160 "        }\n"
6161 "    }\n"
6162 msgstr ""
6163 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6164 "            if (s != 0)\n"
6165 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6166 "        }\n"
6167 "    }\n"
6168
6169 #. type: Plain text
6170 #: build/C/man3/pthread_getattr_np.3:311
6171 #, no-wrap
6172 msgid ""
6173 "    if (guard_size E<gt>= 0) {\n"
6174 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6175 "        if (s != 0)\n"
6176 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6177 "    }\n"
6178 msgstr ""
6179 "    if (guard_size E<gt>= 0) {\n"
6180 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6181 "        if (s != 0)\n"
6182 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6183 "    }\n"
6184
6185 #. type: Plain text
6186 #: build/C/man3/pthread_getattr_np.3:314
6187 #, no-wrap
6188 msgid ""
6189 "    return ret_attrp;\n"
6190 "}\n"
6191 msgstr ""
6192 "    return ret_attrp;\n"
6193 "}\n"
6194
6195 #. type: Plain text
6196 #: build/C/man3/pthread_getattr_np.3:323
6197 #, no-wrap
6198 msgid ""
6199 "int\n"
6200 "main(int argc, char *argv[])\n"
6201 "{\n"
6202 "    int s;\n"
6203 "    pthread_t thr;\n"
6204 "    pthread_attr_t attr;\n"
6205 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6206 "                                        a thread attributes object */\n"
6207 msgstr ""
6208 "int\n"
6209 "main(int argc, char *argv[])\n"
6210 "{\n"
6211 "    int s;\n"
6212 "    pthread_t thr;\n"
6213 "    pthread_attr_t attr;\n"
6214 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6215 "                                        a thread attributes object */\n"
6216
6217 #. type: Plain text
6218 #: build/C/man3/pthread_getattr_np.3:325
6219 #, no-wrap
6220 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6221 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6222
6223 #. type: Plain text
6224 #: build/C/man3/pthread_getattr_np.3:331
6225 #, no-wrap
6226 msgid ""
6227 "    if (attrp != NULL) {\n"
6228 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6229 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6230 "        printf(\"\\en\");\n"
6231 "    }\n"
6232 msgstr ""
6233 "    if (attrp != NULL) {\n"
6234 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6235 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6236 "        printf(\"\\en\");\n"
6237 "    }\n"
6238
6239 #. type: Plain text
6240 #: build/C/man3/pthread_getattr_np.3:361
6241 msgid ""
6242 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6243 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6244 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6245 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6246 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6247 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6248 msgstr ""
6249 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6250 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6251 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6252 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6253 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6254 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6255
6256 #. type: TH
6257 #: build/C/man3/pthread_getcpuclockid.3:26
6258 #, no-wrap
6259 msgid "PTHREAD_GETCPUCLOCKID"
6260 msgstr "PTHREAD_GETCPUCLOCKID"
6261
6262 #. type: TH
6263 #: build/C/man3/pthread_getcpuclockid.3:26
6264 #, no-wrap
6265 msgid "2009-02-08"
6266 msgstr "2009-02-08"
6267
6268 #. type: Plain text
6269 #: build/C/man3/pthread_getcpuclockid.3:29
6270 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6271 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6272
6273 #. type: Plain text
6274 #: build/C/man3/pthread_getcpuclockid.3:33
6275 #, no-wrap
6276 msgid ""
6277 "B<#include E<lt>pthread.hE<gt>>\n"
6278 "B<#include E<lt>time.hE<gt>>\n"
6279 msgstr ""
6280 "B<#include E<lt>pthread.hE<gt>>\n"
6281 "B<#include E<lt>time.hE<gt>>\n"
6282
6283 #. type: Plain text
6284 #: build/C/man3/pthread_getcpuclockid.3:35
6285 #, no-wrap
6286 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6287 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6288
6289 #.  The clockid is constructed as follows:
6290 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6291 #.  where CLOCK_IDFIELD_SIZE is 3.
6292 #. type: Plain text
6293 #: build/C/man3/pthread_getcpuclockid.3:46
6294 msgid ""
6295 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6296 "time clock of the thread I<thread>."
6297 msgstr ""
6298 "B<pthread_getcpuclockid>() 関数は、\n"
6299 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6300
6301 #. type: TP
6302 #: build/C/man3/pthread_getcpuclockid.3:50
6303 #, no-wrap
6304 msgid "B<ENOENT>"
6305 msgstr "B<ENOENT>"
6306
6307 #.  CLOCK_THREAD_CPUTIME_ID not defined
6308 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6309 #.  be possible if kernel thread IDs took more than 29 bits (which
6310 #.  they currently cannot).
6311 #. type: Plain text
6312 #: build/C/man3/pthread_getcpuclockid.3:58
6313 msgid "Per-thread CPU time clocks are not supported by the system."
6314 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6315
6316 #. type: Plain text
6317 #: build/C/man3/pthread_getcpuclockid.3:65
6318 msgid "This function is available in glibc since version 2.2."
6319 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6320
6321 #. type: Plain text
6322 #: build/C/man3/pthread_getcpuclockid.3:78
6323 msgid ""
6324 "When I<thread> refers to the calling thread, this function returns an "
6325 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6326 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6327 msgstr ""
6328 "I<thread> が呼び出したスレッドを参照している場合、\n"
6329 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6330 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6331 "を参照する ID が返される。"
6332
6333 #. type: Plain text
6334 #: build/C/man3/pthread_getcpuclockid.3:84
6335 msgid ""
6336 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6337 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6338 "the two threads.  The following shell session shows an example run:"
6339 msgstr ""
6340 "以下のプログラムは、スレッドを作成し、それから\n"
6341 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6342 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6343 "スレッド毎の CPU 時間を取得する。\n"
6344 "下記のシェルのセッションは実行例である。"
6345
6346 #. type: Plain text
6347 #: build/C/man3/pthread_getcpuclockid.3:93
6348 #, no-wrap
6349 msgid ""
6350 "$ B<./a.out>\n"
6351 "Main thread sleeping\n"
6352 "Subthread starting infinite loop\n"
6353 "Main thread consuming some CPU time...\n"
6354 "Process total CPU time:    1.368\n"
6355 "Main thread CPU time:      0.376\n"
6356 "Subthread CPU time:        0.992\n"
6357 msgstr ""
6358 "$ B<./a.out>\n"
6359 "Main thread sleeping\n"
6360 "Subthread starting infinite loop\n"
6361 "Main thread consuming some CPU time...\n"
6362 "Process total CPU time:    1.368\n"
6363 "Main thread CPU time:      0.376\n"
6364 "Subthread CPU time:        0.992\n"
6365
6366 #. type: Plain text
6367 #: build/C/man3/pthread_getcpuclockid.3:99
6368 #, no-wrap
6369 msgid "/* Link with \"-lrt\" */\n"
6370 msgstr "/* \"-lrt\" でリンクする */\n"
6371
6372 #. type: Plain text
6373 #: build/C/man3/pthread_getcpuclockid.3:107
6374 #, no-wrap
6375 msgid ""
6376 "#include E<lt>time.hE<gt>\n"
6377 "#include E<lt>stdio.hE<gt>\n"
6378 "#include E<lt>stdlib.hE<gt>\n"
6379 "#include E<lt>unistd.hE<gt>\n"
6380 "#include E<lt>pthread.hE<gt>\n"
6381 "#include E<lt>string.hE<gt>\n"
6382 "#include E<lt>errno.hE<gt>\n"
6383 msgstr ""
6384 "#include E<lt>time.hE<gt>\n"
6385 "#include E<lt>stdio.hE<gt>\n"
6386 "#include E<lt>stdlib.hE<gt>\n"
6387 "#include E<lt>unistd.hE<gt>\n"
6388 "#include E<lt>pthread.hE<gt>\n"
6389 "#include E<lt>string.hE<gt>\n"
6390 "#include E<lt>errno.hE<gt>\n"
6391
6392 #. type: Plain text
6393 #: build/C/man3/pthread_getcpuclockid.3:121
6394 #, no-wrap
6395 msgid ""
6396 "static void *\n"
6397 "thread_start(void *arg)\n"
6398 "{\n"
6399 "    printf(\"Subthread starting infinite loop\\en\");\n"
6400 "    for (;;)\n"
6401 "        continue;\n"
6402 "}\n"
6403 msgstr ""
6404 "static void *\n"
6405 "thread_start(void *arg)\n"
6406 "{\n"
6407 "    printf(\"Subthread starting infinite loop\\en\");\n"
6408 "    for (;;)\n"
6409 "        continue;\n"
6410 "}\n"
6411
6412 #. type: Plain text
6413 #: build/C/man3/pthread_getcpuclockid.3:126
6414 #, no-wrap
6415 msgid ""
6416 "static void\n"
6417 "pclock(char *msg, clockid_t cid)\n"
6418 "{\n"
6419 "    struct timespec ts;\n"
6420 msgstr ""
6421 "static void\n"
6422 "pclock(char *msg, clockid_t cid)\n"
6423 "{\n"
6424 "    struct timespec ts;\n"
6425
6426 #. type: Plain text
6427 #: build/C/man3/pthread_getcpuclockid.3:132
6428 #, no-wrap
6429 msgid ""
6430 "    printf(\"%s\", msg);\n"
6431 "    if (clock_gettime(cid, &ts) == -1)\n"
6432 "        handle_error(\"clock_gettime\");\n"
6433 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6434 "}\n"
6435 msgstr ""
6436 "    printf(\"%s\", msg);\n"
6437 "    if (clock_gettime(cid, &ts) == -1)\n"
6438 "        handle_error(\"clock_gettime\");\n"
6439 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6440 "}\n"
6441
6442 #. type: Plain text
6443 #: build/C/man3/pthread_getcpuclockid.3:139
6444 #, no-wrap
6445 msgid ""
6446 "int\n"
6447 "main(int argc, char *argv[])\n"
6448 "{\n"
6449 "    pthread_t thread;\n"
6450 "    clockid_t cid;\n"
6451 "    int j, s;\n"
6452 msgstr ""
6453 "int\n"
6454 "main(int argc, char *argv[])\n"
6455 "{\n"
6456 "    pthread_t thread;\n"
6457 "    clockid_t cid;\n"
6458 "    int j, s;\n"
6459
6460 #. type: Plain text
6461 #: build/C/man3/pthread_getcpuclockid.3:143
6462 #, no-wrap
6463 msgid ""
6464 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6465 "    if (s != 0)\n"
6466 "        handle_error_en(s, \"pthread_create\");\n"
6467 msgstr ""
6468 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6469 "    if (s != 0)\n"
6470 "        handle_error_en(s, \"pthread_create\");\n"
6471
6472 #. type: Plain text
6473 #: build/C/man3/pthread_getcpuclockid.3:146
6474 #, no-wrap
6475 msgid ""
6476 "    printf(\"Main thread sleeping\\en\");\n"
6477 "    sleep(1);\n"
6478 msgstr ""
6479 "    printf(\"Main thread sleeping\\en\");\n"
6480 "    sleep(1);\n"
6481
6482 #. type: Plain text
6483 #: build/C/man3/pthread_getcpuclockid.3:150
6484 #, no-wrap
6485 msgid ""
6486 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6487 "    for (j = 0; j E<lt> 2000000; j++)\n"
6488 "        getppid();\n"
6489 msgstr ""
6490 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6491 "    for (j = 0; j E<lt> 2000000; j++)\n"
6492 "        getppid();\n"
6493
6494 #. type: Plain text
6495 #: build/C/man3/pthread_getcpuclockid.3:152
6496 #, no-wrap
6497 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6498 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6499
6500 #. type: Plain text
6501 #: build/C/man3/pthread_getcpuclockid.3:157
6502 #, no-wrap
6503 msgid ""
6504 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6505 "    if (s != 0)\n"
6506 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6507 "    pclock(\"Main thread CPU time:   \", cid);\n"
6508 msgstr ""
6509 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6510 "    if (s != 0)\n"
6511 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6512 "    pclock(\"Main thread CPU time:   \", cid);\n"
6513
6514 #. type: Plain text
6515 #: build/C/man3/pthread_getcpuclockid.3:160
6516 #, no-wrap
6517 msgid ""
6518 "    /* The preceding 4 lines of code could have been replaced by:\n"
6519 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6520 msgstr ""
6521 "    /* The preceding 4 lines of code could have been replaced by:\n"
6522 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6523
6524 #. type: Plain text
6525 #: build/C/man3/pthread_getcpuclockid.3:165
6526 #, no-wrap
6527 msgid ""
6528 "    s = pthread_getcpuclockid(thread, &cid);\n"
6529 "    if (s != 0)\n"
6530 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6531 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6532 msgstr ""
6533 "    s = pthread_getcpuclockid(thread, &cid);\n"
6534 "    if (s != 0)\n"
6535 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6536 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6537
6538 #. type: Plain text
6539 #: build/C/man3/pthread_getcpuclockid.3:168
6540 #, no-wrap
6541 msgid ""
6542 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6543 "}\n"
6544 msgstr ""
6545 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6546 "}\n"
6547
6548 #. type: Plain text
6549 #: build/C/man3/pthread_getcpuclockid.3:177
6550 msgid ""
6551 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6552 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6553 msgstr ""
6554 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6555 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6556
6557 #. type: TH
6558 #: build/C/man3/pthread_join.3:26
6559 #, no-wrap
6560 msgid "PTHREAD_JOIN"
6561 msgstr "PTHREAD_JOIN"
6562
6563 #. type: Plain text
6564 #: build/C/man3/pthread_join.3:29
6565 msgid "pthread_join - join with a terminated thread"
6566 msgstr "pthread_join - 終了したスレッドを join する"
6567
6568 #. type: Plain text
6569 #: build/C/man3/pthread_join.3:34
6570 #, no-wrap
6571 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6572 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6573
6574 #. type: Plain text
6575 #: build/C/man3/pthread_join.3:49
6576 msgid ""
6577 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6578 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6579 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6580 msgstr ""
6581 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6582 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6583 "B<pthread_join>() はすぐに返る。\n"
6584 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6585
6586 #. type: Plain text
6587 #: build/C/man3/pthread_join.3:63
6588 msgid ""
6589 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6590 "the target thread (i.e., the value that the target thread supplied to "
6591 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6592 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6593 msgstr ""
6594 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6595 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6596 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6597 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6598
6599 #. type: Plain text
6600 #: build/C/man3/pthread_join.3:70
6601 msgid ""
6602 "If multiple threads simultaneously try to join with the same thread, the "
6603 "results are undefined.  If the thread calling B<pthread_join>()  is "
6604 "canceled, then the target thread will remain joinable (i.e., it will not be "
6605 "detached)."
6606 msgstr ""
6607 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6608 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6609 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6610 "ならない)。"
6611
6612 #. type: Plain text
6613 #: build/C/man3/pthread_join.3:75
6614 msgid ""
6615 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6616 "number."
6617 msgstr ""
6618 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6619 "エラーの場合、エラー番号を返す。"
6620
6621 #. type: TP
6622 #: build/C/man3/pthread_join.3:76
6623 #, no-wrap
6624 msgid "B<EDEADLK>"
6625 msgstr "B<EDEADLK>"
6626
6627 #.  The following verified by testing on glibc 2.8/NPTL:
6628 #.  The following verified by testing on glibc 2.8/NPTL:
6629 #. type: Plain text
6630 #: build/C/man3/pthread_join.3:85
6631 msgid ""
6632 "A deadlock was detected (e.g., two threads tried to join with each other); "
6633 "or I<thread> specifies the calling thread."
6634 msgstr ""
6635 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6636 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6637
6638 #.  POSIX.1-2001 does not specify this error case.
6639 #. type: Plain text
6640 #: build/C/man3/pthread_join.3:93
6641 msgid "Another thread is already waiting to join with this thread."
6642 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6643
6644 #. type: Plain text
6645 #: build/C/man3/pthread_join.3:104
6646 msgid ""
6647 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6648 "the target thread has terminated."
6649 msgstr ""
6650 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6651 "呼び出し側には、対象スレッドが終了していることが保証される。"
6652
6653 #. type: Plain text
6654 #: build/C/man3/pthread_join.3:107
6655 msgid ""
6656 "Joining with a thread that has previously been joined results in undefined "
6657 "behavior."
6658 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6659
6660 #. type: Plain text
6661 #: build/C/man3/pthread_join.3:115
6662 msgid ""
6663 "Failure to join with a thread that is joinable (i.e., one that is not "
6664 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6665 "zombie thread consumes some system resources, and when enough zombie threads "
6666 "have accumulated, it will no longer be possible to create new threads (or "
6667 "processes)."
6668 msgstr ""
6669 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6670 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6671 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6672 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6673 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6674 "このようなことが起きるのは避けること。"
6675
6676 #. type: Plain text
6677 #: build/C/man3/pthread_join.3:121
6678 msgid ""
6679 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6680 "\"join with any terminated thread\".  If you believe you need this "
6681 "functionality, you probably need to rethink your application design."
6682 msgstr ""
6683 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6684 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6685 "この機能が必要だと思うような場合には、おそらく\n"
6686 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6687
6688 #. type: Plain text
6689 #: build/C/man3/pthread_join.3:124
6690 msgid ""
6691 "All of the threads in a process are peers: any thread can join with any "
6692 "other thread in the process."
6693 msgstr ""
6694 "プロセス内の全てのスレッドは対等であり、\n"
6695 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6696
6697 #. type: Plain text
6698 #: build/C/man3/pthread_join.3:134
6699 msgid ""
6700 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6701 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6702 msgstr ""
6703 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6704 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6705
6706 #. type: TH
6707 #: build/C/man3/pthread_kill.3:26
6708 #, no-wrap
6709 msgid "PTHREAD_KILL"
6710 msgstr "PTHREAD_KILL"
6711
6712 #. type: TH
6713 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigqueue.3:25
6714 #, no-wrap
6715 msgid "2012-08-19"
6716 msgstr "2012-08-19"
6717
6718 #. type: Plain text
6719 #: build/C/man3/pthread_kill.3:29
6720 msgid "pthread_kill - send a signal to a thread"
6721 msgstr "pthread_kill - スレッドにシグナルを送信する"
6722
6723 #. type: Plain text
6724 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6725 #, no-wrap
6726 msgid "B<#include E<lt>signal.hE<gt>>\n"
6727 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6728
6729 #. type: Plain text
6730 #: build/C/man3/pthread_kill.3:34
6731 #, no-wrap
6732 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6733 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6734
6735 #. type: Plain text
6736 #: build/C/man3/pthread_kill.3:47
6737 msgid ""
6738 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6739 "thread in the same process as the caller.  The signal is asynchronously "
6740 "directed to I<thread>."
6741 msgstr ""
6742 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6743 "スレッド I<thread> にシグナル I<sig> を送信する。\n"
6744 "シグナルは非同期に I<thread> へ直接送られる。"
6745
6746 #. type: Plain text
6747 #: build/C/man3/pthread_kill.3:52
6748 msgid ""
6749 "If I<sig> is 0, then no signal is sent, but error checking is still "
6750 "performed; this can be used to check for the existence of a thread ID."
6751 msgstr ""
6752 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6753 "エラーチェックだけは実行される。\n"
6754 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6755
6756 #. type: Plain text
6757 #: build/C/man3/pthread_kill.3:57
6758 msgid ""
6759 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6760 "number, and no signal is sent."
6761 msgstr ""
6762 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6763 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6764
6765 #. type: Plain text
6766 #: build/C/man3/pthread_kill.3:61
6767 msgid "An invalid signal was specified."
6768 msgstr "無効なシグナルが指定された。"
6769
6770 #. type: Plain text
6771 #: build/C/man3/pthread_kill.3:75
6772 msgid ""
6773 "Signal dispositions are process-wide: if a signal handler is installed, the "
6774 "handler will be invoked in the thread I<thread>, but if the disposition of "
6775 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6776 "affect the whole process."
6777 msgstr ""
6778 "シグナルの配送はプロセス全体で行われる。\n"
6779 "シグナルハンドラが設定されている場合、\n"
6780 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6781 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6782 "シグナルに対するアクションはプロセス全体に影響がある。"
6783
6784 #. type: Plain text
6785 #: build/C/man3/pthread_kill.3:84
6786 msgid ""
6787 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6788 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6789 msgstr ""
6790 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6791 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6792
6793 #. type: TH
6794 #: build/C/man3/pthread_kill_other_threads_np.3:26
6795 #, no-wrap
6796 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6797 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6798
6799 #. type: TH
6800 #: build/C/man3/pthread_kill_other_threads_np.3:26
6801 #, no-wrap
6802 msgid "2010-09-09"
6803 msgstr "2010-09-09"
6804
6805 #. type: Plain text
6806 #: build/C/man3/pthread_kill_other_threads_np.3:29
6807 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6808 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6809
6810 #. type: Plain text
6811 #: build/C/man3/pthread_kill_other_threads_np.3:34
6812 #, no-wrap
6813 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6814 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6815
6816 #.  .SH VERSIONS
6817 #.  Available since glibc 2.0
6818 #. type: Plain text
6819 #: build/C/man3/pthread_kill_other_threads_np.3:47
6820 msgid ""
6821 "B<pthread_kill_other_threads_np>()  has an effect only in the LinuxThreads "
6822 "threading implementation.  On that implementation, calling this function "
6823 "causes the immediate termination of all threads in the application, except "
6824 "the calling thread.  The cancellation state and cancellation type of the to-"
6825 "be-terminated threads are ignored, and the cleanup handlers are not called "
6826 "in those threads."
6827 msgstr ""
6828 "B<pthread_kill_other_threads_np>() は、\n"
6829 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6830 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6831 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6832 "終了対象のスレッドの cancelability state と cancelability type は\n"
6833 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6834
6835 #. type: Plain text
6836 #: build/C/man3/pthread_kill_other_threads_np.3:59
6837 msgid ""
6838 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6839 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6840 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6841 "the other threads of an application are not automatically terminated (as "
6842 "POSIX.1-2001 requires) during B<execve>(2)."
6843 msgstr ""
6844 "B<pthread_kill_other_threads_np>() は、\n"
6845 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6846 "呼ばれることを目的として用意されている。\n"
6847 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6848 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6849 "終了されないという制限を解決するために設計された。"
6850
6851 #. type: Plain text
6852 #: build/C/man3/pthread_kill_other_threads_np.3:66
6853 msgid ""
6854 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6855 "exists, but does nothing.  (Nothing needs to be done, because the "
6856 "implementation does the right thing during an B<execve>(2).)"
6857 msgstr ""
6858 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6859 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6860 "何もする必要がないということだ)。"
6861
6862 #. type: Plain text
6863 #: build/C/man3/pthread_kill_other_threads_np.3:72
6864 msgid ""
6865 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6866 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6867 msgstr ""
6868 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6869 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6870
6871 #. type: TH
6872 #: build/C/man3/pthread_self.3:26
6873 #, no-wrap
6874 msgid "PTHREAD_SELF"
6875 msgstr "PTHREAD_SELF"
6876
6877 #. type: Plain text
6878 #: build/C/man3/pthread_self.3:29
6879 msgid "pthread_self - obtain ID of the calling thread"
6880 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6881
6882 #. type: Plain text
6883 #: build/C/man3/pthread_self.3:34
6884 #, no-wrap
6885 msgid "B<pthread_t pthread_self(void);>\n"
6886 msgstr "B<pthread_t pthread_self(void);>\n"
6887
6888 #. type: Plain text
6889 #: build/C/man3/pthread_self.3:46
6890 msgid ""
6891 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6892 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6893 "(3)  call that created this thread."
6894 msgstr ""
6895 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6896 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6897 "呼び出しで I<*thread> で返されるのと同じ値である。"
6898
6899 #. type: Plain text
6900 #: build/C/man3/pthread_self.3:48
6901 msgid "This function always succeeds, returning the calling thread's ID."
6902 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6903
6904 #. type: Plain text
6905 #: build/C/man3/pthread_self.3:63
6906 msgid ""
6907 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6908 "represent a thread ID; for example, representation using either an "
6909 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6910 "I<pthread_t> can't portably be compared using the C equality operator "
6911 "(B<==>); use B<pthread_equal>(3)  instead."
6912 msgstr ""
6913 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
6914 "スレッド実装が完全に自由に選択してよいことになっている。\n"
6915 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
6916 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
6917 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
6918 "代わりに B<pthread_equal>(3) を使うこと。"
6919
6920 #. type: Plain text
6921 #: build/C/man3/pthread_self.3:67
6922 msgid ""
6923 "Thread identifiers should be considered opaque: any attempt to use a thread "
6924 "ID other than in pthreads calls is nonportable and can lead to unspecified "
6925 "results."
6926 msgstr ""
6927 "スレッド識別子はその内部構造を意識すべきではない。\n"
6928 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
6929 "移植性がなくなり、どのような結果が得られるかも分からない。"
6930
6931 #. type: Plain text
6932 #: build/C/man3/pthread_self.3:71
6933 msgid ""
6934 "Thread IDs are guaranteed to be unique only within a process.  A thread ID "
6935 "may be reused after a terminated thread has been joined, or a detached "
6936 "thread has terminated."
6937 msgstr ""
6938 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
6939 "終了したスレッドが join されたり、\n"
6940 "切り離された (detached) スレッドが終了されたりした後は、\n"
6941 "そのスレッド ID は再利用されることがある。"
6942
6943 #. type: Plain text
6944 #: build/C/man3/pthread_self.3:76
6945 msgid ""
6946 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
6947 "kernel thread ID returned by a call to B<gettid>(2)."
6948 msgstr ""
6949 "B<pthread_self>() が返すスレッド ID は、\n"
6950 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
6951
6952 #. type: Plain text
6953 #: build/C/man3/pthread_self.3:80
6954 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
6955 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
6956
6957 #. type: TH
6958 #: build/C/man3/pthread_setaffinity_np.3:26
6959 #, no-wrap
6960 msgid "PTHREAD_SETAFFINITY_NP"
6961 msgstr "PTHREAD_SETAFFINITY_NP"
6962
6963 #. type: Plain text
6964 #: build/C/man3/pthread_setaffinity_np.3:30
6965 msgid ""
6966 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
6967 "thread"
6968 msgstr ""
6969 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
6970 "CPU affinity の設定/取得を行う"
6971
6972 #. type: Plain text
6973 #: build/C/man3/pthread_setaffinity_np.3:39
6974 #, no-wrap
6975 msgid ""
6976 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6977 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
6978 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6979 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
6980 msgstr ""
6981 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6982 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
6983 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
6984 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
6985
6986 #. type: Plain text
6987 #: build/C/man3/pthread_setaffinity_np.3:54
6988 msgid ""
6989 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
6990 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
6991 "successful, and the thread is not currently running on one of the CPUs in "
6992 "I<cpuset>, then it is migrated to one of those CPUs."
6993 msgstr ""
6994 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
6995 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
6996 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
6997 "場合は、スレッドは指定された CPU のいずれかに移動される。"
6998
6999 #. type: Plain text
7000 #: build/C/man3/pthread_setaffinity_np.3:61
7001 msgid ""
7002 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7003 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7004 msgstr ""
7005 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7006 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7007
7008 #. type: Plain text
7009 #: build/C/man3/pthread_setaffinity_np.3:77
7010 msgid ""
7011 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7012 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
7013 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
7014 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7015 msgstr ""
7016 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7017 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7018 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7019 "割り当てている場合には、別の値になることもある)。"
7020
7021 #. type: TP
7022 #: build/C/man3/pthread_setaffinity_np.3:81
7023 #, no-wrap
7024 msgid "B<EFAULT>"
7025 msgstr "B<EFAULT>"
7026
7027 #. type: Plain text
7028 #: build/C/man3/pthread_setaffinity_np.3:84
7029 msgid "A supplied memory address was invalid."
7030 msgstr "指定されたメモリアドレスが無効である。"
7031
7032 #. type: Plain text
7033 #: build/C/man3/pthread_setaffinity_np.3:93
7034 msgid ""
7035 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7036 "processors that are currently physically on the system and permitted to the "
7037 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7038 "mechanism described in B<cpuset>(7)."
7039 msgstr ""
7040 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7041 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7042 "されているプロセッサが一つも含まれていない。\n"
7043 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7044 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7045
7046 #.  FIXME . ?
7047 #.  Loic Domaigne commented: it seems that in the future the
7048 #.  kernel developers want to make cpumask_t dynamic, so
7049 #.  CONFIG_NR_CPUS might become obsolete in the future.
7050 #.  cpumask_t
7051 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7052 #.  of the cpumask_t type.
7053 #. type: Plain text
7054 #: build/C/man3/pthread_setaffinity_np.3:109
7055 msgid ""
7056 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7057 "the set supported by the kernel.  (The kernel configuration option "
7058 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7059 "type used to represent CPU sets.)"
7060 msgstr ""
7061 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7062 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7063 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7064 "データ型がサポートする CPU 集合の範囲が定義される。)"
7065
7066 #. type: Plain text
7067 #: build/C/man3/pthread_setaffinity_np.3:114
7068 msgid ""
7069 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7070 "affinity mask used by the kernel."
7071 msgstr ""
7072 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7073 "affinity マスクの大きさよりも小さい。"
7074
7075 #. type: Plain text
7076 #: build/C/man3/pthread_setaffinity_np.3:137
7077 msgid ""
7078 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7079 "thread will actually run is the intersection of the set specified in the "
7080 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7081 "system may further restrict the set of CPUs on which the thread runs if the "
7082 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7083 "restrictions on the actual set of CPUs on which the thread will run are "
7084 "silently imposed by the kernel."
7085 msgstr ""
7086 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7087 "そのスレッドが実際に実行される CPU 集合は、\n"
7088 "I<cpuset> 引き数で指定された集合と\n"
7089 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7090 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7091 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7092 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7093 "これらの制限は、カーネルにより黙って適用される。"
7094
7095 #. type: Plain text
7096 #: build/C/man3/pthread_setaffinity_np.3:143
7097 msgid ""
7098 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7099 "B<sched_getaffinity>(2)  system calls."
7100 msgstr ""
7101 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7102 "B<sched_getaffinity>(2) を使って実装されている。"
7103
7104 #. type: Plain text
7105 #: build/C/man3/pthread_setaffinity_np.3:154
7106 msgid ""
7107 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7108 "creator's CPU affinity mask."
7109 msgstr ""
7110 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7111 "作成者の CPU affinity マスクを継承する。"
7112
7113 #. type: Plain text
7114 #: build/C/man3/pthread_setaffinity_np.3:162
7115 msgid ""
7116 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7117 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7118 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7119 "check the resulting CPU affinity mask of the thread."
7120 msgstr ""
7121 "以下のプログラムでは、メインスレッドは\n"
7122 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7123 "CPU 0 から 7 が含まれるように設定し\n"
7124 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7125 "その後で B<pthread_getaffinity_np>() を使って\n"
7126 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7127
7128 #. type: Plain text
7129 #: build/C/man3/pthread_setaffinity_np.3:169
7130 #, no-wrap
7131 msgid ""
7132 "#define _GNU_SOURCE\n"
7133 "#include E<lt>pthread.hE<gt>\n"
7134 "#include E<lt>stdio.hE<gt>\n"
7135 "#include E<lt>stdlib.hE<gt>\n"
7136 "#include E<lt>errno.hE<gt>\n"
7137 msgstr ""
7138 "#define _GNU_SOURCE\n"
7139 "#include E<lt>pthread.hE<gt>\n"
7140 "#include E<lt>stdio.hE<gt>\n"
7141 "#include E<lt>stdlib.hE<gt>\n"
7142 "#include E<lt>errno.hE<gt>\n"
7143
7144 #. type: Plain text
7145 #: build/C/man3/pthread_setaffinity_np.3:179
7146 #, no-wrap
7147 msgid ""
7148 "int\n"
7149 "main(int argc, char *argv[])\n"
7150 "{\n"
7151 "    int s, j;\n"
7152 "    cpu_set_t cpuset;\n"
7153 "    pthread_t thread;\n"
7154 msgstr ""
7155 "int\n"
7156 "main(int argc, char *argv[])\n"
7157 "{\n"
7158 "    int s, j;\n"
7159 "    cpu_set_t cpuset;\n"
7160 "    pthread_t thread;\n"
7161
7162 #. type: Plain text
7163 #: build/C/man3/pthread_setaffinity_np.3:181
7164 #, no-wrap
7165 msgid "    thread = pthread_self();\n"
7166 msgstr "    thread = pthread_self();\n"
7167
7168 #. type: Plain text
7169 #: build/C/man3/pthread_setaffinity_np.3:183
7170 #, no-wrap
7171 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7172 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7173
7174 #. type: Plain text
7175 #: build/C/man3/pthread_setaffinity_np.3:187
7176 #, no-wrap
7177 msgid ""
7178 "    CPU_ZERO(&cpuset);\n"
7179 "    for (j = 0; j E<lt> 8; j++)\n"
7180 "        CPU_SET(j, &cpuset);\n"
7181 msgstr ""
7182 "    CPU_ZERO(&cpuset);\n"
7183 "    for (j = 0; j E<lt> 8; j++)\n"
7184 "        CPU_SET(j, &cpuset);\n"
7185
7186 #. type: Plain text
7187 #: build/C/man3/pthread_setaffinity_np.3:191
7188 #, no-wrap
7189 msgid ""
7190 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7191 "    if (s != 0)\n"
7192 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7193 msgstr ""
7194 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7195 "    if (s != 0)\n"
7196 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7197
7198 #. type: Plain text
7199 #: build/C/man3/pthread_setaffinity_np.3:193
7200 #, no-wrap
7201 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7202 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7203
7204 #. type: Plain text
7205 #: build/C/man3/pthread_setaffinity_np.3:197
7206 #, no-wrap
7207 msgid ""
7208 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7209 "    if (s != 0)\n"
7210 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7211 msgstr ""
7212 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7213 "    if (s != 0)\n"
7214 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7215
7216 #. type: Plain text
7217 #: build/C/man3/pthread_setaffinity_np.3:202
7218 #, no-wrap
7219 msgid ""
7220 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7221 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7222 "        if (CPU_ISSET(j, &cpuset))\n"
7223 "            printf(\"    CPU %d\\en\", j);\n"
7224 msgstr ""
7225 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7226 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7227 "        if (CPU_ISSET(j, &cpuset))\n"
7228 "            printf(\"    CPU %d\\en\", j);\n"
7229
7230 #. type: Plain text
7231 #: build/C/man3/pthread_setaffinity_np.3:205
7232 #: build/C/man3/pthread_setschedparam.3:430
7233 #, no-wrap
7234 msgid ""
7235 "    exit(EXIT_SUCCESS);\n"
7236 "}\n"
7237 msgstr ""
7238 "    exit(EXIT_SUCCESS);\n"
7239 "}\n"
7240
7241 #. type: Plain text
7242 #: build/C/man3/pthread_setaffinity_np.3:214
7243 msgid ""
7244 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7245 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7246 "B<cpuset>(7), B<pthreads>(7)"
7247 msgstr ""
7248 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7249 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7250 "B<cpuset>(7), B<pthreads>(7)"
7251
7252 #. type: TH
7253 #: build/C/man3/pthread_setcancelstate.3:26
7254 #, no-wrap
7255 msgid "PTHREAD_SETCANCELSTATE"
7256 msgstr "PTHREAD_SETCANCELSTATE"
7257
7258 #. type: Plain text
7259 #: build/C/man3/pthread_setcancelstate.3:30
7260 msgid ""
7261 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7262 "type"
7263 msgstr ""
7264 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7265 "cancelability type を設定する"
7266
7267 #. type: Plain text
7268 #: build/C/man3/pthread_setcancelstate.3:36
7269 #, no-wrap
7270 msgid ""
7271 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7272 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7273 msgstr ""
7274 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7275 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7276
7277 #. type: Plain text
7278 #: build/C/man3/pthread_setcancelstate.3:51
7279 msgid ""
7280 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7281 "thread to the value given in I<state>.  The previous cancelability state of "
7282 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7283 "I<state> argument must have one of the following values:"
7284 msgstr ""
7285 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7286 "cancelability state に I<state> で指定された\n"
7287 "値を設定する。変更前のスレッドの cancelability state は\n"
7288 "I<oldstate> が指すバッファで返される。\n"
7289 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7290
7291 #. type: TP
7292 #: build/C/man3/pthread_setcancelstate.3:51
7293 #, no-wrap
7294 msgid "B<PTHREAD_CANCEL_ENABLE>"
7295 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7296
7297 #. type: Plain text
7298 #: build/C/man3/pthread_setcancelstate.3:58
7299 msgid ""
7300 "The thread is cancelable.  This is the default cancelability state in all "
7301 "new threads, including the initial thread.  The thread's cancelability type "
7302 "determines when a cancelable thread will respond to a cancellation request."
7303 msgstr ""
7304 "スレッドは取り消し可能 (cancelable) である。\n"
7305 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7306 "cancelability state である。これには最初のスレッドも含まれる。\n"
7307 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7308 "取り消し要求にいつ反応するかが決まる。"
7309
7310 #. type: TP
7311 #: build/C/man3/pthread_setcancelstate.3:58
7312 #, no-wrap
7313 msgid "B<PTHREAD_CANCEL_DISABLE>"
7314 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7315
7316 #. type: Plain text
7317 #: build/C/man3/pthread_setcancelstate.3:63
7318 msgid ""
7319 "The thread is not cancelable.  If a cancellation request is received, it is "
7320 "blocked until cancelability is enabled."
7321 msgstr ""
7322 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7323 "取り消し可能に設定されるまでその要求はブロックされる。"
7324
7325 #. type: Plain text
7326 #: build/C/man3/pthread_setcancelstate.3:75
7327 msgid ""
7328 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7329 "thread to the value given in I<type>.  The previous cancelability type of "
7330 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7331 "argument must have one of the following values:"
7332 msgstr ""
7333 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7334 "cancelability type に I<type> で指定された値を設定する。\n"
7335 "変更前のスレッドの cancelability type は\n"
7336 "I<oldtype> が指すバッファで返される。\n"
7337 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7338
7339 #. type: TP
7340 #: build/C/man3/pthread_setcancelstate.3:75
7341 #, no-wrap
7342 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7343 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7344
7345 #. type: Plain text
7346 #: build/C/man3/pthread_setcancelstate.3:82
7347 msgid ""
7348 "A cancellation request is deferred until the thread next calls a function "
7349 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7350 "cancelability type in all new threads, including the initial thread."
7351 msgstr ""
7352 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7353 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7354 "スレッドでのデフォルトの cancelability type である。\n"
7355 "これには最初のスレッドも含まれる。"
7356
7357 #. type: TP
7358 #: build/C/man3/pthread_setcancelstate.3:82
7359 #, no-wrap
7360 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7361 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7362
7363 #. type: Plain text
7364 #: build/C/man3/pthread_setcancelstate.3:88
7365 msgid ""
7366 "The thread can be canceled at any time.  (Typically, it will be canceled "
7367 "immediately upon receiving a cancellation request, but the system doesn't "
7368 "guarantee this.)"
7369 msgstr ""
7370 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7371 "システムがそのことを保証しているわけではない)。"
7372
7373 #. type: Plain text
7374 #: build/C/man3/pthread_setcancelstate.3:92
7375 msgid ""
7376 "The set-and-get operation performed by each of these functions is atomic "
7377 "with respect to other threads in the process calling the same function."
7378 msgstr ""
7379 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7380 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7381 "アトミックに行われる。"
7382
7383 #. type: Plain text
7384 #: build/C/man3/pthread_setcancelstate.3:99
7385 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7386 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7387
7388 #. type: Plain text
7389 #: build/C/man3/pthread_setcancelstate.3:103
7390 msgid "Invalid value for I<state>."
7391 msgstr "I<state> に無効な値が指定された。"
7392
7393 #. type: Plain text
7394 #: build/C/man3/pthread_setcancelstate.3:107
7395 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7396 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7397
7398 #.  .SH VERSIONS
7399 #.  Available since glibc 2.0
7400 #. type: Plain text
7401 #: build/C/man3/pthread_setcancelstate.3:113
7402 msgid "Invalid value for I<type>."
7403 msgstr "I<type> に無効な値が指定された。"
7404
7405 #. type: Plain text
7406 #: build/C/man3/pthread_setcancelstate.3:118
7407 msgid ""
7408 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7409 "(3)."
7410 msgstr ""
7411 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7412 "B<pthread_cancel>(3) を参照。"
7413
7414 #. type: Plain text
7415 #: build/C/man3/pthread_setcancelstate.3:125
7416 msgid ""
7417 "Briefly disabling cancelability is useful if a thread performs some critical "
7418 "action that must not be interrupted by a cancellation request.  Beware of "
7419 "disabling cancelability for long periods, or around operations that may "
7420 "block for long periods, since that will render the thread unresponsive to "
7421 "cancellation requests."
7422 msgstr ""
7423 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7424 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7425 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7426 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7427 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7428 "スレッドが応答しない状態になってしまうからである。"
7429
7430 #. type: Plain text
7431 #: build/C/man3/pthread_setcancelstate.3:156
7432 msgid ""
7433 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7434 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7435 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7436 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7437 "because the application has no way of knowing what the state of these "
7438 "resources is when the thread is canceled; that is, did cancellation occur "
7439 "before the resources were reserved, while they were reserved, or after they "
7440 "were released? Furthermore, some internal data structures (e.g., the linked "
7441 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7442 "left in an inconsistent state if cancellation occurs in the middle of the "
7443 "function call.  Consequently, clean-up handlers cease to be useful.  "
7444 "Functions that can be safely asynchronously canceled are called I<async-"
7445 "cancel-safe functions>.  POSIX.1-2001 requires only that B<pthread_cancel>"
7446 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7447 "cancel-safe.  In general, other library functions can't be safely called "
7448 "from an asynchronously cancelable thread.  One of the few circumstances in "
7449 "which asynchronous cancelability is useful is for cancellation of a thread "
7450 "that is in a pure compute-bound loop."
7451 msgstr ""
7452 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7453 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7454 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7455 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7456 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7457 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7458 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7459 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7460 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7461 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7462 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7463 "が役に立たないものになってしまう。\n"
7464 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7465 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7466 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7467 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7468 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7469 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7470 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7471
7472 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7473 #. type: Plain text
7474 #: build/C/man3/pthread_setcancelstate.3:174
7475 msgid ""
7476 "The Linux threading implementations permit the I<oldstate> argument of "
7477 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7478 "the previous cancelability state is not returned to the caller.  Many other "
7479 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7480 "does not specify this point, so portable applications should always specify "
7481 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7482 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7483 msgstr ""
7484 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7485 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7486 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7487 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7488 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7489 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7490 "NULL 以外の値を指定するようにすべきである。\n"
7491 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7492 "全く同じことが言える。"
7493
7494 #. type: Plain text
7495 #: build/C/man3/pthread_setcancelstate.3:177
7496 msgid "See B<pthread_cancel>(3)."
7497 msgstr "B<pthread_cancel>(3) を参照。"
7498
7499 #. type: Plain text
7500 #: build/C/man3/pthread_setcancelstate.3:182
7501 msgid ""
7502 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7503 "B<pthreads>(7)"
7504 msgstr ""
7505 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7506 "B<pthreads>(7)"
7507
7508 #. type: TH
7509 #: build/C/man3/pthread_setconcurrency.3:25
7510 #, no-wrap
7511 msgid "PTHREAD_SETCONCURRENCY"
7512 msgstr "PTHREAD_SETCONCURRENCY"
7513
7514 #. type: TH
7515 #: build/C/man3/pthread_setconcurrency.3:25
7516 #, no-wrap
7517 msgid "2009-04-10"
7518 msgstr "2009-04-10"
7519
7520 #. type: Plain text
7521 #: build/C/man3/pthread_setconcurrency.3:29
7522 msgid ""
7523 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7524 "level"
7525 msgstr ""
7526 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7527 "行う"
7528
7529 #. type: Plain text
7530 #: build/C/man3/pthread_setconcurrency.3:35
7531 #, no-wrap
7532 msgid ""
7533 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7534 "B<int pthread_getconcurrency(void);>\n"
7535 msgstr ""
7536 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7537 "B<int pthread_getconcurrency(void);>\n"
7538
7539 #. type: Plain text
7540 #: build/C/man3/pthread_setconcurrency.3:48
7541 msgid ""
7542 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7543 "application's desired concurrency level, specified in I<new_level>.  The "
7544 "implementation takes this only as a hint: POSIX.1 does not specify the level "
7545 "of concurrency that should be provided as a result of calling "
7546 "B<pthread_setconcurrency>()."
7547 msgstr ""
7548 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7549 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7550 "希望する並列処理レベルは I<new_level> で指定する。\n"
7551 "スレッド実装はこの情報をヒントとしてのみ利用する。\n"
7552 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7553 "どのような並列度になるべきかは規定されていない。"
7554
7555 #. type: Plain text
7556 #: build/C/man3/pthread_setconcurrency.3:53
7557 msgid ""
7558 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7559 "concurrency level as it deems appropriate."
7560 msgstr ""
7561 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7562 "実装側で適切とみなしたレベルに設定するようになる。"
7563
7564 #. type: Plain text
7565 #: build/C/man3/pthread_setconcurrency.3:56
7566 msgid ""
7567 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7568 "level for this process."
7569 msgstr ""
7570 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7571 "の現在値を返す。"
7572
7573 #. type: Plain text
7574 #: build/C/man3/pthread_setconcurrency.3:61
7575 msgid ""
7576 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7577 "nonzero error number."
7578 msgstr ""
7579 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7580 "エラーの場合、 0 以外のエラー番号を返す。"
7581
7582 #. type: Plain text
7583 #: build/C/man3/pthread_setconcurrency.3:68
7584 msgid ""
7585 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7586 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7587 "B<pthread_setconcurrency>()  has not previously been called."
7588 msgstr ""
7589 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7590 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7591 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7592 "それまでに一度も呼び出されていない場合は 0 が返る。"
7593
7594 #. type: Plain text
7595 #: build/C/man3/pthread_setconcurrency.3:71
7596 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7597 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7598
7599 #. type: Plain text
7600 #: build/C/man3/pthread_setconcurrency.3:75
7601 msgid "I<new_level> is negative."
7602 msgstr "I<new_level> が負である。"
7603
7604 #. type: Plain text
7605 #: build/C/man3/pthread_setconcurrency.3:81
7606 msgid ""
7607 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7608 "I<new_level> would cause a system resource to be exceeded\")."
7609 msgstr ""
7610 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7611 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7612 "超過してしまう」)。"
7613
7614 #. type: Plain text
7615 #: build/C/man3/pthread_setconcurrency.3:83
7616 msgid "These functions are available in glibc since version 2.1."
7617 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7618
7619 #. type: Plain text
7620 #: build/C/man3/pthread_setconcurrency.3:87
7621 msgid "The default concurrency level is 0."
7622 msgstr "デフォルトの concurrency level は 0 である。"
7623
7624 #. type: Plain text
7625 #: build/C/man3/pthread_setconcurrency.3:94
7626 msgid ""
7627 "Concurrency levels are meaningful only for M:N threading implementations, "
7628 "where at any moment a subset of a process's set of user-level threads may be "
7629 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7630 "concurrency level allows the application to give the system a hint as to the "
7631 "number of kernel-scheduling entities that should be provided for efficient "
7632 "execution of the application."
7633 msgstr ""
7634 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7635 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7636 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7637 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7638 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7639 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7640 "ムに伝えることができる。"
7641
7642 #. type: Plain text
7643 #: build/C/man3/pthread_setconcurrency.3:100
7644 msgid ""
7645 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7646 "concurrency level has no meaning.  In other words, on Linux these functions "
7647 "merely exist for compatibility with other systems, and they have no effect "
7648 "on the execution of a program."
7649 msgstr ""
7650 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7651 "並列処理レベルを設定しても何の意味もない。\n"
7652 "言い換えると、 Linux では、これらの関数は、\n"
7653 "他のシステムとの互換性のためだけに存在し、\n"
7654 "プログラムの実行には何の影響も与えないということである。"
7655
7656 #. type: Plain text
7657 #: build/C/man3/pthread_setconcurrency.3:103
7658 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7659 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7660
7661 #. type: TH
7662 #: build/C/man3/pthread_setname_np.3:26
7663 #, no-wrap
7664 msgid "PTHREAD_SETNAME_NP"
7665 msgstr "PTHREAD_SETNAME_NP"
7666
7667 #. type: Plain text
7668 #: build/C/man3/pthread_setname_np.3:29
7669 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7670 msgstr "pthread_setname_np, pthread_getname_np - スレッド名の設定/取得を行う"
7671
7672 #. type: Plain text
7673 #: build/C/man3/pthread_setname_np.3:36
7674 #, no-wrap
7675 msgid ""
7676 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7677 "B<#include E<lt>pthread.hE<gt>>\n"
7678 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7679 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7680 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7681 msgstr ""
7682 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7683 "B<#include E<lt>pthread.hE<gt>>\n"
7684 "B<int pthread_setname_np(pthread_t >I<thread>B<, const char *>I<name>B<);>\n"
7685 "B<int pthread_getname_np(pthread_t >I<thread>B<,>\n"
7686 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7687
7688 #. type: Plain text
7689 #: build/C/man3/pthread_setname_np.3:55
7690 msgid ""
7691 "By default, all the threads created using B<pthread_create>()  inherit the "
7692 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7693 "unique name for a thread, which can be useful for debugging multithreaded "
7694 "applications.  The thread name is a meaningful C language string, whose "
7695 "length is restricted to 16 characters, including the terminating null byte "
7696 "(\\(aq\\e0\\(aq).  The I<thread> argument specifies the thread whose name is "
7697 "to be changed; I<name> specifies the new name."
7698 msgstr "デフォルトでは、 B<pthread_create>() で作成されたすべてのスレッドはプログラム名を継承する。 B<pthread_setname_np>() 関数を使うとスレッドに固有の名前を設定することができる。 スレッド固有の名前はマルチスレッド・アプリケーションのデバッグに便利である。 スレッド名は意味のある C 言語の文字列である。 その長さは 16 文字に限定されており、 終端の NULL バイト (\\(aq\\e0\\(aq) も 16 文字に含まれる。 I<thread> 引き数で名前を変更するスレッドを指定する。 I<name> には新しい名前を指定する。"
7699
7700 #. type: Plain text
7701 #: build/C/man3/pthread_setname_np.3:72
7702 msgid ""
7703 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7704 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7705 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7706 "specifies the number of bytes available in I<name>.  The buffer specified by "
7707 "I<name> should be at least 16 characters in length.  The returned thread "
7708 "name in the output buffer will be null terminated."
7709 msgstr ""
7710 "B<pthread_getname_np>() 関数を使うと、 スレッド名を取得することができる。 "
7711 "I<thread> 引き数は名前を取得するスレッドを指定する。 バッファ I<name> はス"
7712 "レッド名を返すのに使用される。 I<len> には I<name> の大きさをバイトで指定す"
7713 "る。 I<name> で指定されたバッファの大きさは最低でも 16 文字とすべきである。 "
7714 "出力バッファに返されたスレッド名は NULL 終端される。"
7715
7716 #. type: Plain text
7717 #: build/C/man3/pthread_setname_np.3:79
7718 msgid ""
7719 "The B<pthread_setname_np>()  function can fail with the following error:"
7720 msgstr "B<pthread_setname_np>() は以下のエラーで失敗する場合がある。"
7721
7722 #. type: TP
7723 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7724 #, no-wrap
7725 msgid "B<ERANGE>"
7726 msgstr "B<ERANGE>"
7727
7728 #. type: Plain text
7729 #: build/C/man3/pthread_setname_np.3:84
7730 msgid ""
7731 "The length of the string specified pointed to by I<name> exceeds the allowed "
7732 "limit."
7733 msgstr "I<name> で指定された文字列の長さが、許可されている上限を超えている。"
7734
7735 #. type: Plain text
7736 #: build/C/man3/pthread_setname_np.3:88
7737 msgid ""
7738 "The B<pthread_getname_np>()  function can fail with the following error:"
7739 msgstr "B<pthread_getname_np>() は以下のエラーで失敗する場合がある。"
7740
7741 #. type: Plain text
7742 #: build/C/man3/pthread_setname_np.3:95
7743 msgid ""
7744 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7745 "name."
7746 msgstr ""
7747 "I<name> と I<len> で指定されたバッファが、 スレッド名を格納するには短かすぎ"
7748 "る。"
7749
7750 #. type: Plain text
7751 #: build/C/man3/pthread_setname_np.3:100
7752 msgid ""
7753 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7754 "then the call may fail with one of the errors described in B<open>(2)."
7755 msgstr ""
7756 "I</proc/self/task/[tid]/comm> のオープンに失敗した場合、 これらの関数は "
7757 "B<open>(2) で説明されているエラーのいずれかで失敗する。"
7758
7759 #. type: Plain text
7760 #: build/C/man3/pthread_setname_np.3:102
7761 msgid "These functions first appeared in glibc in version 2.12."
7762 msgstr "これらの関数は glibc バージョン 2.12 で初めて登場した。"
7763
7764 #. type: Plain text
7765 #: build/C/man3/pthread_setname_np.3:104
7766 msgid "These functions are nonstandard GNU extensions."
7767 msgstr "これらの関数は非標準の GNU による拡張である。"
7768
7769 #. type: Plain text
7770 #: build/C/man3/pthread_setname_np.3:112
7771 msgid ""
7772 "B<pthread_setname_np>()  internally writes to the thread specific comm file "
7773 "under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7774 "B<pthread_getname_np>()  retrieves it from the same location."
7775 msgstr ""
7776 "B<pthread_setname_np>() は内部で I</proc> ファイルシステムのスレッド固有の "
7777 "comm ファイル (I</proc/self/task/[tid]/comm>) に書き込みを行う。 "
7778 "B<pthread_getname_np>() はこのファイルから読み出しを行う。"
7779
7780 #. type: Plain text
7781 #: build/C/man3/pthread_setname_np.3:118
7782 msgid ""
7783 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7784 "B<pthread_getname_np>()."
7785 msgstr ""
7786 "以下のプログラムは、 B<pthread_setname_np>() と B<pthread_getname_np>()\n"
7787 "の使用例を示している。"
7788
7789 #. type: Plain text
7790 #: build/C/man3/pthread_setname_np.3:120
7791 msgid "The following shell session shows a sample run of the program:"
7792 msgstr "以下のシェルセッションは、このプログラムの実行例である。"
7793
7794 #. type: Plain text
7795 #: build/C/man3/pthread_setname_np.3:136
7796 #, no-wrap
7797 msgid ""
7798 "$B< ./a.out>\n"
7799 "Created a thread. Default name is: a.out\n"
7800 "The thread name after setting it is THREADFOO.\n"
7801 "B<^Z>                           # Suspend the program\n"
7802 "[1]+  Stopped           ./a.out\n"
7803 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7804 "  PID   TID CMD                         COMMAND\n"
7805 " 5990  5990 ./a.out                     a.out\n"
7806 " 5990  5991 ./a.out                     THREADFOO\n"
7807 "$ B<cat /proc/5990/task/5990/comm>\n"
7808 "a.out\n"
7809 "$ B<cat /proc/5990/task/5991/comm>\n"
7810 "THREADFOO\n"
7811 msgstr ""
7812 "$B< ./a.out>\n"
7813 "Created a thread. Default name is: a.out\n"
7814 "The thread name after setting it is THREADFOO.\n"
7815 "B<^Z>                           # Suspend the program\n"
7816 "[1]+  Stopped           ./a.out\n"
7817 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7818 "  PID   TID CMD                         COMMAND\n"
7819 " 5990  5990 ./a.out                     a.out\n"
7820 " 5990  5991 ./a.out                     THREADFOO\n"
7821 "$ B<cat /proc/5990/task/5990/comm>\n"
7822 "a.out\n"
7823 "$ B<cat /proc/5990/task/5991/comm>\n"
7824 "THREADFOO\n"
7825
7826 #. type: Plain text
7827 #: build/C/man3/pthread_setname_np.3:148
7828 #, no-wrap
7829 msgid ""
7830 "#define _GNU_SOURCE\n"
7831 "#include E<lt>pthread.hE<gt>\n"
7832 "#include E<lt>stdio.hE<gt>\n"
7833 "#include E<lt>string.hE<gt>\n"
7834 "#include E<lt>unistd.hE<gt>\n"
7835 "#include E<lt>errno.hE<gt>\n"
7836 "#include E<lt>stdlib.hE<gt>\n"
7837 msgstr ""
7838 "#define _GNU_SOURCE\n"
7839 "#include E<lt>pthread.hE<gt>\n"
7840 "#include E<lt>stdio.hE<gt>\n"
7841 "#include E<lt>string.hE<gt>\n"
7842 "#include E<lt>unistd.hE<gt>\n"
7843 "#include E<lt>errno.hE<gt>\n"
7844 "#include E<lt>stdlib.hE<gt>\n"
7845
7846 #. type: Plain text
7847 #: build/C/man3/pthread_setname_np.3:150
7848 #, no-wrap
7849 msgid "#define NAMELEN 16\n"
7850 msgstr "#define NAMELEN 16\n"
7851
7852 #. type: Plain text
7853 #: build/C/man3/pthread_setname_np.3:154
7854 #, no-wrap
7855 msgid ""
7856 "#define errExitEN(en, msg) \\e\n"
7857 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7858 "        } while (0)\n"
7859 msgstr ""
7860 "#define errExitEN(en, msg) \\e\n"
7861 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7862 "        } while (0)\n"
7863
7864 #. type: Plain text
7865 #: build/C/man3/pthread_setname_np.3:161
7866 #, no-wrap
7867 msgid ""
7868 "static void *\n"
7869 "threadfunc(void *parm)\n"
7870 "{\n"
7871 "    sleep(5);          // allow main program to set the thread name\n"
7872 "    return NULL;\n"
7873 "}\n"
7874 msgstr ""
7875 "static void *\n"
7876 "threadfunc(void *parm)\n"
7877 "{\n"
7878 "    sleep(5);          // allow main program to set the thread name\n"
7879 "    return NULL;\n"
7880 "}\n"
7881
7882 #. type: Plain text
7883 #: build/C/man3/pthread_setname_np.3:168
7884 #, no-wrap
7885 msgid ""
7886 "int\n"
7887 "main(int argc, char **argv)\n"
7888 "{\n"
7889 "    pthread_t thread;\n"
7890 "    int rc;\n"
7891 "    char thread_name[NAMELEN];\n"
7892 msgstr ""
7893 "int\n"
7894 "main(int argc, char **argv)\n"
7895 "{\n"
7896 "    pthread_t thread;\n"
7897 "    int rc;\n"
7898 "    char thread_name[NAMELEN];\n"
7899
7900 #. type: Plain text
7901 #: build/C/man3/pthread_setname_np.3:172
7902 #, no-wrap
7903 msgid ""
7904 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7905 "    if (rc != 0)\n"
7906 "        errExitEN(rc, \"pthread_create\");\n"
7907 msgstr ""
7908 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7909 "    if (rc != 0)\n"
7910 "        errExitEN(rc, \"pthread_create\");\n"
7911
7912 #. type: Plain text
7913 #: build/C/man3/pthread_setname_np.3:176
7914 #, no-wrap
7915 msgid ""
7916 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7917 "    if (rc != 0)\n"
7918 "        errExitEN(rc, \"pthread_getname_np\");\n"
7919 msgstr ""
7920 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7921 "    if (rc != 0)\n"
7922 "        errExitEN(rc, \"pthread_getname_np\");\n"
7923
7924 #. type: Plain text
7925 #: build/C/man3/pthread_setname_np.3:181
7926 #, no-wrap
7927 msgid ""
7928 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7929 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7930 "    if (rc != 0)\n"
7931 "        errExitEN(rc, \"pthread_setname_np\");\n"
7932 msgstr ""
7933 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7934 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7935 "    if (rc != 0)\n"
7936 "        errExitEN(rc, \"pthread_setname_np\");\n"
7937
7938 #. type: Plain text
7939 #: build/C/man3/pthread_setname_np.3:183
7940 #, no-wrap
7941 msgid "    sleep(2);\n"
7942 msgstr "    sleep(2);\n"
7943
7944 #. type: Plain text
7945 #: build/C/man3/pthread_setname_np.3:189
7946 #, no-wrap
7947 msgid ""
7948 "    rc = pthread_getname_np(thread, thread_name,\n"
7949 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
7950 "    if (rc != 0)\n"
7951 "        errExitEN(rc, \"pthread_getname_np\");\n"
7952 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
7953 msgstr ""
7954 "    rc = pthread_getname_np(thread, thread_name,\n"
7955 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
7956 "    if (rc != 0)\n"
7957 "        errExitEN(rc, \"pthread_getname_np\");\n"
7958 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
7959
7960 #. type: Plain text
7961 #: build/C/man3/pthread_setname_np.3:193
7962 #, no-wrap
7963 msgid ""
7964 "    rc = pthread_join(thread, NULL);\n"
7965 "    if (rc != 0)\n"
7966 "        errExitEN(rc, \"pthread_join\");\n"
7967 msgstr ""
7968 "    rc = pthread_join(thread, NULL);\n"
7969 "    if (rc != 0)\n"
7970 "        errExitEN(rc, \"pthread_join\");\n"
7971
7972 #. type: Plain text
7973 #: build/C/man3/pthread_setname_np.3:197
7974 #, no-wrap
7975 msgid ""
7976 "    printf(\"Done\\en\");\n"
7977 "    exit(EXIT_SUCCESS);\n"
7978 "}\n"
7979 msgstr ""
7980 "    printf(\"Done\\en\");\n"
7981 "    exit(EXIT_SUCCESS);\n"
7982 "}\n"
7983
7984 #. type: Plain text
7985 #: build/C/man3/pthread_setname_np.3:204
7986 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
7987 msgstr "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
7988
7989 #. type: TH
7990 #: build/C/man3/pthread_setschedparam.3:26
7991 #, no-wrap
7992 msgid "PTHREAD_SETSCHEDPARAM"
7993 msgstr "PTHREAD_SETSCHEDPARAM"
7994
7995 #. type: Plain text
7996 #: build/C/man3/pthread_setschedparam.3:30
7997 msgid ""
7998 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
7999 "parameters of a thread"
8000 msgstr ""
8001 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8002 "スケジューリングポリシーとパラメータを設定/取得する"
8003
8004 #. type: Plain text
8005 #: build/C/man3/pthread_setschedparam.3:38
8006 #, no-wrap
8007 msgid ""
8008 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8009 "B<                      const struct sched_param *>I<param>B<);>\n"
8010 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8011 "B<                      struct sched_param *>I<param>B<);>\n"
8012 msgstr ""
8013 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8014 "B<                      const struct sched_param *>I<param>B<);>\n"
8015 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8016 "B<                      struct sched_param *>I<param>B<);>\n"
8017
8018 #. type: Plain text
8019 #: build/C/man3/pthread_setschedparam.3:46
8020 msgid ""
8021 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8022 "parameters of the thread I<thread>."
8023 msgstr ""
8024 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8025 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8026
8027 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8028 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8029 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8030 #. type: Plain text
8031 #: build/C/man3/pthread_setschedparam.3:57
8032 msgid ""
8033 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8034 "values for I<policy>, and their semantics, are described in "
8035 "B<sched_setscheduler>(2)."
8036 msgstr ""
8037 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8038 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8039 "説明されている。"
8040
8041 #. type: Plain text
8042 #: build/C/man3/pthread_setschedparam.3:63
8043 msgid ""
8044 "The structure pointed to by I<param> specifies the new scheduling parameters "
8045 "for I<thread>.  Scheduling parameters are maintained in the following "
8046 "structure:"
8047 msgstr ""
8048 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8049 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8050
8051 #.  FIXME . nptl/pthread_setschedparam.c has the following
8052 #.    /* If the thread should have higher priority because of some
8053 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8054 #.  Eventually (perhaps after writing the mutexattr pages), we
8055 #.  may want to add something on the topic to this page.
8056 #. type: Plain text
8057 #: build/C/man3/pthread_setschedparam.3:104
8058 msgid ""
8059 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8060 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8061 "and I<param>, respectively.  The returned priority value is that set by the "
8062 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8063 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8064 "does not reflect any temporary priority adjustments as a result of calls to "
8065 "any priority inheritance or priority ceiling functions (see, for example, "
8066 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8067 "(3))."
8068 msgstr ""
8069 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8070 "スケジューリングポリシーとパラメータを、\n"
8071 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8072 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8073 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8074 "B<pthread_create> で設定された値となる。\n"
8075 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8076 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8077 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8078 "行われる一時的な優先度の調整の影響を受けない。"
8079
8080 #. type: Plain text
8081 #: build/C/man3/pthread_setschedparam.3:112
8082 msgid ""
8083 "On success, these functions return 0; on error, they return a nonzero error "
8084 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8085 "parameters of I<thread> are not changed."
8086 msgstr ""
8087 "成功すると、これらの関数は 0 を返す。\n"
8088 "エラーの場合、0 以外のエラー番号を返す。\n"
8089 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8090 "スケジューリングポリシーとパラメータは変更されない。"
8091
8092 #. type: Plain text
8093 #: build/C/man3/pthread_setschedparam.3:114
8094 msgid "Both of these functions can fail with the following error:"
8095 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8096
8097 #. type: Plain text
8098 #: build/C/man3/pthread_setschedparam.3:122
8099 msgid ""
8100 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8101 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8102
8103 #. type: Plain text
8104 #: build/C/man3/pthread_setschedparam.3:129
8105 msgid ""
8106 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8107 "the I<policy>."
8108 msgstr ""
8109 "I<policy> が認識できないポリシーであるか、\n"
8110 "I<param> が I<policy> では意味を持たない値である。"
8111
8112 #. type: Plain text
8113 #: build/C/man3/pthread_setschedparam.3:133
8114 msgid ""
8115 "The caller does not have appropriate privileges to set the specified "
8116 "scheduling policy and parameters."
8117 msgstr ""
8118 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8119 "のに必要な特権を持たない。"
8120
8121 #.  .SH VERSIONS
8122 #.  Available since glibc 2.0
8123 #. type: Plain text
8124 #: build/C/man3/pthread_setschedparam.3:141
8125 msgid ""
8126 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8127 "policy or scheduling parameters to an unsupported value\") error for "
8128 "B<pthread_setschedparam>()."
8129 msgstr ""
8130 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8131 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8132 "パラメータに設定しようとした\") も追加で規定されている。"
8133
8134 #. type: Plain text
8135 #: build/C/man3/pthread_setschedparam.3:149
8136 msgid ""
8137 "For a description of the permissions required to, and the effect of, "
8138 "changing a thread's scheduling policy and priority, and details of the "
8139 "permitted ranges for priorities in each scheduling policy, see "
8140 "B<sched_setscheduler>(2)."
8141 msgstr ""
8142 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8143 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8144 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8145
8146 #. type: Plain text
8147 #: build/C/man3/pthread_setschedparam.3:156
8148 msgid ""
8149 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8150 "B<pthread_getschedparam>(), as well as the use of a number of other "
8151 "scheduling-related pthreads functions."
8152 msgstr ""
8153 "以下のプログラムは B<pthread_setschedparam>() と\n"
8154 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8155 "他のいろいろな関数の使用例を示すものである。"
8156
8157 #. type: Plain text
8158 #: build/C/man3/pthread_setschedparam.3:172
8159 msgid ""
8160 "In the following run, the main thread sets its scheduling policy to "
8161 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8162 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8163 "priority attribute of 20.  The program then sets (using "
8164 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8165 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8166 "created using this attributes object should take their scheduling attributes "
8167 "from the thread attributes object.  The program then creates a thread using "
8168 "the thread attributes object, and that thread displays its scheduling policy "
8169 "and priority."
8170 msgstr ""
8171 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8172 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8173 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8174 "属性 20 で初期化する。\n"
8175 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8176 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8177 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8178 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8179 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8180 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8181 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8182
8183 #. type: Plain text
8184 #: build/C/man3/pthread_setschedparam.3:180
8185 #, no-wrap
8186 msgid ""
8187 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8188 "Password:\n"
8189 "# B<./a.out -mf10 -ar20 -i e>\n"
8190 "Scheduler settings of main thread\n"
8191 "    policy=SCHED_FIFO, priority=10\n"
8192 msgstr ""
8193 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8194 "Password:\n"
8195 "# B<./a.out -mf10 -ar20 -i e>\n"
8196 "Scheduler settings of main thread\n"
8197 "    policy=SCHED_FIFO, priority=10\n"
8198
8199 #. type: Plain text
8200 #: build/C/man3/pthread_setschedparam.3:184
8201 #, no-wrap
8202 msgid ""
8203 "Scheduler settings in \\(aqattr\\(aq\n"
8204 "    policy=SCHED_RR, priority=20\n"
8205 "    inheritsched is EXPLICIT\n"
8206 msgstr ""
8207 "Scheduler settings in \\(aqattr\\(aq\n"
8208 "    policy=SCHED_RR, priority=20\n"
8209 "    inheritsched is EXPLICIT\n"
8210
8211 #. type: Plain text
8212 #: build/C/man3/pthread_setschedparam.3:187
8213 #, no-wrap
8214 msgid ""
8215 "Scheduler attributes of new thread\n"
8216 "    policy=SCHED_RR, priority=20\n"
8217 msgstr ""
8218 "Scheduler attributes of new thread\n"
8219 "    policy=SCHED_RR, priority=20\n"
8220
8221 #. type: Plain text
8222 #: build/C/man3/pthread_setschedparam.3:192
8223 msgid ""
8224 "In the above output, one can see that the scheduling policy and priority "
8225 "were taken from the values specified in the thread attributes object."
8226 msgstr ""
8227 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8228 "オブジェクトで指定された値から取られていることが分かる。"
8229
8230 #. type: Plain text
8231 #: build/C/man3/pthread_setschedparam.3:199
8232 msgid ""
8233 "The next run is the same as the previous, except that the inherit scheduler "
8234 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8235 "using the thread attributes object should ignore the scheduling attributes "
8236 "specified in the attributes object and instead take their scheduling "
8237 "attributes from the creating thread."
8238 msgstr ""
8239 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8240 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8241 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8242 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8243 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8244 "ことを意味する。"
8245
8246 #. type: Plain text
8247 #: build/C/man3/pthread_setschedparam.3:205
8248 #, no-wrap
8249 msgid ""
8250 "# B<./a.out -mf10 -ar20 -i i>\n"
8251 "Scheduler settings of main thread\n"
8252 "    policy=SCHED_FIFO, priority=10\n"
8253 msgstr ""
8254 "# B<./a.out -mf10 -ar20 -i i>\n"
8255 "Scheduler settings of main thread\n"
8256 "    policy=SCHED_FIFO, priority=10\n"
8257
8258 #. type: Plain text
8259 #: build/C/man3/pthread_setschedparam.3:209
8260 #, no-wrap
8261 msgid ""
8262 "Scheduler settings in \\(aqattr\\(aq\n"
8263 "    policy=SCHED_RR, priority=20\n"
8264 "    inheritsched is INHERIT\n"
8265 msgstr ""
8266 "Scheduler settings in \\(aqattr\\(aq\n"
8267 "    policy=SCHED_RR, priority=20\n"
8268 "    inheritsched is INHERIT\n"
8269
8270 #. type: Plain text
8271 #: build/C/man3/pthread_setschedparam.3:212
8272 #, no-wrap
8273 msgid ""
8274 "Scheduler attributes of new thread\n"
8275 "    policy=SCHED_FIFO, priority=10\n"
8276 msgstr ""
8277 "Scheduler attributes of new thread\n"
8278 "    policy=SCHED_FIFO, priority=10\n"
8279
8280 #. type: Plain text
8281 #: build/C/man3/pthread_setschedparam.3:218
8282 msgid ""
8283 "In the above output, one can see that the scheduling policy and priority "
8284 "were taken from the creating thread, rather than the thread attributes "
8285 "object."
8286 msgstr ""
8287 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8288 "スレッド属性オブジェクトからではなく、\n"
8289 "スレッドを作成したスレッドから取れれていることが分かる。"
8290
8291 #. type: Plain text
8292 #: build/C/man3/pthread_setschedparam.3:224
8293 msgid ""
8294 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8295 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8296 "scheduler attribute."
8297 msgstr ""
8298 "なお、 I<-i\\ i> を省略した場合でも、\n"
8299 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8300 "出力は同じになる。"
8301
8302 #. type: Plain text
8303 #: build/C/man3/pthread_setschedparam.3:228
8304 #, no-wrap
8305 msgid "/* pthreads_sched_test.c */\n"
8306 msgstr "/* pthreads_sched_test.c */\n"
8307
8308 #. type: Plain text
8309 #: build/C/man3/pthread_setschedparam.3:234
8310 #, no-wrap
8311 msgid ""
8312 "#include E<lt>pthread.hE<gt>\n"
8313 "#include E<lt>stdio.hE<gt>\n"
8314 "#include E<lt>stdlib.hE<gt>\n"
8315 "#include E<lt>unistd.hE<gt>\n"
8316 "#include E<lt>errno.hE<gt>\n"
8317 msgstr ""
8318 "#include E<lt>pthread.hE<gt>\n"
8319 "#include E<lt>stdio.hE<gt>\n"
8320 "#include E<lt>stdlib.hE<gt>\n"
8321 "#include E<lt>unistd.hE<gt>\n"
8322 "#include E<lt>errno.hE<gt>\n"
8323
8324 #. type: Plain text
8325 #: build/C/man3/pthread_setschedparam.3:243
8326 #, no-wrap
8327 msgid ""
8328 "static void\n"
8329 "usage(char *prog_name, char *msg)\n"
8330 "{\n"
8331 "    if (msg != NULL)\n"
8332 "        fputs(msg, stderr);\n"
8333 msgstr ""
8334 "static void\n"
8335 "usage(char *prog_name, char *msg)\n"
8336 "{\n"
8337 "    if (msg != NULL)\n"
8338 "        fputs(msg, stderr);\n"
8339
8340 #. type: Plain text
8341 #: build/C/man3/pthread_setschedparam.3:260
8342 #, no-wrap
8343 msgid ""
8344 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8345 "    fprintf(stderr, \"Options are:\\en\");\n"
8346 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8347 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8348 "    fpe(\"                 thread attributes object\\en\");\n"
8349 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8350 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8351 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8352 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8353 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8354 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8355 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8356 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8357 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8358 "    exit(EXIT_FAILURE);\n"
8359 "}\n"
8360 msgstr ""
8361 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8362 "    fprintf(stderr, \"Options are:\\en\");\n"
8363 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8364 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8365 "    fpe(\"                 thread attributes object\\en\");\n"
8366 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8367 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8368 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8369 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8370 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8371 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8372 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8373 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8374 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8375 "    exit(EXIT_FAILURE);\n"
8376 "}\n"
8377
8378 #. type: Plain text
8379 #: build/C/man3/pthread_setschedparam.3:271
8380 #, no-wrap
8381 msgid ""
8382 "static int\n"
8383 "get_policy(char p, int *policy)\n"
8384 "{\n"
8385 "    switch (p) {\n"
8386 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8387 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8388 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8389 "    default:  return 0;\n"
8390 "    }\n"
8391 "}\n"
8392 msgstr ""
8393 "static int\n"
8394 "get_policy(char p, int *policy)\n"
8395 "{\n"
8396 "    switch (p) {\n"
8397 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8398 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8399 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8400 "    default:  return 0;\n"
8401 "    }\n"
8402 "}\n"
8403
8404 #. type: Plain text
8405 #: build/C/man3/pthread_setschedparam.3:282
8406 #, no-wrap
8407 msgid ""
8408 "static void\n"
8409 "display_sched_attr(int policy, struct sched_param *param)\n"
8410 "{\n"
8411 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8412 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8413 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8414 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8415 "            \"???\",\n"
8416 "            param-E<gt>sched_priority);\n"
8417 "}\n"
8418 msgstr ""
8419 "static void\n"
8420 "display_sched_attr(int policy, struct sched_param *param)\n"
8421 "{\n"
8422 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8423 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8424 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8425 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8426 "            \"???\",\n"
8427 "            param-E<gt>sched_priority);\n"
8428 "}\n"
8429
8430 #. type: Plain text
8431 #: build/C/man3/pthread_setschedparam.3:288
8432 #, no-wrap
8433 msgid ""
8434 "static void\n"
8435 "display_thread_sched_attr(char *msg)\n"
8436 "{\n"
8437 "    int policy, s;\n"
8438 "    struct sched_param param;\n"
8439 msgstr ""
8440 "static void\n"
8441 "display_thread_sched_attr(char *msg)\n"
8442 "{\n"
8443 "    int policy, s;\n"
8444 "    struct sched_param param;\n"
8445
8446 #. type: Plain text
8447 #: build/C/man3/pthread_setschedparam.3:292
8448 #, no-wrap
8449 msgid ""
8450 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8451 "    if (s != 0)\n"
8452 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8453 msgstr ""
8454 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8455 "    if (s != 0)\n"
8456 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8457
8458 #. type: Plain text
8459 #: build/C/man3/pthread_setschedparam.3:296
8460 #, no-wrap
8461 msgid ""
8462 "    printf(\"%s\\en\", msg);\n"
8463 "    display_sched_attr(policy, &param);\n"
8464 "}\n"
8465 msgstr ""
8466 "    printf(\"%s\\en\", msg);\n"
8467 "    display_sched_attr(policy, &param);\n"
8468 "}\n"
8469
8470 #. type: Plain text
8471 #: build/C/man3/pthread_setschedparam.3:301
8472 #, no-wrap
8473 msgid ""
8474 "static void *\n"
8475 "thread_start(void *arg)\n"
8476 "{\n"
8477 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8478 msgstr ""
8479 "static void *\n"
8480 "thread_start(void *arg)\n"
8481 "{\n"
8482 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8483
8484 #. type: Plain text
8485 #: build/C/man3/pthread_setschedparam.3:304
8486 #, no-wrap
8487 msgid ""
8488 "    return NULL;\n"
8489 "}\n"
8490 msgstr ""
8491 "    return NULL;\n"
8492 "}\n"
8493
8494 #. type: Plain text
8495 #: build/C/man3/pthread_setschedparam.3:314
8496 #, no-wrap
8497 msgid ""
8498 "int\n"
8499 "main(int argc, char *argv[])\n"
8500 "{\n"
8501 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8502 "    pthread_t thread;\n"
8503 "    pthread_attr_t attr;\n"
8504 "    pthread_attr_t *attrp;\n"
8505 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8506 "    struct sched_param param;\n"
8507 msgstr ""
8508 "int\n"
8509 "main(int argc, char *argv[])\n"
8510 "{\n"
8511 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8512 "    pthread_t thread;\n"
8513 "    pthread_attr_t attr;\n"
8514 "    pthread_attr_t *attrp;\n"
8515 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8516 "    struct sched_param param;\n"
8517
8518 #. type: Plain text
8519 #: build/C/man3/pthread_setschedparam.3:316
8520 #, no-wrap
8521 msgid "    /* Process command-line options */\n"
8522 msgstr "    /* Process command-line options */\n"
8523
8524 #. type: Plain text
8525 #: build/C/man3/pthread_setschedparam.3:321
8526 #, no-wrap
8527 msgid ""
8528 "    use_null_attrib = 0;\n"
8529 "    attr_sched_str = NULL;\n"
8530 "    main_sched_str = NULL;\n"
8531 "    inheritsched_str = NULL;\n"
8532 msgstr ""
8533 "    use_null_attrib = 0;\n"
8534 "    attr_sched_str = NULL;\n"
8535 "    main_sched_str = NULL;\n"
8536 "    inheritsched_str = NULL;\n"
8537
8538 #. type: Plain text
8539 #: build/C/man3/pthread_setschedparam.3:331
8540 #, no-wrap
8541 msgid ""
8542 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8543 "        switch (opt) {\n"
8544 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8545 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8546 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8547 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8548 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8549 "        }\n"
8550 "    }\n"
8551 msgstr ""
8552 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8553 "        switch (opt) {\n"
8554 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8555 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8556 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8557 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8558 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8559 "        }\n"
8560 "    }\n"
8561
8562 #. type: Plain text
8563 #: build/C/man3/pthread_setschedparam.3:335
8564 #, no-wrap
8565 msgid ""
8566 "    if (use_null_attrib &&\n"
8567 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8568 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8569 msgstr ""
8570 "    if (use_null_attrib &&\n"
8571 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8572 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8573
8574 #. type: Plain text
8575 #: build/C/man3/pthread_setschedparam.3:338
8576 #, no-wrap
8577 msgid ""
8578 "    /* Optionally set scheduling attributes of main thread,\n"
8579 "       and display the attributes */\n"
8580 msgstr ""
8581 "    /* Optionally set scheduling attributes of main thread,\n"
8582 "       and display the attributes */\n"
8583
8584 #. type: Plain text
8585 #: build/C/man3/pthread_setschedparam.3:343
8586 #, no-wrap
8587 msgid ""
8588 "    if (main_sched_str != NULL) {\n"
8589 "        if (!get_policy(main_sched_str[0], &policy))\n"
8590 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8591 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8592 msgstr ""
8593 "    if (main_sched_str != NULL) {\n"
8594 "        if (!get_policy(main_sched_str[0], &policy))\n"
8595 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8596 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8597
8598 #. type: Plain text
8599 #: build/C/man3/pthread_setschedparam.3:348
8600 #, no-wrap
8601 msgid ""
8602 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8603 "        if (s != 0)\n"
8604 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8605 "    }\n"
8606 msgstr ""
8607 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8608 "        if (s != 0)\n"
8609 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8610 "    }\n"
8611
8612 #. type: Plain text
8613 #: build/C/man3/pthread_setschedparam.3:351
8614 #, no-wrap
8615 msgid ""
8616 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8617 "    printf(\"\\en\");\n"
8618 msgstr ""
8619 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8620 "    printf(\"\\en\");\n"
8621
8622 #. type: Plain text
8623 #: build/C/man3/pthread_setschedparam.3:353
8624 #, no-wrap
8625 msgid "    /* Initialize thread attributes object according to options */\n"
8626 msgstr "    /* Initialize thread attributes object according to options */\n"
8627
8628 #. type: Plain text
8629 #: build/C/man3/pthread_setschedparam.3:362
8630 #, no-wrap
8631 msgid ""
8632 "    if (!use_null_attrib) {\n"
8633 "        s = pthread_attr_init(&attr);\n"
8634 "        if (s != 0)\n"
8635 "            handle_error_en(s, \"pthread_attr_init\");\n"
8636 "        attrp = &attr;\n"
8637 "    }\n"
8638 msgstr ""
8639 "    if (!use_null_attrib) {\n"
8640 "        s = pthread_attr_init(&attr);\n"
8641 "        if (s != 0)\n"
8642 "            handle_error_en(s, \"pthread_attr_init\");\n"
8643 "        attrp = &attr;\n"
8644 "    }\n"
8645
8646 #. type: Plain text
8647 #: build/C/man3/pthread_setschedparam.3:370
8648 #, no-wrap
8649 msgid ""
8650 "    if (inheritsched_str != NULL) {\n"
8651 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8652 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8653 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8654 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8655 "        else\n"
8656 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8657 msgstr ""
8658 "    if (inheritsched_str != NULL) {\n"
8659 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8660 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8661 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8662 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8663 "        else\n"
8664 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8665
8666 #. type: Plain text
8667 #: build/C/man3/pthread_setschedparam.3:375
8668 #, no-wrap
8669 msgid ""
8670 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8671 "        if (s != 0)\n"
8672 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8673 "    }\n"
8674 msgstr ""
8675 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8676 "        if (s != 0)\n"
8677 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8678 "    }\n"
8679
8680 #. type: Plain text
8681 #: build/C/man3/pthread_setschedparam.3:381
8682 #, no-wrap
8683 msgid ""
8684 "    if (attr_sched_str != NULL) {\n"
8685 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8686 "            usage(argv[0],\n"
8687 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8688 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8689 msgstr ""
8690 "    if (attr_sched_str != NULL) {\n"
8691 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8692 "            usage(argv[0],\n"
8693 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8694 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8695
8696 #. type: Plain text
8697 #: build/C/man3/pthread_setschedparam.3:389
8698 #, no-wrap
8699 msgid ""
8700 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8701 "        if (s != 0)\n"
8702 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8703 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8704 "        if (s != 0)\n"
8705 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8706 "    }\n"
8707 msgstr ""
8708 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8709 "        if (s != 0)\n"
8710 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8711 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8712 "        if (s != 0)\n"
8713 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8714 "    }\n"
8715
8716 #. type: Plain text
8717 #: build/C/man3/pthread_setschedparam.3:392
8718 #, no-wrap
8719 msgid ""
8720 "    /* If we initialized a thread attributes object, display\n"
8721 "       the scheduling attributes that were set in the object */\n"
8722 msgstr ""
8723 "    /* If we initialized a thread attributes object, display\n"
8724 "       the scheduling attributes that were set in the object */\n"
8725
8726 #. type: Plain text
8727 #: build/C/man3/pthread_setschedparam.3:400
8728 #, no-wrap
8729 msgid ""
8730 "    if (attrp != NULL) {\n"
8731 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8732 "        if (s != 0)\n"
8733 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8734 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8735 "        if (s != 0)\n"
8736 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8737 msgstr ""
8738 "    if (attrp != NULL) {\n"
8739 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8740 "        if (s != 0)\n"
8741 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8742 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8743 "        if (s != 0)\n"
8744 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8745
8746 #. type: Plain text
8747 #: build/C/man3/pthread_setschedparam.3:403
8748 #, no-wrap
8749 msgid ""
8750 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8751 "        display_sched_attr(policy, &param);\n"
8752 msgstr ""
8753 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8754 "        display_sched_attr(policy, &param);\n"
8755
8756 #. type: Plain text
8757 #: build/C/man3/pthread_setschedparam.3:411
8758 #, no-wrap
8759 msgid ""
8760 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8761 "        printf(\"    inheritsched is %s\\en\",\n"
8762 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8763 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8764 "                \"???\");\n"
8765 "        printf(\"\\en\");\n"
8766 "    }\n"
8767 msgstr ""
8768 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8769 "        printf(\"    inheritsched is %s\\en\",\n"
8770 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8771 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8772 "                \"???\");\n"
8773 "        printf(\"\\en\");\n"
8774 "    }\n"
8775
8776 #. type: Plain text
8777 #: build/C/man3/pthread_setschedparam.3:413
8778 #, no-wrap
8779 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8780 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8781
8782 #. type: Plain text
8783 #: build/C/man3/pthread_setschedparam.3:417
8784 #, no-wrap
8785 msgid ""
8786 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8787 "    if (s != 0)\n"
8788 "        handle_error_en(s, \"pthread_create\");\n"
8789 msgstr ""
8790 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8791 "    if (s != 0)\n"
8792 "        handle_error_en(s, \"pthread_create\");\n"
8793
8794 #. type: Plain text
8795 #: build/C/man3/pthread_setschedparam.3:419
8796 #, no-wrap
8797 msgid "    /* Destroy unneeded thread attributes object */\n"
8798 msgstr "    /* Destroy unneeded thread attributes object */\n"
8799
8800 #. type: Plain text
8801 #: build/C/man3/pthread_setschedparam.3:427
8802 #, no-wrap
8803 msgid ""
8804 "    s = pthread_join(thread, NULL);\n"
8805 "    if (s != 0)\n"
8806 "        handle_error_en(s, \"pthread_join\");\n"
8807 msgstr ""
8808 "    s = pthread_join(thread, NULL);\n"
8809 "    if (s != 0)\n"
8810 "        handle_error_en(s, \"pthread_join\");\n"
8811
8812 #. type: Plain text
8813 #: build/C/man3/pthread_setschedparam.3:445
8814 msgid ""
8815 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8816 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8817 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8818 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8819 "B<pthreads>(7)"
8820 msgstr ""
8821 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8822 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8823 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8824 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8825 "B<pthreads>(7)"
8826
8827 #. type: TH
8828 #: build/C/man3/pthread_setschedprio.3:26
8829 #, no-wrap
8830 msgid "PTHREAD_SETSCHEDPRIO"
8831 msgstr "PTHREAD_SETSCHEDPRIO"
8832
8833 #. type: TH
8834 #: build/C/man3/pthread_setschedprio.3:26
8835 #, no-wrap
8836 msgid "2008-11-06"
8837 msgstr "2008-11-06"
8838
8839 #. type: Plain text
8840 #: build/C/man3/pthread_setschedprio.3:29
8841 msgid "pthread_setschedprio - set scheduling priority of a thread"
8842 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8843
8844 #. type: Plain text
8845 #: build/C/man3/pthread_setschedprio.3:34
8846 #, no-wrap
8847 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8848 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8849
8850 #.  FIXME . nptl/pthread_setschedprio.c has the following
8851 #.    /* If the thread should have higher priority because of some
8852 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8853 #.  Eventually (perhaps after writing the mutexattr pages), we
8854 #.  may want to add something on the topic to this page.
8855 #.  nptl/pthread_setschedparam.c has a similar case.
8856 #. type: Plain text
8857 #: build/C/man3/pthread_setschedprio.3:53
8858 msgid ""
8859 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8860 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8861 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8862 "of a thread.)"
8863 msgstr ""
8864 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8865 "優先度に I<prio> で指定された値を設定する\n"
8866 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8867 "と優先度の両方を変更する)。"
8868
8869 #. type: Plain text
8870 #: build/C/man3/pthread_setschedprio.3:61
8871 msgid ""
8872 "On success, this function returns 0; on error, it returns a nonzero error "
8873 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8874 "I<thread> is not changed."
8875 msgstr ""
8876 "成功すると、この関数は 0 を返す。\n"
8877 "エラーの場合、0 以外のエラー番号を返す。\n"
8878 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8879 "スケジューリング優先度は変更されない。"
8880
8881 #. type: Plain text
8882 #: build/C/man3/pthread_setschedprio.3:66
8883 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8884 msgstr ""
8885 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8886
8887 #. type: Plain text
8888 #: build/C/man3/pthread_setschedprio.3:70
8889 msgid ""
8890 "The caller does not have appropriate privileges to set the specified "
8891 "priority."
8892 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8893
8894 #. type: Plain text
8895 #: build/C/man3/pthread_setschedprio.3:81
8896 msgid ""
8897 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8898 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
8899 msgstr ""
8900 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
8901 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
8902 "に設定しようとした\") も追加で規定されている。"
8903
8904 #. type: Plain text
8905 #: build/C/man3/pthread_setschedprio.3:83
8906 msgid "This function is available in glibc since version 2.3.4."
8907 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
8908
8909 #. type: Plain text
8910 #: build/C/man3/pthread_setschedprio.3:91
8911 msgid ""
8912 "For a description of the permissions required to, and the effect of, "
8913 "changing a thread's scheduling priority, and details of the permitted ranges "
8914 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
8915 msgstr ""
8916 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
8917 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8918 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8919
8920 #. type: Plain text
8921 #: build/C/man3/pthread_setschedprio.3:105
8922 msgid ""
8923 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8924 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8925 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8926 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8927 "B<pthreads>(7)"
8928 msgstr ""
8929 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8930 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8931 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8932 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8933 "B<pthreads>(7)"
8934
8935 #. type: TH
8936 #: build/C/man3/pthread_sigmask.3:26
8937 #, no-wrap
8938 msgid "PTHREAD_SIGMASK"
8939 msgstr "PTHREAD_SIGMASK"
8940
8941 #. type: Plain text
8942 #: build/C/man3/pthread_sigmask.3:29
8943 msgid "pthread_sigmask - examine and change mask of blocked signals"
8944 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
8945
8946 #. type: Plain text
8947 #: build/C/man3/pthread_sigmask.3:35
8948 #, no-wrap
8949 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
8950 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
8951
8952 #. type: Plain text
8953 #: build/C/man3/pthread_sigmask.3:46
8954 msgid ""
8955 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
8956 "difference that its use in multithreaded programs is explicitly specified by "
8957 "POSIX.1-2001.  Other differences are noted in this page."
8958 msgstr ""
8959 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
8960 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
8961 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
8962
8963 #. type: Plain text
8964 #: build/C/man3/pthread_sigmask.3:49
8965 msgid ""
8966 "For a description of the arguments and operation of this function, see "
8967 "B<sigprocmask>(2)."
8968 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
8969
8970 #. type: Plain text
8971 #: build/C/man3/pthread_sigmask.3:54
8972 msgid ""
8973 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
8974 "number."
8975 msgstr ""
8976 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
8977 "エラーの場合、エラー番号を返す。"
8978
8979 #. type: Plain text
8980 #: build/C/man3/pthread_sigmask.3:57
8981 msgid "See B<sigprocmask>(2)."
8982 msgstr "B<sigprocmask>(2) を参照。"
8983
8984 #. type: Plain text
8985 #: build/C/man3/pthread_sigmask.3:61
8986 msgid "A new thread inherits a copy of its creator's signal mask."
8987 msgstr ""
8988 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
8989 "継承する。"
8990
8991 #. type: Plain text
8992 #: build/C/man3/pthread_sigmask.3:66
8993 msgid ""
8994 "The program below blocks some signals in the main thread, and then creates a "
8995 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
8996 "shell session demonstrates its use:"
8997 msgstr ""
8998 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
8999 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9000 "専用のスレッドを作成する。\n"
9001 "下記のシェルのセッションはその利用例を示したものである。"
9002
9003 #. type: Plain text
9004 #: build/C/man3/pthread_sigmask.3:77
9005 #, no-wrap
9006 msgid ""
9007 "$B< ./a.out &>\n"
9008 "[1] 5423\n"
9009 "$B< kill -QUIT %1>\n"
9010 "Signal handling thread got signal 3\n"
9011 "$B< kill -USR1 %1>\n"
9012 "Signal handling thread got signal 10\n"
9013 "$B< kill -TERM %1>\n"
9014 "[1]+  Terminated              ./a.out\n"
9015 msgstr ""
9016 "$B< ./a.out &>\n"
9017 "[1] 5423\n"
9018 "$B< kill -QUIT %1>\n"
9019 "Signal handling thread got signal 3\n"
9020 "$B< kill -USR1 %1>\n"
9021 "Signal handling thread got signal 10\n"
9022 "$B< kill -TERM %1>\n"
9023 "[1]+  Terminated              ./a.out\n"
9024
9025 #. type: Plain text
9026 #: build/C/man3/pthread_sigmask.3:88
9027 #, no-wrap
9028 msgid ""
9029 "#include E<lt>pthread.hE<gt>\n"
9030 "#include E<lt>stdio.hE<gt>\n"
9031 "#include E<lt>stdlib.hE<gt>\n"
9032 "#include E<lt>unistd.hE<gt>\n"
9033 "#include E<lt>signal.hE<gt>\n"
9034 "#include E<lt>errno.hE<gt>\n"
9035 msgstr ""
9036 "#include E<lt>pthread.hE<gt>\n"
9037 "#include E<lt>stdio.hE<gt>\n"
9038 "#include E<lt>stdlib.hE<gt>\n"
9039 "#include E<lt>unistd.hE<gt>\n"
9040 "#include E<lt>signal.hE<gt>\n"
9041 "#include E<lt>errno.hE<gt>\n"
9042
9043 #. type: Plain text
9044 #: build/C/man3/pthread_sigmask.3:90
9045 #, no-wrap
9046 msgid "/* Simple error handling functions */\n"
9047 msgstr "/* Simple error handling functions */\n"
9048
9049 #. type: Plain text
9050 #: build/C/man3/pthread_sigmask.3:99
9051 #, no-wrap
9052 msgid ""
9053 "static void *\n"
9054 "sig_thread(void *arg)\n"
9055 "{\n"
9056 "    sigset_t *set = arg;\n"
9057 "    int s, sig;\n"
9058 msgstr ""
9059 "static void *\n"
9060 "sig_thread(void *arg)\n"
9061 "{\n"
9062 "    sigset_t *set = arg;\n"
9063 "    int s, sig;\n"
9064
9065 #. type: Plain text
9066 #: build/C/man3/pthread_sigmask.3:107
9067 #, no-wrap
9068 msgid ""
9069 "    for (;;) {\n"
9070 "        s = sigwait(set, &sig);\n"
9071 "        if (s != 0)\n"
9072 "            handle_error_en(s, \"sigwait\");\n"
9073 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9074 "    }\n"
9075 "}\n"
9076 msgstr ""
9077 "    for (;;) {\n"
9078 "        s = sigwait(set, &sig);\n"
9079 "        if (s != 0)\n"
9080 "            handle_error_en(s, \"sigwait\");\n"
9081 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9082 "    }\n"
9083 "}\n"
9084
9085 #. type: Plain text
9086 #: build/C/man3/pthread_sigmask.3:114
9087 #, no-wrap
9088 msgid ""
9089 "int\n"
9090 "main(int argc, char *argv[])\n"
9091 "{\n"
9092 "    pthread_t thread;\n"
9093 "    sigset_t set;\n"
9094 "    int s;\n"
9095 msgstr ""
9096 "int\n"
9097 "main(int argc, char *argv[])\n"
9098 "{\n"
9099 "    pthread_t thread;\n"
9100 "    sigset_t set;\n"
9101 "    int s;\n"
9102
9103 #. type: Plain text
9104 #: build/C/man3/pthread_sigmask.3:117
9105 #, no-wrap
9106 msgid ""
9107 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9108 "       will inherit a copy of the signal mask. */\n"
9109 msgstr ""
9110 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9111 "       will inherit a copy of the signal mask. */\n"
9112
9113 #. type: Plain text
9114 #: build/C/man3/pthread_sigmask.3:124
9115 #, no-wrap
9116 msgid ""
9117 "    sigemptyset(&set);\n"
9118 "    sigaddset(&set, SIGQUIT);\n"
9119 "    sigaddset(&set, SIGUSR1);\n"
9120 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9121 "    if (s != 0)\n"
9122 "        handle_error_en(s, \"pthread_sigmask\");\n"
9123 msgstr ""
9124 "    sigemptyset(&set);\n"
9125 "    sigaddset(&set, SIGQUIT);\n"
9126 "    sigaddset(&set, SIGUSR1);\n"
9127 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9128 "    if (s != 0)\n"
9129 "        handle_error_en(s, \"pthread_sigmask\");\n"
9130
9131 #. type: Plain text
9132 #: build/C/man3/pthread_sigmask.3:128
9133 #, no-wrap
9134 msgid ""
9135 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9136 "    if (s != 0)\n"
9137 "        handle_error_en(s, \"pthread_create\");\n"
9138 msgstr ""
9139 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9140 "    if (s != 0)\n"
9141 "        handle_error_en(s, \"pthread_create\");\n"
9142
9143 #. type: Plain text
9144 #: build/C/man3/pthread_sigmask.3:131
9145 #, no-wrap
9146 msgid ""
9147 "    /* Main thread carries on to create other threads and/or do\n"
9148 "       other work */\n"
9149 msgstr ""
9150 "    /* Main thread carries on to create other threads and/or do\n"
9151 "       other work */\n"
9152
9153 #. type: Plain text
9154 #: build/C/man3/pthread_sigmask.3:134
9155 #, no-wrap
9156 msgid ""
9157 "    pause();            /* Dummy pause so we can test program */\n"
9158 "}\n"
9159 msgstr ""
9160 "    pause();            /* Dummy pause so we can test program */\n"
9161 "}\n"
9162
9163 #. type: Plain text
9164 #: build/C/man3/pthread_sigmask.3:144
9165 msgid ""
9166 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9167 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9168 msgstr ""
9169 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9170 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9171
9172 #. type: TH
9173 #: build/C/man3/pthread_sigqueue.3:25
9174 #, no-wrap
9175 msgid "PTHREAD_SIGQUEUE"
9176 msgstr "PTHREAD_SIGQUEUE"
9177
9178 #. type: Plain text
9179 #: build/C/man3/pthread_sigqueue.3:28
9180 msgid "pthread_sigqueue - queue a signal and data to a thread"
9181 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9182
9183 #. type: Plain text
9184 #: build/C/man3/pthread_sigqueue.3:34
9185 #, no-wrap
9186 msgid ""
9187 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9188 "B<                     const union sigval >I<value>B<);>\n"
9189 msgstr ""
9190 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9191 "B<                     const union sigval >I<value>B<);>\n"
9192
9193 #. type: Plain text
9194 #: build/C/man3/pthread_sigqueue.3:45
9195 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9196 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9197
9198 #. type: Plain text
9199 #: build/C/man3/pthread_sigqueue.3:53
9200 msgid ""
9201 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9202 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9203 "thread in the same process as the calling thread."
9204 msgstr ""
9205 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9206 "プロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9207 "同じプロセス内のスレッドにシグナルを送信する。"
9208
9209 #. type: Plain text
9210 #: build/C/man3/pthread_sigqueue.3:65
9211 msgid ""
9212 "The I<thread> argument is the ID of a thread in the same process as the "
9213 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9214 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9215 "details."
9216 msgstr ""
9217 "I<thread> 引き数は、呼び出し側と同じプロセスのスレッドの ID である。\n"
9218 "I<sig> 引き数は送信するシグナルを指定する。\n"
9219 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9220 "詳細は B<sigqueue>(3) を参照。"
9221
9222 #. type: Plain text
9223 #: build/C/man3/pthread_sigqueue.3:70
9224 msgid ""
9225 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9226 "number."
9227 msgstr ""
9228 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9229 "エラーの場合、エラー番号を返す。"
9230
9231 #. type: Plain text
9232 #: build/C/man3/pthread_sigqueue.3:77
9233 msgid ""
9234 "The limit of signals which may be queued has been reached.  (See B<signal>"
9235 "(7)  for further information.)"
9236 msgstr ""
9237 "キューに入れられるシグナル数が上限に達していた\n"
9238 "(詳しい情報は (B<signal>(7) を参照)。"
9239
9240 #. type: Plain text
9241 #: build/C/man3/pthread_sigqueue.3:81
9242 msgid "I<sig> was invalid."
9243 msgstr "I<sig> が無効であった。"
9244
9245 #. type: TP
9246 #: build/C/man3/pthread_sigqueue.3:81
9247 #, no-wrap
9248 msgid "B<ENOSYS>"
9249 msgstr "B<ENOSYS>"
9250
9251 #. type: Plain text
9252 #: build/C/man3/pthread_sigqueue.3:85
9253 msgid "B<pthread_sigqueue>()  is not supported on this system."
9254 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9255
9256 #. type: Plain text
9257 #: build/C/man3/pthread_sigqueue.3:89
9258 msgid "I<thread> is not valid."
9259 msgstr "I<thread> が無効である。"
9260
9261 #. type: Plain text
9262 #: build/C/man3/pthread_sigqueue.3:93
9263 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9264 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9265
9266 #. type: Plain text
9267 #: build/C/man3/pthread_sigqueue.3:95
9268 msgid "This function is a GNU extension."
9269 msgstr "この関数は GNU による拡張である。"
9270
9271 #. type: Plain text
9272 #: build/C/man3/pthread_sigqueue.3:103
9273 msgid ""
9274 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9275 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9276 msgstr ""
9277 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9278 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9279
9280 #. type: TH
9281 #: build/C/man3/pthread_testcancel.3:26
9282 #, no-wrap
9283 msgid "PTHREAD_TESTCANCEL"
9284 msgstr "PTHREAD_TESTCANCEL"
9285
9286 #. type: TH
9287 #: build/C/man3/pthread_testcancel.3:26
9288 #, no-wrap
9289 msgid "2012-04-14"
9290 msgstr "2012-04-14"
9291
9292 #. type: Plain text
9293 #: build/C/man3/pthread_testcancel.3:29
9294 msgid ""
9295 "pthread_testcancel - request delivery of any pending cancellation request"
9296 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9297
9298 #. type: Plain text
9299 #: build/C/man3/pthread_testcancel.3:34
9300 #, no-wrap
9301 msgid "B<void pthread_testcancel(void);>\n"
9302 msgstr "B<void pthread_testcancel(void);>\n"
9303
9304 #. type: Plain text
9305 #: build/C/man3/pthread_testcancel.3:43
9306 msgid ""
9307 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9308 "calling thread, so that a thread that is otherwise executing code that "
9309 "contains no cancellation points will respond to a cancellation request."
9310 msgstr ""
9311 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9312 "ポイント (cancellation point) が作成される。\n"
9313 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9314 "いるスレッドが取り消し要求に対応することができるようになる。"
9315
9316 #. type: Plain text
9317 #: build/C/man3/pthread_testcancel.3:50
9318 msgid ""
9319 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9320 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9321 "no effect."
9322 msgstr ""
9323 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9324 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>() を\n"
9325 "呼び出しても何の影響もない。"
9326
9327 #. type: Plain text
9328 #: build/C/man3/pthread_testcancel.3:54
9329 msgid ""
9330 "This function does not return a value.  If the calling thread is canceled as "
9331 "a consequence of a call to this function, then the function does not return."
9332 msgstr ""
9333 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9334 "キャンセルされた場合、この関数が返ることはない。"
9335
9336 #. type: Plain text
9337 #: build/C/man3/pthread_testcancel.3:63
9338 msgid "See B<pthread_cleanup_push>(3)."
9339 msgstr "B<pthread_cleanup_push>(3) を参照。"
9340
9341 #. type: Plain text
9342 #: build/C/man3/pthread_testcancel.3:68
9343 msgid ""
9344 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9345 "(3), B<pthreads>(7)"
9346 msgstr ""
9347 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9348 "(3), B<pthreads>(7)"
9349
9350 #. type: TH
9351 #: build/C/man3/pthread_tryjoin_np.3:26
9352 #, no-wrap
9353 msgid "PTHREAD_TRYJOIN_NP"
9354 msgstr "PTHREAD_TRYJOIN_NP"
9355
9356 #. type: Plain text
9357 #: build/C/man3/pthread_tryjoin_np.3:30
9358 msgid ""
9359 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9360 "thread"
9361 msgstr ""
9362 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9363 "試みる"
9364
9365 #. type: Plain text
9366 #: build/C/man3/pthread_tryjoin_np.3:36
9367 #, no-wrap
9368 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9369 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9370
9371 #. type: Plain text
9372 #: build/C/man3/pthread_tryjoin_np.3:39
9373 #, no-wrap
9374 msgid ""
9375 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9376 "B<                         const struct timespec *>I<abstime>B<);>\n"
9377 msgstr ""
9378 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9379 "B<                         const struct timespec *>I<abstime>B<);>\n"
9380
9381 #. type: Plain text
9382 #: build/C/man3/pthread_tryjoin_np.3:46
9383 msgid ""
9384 "These functions operate in the same way as B<pthread_join>(3), except for "
9385 "the differences described on this page."
9386 msgstr ""
9387 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9388 "このページで説明する違いがある。"
9389
9390 #. type: Plain text
9391 #: build/C/man3/pthread_tryjoin_np.3:58
9392 msgid ""
9393 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9394 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9395 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9396 "B<pthread_join>(3), the call returns an error."
9397 msgstr ""
9398 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9399 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9400 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9401 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9402
9403 #. type: Plain text
9404 #: build/C/man3/pthread_tryjoin_np.3:76
9405 msgid ""
9406 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9407 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9408 "specified in I<abstime>.  If the timeout expires before I<thread> "
9409 "terminates, the call returns an error.  The I<abstime> argument is a "
9410 "structure of the following form, specifying an absolute time measured since "
9411 "the Epoch (see B<time>(2)):"
9412 msgstr ""
9413 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9414 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9415 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9416 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9417 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9418
9419 #. type: Plain text
9420 #: build/C/man3/pthread_tryjoin_np.3:83
9421 #, no-wrap
9422 msgid ""
9423 "struct timespec {\n"
9424 "    time_t tv_sec;     /* seconds */\n"
9425 "    long   tv_nsec;    /* nanoseconds */\n"
9426 "};\n"
9427 msgstr ""
9428 "struct timespec {\n"
9429 "    time_t tv_sec;     /* seconds */\n"
9430 "    long   tv_nsec;    /* nanoseconds */\n"
9431 "};\n"
9432
9433 #. type: Plain text
9434 #: build/C/man3/pthread_tryjoin_np.3:89
9435 msgid ""
9436 "On success, these functions return 0; on error, they return an error number."
9437 msgstr ""
9438 "成功すると、これらの関数は 0 を返す。\n"
9439 "エラーの場合、エラー番号を返す。"
9440
9441 #. type: Plain text
9442 #: build/C/man3/pthread_tryjoin_np.3:94
9443 msgid ""
9444 "These functions can fail with the same errors as B<pthread_join>(3).  "
9445 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9446 msgstr ""
9447 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9448 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9449
9450 #. type: TP
9451 #: build/C/man3/pthread_tryjoin_np.3:94
9452 #, no-wrap
9453 msgid "B<EBUSY>"
9454 msgstr "B<EBUSY>"
9455
9456 #. type: Plain text
9457 #: build/C/man3/pthread_tryjoin_np.3:98
9458 msgid "I<thread> had not yet terminated at the time of the call."
9459 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9460
9461 #. type: Plain text
9462 #: build/C/man3/pthread_tryjoin_np.3:101
9463 msgid ""
9464 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9465 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9466
9467 #. type: TP
9468 #: build/C/man3/pthread_tryjoin_np.3:101
9469 #, no-wrap
9470 msgid "B<ETIMEDOUT>"
9471 msgstr "B<ETIMEDOUT>"
9472
9473 #. type: Plain text
9474 #: build/C/man3/pthread_tryjoin_np.3:106
9475 msgid "The call timed out before I<thread> terminated."
9476 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9477
9478 #. type: Plain text
9479 #: build/C/man3/pthread_tryjoin_np.3:110
9480 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9481 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9482
9483 #. type: Plain text
9484 #: build/C/man3/pthread_tryjoin_np.3:112
9485 msgid "These functions first appeared in glibc in version 2.3.3."
9486 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9487
9488 #. type: Plain text
9489 #: build/C/man3/pthread_tryjoin_np.3:117
9490 msgid "The following code waits to join for up to 5 seconds:"
9491 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9492
9493 #. type: Plain text
9494 #: build/C/man3/pthread_tryjoin_np.3:121
9495 #, no-wrap
9496 msgid ""
9497 "    struct timespec ts;\n"
9498 "    int s;\n"
9499 msgstr ""
9500 "    struct timespec ts;\n"
9501 "    int s;\n"
9502
9503 #. type: Plain text
9504 #: build/C/man3/pthread_tryjoin_np.3:123
9505 #, no-wrap
9506 msgid "    ...\n"
9507 msgstr "    ...\n"
9508
9509 #. type: Plain text
9510 #: build/C/man3/pthread_tryjoin_np.3:127
9511 #, no-wrap
9512 msgid ""
9513 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9514 "\t/* Handle error */\n"
9515 "    }\n"
9516 msgstr ""
9517 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9518 "\t/* Handle error */\n"
9519 "    }\n"
9520
9521 #. type: Plain text
9522 #: build/C/man3/pthread_tryjoin_np.3:129
9523 #, no-wrap
9524 msgid "    ts.tv_sec += 5;\n"
9525 msgstr "    ts.tv_sec += 5;\n"
9526
9527 #. type: Plain text
9528 #: build/C/man3/pthread_tryjoin_np.3:134
9529 #, no-wrap
9530 msgid ""
9531 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9532 "    if (s != 0) {\n"
9533 "        /* Handle error */\n"
9534 "    }\n"
9535 msgstr ""
9536 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9537 "    if (s != 0) {\n"
9538 "        /* Handle error */\n"
9539 "    }\n"
9540
9541 #. type: Plain text
9542 #: build/C/man3/pthread_tryjoin_np.3:140
9543 msgid ""
9544 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9545 msgstr ""
9546 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9547
9548 #. type: TH
9549 #: build/C/man3/pthread_yield.3:25
9550 #, no-wrap
9551 msgid "PTHREAD_YIELD"
9552 msgstr "PTHREAD_YIELD"
9553
9554 #. type: TH
9555 #: build/C/man3/pthread_yield.3:25
9556 #, no-wrap
9557 msgid "2013-03-05"
9558 msgstr "2013-03-05"
9559
9560 #. type: Plain text
9561 #: build/C/man3/pthread_yield.3:28
9562 msgid "pthread_yield - yield the processor"
9563 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9564
9565 #. type: Plain text
9566 #: build/C/man3/pthread_yield.3:34
9567 #, no-wrap
9568 msgid "B<int pthread_yield(void);>\n"
9569 msgstr "B<int pthread_yield(void);>\n"
9570
9571 #. type: Plain text
9572 #: build/C/man3/pthread_yield.3:44
9573 msgid ""
9574 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9575 "thread is placed at the end of the run queue for its static priority and "
9576 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9577 "(2)"
9578 msgstr ""
9579 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9580 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9581 "別のスレッドが実行されるようにスケジューリングされる。\n"
9582 "詳細は B<sched_yield>(2) を参照。"
9583
9584 #. type: Plain text
9585 #: build/C/man3/pthread_yield.3:49
9586 msgid ""
9587 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9588 "number."
9589 msgstr ""
9590 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9591 "エラーの場合、エラー番号を返す。"
9592
9593 #. type: Plain text
9594 #: build/C/man3/pthread_yield.3:53
9595 msgid ""
9596 "On Linux, this call always succeeds (but portable and future-proof "
9597 "applications should nevertheless handle a possible error return)."
9598 msgstr ""
9599 "Linux では、この関数の呼び出しは常に成功する\n"
9600 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9601 "正のエラーの返り値を処理するようにすべきである)。"
9602
9603 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9604 #. type: Plain text
9605 #: build/C/man3/pthread_yield.3:59
9606 msgid ""
9607 "This call is nonstandard, but present on several other systems.  Use the "
9608 "standardized B<sched_yield>(2)  instead."
9609 msgstr ""
9610 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9611 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9612
9613 #. type: Plain text
9614 #: build/C/man3/pthread_yield.3:62
9615 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9616 msgstr ""
9617 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9618
9619 #. type: Plain text
9620 #: build/C/man3/pthread_yield.3:66
9621 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9622 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9623
9624 #. type: TH
9625 #: build/C/man7/pthreads.7:26
9626 #, no-wrap
9627 msgid "PTHREADS"
9628 msgstr "PTHREADS"
9629
9630 #. type: TH
9631 #: build/C/man7/pthreads.7:26
9632 #, no-wrap
9633 msgid "2010-11-14"
9634 msgstr "2010-11-14"
9635
9636 #. type: Plain text
9637 #: build/C/man7/pthreads.7:29
9638 msgid "pthreads - POSIX threads"
9639 msgstr "pthreads - POSIX スレッド"
9640
9641 #. type: Plain text
9642 #: build/C/man7/pthreads.7:36
9643 msgid ""
9644 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9645 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9646 "can contain multiple threads, all of which are executing the same program.  "
9647 "These threads share the same global memory (data and heap segments), but "
9648 "each thread has its own stack (automatic variables)."
9649 msgstr ""
9650 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9651 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9652 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9653 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9654 "スレッドは自分専用のスタック (自動変数) を持つ。"
9655
9656 #. type: Plain text
9657 #: build/C/man7/pthreads.7:39
9658 msgid ""
9659 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9660 "these attributes are process-wide rather than per-thread):"
9661 msgstr ""
9662 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9663 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9664
9665 #. type: IP
9666 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9667 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9668 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9669 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9670 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9671 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9672 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9673 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9674 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9675 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9676 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9677 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9678 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9679 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9680 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9681 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9682 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9683 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9684 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9685 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9686 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9687 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9688 #: build/C/man7/pthreads.7:835
9689 #, no-wrap
9690 msgid "-"
9691 msgstr "-"
9692
9693 #. type: Plain text
9694 #: build/C/man7/pthreads.7:41
9695 msgid "process ID"
9696 msgstr "プロセス ID"
9697
9698 #. type: Plain text
9699 #: build/C/man7/pthreads.7:43
9700 msgid "parent process ID"
9701 msgstr "親プロセス ID"
9702
9703 #. type: Plain text
9704 #: build/C/man7/pthreads.7:45
9705 msgid "process group ID and session ID"
9706 msgstr "プロセスグループ ID とセッション ID"
9707
9708 #. type: Plain text
9709 #: build/C/man7/pthreads.7:47
9710 msgid "controlling terminal"
9711 msgstr "制御端末"
9712
9713 #. type: Plain text
9714 #: build/C/man7/pthreads.7:49
9715 msgid "user and group IDs"
9716 msgstr "ユーザ ID とグループ ID"
9717
9718 #. type: Plain text
9719 #: build/C/man7/pthreads.7:51
9720 msgid "open file descriptors"
9721 msgstr "オープンするファイルディスクリプタ"
9722
9723 #. type: Plain text
9724 #: build/C/man7/pthreads.7:54
9725 msgid "record locks (see B<fcntl>(2))"
9726 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9727
9728 #. type: Plain text
9729 #: build/C/man7/pthreads.7:56
9730 msgid "signal dispositions"
9731 msgstr "シグナルの配置"
9732
9733 #. type: Plain text
9734 #: build/C/man7/pthreads.7:59
9735 msgid "file mode creation mask (B<umask>(2))"
9736 msgstr "ファイルモード作成マスク (B<umask>(2))"
9737
9738 #. type: Plain text
9739 #: build/C/man7/pthreads.7:65
9740 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9741 msgstr ""
9742 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9743
9744 #. type: Plain text
9745 #: build/C/man7/pthreads.7:70
9746 msgid ""
9747 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9748 msgstr ""
9749 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9750
9751 #. type: Plain text
9752 #: build/C/man7/pthreads.7:73
9753 msgid "nice value (B<setpriority>(2))"
9754 msgstr "nice 値 (B<setpriority>(2))"
9755
9756 #. type: Plain text
9757 #: build/C/man7/pthreads.7:76
9758 msgid "resource limits (B<setrlimit>(2))"
9759 msgstr "リソース制限 (B<setrlimit>(2))"
9760
9761 #. type: Plain text
9762 #: build/C/man7/pthreads.7:81
9763 msgid ""
9764 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9765 "(B<getrusage>(2))"
9766 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9767
9768 #. type: Plain text
9769 #: build/C/man7/pthreads.7:84
9770 msgid ""
9771 "As well as the stack, POSIX.1 specifies that various other attributes are "
9772 "distinct for each thread, including:"
9773 msgstr ""
9774 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9775 "るかを規定している:"
9776
9777 #. type: Plain text
9778 #: build/C/man7/pthreads.7:88
9779 msgid "thread ID (the I<pthread_t> data type)"
9780 msgstr "スレッド ID (B<pthread_t> データ型)"
9781
9782 #. type: Plain text
9783 #: build/C/man7/pthreads.7:91
9784 msgid "signal mask (B<pthread_sigmask>(3))"
9785 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9786
9787 #. type: Plain text
9788 #: build/C/man7/pthreads.7:95
9789 msgid "the I<errno> variable"
9790 msgstr "I<errno> 変数"
9791
9792 #. type: Plain text
9793 #: build/C/man7/pthreads.7:98
9794 msgid "alternate signal stack (B<sigaltstack>(2))"
9795 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9796
9797 #. type: Plain text
9798 #: build/C/man7/pthreads.7:103
9799 msgid ""
9800 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9801 "B<sched_setparam>(2))"
9802 msgstr ""
9803 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9804 "と B<sched_setparam>(2))"
9805
9806 #. type: Plain text
9807 #: build/C/man7/pthreads.7:105
9808 msgid "The following Linux-specific features are also per-thread:"
9809 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9810
9811 #. type: Plain text
9812 #: build/C/man7/pthreads.7:108
9813 msgid "capabilities (see B<capabilities>(7))"
9814 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9815
9816 #. type: Plain text
9817 #: build/C/man7/pthreads.7:111
9818 msgid "CPU affinity (B<sched_setaffinity>(2))"
9819 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9820
9821 #. type: SS
9822 #: build/C/man7/pthreads.7:111
9823 #, no-wrap
9824 msgid "Pthreads function return values"
9825 msgstr "pthreads 関数の返り値"
9826
9827 #. type: Plain text
9828 #: build/C/man7/pthreads.7:118
9829 msgid ""
9830 "Most pthreads functions return 0 on success, and an error number of "
9831 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9832 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9833 "the function can never fail with the error B<EINTR>."
9834 msgstr ""
9835 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9836 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9837 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9838 "は決してないと規定している。"
9839
9840 #. type: SS
9841 #: build/C/man7/pthreads.7:118
9842 #, no-wrap
9843 msgid "Thread IDs"
9844 msgstr "スレッド ID"
9845
9846 #. type: Plain text
9847 #: build/C/man7/pthreads.7:132
9848 msgid ""
9849 "Each of the threads in a process has a unique thread identifier (stored in "
9850 "the type I<pthread_t>).  This identifier is returned to the caller of "
9851 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9852 "using B<pthread_self>(3).  Thread IDs are guaranteed to be unique only "
9853 "within a process.  A thread ID may be reused after a terminated thread has "
9854 "been joined, or a detached thread has terminated.  In all pthreads functions "
9855 "that accept a thread ID as an argument, that ID by definition refers to a "
9856 "thread in the same process as the caller."
9857 msgstr ""
9858 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9859 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9860 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9861 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9862 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9863 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9864 "じプロセス内の一つのスレッドを参照する。"
9865
9866 #. type: SS
9867 #: build/C/man7/pthreads.7:132
9868 #, no-wrap
9869 msgid "Thread-safe functions"
9870 msgstr "スレッドセーフな関数"
9871
9872 #. type: Plain text
9873 #: build/C/man7/pthreads.7:136
9874 msgid ""
9875 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9876 "same results regardless of whether it is)  called from multiple threads at "
9877 "the same time."
9878 msgstr ""
9879 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9880 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9881
9882 #. type: Plain text
9883 #: build/C/man7/pthreads.7:140
9884 msgid ""
9885 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9886 "standard shall be thread-safe, except for the following functions:"
9887 msgstr ""
9888 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9889 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9890
9891 #. type: Plain text
9892 #: build/C/man7/pthreads.7:234
9893 #, no-wrap
9894 msgid ""
9895 "asctime()\n"
9896 "basename()\n"
9897 "catgets()\n"
9898 "crypt()\n"
9899 "ctermid() if passed a non-NULL argument\n"
9900 "ctime()\n"
9901 "dbm_clearerr()\n"
9902 "dbm_close()\n"
9903 "dbm_delete()\n"
9904 "dbm_error()\n"
9905 "dbm_fetch()\n"
9906 "dbm_firstkey()\n"
9907 "dbm_nextkey()\n"
9908 "dbm_open()\n"
9909 "dbm_store()\n"
9910 "dirname()\n"
9911 "dlerror()\n"
9912 "drand48()\n"
9913 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9914 "encrypt()\n"
9915 "endgrent()\n"
9916 "endpwent()\n"
9917 "endutxent()\n"
9918 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9919 "ftw()\n"
9920 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9921 "getc_unlocked()\n"
9922 "getchar_unlocked()\n"
9923 "getdate()\n"
9924 "getenv()\n"
9925 "getgrent()\n"
9926 "getgrgid()\n"
9927 "getgrnam()\n"
9928 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9929 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
9930 "gethostent()\n"
9931 "getlogin()\n"
9932 "getnetbyaddr()\n"
9933 "getnetbyname()\n"
9934 "getnetent()\n"
9935 "getopt()\n"
9936 "getprotobyname()\n"
9937 "getprotobynumber()\n"
9938 "getprotoent()\n"
9939 "getpwent()\n"
9940 "getpwnam()\n"
9941 "getpwuid()\n"
9942 "getservbyname()\n"
9943 "getservbyport()\n"
9944 "getservent()\n"
9945 "getutxent()\n"
9946 "getutxid()\n"
9947 "getutxline()\n"
9948 "gmtime()\n"
9949 "hcreate()\n"
9950 "hdestroy()\n"
9951 "hsearch()\n"
9952 "inet_ntoa()\n"
9953 "l64a()\n"
9954 "lgamma()\n"
9955 "lgammaf()\n"
9956 "lgammal()\n"
9957 "localeconv()\n"
9958 "localtime()\n"
9959 "lrand48()\n"
9960 "mrand48()\n"
9961 "nftw()\n"
9962 "nl_langinfo()\n"
9963 "ptsname()\n"
9964 "putc_unlocked()\n"
9965 "putchar_unlocked()\n"
9966 "putenv()\n"
9967 "pututxline()\n"
9968 "rand()\n"
9969 "readdir()\n"
9970 "setenv()\n"
9971 "setgrent()\n"
9972 "setkey()\n"
9973 "setpwent()\n"
9974 "setutxent()\n"
9975 "strerror()\n"
9976 "strsignal() [Added in POSIX.1-2008]\n"
9977 "strtok()\n"
9978 "system() [Added in POSIX.1-2008]\n"
9979 "tmpnam() if passed a non-NULL argument\n"
9980 "ttyname()\n"
9981 "unsetenv()\n"
9982 "wcrtomb() if its final argument is NULL\n"
9983 "wcsrtombs() if its final argument is NULL\n"
9984 "wcstombs()\n"
9985 "wctomb()\n"
9986 msgstr ""
9987 "asctime()\n"
9988 "basename()\n"
9989 "catgets()\n"
9990 "crypt()\n"
9991 "ctermid() (NULL でない引き数を渡された場合)\n"
9992 "ctime()\n"
9993 "dbm_clearerr()\n"
9994 "dbm_close()\n"
9995 "dbm_delete()\n"
9996 "dbm_error()\n"
9997 "dbm_fetch()\n"
9998 "dbm_firstkey()\n"
9999 "dbm_nextkey()\n"
10000 "dbm_open()\n"
10001 "dbm_store()\n"
10002 "dirname()\n"
10003 "dlerror()\n"
10004 "drand48()\n"
10005 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10006 "encrypt()\n"
10007 "endgrent()\n"
10008 "endpwent()\n"
10009 "endutxent()\n"
10010 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10011 "ftw()\n"
10012 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10013 "getc_unlocked()\n"
10014 "getchar_unlocked()\n"
10015 "getdate()\n"
10016 "getenv()\n"
10017 "getgrent()\n"
10018 "getgrgid()\n"
10019 "getgrnam()\n"
10020 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10021 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10022 "gethostent()\n"
10023 "getlogin()\n"
10024 "getnetbyaddr()\n"
10025 "getnetbyname()\n"
10026 "getnetent()\n"
10027 "getopt()\n"
10028 "getprotobyname()\n"
10029 "getprotobynumber()\n"
10030 "getprotoent()\n"
10031 "getpwent()\n"
10032 "getpwnam()\n"
10033 "getpwuid()\n"
10034 "getservbyname()\n"
10035 "getservbyport()\n"
10036 "getservent()\n"
10037 "getutxent()\n"
10038 "getutxid()\n"
10039 "getutxline()\n"
10040 "gmtime()\n"
10041 "hcreate()\n"
10042 "hdestroy()\n"
10043 "hsearch()\n"
10044 "inet_ntoa()\n"
10045 "l64a()\n"
10046 "lgamma()\n"
10047 "lgammaf()\n"
10048 "lgammal()\n"
10049 "localeconv()\n"
10050 "localtime()\n"
10051 "lrand48()\n"
10052 "mrand48()\n"
10053 "nftw()\n"
10054 "nl_langinfo()\n"
10055 "ptsname()\n"
10056 "putc_unlocked()\n"
10057 "putchar_unlocked()\n"
10058 "putenv()\n"
10059 "pututxline()\n"
10060 "rand()\n"
10061 "readdir()\n"
10062 "setenv()\n"
10063 "setgrent()\n"
10064 "setkey()\n"
10065 "setpwent()\n"
10066 "setutxent()\n"
10067 "strerror()\n"
10068 "strsignal() [POSIX.1-2008 で追加された]\n"
10069 "strtok()\n"
10070 "system() [POSIX.1-2008 で追加された]\n"
10071 "tmpnam() (NULL でない引き数を渡された場合)\n"
10072 "ttyname()\n"
10073 "unsetenv()\n"
10074 "wcrtomb() (最後の引き数が NULL の場合)\n"
10075 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10076 "wcstombs()\n"
10077 "wctomb()\n"
10078
10079 #. type: SS
10080 #: build/C/man7/pthreads.7:236
10081 #, no-wrap
10082 msgid "Async-cancel-safe functions"
10083 msgstr "async-cancel-safe 関数"
10084
10085 #. type: Plain text
10086 #: build/C/man7/pthreads.7:240
10087 msgid ""
10088 "An async-cancel-safe function is one that can be safely called in an "
10089 "application where asynchronous cancelability is enabled (see "
10090 "B<pthread_setcancelstate>(3))."
10091 msgstr ""
10092 "async-cancel-safe 関数は、\n"
10093 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10094 "安全に呼び出すことができる関数のことである\n"
10095 "(B<pthread_setcancelstate>(3) を参照)。"
10096
10097 #. type: Plain text
10098 #: build/C/man7/pthreads.7:243
10099 msgid ""
10100 "Only the following functions are required to be async-cancel-safe by "
10101 "POSIX.1-2001 and POSIX.1-2008:"
10102 msgstr ""
10103 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10104 "なければならないとされている。"
10105
10106 #. type: Plain text
10107 #: build/C/man7/pthreads.7:249
10108 #, no-wrap
10109 msgid ""
10110 "pthread_cancel()\n"
10111 "pthread_setcancelstate()\n"
10112 "pthread_setcanceltype()\n"
10113 msgstr ""
10114 "pthread_cancel()\n"
10115 "pthread_setcancelstate()\n"
10116 "pthread_setcanceltype()\n"
10117
10118 #. type: SS
10119 #: build/C/man7/pthreads.7:251
10120 #, no-wrap
10121 msgid "Cancellation points"
10122 msgstr "取り消しポイント (cancellation points)"
10123
10124 #. type: Plain text
10125 #: build/C/man7/pthreads.7:258
10126 msgid ""
10127 "POSIX.1 specifies that certain functions must, and certain other functions "
10128 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10129 "type is deferred, and a cancellation request is pending for the thread, then "
10130 "the thread is canceled when it calls a function that is a cancellation point."
10131 msgstr ""
10132 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10133 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10134 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10135 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10136 "時点で、そのスレッドのキャンセルが 行われる。"
10137
10138 #. type: Plain text
10139 #: build/C/man7/pthreads.7:261
10140 msgid ""
10141 "The following functions are required to be cancellation points by "
10142 "POSIX.1-2001 and/or POSIX.1-2008:"
10143 msgstr ""
10144 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10145 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10146
10147 #. type: Plain text
10148 #: build/C/man7/pthreads.7:324
10149 #, no-wrap
10150 msgid ""
10151 "accept()\n"
10152 "aio_suspend()\n"
10153 "clock_nanosleep()\n"
10154 "close()\n"
10155 "connect()\n"
10156 "creat()\n"
10157 "fcntl() F_SETLKW\n"
10158 "fdatasync()\n"
10159 "fsync()\n"
10160 "getmsg()\n"
10161 "getpmsg()\n"
10162 "lockf() F_LOCK\n"
10163 "mq_receive()\n"
10164 "mq_send()\n"
10165 "mq_timedreceive()\n"
10166 "mq_timedsend()\n"
10167 "msgrcv()\n"
10168 "msgsnd()\n"
10169 "msync()\n"
10170 "nanosleep()\n"
10171 "open()\n"
10172 "openat() [Added in POSIX.1-2008]\n"
10173 "pause()\n"
10174 "poll()\n"
10175 "pread()\n"
10176 "pselect()\n"
10177 "pthread_cond_timedwait()\n"
10178 "pthread_cond_wait()\n"
10179 "pthread_join()\n"
10180 "pthread_testcancel()\n"
10181 "putmsg()\n"
10182 "putpmsg()\n"
10183 "pwrite()\n"
10184 "read()\n"
10185 "readv()\n"
10186 "recv()\n"
10187 "recvfrom()\n"
10188 "recvmsg()\n"
10189 "select()\n"
10190 "sem_timedwait()\n"
10191 "sem_wait()\n"
10192 "send()\n"
10193 "sendmsg()\n"
10194 "sendto()\n"
10195 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10196 "sigsuspend()\n"
10197 "sigtimedwait()\n"
10198 "sigwait()\n"
10199 "sigwaitinfo()\n"
10200 "sleep()\n"
10201 "system()\n"
10202 "tcdrain()\n"
10203 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10204 "wait()\n"
10205 "waitid()\n"
10206 "waitpid()\n"
10207 "write()\n"
10208 "writev()\n"
10209 msgstr ""
10210 "accept()\n"
10211 "aio_suspend()\n"
10212 "clock_nanosleep()\n"
10213 "close()\n"
10214 "connect()\n"
10215 "creat()\n"
10216 "fcntl() F_SETLKW\n"
10217 "fdatasync()\n"
10218 "fsync()\n"
10219 "getmsg()\n"
10220 "getpmsg()\n"
10221 "lockf() F_LOCK\n"
10222 "mq_receive()\n"
10223 "mq_send()\n"
10224 "mq_timedreceive()\n"
10225 "mq_timedsend()\n"
10226 "msgrcv()\n"
10227 "msgsnd()\n"
10228 "msync()\n"
10229 "nanosleep()\n"
10230 "open()\n"
10231 "openat() [POSIX.1-2008 で追加された]\n"
10232 "pause()\n"
10233 "poll()\n"
10234 "pread()\n"
10235 "pselect()\n"
10236 "pthread_cond_timedwait()\n"
10237 "pthread_cond_wait()\n"
10238 "pthread_join()\n"
10239 "pthread_testcancel()\n"
10240 "putmsg()\n"
10241 "putpmsg()\n"
10242 "pwrite()\n"
10243 "read()\n"
10244 "readv()\n"
10245 "recv()\n"
10246 "recvfrom()\n"
10247 "recvmsg()\n"
10248 "select()\n"
10249 "sem_timedwait()\n"
10250 "sem_wait()\n"
10251 "send()\n"
10252 "sendmsg()\n"
10253 "sendto()\n"
10254 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10255 "sigsuspend()\n"
10256 "sigtimedwait()\n"
10257 "sigwait()\n"
10258 "sigwaitinfo()\n"
10259 "sleep()\n"
10260 "system()\n"
10261 "tcdrain()\n"
10262 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10263 "wait()\n"
10264 "waitid()\n"
10265 "waitpid()\n"
10266 "write()\n"
10267 "writev()\n"
10268
10269 #. type: Plain text
10270 #: build/C/man7/pthreads.7:329
10271 msgid ""
10272 "The following functions may be cancellation points according to POSIX.1-2001 "
10273 "and/or POSIX.1-2008:"
10274 msgstr ""
10275 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10276 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10277
10278 #. type: Plain text
10279 #: build/C/man7/pthreads.7:557
10280 #, no-wrap
10281 msgid ""
10282 "access()\n"
10283 "asctime()\n"
10284 "asctime_r()\n"
10285 "catclose()\n"
10286 "catgets()\n"
10287 "catopen()\n"
10288 "chmod() [Added in POSIX.1-2008]\n"
10289 "chown() [Added in POSIX.1-2008]\n"
10290 "closedir()\n"
10291 "closelog()\n"
10292 "ctermid()\n"
10293 "ctime()\n"
10294 "ctime_r()\n"
10295 "dbm_close()\n"
10296 "dbm_delete()\n"
10297 "dbm_fetch()\n"
10298 "dbm_nextkey()\n"
10299 "dbm_open()\n"
10300 "dbm_store()\n"
10301 "dlclose()\n"
10302 "dlopen()\n"
10303 "dprintf() [Added in POSIX.1-2008]\n"
10304 "endgrent()\n"
10305 "endhostent()\n"
10306 "endnetent()\n"
10307 "endprotoent()\n"
10308 "endpwent()\n"
10309 "endservent()\n"
10310 "endutxent()\n"
10311 "faccessat() [Added in POSIX.1-2008]\n"
10312 "fchmod() [Added in POSIX.1-2008]\n"
10313 "fchmodat() [Added in POSIX.1-2008]\n"
10314 "fchown() [Added in POSIX.1-2008]\n"
10315 "fchownat() [Added in POSIX.1-2008]\n"
10316 "fclose()\n"
10317 "fcntl() (for any value of cmd argument)\n"
10318 "fflush()\n"
10319 "fgetc()\n"
10320 "fgetpos()\n"
10321 "fgets()\n"
10322 "fgetwc()\n"
10323 "fgetws()\n"
10324 "fmtmsg()\n"
10325 "fopen()\n"
10326 "fpathconf()\n"
10327 "fprintf()\n"
10328 "fputc()\n"
10329 "fputs()\n"
10330 "fputwc()\n"
10331 "fputws()\n"
10332 "fread()\n"
10333 "freopen()\n"
10334 "fscanf()\n"
10335 "fseek()\n"
10336 "fseeko()\n"
10337 "fsetpos()\n"
10338 "fstat()\n"
10339 "fstatat() [Added in POSIX.1-2008]\n"
10340 "ftell()\n"
10341 "ftello()\n"
10342 "ftw()\n"
10343 "futimens() [Added in POSIX.1-2008]\n"
10344 "fwprintf()\n"
10345 "fwrite()\n"
10346 "fwscanf()\n"
10347 "getaddrinfo()\n"
10348 "getc()\n"
10349 "getc_unlocked()\n"
10350 "getchar()\n"
10351 "getchar_unlocked()\n"
10352 "getcwd()\n"
10353 "getdate()\n"
10354 "getdelim() [Added in POSIX.1-2008]\n"
10355 "getgrent()\n"
10356 "getgrgid()\n"
10357 "getgrgid_r()\n"
10358 "getgrnam()\n"
10359 "getgrnam_r()\n"
10360 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10361 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10362 "gethostent()\n"
10363 "gethostid()\n"
10364 "gethostname()\n"
10365 "getline() [Added in POSIX.1-2008]\n"
10366 "getlogin()\n"
10367 "getlogin_r()\n"
10368 "getnameinfo()\n"
10369 "getnetbyaddr()\n"
10370 "getnetbyname()\n"
10371 "getnetent()\n"
10372 "getopt() (if opterr is nonzero)\n"
10373 "getprotobyname()\n"
10374 "getprotobynumber()\n"
10375 "getprotoent()\n"
10376 "getpwent()\n"
10377 "getpwnam()\n"
10378 "getpwnam_r()\n"
10379 "getpwuid()\n"
10380 "getpwuid_r()\n"
10381 "gets()\n"
10382 "getservbyname()\n"
10383 "getservbyport()\n"
10384 "getservent()\n"
10385 "getutxent()\n"
10386 "getutxid()\n"
10387 "getutxline()\n"
10388 "getwc()\n"
10389 "getwchar()\n"
10390 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10391 "glob()\n"
10392 "iconv_close()\n"
10393 "iconv_open()\n"
10394 "ioctl()\n"
10395 "link()\n"
10396 "linkat() [Added in POSIX.1-2008]\n"
10397 "lio_listio() [Added in POSIX.1-2008]\n"
10398 "localtime()\n"
10399 "localtime_r()\n"
10400 "lockf() [Added in POSIX.1-2008]\n"
10401 "lseek()\n"
10402 "lstat()\n"
10403 "mkdir() [Added in POSIX.1-2008]\n"
10404 "mkdirat() [Added in POSIX.1-2008]\n"
10405 "mkdtemp() [Added in POSIX.1-2008]\n"
10406 "mkfifo() [Added in POSIX.1-2008]\n"
10407 "mkfifoat() [Added in POSIX.1-2008]\n"
10408 "mknod() [Added in POSIX.1-2008]\n"
10409 "mknodat() [Added in POSIX.1-2008]\n"
10410 "mkstemp()\n"
10411 "mktime()\n"
10412 "nftw()\n"
10413 "opendir()\n"
10414 "openlog()\n"
10415 "pathconf()\n"
10416 "pclose()\n"
10417 "perror()\n"
10418 "popen()\n"
10419 "posix_fadvise()\n"
10420 "posix_fallocate()\n"
10421 "posix_madvise()\n"
10422 "posix_openpt()\n"
10423 "posix_spawn()\n"
10424 "posix_spawnp()\n"
10425 "posix_trace_clear()\n"
10426 "posix_trace_close()\n"
10427 "posix_trace_create()\n"
10428 "posix_trace_create_withlog()\n"
10429 "posix_trace_eventtypelist_getnext_id()\n"
10430 "posix_trace_eventtypelist_rewind()\n"
10431 "posix_trace_flush()\n"
10432 "posix_trace_get_attr()\n"
10433 "posix_trace_get_filter()\n"
10434 "posix_trace_get_status()\n"
10435 "posix_trace_getnext_event()\n"
10436 "posix_trace_open()\n"
10437 "posix_trace_rewind()\n"
10438 "posix_trace_set_filter()\n"
10439 "posix_trace_shutdown()\n"
10440 "posix_trace_timedgetnext_event()\n"
10441 "posix_typed_mem_open()\n"
10442 "printf()\n"
10443 "psiginfo() [Added in POSIX.1-2008]\n"
10444 "psignal() [Added in POSIX.1-2008]\n"
10445 "pthread_rwlock_rdlock()\n"
10446 "pthread_rwlock_timedrdlock()\n"
10447 "pthread_rwlock_timedwrlock()\n"
10448 "pthread_rwlock_wrlock()\n"
10449 "putc()\n"
10450 "putc_unlocked()\n"
10451 "putchar()\n"
10452 "putchar_unlocked()\n"
10453 "puts()\n"
10454 "pututxline()\n"
10455 "putwc()\n"
10456 "putwchar()\n"
10457 "readdir()\n"
10458 "readdir_r()\n"
10459 "readlink() [Added in POSIX.1-2008]\n"
10460 "readlinkat() [Added in POSIX.1-2008]\n"
10461 "remove()\n"
10462 "rename()\n"
10463 "renameat() [Added in POSIX.1-2008]\n"
10464 "rewind()\n"
10465 "rewinddir()\n"
10466 "scandir() [Added in POSIX.1-2008]\n"
10467 "scanf()\n"
10468 "seekdir()\n"
10469 "semop()\n"
10470 "setgrent()\n"
10471 "sethostent()\n"
10472 "setnetent()\n"
10473 "setprotoent()\n"
10474 "setpwent()\n"
10475 "setservent()\n"
10476 "setutxent()\n"
10477 "sigpause() [Added in POSIX.1-2008]\n"
10478 "stat()\n"
10479 "strerror()\n"
10480 "strerror_r()\n"
10481 "strftime()\n"
10482 "symlink()\n"
10483 "symlinkat() [Added in POSIX.1-2008]\n"
10484 "sync()\n"
10485 "syslog()\n"
10486 "tmpfile()\n"
10487 "tmpnam()\n"
10488 "ttyname()\n"
10489 "ttyname_r()\n"
10490 "tzset()\n"
10491 "ungetc()\n"
10492 "ungetwc()\n"
10493 "unlink()\n"
10494 "unlinkat() [Added in POSIX.1-2008]\n"
10495 "utime() [Added in POSIX.1-2008]\n"
10496 "utimensat() [Added in POSIX.1-2008]\n"
10497 "utimes() [Added in POSIX.1-2008]\n"
10498 "vdprintf() [Added in POSIX.1-2008]\n"
10499 "vfprintf()\n"
10500 "vfwprintf()\n"
10501 "vprintf()\n"
10502 "vwprintf()\n"
10503 "wcsftime()\n"
10504 "wordexp()\n"
10505 "wprintf()\n"
10506 "wscanf()\n"
10507 msgstr ""
10508 "access()\n"
10509 "asctime()\n"
10510 "asctime_r()\n"
10511 "catclose()\n"
10512 "catgets()\n"
10513 "catopen()\n"
10514 "chmod() [POSIX.1-2008 で追加された]\n"
10515 "chown() [POSIX.1-2008 で追加された]\n"
10516 "closedir()\n"
10517 "closelog()\n"
10518 "ctermid()\n"
10519 "ctime()\n"
10520 "ctime_r()\n"
10521 "dbm_close()\n"
10522 "dbm_delete()\n"
10523 "dbm_fetch()\n"
10524 "dbm_nextkey()\n"
10525 "dbm_open()\n"
10526 "dbm_store()\n"
10527 "dlclose()\n"
10528 "dlopen()\n"
10529 "dprintf() [POSIX.1-2008 で追加された]\n"
10530 "endgrent()\n"
10531 "endhostent()\n"
10532 "endnetent()\n"
10533 "endprotoent()\n"
10534 "endpwent()\n"
10535 "endservent()\n"
10536 "endutxent()\n"
10537 "faccessat() [POSIX.1-2008 で追加された]\n"
10538 "fchmod() [POSIX.1-2008 で追加された]\n"
10539 "fchmodat() [POSIX.1-2008 で追加された]\n"
10540 "fchown() [POSIX.1-2008 で追加された]\n"
10541 "fchownat() [POSIX.1-2008 で追加された]\n"
10542 "fclose()\n"
10543 "fcntl() (cmd 引き数が何であっても)\n"
10544 "fflush()\n"
10545 "fgetc()\n"
10546 "fgetpos()\n"
10547 "fgets()\n"
10548 "fgetwc()\n"
10549 "fgetws()\n"
10550 "fmtmsg()\n"
10551 "fopen()\n"
10552 "fpathconf()\n"
10553 "fprintf()\n"
10554 "fputc()\n"
10555 "fputs()\n"
10556 "fputwc()\n"
10557 "fputws()\n"
10558 "fread()\n"
10559 "freopen()\n"
10560 "fscanf()\n"
10561 "fseek()\n"
10562 "fseeko()\n"
10563 "fsetpos()\n"
10564 "fstat()\n"
10565 "fstatat() [POSIX.1-2008 で追加された]\n"
10566 "ftell()\n"
10567 "ftello()\n"
10568 "ftw()\n"
10569 "futimens() [POSIX.1-2008 で追加された]\n"
10570 "fwprintf()\n"
10571 "fwrite()\n"
10572 "fwscanf()\n"
10573 "getaddrinfo()\n"
10574 "getc()\n"
10575 "getc_unlocked()\n"
10576 "getchar()\n"
10577 "getchar_unlocked()\n"
10578 "getcwd()\n"
10579 "getdate()\n"
10580 "getdelim() [POSIX.1-2008 で追加された]\n"
10581 "getgrent()\n"
10582 "getgrgid()\n"
10583 "getgrgid_r()\n"
10584 "getgrnam()\n"
10585 "getgrnam_r()\n"
10586 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10587 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10588 "gethostent()\n"
10589 "gethostid()\n"
10590 "gethostname()\n"
10591 "getline() [POSIX.1-2008 で追加された]\n"
10592 "getlogin()\n"
10593 "getlogin_r()\n"
10594 "getnameinfo()\n"
10595 "getnetbyaddr()\n"
10596 "getnetbyname()\n"
10597 "getnetent()\n"
10598 "getopt() (opterr が 0 以外の場合)\n"
10599 "getprotobyname()\n"
10600 "getprotobynumber()\n"
10601 "getprotoent()\n"
10602 "getpwent()\n"
10603 "getpwnam()\n"
10604 "getpwnam_r()\n"
10605 "getpwuid()\n"
10606 "getpwuid_r()\n"
10607 "gets()\n"
10608 "getservbyname()\n"
10609 "getservbyport()\n"
10610 "getservent()\n"
10611 "getutxent()\n"
10612 "getutxid()\n"
10613 "getutxline()\n"
10614 "getwc()\n"
10615 "getwchar()\n"
10616 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10617 "glob()\n"
10618 "iconv_close()\n"
10619 "iconv_open()\n"
10620 "ioctl()\n"
10621 "link()\n"
10622 "linkat() [POSIX.1-2008 で追加された]\n"
10623 "lio_listio() [POSIX.1-2008 で追加された]\n"
10624 "localtime()\n"
10625 "localtime_r()\n"
10626 "lockf() [POSIX.1-2008 で追加された]\n"
10627 "lseek()\n"
10628 "lstat()\n"
10629 "mkdir() [POSIX.1-2008 で追加された]\n"
10630 "mkdirat() [POSIX.1-2008 で追加された]\n"
10631 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10632 "mkfifo() [POSIX.1-2008 で追加された]\n"
10633 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10634 "mknod() [POSIX.1-2008 で追加された]\n"
10635 "mknodat() [POSIX.1-2008 で追加された]\n"
10636 "mkstemp()\n"
10637 "mktime()\n"
10638 "nftw()\n"
10639 "opendir()\n"
10640 "openlog()\n"
10641 "pathconf()\n"
10642 "pclose()\n"
10643 "perror()\n"
10644 "popen()\n"
10645 "posix_fadvise()\n"
10646 "posix_fallocate()\n"
10647 "posix_madvise()\n"
10648 "posix_openpt()\n"
10649 "posix_spawn()\n"
10650 "posix_spawnp()\n"
10651 "posix_trace_clear()\n"
10652 "posix_trace_close()\n"
10653 "posix_trace_create()\n"
10654 "posix_trace_create_withlog()\n"
10655 "posix_trace_eventtypelist_getnext_id()\n"
10656 "posix_trace_eventtypelist_rewind()\n"
10657 "posix_trace_flush()\n"
10658 "posix_trace_get_attr()\n"
10659 "posix_trace_get_filter()\n"
10660 "posix_trace_get_status()\n"
10661 "posix_trace_getnext_event()\n"
10662 "posix_trace_open()\n"
10663 "posix_trace_rewind()\n"
10664 "posix_trace_set_filter()\n"
10665 "posix_trace_shutdown()\n"
10666 "posix_trace_timedgetnext_event()\n"
10667 "posix_typed_mem_open()\n"
10668 "printf()\n"
10669 "psiginfo() [POSIX.1-2008 で追加された]\n"
10670 "psignal() [POSIX.1-2008 で追加された]\n"
10671 "pthread_rwlock_rdlock()\n"
10672 "pthread_rwlock_timedrdlock()\n"
10673 "pthread_rwlock_timedwrlock()\n"
10674 "pthread_rwlock_wrlock()\n"
10675 "putc()\n"
10676 "putc_unlocked()\n"
10677 "putchar()\n"
10678 "putchar_unlocked()\n"
10679 "puts()\n"
10680 "pututxline()\n"
10681 "putwc()\n"
10682 "putwchar()\n"
10683 "readdir()\n"
10684 "readdir_r()\n"
10685 "readlink() [POSIX.1-2008 で追加された]\n"
10686 "readlinkat() [POSIX.1-2008 で追加された]\n"
10687 "remove()\n"
10688 "rename()\n"
10689 "renameat() [POSIX.1-2008 で追加された]\n"
10690 "rewind()\n"
10691 "rewinddir()\n"
10692 "scandir() [POSIX.1-2008 で追加された]\n"
10693 "scanf()\n"
10694 "seekdir()\n"
10695 "semop()\n"
10696 "setgrent()\n"
10697 "sethostent()\n"
10698 "setnetent()\n"
10699 "setprotoent()\n"
10700 "setpwent()\n"
10701 "setservent()\n"
10702 "setutxent()\n"
10703 "sigpause() [POSIX.1-2008 で追加された]\n"
10704 "stat()\n"
10705 "strerror()\n"
10706 "strerror_r()\n"
10707 "strftime()\n"
10708 "symlink()\n"
10709 "symlinkat() [POSIX.1-2008 で追加された]\n"
10710 "sync()\n"
10711 "syslog()\n"
10712 "tmpfile()\n"
10713 "tmpnam()\n"
10714 "ttyname()\n"
10715 "ttyname_r()\n"
10716 "tzset()\n"
10717 "ungetc()\n"
10718 "ungetwc()\n"
10719 "unlink()\n"
10720 "unlinkat() [POSIX.1-2008 で追加された]\n"
10721 "utime() [POSIX.1-2008 で追加された]\n"
10722 "utimensat() [POSIX.1-2008 で追加された]\n"
10723 "utimes() [POSIX.1-2008 で追加された]\n"
10724 "vdprintf() [POSIX.1-2008 で追加された]\n"
10725 "vfprintf()\n"
10726 "vfwprintf()\n"
10727 "vprintf()\n"
10728 "vwprintf()\n"
10729 "wcsftime()\n"
10730 "wordexp()\n"
10731 "wprintf()\n"
10732 "wscanf()\n"
10733
10734 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10735 #.  files, it looks as though at least the following nonstandard
10736 #.  functions are cancellation points:
10737 #.  endnetgrent
10738 #.  endspent
10739 #.  epoll_pwait
10740 #.  epoll_wait
10741 #.  fcloseall
10742 #.  fdopendir
10743 #.  fflush_unlocked
10744 #.  fgetc_unlocked
10745 #.  fgetgrent
10746 #.  fgetgrent_r
10747 #.  fgetpwent
10748 #.  fgetpwent_r
10749 #.  fgets_unlocked
10750 #.  fgetspent
10751 #.  fgetspent_r
10752 #.  fgetwc_unlocked
10753 #.  fgetws_unlocked
10754 #.  fputc_unlocked
10755 #.  fputs_unlocked
10756 #.  fputwc_unlocked
10757 #.  fputws_unlocked
10758 #.  fread_unlocked
10759 #.  fwrite_unlocked
10760 #.  gai_suspend
10761 #.  getaddrinfo_a
10762 #.  getdate_r
10763 #.  getgrent_r
10764 #.  getgrouplist
10765 #.  gethostbyaddr_r
10766 #.  gethostbyname2
10767 #.  gethostbyname2_r
10768 #.  gethostbyname_r
10769 #.  gethostent_r
10770 #.  getnetbyaddr_r
10771 #.  getnetbyname_r
10772 #.  getnetent_r
10773 #.  getnetgrent
10774 #.  getnetgrent_r
10775 #.  getprotobyname_r
10776 #.  getprotobynumber_r
10777 #.  getprotoent_r
10778 #.  getpw
10779 #.  getpwent_r
10780 #.  getservbyname_r
10781 #.  getservbyport_r
10782 #.  getservent_r
10783 #.  getspent
10784 #.  getspent_r
10785 #.  getspnam
10786 #.  getspnam_r
10787 #.  getutmp
10788 #.  getutmpx
10789 #.  getw
10790 #.  getwc_unlocked
10791 #.  getwchar_unlocked
10792 #.  initgroups
10793 #.  innetgr
10794 #.  mkostemp
10795 #.  mkostemp64
10796 #.  mkstemp64
10797 #.  ppoll
10798 #.  pthread_timedjoin_np
10799 #.  putgrent
10800 #.  putpwent
10801 #.  putspent
10802 #.  putw
10803 #.  putwc_unlocked
10804 #.  putwchar_unlocked
10805 #.  rcmd
10806 #.  rcmd_af
10807 #.  rexec
10808 #.  rexec_af
10809 #.  rresvport
10810 #.  rresvport_af
10811 #.  ruserok
10812 #.  ruserok_af
10813 #.  setnetgrent
10814 #.  setspent
10815 #.  sgetspent
10816 #.  sgetspent_r
10817 #.  updwtmpx
10818 #.  utmpxname
10819 #.  vfscanf
10820 #.  vfwscanf
10821 #.  vscanf
10822 #.  vsyslog
10823 #.  vwscanf
10824 #. type: Plain text
10825 #: build/C/man7/pthreads.7:655
10826 msgid ""
10827 "An implementation may also mark other functions not specified in the "
10828 "standard as cancellation points.  In particular, an implementation is likely "
10829 "to mark any nonstandard function that may block as a cancellation point.  "
10830 "(This includes most functions that can touch files.)"
10831 msgstr ""
10832 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10833 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10834 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10835 "関数がこれに含まれる)。"
10836
10837 #. type: SS
10838 #: build/C/man7/pthreads.7:655
10839 #, no-wrap
10840 msgid "Compiling on Linux"
10841 msgstr "Linux でのコンパイル"
10842
10843 #. type: Plain text
10844 #: build/C/man7/pthreads.7:658
10845 msgid ""
10846 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10847 "pthread>."
10848 msgstr ""
10849 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10850 "きである。"
10851
10852 #. type: SS
10853 #: build/C/man7/pthreads.7:658
10854 #, no-wrap
10855 msgid "Linux implementations of POSIX threads"
10856 msgstr "POSIX スレッドの Linux での実装"
10857
10858 #. type: Plain text
10859 #: build/C/man7/pthreads.7:661
10860 msgid ""
10861 "Over time, two threading implementations have been provided by the GNU C "
10862 "library on Linux:"
10863 msgstr ""
10864 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10865 "た。"
10866
10867 #. type: TP
10868 #: build/C/man7/pthreads.7:661
10869 #, no-wrap
10870 msgid "B<LinuxThreads>"
10871 msgstr "B<LinuxThreads>"
10872
10873 #. type: Plain text
10874 #: build/C/man7/pthreads.7:665
10875 msgid ""
10876 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10877 "implementation is no longer supported."
10878 msgstr ""
10879 "最初の Pthreads の実装。\n"
10880 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10881
10882 #. type: TP
10883 #: build/C/man7/pthreads.7:665
10884 #, no-wrap
10885 msgid "B<NPTL> (Native POSIX Threads Library)"
10886 msgstr "B<NPTL> (Native POSIX Threads Library)"
10887
10888 #. type: Plain text
10889 #: build/C/man7/pthreads.7:673
10890 msgid ""
10891 "This is the modern Pthreads implementation.  By comparison with "
10892 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10893 "POSIX.1 specification and better performance when creating large numbers of "
10894 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10895 "are present in the Linux 2.6 kernel."
10896 msgstr ""
10897 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
10898 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
10899 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
10900 "装されている機能が必要である。"
10901
10902 #. type: Plain text
10903 #: build/C/man7/pthreads.7:683
10904 msgid ""
10905 "Both of these are so-called 1:1 implementations, meaning that each thread "
10906 "maps to a kernel scheduling entity.  Both threading implementations employ "
10907 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
10908 "primitives (mutexes, thread joining, and so on) are implemented using the "
10909 "Linux B<futex>(2)  system call."
10910 msgstr ""
10911 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
10912 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
10913 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
10914 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
10915 "使って実装されている。"
10916
10917 #. type: SS
10918 #: build/C/man7/pthreads.7:683
10919 #, no-wrap
10920 msgid "LinuxThreads"
10921 msgstr "LinuxThreads"
10922
10923 #. type: Plain text
10924 #: build/C/man7/pthreads.7:685
10925 msgid "The notable features of this implementation are the following:"
10926 msgstr "この実装の大きな特徴は以下の通りである:"
10927
10928 #. type: Plain text
10929 #: build/C/man7/pthreads.7:692
10930 msgid ""
10931 "In addition to the main (initial) thread, and the threads that the program "
10932 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
10933 "thread.  This thread handles thread creation and termination.  (Problems can "
10934 "result if this thread is inadvertently killed.)"
10935 msgstr ""
10936 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
10937 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
10938 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
10939 "kill されると、問題が起こることがある)。"
10940
10941 #. type: Plain text
10942 #: build/C/man7/pthreads.7:704
10943 msgid ""
10944 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
10945 "the first three real-time signals are used (see also B<signal>(7)).  On "
10946 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
10947 "avoid the use of whichever set of signals is employed by the implementation."
10948 msgstr ""
10949 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
10950 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
10951 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
10952 "用されているシグナルを どれも使わないようにしなければならない。"
10953
10954 #. type: Plain text
10955 #: build/C/man7/pthreads.7:711
10956 msgid ""
10957 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
10958 "implemented as processes which share more information than usual, but which "
10959 "do not share a common process ID.)  LinuxThreads threads (including the "
10960 "manager thread)  are visible as separate processes using B<ps>(1)."
10961 msgstr ""
10962 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
10963 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
10964 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
10965 "を使うと別のプロセスのように見える。"
10966
10967 #. type: Plain text
10968 #: build/C/man7/pthreads.7:714
10969 msgid ""
10970 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
10971 "number of ways, including the following:"
10972 msgstr ""
10973 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
10974 "示すような点がある:"
10975
10976 #. type: Plain text
10977 #: build/C/man7/pthreads.7:718
10978 msgid "Calls to B<getpid>(2)  return a different value in each thread."
10979 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
10980
10981 #. type: Plain text
10982 #: build/C/man7/pthreads.7:727
10983 msgid ""
10984 "Calls to B<getppid>(2)  in threads other than the main thread return the "
10985 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
10986 "should return the same value as B<getppid>(2)  in the main thread."
10987 msgstr ""
10988 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
10989 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
10990 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
10991
10992 #. type: Plain text
10993 #: build/C/man7/pthreads.7:737
10994 msgid ""
10995 "When one thread creates a new child process using B<fork>(2), any thread "
10996 "should be able to B<wait>(2)  on the child.  However, the implementation "
10997 "only allows the thread that created the child to B<wait>(2)  on it."
10998 msgstr ""
10999 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11000 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11001 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11002 "る。"
11003
11004 #. type: Plain text
11005 #: build/C/man7/pthreads.7:744
11006 msgid ""
11007 "When a thread calls B<execve>(2), all other threads are terminated (as "
11008 "required by POSIX.1).  However, the resulting process has the same PID as "
11009 "the thread that called B<execve>(2): it should have the same PID as the main "
11010 "thread."
11011 msgstr ""
11012 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11013 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11014 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11015 "る。"
11016
11017 #. type: Plain text
11018 #: build/C/man7/pthreads.7:751
11019 msgid ""
11020 "Threads do not share user and group IDs.  This can cause complications with "
11021 "set-user-ID programs and can cause failures in Pthreads functions if an "
11022 "application changes its credentials using B<seteuid>(2)  or similar."
11023 msgstr ""
11024 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11025 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11026 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11027
11028 #. type: Plain text
11029 #: build/C/man7/pthreads.7:753
11030 msgid "Threads do not share a common session ID and process group ID."
11031 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11032
11033 #. type: Plain text
11034 #: build/C/man7/pthreads.7:756
11035 msgid "Threads do not share record locks created using B<fcntl>(2)."
11036 msgstr ""
11037 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11038
11039 #. type: Plain text
11040 #: build/C/man7/pthreads.7:762
11041 msgid ""
11042 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11043 "rather than process-wide."
11044 msgstr ""
11045 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11046 "単位の情報である。"
11047
11048 #. type: Plain text
11049 #: build/C/man7/pthreads.7:765
11050 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11051 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11052
11053 #. type: Plain text
11054 #: build/C/man7/pthreads.7:767
11055 msgid "Threads do not share interval timers."
11056 msgstr "スレッド間でインターバル・タイマを共有しない。"
11057
11058 #.  FIXME . bug report filed for NPTL nice nonconformance
11059 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11060 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11061 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11062 #.  Monitor this to see if it makes it into mainline.
11063 #. type: Plain text
11064 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11065 msgid "Threads do not share a common nice value."
11066 msgstr "スレッドは共通の nice 値を共有しない。"
11067
11068 #. type: Plain text
11069 #: build/C/man7/pthreads.7:779
11070 msgid ""
11071 "POSIX.1 distinguishes the notions of signals that are directed to the "
11072 "process as a whole and signals that are directed to individual threads.  "
11073 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11074 "example) should be handled by a single, arbitrarily selected thread within "
11075 "the process.  LinuxThreads does not support the notion of process-directed "
11076 "signals: signals may be sent only to specific threads."
11077 msgstr ""
11078 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11079 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11080 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11081 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11082 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11083 "ルは特定のスレッドにだけ送ることができる。"
11084
11085 #. type: Plain text
11086 #: build/C/man7/pthreads.7:788
11087 msgid ""
11088 "Threads have distinct alternate signal stack settings.  However, a new "
11089 "thread's alternate signal stack settings are copied from the thread that "
11090 "created it, so that the threads initially share an alternate signal stack.  "
11091 "(A new thread should start with no alternate signal stack defined.  If two "
11092 "threads handle signals on their shared alternate signal stack at the same "
11093 "time, unpredictable program failures are likely to occur.)"
11094 msgstr ""
11095 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11096 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11097 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11098 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11099 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11100 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11101
11102 #. type: SS
11103 #: build/C/man7/pthreads.7:788
11104 #, no-wrap
11105 msgid "NPTL"
11106 msgstr "NPTL"
11107
11108 #. type: Plain text
11109 #: build/C/man7/pthreads.7:797
11110 msgid ""
11111 "With NPTL, all of the threads in a process are placed in the same thread "
11112 "group; all members of a thread group share the same PID.  NPTL does not "
11113 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11114 "signals (see also B<signal>(7)); these signals cannot be used in "
11115 "applications."
11116 msgstr ""
11117 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11118 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11119 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11120 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11121 "ションでは使用できない。"
11122
11123 #. type: Plain text
11124 #: build/C/man7/pthreads.7:799
11125 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11126 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11127
11128 #. type: Plain text
11129 #: build/C/man7/pthreads.7:808
11130 msgid "Some NPTL nonconformances occur only with older kernels:"
11131 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11132
11133 #. type: Plain text
11134 #: build/C/man7/pthreads.7:814
11135 msgid ""
11136 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11137 "rather than process-wide (fixed in kernel 2.6.9)."
11138 msgstr ""
11139 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11140 "単位の情報である (カーネル 2.6.9 で修正された)。"
11141
11142 #. type: Plain text
11143 #: build/C/man7/pthreads.7:816
11144 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11145 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11146
11147 #. type: Plain text
11148 #: build/C/man7/pthreads.7:818
11149 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11150 msgstr ""
11151 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11152
11153 #. type: Plain text
11154 #: build/C/man7/pthreads.7:822
11155 msgid ""
11156 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11157 "(fixed in kernel 2.6.16)."
11158 msgstr ""
11159 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11160 "きる (カーネル 2.6.16 で修正された)。"
11161
11162 #. type: Plain text
11163 #: build/C/man7/pthreads.7:827
11164 msgid ""
11165 "Only the main thread is permitted to make the process into a process group "
11166 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11167 msgstr ""
11168 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11169 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11170
11171 #. type: Plain text
11172 #: build/C/man7/pthreads.7:833
11173 msgid ""
11174 "Threads have distinct alternate signal stack settings.  However, a new "
11175 "thread's alternate signal stack settings are copied from the thread that "
11176 "created it, so that the threads initially share an alternate signal stack "
11177 "(fixed in kernel 2.6.16)."
11178 msgstr ""
11179 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11180 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11181 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11182 "ル 2.6.16 で修正された)。"
11183
11184 #. type: Plain text
11185 #: build/C/man7/pthreads.7:835
11186 msgid "Note the following further points about the NPTL implementation:"
11187 msgstr "NPTL の実装では以下の点についても注意すること:"
11188
11189 #. type: Plain text
11190 #: build/C/man7/pthreads.7:849
11191 msgid ""
11192 "If the stack size soft resource limit (see the description of "
11193 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11194 "I<unlimited>, then this value defines the default stack size for new "
11195 "threads.  To be effective, this limit must be set before the program is "
11196 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11197 "stacksize> in the C shell)."
11198 msgstr ""
11199 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11200 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11201 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11202 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11203 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11204 "は I<limit stacksize>)  を使って設定する。"
11205
11206 #. type: SS
11207 #: build/C/man7/pthreads.7:849
11208 #, no-wrap
11209 msgid "Determining the threading implementation"
11210 msgstr "スレッド実装の判定"
11211
11212 #. type: Plain text
11213 #: build/C/man7/pthreads.7:854
11214 msgid ""
11215 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11216 "system's threading implementation, for example:"
11217 msgstr ""
11218 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11219 "装を判定することができる。 以下に例を示す:"
11220
11221 #. type: Plain text
11222 #: build/C/man7/pthreads.7:859
11223 #, no-wrap
11224 msgid ""
11225 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11226 "NPTL 2.3.4\n"
11227 msgstr ""
11228 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11229 "NPTL 2.3.4\n"
11230
11231 #. type: Plain text
11232 #: build/C/man7/pthreads.7:864
11233 msgid ""
11234 "With older glibc versions, a command such as the following should be "
11235 "sufficient to determine the default threading implementation:"
11236 msgstr ""
11237 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11238 "ド実装を判定することができる。"
11239
11240 #. type: Plain text
11241 #: build/C/man7/pthreads.7:870
11242 #, no-wrap
11243 msgid ""
11244 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11245 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11246 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11247 msgstr ""
11248 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11249 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11250 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11251
11252 #. type: SS
11253 #: build/C/man7/pthreads.7:872
11254 #, no-wrap
11255 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11256 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11257
11258 #. type: Plain text
11259 #: build/C/man7/pthreads.7:887
11260 msgid ""
11261 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11262 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11263 "override the dynamic linker's default choice of threading implementation.  "
11264 "This variable tells the dynamic linker to assume that it is running on top "
11265 "of a particular kernel version.  By specifying a kernel version that does "
11266 "not provide the support required by NPTL, we can force the use of "
11267 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11268 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11269 "For example:"
11270 msgstr ""
11271 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11272 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11273 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11274 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11275 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11276 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11277 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11278 "ン を動作させる場合だろう)。 以下に例を示す:"
11279
11280 #. type: Plain text
11281 #: build/C/man7/pthreads.7:893
11282 #, no-wrap
11283 msgid ""
11284 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11285 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11286 "        linuxthreads-0.10 by Xavier Leroy\n"
11287 msgstr ""
11288 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11289 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11290 "        linuxthreads-0.10 by Xavier Leroy\n"
11291
11292 #. type: Plain text
11293 #: build/C/man7/pthreads.7:905
11294 msgid ""
11295 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11296 "(7), B<signal>(7),"
11297 msgstr ""
11298 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11299 "B<signal>(7),"
11300
11301 #. type: Plain text
11302 #: build/C/man7/pthreads.7:929
11303 msgid ""
11304 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11305 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11306 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11307 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11308 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11309 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11310 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11311 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11312 msgstr ""
11313 "pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11314 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11315 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11316 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11317 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11318 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11319 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11320 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11321 "and B<pthread_testcancel>(3)"