OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.50.
[linuxjm/LDP_man-pages.git] / po4a / pthread / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-03-22 01:06+0900\n"
10 "PO-Revision-Date: 2012-06-04 23:34+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/getcontext.3:25
20 #, no-wrap
21 msgid "GETCONTEXT"
22 msgstr "GETCONTEXT"
23
24 #. type: TH
25 #: build/C/man3/getcontext.3:25
26 #, no-wrap
27 msgid "2009-03-15"
28 msgstr "2009-03-15"
29
30 #. type: TH
31 #: build/C/man3/getcontext.3:25 build/C/man3/pthread_attr_init.3:26
32 #: build/C/man3/pthread_attr_setaffinity_np.3:26
33 #: build/C/man3/pthread_attr_setdetachstate.3:26
34 #: build/C/man3/pthread_attr_setguardsize.3:26
35 #: build/C/man3/pthread_attr_setinheritsched.3:26
36 #: build/C/man3/pthread_attr_setschedparam.3:26
37 #: build/C/man3/pthread_attr_setschedpolicy.3:26
38 #: build/C/man3/pthread_attr_setscope.3:26
39 #: build/C/man3/pthread_attr_setstack.3:26
40 #: build/C/man3/pthread_attr_setstackaddr.3:26
41 #: build/C/man3/pthread_attr_setstacksize.3:26
42 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
43 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
44 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
45 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
46 #: build/C/man3/pthread_getattr_np.3:26
47 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
48 #: build/C/man3/pthread_kill.3:26
49 #: build/C/man3/pthread_kill_other_threads_np.3:26
50 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
51 #: build/C/man3/pthread_setcancelstate.3:26
52 #: build/C/man3/pthread_setconcurrency.3:25
53 #: build/C/man3/pthread_setname_np.3:26
54 #: build/C/man3/pthread_setschedparam.3:26
55 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
56 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
57 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
58 #: build/C/man7/pthreads.7:26
59 #, no-wrap
60 msgid "Linux"
61 msgstr "Linux"
62
63 #. type: TH
64 #: build/C/man3/getcontext.3:25 build/C/man3/makecontext.3:28
65 #: build/C/man3/pthread_attr_init.3:26
66 #: build/C/man3/pthread_attr_setaffinity_np.3:26
67 #: build/C/man3/pthread_attr_setdetachstate.3:26
68 #: build/C/man3/pthread_attr_setguardsize.3:26
69 #: build/C/man3/pthread_attr_setinheritsched.3:26
70 #: build/C/man3/pthread_attr_setschedparam.3:26
71 #: build/C/man3/pthread_attr_setschedpolicy.3:26
72 #: build/C/man3/pthread_attr_setscope.3:26
73 #: build/C/man3/pthread_attr_setstack.3:26
74 #: build/C/man3/pthread_attr_setstackaddr.3:26
75 #: build/C/man3/pthread_attr_setstacksize.3:26
76 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_cleanup_push.3:26
77 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
78 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_detach.3:26
79 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
80 #: build/C/man3/pthread_getattr_np.3:26
81 #: build/C/man3/pthread_getcpuclockid.3:26 build/C/man3/pthread_join.3:26
82 #: build/C/man3/pthread_kill.3:26
83 #: build/C/man3/pthread_kill_other_threads_np.3:26
84 #: build/C/man3/pthread_self.3:26 build/C/man3/pthread_setaffinity_np.3:26
85 #: build/C/man3/pthread_setcancelstate.3:26
86 #: build/C/man3/pthread_setconcurrency.3:25
87 #: build/C/man3/pthread_setname_np.3:26
88 #: build/C/man3/pthread_setschedparam.3:26
89 #: build/C/man3/pthread_setschedprio.3:26 build/C/man3/pthread_sigmask.3:26
90 #: build/C/man3/pthread_sigqueue.3:25 build/C/man3/pthread_testcancel.3:26
91 #: build/C/man3/pthread_tryjoin_np.3:26 build/C/man3/pthread_yield.3:25
92 #: build/C/man7/pthreads.7:26
93 #, no-wrap
94 msgid "Linux Programmer's Manual"
95 msgstr "Linux Programmer's Manual"
96
97 #. type: SH
98 #: build/C/man3/getcontext.3:26 build/C/man3/makecontext.3:29
99 #: build/C/man3/pthread_attr_init.3:27
100 #: build/C/man3/pthread_attr_setaffinity_np.3:27
101 #: build/C/man3/pthread_attr_setdetachstate.3:27
102 #: build/C/man3/pthread_attr_setguardsize.3:27
103 #: build/C/man3/pthread_attr_setinheritsched.3:27
104 #: build/C/man3/pthread_attr_setschedparam.3:27
105 #: build/C/man3/pthread_attr_setschedpolicy.3:27
106 #: build/C/man3/pthread_attr_setscope.3:27
107 #: build/C/man3/pthread_attr_setstack.3:27
108 #: build/C/man3/pthread_attr_setstackaddr.3:27
109 #: build/C/man3/pthread_attr_setstacksize.3:27
110 #: build/C/man3/pthread_cancel.3:27 build/C/man3/pthread_cleanup_push.3:27
111 #: build/C/man3/pthread_cleanup_push_defer_np.3:27
112 #: build/C/man3/pthread_create.3:27 build/C/man3/pthread_detach.3:27
113 #: build/C/man3/pthread_equal.3:27 build/C/man3/pthread_exit.3:27
114 #: build/C/man3/pthread_getattr_np.3:27
115 #: build/C/man3/pthread_getcpuclockid.3:27 build/C/man3/pthread_join.3:27
116 #: build/C/man3/pthread_kill.3:27
117 #: build/C/man3/pthread_kill_other_threads_np.3:27
118 #: build/C/man3/pthread_self.3:27 build/C/man3/pthread_setaffinity_np.3:27
119 #: build/C/man3/pthread_setcancelstate.3:27
120 #: build/C/man3/pthread_setconcurrency.3:26
121 #: build/C/man3/pthread_setname_np.3:27
122 #: build/C/man3/pthread_setschedparam.3:27
123 #: build/C/man3/pthread_setschedprio.3:27 build/C/man3/pthread_sigmask.3:27
124 #: build/C/man3/pthread_sigqueue.3:26 build/C/man3/pthread_testcancel.3:27
125 #: build/C/man3/pthread_tryjoin_np.3:27 build/C/man3/pthread_yield.3:26
126 #: build/C/man7/pthreads.7:27
127 #, no-wrap
128 msgid "NAME"
129 msgstr "名前"
130
131 #. type: Plain text
132 #: build/C/man3/getcontext.3:28
133 msgid "getcontext, setcontext - get or set the user context"
134 msgstr "getcontext, setcontext - ユーザコンテキストを取得/設定する"
135
136 #. type: SH
137 #: build/C/man3/getcontext.3:28 build/C/man3/makecontext.3:31
138 #: build/C/man3/pthread_attr_init.3:30
139 #: build/C/man3/pthread_attr_setaffinity_np.3:30
140 #: build/C/man3/pthread_attr_setdetachstate.3:30
141 #: build/C/man3/pthread_attr_setguardsize.3:30
142 #: build/C/man3/pthread_attr_setinheritsched.3:30
143 #: build/C/man3/pthread_attr_setschedparam.3:30
144 #: build/C/man3/pthread_attr_setschedpolicy.3:30
145 #: build/C/man3/pthread_attr_setscope.3:30
146 #: build/C/man3/pthread_attr_setstack.3:30
147 #: build/C/man3/pthread_attr_setstackaddr.3:30
148 #: build/C/man3/pthread_attr_setstacksize.3:30
149 #: build/C/man3/pthread_cancel.3:29 build/C/man3/pthread_cleanup_push.3:30
150 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
151 #: build/C/man3/pthread_create.3:29 build/C/man3/pthread_detach.3:29
152 #: build/C/man3/pthread_equal.3:29 build/C/man3/pthread_exit.3:29
153 #: build/C/man3/pthread_getattr_np.3:29
154 #: build/C/man3/pthread_getcpuclockid.3:29 build/C/man3/pthread_join.3:29
155 #: build/C/man3/pthread_kill.3:29
156 #: build/C/man3/pthread_kill_other_threads_np.3:29
157 #: build/C/man3/pthread_self.3:29 build/C/man3/pthread_setaffinity_np.3:30
158 #: build/C/man3/pthread_setcancelstate.3:30
159 #: build/C/man3/pthread_setconcurrency.3:29
160 #: build/C/man3/pthread_setname_np.3:29
161 #: build/C/man3/pthread_setschedparam.3:30
162 #: build/C/man3/pthread_setschedprio.3:29 build/C/man3/pthread_sigmask.3:29
163 #: build/C/man3/pthread_sigqueue.3:28 build/C/man3/pthread_testcancel.3:29
164 #: build/C/man3/pthread_tryjoin_np.3:30 build/C/man3/pthread_yield.3:28
165 #, no-wrap
166 msgid "SYNOPSIS"
167 msgstr "書式"
168
169 #. type: Plain text
170 #: build/C/man3/getcontext.3:30 build/C/man3/makecontext.3:33
171 msgid "B<#include E<lt>ucontext.hE<gt>>"
172 msgstr "B<#include E<lt>ucontext.hE<gt>>"
173
174 #. type: Plain text
175 #: build/C/man3/getcontext.3:32
176 msgid "B<int getcontext(ucontext_t *>I<ucp>B<);>"
177 msgstr "B<int getcontext(ucontext_t *>I<ucp>B<);>"
178
179 #. type: Plain text
180 #: build/C/man3/getcontext.3:34
181 msgid "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
182 msgstr "B<int setcontext(const ucontext_t *>I<ucp>B<);>"
183
184 #. type: SH
185 #: build/C/man3/getcontext.3:34 build/C/man3/makecontext.3:38
186 #: build/C/man3/pthread_attr_init.3:39
187 #: build/C/man3/pthread_attr_setaffinity_np.3:42
188 #: build/C/man3/pthread_attr_setdetachstate.3:41
189 #: build/C/man3/pthread_attr_setguardsize.3:41
190 #: build/C/man3/pthread_attr_setinheritsched.3:41
191 #: build/C/man3/pthread_attr_setschedparam.3:41
192 #: build/C/man3/pthread_attr_setschedpolicy.3:41
193 #: build/C/man3/pthread_attr_setscope.3:41
194 #: build/C/man3/pthread_attr_setstack.3:54
195 #: build/C/man3/pthread_attr_setstackaddr.3:41
196 #: build/C/man3/pthread_attr_setstacksize.3:41
197 #: build/C/man3/pthread_cancel.3:37 build/C/man3/pthread_cleanup_push.3:40
198 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
199 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
200 #: build/C/man3/pthread_equal.3:37 build/C/man3/pthread_exit.3:37
201 #: build/C/man3/pthread_getattr_np.3:38
202 #: build/C/man3/pthread_getcpuclockid.3:38 build/C/man3/pthread_join.3:37
203 #: build/C/man3/pthread_kill.3:37
204 #: build/C/man3/pthread_kill_other_threads_np.3:35
205 #: build/C/man3/pthread_self.3:37 build/C/man3/pthread_setaffinity_np.3:42
206 #: build/C/man3/pthread_setcancelstate.3:39
207 #: build/C/man3/pthread_setconcurrency.3:38
208 #: build/C/man3/pthread_setname_np.3:39
209 #: build/C/man3/pthread_setschedparam.3:41
210 #: build/C/man3/pthread_setschedprio.3:37 build/C/man3/pthread_sigmask.3:38
211 #: build/C/man3/pthread_sigqueue.3:45 build/C/man3/pthread_testcancel.3:37
212 #: build/C/man3/pthread_tryjoin_np.3:42 build/C/man3/pthread_yield.3:37
213 #: build/C/man7/pthreads.7:29
214 #, no-wrap
215 msgid "DESCRIPTION"
216 msgstr "説明"
217
218 #. type: Plain text
219 #: build/C/man3/getcontext.3:46
220 msgid ""
221 "In a System V-like environment, one has the two types I<mcontext_t> and "
222 "I<ucontext_t> defined in I<E<lt>ucontext.hE<gt>> and the four functions "
223 "B<getcontext>(), B<setcontext>(), B<makecontext>(3)  and B<swapcontext>(3)  "
224 "that allow user-level context switching between multiple threads of control "
225 "within a process."
226 msgstr ""
227 "System V 的な環境では、 I<mcontext_t> および I<ucontext_t> という 2 つの型"
228 "と、 B<getcontext>(), B<setcontext>(), B<makecontext>(3), B<swapcontext>(3)  "
229 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
230 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
231 "ようになっている。"
232
233 #. type: Plain text
234 #: build/C/man3/getcontext.3:50
235 msgid ""
236 "The I<mcontext_t> type is machine-dependent and opaque.  The I<ucontext_t> "
237 "type is a structure that has at least the following fields:"
238 msgstr ""
239 "I<mcontext_t> 型はマシン依存で、外部からは隠蔽されている。 I<ucontext_t> 型は"
240 "構造体で、少なくとも以下の 4 つのフィールドを持つ。"
241
242 #. type: Plain text
243 #: build/C/man3/getcontext.3:60
244 #, no-wrap
245 msgid ""
246 "typedef struct ucontext {\n"
247 "    struct ucontext *uc_link;\n"
248 "    sigset_t         uc_sigmask;\n"
249 "    stack_t          uc_stack;\n"
250 "    mcontext_t       uc_mcontext;\n"
251 "    ...\n"
252 "} ucontext_t;\n"
253 msgstr ""
254 "typedef struct ucontext {\n"
255 "    struct ucontext *uc_link;\n"
256 "    sigset_t         uc_sigmask;\n"
257 "    stack_t          uc_stack;\n"
258 "    mcontext_t       uc_mcontext;\n"
259 "    ...\n"
260 "} ucontext_t;\n"
261
262 #. type: Plain text
263 #: build/C/man3/getcontext.3:77
264 msgid ""
265 "with I<sigset_t> and I<stack_t> defined in I<E<lt>signal.hE<gt>>.  Here "
266 "I<uc_link> points to the context that will be resumed when the current "
267 "context terminates (in case the current context was created using "
268 "B<makecontext>(3)), I<uc_sigmask> is the set of signals blocked in this "
269 "context (see B<sigprocmask>(2)), I<uc_stack> is the stack used by this "
270 "context (see B<sigaltstack>(2)), and I<uc_mcontext> is the machine-specific "
271 "representation of the saved context, that includes the calling thread's "
272 "machine registers."
273 msgstr ""
274 "I<sigset_t> と I<stack_t> は I<E<lt>signal.hE<gt>> で定義されている。 ここで "
275 "I<uc_link> は、 現在のコンテキストが終了したとき、 続いて切り替わるコンテキス"
276 "トへのポインタである (現在のコンテキストが B<makecontext>(3)  で生成されたも"
277 "のの場合)。 I<uc_sigmask> はこのコンテキストでブロックされている シグナル群で"
278 "ある (B<sigprocmask>(2)  を見よ)。 I<uc_stack> はこのコンテキストが用いている"
279 "スタックである (B<signalstack>(2)  を見よ)。 I<uc_mcontext> は保存されている"
280 "コンテキストの マシン特有の表現形式であり、 ここには呼び出したスレッドのマシ"
281 "ンレジスタが格納される。"
282
283 #. type: Plain text
284 #: build/C/man3/getcontext.3:82
285 msgid ""
286 "The function B<getcontext>()  initializes the structure pointed at by I<ucp> "
287 "to the currently active context."
288 msgstr ""
289 "B<getcontext>()  関数は、 ポインタ I<ucp> が指す構造体を、 現在アクティブなコ"
290 "ンテキストに初期化する。"
291
292 #. type: Plain text
293 #: build/C/man3/getcontext.3:94
294 msgid ""
295 "The function B<setcontext>()  restores the user context pointed at by "
296 "I<ucp>.  A successful call does not return.  The context should have been "
297 "obtained by a call of B<getcontext>(), or B<makecontext>(3), or passed as "
298 "third argument to a signal handler."
299 msgstr ""
300 "B<setcontext>()  関数は、ポインタ I<ucp> が指すユーザコンテキストをリストアす"
301 "る。 呼び出しに成功すると返らない。 このコンテキストは、以前に B<getcontext>"
302 "()  または B<makecontext>(3)  で得られたものか、 あるいはシグナルの第三引数と"
303 "して与えられたものになる。"
304
305 #. type: Plain text
306 #: build/C/man3/getcontext.3:98
307 msgid ""
308 "If the context was obtained by a call of B<getcontext>(), program execution "
309 "continues as if this call just returned."
310 msgstr ""
311 "コンテキストが B<getcontext>()  の呼び出しによって得られていたものの場合は、 "
312 "プログラムはこの呼び出しから返った直後からのように実行を継続する。"
313
314 #. type: Plain text
315 #: build/C/man3/getcontext.3:109
316 msgid ""
317 "If the context was obtained by a call of B<makecontext>(3), program "
318 "execution continues by a call to the function I<func> specified as the "
319 "second argument of that call to B<makecontext>(3).  When the function "
320 "I<func> returns, we continue with the I<uc_link> member of the structure "
321 "I<ucp> specified as the first argument of that call to B<makecontext>(3).  "
322 "When this member is NULL, the thread exits."
323 msgstr ""
324 "コンテキストが B<makecontext>(3)  の呼び出しによって得られていたものの場合"
325 "は、 プログラムの実行はその B<makecontext>(3)  呼び出しの第二引数で指定された"
326 "関数 I<func> を呼び出すかたちで継続する。 I<func> から返ると、 B<makecontext>"
327 "(3)  呼び出しの第一引数で指定されていた I<ucp> 構造体の I<uc_link> メンバで継"
328 "続する。 このメンバが NULL だった場合は、そのスレッドは終了する。"
329
330 #. type: Plain text
331 #: build/C/man3/getcontext.3:116
332 msgid ""
333 "If the context was obtained by a call to a signal handler, then old standard "
334 "text says that \"program execution continues with the program instruction "
335 "following the instruction interrupted by the signal\".  However, this "
336 "sentence was removed in SUSv2, and the present verdict is \"the result is "
337 "unspecified\"."
338 msgstr ""
339 "コンテキストがシグナルハンドラの呼び出しによって得られていたものの場合は、 古"
340 "い標準によれば 「プログラムの実行はシグナルによって割り込まれた命令の次の命令"
341 "から継続される」。 しかしこの文は SUSv2 で削除されたので、 現在の判断は「結果"
342 "は定義されていない」である。"
343
344 #. type: SH
345 #: build/C/man3/getcontext.3:116 build/C/man3/makecontext.3:84
346 #: build/C/man3/pthread_attr_init.3:68
347 #: build/C/man3/pthread_attr_setaffinity_np.3:76
348 #: build/C/man3/pthread_attr_setdetachstate.3:77
349 #: build/C/man3/pthread_attr_setguardsize.3:90
350 #: build/C/man3/pthread_attr_setinheritsched.3:84
351 #: build/C/man3/pthread_attr_setschedparam.3:74
352 #: build/C/man3/pthread_attr_setschedpolicy.3:72
353 #: build/C/man3/pthread_attr_setscope.3:91
354 #: build/C/man3/pthread_attr_setstack.3:85
355 #: build/C/man3/pthread_attr_setstackaddr.3:74
356 #: build/C/man3/pthread_attr_setstacksize.3:61
357 #: build/C/man3/pthread_cancel.3:109 build/C/man3/pthread_cleanup_push.3:119
358 #: build/C/man3/pthread_create.3:115 build/C/man3/pthread_detach.3:49
359 #: build/C/man3/pthread_equal.3:41 build/C/man3/pthread_exit.3:71
360 #: build/C/man3/pthread_getattr_np.3:73
361 #: build/C/man3/pthread_getcpuclockid.3:46 build/C/man3/pthread_join.3:70
362 #: build/C/man3/pthread_kill.3:52 build/C/man3/pthread_self.3:46
363 #: build/C/man3/pthread_setaffinity_np.3:77
364 #: build/C/man3/pthread_setcancelstate.3:92
365 #: build/C/man3/pthread_setconcurrency.3:56
366 #: build/C/man3/pthread_setname_np.3:72
367 #: build/C/man3/pthread_setschedparam.3:104
368 #: build/C/man3/pthread_setschedprio.3:53 build/C/man3/pthread_sigmask.3:49
369 #: build/C/man3/pthread_sigqueue.3:65 build/C/man3/pthread_testcancel.3:50
370 #: build/C/man3/pthread_tryjoin_np.3:85 build/C/man3/pthread_yield.3:44
371 #, no-wrap
372 msgid "RETURN VALUE"
373 msgstr "返り値"
374
375 #. type: Plain text
376 #: build/C/man3/getcontext.3:124
377 msgid ""
378 "When successful, B<getcontext>()  returns 0 and B<setcontext>()  does not "
379 "return.  On error, both return -1 and set I<errno> appropriately."
380 msgstr ""
381 "成功すると、 B<getcontext>()  は 0 を返し、 B<setcontext>()  は返らない。 失"
382 "敗すると、両者とも -1 を返し、I<errno> をエラーに応じて設定する。"
383
384 #. type: SH
385 #: build/C/man3/getcontext.3:124 build/C/man3/makecontext.3:96
386 #: build/C/man3/pthread_attr_init.3:71
387 #: build/C/man3/pthread_attr_setaffinity_np.3:79
388 #: build/C/man3/pthread_attr_setdetachstate.3:80
389 #: build/C/man3/pthread_attr_setguardsize.3:93
390 #: build/C/man3/pthread_attr_setinheritsched.3:87
391 #: build/C/man3/pthread_attr_setschedparam.3:77
392 #: build/C/man3/pthread_attr_setschedpolicy.3:75
393 #: build/C/man3/pthread_attr_setscope.3:94
394 #: build/C/man3/pthread_attr_setstack.3:88
395 #: build/C/man3/pthread_attr_setstackaddr.3:77
396 #: build/C/man3/pthread_attr_setstacksize.3:64
397 #: build/C/man3/pthread_cancel.3:114 build/C/man3/pthread_cleanup_push.3:121
398 #: build/C/man3/pthread_create.3:122 build/C/man3/pthread_detach.3:54
399 #: build/C/man3/pthread_equal.3:45 build/C/man3/pthread_exit.3:73
400 #: build/C/man3/pthread_getattr_np.3:76
401 #: build/C/man3/pthread_getcpuclockid.3:49 build/C/man3/pthread_join.3:75
402 #: build/C/man3/pthread_kill.3:57 build/C/man3/pthread_self.3:48
403 #: build/C/man3/pthread_setaffinity_np.3:80
404 #: build/C/man3/pthread_setcancelstate.3:95
405 #: build/C/man3/pthread_setconcurrency.3:68
406 #: build/C/man3/pthread_setname_np.3:75
407 #: build/C/man3/pthread_setschedparam.3:112
408 #: build/C/man3/pthread_setschedprio.3:61 build/C/man3/pthread_sigmask.3:54
409 #: build/C/man3/pthread_sigqueue.3:70 build/C/man3/pthread_testcancel.3:54
410 #: build/C/man3/pthread_tryjoin_np.3:89 build/C/man3/pthread_yield.3:49
411 #, no-wrap
412 msgid "ERRORS"
413 msgstr "エラー"
414
415 #. type: Plain text
416 #: build/C/man3/getcontext.3:126
417 msgid "None defined."
418 msgstr "定義されていない。"
419
420 #. type: SH
421 #: build/C/man3/getcontext.3:126 build/C/man3/makecontext.3:105
422 #: build/C/man3/pthread_attr_init.3:79
423 #: build/C/man3/pthread_attr_setaffinity_np.3:108
424 #: build/C/man3/pthread_attr_setdetachstate.3:87
425 #: build/C/man3/pthread_attr_setguardsize.3:106
426 #: build/C/man3/pthread_attr_setinheritsched.3:101
427 #: build/C/man3/pthread_attr_setschedparam.3:89
428 #: build/C/man3/pthread_attr_setschedpolicy.3:89
429 #: build/C/man3/pthread_attr_setscope.3:107
430 #: build/C/man3/pthread_attr_setstack.3:112
431 #: build/C/man3/pthread_attr_setstackaddr.3:83
432 #: build/C/man3/pthread_attr_setstacksize.3:83
433 #: build/C/man3/pthread_cancel.3:122 build/C/man3/pthread_cleanup_push.3:125
434 #: build/C/man3/pthread_cleanup_push_defer_np.3:101
435 #: build/C/man3/pthread_create.3:146 build/C/man3/pthread_detach.3:64
436 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
437 #: build/C/man3/pthread_getattr_np.3:98
438 #: build/C/man3/pthread_getcpuclockid.3:65 build/C/man3/pthread_join.3:98
439 #: build/C/man3/pthread_kill.3:66
440 #: build/C/man3/pthread_kill_other_threads_np.3:47
441 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_setaffinity_np.3:121
442 #: build/C/man3/pthread_setcancelstate.3:113
443 #: build/C/man3/pthread_setconcurrency.3:83
444 #: build/C/man3/pthread_setname_np.3:102
445 #: build/C/man3/pthread_setschedparam.3:141
446 #: build/C/man3/pthread_setschedprio.3:83 build/C/man3/pthread_sigmask.3:57
447 #: build/C/man3/pthread_sigqueue.3:93 build/C/man3/pthread_testcancel.3:58
448 #: build/C/man3/pthread_tryjoin_np.3:112 build/C/man3/pthread_yield.3:53
449 #, no-wrap
450 msgid "CONFORMING TO"
451 msgstr "準拠"
452
453 #. type: Plain text
454 #: build/C/man3/getcontext.3:132
455 msgid ""
456 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specification of B<getcontext>"
457 "(), citing portability issues, and recommending that applications be "
458 "rewritten to use POSIX threads instead."
459 msgstr ""
460 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<getcontext>()  の"
461 "仕様が削除された。 代わりに、アプリケーションを POSIX スレッドを使って書き直"
462 "すことが 推奨されている。"
463
464 #. type: SH
465 #: build/C/man3/getcontext.3:132 build/C/man3/makecontext.3:113
466 #: build/C/man3/pthread_attr_init.3:81
467 #: build/C/man3/pthread_attr_setaffinity_np.3:111
468 #: build/C/man3/pthread_attr_setdetachstate.3:89
469 #: build/C/man3/pthread_attr_setguardsize.3:108
470 #: build/C/man3/pthread_attr_setschedparam.3:91
471 #: build/C/man3/pthread_attr_setscope.3:109
472 #: build/C/man3/pthread_attr_setstack.3:114
473 #: build/C/man3/pthread_attr_setstackaddr.3:86
474 #: build/C/man3/pthread_attr_setstacksize.3:85
475 #: build/C/man3/pthread_cancel.3:124 build/C/man3/pthread_cleanup_push.3:127
476 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
477 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
478 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
479 #: build/C/man3/pthread_kill.3:68
480 #: build/C/man3/pthread_kill_other_threads_np.3:50
481 #: build/C/man3/pthread_self.3:52 build/C/man3/pthread_setaffinity_np.3:124
482 #: build/C/man3/pthread_setcancelstate.3:115
483 #: build/C/man3/pthread_setconcurrency.3:85
484 #: build/C/man3/pthread_setname_np.3:104
485 #: build/C/man3/pthread_setschedparam.3:143
486 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
487 #: build/C/man3/pthread_yield.3:59
488 #, no-wrap
489 msgid "NOTES"
490 msgstr "注意"
491
492 #. type: Plain text
493 #: build/C/man3/getcontext.3:149
494 msgid ""
495 "The earliest incarnation of this mechanism was the B<setjmp>(3)/B<longjmp>"
496 "(3)  mechanism.  Since that does not define the handling of the signal "
497 "context, the next stage was the B<sigsetjmp>(3)/B<siglongjmp>(3)  pair.  The "
498 "present mechanism gives much more control.  On the other hand, there is no "
499 "easy way to detect whether a return from B<getcontext>()  is from the first "
500 "call, or via a B<setcontext>()  call.  The user has to invent her own "
501 "bookkeeping device, and a register variable won't do since registers are "
502 "restored."
503 msgstr ""
504 "このメカニズムの最古の実装は、 B<setjmp>(3)/B<longjmp>(3)  機構であった。 こ"
505 "れらにはシグナルコンテキストの取り扱いが定義されていなかったので、 次の段階で"
506 "は B<sigsetjmp>(3)/B<siglongjmp>(3)  のペアが現われた。 現在の機構ではずっと"
507 "細かな制御ができる。 一方 B<getcontext>()  から返ったとき、 これが最初の呼び"
508 "出しであったか、 それとも B<setcontext>()  呼び出しからのものであるかを 区別"
509 "する容易な方法がなくなってしまった。 ユーザは「しおり」機構を自分で作らなけれ"
510 "ばならない。 レジスタ変数は (レジスタはリストアされてしまうので) これをやって"
511 "くれない。"
512
513 #. type: Plain text
514 #: build/C/man3/getcontext.3:160
515 msgid ""
516 "When a signal occurs, the current user context is saved and a new context is "
517 "created by the kernel for the signal handler.  Do not leave the handler "
518 "using B<longjmp>(3): it is undefined what would happen with contexts.  Use "
519 "B<siglongjmp>(3)  or B<setcontext>()  instead."
520 msgstr ""
521 "シグナルが発生すると、 現在のユーザコンテキストは保存され、 シグナルハンドラ"
522 "用のコンテキストがカーネルによって生成される。 今後はハンドラに B<longjmp>"
523 "(3)  を使わせないこと: この関数のコンテキスト下での動作は定義されていない。 "
524 "代わりに B<siglongjmp>(3)  か B<setcontext>()  を使うこと。"
525
526 #. type: SH
527 #: build/C/man3/getcontext.3:160 build/C/man3/makecontext.3:220
528 #: build/C/man3/pthread_attr_init.3:297
529 #: build/C/man3/pthread_attr_setaffinity_np.3:118
530 #: build/C/man3/pthread_attr_setdetachstate.3:111
531 #: build/C/man3/pthread_attr_setguardsize.3:158
532 #: build/C/man3/pthread_attr_setinheritsched.3:122
533 #: build/C/man3/pthread_attr_setschedparam.3:98
534 #: build/C/man3/pthread_attr_setschedpolicy.3:94
535 #: build/C/man3/pthread_attr_setscope.3:120
536 #: build/C/man3/pthread_attr_setstack.3:156
537 #: build/C/man3/pthread_attr_setstackaddr.3:110
538 #: build/C/man3/pthread_attr_setstacksize.3:111
539 #: build/C/man3/pthread_cancel.3:223 build/C/man3/pthread_cleanup_push.3:311
540 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
541 #: build/C/man3/pthread_create.3:369 build/C/man3/pthread_detach.3:97
542 #: build/C/man3/pthread_equal.3:56 build/C/man3/pthread_exit.3:105
543 #: build/C/man3/pthread_getattr_np.3:345
544 #: build/C/man3/pthread_getcpuclockid.3:169 build/C/man3/pthread_join.3:127
545 #: build/C/man3/pthread_kill.3:75
546 #: build/C/man3/pthread_kill_other_threads_np.3:66
547 #: build/C/man3/pthread_self.3:76 build/C/man3/pthread_setaffinity_np.3:206
548 #: build/C/man3/pthread_setcancelstate.3:177
549 #: build/C/man3/pthread_setconcurrency.3:100
550 #: build/C/man3/pthread_setname_np.3:198
551 #: build/C/man3/pthread_setschedparam.3:431
552 #: build/C/man3/pthread_setschedprio.3:91 build/C/man3/pthread_sigmask.3:135
553 #: build/C/man3/pthread_sigqueue.3:95 build/C/man3/pthread_testcancel.3:63
554 #: build/C/man3/pthread_tryjoin_np.3:135 build/C/man3/pthread_yield.3:62
555 #: build/C/man7/pthreads.7:895
556 #, no-wrap
557 msgid "SEE ALSO"
558 msgstr "関連項目"
559
560 #. type: Plain text
561 #: build/C/man3/getcontext.3:167
562 msgid ""
563 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
564 "B<makecontext>(3), B<sigsetjmp>(3)"
565 msgstr ""
566 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
567 "B<makecontext>(3), B<sigsetjmp>(3)"
568
569 #. type: SH
570 #: build/C/man3/getcontext.3:167 build/C/man3/makecontext.3:226
571 #: build/C/man3/pthread_attr_init.3:313
572 #: build/C/man3/pthread_attr_setaffinity_np.3:124
573 #: build/C/man3/pthread_attr_setdetachstate.3:117
574 #: build/C/man3/pthread_attr_setguardsize.3:166
575 #: build/C/man3/pthread_attr_setinheritsched.3:133
576 #: build/C/man3/pthread_attr_setschedparam.3:110
577 #: build/C/man3/pthread_attr_setschedpolicy.3:105
578 #: build/C/man3/pthread_attr_setscope.3:130
579 #: build/C/man3/pthread_attr_setstack.3:168
580 #: build/C/man3/pthread_attr_setstackaddr.3:116
581 #: build/C/man3/pthread_attr_setstacksize.3:118
582 #: build/C/man3/pthread_cancel.3:235 build/C/man3/pthread_cleanup_push.3:317
583 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
584 #: build/C/man3/pthread_create.3:382 build/C/man3/pthread_detach.3:104
585 #: build/C/man3/pthread_equal.3:60 build/C/man3/pthread_exit.3:109
586 #: build/C/man3/pthread_getattr_np.3:361
587 #: build/C/man3/pthread_getcpuclockid.3:177 build/C/man3/pthread_join.3:134
588 #: build/C/man3/pthread_kill.3:84
589 #: build/C/man3/pthread_kill_other_threads_np.3:72
590 #: build/C/man3/pthread_self.3:80 build/C/man3/pthread_setaffinity_np.3:214
591 #: build/C/man3/pthread_setcancelstate.3:182
592 #: build/C/man3/pthread_setconcurrency.3:103
593 #: build/C/man3/pthread_setname_np.3:204
594 #: build/C/man3/pthread_setschedparam.3:445
595 #: build/C/man3/pthread_setschedprio.3:105 build/C/man3/pthread_sigmask.3:144
596 #: build/C/man3/pthread_sigqueue.3:103 build/C/man3/pthread_testcancel.3:68
597 #: build/C/man3/pthread_tryjoin_np.3:140 build/C/man3/pthread_yield.3:66
598 #: build/C/man7/pthreads.7:929
599 #, no-wrap
600 msgid "COLOPHON"
601 msgstr "この文書について"
602
603 #. type: Plain text
604 #: build/C/man3/getcontext.3:174 build/C/man3/makecontext.3:233
605 #: build/C/man3/pthread_attr_init.3:320
606 #: build/C/man3/pthread_attr_setaffinity_np.3:131
607 #: build/C/man3/pthread_attr_setdetachstate.3:124
608 #: build/C/man3/pthread_attr_setguardsize.3:173
609 #: build/C/man3/pthread_attr_setinheritsched.3:140
610 #: build/C/man3/pthread_attr_setschedparam.3:117
611 #: build/C/man3/pthread_attr_setschedpolicy.3:112
612 #: build/C/man3/pthread_attr_setscope.3:137
613 #: build/C/man3/pthread_attr_setstack.3:175
614 #: build/C/man3/pthread_attr_setstackaddr.3:123
615 #: build/C/man3/pthread_attr_setstacksize.3:125
616 #: build/C/man3/pthread_cancel.3:242 build/C/man3/pthread_cleanup_push.3:324
617 #: build/C/man3/pthread_cleanup_push_defer_np.3:117
618 #: build/C/man3/pthread_create.3:389 build/C/man3/pthread_detach.3:111
619 #: build/C/man3/pthread_equal.3:67 build/C/man3/pthread_exit.3:116
620 #: build/C/man3/pthread_getattr_np.3:368
621 #: build/C/man3/pthread_getcpuclockid.3:184 build/C/man3/pthread_join.3:141
622 #: build/C/man3/pthread_kill.3:91
623 #: build/C/man3/pthread_kill_other_threads_np.3:79
624 #: build/C/man3/pthread_self.3:87 build/C/man3/pthread_setaffinity_np.3:221
625 #: build/C/man3/pthread_setcancelstate.3:189
626 #: build/C/man3/pthread_setconcurrency.3:110
627 #: build/C/man3/pthread_setname_np.3:211
628 #: build/C/man3/pthread_setschedparam.3:452
629 #: build/C/man3/pthread_setschedprio.3:112 build/C/man3/pthread_sigmask.3:151
630 #: build/C/man3/pthread_sigqueue.3:110 build/C/man3/pthread_testcancel.3:75
631 #: build/C/man3/pthread_tryjoin_np.3:147 build/C/man3/pthread_yield.3:73
632 #: build/C/man7/pthreads.7:936
633 #, fuzzy
634 #| msgid ""
635 #| "This page is part of release 3.41 of the Linux I<man-pages> project.  A "
636 #| "description of the project, and information about reporting bugs, can be "
637 #| "found at http://www.kernel.org/doc/man-pages/."
638 msgid ""
639 "This page is part of release 3.50 of the Linux I<man-pages> project.  A "
640 "description of the project, and information about reporting bugs, can be "
641 "found at http://www.kernel.org/doc/man-pages/."
642 msgstr ""
643 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.41 の一部\n"
644 "である。プロジェクトの説明とバグ報告に関する情報は\n"
645 "http://www.kernel.org/doc/man-pages/ に書かれている。"
646
647 #. type: TH
648 #: build/C/man3/makecontext.3:28
649 #, no-wrap
650 msgid "MAKECONTEXT"
651 msgstr "MAKECONTEXT"
652
653 #. type: TH
654 #: build/C/man3/makecontext.3:28
655 #, fuzzy, no-wrap
656 #| msgid "2010-02-03"
657 msgid "2013-02-12"
658 msgstr "2010-02-03"
659
660 #. type: TH
661 #: build/C/man3/makecontext.3:28
662 #, no-wrap
663 msgid "GNU"
664 msgstr "GNU"
665
666 #. type: Plain text
667 #: build/C/man3/makecontext.3:31
668 msgid "makecontext, swapcontext - manipulate user context"
669 msgstr "makecontext, swapcontext - ユーザコンテキストを操作する"
670
671 #. type: Plain text
672 #: build/C/man3/makecontext.3:36
673 msgid ""
674 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
675 ">I<argc>B<, ...);>"
676 msgstr ""
677 "B<void makecontext(ucontext_t *>I<ucp>B<, void (*>I<func>B<)(),> B<int "
678 ">I<argc>B<, ...);>"
679
680 #. type: Plain text
681 #: build/C/man3/makecontext.3:38
682 msgid "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
683 msgstr "B<int swapcontext(ucontext_t *>I<oucp>B<, ucontext_t *>I<ucp>B<);>"
684
685 #. type: Plain text
686 #: build/C/man3/makecontext.3:49
687 #, fuzzy
688 #| msgid ""
689 #| "In a System V-like environment, one has the type I<ucontext_t> defined in "
690 #| "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(2), "
691 #| "B<setcontext>(2), B<makecontext>()  and B<swapcontext>()  that allow user-"
692 #| "level context switching between multiple threads of control within a "
693 #| "process."
694 msgid ""
695 "In a System V-like environment, one has the type I<ucontext_t> defined in "
696 "I<E<lt>ucontext.hE<gt>> and the four functions B<getcontext>(3), "
697 "B<setcontext>(3), B<makecontext>()  and B<swapcontext>()  that allow user-"
698 "level context switching between multiple threads of control within a process."
699 msgstr ""
700 "System V 的な環境では、 B<mcontext_t> および B<ucontext_t> という 2 つの型"
701 "と、 B<getcontext>(2), B<setcontext>(2), B<makecontext>(), B<swapcontext>()  "
702 "という 4 つの関数が I<E<lt>ucontext.hE<gt>> で定義されており、あるプロセス内"
703 "部で制御下にある複数のスレッド間で、 ユーザレベルのコンテキスト切替えができる"
704 "ようになっている。"
705
706 #. type: Plain text
707 #: build/C/man3/makecontext.3:52
708 #, fuzzy
709 #| msgid "For the type and the first two functions, see B<getcontext>(2)."
710 msgid "For the type and the first two functions, see B<getcontext>(3)."
711 msgstr ""
712 "これらの型と、最初の 2 つの関数については、 B<getcontext>(2)  を参照のこと。"
713
714 #. type: Plain text
715 #: build/C/man3/makecontext.3:64
716 #, fuzzy
717 #| msgid ""
718 #| "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
719 #| "(which was obtained from a call to B<getcontext>(2)).  Before invoking "
720 #| "B<makecontext>(), the caller must allocate a new stack for this context "
721 #| "and assign its address to I<ucp-E<gt>uc_stack>, and define a successor "
722 #| "context and assign its address to I<ucp-E<gt>uc_link>."
723 msgid ""
724 "The B<makecontext>()  function modifies the context pointed to by I<ucp> "
725 "(which was obtained from a call to B<getcontext>(3)).  Before invoking "
726 "B<makecontext>(), the caller must allocate a new stack for this context and "
727 "assign its address to I<ucp-E<gt>uc_stack>, and define a successor context "
728 "and assign its address to I<ucp-E<gt>uc_link>."
729 msgstr ""
730 "B<makecontext>()  関数は、ポインタ I<ucp> が指すコンテキストを変更する "
731 "(I<ucp> は以前の B<getcontext>(2)  呼び出しで得られたものである)。 "
732 "B<makecontext>()  を起動する前には、呼び出し者は、このコンテキスト用に 新しい"
733 "スタックを確保し、そのアドレスを I<ucp-E<gt>uc_stack> に代入し、 さらに後継の"
734 "コンテキストを定義し、そのアドレスを I<ucp-E<gt>uc_link> に 代入しなければな"
735 "らない。"
736
737 #. type: Plain text
738 #: build/C/man3/makecontext.3:78
739 #, fuzzy
740 #| msgid ""
741 #| "When this context is later activated (using B<setcontext>(2)  or "
742 #| "B<swapcontext>())  the function I<func> is called, and passed the series "
743 #| "of integer (I<int>)  arguments that follow I<argc>; the caller must "
744 #| "specify the number of these arguments in I<argc>.  When this function "
745 #| "returns, the successor context is activated.  If the successor context "
746 #| "pointer is NULL, the thread exits."
747 msgid ""
748 "When this context is later activated (using B<setcontext>(3)  or "
749 "B<swapcontext>())  the function I<func> is called, and passed the series of "
750 "integer (I<int>)  arguments that follow I<argc>; the caller must specify the "
751 "number of these arguments in I<argc>.  When this function returns, the "
752 "successor context is activated.  If the successor context pointer is NULL, "
753 "the thread exits."
754 msgstr ""
755 "このコンテキストが将来 (B<setcontext>(2)  または B<swapcontext>()  によっ"
756 "て)  有効にされると、関数 I<func> が呼ばれ、 引き数として I<argc> 以降の整数 "
757 "(I<int>)  引き数の列が渡される。 呼び出し者は I<argc> にこれらの引き数の個数"
758 "を指定しなければならない。 この関数が戻ると、後継のコンテキストが有効にな"
759 "る。 後継コンテキストのポインタが NULL の場合、そのスレッドが終了する。"
760
761 #. type: Plain text
762 #: build/C/man3/makecontext.3:84
763 msgid ""
764 "The B<swapcontext>()  function saves the current context in the structure "
765 "pointed to by I<oucp>, and then activates the context pointed to by I<ucp>."
766 msgstr ""
767 "B<swapcontext>()  関数は現在のコンテキストを ポインタ I<oucp> が指す構造体に"
768 "保存し、 ポインタ I<ucp> が指すコンテキストを有効にする。"
769
770 #. type: Plain text
771 #: build/C/man3/makecontext.3:96
772 msgid ""
773 "When successful, B<swapcontext>()  does not return.  (But we may return "
774 "later, in case I<oucp> is activated, in which case it looks like "
775 "B<swapcontext>()  returns 0.)  On error, B<swapcontext>()  returns -1 and "
776 "sets I<errno> appropriately."
777 msgstr ""
778 "成功すると、 B<swapcontext>()  は返らない (しかし後に I<oucp> が有効になった"
779 "場合には返ることがある。 このときには B<swapcontext>()  は 0 を返すように見え"
780 "る。)  失敗すると、 B<swapcontext>()  は -1 を返し、 I<errno> をエラーに応じ"
781 "て設定する。"
782
783 #. type: TP
784 #: build/C/man3/makecontext.3:97
785 #: build/C/man3/pthread_attr_setaffinity_np.3:102
786 #: build/C/man3/pthread_getattr_np.3:77
787 #, no-wrap
788 msgid "B<ENOMEM>"
789 msgstr "B<ENOMEM>"
790
791 #. type: Plain text
792 #: build/C/man3/makecontext.3:100
793 msgid "Insufficient stack space left."
794 msgstr "スタックに割り当てる空間が残っていない。"
795
796 #. type: SH
797 #: build/C/man3/makecontext.3:100
798 #: build/C/man3/pthread_attr_setaffinity_np.3:106
799 #: build/C/man3/pthread_attr_setguardsize.3:104
800 #: build/C/man3/pthread_attr_setstack.3:110
801 #: build/C/man3/pthread_attr_setstackaddr.3:81
802 #: build/C/man3/pthread_attr_setstacksize.3:81
803 #: build/C/man3/pthread_getattr_np.3:96
804 #: build/C/man3/pthread_getcpuclockid.3:63
805 #: build/C/man3/pthread_setaffinity_np.3:119
806 #: build/C/man3/pthread_setconcurrency.3:81
807 #: build/C/man3/pthread_setname_np.3:100
808 #: build/C/man3/pthread_setschedprio.3:81 build/C/man3/pthread_sigqueue.3:89
809 #: build/C/man3/pthread_tryjoin_np.3:110
810 #, no-wrap
811 msgid "VERSIONS"
812 msgstr "バージョン"
813
814 #. type: Plain text
815 #: build/C/man3/makecontext.3:105
816 msgid ""
817 "B<makecontext>()  and B<swapcontext>()  are provided in glibc since version "
818 "2.1."
819 msgstr ""
820 "B<makecontext>()  と B<swapcontext>()  は、バージョン 2.1 以降の glibc で提供"
821 "されている。"
822
823 #. type: Plain text
824 #: build/C/man3/makecontext.3:113
825 msgid ""
826 "SUSv2, POSIX.1-2001.  POSIX.1-2008 removes the specifications of "
827 "B<makecontext>()  and B<swapcontext>(), citing portability issues, and "
828 "recommending that applications be rewritten to use POSIX threads instead."
829 msgstr ""
830 "SUSv2, POSIX.1-2001.  POSIX.1-2008 では、移植性の問題から B<makecontext>()  "
831 "と B<swapcontext>()  の仕様が削除されている。 代わりに、アプリケーションを "
832 "POSIX スレッドを使って書き直すことが 推奨されている。"
833
834 #. type: Plain text
835 #: build/C/man3/makecontext.3:121
836 msgid ""
837 "The interpretation of I<ucp-E<gt>uc_stack> is just as in B<sigaltstack>(2), "
838 "namely, this struct contains the start and length of a memory area to be "
839 "used as the stack, regardless of the direction of growth of the stack.  "
840 "Thus, it is not necessary for the user program to worry about this direction."
841 msgstr ""
842 "I<ucp-E<gt>uc_stack> の解釈は B<sigaltstack>(2)  の場合と同じである。 すなわ"
843 "ちこの構造体には、 スタックとして用いられるメモリ領域の開始アドレスと長さが含"
844 "まれ、 これはスタックが伸びる方向がどちらであるかには関係しない。 したがっ"
845 "て、ユーザプログラムはこの件については心配しなくてよい。"
846
847 #. type: Plain text
848 #: build/C/man3/makecontext.3:137
849 msgid ""
850 "On architectures where I<int> and pointer types are the same size (e.g., "
851 "x86-32, where both types are 32 bits), you may be able to get away with "
852 "passing pointers as arguments to B<makecontext>()  following I<argc>.  "
853 "However, doing this is not guaranteed to be portable, is undefined according "
854 "to the standards, and won't work on architectures where pointers are larger "
855 "than I<int>s.  Nevertheless, starting with version 2.8, glibc makes some "
856 "changes to B<makecontext>(), to permit this on some 64-bit architectures (e."
857 "g., x86-64)."
858 msgstr ""
859 "I<int> とポインタ型が同じ大きさであるアーキテクチャでは (x86-32 はその例であ"
860 "り、両方の型とも 32 ビットである)、 B<makecontext>()  の I<argc> 以降の引き数"
861 "としてポインタを渡してもうまく動くかもしれない。 しかしながら、このようにする"
862 "と、移植性は保証されず、 標準に従えば動作は未定義であり、ポインタが I<int> よ"
863 "りも大きいアーキテクチャでは正しく動作しないことだろう。 それにも関わらず、"
864 "バージョン 2.8 以降の glibc では、 B<makecontext>()  に変更が行われ、(x86-64 "
865 "などの) いくつかの 64 ビットアーキテクチャで 引き数としてポインタを渡すことが"
866 "できるようになっている。"
867
868 #. type: SH
869 #: build/C/man3/makecontext.3:137 build/C/man3/pthread_attr_init.3:87
870 #: build/C/man3/pthread_attr_setdetachstate.3:108
871 #: build/C/man3/pthread_attr_setguardsize.3:155
872 #: build/C/man3/pthread_attr_setinheritsched.3:119
873 #: build/C/man3/pthread_attr_setschedparam.3:95
874 #: build/C/man3/pthread_attr_setschedpolicy.3:91
875 #: build/C/man3/pthread_attr_setstack.3:153
876 #: build/C/man3/pthread_attr_setstacksize.3:108
877 #: build/C/man3/pthread_cancel.3:132 build/C/man3/pthread_cleanup_push.3:151
878 #: build/C/man3/pthread_create.3:202 build/C/man3/pthread_detach.3:93
879 #: build/C/man3/pthread_getattr_np.3:101
880 #: build/C/man3/pthread_getcpuclockid.3:78 build/C/man3/pthread_join.3:124
881 #: build/C/man3/pthread_setaffinity_np.3:154
882 #: build/C/man3/pthread_setcancelstate.3:174
883 #: build/C/man3/pthread_setname_np.3:112
884 #: build/C/man3/pthread_setschedparam.3:149 build/C/man3/pthread_sigmask.3:61
885 #: build/C/man3/pthread_testcancel.3:60 build/C/man3/pthread_tryjoin_np.3:115
886 #, no-wrap
887 msgid "EXAMPLE"
888 msgstr "例"
889
890 #. type: Plain text
891 #: build/C/man3/makecontext.3:145
892 #, fuzzy
893 #| msgid ""
894 #| "The example program below demonstrates the use of B<getcontext>(2), "
895 #| "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
896 #| "following output:"
897 msgid ""
898 "The example program below demonstrates the use of B<getcontext>(3), "
899 "B<makecontext>(), and B<swapcontext>().  Running the program produces the "
900 "following output:"
901 msgstr ""
902 "以下のサンプル・プログラムは、 B<getcontext>(2), B<makecontext>(), "
903 "B<swapcontext>()  の使用方法の例を示すものである。 このプログラムを実行する"
904 "と、以下のような出力が得られる:"
905
906 #. type: Plain text
907 #: build/C/man3/makecontext.3:157
908 #, no-wrap
909 msgid ""
910 "$B< ./a.out>\n"
911 "main: swapcontext(&uctx_main, &uctx_func2)\n"
912 "func2: started\n"
913 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
914 "func1: started\n"
915 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
916 "func2: returning\n"
917 "func1: returning\n"
918 "main: exiting\n"
919 msgstr ""
920 "$B< ./a.out>\n"
921 "main: swapcontext(&uctx_main, &uctx_func2)\n"
922 "func2: started\n"
923 "func2: swapcontext(&uctx_func2, &uctx_func1)\n"
924 "func1: started\n"
925 "func1: swapcontext(&uctx_func1, &uctx_func2)\n"
926 "func2: returning\n"
927 "func1: returning\n"
928 "main: exiting\n"
929
930 #. type: SS
931 #: build/C/man3/makecontext.3:159 build/C/man3/pthread_attr_init.3:148
932 #: build/C/man3/pthread_cancel.3:148 build/C/man3/pthread_cleanup_push.3:227
933 #: build/C/man3/pthread_create.3:241 build/C/man3/pthread_getattr_np.3:179
934 #: build/C/man3/pthread_getcpuclockid.3:95
935 #: build/C/man3/pthread_setname_np.3:138
936 #: build/C/man3/pthread_setschedparam.3:224 build/C/man3/pthread_sigmask.3:79
937 #, no-wrap
938 msgid "Program source"
939 msgstr "プログラムのソース"
940
941 #. type: Plain text
942 #: build/C/man3/makecontext.3:165
943 #, no-wrap
944 msgid ""
945 "#include E<lt>ucontext.hE<gt>\n"
946 "#include E<lt>stdio.hE<gt>\n"
947 "#include E<lt>stdlib.hE<gt>\n"
948 msgstr ""
949 "#include E<lt>ucontext.hE<gt>\n"
950 "#include E<lt>stdio.hE<gt>\n"
951 "#include E<lt>stdlib.hE<gt>\n"
952
953 #. type: Plain text
954 #: build/C/man3/makecontext.3:167
955 #, no-wrap
956 msgid "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
957 msgstr "static ucontext_t uctx_main, uctx_func1, uctx_func2;\n"
958
959 #. type: Plain text
960 #: build/C/man3/makecontext.3:170
961 #, no-wrap
962 msgid ""
963 "#define handle_error(msg) \\e\n"
964 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
965 msgstr ""
966 "#define handle_error(msg) \\e\n"
967 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
968
969 #. type: Plain text
970 #: build/C/man3/makecontext.3:180
971 #, no-wrap
972 msgid ""
973 "static void\n"
974 "func1(void)\n"
975 "{\n"
976 "    printf(\"func1: started\\en\");\n"
977 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
978 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
979 "        handle_error(\"swapcontext\");\n"
980 "    printf(\"func1: returning\\en\");\n"
981 "}\n"
982 msgstr ""
983 "static void\n"
984 "func1(void)\n"
985 "{\n"
986 "    printf(\"func1: started\\en\");\n"
987 "    printf(\"func1: swapcontext(&uctx_func1, &uctx_func2)\\en\");\n"
988 "    if (swapcontext(&uctx_func1, &uctx_func2) == -1)\n"
989 "        handle_error(\"swapcontext\");\n"
990 "    printf(\"func1: returning\\en\");\n"
991 "}\n"
992
993 #. type: Plain text
994 #: build/C/man3/makecontext.3:190
995 #, no-wrap
996 msgid ""
997 "static void\n"
998 "func2(void)\n"
999 "{\n"
1000 "    printf(\"func2: started\\en\");\n"
1001 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
1002 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
1003 "        handle_error(\"swapcontext\");\n"
1004 "    printf(\"func2: returning\\en\");\n"
1005 "}\n"
1006 msgstr ""
1007 "static void\n"
1008 "func2(void)\n"
1009 "{\n"
1010 "    printf(\"func2: started\\en\");\n"
1011 "    printf(\"func2: swapcontext(&uctx_func2, &uctx_func1)\\en\");\n"
1012 "    if (swapcontext(&uctx_func2, &uctx_func1) == -1)\n"
1013 "        handle_error(\"swapcontext\");\n"
1014 "    printf(\"func2: returning\\en\");\n"
1015 "}\n"
1016
1017 #. type: Plain text
1018 #: build/C/man3/makecontext.3:196
1019 #, no-wrap
1020 msgid ""
1021 "int\n"
1022 "main(int argc, char *argv[])\n"
1023 "{\n"
1024 "    char func1_stack[16384];\n"
1025 "    char func2_stack[16384];\n"
1026 msgstr ""
1027 "int\n"
1028 "main(int argc, char *argv[])\n"
1029 "{\n"
1030 "    char func1_stack[16384];\n"
1031 "    char func2_stack[16384];\n"
1032
1033 #. type: Plain text
1034 #: build/C/man3/makecontext.3:203
1035 #, no-wrap
1036 msgid ""
1037 "    if (getcontext(&uctx_func1) == -1)\n"
1038 "        handle_error(\"getcontext\");\n"
1039 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1040 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1041 "    uctx_func1.uc_link = &uctx_main;\n"
1042 "    makecontext(&uctx_func1, func1, 0);\n"
1043 msgstr ""
1044 "    if (getcontext(&uctx_func1) == -1)\n"
1045 "        handle_error(\"getcontext\");\n"
1046 "    uctx_func1.uc_stack.ss_sp = func1_stack;\n"
1047 "    uctx_func1.uc_stack.ss_size = sizeof(func1_stack);\n"
1048 "    uctx_func1.uc_link = &uctx_main;\n"
1049 "    makecontext(&uctx_func1, func1, 0);\n"
1050
1051 #. type: Plain text
1052 #: build/C/man3/makecontext.3:211
1053 #, no-wrap
1054 msgid ""
1055 "    if (getcontext(&uctx_func2) == -1)\n"
1056 "        handle_error(\"getcontext\");\n"
1057 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1058 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1059 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1060 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1061 "    makecontext(&uctx_func2, func2, 0);\n"
1062 msgstr ""
1063 "    if (getcontext(&uctx_func2) == -1)\n"
1064 "        handle_error(\"getcontext\");\n"
1065 "    uctx_func2.uc_stack.ss_sp = func2_stack;\n"
1066 "    uctx_func2.uc_stack.ss_size = sizeof(func2_stack);\n"
1067 "    /* Successor context is f1(), unless argc E<gt> 1 */\n"
1068 "    uctx_func2.uc_link = (argc E<gt> 1) ? NULL : &uctx_func1;\n"
1069 "    makecontext(&uctx_func2, func2, 0);\n"
1070
1071 #. type: Plain text
1072 #: build/C/man3/makecontext.3:215
1073 #, no-wrap
1074 msgid ""
1075 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1076 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1077 "        handle_error(\"swapcontext\");\n"
1078 msgstr ""
1079 "    printf(\"main: swapcontext(&uctx_main, &uctx_func2)\\en\");\n"
1080 "    if (swapcontext(&uctx_main, &uctx_func2) == -1)\n"
1081 "        handle_error(\"swapcontext\");\n"
1082
1083 #. type: Plain text
1084 #: build/C/man3/makecontext.3:219
1085 #, no-wrap
1086 msgid ""
1087 "    printf(\"main: exiting\\en\");\n"
1088 "    exit(EXIT_SUCCESS);\n"
1089 "}\n"
1090 msgstr ""
1091 "    printf(\"main: exiting\\en\");\n"
1092 "    exit(EXIT_SUCCESS);\n"
1093 "}\n"
1094
1095 #. type: Plain text
1096 #: build/C/man3/makecontext.3:226
1097 #, fuzzy
1098 #| msgid ""
1099 #| "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
1100 #| "B<makecontext>(3), B<sigsetjmp>(3)"
1101 msgid ""
1102 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<getcontext>(3), "
1103 "B<sigsetjmp>(3)"
1104 msgstr ""
1105 "B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), B<longjmp>(3), "
1106 "B<makecontext>(3), B<sigsetjmp>(3)"
1107
1108 #. type: TH
1109 #: build/C/man3/pthread_attr_init.3:26
1110 #, no-wrap
1111 msgid "PTHREAD_ATTR_INIT"
1112 msgstr "PTHREAD_ATTR_INIT"
1113
1114 #. type: TH
1115 #: build/C/man3/pthread_attr_init.3:26
1116 #, no-wrap
1117 msgid "2008-11-11"
1118 msgstr "2008-11-11"
1119
1120 #. type: Plain text
1121 #: build/C/man3/pthread_attr_init.3:30
1122 msgid ""
1123 "pthread_attr_init, pthread_attr_destroy - initialize and destroy thread "
1124 "attributes object"
1125 msgstr ""
1126 "pthread_attr_init, pthread_attr_destroy - \n"
1127 "スレッド属性オブジェクトの初期化と破棄を行う"
1128
1129 #. type: Plain text
1130 #: build/C/man3/pthread_attr_init.3:33
1131 #: build/C/man3/pthread_attr_setdetachstate.3:33
1132 #: build/C/man3/pthread_attr_setguardsize.3:33
1133 #: build/C/man3/pthread_attr_setinheritsched.3:33
1134 #: build/C/man3/pthread_attr_setschedparam.3:33
1135 #: build/C/man3/pthread_attr_setschedpolicy.3:33
1136 #: build/C/man3/pthread_attr_setscope.3:33
1137 #: build/C/man3/pthread_attr_setstack.3:33
1138 #: build/C/man3/pthread_attr_setstackaddr.3:33
1139 #: build/C/man3/pthread_attr_setstacksize.3:33
1140 #: build/C/man3/pthread_cancel.3:32 build/C/man3/pthread_cleanup_push.3:33
1141 #: build/C/man3/pthread_cleanup_push_defer_np.3:33
1142 #: build/C/man3/pthread_create.3:32 build/C/man3/pthread_detach.3:32
1143 #: build/C/man3/pthread_equal.3:32 build/C/man3/pthread_exit.3:32
1144 #: build/C/man3/pthread_join.3:32
1145 #: build/C/man3/pthread_kill_other_threads_np.3:32
1146 #: build/C/man3/pthread_self.3:32 build/C/man3/pthread_setcancelstate.3:33
1147 #: build/C/man3/pthread_setconcurrency.3:32
1148 #: build/C/man3/pthread_setschedparam.3:33
1149 #: build/C/man3/pthread_setschedprio.3:32 build/C/man3/pthread_sigqueue.3:31
1150 #: build/C/man3/pthread_testcancel.3:32
1151 #, no-wrap
1152 msgid "B<#include E<lt>pthread.hE<gt>>\n"
1153 msgstr "B<#include E<lt>pthread.hE<gt>>\n"
1154
1155 #. type: Plain text
1156 #: build/C/man3/pthread_attr_init.3:36
1157 #, no-wrap
1158 msgid ""
1159 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1160 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1161 msgstr ""
1162 "B<int pthread_attr_init(pthread_attr_t *>I<attr>B<);>\n"
1163 "B<int pthread_attr_destroy(pthread_attr_t *>I<attr>B<);>\n"
1164
1165 #. type: Plain text
1166 #: build/C/man3/pthread_attr_init.3:38
1167 #: build/C/man3/pthread_attr_setaffinity_np.3:41
1168 #: build/C/man3/pthread_attr_setdetachstate.3:40
1169 #: build/C/man3/pthread_attr_setguardsize.3:40
1170 #: build/C/man3/pthread_attr_setinheritsched.3:40
1171 #: build/C/man3/pthread_attr_setschedparam.3:40
1172 #: build/C/man3/pthread_attr_setschedpolicy.3:40
1173 #: build/C/man3/pthread_attr_setscope.3:40
1174 #: build/C/man3/pthread_attr_setstack.3:40
1175 #: build/C/man3/pthread_attr_setstackaddr.3:40
1176 #: build/C/man3/pthread_attr_setstacksize.3:40
1177 #: build/C/man3/pthread_cancel.3:36 build/C/man3/pthread_cleanup_push.3:39
1178 #: build/C/man3/pthread_equal.3:36 build/C/man3/pthread_exit.3:36
1179 #: build/C/man3/pthread_getattr_np.3:37
1180 #: build/C/man3/pthread_getcpuclockid.3:37 build/C/man3/pthread_self.3:36
1181 #: build/C/man3/pthread_setaffinity_np.3:41
1182 #: build/C/man3/pthread_setcancelstate.3:38
1183 #: build/C/man3/pthread_setconcurrency.3:37
1184 #: build/C/man3/pthread_setschedparam.3:40
1185 #: build/C/man3/pthread_setschedprio.3:36 build/C/man3/pthread_testcancel.3:36
1186 #, no-wrap
1187 msgid "Compile and link with I<-pthread>.\n"
1188 msgstr "I<-pthread> でコンパイルしてリンクする。\n"
1189
1190 #. type: Plain text
1191 #: build/C/man3/pthread_attr_init.3:50
1192 msgid ""
1193 "The B<pthread_attr_init>()  function initializes the thread attributes "
1194 "object pointed to by I<attr> with default attribute values.  After this "
1195 "call, individual attributes of the object can be set using various related "
1196 "functions (listed under SEE ALSO), and then the object can be used in one or "
1197 "more B<pthread_create>(3)  calls that create threads."
1198 msgstr ""
1199 "B<pthread_attr_init>() 関数は I<attr> が指すスレッド属性オブジェクト\n"
1200 "(thread attributes object) をデフォルトの属性値で初期化する。\n"
1201 "この呼び出しの後、オブジェクトの各属性は (関連項目に載っている) 種々の\n"
1202 "関数を使って設定することができ、このオブジェクトはスレッドの作成を行う\n"
1203 "B<pthread_create>(3) の呼び出しにおいて使用することができる (一つの\n"
1204 "オブジェクトを複数の B<pthread_create>(3) に渡してもよい)。"
1205
1206 #. type: Plain text
1207 #: build/C/man3/pthread_attr_init.3:55
1208 msgid ""
1209 "Calling B<pthread_attr_init>()  on a thread attributes object that has "
1210 "already been initialized results in undefined behavior."
1211 msgstr ""
1212 "すでに初期化されているスレッド属性オブジェクトに対して\n"
1213 "B<pthread_attr_init>() を呼び出した場合、\n"
1214 "どのような動作になるかは不定である。"
1215
1216 #. type: Plain text
1217 #: build/C/man3/pthread_attr_init.3:62
1218 msgid ""
1219 "When a thread attributes object is no longer required, it should be "
1220 "destroyed using the B<pthread_attr_destroy>()  function.  Destroying a "
1221 "thread attributes object has no effect on threads that were created using "
1222 "that object."
1223 msgstr ""
1224 "スレッド属性オブジェクトがもはや必要なくなった際には、\n"
1225 "そのオブジェクトは B<pthread_attr_destroy>() 関数を使って破棄すべきである。\n"
1226 "スレッド属性オブジェクトを破棄しても、\n"
1227 "そのオブジェクトを使って作成されたスレッドには影響はない。"
1228
1229 #. type: Plain text
1230 #: build/C/man3/pthread_attr_init.3:68
1231 msgid ""
1232 "Once a thread attributes object has been destroyed, it can be reinitialized "
1233 "using B<pthread_attr_init>().  Any other use of a destroyed thread "
1234 "attributes object has undefined results."
1235 msgstr ""
1236 "いったん破棄したスレッド属性オブジェクトは、\n"
1237 "B<pthread_attr_init>() を使って再初期化することができる。\n"
1238 "破棄したスレッド属性オブジェクトをこれ以外の用途で\n"
1239 "使った場合の結果は不定である。"
1240
1241 #. type: Plain text
1242 #: build/C/man3/pthread_attr_init.3:71
1243 #: build/C/man3/pthread_attr_setaffinity_np.3:79
1244 #: build/C/man3/pthread_attr_setdetachstate.3:80
1245 #: build/C/man3/pthread_attr_setguardsize.3:93
1246 #: build/C/man3/pthread_attr_setinheritsched.3:87
1247 #: build/C/man3/pthread_attr_setschedparam.3:77
1248 #: build/C/man3/pthread_attr_setschedpolicy.3:75
1249 #: build/C/man3/pthread_attr_setscope.3:94
1250 #: build/C/man3/pthread_attr_setstack.3:88
1251 #: build/C/man3/pthread_attr_setstackaddr.3:77
1252 #: build/C/man3/pthread_attr_setstacksize.3:64
1253 #: build/C/man3/pthread_setaffinity_np.3:80
1254 #: build/C/man3/pthread_setcancelstate.3:95
1255 #: build/C/man3/pthread_setname_np.3:75
1256 msgid ""
1257 "On success, these functions return 0; on error, they return a nonzero error "
1258 "number."
1259 msgstr ""
1260 "成功すると、これらの関数は 0 を返す。\n"
1261 "エラーの場合、0 以外のエラー番号を返す。"
1262
1263 #. type: Plain text
1264 #: build/C/man3/pthread_attr_init.3:79
1265 msgid ""
1266 "POSIX.1-2001 documents an B<ENOMEM> error for B<pthread_attr_init>(); on "
1267 "Linux these functions always succeed (but portable and future-proof "
1268 "applications should nevertheless handle a possible error return)."
1269 msgstr ""
1270 "POSIX.1-2001 では B<pthread_attr_init>() にはエラー B<ENOMEM> が\n"
1271 "記載されている。\n"
1272 "Linux では、これらの関数は常に成功する\n"
1273 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
1274 "正のエラーの返り値を処理するようにすべきである)。"
1275
1276 #. type: Plain text
1277 #: build/C/man3/pthread_attr_init.3:81
1278 #: build/C/man3/pthread_attr_setdetachstate.3:89
1279 #: build/C/man3/pthread_attr_setguardsize.3:108
1280 #: build/C/man3/pthread_attr_setinheritsched.3:103
1281 #: build/C/man3/pthread_attr_setschedparam.3:91
1282 #: build/C/man3/pthread_attr_setschedpolicy.3:91
1283 #: build/C/man3/pthread_attr_setscope.3:109
1284 #: build/C/man3/pthread_attr_setstack.3:114
1285 #: build/C/man3/pthread_attr_setstacksize.3:85
1286 #: build/C/man3/pthread_cancel.3:124 build/C/man3/pthread_cleanup_push.3:127
1287 #: build/C/man3/pthread_create.3:148 build/C/man3/pthread_detach.3:66
1288 #: build/C/man3/pthread_equal.3:49 build/C/man3/pthread_exit.3:77
1289 #: build/C/man3/pthread_getcpuclockid.3:67 build/C/man3/pthread_join.3:100
1290 #: build/C/man3/pthread_kill.3:68 build/C/man3/pthread_self.3:52
1291 #: build/C/man3/pthread_setcancelstate.3:115
1292 #: build/C/man3/pthread_setconcurrency.3:85
1293 #: build/C/man3/pthread_setschedparam.3:143
1294 #: build/C/man3/pthread_setschedprio.3:85 build/C/man3/pthread_sigmask.3:59
1295 #: build/C/man3/pthread_testcancel.3:60
1296 msgid "POSIX.1-2001."
1297 msgstr "POSIX.1-2001."
1298
1299 #. type: Plain text
1300 #: build/C/man3/pthread_attr_init.3:87
1301 msgid ""
1302 "The I<pthread_attr_t> type should be treated as opaque: any access to the "
1303 "object other than via pthreads functions is nonportable and produces "
1304 "undefined results."
1305 msgstr ""
1306 "I<pthread_attr_t> 型の内部構造は意識すべきではない。\n"
1307 "pthreads 関数経由以外でのオブジェクトへのアクセスは移植性がなく、\n"
1308 "どのような結果が得られるかも分からない。"
1309
1310 #. type: Plain text
1311 #: build/C/man3/pthread_attr_init.3:96
1312 msgid ""
1313 "The program below optionally makes use of B<pthread_attr_init>()  and "
1314 "various related functions to initialize a thread attributes object that is "
1315 "used to create a single thread.  Once created, the thread uses the "
1316 "B<pthread_getattr_np>(3)  function (a nonstandard GNU extension) to retrieve "
1317 "the thread's attributes, and then displays those attributes."
1318 msgstr ""
1319 "下記のプログラムは、B<pthread_attr_init>() と種々の関連関数を使って、\n"
1320 "スレッド属性オブジェクトの初期化を行い、\n"
1321 "そのオブジェクトを使ってスレッドを一つ作成する。\n"
1322 "作成されたスレッドは、作成後に B<pthread_getattr_np>(3) 関数 \n"
1323 "(非標準の GNU 拡張) を使ってスレッドの属性を取得し、\n"
1324 "取得した属性を表示する。"
1325
1326 #. type: Plain text
1327 #: build/C/man3/pthread_attr_init.3:105
1328 msgid ""
1329 "If the program is run with no command-line argument, then it passes NULL as "
1330 "the I<attr> argument of B<pthread_create>(3), so that the thread is created "
1331 "with default attributes.  Running the program on Linux/x86-32 with the NPTL "
1332 "threading implementation, we see the following:"
1333 msgstr ""
1334 "コマンドライン引き数なしでプログラムを実行した場合、\n"
1335 "B<pthread_create>(3) の I<attr> 引き数には NULL が渡される。\n"
1336 "この場合、スレッドはデフォルトの属性で作成される。\n"
1337 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1338 "動作させると、以下のような出力が得られる。"
1339
1340 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1341 #. type: Plain text
1342 #: build/C/man3/pthread_attr_init.3:121
1343 #, no-wrap
1344 msgid ""
1345 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1346 "unlimited\n"
1347 "$B< ./a.out>\n"
1348 "Thread attributes:\n"
1349 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1350 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1351 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1352 "        Scheduling policy   = SCHED_OTHER\n"
1353 "        Scheduling priority = 0\n"
1354 "        Guard size          = 4096 bytes\n"
1355 "        Stack address       = 0x40196000\n"
1356 "        Stack size          = 0x201000 bytes\n"
1357 msgstr ""
1358 "$B< ulimit -s>       # No stack imit ==E<gt> default stack size is 2MB\n"
1359 "unlimited\n"
1360 "$B< ./a.out>\n"
1361 "Thread attributes:\n"
1362 "        Detach state        = PTHREAD_CREATE_JOINABLE\n"
1363 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1364 "        Inherit scheduler   = PTHREAD_INHERIT_SCHED\n"
1365 "        Scheduling policy   = SCHED_OTHER\n"
1366 "        Scheduling priority = 0\n"
1367 "        Guard size          = 4096 bytes\n"
1368 "        Stack address       = 0x40196000\n"
1369 "        Stack size          = 0x201000 bytes\n"
1370
1371 #. type: Plain text
1372 #: build/C/man3/pthread_attr_init.3:131
1373 msgid ""
1374 "When we supply a stack size as a command-line argument, the program "
1375 "initializes a thread attributes object, sets various attributes in that "
1376 "object, and passes a pointer to the object in the call to B<pthread_create>"
1377 "(3).  Running the program on Linux/x86-32 with the NPTL threading "
1378 "implementation, we see the following:"
1379 msgstr ""
1380 "コマンドライン引き数でスタックサイズが与えられた場合、\n"
1381 "このプログラムは、スレッド属性オブジェクトを初期化し、\n"
1382 "そのオブジェクトの各種属性を設定し、\n"
1383 "B<pthread_create>(3) の呼び出しでこのオブジェクトへのポインタを渡す。\n"
1384 "このプログラムを NPTL スレッド実装が使われている Linux/x86-32 で\n"
1385 "動作させると、以下のような出力が得られる。"
1386
1387 #.  Results from glibc 2.8, SUSE 11.0; Oct 2008
1388 #. type: Plain text
1389 #: build/C/man3/pthread_attr_init.3:146
1390 #, no-wrap
1391 msgid ""
1392 "$B< ./a.out 0x3000000>\n"
1393 "posix_memalign() allocated at 0x40197000\n"
1394 "Thread attributes:\n"
1395 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1396 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1397 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1398 "        Scheduling policy   = SCHED_OTHER\n"
1399 "        Scheduling priority = 0\n"
1400 "        Guard size          = 0 bytes\n"
1401 "        Stack address       = 0x40197000\n"
1402 "        Stack size          = 0x3000000 bytes\n"
1403 msgstr ""
1404 "$B< ./a.out 0x3000000>\n"
1405 "posix_memalign() allocated at 0x40197000\n"
1406 "Thread attributes:\n"
1407 "        Detach state        = PTHREAD_CREATE_DETACHED\n"
1408 "        Scope               = PTHREAD_SCOPE_SYSTEM\n"
1409 "        Inherit scheduler   = PTHREAD_EXPLICIT_SCHED\n"
1410 "        Scheduling policy   = SCHED_OTHER\n"
1411 "        Scheduling priority = 0\n"
1412 "        Guard size          = 0 bytes\n"
1413 "        Stack address       = 0x40197000\n"
1414 "        Stack size          = 0x3000000 bytes\n"
1415
1416 #. type: Plain text
1417 #: build/C/man3/pthread_attr_init.3:157 build/C/man3/pthread_getattr_np.3:188
1418 #, no-wrap
1419 msgid ""
1420 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1421 "#include E<lt>pthread.hE<gt>\n"
1422 "#include E<lt>stdio.hE<gt>\n"
1423 "#include E<lt>stdlib.hE<gt>\n"
1424 "#include E<lt>unistd.hE<gt>\n"
1425 "#include E<lt>errno.hE<gt>\n"
1426 msgstr ""
1427 "#define _GNU_SOURCE     /* To get pthread_getattr_np() declaration */\n"
1428 "#include E<lt>pthread.hE<gt>\n"
1429 "#include E<lt>stdio.hE<gt>\n"
1430 "#include E<lt>stdlib.hE<gt>\n"
1431 "#include E<lt>unistd.hE<gt>\n"
1432 "#include E<lt>errno.hE<gt>\n"
1433
1434 #. type: Plain text
1435 #: build/C/man3/pthread_attr_init.3:160 build/C/man3/pthread_cancel.3:159
1436 #: build/C/man3/pthread_cleanup_push.3:239 build/C/man3/pthread_create.3:254
1437 #: build/C/man3/pthread_getattr_np.3:191
1438 #: build/C/man3/pthread_getcpuclockid.3:113
1439 #: build/C/man3/pthread_setaffinity_np.3:172
1440 #: build/C/man3/pthread_setschedparam.3:237 build/C/man3/pthread_sigmask.3:93
1441 #, no-wrap
1442 msgid ""
1443 "#define handle_error_en(en, msg) \\e\n"
1444 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1445 msgstr ""
1446 "#define handle_error_en(en, msg) \\e\n"
1447 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1448
1449 #. type: Plain text
1450 #: build/C/man3/pthread_attr_init.3:168
1451 #, no-wrap
1452 msgid ""
1453 "static void\n"
1454 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1455 "{\n"
1456 "    int s, i;\n"
1457 "    size_t v;\n"
1458 "    void *stkaddr;\n"
1459 "    struct sched_param sp;\n"
1460 msgstr ""
1461 "static void\n"
1462 "display_pthread_attr(pthread_attr_t *attr, char *prefix)\n"
1463 "{\n"
1464 "    int s, i;\n"
1465 "    size_t v;\n"
1466 "    void *stkaddr;\n"
1467 "    struct sched_param sp;\n"
1468
1469 #. type: Plain text
1470 #: build/C/man3/pthread_attr_init.3:176
1471 #, no-wrap
1472 msgid ""
1473 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1474 "    if (s != 0)\n"
1475 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1476 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1477 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1478 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1479 "            \"???\");\n"
1480 msgstr ""
1481 "    s = pthread_attr_getdetachstate(attr, &i);\n"
1482 "    if (s != 0)\n"
1483 "        handle_error_en(s, \"pthread_attr_getdetachstate\");\n"
1484 "    printf(\"%sDetach state        = %s\\en\", prefix,\n"
1485 "            (i == PTHREAD_CREATE_DETACHED) ? \"PTHREAD_CREATE_DETACHED\" :\n"
1486 "            (i == PTHREAD_CREATE_JOINABLE) ? \"PTHREAD_CREATE_JOINABLE\" :\n"
1487 "            \"???\");\n"
1488
1489 #. type: Plain text
1490 #: build/C/man3/pthread_attr_init.3:184
1491 #, no-wrap
1492 msgid ""
1493 "    s = pthread_attr_getscope(attr, &i);\n"
1494 "    if (s != 0)\n"
1495 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1496 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1497 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1498 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1499 "            \"???\");\n"
1500 msgstr ""
1501 "    s = pthread_attr_getscope(attr, &i);\n"
1502 "    if (s != 0)\n"
1503 "        handle_error_en(s, \"pthread_attr_getscope\");\n"
1504 "    printf(\"%sScope               = %s\\en\", prefix,\n"
1505 "            (i == PTHREAD_SCOPE_SYSTEM)  ? \"PTHREAD_SCOPE_SYSTEM\" :\n"
1506 "            (i == PTHREAD_SCOPE_PROCESS) ? \"PTHREAD_SCOPE_PROCESS\" :\n"
1507 "            \"???\");\n"
1508
1509 #. type: Plain text
1510 #: build/C/man3/pthread_attr_init.3:192
1511 #, no-wrap
1512 msgid ""
1513 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1514 "    if (s != 0)\n"
1515 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1516 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1517 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1518 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1519 "            \"???\");\n"
1520 msgstr ""
1521 "    s = pthread_attr_getinheritsched(attr, &i);\n"
1522 "    if (s != 0)\n"
1523 "        handle_error_en(s, \"pthread_attr_getinheritsched\");\n"
1524 "    printf(\"%sInherit scheduler   = %s\\en\", prefix,\n"
1525 "            (i == PTHREAD_INHERIT_SCHED)  ? \"PTHREAD_INHERIT_SCHED\" :\n"
1526 "            (i == PTHREAD_EXPLICIT_SCHED) ? \"PTHREAD_EXPLICIT_SCHED\" :\n"
1527 "            \"???\");\n"
1528
1529 #. type: Plain text
1530 #: build/C/man3/pthread_attr_init.3:201
1531 #, no-wrap
1532 msgid ""
1533 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1534 "    if (s != 0)\n"
1535 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1536 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1537 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1538 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1539 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1540 "            \"???\");\n"
1541 msgstr ""
1542 "    s = pthread_attr_getschedpolicy(attr, &i);\n"
1543 "    if (s != 0)\n"
1544 "        handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
1545 "    printf(\"%sScheduling policy   = %s\\en\", prefix,\n"
1546 "            (i == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
1547 "            (i == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
1548 "            (i == SCHED_RR)    ? \"SCHED_RR\" :\n"
1549 "            \"???\");\n"
1550
1551 #. type: Plain text
1552 #: build/C/man3/pthread_attr_init.3:206
1553 #, no-wrap
1554 msgid ""
1555 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1556 "    if (s != 0)\n"
1557 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1558 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1559 msgstr ""
1560 "    s = pthread_attr_getschedparam(attr, &sp);\n"
1561 "    if (s != 0)\n"
1562 "        handle_error_en(s, \"pthread_attr_getschedparam\");\n"
1563 "    printf(\"%sScheduling priority = %d\\en\", prefix, sp.sched_priority);\n"
1564
1565 #. type: Plain text
1566 #: build/C/man3/pthread_attr_init.3:211
1567 #, no-wrap
1568 msgid ""
1569 "    s = pthread_attr_getguardsize(attr, &v);\n"
1570 "    if (s != 0)\n"
1571 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1572 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1573 msgstr ""
1574 "    s = pthread_attr_getguardsize(attr, &v);\n"
1575 "    if (s != 0)\n"
1576 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
1577 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, v);\n"
1578
1579 #. type: Plain text
1580 #: build/C/man3/pthread_attr_init.3:218
1581 #, no-wrap
1582 msgid ""
1583 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1584 "    if (s != 0)\n"
1585 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1586 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1587 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1588 "}\n"
1589 msgstr ""
1590 "    s = pthread_attr_getstack(attr, &stkaddr, &v);\n"
1591 "    if (s != 0)\n"
1592 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
1593 "    printf(\"%sStack address       = %p\\en\", prefix, stkaddr);\n"
1594 "    printf(\"%sStack size          = 0x%x bytes\\en\", prefix, v);\n"
1595 "}\n"
1596
1597 #. type: Plain text
1598 #: build/C/man3/pthread_attr_init.3:224
1599 #, no-wrap
1600 msgid ""
1601 "static void *\n"
1602 "thread_start(void *arg)\n"
1603 "{\n"
1604 "    int s;\n"
1605 "    pthread_attr_t gattr;\n"
1606 msgstr ""
1607 "static void *\n"
1608 "thread_start(void *arg)\n"
1609 "{\n"
1610 "    int s;\n"
1611 "    pthread_attr_t gattr;\n"
1612
1613 #. type: Plain text
1614 #: build/C/man3/pthread_attr_init.3:228
1615 #, no-wrap
1616 msgid ""
1617 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1618 "       retrieves the attributes of the thread specified in its\n"
1619 "       first argument */\n"
1620 msgstr ""
1621 "    /* pthread_getattr_np() is a non-standard GNU extension that\n"
1622 "       retrieves the attributes of the thread specified in its\n"
1623 "       first argument */\n"
1624
1625 #. type: Plain text
1626 #: build/C/man3/pthread_attr_init.3:232
1627 #, no-wrap
1628 msgid ""
1629 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1630 "    if (s != 0)\n"
1631 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1632 msgstr ""
1633 "    s = pthread_getattr_np(pthread_self(), &gattr);\n"
1634 "    if (s != 0)\n"
1635 "        handle_error_en(s, \"pthread_getattr_np\");\n"
1636
1637 #. type: Plain text
1638 #: build/C/man3/pthread_attr_init.3:235
1639 #, no-wrap
1640 msgid ""
1641 "    printf(\"Thread attributes:\\en\");\n"
1642 "    display_pthread_attr(&gattr, \"\\et\");\n"
1643 msgstr ""
1644 "    printf(\"Thread attributes:\\en\");\n"
1645 "    display_pthread_attr(&gattr, \"\\et\");\n"
1646
1647 #. type: Plain text
1648 #: build/C/man3/pthread_attr_init.3:238 build/C/man3/pthread_getattr_np.3:240
1649 #, no-wrap
1650 msgid ""
1651 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1652 "}\n"
1653 msgstr ""
1654 "    exit(EXIT_SUCCESS);         /* Terminate all threads */\n"
1655 "}\n"
1656
1657 #. type: Plain text
1658 #: build/C/man3/pthread_attr_init.3:246
1659 #, no-wrap
1660 msgid ""
1661 "int\n"
1662 "main(int argc, char *argv[])\n"
1663 "{\n"
1664 "    pthread_t thr;\n"
1665 "    pthread_attr_t attr;\n"
1666 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1667 "    int s;\n"
1668 msgstr ""
1669 "int\n"
1670 "main(int argc, char *argv[])\n"
1671 "{\n"
1672 "    pthread_t thr;\n"
1673 "    pthread_attr_t attr;\n"
1674 "    pthread_attr_t *attrp;      /* NULL or &attr */\n"
1675 "    int s;\n"
1676
1677 #. type: Plain text
1678 #: build/C/man3/pthread_attr_init.3:248
1679 #: build/C/man3/pthread_setschedparam.3:355
1680 #, no-wrap
1681 msgid "    attrp = NULL;\n"
1682 msgstr "    attrp = NULL;\n"
1683
1684 #. type: Plain text
1685 #: build/C/man3/pthread_attr_init.3:252
1686 #, no-wrap
1687 msgid ""
1688 "    /* If a command-line argument was supplied, use it to set the\n"
1689 "       stack-size attribute and set a few other thread attributes,\n"
1690 "       and set attrp pointing to thread attributes object */\n"
1691 msgstr ""
1692 "    /* If a command-line argument was supplied, use it to set the\n"
1693 "       stack-size attribute and set a few other thread attributes,\n"
1694 "       and set attrp pointing to thread attributes object */\n"
1695
1696 #. type: Plain text
1697 #: build/C/man3/pthread_attr_init.3:256
1698 #, no-wrap
1699 msgid ""
1700 "    if (argc E<gt> 1) {\n"
1701 "        int stack_size;\n"
1702 "        void *sp;\n"
1703 msgstr ""
1704 "    if (argc E<gt> 1) {\n"
1705 "        int stack_size;\n"
1706 "        void *sp;\n"
1707
1708 #. type: Plain text
1709 #: build/C/man3/pthread_attr_init.3:258
1710 #, no-wrap
1711 msgid "        attrp = &attr;\n"
1712 msgstr "        attrp = &attr;\n"
1713
1714 #. type: Plain text
1715 #: build/C/man3/pthread_attr_init.3:262
1716 #, no-wrap
1717 msgid ""
1718 "        s = pthread_attr_init(&attr);\n"
1719 "        if (s != 0)\n"
1720 "            handle_error_en(s, \"pthread_attr_init\");\n"
1721 msgstr ""
1722 "        s = pthread_attr_init(&attr);\n"
1723 "        if (s != 0)\n"
1724 "            handle_error_en(s, \"pthread_attr_init\");\n"
1725
1726 #. type: Plain text
1727 #: build/C/man3/pthread_attr_init.3:266
1728 #, no-wrap
1729 msgid ""
1730 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1731 "        if (s != 0)\n"
1732 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1733 msgstr ""
1734 "        s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);\n"
1735 "        if (s != 0)\n"
1736 "            handle_error_en(s, \"pthread_attr_setdetachstate\");\n"
1737
1738 #. type: Plain text
1739 #: build/C/man3/pthread_attr_init.3:270
1740 #, no-wrap
1741 msgid ""
1742 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1743 "        if (s != 0)\n"
1744 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1745 msgstr ""
1746 "        s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);\n"
1747 "        if (s != 0)\n"
1748 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
1749
1750 #. type: Plain text
1751 #: build/C/man3/pthread_attr_init.3:272
1752 #, no-wrap
1753 msgid "        stack_size = strtoul(argv[1], NULL, 0);\n"
1754 msgstr "        stack_size = strtoul(argv[1], NULL, 0);\n"
1755
1756 #. type: Plain text
1757 #: build/C/man3/pthread_attr_init.3:276
1758 #, no-wrap
1759 msgid ""
1760 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1761 "        if (s != 0)\n"
1762 "            handle_error_en(s, \"posix_memalign\");\n"
1763 msgstr ""
1764 "        s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);\n"
1765 "        if (s != 0)\n"
1766 "            handle_error_en(s, \"posix_memalign\");\n"
1767
1768 #. type: Plain text
1769 #: build/C/man3/pthread_attr_init.3:278
1770 #, no-wrap
1771 msgid "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1772 msgstr "        printf(\"posix_memalign() allocated at %p\\en\", sp);\n"
1773
1774 #. type: Plain text
1775 #: build/C/man3/pthread_attr_init.3:283
1776 #, no-wrap
1777 msgid ""
1778 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1779 "        if (s != 0)\n"
1780 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1781 "    }\n"
1782 msgstr ""
1783 "        s = pthread_attr_setstack(&attr, sp, stack_size);\n"
1784 "        if (s != 0)\n"
1785 "            handle_error_en(s, \"pthread_attr_setstack\");\n"
1786 "    }\n"
1787
1788 #. type: Plain text
1789 #: build/C/man3/pthread_attr_init.3:287 build/C/man3/pthread_getattr_np.3:335
1790 #, no-wrap
1791 msgid ""
1792 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1793 "    if (s != 0)\n"
1794 "        handle_error_en(s, \"pthread_create\");\n"
1795 msgstr ""
1796 "    s = pthread_create(&thr, attrp, &thread_start, NULL);\n"
1797 "    if (s != 0)\n"
1798 "        handle_error_en(s, \"pthread_create\");\n"
1799
1800 #. type: Plain text
1801 #: build/C/man3/pthread_attr_init.3:293 build/C/man3/pthread_getattr_np.3:341
1802 #, no-wrap
1803 msgid ""
1804 "    if (attrp != NULL) {\n"
1805 "        s = pthread_attr_destroy(attrp);\n"
1806 "        if (s != 0)\n"
1807 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1808 "    }\n"
1809 msgstr ""
1810 "    if (attrp != NULL) {\n"
1811 "        s = pthread_attr_destroy(attrp);\n"
1812 "        if (s != 0)\n"
1813 "            handle_error_en(s, \"pthread_attr_destroy\");\n"
1814 "    }\n"
1815
1816 #. type: Plain text
1817 #: build/C/man3/pthread_attr_init.3:296 build/C/man3/pthread_getattr_np.3:344
1818 #, no-wrap
1819 msgid ""
1820 "    pause();    /* Terminates when other thread calls exit() */\n"
1821 "}\n"
1822 msgstr ""
1823 "    pause();    /* Terminates when other thread calls exit() */\n"
1824 "}\n"
1825
1826 #. type: Plain text
1827 #: build/C/man3/pthread_attr_init.3:313
1828 msgid ""
1829 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1830 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1831 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1832 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1833 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1834 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1835 msgstr ""
1836 "B<pthread_attr_setaffinity_np>(3), B<pthread_attr_setdetachstate>(3), "
1837 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setinheritsched>(3), "
1838 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
1839 "B<pthread_attr_setscope>(3), B<pthread_attr_setstack>(3), "
1840 "B<pthread_attr_setstackaddr>(3), B<pthread_attr_setstacksize>(3), "
1841 "B<pthread_create>(3), B<pthread_getattr_np>(3), B<pthreads>(7)"
1842
1843 #. type: TH
1844 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1845 #, no-wrap
1846 msgid "PTHREAD_ATTR_SETAFFINITY_NP"
1847 msgstr "PTHREAD_ATTR_SETAFFINITY_NP"
1848
1849 #. type: TH
1850 #: build/C/man3/pthread_attr_setaffinity_np.3:26
1851 #: build/C/man3/pthread_getattr_np.3:26
1852 #: build/C/man3/pthread_setaffinity_np.3:26
1853 #: build/C/man3/pthread_tryjoin_np.3:26
1854 #, no-wrap
1855 msgid "2010-09-10"
1856 msgstr "2010-09-10"
1857
1858 #. type: Plain text
1859 #: build/C/man3/pthread_attr_setaffinity_np.3:30
1860 msgid ""
1861 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - set/get CPU "
1862 "affinity attribute in thread attributes object"
1863 msgstr ""
1864 "pthread_attr_setaffinity_np, pthread_attr_getaffinity_np - \n"
1865 "スレッド属性オブジェクトの CPU affinity 属性の設定/取得を行う"
1866
1867 #. type: Plain text
1868 #: build/C/man3/pthread_attr_setaffinity_np.3:34
1869 #: build/C/man3/pthread_getattr_np.3:33
1870 #: build/C/man3/pthread_setaffinity_np.3:34
1871 #: build/C/man3/pthread_tryjoin_np.3:34 build/C/man3/pthread_yield.3:32
1872 #, no-wrap
1873 msgid ""
1874 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1875 "B<#include E<lt>pthread.hE<gt>>\n"
1876 msgstr ""
1877 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
1878 "B<#include E<lt>pthread.hE<gt>>\n"
1879
1880 #. type: Plain text
1881 #: build/C/man3/pthread_attr_setaffinity_np.3:39
1882 #, no-wrap
1883 msgid ""
1884 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1885 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1886 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1887 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1888 msgstr ""
1889 "B<int pthread_attr_setaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1890 "B<                   size_t >I<cpusetsize>B<, const cpu_set_t *>I<cpuset>B<);>\n"
1891 "B<int pthread_attr_getaffinity_np(pthread_attr_t *>I<attr>B<,>\n"
1892 "B<                   size_t >I<cpusetsize>B<, cpu_set_t *>I<cpuset>B<);>\n"
1893
1894 #. type: Plain text
1895 #: build/C/man3/pthread_attr_setaffinity_np.3:54
1896 msgid ""
1897 "The B<pthread_attr_setaffinity_np>()  function sets the CPU affinity mask "
1898 "attribute of the thread attributes object referred to by I<attr> to the "
1899 "value specified in I<cpuset>.  This attribute determines the CPU affinity "
1900 "mask of a thread created using the thread attributes object I<attr>."
1901 msgstr ""
1902 "B<pthread_attr_setaffinity_np>() 関数は、\n"
1903 "I<attr> が参照するスレッド属性オブジェクトの CPU affinity マスク属性を\n"
1904 "I<cpuset> で指定された値に設定する。\n"
1905 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
1906 "作成されたスレッドの CPU affinity マスクが決定される。"
1907
1908 #. type: Plain text
1909 #: build/C/man3/pthread_attr_setaffinity_np.3:63
1910 msgid ""
1911 "The B<pthread_attr_getaffinity_np>()  function returns the CPU affinity mask "
1912 "attribute of the thread attributes object referred to by I<attr> in the "
1913 "buffer pointed to by I<cpuset>."
1914 msgstr ""
1915 "B<pthread_attr_getaffinity_np>() 関数は、 I<attr> が参照する\n"
1916 "スレッド属性オブジェクトの CPU affinity マスク属性を\n"
1917 "I<cpuset> が指すバッファに入れて返す。"
1918
1919 #. type: Plain text
1920 #: build/C/man3/pthread_attr_setaffinity_np.3:70
1921 msgid ""
1922 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
1923 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
1924 "(cpu_set_t)>."
1925 msgstr ""
1926 "I<cpusetsize> 引き数は I<cpuset> が指すバッファの (バイト単位の)\n"
1927 "大きさである。通常は、この引き数には I<sizeof(cpu_set_t)> を\n"
1928 "指定することだろう。"
1929
1930 #. type: Plain text
1931 #: build/C/man3/pthread_attr_setaffinity_np.3:76
1932 #: build/C/man3/pthread_setaffinity_np.3:67
1933 msgid ""
1934 "For more details on CPU affinity masks, see B<sched_setaffinity>(2).  For a "
1935 "description of a set of macros that can be used to manipulate and inspect "
1936 "CPU sets, see B<CPU_SET>(3)."
1937 msgstr ""
1938 "CPU affinity マスクの詳細については、 \n"
1939 "B<sched_setaffinity>(2) を参照してほしい。\n"
1940 "CPU 集合の操作や取得を行う際に利用できるマクロ群の説明は \n"
1941 "B<CPU_SET>(3) を参照してほしい。"
1942
1943 #. type: TP
1944 #: build/C/man3/pthread_attr_setaffinity_np.3:80
1945 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1946 #: build/C/man3/pthread_attr_setdetachstate.3:83
1947 #: build/C/man3/pthread_attr_setinheritsched.3:90
1948 #: build/C/man3/pthread_attr_setschedpolicy.3:78
1949 #: build/C/man3/pthread_attr_setscope.3:97
1950 #: build/C/man3/pthread_attr_setstack.3:91
1951 #: build/C/man3/pthread_attr_setstacksize.3:67
1952 #: build/C/man3/pthread_create.3:137 build/C/man3/pthread_detach.3:55
1953 #: build/C/man3/pthread_join.3:85 build/C/man3/pthread_join.3:89
1954 #: build/C/man3/pthread_kill.3:58 build/C/man3/pthread_setaffinity_np.3:84
1955 #: build/C/man3/pthread_setaffinity_np.3:93
1956 #: build/C/man3/pthread_setaffinity_np.3:109
1957 #: build/C/man3/pthread_setcancelstate.3:99
1958 #: build/C/man3/pthread_setcancelstate.3:107
1959 #: build/C/man3/pthread_setconcurrency.3:71
1960 #: build/C/man3/pthread_setschedparam.3:122
1961 #: build/C/man3/pthread_setschedprio.3:62 build/C/man3/pthread_sigqueue.3:77
1962 #, no-wrap
1963 msgid "B<EINVAL>"
1964 msgstr "B<EINVAL>"
1965
1966 #.  cpumask_t
1967 #.  The raw sched_getaffinity() system call returns the size (in bytes)
1968 #.  of the cpumask_t type.
1969 #. type: Plain text
1970 #: build/C/man3/pthread_attr_setaffinity_np.3:92
1971 msgid ""
1972 "(B<pthread_attr_setaffinity_np>())  I<cpuset> specified a CPU that was "
1973 "outside the set supported by the kernel.  (The kernel configuration option "
1974 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
1975 "type used to represent CPU sets.)"
1976 msgstr ""
1977 "(B<pthread_attr_setaffinity_np>())\n"
1978 "I<cpuset> がカーネルがサポートする CPU 集合にない CPU を指定していた。\n"
1979 "(CPU 集合を表現するのに使われるカーネルのデータ型がサポートする集合の範囲"
1980 "は、\n"
1981 "カーネルの設定オプション B<CONFIG_NR_CPUS> により定義される)。"
1982
1983 #. type: Plain text
1984 #: build/C/man3/pthread_attr_setaffinity_np.3:102
1985 msgid ""
1986 "(B<pthread_attr_getaffinity_np>())  A CPU in the affinity mask of the thread "
1987 "attributes object referred to by I<attr> lies outside the range specified by "
1988 "I<cpusetsize> (i.e., I<cpuset>/I<cpusetsize> is too small)."
1989 msgstr ""
1990 "(B<pthread_attr_getaffinity_np>())\n"
1991 "I<attr> が参照するスレッド属性オブジェクトの affinity マスク内の CPU が、\n"
1992 "I<cpusetsize> により指定された範囲の中になかった\n"
1993 "(すなわち、I<cpuset>/I<cpusetsize> が小さすぎる)。"
1994
1995 #. type: Plain text
1996 #: build/C/man3/pthread_attr_setaffinity_np.3:106
1997 msgid "(B<pthread_attr_setaffinity_np>())  Could not allocate memory."
1998 msgstr ""
1999 "(B<pthread_attr_setaffinity_np>()) メモリを割り当てることができなかった。"
2000
2001 #. type: Plain text
2002 #: build/C/man3/pthread_attr_setaffinity_np.3:108
2003 #: build/C/man3/pthread_setaffinity_np.3:121
2004 msgid "These functions are provided by glibc since version 2.3.4."
2005 msgstr "これらの関数は glibc バージョン 2.3.4 以降で提供されている。"
2006
2007 #. type: Plain text
2008 #: build/C/man3/pthread_attr_setaffinity_np.3:111
2009 #: build/C/man3/pthread_cleanup_push_defer_np.3:104
2010 #: build/C/man3/pthread_setaffinity_np.3:124
2011 #: build/C/man3/pthread_tryjoin_np.3:115
2012 msgid ""
2013 "These functions are nonstandard GNU extensions; hence the suffix \"_np"
2014 "\" (nonportable) in the names."
2015 msgstr ""
2016 "これらの関数は非標準の GNU による拡張である。\n"
2017 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
2018 "付いている。"
2019
2020 #. type: Plain text
2021 #: build/C/man3/pthread_attr_setaffinity_np.3:118
2022 #: build/C/man3/pthread_setaffinity_np.3:150
2023 msgid ""
2024 "In glibc 2.3.3 only, versions of these functions were provided that did not "
2025 "have a I<cpusetsize> argument.  Instead the CPU set size given to the "
2026 "underlying system calls was always I<sizeof(cpu_set_t)>."
2027 msgstr ""
2028 "(このバージョンだけであるが) glibc 2.3.3 では、\n"
2029 "これらの関数は I<cpusetsize> 引き数を持っていなかった。\n"
2030 "内部で呼ばれるシステムコールに渡される CPU セットの大きさは\n"
2031 "常に I<sizeof(cpu_set_t)> であった。"
2032
2033 #. type: Plain text
2034 #: build/C/man3/pthread_attr_setaffinity_np.3:124
2035 msgid ""
2036 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2037 "(3), B<cpuset>(7), B<pthreads>(7)"
2038 msgstr ""
2039 "B<sched_setaffinity>(2), B<pthread_attr_init>(3), B<pthread_setaffinity_np>"
2040 "(3), B<cpuset>(7), B<pthreads>(7)"
2041
2042 #. type: TH
2043 #: build/C/man3/pthread_attr_setdetachstate.3:26
2044 #, no-wrap
2045 msgid "PTHREAD_ATTR_SETDETACHSTATE"
2046 msgstr "PTHREAD_ATTR_SETDETACHSTATE"
2047
2048 #. type: TH
2049 #: build/C/man3/pthread_attr_setdetachstate.3:26
2050 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2051 #, no-wrap
2052 msgid "2010-02-03"
2053 msgstr "2010-02-03"
2054
2055 #. type: Plain text
2056 #: build/C/man3/pthread_attr_setdetachstate.3:30
2057 msgid ""
2058 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - set/get detach "
2059 "state attribute in thread attributes object"
2060 msgstr ""
2061 "pthread_attr_setdetachstate, pthread_attr_getdetachstate - \n"
2062 "スレッド属性オブジェクトの detach state 属性の設定/取得を行う"
2063
2064 #. type: Plain text
2065 #: build/C/man3/pthread_attr_setdetachstate.3:38
2066 #, no-wrap
2067 msgid ""
2068 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2069 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2070 msgstr ""
2071 "B<int pthread_attr_setdetachstate(pthread_attr_t *>I<attr>B<, int >I<detachstate>B<);>\n"
2072 "B<int pthread_attr_getdetachstate(pthread_attr_t *>I<attr>B<, int *>I<detachstate>B<);>\n"
2073
2074 #. type: Plain text
2075 #: build/C/man3/pthread_attr_setdetachstate.3:53
2076 msgid ""
2077 "The B<pthread_attr_setdetachstate>()  function sets the detach state "
2078 "attribute of the thread attributes object referred to by I<attr> to the "
2079 "value specified in I<detachstate>.  The detach state attribute determines "
2080 "whether a thread created using the thread attributes object I<attr> will be "
2081 "created in a joinable or a detached state."
2082 msgstr ""
2083 "B<pthread_attr_setdetachstate>() 関数は、\n"
2084 "I<attr> が参照するスレッド属性オブジェクトの detach state 属性を\n"
2085 "I<detachstate> で指定された値に設定する。\n"
2086 "detach state 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2087 "作成されるスレッドが、 join 可能な状態で作成されるか、\n"
2088 "detached (切り離された) 状態で作成されるかが決定される。"
2089
2090 #. type: Plain text
2091 #: build/C/man3/pthread_attr_setdetachstate.3:56
2092 msgid "The following values may be specified in I<detachstate>:"
2093 msgstr "I<detachstate> には以下の値を指定できる。"
2094
2095 #. type: TP
2096 #: build/C/man3/pthread_attr_setdetachstate.3:56
2097 #, no-wrap
2098 msgid "B<PTHREAD_CREATE_DETACHED>"
2099 msgstr "B<PTHREAD_CREATE_DETACHED>"
2100
2101 #. type: Plain text
2102 #: build/C/man3/pthread_attr_setdetachstate.3:61
2103 msgid ""
2104 "Threads that are created using I<attr> will be created in a detached state."
2105 msgstr "I<attr> を使って作成されるスレッドは detached 状態で作成される。"
2106
2107 #. type: TP
2108 #: build/C/man3/pthread_attr_setdetachstate.3:61
2109 #, no-wrap
2110 msgid "B<PTHREAD_CREATE_JOINABLE>"
2111 msgstr "B<PTHREAD_CREATE_JOINABLE>"
2112
2113 #. type: Plain text
2114 #: build/C/man3/pthread_attr_setdetachstate.3:66
2115 msgid ""
2116 "Threads that are created using I<attr> will be created in a joinable state."
2117 msgstr "I<attr> を使って作成されるスレッドは join 可能な状態で作成される。"
2118
2119 #. type: Plain text
2120 #: build/C/man3/pthread_attr_setdetachstate.3:70
2121 msgid ""
2122 "The default setting of the detach state attribute in a newly initialized "
2123 "thread attributes object is B<PTHREAD_CREATE_JOINABLE>."
2124 msgstr ""
2125 "新規に初期化されたスレッド属性オブジェクトの detach state 属性の\n"
2126 "デフォルト設定は B<PTHREAD_CREATE_JOINABLE> である。"
2127
2128 #. type: Plain text
2129 #: build/C/man3/pthread_attr_setdetachstate.3:77
2130 msgid ""
2131 "The B<pthread_attr_getdetachstate>()  returns the detach state attribute of "
2132 "the thread attributes object I<attr> in the buffer pointed to by "
2133 "I<detachstate>."
2134 msgstr ""
2135 "B<pthread_attr_getdetachstate>() は、\n"
2136 "スレッド属性オブジェクト I<attr> の detach state 属性を\n"
2137 "I<detachstate> が指すバッファに入れて返す。"
2138
2139 #. type: Plain text
2140 #: build/C/man3/pthread_attr_setdetachstate.3:83
2141 msgid "B<pthread_attr_setdetachstate>()  can fail with the following error:"
2142 msgstr "B<pthread_attr_setdetachstate>() は以下のエラーで失敗する場合がある。"
2143
2144 #. type: Plain text
2145 #: build/C/man3/pthread_attr_setdetachstate.3:87
2146 msgid "An invalid value was specified in I<detachstate>."
2147 msgstr "無効な値が I<detachstate> で指定された。"
2148
2149 #. type: Plain text
2150 #: build/C/man3/pthread_attr_setdetachstate.3:93
2151 msgid ""
2152 "See B<pthread_create>(3)  for more details on detached and joinable threads."
2153 msgstr ""
2154 "detached 状態のスレッド、join 可能状態のスレッドの詳細については、\n"
2155 "B<pthread_create>(3) を参照。"
2156
2157 #. type: Plain text
2158 #: build/C/man3/pthread_attr_setdetachstate.3:101
2159 msgid ""
2160 "A thread that is created in a joinable state should eventually either be "
2161 "joined using B<pthread_join>(3)  or detached using B<pthread_detach>(3); see "
2162 "B<pthread_create>(3)."
2163 msgstr ""
2164 "join 可能状態で作成されたスレッドは、最終的に\n"
2165 "B<pthread_join>(3) を使って join するか、\n"
2166 "B<pthread_detach>(3) を使って切り離すか、\n"
2167 "のどちらかを行うべきである。"
2168
2169 #. type: Plain text
2170 #: build/C/man3/pthread_attr_setdetachstate.3:108
2171 msgid ""
2172 "It is an error to specify the thread ID of a thread that was created in a "
2173 "detached state in a later call to B<pthread_detach>(3)  or B<pthread_join>"
2174 "(3)."
2175 msgstr ""
2176 "detached 状態で作成されたスレッドのスレッド ID を指定して、\n"
2177 "B<pthread_detach>(3) や B<pthread_join>(3) を後から呼び出すのは\n"
2178 "エラーである。"
2179
2180 #. type: Plain text
2181 #: build/C/man3/pthread_attr_setdetachstate.3:111
2182 #: build/C/man3/pthread_attr_setstack.3:156
2183 msgid "See B<pthread_attr_init>(3)."
2184 msgstr "B<pthread_attr_init>(3) を参照。"
2185
2186 #. type: Plain text
2187 #: build/C/man3/pthread_attr_setdetachstate.3:117
2188 msgid ""
2189 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2190 "B<pthread_join>(3), B<pthreads>(7)"
2191 msgstr ""
2192 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthread_detach>(3), "
2193 "B<pthread_join>(3), B<pthreads>(7)"
2194
2195 #. type: TH
2196 #: build/C/man3/pthread_attr_setguardsize.3:26
2197 #, no-wrap
2198 msgid "PTHREAD_ATTR_SETGUARDSIZE"
2199 msgstr "PTHREAD_ATTR_SETGUARDSIZE"
2200
2201 #. type: TH
2202 #: build/C/man3/pthread_attr_setguardsize.3:26
2203 #: build/C/man3/pthread_attr_setscope.3:26
2204 #: build/C/man3/pthread_attr_setstack.3:26
2205 #: build/C/man3/pthread_attr_setstackaddr.3:26 build/C/man3/pthread_self.3:26
2206 #, no-wrap
2207 msgid "2008-10-24"
2208 msgstr "2008-10-24"
2209
2210 #. type: Plain text
2211 #: build/C/man3/pthread_attr_setguardsize.3:30
2212 msgid ""
2213 "pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size "
2214 "attribute in thread attributes object"
2215 msgstr ""
2216 "pthread_attr_setguardsize, pthread_attr_getguardsize - \n"
2217 "スレッド属性オブジェクトの guard size 属性の設定/取得を行う"
2218
2219 #. type: Plain text
2220 #: build/C/man3/pthread_attr_setguardsize.3:38
2221 #, no-wrap
2222 msgid ""
2223 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2224 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2225 msgstr ""
2226 "B<int pthread_attr_setguardsize(pthread_attr_t *>I<attr>B<, size_t >I<guardsize>B<);>\n"
2227 "B<int pthread_attr_getguardsize(pthread_attr_t *>I<attr>B<, size_t *>I<guardsize>B<);>\n"
2228
2229 #. type: Plain text
2230 #: build/C/man3/pthread_attr_setguardsize.3:49
2231 msgid ""
2232 "The B<pthread_attr_setguardsize>()  function sets the guard size attribute "
2233 "of the thread attributes object referred to by I<attr> to the value "
2234 "specified in I<guardsize>."
2235 msgstr ""
2236 "B<pthread_attr_setguardsize>() 関数は、\n"
2237 "I<attr> が参照するスレッド属性オブジェクトの guard size 属性を\n"
2238 "I<guardsize> で指定された値に設定する。"
2239
2240 #. type: Plain text
2241 #: build/C/man3/pthread_attr_setguardsize.3:59
2242 msgid ""
2243 "If I<guardsize> is greater than 0, then for each new thread created using "
2244 "I<attr> the system allocates an additional region of at least I<guardsize> "
2245 "bytes at the end of the thread's stack to act as the guard area for the "
2246 "stack (but see BUGS)."
2247 msgstr ""
2248 "I<guardsize> が 0 より大きい場合、\n"
2249 "I<attr> を使って新しく作成された各スレッドに対して、\n"
2250 "システムはスレッドのスタックの末尾に少なくとも I<guardsize> バイトの\n"
2251 "追加領域を割り当てる。この追加領域はスタックに対するガード領域として\n"
2252 "機能する (ただし「バグ」の節も参照)。"
2253
2254 #. type: Plain text
2255 #: build/C/man3/pthread_attr_setguardsize.3:65
2256 msgid ""
2257 "If I<guardsize> is 0, then new threads created with I<attr> will not have a "
2258 "guard area."
2259 msgstr ""
2260 "I<guardsize> が 0 の場合、\n"
2261 "I<attr> を使って新しく作成されたスレッドはガード領域を持たない。"
2262
2263 #. type: Plain text
2264 #: build/C/man3/pthread_attr_setguardsize.3:67
2265 msgid "The default guard size is the same as the system page size."
2266 msgstr "デフォルトの guard size はシステムのページサイズと同じである。"
2267
2268 #. type: Plain text
2269 #: build/C/man3/pthread_attr_setguardsize.3:82
2270 msgid ""
2271 "If the stack address attribute has been set in I<attr> (using "
2272 "B<pthread_attr_setstack>(3)  or B<pthread_attr_setstackaddr>(3)), meaning "
2273 "that the caller is allocating the thread's stack, then the guard size "
2274 "attribute is ignored (i.e., no guard area is created by the system): it is "
2275 "the application's responsibility to handle stack overflow (perhaps by using "
2276 "B<mprotect>(2)  to manually define a guard area at the end of the stack that "
2277 "it has allocated)."
2278 msgstr ""
2279 "(B<pthread_attr_setstack>(3) や B<pthread_attr_setstackaddr>(3)を使って)\n"
2280 "I<attr> でスタックアドレス属性が設定されている場合には、呼び出し側がそ\n"
2281 "のスレッドのスタックを割り当てていることを意味するので、guard size 属性\n"
2282 "は無視される (すなわち、システムによるガード領域の作成は行われない)。\n"
2283 "この場合、スタックオーバーフローが起こらないように対処するのはアプリ\n"
2284 "ケーション側の責任となる (おそらく B<mprotect>(2) を使って、割り当て\n"
2285 "られたスタックの最後に手動でガード領域を定義することになるだろう)。"
2286
2287 #. type: Plain text
2288 #: build/C/man3/pthread_attr_setguardsize.3:90
2289 msgid ""
2290 "The B<pthread_attr_getguardsize>()  function returns the guard size "
2291 "attribute of the thread attributes object referred to by I<attr> in the "
2292 "buffer pointed to by I<guardsize>."
2293 msgstr ""
2294 "B<pthread_attr_getguardsize>() は、\n"
2295 "スレッド属性オブジェクト I<attr> の guard size 属性を\n"
2296 "I<guardsize> が指すバッファに入れて返す。"
2297
2298 #. type: Plain text
2299 #: build/C/man3/pthread_attr_setguardsize.3:104
2300 msgid ""
2301 "POSIX.1-2001 documents an B<EINVAL> error if I<attr> or I<guardsize> is "
2302 "invalid.  On Linux these functions always succeed (but portable and future-"
2303 "proof applications should nevertheless handle a possible error return)."
2304 msgstr ""
2305 "POSIX.1-2001 では、エラー B<EINVAL> が\n"
2306 " I<attr> か I<guardsize> が無効な場合に対して規定されている。\n"
2307 "Linux では、これらの関数は常に成功する\n"
2308 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2309 "正のエラーの返り値を処理するようにすべきである)。"
2310
2311 #. type: Plain text
2312 #: build/C/man3/pthread_attr_setguardsize.3:106
2313 #: build/C/man3/pthread_attr_setstackaddr.3:83
2314 #: build/C/man3/pthread_attr_setstacksize.3:83
2315 msgid "These functions are provided by glibc since version 2.1."
2316 msgstr "これらの関数は glibc バージョン 2.1 以降で提供されている。"
2317
2318 #. type: Plain text
2319 #: build/C/man3/pthread_attr_setguardsize.3:122
2320 msgid ""
2321 "A guard area consists of virtual memory pages that are protected to prevent "
2322 "read and write access.  If a thread overflows its stack into the guard area, "
2323 "then, on most hard architectures, it receives a B<SIGSEGV> signal, thus "
2324 "notifying it of the overflow.  Guard areas start on page boundaries, and the "
2325 "guard size is internally rounded up to the system page size when creating a "
2326 "thread.  (Nevertheless, B<pthread_attr_getguardsize>()  returns the guard "
2327 "size that was set by B<pthread_attr_setguardsize>().)"
2328 msgstr ""
2329 "ガード領域は、読み出し/書き込みアクセスが行われないように保護がかけ\n"
2330 "られた仮想メモリページで構成で構成される。スレッドがスタックをガード\n"
2331 "領域までオーバーフローさせた場合、ほとんどのハードウェアアーキテクチャ\n"
2332 "では、スレッドに B<SIGSEGV> シグナルが送られ、オーバーフローが発生した\n"
2333 "ことが通知される。ガード領域はページ境界から開始され、ガード領域の\n"
2334 "大きさはスレッド作成時に内部的にシステムのページサイズに切り上げられる\n"
2335 "(その場合も B<pthread_attr_getguardsize>() では\n"
2336 "B<pthread_attr_setguardsize>() で設定された guard size が返される)。"
2337
2338 #. type: Plain text
2339 #: build/C/man3/pthread_attr_setguardsize.3:126
2340 msgid ""
2341 "Setting a guard size of 0 may be useful to save memory in an application "
2342 "that creates many threads and knows that stack overflow can never occur."
2343 msgstr ""
2344 "多くのスレッドを作成するアプリケーションで、かつ、スタックオーバーフロー\n"
2345 "が決して発生しないことが分かっている場合には、guard size を 0 に設定\n"
2346 "することで、メモリを節約できることもある。"
2347
2348 #. type: Plain text
2349 #: build/C/man3/pthread_attr_setguardsize.3:130
2350 msgid ""
2351 "Choosing a guard size larger than the default size may be necessary for "
2352 "detecting stack overflows if a thread allocates large data structures on the "
2353 "stack."
2354 msgstr ""
2355 "スレッドがスタックに大きなデータ構造を割り当てる場合には、\n"
2356 "スタックオーバーフローを検出するためには、デフォルトサイズよりも\n"
2357 "大きな guard size を選ぶ必要があるかもしれない。"
2358
2359 #. type: SH
2360 #: build/C/man3/pthread_attr_setguardsize.3:130
2361 #: build/C/man3/pthread_attr_setinheritsched.3:103
2362 #: build/C/man3/pthread_attr_setstacksize.3:96
2363 #: build/C/man3/pthread_create.3:196 build/C/man3/pthread_exit.3:93
2364 #, no-wrap
2365 msgid "BUGS"
2366 msgstr "バグ"
2367
2368 #. type: Plain text
2369 #: build/C/man3/pthread_attr_setguardsize.3:141
2370 msgid ""
2371 "As at glibc 2.8, the NPTL threading implementation includes the guard area "
2372 "within the stack size allocation, rather than allocating extra space at the "
2373 "end of the stack, as POSIX.1 requires.  (This can result in an B<EINVAL> "
2374 "error from B<pthread_create>(3)  if the guard size value is too large, "
2375 "leaving no space for the actual stack.)"
2376 msgstr ""
2377 "glibc 2.8 の時点では、 NPTL スレッド実装ではガード領域はスタックサイズ\n"
2378 "で割り当てられる領域の中に含まれている。一方、POSIX.1 では、スタックの\n"
2379 "末尾に追加の領域を割り当てることが求められている。\n"
2380 "(このため、ガード領域が大きすぎて、\n"
2381 "実際のスタック用の場所がなくなってしまう場合、\n"
2382 "B<pthread_create>(3) で B<EINVAL> エラーが発生することになる。)"
2383
2384 #.  glibc includes the guardsize within the allocated stack size,
2385 #.  which looks pretty clearly to be in violation of POSIX.
2386 #.  Filed bug, 22 Oct 2008:
2387 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
2388 #.  Older reports:
2389 #.  https//bugzilla.redhat.com/show_bug.cgi?id=435337
2390 #.  Reportedly, LinuxThreads did the right thing, allocating
2391 #.  extra space at the end of the stack:
2392 #.  http://sourceware.org/ml/libc-alpha/2008-05/msg00086.html
2393 #. type: Plain text
2394 #: build/C/man3/pthread_attr_setguardsize.3:155
2395 msgid ""
2396 "The obsolete LinuxThreads implementation did the right thing, allocating "
2397 "extra space at the end of the stack for the guard area."
2398 msgstr ""
2399 "廃止予定の LinuxThreads 実装では、\n"
2400 "POSIX.1 で求められている通りの動作で、\n"
2401 "ガード領域がスタックの末尾に追加の領域が割り当てられる。"
2402
2403 #. type: Plain text
2404 #: build/C/man3/pthread_attr_setguardsize.3:158
2405 msgid "See B<pthread_getattr_np>(3)."
2406 msgstr "B<pthread_getattr_np>(3) を参照。"
2407
2408 #. type: Plain text
2409 #: build/C/man3/pthread_attr_setguardsize.3:166
2410 msgid ""
2411 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2412 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2413 msgstr ""
2414 "B<mmap>(2), B<mprotect>(2), B<pthread_attr_init>(3), B<pthread_attr_setstack>"
2415 "(3), B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
2416
2417 #. type: TH
2418 #: build/C/man3/pthread_attr_setinheritsched.3:26
2419 #, no-wrap
2420 msgid "PTHREAD_ATTR_SETINHERITSCHED"
2421 msgstr "PTHREAD_ATTR_SETINHERITSCHED"
2422
2423 #. type: TH
2424 #: build/C/man3/pthread_attr_setinheritsched.3:26
2425 #: build/C/man3/pthread_attr_setschedparam.3:26
2426 #: build/C/man3/pthread_attr_setstacksize.3:26
2427 #, no-wrap
2428 msgid "2012-03-15"
2429 msgstr "2012-03-15"
2430
2431 #. type: Plain text
2432 #: build/C/man3/pthread_attr_setinheritsched.3:30
2433 msgid ""
2434 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - set/get inherit "
2435 "scheduler attribute in thread attributes object"
2436 msgstr ""
2437 "pthread_attr_setinheritsched, pthread_attr_getinheritsched - \n"
2438 "スレッド属性オブジェクトの inherit scheduler 属性の設定/取得を行う"
2439
2440 #. type: Plain text
2441 #: build/C/man3/pthread_attr_setinheritsched.3:38
2442 #, no-wrap
2443 msgid ""
2444 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2445 "B<                                 int >I<inheritsched>B<);>\n"
2446 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2447 "B<                                 int *>I<inheritsched>B<);>\n"
2448 msgstr ""
2449 "B<int pthread_attr_setinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2450 "B<                                 int >I<inheritsched>B<);>\n"
2451 "B<int pthread_attr_getinheritsched(pthread_attr_t *>I<attr>B<,>\n"
2452 "B<                                 int *>I<inheritsched>B<);>\n"
2453
2454 #. type: Plain text
2455 #: build/C/man3/pthread_attr_setinheritsched.3:55
2456 msgid ""
2457 "The B<pthread_attr_setinheritsched>()  function sets the inherit scheduler "
2458 "attribute of the thread attributes object referred to by I<attr> to the "
2459 "value specified in I<inheritsched>.  The inherit scheduler attribute "
2460 "determines whether a thread created using the thread attributes object "
2461 "I<attr> will inherit its scheduling attributes from the calling thread or "
2462 "whether it will take them from I<attr>."
2463 msgstr ""
2464 "B<pthread_attr_setinheritsched>() 関数は、\n"
2465 "I<attr> が参照するスレッド属性オブジェクトの inherit scheduler 属性を\n"
2466 "I<inheritsched> で指定された値に設定する。\n"
2467 "inherit scheduler 属性により、スレッド属性オブジェクト I<attr> を使って\n"
2468 "作成されるスレッドが、呼び出したスレッドのスケジューリング属性を継承\n"
2469 "するか、I<attr> からスケジューリング属性を取得するかが決定される。"
2470
2471 #. type: Plain text
2472 #: build/C/man3/pthread_attr_setinheritsched.3:58
2473 msgid "The following values may be specified in I<inheritsched>:"
2474 msgstr "以下の値を I<inheritsched> に指定できる。"
2475
2476 #. type: TP
2477 #: build/C/man3/pthread_attr_setinheritsched.3:58
2478 #, no-wrap
2479 msgid "B<PTHREAD_INHERIT_SCHED>"
2480 msgstr "B<PTHREAD_INHERIT_SCHED>"
2481
2482 #. type: Plain text
2483 #: build/C/man3/pthread_attr_setinheritsched.3:66
2484 msgid ""
2485 "Threads that are created using I<attr> inherit scheduling attributes from "
2486 "the creating thread; the scheduling attributes in I<attr> are ignored."
2487 msgstr ""
2488 "I<attr> を使って作成されたスレッドは、\n"
2489 "スレッドを作成するスレッドからスケジューリング属性を継承する。\n"
2490 "I<attr> 内のスケジューリング属性は無視される。"
2491
2492 #. type: TP
2493 #: build/C/man3/pthread_attr_setinheritsched.3:66
2494 #, no-wrap
2495 msgid "B<PTHREAD_EXPLICIT_SCHED>"
2496 msgstr "B<PTHREAD_EXPLICIT_SCHED>"
2497
2498 #.  FIXME what are the defaults for scheduler settings?
2499 #. type: Plain text
2500 #: build/C/man3/pthread_attr_setinheritsched.3:73
2501 msgid ""
2502 "Threads that are created using I<attr> take their scheduling attributes from "
2503 "the values specified by the attributes object."
2504 msgstr ""
2505 "I<attr> を使って作成されたスレッドは、スレッド属性オブジェクトで\n"
2506 "指定された値からスケジューリング属性を取得する。"
2507
2508 #. type: Plain text
2509 #: build/C/man3/pthread_attr_setinheritsched.3:77
2510 msgid ""
2511 "The default setting of the inherit scheduler attribute in a newly "
2512 "initialized thread attributes object is B<PTHREAD_INHERIT_SCHED>."
2513 msgstr ""
2514 "新たに初期化されたスレッド属性オブジェクトの inherit scheduler 属性の\n"
2515 "デフォルト設定は B<PTHREAD_INHERIT_SCHED> である。"
2516
2517 #. type: Plain text
2518 #: build/C/man3/pthread_attr_setinheritsched.3:84
2519 msgid ""
2520 "The B<pthread_attr_getinheritsched>()  returns the inherit scheduler "
2521 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2522 "by I<inheritsched>."
2523 msgstr ""
2524 "B<pthread_attr_getinheritsched>() は、\n"
2525 "スレッド属性オブジェクト I<attr> の inherit scheduler 属性を\n"
2526 "I<inheritsched> が指すバッファに入れて返す。"
2527
2528 #. type: Plain text
2529 #: build/C/man3/pthread_attr_setinheritsched.3:90
2530 msgid "B<pthread_attr_setinheritsched>()  can fail with the following error:"
2531 msgstr "B<pthread_attr_setinheritsched>() は以下のエラーで失敗する場合がある。"
2532
2533 #. type: Plain text
2534 #: build/C/man3/pthread_attr_setinheritsched.3:94
2535 msgid "Invalid value in I<inheritsched>."
2536 msgstr "I<inheritsched> に無効な値が指定された。"
2537
2538 #.  .SH VERSIONS
2539 #.  Available since glibc 2.0.
2540 #. type: Plain text
2541 #: build/C/man3/pthread_attr_setinheritsched.3:101
2542 msgid ""
2543 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2544 "to set the attribute to an unsupported value\") for "
2545 "B<pthread_attr_setinheritsched>()."
2546 msgstr ""
2547 "POSIX.1-2001 では、 B<pthread_attr_setinheritsched>() に関して\n"
2548 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2549 "も追加で規定されている。"
2550
2551 #.  FIXME . Track status of the following bug:
2552 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7007
2553 #. type: Plain text
2554 #: build/C/man3/pthread_attr_setinheritsched.3:119
2555 msgid ""
2556 "As at glibc 2.8, if a thread attributes object is initialized using "
2557 "B<pthread_attr_init>(3), then the scheduling policy of the attributes object "
2558 "is set to B<SCHED_OTHER> and the scheduling priority is set to 0.  However, "
2559 "if the inherit scheduler attribute is then set to B<PTHREAD_EXPLICIT_SCHED>, "
2560 "then a thread created using the attribute object wrongly inherits its "
2561 "scheduling attributes from the creating thread.  This bug does not occur if "
2562 "either the scheduling policy or scheduling priority attribute is explicitly "
2563 "set in the thread attributes object before calling B<pthread_create>(3)."
2564 msgstr ""
2565 "glibc 2.8 の時点では、スレッド属性オブジェクトが\n"
2566 "B<pthread_attr_init>(3) を使って初期化された場合、\n"
2567 "スレッド属性オブジェクトのスケジューリングポリシーが B<SCHED_OTHER> に、\n"
2568 "スケジューリング優先度が 0 に設定される。一方、その後 inherit\n"
2569 "scheduling 属性に B<PTHREAD_EXPLICIT_SCHED> が設定されると、このスレッ\n"
2570 "ド属性オブジェクトを使って作成されたスレッドでは、スレッドを作成するス\n"
2571 "レッドのスケジューリング属性が間違って継承されてしまう。\n"
2572 "B<pthread_create>(3) を呼び出す前にスケジューリングポリシー属性か\n"
2573 "スケジューリング優先度属性のどちらかが明示的に設定された場合には、\n"
2574 "このバグは発生しない。"
2575
2576 #. type: Plain text
2577 #: build/C/man3/pthread_attr_setinheritsched.3:122
2578 #: build/C/man3/pthread_attr_setschedparam.3:98
2579 #: build/C/man3/pthread_attr_setschedpolicy.3:94
2580 msgid "See B<pthread_setschedparam>(3)."
2581 msgstr "B<pthread_setschedparam>(3) を参照。"
2582
2583 #. type: Plain text
2584 #: build/C/man3/pthread_attr_setinheritsched.3:133
2585 msgid ""
2586 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2587 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2588 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2589 "(3), B<pthreads>(7)"
2590 msgstr ""
2591 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2592 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
2593 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2594 "(3), B<pthreads>(7)"
2595
2596 #. type: TH
2597 #: build/C/man3/pthread_attr_setschedparam.3:26
2598 #, no-wrap
2599 msgid "PTHREAD_ATTR_SETSCHEDPARAM"
2600 msgstr "PTHREAD_ATTR_SETSCHEDPARAM"
2601
2602 #. type: Plain text
2603 #: build/C/man3/pthread_attr_setschedparam.3:30
2604 msgid ""
2605 "pthread_attr_setschedparam, pthread_attr_getschedparam - set/get scheduling "
2606 "parameter attributes in thread attributes object"
2607 msgstr ""
2608 "pthread_attr_setschedparam, pthread_attr_getschedparam - \n"
2609 "スレッド属性オブジェクトのスケジューリングパラメータ属性の設定/取得を行う"
2610
2611 #. type: Plain text
2612 #: build/C/man3/pthread_attr_setschedparam.3:38
2613 #, no-wrap
2614 msgid ""
2615 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2616 "B<                               const struct sched_param *>I<param>B<);>\n"
2617 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2618 "B<                               struct sched_param *>I<param>B<);>\n"
2619 msgstr ""
2620 "B<int pthread_attr_setschedparam(pthread_attr_t *>I<attr>B<,>\n"
2621 "B<                               const struct sched_param *>I<param>B<);>\n"
2622 "B<int pthread_attr_getschedparam(pthread_attr_t *>I<attr>B<,>\n"
2623 "B<                               struct sched_param *>I<param>B<);>\n"
2624
2625 #. type: Plain text
2626 #: build/C/man3/pthread_attr_setschedparam.3:52
2627 msgid ""
2628 "The B<pthread_attr_setschedparam>()  function sets the scheduling parameter "
2629 "attributes of the thread attributes object referred to by I<attr> to the "
2630 "values specified in the buffer pointed to by I<param>.  These attributes "
2631 "determine the scheduling parameters of a thread created using the thread "
2632 "attributes object I<attr>."
2633 msgstr ""
2634 "B<pthread_attr_setschedparam>() 関数は、\n"
2635 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2636 "パラメータ属性を I<param> が指すバッファで指定された値に設定する。\n"
2637 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
2638 "作成されるスレッドのスケジューリングパラメータが決定される。"
2639
2640 #. type: Plain text
2641 #: build/C/man3/pthread_attr_setschedparam.3:59
2642 msgid ""
2643 "The B<pthread_attr_getschedparam>()  returns the scheduling parameter "
2644 "attributes of the thread attributes object I<attr> in the buffer pointed to "
2645 "by I<param>."
2646 msgstr ""
2647 "B<pthread_attr_getschedparam>() は、\n"
2648 "スレッド属性オブジェクト I<attr> のスケジューリングパラメータ属性を\n"
2649 "I<param> が指すバッファに入れて返す。"
2650
2651 #. type: Plain text
2652 #: build/C/man3/pthread_attr_setschedparam.3:61
2653 msgid "Scheduling parameters are maintained in the following structure:"
2654 msgstr "スケジューリングパラメータは以下の構造体で管理される。"
2655
2656 #. type: Plain text
2657 #: build/C/man3/pthread_attr_setschedparam.3:67
2658 #: build/C/man3/pthread_setschedparam.3:69
2659 #, no-wrap
2660 msgid ""
2661 "struct sched_param {\n"
2662 "    int sched_priority;     /* Scheduling priority */\n"
2663 "};\n"
2664 msgstr ""
2665 "struct sched_param {\n"
2666 "    int sched_priority;     /* Scheduling priority */\n"
2667 "};\n"
2668
2669 #. type: Plain text
2670 #: build/C/man3/pthread_attr_setschedparam.3:74
2671 #: build/C/man3/pthread_setschedparam.3:76
2672 msgid ""
2673 "As can be seen, only one scheduling parameter is supported.  For details of "
2674 "the permitted ranges for scheduling priorities in each scheduling policy, "
2675 "see B<sched_setscheduler>(2)."
2676 msgstr ""
2677 "見て分かる通り、サポートされているスケジューリングパラメータは一つだけ\n"
2678 "である。各スケジューリングポリシーで許可されるスケジューリング優先度の\n"
2679 "詳細については、B<sched_setscheduler>(2) を参照のこと。"
2680
2681 #.  .SH VERSIONS
2682 #.  Available since glibc 2.0.
2683 #. type: Plain text
2684 #: build/C/man3/pthread_attr_setschedparam.3:89
2685 msgid ""
2686 "POSIX.1 documents B<EINVAL> and B<ENOTSUP> errors for "
2687 "B<pthread_attr_setschedparam>().  On Linux these functions always succeed "
2688 "(but portable and future-proof applications should nevertheless handle a "
2689 "possible error return)."
2690 msgstr ""
2691 "POSIX.1 では、\n"
2692 "B<pthread_attr_setschedparam>() について\n"
2693 "B<EINVAL> と B<ENOTSUP> が規定されている。\n"
2694 "Linux では、これらの関数は常に成功する\n"
2695 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
2696 "正のエラーの返り値を処理するようにすべきである)。"
2697
2698 #. type: Plain text
2699 #: build/C/man3/pthread_attr_setschedparam.3:95
2700 msgid ""
2701 "See B<pthread_attr_setschedpolicy>(3)  for a list of the thread scheduling "
2702 "policies supported on Linux."
2703 msgstr ""
2704 "Linux でサポートされているスレッドのスケジューリングポリシーのリストに\n"
2705 "ついては、 B<pthread_attr_setschedpolicy>(3) を参照。"
2706
2707 #. type: Plain text
2708 #: build/C/man3/pthread_attr_setschedparam.3:110
2709 msgid ""
2710 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2711 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2712 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2713 "(3), B<pthreads>(7)"
2714 msgstr ""
2715 "B<sched_get_priority_min>(2), B<sched_setscheduler>(2), B<pthread_attr_init>"
2716 "(3), B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedpolicy>(3), "
2717 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2718 "(3), B<pthreads>(7)"
2719
2720 #. type: TH
2721 #: build/C/man3/pthread_attr_setschedpolicy.3:26
2722 #, no-wrap
2723 msgid "PTHREAD_ATTR_SETSCHEDPOLICY"
2724 msgstr "PTHREAD_ATTR_SETSCHEDPOLICY"
2725
2726 #. type: Plain text
2727 #: build/C/man3/pthread_attr_setschedpolicy.3:30
2728 msgid ""
2729 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - set/get "
2730 "scheduling policy attribute in thread attributes object"
2731 msgstr ""
2732 "pthread_attr_setschedpolicy, pthread_attr_getschedpolicy - スレッド属性\n"
2733 "オブジェクトのスケジューリングポリシー属性の設定/取得を行う"
2734
2735 #. type: Plain text
2736 #: build/C/man3/pthread_attr_setschedpolicy.3:38
2737 #, no-wrap
2738 msgid ""
2739 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2740 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2741 msgstr ""
2742 "B<int pthread_attr_setschedpolicy(pthread_attr_t *>I<attr>B<, int >I<policy>B<);>\n"
2743 "B<int pthread_attr_getschedpolicy(pthread_attr_t *>I<attr>B<, int >I<*policy>B<);>\n"
2744
2745 #. type: Plain text
2746 #: build/C/man3/pthread_attr_setschedpolicy.3:52
2747 msgid ""
2748 "The B<pthread_attr_setschedpolicy>()  function sets the scheduling policy "
2749 "attribute of the thread attributes object referred to by I<attr> to the "
2750 "value specified in I<policy>.  This attribute determines the scheduling "
2751 "policy of a thread created using the thread attributes object I<attr>."
2752 msgstr ""
2753 "B<pthread_attr_setschedpolicy>() 関数は、\n"
2754 "I<attr> が参照するスレッド属性オブジェクトのスケジューリング\n"
2755 "ポリシー属性を I<policy> で指定された値に設定する。\n"
2756 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
2757 "作成されるスレッドのスケジューリングポリシーが決定される。"
2758
2759 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
2760 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
2761 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
2762 #. type: Plain text
2763 #: build/C/man3/pthread_attr_setschedpolicy.3:65
2764 msgid ""
2765 "The supported values for I<policy> are B<SCHED_FIFO>, B<SCHED_RR>, and "
2766 "B<SCHED_OTHER>, with the semantics described in B<sched_setscheduler>(2)."
2767 msgstr ""
2768 "I<policy> に指定できる値は B<SCHED_FIFO>, B<SCHED_RR>, B<SCHED_OTHER>\n"
2769 "である。それぞれの意味は B<sched_setscheduler>(2) で説明している通り\n"
2770 "である。"
2771
2772 #. type: Plain text
2773 #: build/C/man3/pthread_attr_setschedpolicy.3:72
2774 msgid ""
2775 "The B<pthread_attr_getschedpolicy>()  returns the scheduling policy "
2776 "attribute of the thread attributes object I<attr> in the buffer pointed to "
2777 "by I<policy>."
2778 msgstr ""
2779 "B<pthread_attr_getschedpolicy>() は、\n"
2780 "スレッド属性オブジェクト I<attr> のスケジューリングポリシー属性を\n"
2781 "I<policy> が指すバッファに入れて返す。"
2782
2783 #. type: Plain text
2784 #: build/C/man3/pthread_attr_setschedpolicy.3:78
2785 msgid "B<pthread_attr_setschedpolicy>()  can fail with the following error:"
2786 msgstr "B<pthread_attr_setschedpolicy>() は以下のエラーで失敗する場合がある。"
2787
2788 #. type: Plain text
2789 #: build/C/man3/pthread_attr_setschedpolicy.3:82
2790 msgid "Invalid value in I<policy>."
2791 msgstr "I<policy> に無効な値が指定された。"
2792
2793 #.  .SH VERSIONS
2794 #.  Available since glibc 2.0.
2795 #. type: Plain text
2796 #: build/C/man3/pthread_attr_setschedpolicy.3:89
2797 msgid ""
2798 "POSIX.1-2001 also documents an optional B<ENOTSUP> error (\"attempt was made "
2799 "to set the attribute to an unsupported value\") for "
2800 "B<pthread_attr_setschedpolicy>()."
2801 msgstr ""
2802 "POSIX.1-2001 では、 B<pthread_attr_setschedpolicy>() に関して\n"
2803 "エラー B<ENOTSUP> (\"サポートされていない値を属性に設定しようとした\")\n"
2804 "も追加で規定されている。"
2805
2806 #. type: Plain text
2807 #: build/C/man3/pthread_attr_setschedpolicy.3:105
2808 msgid ""
2809 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2810 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2811 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2812 "(3), B<pthreads>(7)"
2813 msgstr ""
2814 "B<sched_setscheduler>(2), B<pthread_attr_init>(3), "
2815 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2816 "B<pthread_create>(3), B<pthread_setschedparam>(3), B<pthread_setschedprio>"
2817 "(3), B<pthreads>(7)"
2818
2819 #. type: TH
2820 #: build/C/man3/pthread_attr_setscope.3:26
2821 #, no-wrap
2822 msgid "PTHREAD_ATTR_SETSCOPE"
2823 msgstr "PTHREAD_ATTR_SETSCOPE"
2824
2825 #. type: Plain text
2826 #: build/C/man3/pthread_attr_setscope.3:30
2827 msgid ""
2828 "pthread_attr_setscope, pthread_attr_getscope - set/get contention scope "
2829 "attribute in thread attributes object"
2830 msgstr ""
2831 "pthread_attr_setscope, pthread_attr_getscope - \n"
2832 "スレッド属性オブジェクトの contention scope 属性の設定/取得を行う"
2833
2834 #. type: Plain text
2835 #: build/C/man3/pthread_attr_setscope.3:38
2836 #, no-wrap
2837 msgid ""
2838 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2839 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2840 msgstr ""
2841 "B<int pthread_attr_setscope(pthread_attr_t *>I<attr>B<, int >I<scope>B<);>\n"
2842 "B<int pthread_attr_getscope(pthread_attr_t *>I<attr>B<, int *>I<scope>B<);>\n"
2843
2844 #. type: Plain text
2845 #: build/C/man3/pthread_attr_setscope.3:53
2846 msgid ""
2847 "The B<pthread_attr_setscope>()  function sets the contention scope attribute "
2848 "of the thread attributes object referred to by I<attr> to the value "
2849 "specified in I<scope>.  The contention scope attribute defines the set of "
2850 "threads against which a thread competes for resources such as the CPU.  "
2851 "POSIX.1-2001 specifies two possible values for I<scope>:"
2852 msgstr ""
2853 "B<pthread_attr_setscope>() 関数は、\n"
2854 "I<attr> が参照するスレッド属性オブジェクトの contention scope\n"
2855 "属性を I<scope> で指定された値に設定する。\n"
2856 "contention scope 属性により、\n"
2857 "スレッドが CPU などのリソースを取り合うスレッド集合が規定される。\n"
2858 "POSIX.1-2001 では I<scope> に指定する値として 2 つの値が規定されている。"
2859
2860 #. type: TP
2861 #: build/C/man3/pthread_attr_setscope.3:53
2862 #, no-wrap
2863 msgid "B<PTHREAD_SCOPE_SYSTEM>"
2864 msgstr "B<PTHREAD_SCOPE_SYSTEM>"
2865
2866 #. type: Plain text
2867 #: build/C/man3/pthread_attr_setscope.3:61
2868 msgid ""
2869 "The thread competes for resources with all other threads in all processes on "
2870 "the system that are in the same scheduling allocation domain (a group of one "
2871 "or more processors).  B<PTHREAD_SCOPE_SYSTEM> threads are scheduled relative "
2872 "to one another according to their scheduling policy and priority."
2873 msgstr ""
2874 "スレッドは、同じスケジューリング割り当てドメイン (一つ以上のプロセッサ\n"
2875 "のグループ) にある、システム上の全てのプロセスの自分以外の全ての\n"
2876 "スレッドとリソースを取り合う。 \n"
2877 "B<PTHREAD_SCOPE_SYSTEM> のスレッドは、スケジューリングポリシーと\n"
2878 "優先度に基づき、互いに相対的にスケジューリングされる。"
2879
2880 #. type: TP
2881 #: build/C/man3/pthread_attr_setscope.3:61
2882 #, no-wrap
2883 msgid "B<PTHREAD_SCOPE_PROCESS>"
2884 msgstr "B<PTHREAD_SCOPE_PROCESS>"
2885
2886 #. type: Plain text
2887 #: build/C/man3/pthread_attr_setscope.3:76
2888 msgid ""
2889 "The thread competes for resources with all other threads in the same process "
2890 "that were also created with the B<PTHREAD_SCOPE_PROCESS> contention scope.  "
2891 "B<PTHREAD_SCOPE_PROCESS> threads are scheduled relative to other threads in "
2892 "the process according to their scheduling policy and priority.  POSIX.1-2001 "
2893 "leaves it unspecified how these threads contend with other threads in other "
2894 "process on the system or with other threads in the same process that were "
2895 "created with the B<PTHREAD_SCOPE_SYSTEM> contention scope."
2896 msgstr ""
2897 "スレッドは、contention scope が B<PTHREAD_SCOPE_PROCESS> で作成された\n"
2898 "同じプロセスの自分以外の全てのスレッドとリソースを取り合う。\n"
2899 "B<PTHREAD_SCOPE_PROCESS> のスレッドは、スケジューリングポリシーと優先度\n"
2900 "に基づき、同じプロセスの他のスレッドと相対的にスケジューリングされる。\n"
2901 "POSIX.1-2001 では、これらのスレッドがシステム上の他のプロセスのスレッド\n"
2902 "や同じプロセス内の contention scope が B<PTHREAD_SCOPE_SYSTEM> で作成\n"
2903 "された他のスレッドとどのようにリソースを取り合うかは、\n"
2904 "規定されないままになっている。"
2905
2906 #. type: Plain text
2907 #: build/C/man3/pthread_attr_setscope.3:83
2908 msgid ""
2909 "POSIX.1-2001 only requires that an implementation support one of these "
2910 "contention scopes, but permits both to be supported.  Linux supports "
2911 "B<PTHREAD_SCOPE_SYSTEM>, but not B<PTHREAD_SCOPE_PROCESS>."
2912 msgstr ""
2913 "POSIX.1-2001 で求められているのは、スレッド実装がこれらの contention\n"
2914 "scope のうち 1 つをサポートすることだけであるが、\n"
2915 "両方をサポートすることも認めている。\n"
2916 "Linux は B<PTHREAD_SCOPE_SYSTEM> をサポートしているが、\n"
2917 "B<PTHREAD_SCOPE_PROCESS> はサポートしていない。"
2918
2919 #. type: Plain text
2920 #: build/C/man3/pthread_attr_setscope.3:91
2921 msgid ""
2922 "The B<pthread_attr_getscope>()  function returns the contention scope "
2923 "attribute of the thread attributes object referred to by I<attr> in the "
2924 "buffer pointed to by I<scope>."
2925 msgstr ""
2926 "B<pthread_attr_getscope>() は、\n"
2927 "スレッド属性オブジェクト I<attr> の contention scope 属性を\n"
2928 "I<scope> が指すバッファに入れて返す。"
2929
2930 #. type: Plain text
2931 #: build/C/man3/pthread_attr_setscope.3:97
2932 msgid "B<pthread_attr_setscope>()  can fail with the following errors:"
2933 msgstr "B<pthread_attr_setscope>() は以下のエラーで失敗する場合がある。"
2934
2935 #. type: Plain text
2936 #: build/C/man3/pthread_attr_setscope.3:101
2937 msgid "An invalid value was specified in I<scope>."
2938 msgstr "I<scope> に無効な値が指定された。"
2939
2940 #. type: TP
2941 #: build/C/man3/pthread_attr_setscope.3:101
2942 #, no-wrap
2943 msgid "B<ENOTSUP>"
2944 msgstr "B<ENOTSUP>"
2945
2946 #. type: Plain text
2947 #: build/C/man3/pthread_attr_setscope.3:107
2948 msgid ""
2949 "I<scope> specified the value B<PTHREAD_SCOPE_PROCESS>, which is not "
2950 "supported on Linux."
2951 msgstr ""
2952 "I<scope> に値 B<PTHREAD_SCOPE_PROCESS> が指定された。\n"
2953 "この値は Linux でサポートされていない。"
2954
2955 #. type: Plain text
2956 #: build/C/man3/pthread_attr_setscope.3:117
2957 #, fuzzy
2958 #| msgid ""
2959 #| "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a "
2960 #| "userspace thread is bound directly to a single kernel-scheduling entity.  "
2961 #| "This is the case on Linux for the obsolete LinuxThreads implementation "
2962 #| "and the modern NPTL implementation, which are both 1:1 threading "
2963 #| "implementations."
2964 msgid ""
2965 "The B<PTHREAD_SCOPE_SYSTEM> contention scope typically indicates that a user-"
2966 "space thread is bound directly to a single kernel-scheduling entity.  This "
2967 "is the case on Linux for the obsolete LinuxThreads implementation and the "
2968 "modern NPTL implementation, which are both 1:1 threading implementations."
2969 msgstr ""
2970 "B<PTHREAD_SCOPE_SYSTEM> contention scope では、通常は、一つの\n"
2971 "ユーザ空間スレッドは一つのカーネルスケジューリング・エンティティに\n"
2972 "直接結び付けられる。\n"
2973 "Linux では、廃止予定の LinuxThreads 実装も新しい NPTL 実装もこれに\n"
2974 "該当し、両方とも 1:1 で結び付けられるスレッド実装となっている。"
2975
2976 #. type: Plain text
2977 #: build/C/man3/pthread_attr_setscope.3:120
2978 msgid ""
2979 "POSIX.1-2001 specifies that the default contention scope is implementation-"
2980 "defined."
2981 msgstr ""
2982 "POSIX.1-2001 では、 contention scope 属性のデフォルト値は\n"
2983 "実装時で定義されるものと規定されている。"
2984
2985 #. type: Plain text
2986 #: build/C/man3/pthread_attr_setscope.3:130
2987 msgid ""
2988 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2989 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2990 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2991 msgstr ""
2992 "B<pthread_attr_init>(3), B<pthread_attr_setaffinity_np>(3), "
2993 "B<pthread_attr_setinheritsched>(3), B<pthread_attr_setschedparam>(3), "
2994 "B<pthread_attr_setschedpolicy>(3), B<pthread_create>(3), B<pthreads>(7)"
2995
2996 #. type: TH
2997 #: build/C/man3/pthread_attr_setstack.3:26
2998 #, no-wrap
2999 msgid "PTHREAD_ATTR_SETSTACK"
3000 msgstr "PTHREAD_ATTR_SETSTACK"
3001
3002 #. type: Plain text
3003 #: build/C/man3/pthread_attr_setstack.3:30
3004 msgid ""
3005 "pthread_attr_setstack, pthread_attr_getstack - set/get stack attributes in "
3006 "thread attributes object"
3007 msgstr ""
3008 "pthread_attr_setstack, pthread_attr_getstack - \n"
3009 "スレッド属性オブジェクトのスタック属性の設定/取得を行う"
3010
3011 #. type: Plain text
3012 #: build/C/man3/pthread_attr_setstack.3:38
3013 #, no-wrap
3014 msgid ""
3015 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3016 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3017 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3018 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3019 msgstr ""
3020 "B<int pthread_attr_setstack(pthread_attr_t *>I<attr>B<,>\n"
3021 "B<                          void *>I<stackaddr>B<, size_t >I<stacksize>B<);>\n"
3022 "B<int pthread_attr_getstack(pthread_attr_t *>I<attr>B<,>\n"
3023 "B<                          void **>I<stackaddr>B<, size_t *>I<stacksize>B<);>\n"
3024
3025 #. type: Plain text
3026 #: build/C/man3/pthread_attr_setstack.3:45 build/C/man3/pthread_sigqueue.3:41
3027 msgid ""
3028 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
3029 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
3030
3031 #. type: Plain text
3032 #: build/C/man3/pthread_attr_setstack.3:50
3033 msgid "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3034 msgstr "B<pthread_attr_getstack>(), B<pthread_attr_setstack>():"
3035
3036 #. type: Plain text
3037 #: build/C/man3/pthread_attr_setstack.3:52
3038 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3039 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3040
3041 #. type: Plain text
3042 #: build/C/man3/pthread_attr_setstack.3:68
3043 msgid ""
3044 "The B<pthread_attr_setstack>()  function sets the stack address and stack "
3045 "size attributes of the thread attributes object referred to by I<attr> to "
3046 "the values specified in I<stackaddr> and I<stacksize>, respectively.  These "
3047 "attributes specify the location and size of the stack that should be used by "
3048 "a thread that is created using the thread attributes object I<attr>."
3049 msgstr ""
3050 "B<pthread_attr_setstack>() 関数は、\n"
3051 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス属性と\n"
3052 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> で\n"
3053 "指定された値に設定する。\n"
3054 "これらの属性により、スレッド属性オブジェクト I<attr> を使って\n"
3055 "作成されるスレッドが使用すべきスタックの位置とサイズが指定される。"
3056
3057 #. type: Plain text
3058 #: build/C/man3/pthread_attr_setstack.3:74
3059 msgid ""
3060 "I<stackaddr> should point to the lowest addressable byte of a buffer of "
3061 "I<stacksize> bytes that was allocated by the caller.  The pages of the "
3062 "allocated buffer should be both readable and writable."
3063 msgstr ""
3064 "I<stackaddr> は、呼び出し側で割り当てた、大きさが I<stacksize> バイトの\n"
3065 "バッファ内の指定できる最小のアドレスバイトを指すべきである。\n"
3066 "割り当てられたバッファのページは読み書き両方が可能なページとなっている\n"
3067 "べきである。"
3068
3069 #. type: Plain text
3070 #: build/C/man3/pthread_attr_setstack.3:85
3071 msgid ""
3072 "The B<pthread_attr_getstack>()  function returns the stack address and stack "
3073 "size attributes of the thread attributes object referred to by I<attr> in "
3074 "the buffers pointed to by I<stackaddr> and I<stacksize>, respectively."
3075 msgstr ""
3076 "B<pthread_attr_getstack>() 関数は、\n"
3077 "スレッド属性オブジェクト I<attr> のスタックアドレス属性と\n"
3078 "スタックサイズ属性をそれぞれ I<stackaddr> と I<stacksize> が\n"
3079 "指すバッファに入れて返す。"
3080
3081 #. type: Plain text
3082 #: build/C/man3/pthread_attr_setstack.3:91
3083 msgid "B<pthread_attr_setstack>()  can fail with the following error:"
3084 msgstr "B<pthread_attr_setstack>() は以下のエラーで失敗する場合がある。"
3085
3086 #. type: Plain text
3087 #: build/C/man3/pthread_attr_setstack.3:102
3088 msgid ""
3089 "I<stacksize> is less than B<PTHREAD_STACK_MIN> (16384) bytes.  On some "
3090 "systems, this error may also occur if I<stackaddr> or I<stackaddr\\ +\\ "
3091 "stacksize> is not suitably aligned."
3092 msgstr ""
3093 "I<stacksize> が B<PTHREAD_STACK_MIN> (16384) よりも小さい。\n"
3094 "システムによっては、 I<stackaddr> か\n"
3095 "I<stackaddr\\ +\\ stacksize> のアライメントが適切でない場合にも\n"
3096 "このエラーが発生する。"
3097
3098 #. type: Plain text
3099 #: build/C/man3/pthread_attr_setstack.3:110
3100 msgid ""
3101 "POSIX.1-2001 also documents an B<EACCES> error if the stack area described "
3102 "by I<stackaddr> and I<stacksize> is not both readable and writable by the "
3103 "caller."
3104 msgstr ""
3105 "POSIX.1-2001 では エラー B<EACCES> も規定されており、\n"
3106 "このエラーは I<stackaddr> と I<stacksize> で規定されるスタック領域に\n"
3107 "呼び出し側から読み書き両方のアクセスができない状況を表す。"
3108
3109 #. type: Plain text
3110 #: build/C/man3/pthread_attr_setstack.3:112
3111 msgid "These functions are provided by glibc since version 2.2."
3112 msgstr "これらの関数は glibc バージョン 2.2 以降で提供されている。"
3113
3114 #. type: Plain text
3115 #: build/C/man3/pthread_attr_setstack.3:122
3116 msgid ""
3117 "These functions are provided for applications that must ensure that a "
3118 "thread's stack is placed in a particular location.  For most applications, "
3119 "this is not necessary, and the use of these functions should be avoided.  "
3120 "(Use B<pthread_attr_setstacksize>(3)  if an application simply requires a "
3121 "stack size other than the default.)"
3122 msgstr ""
3123 "これらの関数は、スレッドのスタックが特定の場所に配置されることを保証\n"
3124 "しなければならないアプリケーションのために提供されている。\n"
3125 "ほとんどのアプリケーションでは、このようなことは必要なく、\n"
3126 "これらの関数を使うのは避けるべきである。\n"
3127 "(アプリケーションが単にスタックサイズだけをデフォルトの値から変更する\n"
3128 "必要がある場合には B<pthread_attr_setstacksize>(3) を使うこと)"
3129
3130 #. type: Plain text
3131 #: build/C/man3/pthread_attr_setstack.3:133
3132 msgid ""
3133 "When an application employs B<pthread_attr_setstack>(), it takes over the "
3134 "responsibility of allocating the stack.  Any guard size value that was set "
3135 "using B<pthread_attr_setguardsize>(3)  is ignored.  If deemed necessary, it "
3136 "is the application's responsibility to allocate a guard area (one or more "
3137 "pages protected against reading and writing)  to handle the possibility of "
3138 "stack overflow."
3139 msgstr ""
3140 "アプリケーションが B<pthread_attr_setstack>() を利用する際には、\n"
3141 "スタックの割り当てに責任を持つ必要がある。\n"
3142 "B<pthread_attr_setguardsize>(3) を使って設定された\n"
3143 "guard size の値は無視される。\n"
3144 "必要と思われる場合は、アプリケーションが責任を持ってガード領域 (読み書\n"
3145 "きが行われないように保護された 1 個かそれ以上のページ) の割り当てを行い、\n"
3146 "スタックオーバーフローの可能性に対処するようにする必要がある。"
3147
3148 #. type: Plain text
3149 #: build/C/man3/pthread_attr_setstack.3:144
3150 msgid ""
3151 "The address specified in I<stackaddr> should be suitably aligned: for full "
3152 "portability, align it on a page boundary (I<sysconf(_SC_PAGESIZE)>).  "
3153 "B<posix_memalign>(3)  may be useful for allocation.  Probably, I<stacksize> "
3154 "should also be a multiple of the system page size."
3155 msgstr ""
3156 "I<stackaddr> に指定するアドレスは適切なアライメントとなっているべきである。\n"
3157 "完全な移植性を持たせるためには、\n"
3158 "ページ境界 (I<sysconf(_SC_PAGESIZE)>) に揃えること。\n"
3159 "割り当てには B<posix_memalign>(3) を使うとよい。\n"
3160 "たいていは、 I<stacksize> はシステムのページサイズの倍数とすべきである。"
3161
3162 #. type: Plain text
3163 #: build/C/man3/pthread_attr_setstack.3:153
3164 msgid ""
3165 "If I<attr> is used to create multiple threads, then the caller must change "
3166 "the stack address attribute between calls to B<pthread_create>(3); "
3167 "otherwise, the threads will attempt to use the same memory area for their "
3168 "stacks, and chaos will ensue."
3169 msgstr ""
3170 "一つの I<attr> を使って複数のスレッドを作成する場合、\n"
3171 "B<pthread_create>(3) の次の呼び出しを行う前に、\n"
3172 "呼び出し側でスタックアドレス属性を変更しなければならない。\n"
3173 "さもなければ、複数のスレッドがスタックとして同じメモリ領域を\n"
3174 "使おうとするため、訳の分からない状況が発生してしまう。"
3175
3176 #. type: Plain text
3177 #: build/C/man3/pthread_attr_setstack.3:168
3178 msgid ""
3179 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3180 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3181 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3182 msgstr ""
3183 "B<mmap>(2), B<mprotect>(2), B<posix_memalign>(3), B<pthread_attr_init>(3), "
3184 "B<pthread_attr_setguardsize>(3), B<pthread_attr_setstackaddr>(3), "
3185 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3186
3187 #. type: TH
3188 #: build/C/man3/pthread_attr_setstackaddr.3:26
3189 #, no-wrap
3190 msgid "PTHREAD_ATTR_SETSTACKADDR"
3191 msgstr "PTHREAD_ATTR_SETSTACKADDR"
3192
3193 #. type: Plain text
3194 #: build/C/man3/pthread_attr_setstackaddr.3:30
3195 msgid ""
3196 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - set/get stack address "
3197 "attribute in thread attributes object"
3198 msgstr ""
3199 "pthread_attr_setstackaddr, pthread_attr_getstackaddr - \n"
3200 "スレッド属性オブジェクトのスタックアドレス属性の設定/取得を行う"
3201
3202 #. type: Plain text
3203 #: build/C/man3/pthread_attr_setstackaddr.3:38
3204 #, no-wrap
3205 msgid ""
3206 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3207 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3208 msgstr ""
3209 "B<int pthread_attr_setstackaddr(pthread_attr_t *>I<attr>B<, void *>I<stackaddr>B<);>\n"
3210 "B<int pthread_attr_getstackaddr(pthread_attr_t *>I<attr>B<, void **>I<stackaddr>B<);>\n"
3211
3212 #. type: Plain text
3213 #: build/C/man3/pthread_attr_setstackaddr.3:49
3214 msgid ""
3215 "These functions are obsolete: B<do not use them.> Use "
3216 "B<pthread_attr_setstack>(3)  and B<pthread_attr_getstack>(3)  instead."
3217 msgstr ""
3218 "これらの関数は廃止予定であり、B<使用しないこと>。\n"
3219 "代わりに Use B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) を使"
3220 "うこと。"
3221
3222 #. type: Plain text
3223 #: build/C/man3/pthread_attr_setstackaddr.3:60
3224 msgid ""
3225 "The B<pthread_attr_setstackaddr>()  function sets the stack address "
3226 "attribute of the thread attributes object referred to by I<attr> to the "
3227 "value specified in I<stackaddr>.  This attribute specifies the location of "
3228 "the stack that should be used by a thread that is created using the thread "
3229 "attributes object I<attr>."
3230 msgstr ""
3231 "B<pthread_attr_setstackaddr>() 関数は、\n"
3232 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3233 "属性を I<stackaddr> で指定された値に設定する。\n"
3234 "この属性により、スレッド属性オブジェクト I<attr> を使って\n"
3235 "作成されるスレッドが使用すべきスタックの位置が指定される。"
3236
3237 #. type: Plain text
3238 #: build/C/man3/pthread_attr_setstackaddr.3:66
3239 msgid ""
3240 "I<stackaddr> should point to a buffer of at least B<PTHREAD_STACK_MIN> bytes "
3241 "that was allocated by the caller.  The pages of the allocated buffer should "
3242 "be both readable and writable."
3243 msgstr ""
3244 "I<stackaddr> は呼び出し側が割り当てたバッファ (大きさは\n"
3245 "少なくとも B<PTHREAD_STACK_MIN> バイト)を指すべきである。\n"
3246 "割り当てられたバッファのページは読み書き両方が可能なページと\n"
3247 "なっているべきである。"
3248
3249 #. type: Plain text
3250 #: build/C/man3/pthread_attr_setstackaddr.3:74
3251 msgid ""
3252 "The B<pthread_attr_getstackaddr>()  function returns the stack address "
3253 "attribute of the thread attributes object referred to by I<attr> in the "
3254 "buffer pointed to by I<stackaddr>."
3255 msgstr ""
3256 "B<pthread_attr_getstackaddr>() は、\n"
3257 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3258 "I<stackaddr> が指すバッファに入れて返す。"
3259
3260 #. type: Plain text
3261 #: build/C/man3/pthread_attr_setstackaddr.3:81
3262 msgid ""
3263 "No errors are defined (but applications should nevertheless handle a "
3264 "possible error return)."
3265 msgstr ""
3266 "エラーは定義されていない (ただし、アプリケーションは正のエラーの\n"
3267 "返り値を処理するようにすべきである)。"
3268
3269 #. type: Plain text
3270 #: build/C/man3/pthread_attr_setstackaddr.3:86
3271 msgid ""
3272 "POSIX.1-2001 specifies these functions but marks them as obsolete.  "
3273 "POSIX.1-2008 removes the specification of these functions."
3274 msgstr ""
3275 "POSIX.1-2001 では、これらの関数が規定されているが、廃止予定となっている。\n"
3276 "POSIX.1-2008 では、これらの関数の規定は削除されている。"
3277
3278 #. type: Plain text
3279 #: build/C/man3/pthread_attr_setstackaddr.3:110
3280 msgid ""
3281 "I<Do not use these functions!> They cannot be portably used, since they "
3282 "provide no way of specifying the direction of growth or the range of the "
3283 "stack.  For example, on architectures with a stack that grows downward, "
3284 "I<stackaddr> specifies the next address past the I<highest> address of the "
3285 "allocated stack area.  However, on architectures with a stack that grows "
3286 "upward, I<stackaddr> specifies the I<lowest> address in the allocated stack "
3287 "area.  By contrast, the I<stackaddr> used by B<pthread_attr_setstack>(3)  "
3288 "and B<pthread_attr_getstack>(3), is always a pointer to the lowest address "
3289 "in the allocated stack area (and the I<stacksize> argument specifies the "
3290 "range of the stack)."
3291 msgstr ""
3292 "I<これらの関数を使用しないこと!> これらの関数は移植性がある形では使用で\n"
3293 "きない。なぜなら、これらの関数ではスタック領域がどちらの方向に伸びるの\n"
3294 "かを指定する手段が提供されていないからである。\n"
3295 "例えば、スタックが下向き (アドレスが小さい方向) に伸びるアーキテクチャ\n"
3296 "では、I<stackaddr> には割り当てられたスタック領域のI<最も大きな>アドレ\n"
3297 "スの次のアドレスを指定する。一方、スタックが上向き (アドレスが大きい\n"
3298 "方向) に伸びるアーキテクチャでは、I<stackaddr> には割り当てられた\n"
3299 "スタック領域のI<最も小さい>アドレスを指定する。これに対して、\n"
3300 "B<pthread_attr_setstack>(3) と B<pthread_attr_getstack>(3) が使用する\n"
3301 "I<stackaddr> は、常に割り当てられたスタック領域の最も小さいアドレス\n"
3302 "へのポインタである (I<stacksize> 引き数はスタックの範囲を指定する)。"
3303
3304 #. type: Plain text
3305 #: build/C/man3/pthread_attr_setstackaddr.3:116
3306 msgid ""
3307 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3308 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3309 msgstr ""
3310 "B<pthread_attr_init>(3), B<pthread_attr_setstack>(3), "
3311 "B<pthread_attr_setstacksize>(3), B<pthread_create>(3), B<pthreads>(7)"
3312
3313 #. type: TH
3314 #: build/C/man3/pthread_attr_setstacksize.3:26
3315 #, no-wrap
3316 msgid "PTHREAD_ATTR_SETSTACKSIZE"
3317 msgstr "PTHREAD_ATTR_SETSTACKSIZE"
3318
3319 #. type: Plain text
3320 #: build/C/man3/pthread_attr_setstacksize.3:30
3321 msgid ""
3322 "pthread_attr_setstacksize, pthread_attr_getstacksize - set/get stack size "
3323 "attribute in thread attributes object"
3324 msgstr ""
3325 "pthread_attr_setstacksize, pthread_attr_getstacksize - \n"
3326 "スレッド属性オブジェクトのスタックサイズ属性の設定/取得を行う"
3327
3328 #. type: Plain text
3329 #: build/C/man3/pthread_attr_setstacksize.3:38
3330 #, no-wrap
3331 msgid ""
3332 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3333 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3334 msgstr ""
3335 "B<int pthread_attr_setstacksize(pthread_attr_t *>I<attr>B<, size_t >I<stacksize>B<);>\n"
3336 "B<int pthread_attr_getstacksize(pthread_attr_t *>I<attr>B<, size_t *>I<stacksize>B<);>\n"
3337
3338 #. type: Plain text
3339 #: build/C/man3/pthread_attr_setstacksize.3:49
3340 msgid ""
3341 "The B<pthread_attr_setstacksize>()  function sets the stack size attribute "
3342 "of the thread attributes object referred to by I<attr> to the value "
3343 "specified in I<stacksize>."
3344 msgstr ""
3345 "B<pthread_attr_setstacksize>() 関数は、\n"
3346 "I<attr> が参照するスレッド属性オブジェクトのスタックアドレス\n"
3347 "属性を I<stacksize> で指定された値に設定する。"
3348
3349 #. type: Plain text
3350 #: build/C/man3/pthread_attr_setstacksize.3:53
3351 msgid ""
3352 "The stack size attribute determines the minimum size (in bytes) that will be "
3353 "allocated for threads created using the thread attributes object I<attr>."
3354 msgstr ""
3355 "スタックサイズ属性により、\n"
3356 "スレッド属性オブジェクト I<attr> を使って作成されたスレッド\n"
3357 "に割り当てられる最小サイズ (バイト単位) が決定される。"
3358
3359 #. type: Plain text
3360 #: build/C/man3/pthread_attr_setstacksize.3:61
3361 msgid ""
3362 "The B<pthread_attr_getstacksize>()  function returns the stack size "
3363 "attribute of the thread attributes object referred to by I<attr> in the "
3364 "buffer pointed to by I<stacksize>."
3365 msgstr ""
3366 "B<pthread_attr_getstacksize>() は、\n"
3367 "スレッド属性オブジェクト I<attr> のスタックアドレス属性を\n"
3368 "I<stacksize> が指すバッファに入れて返す。"
3369
3370 #. type: Plain text
3371 #: build/C/man3/pthread_attr_setstacksize.3:67
3372 msgid "B<pthread_attr_setstacksize>()  can fail with the following error:"
3373 msgstr "B<pthread_attr_setstacksize>() は以下のエラーで失敗する場合がある。"
3374
3375 #. type: Plain text
3376 #: build/C/man3/pthread_attr_setstacksize.3:72
3377 msgid "The stack size is less than B<PTHREAD_STACK_MIN> (16384) bytes."
3378 msgstr "スタックサイズが B<PTHREAD_STACK_MIN> (16384) バイト未満である。"
3379
3380 #.  e.g., MacOS
3381 #. type: Plain text
3382 #: build/C/man3/pthread_attr_setstacksize.3:81
3383 msgid ""
3384 "On some systems, B<pthread_attr_setstacksize>()  can fail with the error "
3385 "B<EINVAL> if I<stacksize> is not a multiple of the system page size."
3386 msgstr ""
3387 "いくつかのシステムでは、 B<pthread_attr_setstacksize>() は\n"
3388 "I<stacksize> がシステムのページサイズの倍数でない場合にも\n"
3389 "エラー B<EINVAL> で失敗する。"
3390
3391 #. type: Plain text
3392 #: build/C/man3/pthread_attr_setstacksize.3:88
3393 msgid ""
3394 "For details on the default stack size of new threads, see B<pthread_create>"
3395 "(3)."
3396 msgstr ""
3397 "新しいスレッドのデフォルトのスタックサイズの詳細については\n"
3398 "B<pthread_create>(3) を参照。"
3399
3400 #. type: Plain text
3401 #: build/C/man3/pthread_attr_setstacksize.3:91
3402 msgid ""
3403 "A thread's stack size is fixed at the time of thread creation.  Only the "
3404 "main thread can dynamically grow its stack."
3405 msgstr ""
3406 "スレッドのスタックサイズは、スレッド作成時点では固定である。\n"
3407 "メインスレッドだけがスタックを動的に伸ばすことができる。"
3408
3409 #. type: Plain text
3410 #: build/C/man3/pthread_attr_setstacksize.3:96
3411 msgid ""
3412 "The B<pthread_attr_setstack>(3)  function allows an application to set both "
3413 "the size and location of a caller-allocated stack that is to be used by a "
3414 "thread."
3415 msgstr ""
3416 "B<pthread_attr_setstack>(3) 関数を使うと、\n"
3417 "アプリケーションは、スレッドが使用するスタックとして、\n"
3418 "呼び出し側で割り当てたスタックのサイズと場所を指定できる。"
3419
3420 #. type: Plain text
3421 #: build/C/man3/pthread_attr_setstacksize.3:108
3422 msgid ""
3423 "As at glibc 2.8, if the specified I<stacksize> is not a multiple of "
3424 "B<STACK_ALIGN> (16 bytes on most architectures), it may be rounded "
3425 "I<downward>, in violation of POSIX.1-2001, which says that the allocated "
3426 "stack will be at least I<stacksize> bytes."
3427 msgstr ""
3428 "glibc 2.8 の時点では、指定された I<stacksize> が B<STACK_ALIGN> \n"
3429 "(ほとんどのアーキテクチャでは 16 バイト) の倍数でない場合、\n"
3430 "I<stacksize> はI<小さくなる方向に>に丸められる。\n"
3431 "これは POSIX.1-2001 に違反している。\n"
3432 "POSIX.1-2001 では、割り当てらたスタックの大きさは\n"
3433 "少なくとも I<stacksize> バイトになると書かれている。"
3434
3435 #. type: Plain text
3436 #: build/C/man3/pthread_attr_setstacksize.3:111
3437 #: build/C/man3/pthread_join.3:127
3438 msgid "See B<pthread_create>(3)."
3439 msgstr "B<pthread_create>(3) を参照。"
3440
3441 #. type: Plain text
3442 #: build/C/man3/pthread_attr_setstacksize.3:118
3443 msgid ""
3444 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3445 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3446 msgstr ""
3447 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_attr_setguardsize>(3), "
3448 "B<pthread_attr_setstack>(3), B<pthread_create>(3), B<pthreads>(7)"
3449
3450 #. type: TH
3451 #: build/C/man3/pthread_cancel.3:26
3452 #, no-wrap
3453 msgid "PTHREAD_CANCEL"
3454 msgstr "PTHREAD_CANCEL"
3455
3456 #. type: TH
3457 #: build/C/man3/pthread_cancel.3:26 build/C/man3/pthread_setschedparam.3:26
3458 #, no-wrap
3459 msgid "2008-11-17"
3460 msgstr "2008-11-17"
3461
3462 #. type: Plain text
3463 #: build/C/man3/pthread_cancel.3:29
3464 msgid "pthread_cancel - send a cancellation request to a thread"
3465 msgstr "pthread_cancel - スレッドにキャンセル要求を送る"
3466
3467 #. type: Plain text
3468 #: build/C/man3/pthread_cancel.3:34
3469 #, no-wrap
3470 msgid "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3471 msgstr "B<int pthread_cancel(pthread_t >I<thread>B<);>\n"
3472
3473 #. type: Plain text
3474 #: build/C/man3/pthread_cancel.3:46
3475 msgid ""
3476 "The B<pthread_cancel>()  function sends a cancellation request to the thread "
3477 "I<thread>.  Whether and when the target thread reacts to the cancellation "
3478 "request depends on two attributes that are under the control of that thread: "
3479 "its cancelability I<state> and I<type>."
3480 msgstr ""
3481 "B<pthread_cancel>() 関数は指定されたスレッド I<thread> にキャンセル要求\n"
3482 "を送信する。対象のスレッドがキャンセル要求に反応するかどうか、いつ反応\n"
3483 "するかは対象のスレッドの制御下にある 2 つの属性、cancelability\n"
3484 "I<state> と I<type>により決まる。"
3485
3486 #. type: Plain text
3487 #: build/C/man3/pthread_cancel.3:58
3488 msgid ""
3489 "A thread's cancelability state, determined by B<pthread_setcancelstate>(3), "
3490 "can be I<enabled> (the default for new threads) or I<disabled>.  If a thread "
3491 "has disabled cancellation, then a cancellation request remains queued until "
3492 "the thread enables cancellation.  If a thread has enabled cancellation, then "
3493 "its cancelability type determines when cancellation occurs."
3494 msgstr ""
3495 "あるスレッドの cancelability state は B<pthread_setcancelstate>(3) で\n"
3496 "設定され、I<enabled> と I<disabled> のいずれとなる (I<enabled> が新しい\n"
3497 "スレッドのデフォルト値である)。スレッドがキャンセルを無効にしていた場合、\n"
3498 "キャンセル要求はそのスレッドがキャンセルを有効にするまでキューに入れら\n"
3499 "れたままになる。スレッドがキャンセルを有効にしていた場合、\n"
3500 "cancelability type によって、いつキャンセルが発生するかが決まる。"
3501
3502 #. type: Plain text
3503 #: build/C/man3/pthread_cancel.3:74
3504 msgid ""
3505 "A thread's cancellation type, determined by B<pthread_setcanceltype>(3), may "
3506 "be either I<asynchronous> or I<deferred> (the default for new threads).  "
3507 "Asynchronous cancelability means that the thread can be canceled at any time "
3508 "(usually immediately, but the system does not guarantee this).  Deferred "
3509 "cancelability means that cancellation will be delayed until the thread next "
3510 "calls a function that is a I<cancellation point>.  A list of functions that "
3511 "are or may be cancellation points is provided in I<pthreads>(7)."
3512 msgstr ""
3513 "スレッドのキャンセル種別 (cancelability type) は\n"
3514 "B<pthread_setcanceltype>(3) で設定され、I<asynchronous> か I<deferred>\n"
3515 "のいずれかとなる(I<deferred> が新しいスレッドのデフォルト値である)。\n"
3516 "非同期キャンセル (asynchronous cancelability) は、そのスレッドはいつで\n"
3517 "もキャンセルされることを意味する (通常はすぐにキャンセルされるが、\n"
3518 "システムがそのことを保証しているわけではない)。遅延キャンセル\n"
3519 "(deferred cancelability) では、そのスレッドが I<取り消しポイント\n"
3520 "(cancellation point)> となっている関数を次に呼び出すまでキャンセルが\n"
3521 "遅延される。取り消しポイントに設定されていたり設定\n"
3522 "したりできる関数のリストは I<pthreads>(7) に記載している。"
3523
3524 #. type: Plain text
3525 #: build/C/man3/pthread_cancel.3:78
3526 msgid ""
3527 "When a cancellation requested is acted on, the following steps occur for "
3528 "I<thread> (in this order):"
3529 msgstr ""
3530 "キャンセル要求が実行されると、\n"
3531 "I<thread> では以下のステップが (この順序で) 行われる。"
3532
3533 #. type: IP
3534 #: build/C/man3/pthread_cancel.3:78 build/C/man3/pthread_cleanup_push.3:69
3535 #, no-wrap
3536 msgid "1."
3537 msgstr "1."
3538
3539 #. type: Plain text
3540 #: build/C/man3/pthread_cancel.3:83
3541 msgid ""
3542 "Cancellation clean-up handlers are popped (in the reverse of the order in "
3543 "which they were pushed) and called.  (See B<pthread_cleanup_push>(3).)"
3544 msgstr ""
3545 "キャンセルクリーンアップハンドラが (push されたのと逆順で)\n"
3546 "取り出され (pop され)、呼び出される。\n"
3547 "(B<pthread_cleanup_push>(3) 参照)"
3548
3549 #. type: IP
3550 #: build/C/man3/pthread_cancel.3:83 build/C/man3/pthread_cleanup_push.3:73
3551 #, no-wrap
3552 msgid "2."
3553 msgstr "2."
3554
3555 #. type: Plain text
3556 #: build/C/man3/pthread_cancel.3:88
3557 msgid ""
3558 "Thread-specific data destructors are called, in an unspecified order.  (See "
3559 "B<pthread_key_create>(3).)"
3560 msgstr ""
3561 "スレッド固有データのデストラクタ (destructor) が呼び出される。\n"
3562 "呼び出し順序は規定されていない。\n"
3563 "(B<pthread_key_create>(3) 参照)"
3564
3565 #. type: IP
3566 #: build/C/man3/pthread_cancel.3:88 build/C/man3/pthread_cleanup_push.3:81
3567 #, no-wrap
3568 msgid "3."
3569 msgstr "3."
3570
3571 #. type: Plain text
3572 #: build/C/man3/pthread_cancel.3:92
3573 msgid "The thread is terminated.  (See B<pthread_exit>(3).)"
3574 msgstr "スレッドが終了される。 (B<pthread_exit>(3) 参照)"
3575
3576 #. type: Plain text
3577 #: build/C/man3/pthread_cancel.3:100
3578 msgid ""
3579 "The above steps happen asynchronously with respect to the B<pthread_cancel>"
3580 "()  call; the return status of B<pthread_cancel>()  merely informs the "
3581 "caller whether the cancellation request was successfully queued."
3582 msgstr ""
3583 "上記のステップは B<pthread_cancel>() の呼び出しとは非同期に行われる。\n"
3584 "B<pthread_cancel>() の返却ステータスは単にキャンセル要求が正常に\n"
3585 "キューに入れられたかどうかを呼び出し元に示すだけのものである。"
3586
3587 #. type: Plain text
3588 #: build/C/man3/pthread_cancel.3:109
3589 msgid ""
3590 "After a canceled thread has terminated, a join with that thread using "
3591 "B<pthread_join>(3)  obtains B<PTHREAD_CANCELED> as the thread's exit "
3592 "status.  (Joining with a thread is the only way to know that cancellation "
3593 "has completed.)"
3594 msgstr ""
3595 "キャンセルされたスレッドが終了された後に、\n"
3596 "B<pthread_join>(3) でそのスレッドを join すると、\n"
3597 "そのスレッドの終了ステータスとして B<PTHREAD_CANCELED> が得られる。\n"
3598 "(スレッドの join はキャンセルが完了したかを知る唯一の方法である)"
3599
3600 #. type: Plain text
3601 #: build/C/man3/pthread_cancel.3:114
3602 msgid ""
3603 "On success, B<pthread_cancel>()  returns 0; on error, it returns a nonzero "
3604 "error number."
3605 msgstr ""
3606 "成功すると、 B<pthread_cancel>() は 0 を返す。\n"
3607 "エラーの場合、0 以外のエラー番号を返す。"
3608
3609 #. type: TP
3610 #: build/C/man3/pthread_cancel.3:115 build/C/man3/pthread_detach.3:59
3611 #: build/C/man3/pthread_getcpuclockid.3:58 build/C/man3/pthread_join.3:93
3612 #: build/C/man3/pthread_kill.3:61 build/C/man3/pthread_setaffinity_np.3:114
3613 #: build/C/man3/pthread_setschedparam.3:114
3614 #: build/C/man3/pthread_setschedprio.3:70 build/C/man3/pthread_sigqueue.3:85
3615 #, no-wrap
3616 msgid "B<ESRCH>"
3617 msgstr "B<ESRCH>"
3618
3619 #. type: Plain text
3620 #: build/C/man3/pthread_cancel.3:122 build/C/man3/pthread_detach.3:64
3621 #: build/C/man3/pthread_getcpuclockid.3:63 build/C/man3/pthread_join.3:98
3622 #: build/C/man3/pthread_kill.3:66 build/C/man3/pthread_setaffinity_np.3:119
3623 #: build/C/man3/pthread_setschedparam.3:119
3624 #: build/C/man3/pthread_setschedprio.3:75
3625 msgid "No thread with the ID I<thread> could be found."
3626 msgstr "ID が I<thread> のスレッドが見つからなかった。"
3627
3628 #. type: Plain text
3629 #: build/C/man3/pthread_cancel.3:132
3630 msgid ""
3631 "On Linux, cancellation is implemented using signals.  Under the NPTL "
3632 "threading implementation, the first real-time signal (i.e., signal 32) is "
3633 "used for this purpose.  On LinuxThreads, the second real-time signal is "
3634 "used, if real-time signals are available, otherwise B<SIGUSR2> is used."
3635 msgstr ""
3636 "Linux では、キャンセルはシグナルを使って実装されている。NPTL スレッド実装で"
3637 "は、\n"
3638 "最初のリアルタイムシグナル (つまり、シグナル 32)がこのために使用される。\n"
3639 "LinuxThreads では、リアルタイムシグナルが利用可能な場合は2 番目のリアルタイ"
3640 "ム\n"
3641 "シグナルが使用され、そうでない場合は B<SIGUSR2> が使用される。"
3642
3643 #. type: Plain text
3644 #: build/C/man3/pthread_cancel.3:138
3645 msgid ""
3646 "The program below creates a thread and then cancels it.  The main thread "
3647 "joins with the canceled thread to check that its exit status was "
3648 "B<PTHREAD_CANCELED>.  The following shell session shows what happens when we "
3649 "run the program:"
3650 msgstr ""
3651 "以下のプログラムは、スレッドを一つ作成してから、そのスレッドをキャンセルす"
3652 "る。\n"
3653 "メインスレッドはキャンセルされたスレッドをジョインし、\n"
3654 "キャンセルされたスレッドの終了ステータスが B<PTHREAD_CANCELED> かどうかを\n"
3655 "確認する。以下のシェルセッションはこのプログラムを実行した際の実行例である。"
3656
3657 #. type: Plain text
3658 #: build/C/man3/pthread_cancel.3:146
3659 #, no-wrap
3660 msgid ""
3661 "$ ./a.out\n"
3662 "thread_func(): started; cancellation disabled\n"
3663 "main(): sending cancellation request\n"
3664 "thread_func(): about to enable cancellation\n"
3665 "main(): thread was canceled\n"
3666 msgstr ""
3667 "$ ./a.out\n"
3668 "thread_func(): started; cancellation disabled\n"
3669 "main(): sending cancellation request\n"
3670 "thread_func(): about to enable cancellation\n"
3671 "main(): thread was canceled\n"
3672
3673 #. type: Plain text
3674 #: build/C/man3/pthread_cancel.3:156
3675 #, no-wrap
3676 msgid ""
3677 "#include E<lt>pthread.hE<gt>\n"
3678 "#include E<lt>stdio.hE<gt>\n"
3679 "#include E<lt>errno.hE<gt>\n"
3680 "#include E<lt>stdlib.hE<gt>\n"
3681 "#include E<lt>unistd.hE<gt>\n"
3682 msgstr ""
3683 "#include E<lt>pthread.hE<gt>\n"
3684 "#include E<lt>stdio.hE<gt>\n"
3685 "#include E<lt>errno.hE<gt>\n"
3686 "#include E<lt>stdlib.hE<gt>\n"
3687 "#include E<lt>unistd.hE<gt>\n"
3688
3689 #. type: Plain text
3690 #: build/C/man3/pthread_cancel.3:164
3691 #, no-wrap
3692 msgid ""
3693 "static void *\n"
3694 "thread_func(void *ignored_argument)\n"
3695 "{\n"
3696 "    int s;\n"
3697 msgstr ""
3698 "static void *\n"
3699 "thread_func(void *ignored_argument)\n"
3700 "{\n"
3701 "    int s;\n"
3702
3703 #. type: Plain text
3704 #: build/C/man3/pthread_cancel.3:167
3705 #, no-wrap
3706 msgid ""
3707 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3708 "       immediately react to a cancellation request */\n"
3709 msgstr ""
3710 "    /* Disable cancellation for a while, so that we don\\(aqt\n"
3711 "       immediately react to a cancellation request */\n"
3712
3713 #. type: Plain text
3714 #: build/C/man3/pthread_cancel.3:171
3715 #, no-wrap
3716 msgid ""
3717 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3718 "    if (s != 0)\n"
3719 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3720 msgstr ""
3721 "    s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);\n"
3722 "    if (s != 0)\n"
3723 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3724
3725 #. type: Plain text
3726 #: build/C/man3/pthread_cancel.3:175
3727 #, no-wrap
3728 msgid ""
3729 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3730 "    sleep(5);\n"
3731 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3732 msgstr ""
3733 "    printf(\"thread_func(): started; cancellation disabled\\en\");\n"
3734 "    sleep(5);\n"
3735 "    printf(\"thread_func(): about to enable cancellation\\en\");\n"
3736
3737 #. type: Plain text
3738 #: build/C/man3/pthread_cancel.3:179
3739 #, no-wrap
3740 msgid ""
3741 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3742 "    if (s != 0)\n"
3743 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3744 msgstr ""
3745 "    s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);\n"
3746 "    if (s != 0)\n"
3747 "        handle_error_en(s, \"pthread_setcancelstate\");\n"
3748
3749 #. type: Plain text
3750 #: build/C/man3/pthread_cancel.3:181
3751 #, no-wrap
3752 msgid "    /* sleep() is a cancellation point */\n"
3753 msgstr "    /* sleep() is a cancellation point */\n"
3754
3755 #. type: Plain text
3756 #: build/C/man3/pthread_cancel.3:183
3757 #, no-wrap
3758 msgid "    sleep(1000);        /* Should get canceled while we sleep */\n"
3759 msgstr "    sleep(1000);        /* Should get canceled while we sleep */\n"
3760
3761 #. type: Plain text
3762 #: build/C/man3/pthread_cancel.3:185
3763 #, no-wrap
3764 msgid "    /* Should never get here */\n"
3765 msgstr "    /* Should never get here */\n"
3766
3767 #. type: Plain text
3768 #: build/C/man3/pthread_cancel.3:189
3769 #, no-wrap
3770 msgid ""
3771 "    printf(\"thread_func(): not canceled!\\en\");\n"
3772 "    return NULL;\n"
3773 "}\n"
3774 msgstr ""
3775 "    printf(\"thread_func(): not canceled!\\en\");\n"
3776 "    return NULL;\n"
3777 "}\n"
3778
3779 #. type: Plain text
3780 #: build/C/man3/pthread_cancel.3:196
3781 #, no-wrap
3782 msgid ""
3783 "int\n"
3784 "main(void)\n"
3785 "{\n"
3786 "    pthread_t thr;\n"
3787 "    void *res;\n"
3788 "    int s;\n"
3789 msgstr ""
3790 "int\n"
3791 "main(void)\n"
3792 "{\n"
3793 "    pthread_t thr;\n"
3794 "    void *res;\n"
3795 "    int s;\n"
3796
3797 #. type: Plain text
3798 #: build/C/man3/pthread_cancel.3:198
3799 #, no-wrap
3800 msgid "    /* Start a thread and then send it a cancellation request */\n"
3801 msgstr "    /* Start a thread and then send it a cancellation request */\n"
3802
3803 #. type: Plain text
3804 #: build/C/man3/pthread_cancel.3:202
3805 #, no-wrap
3806 msgid ""
3807 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3808 "    if (s != 0)\n"
3809 "        handle_error_en(s, \"pthread_create\");\n"
3810 msgstr ""
3811 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
3812 "    if (s != 0)\n"
3813 "        handle_error_en(s, \"pthread_create\");\n"
3814
3815 #. type: Plain text
3816 #: build/C/man3/pthread_cancel.3:204
3817 #, no-wrap
3818 msgid "    sleep(2);           /* Give thread a chance to get started */\n"
3819 msgstr "    sleep(2);           /* Give thread a chance to get started */\n"
3820
3821 #. type: Plain text
3822 #: build/C/man3/pthread_cancel.3:209
3823 #, no-wrap
3824 msgid ""
3825 "    printf(\"main(): sending cancellation request\\en\");\n"
3826 "    s = pthread_cancel(thr);\n"
3827 "    if (s != 0)\n"
3828 "        handle_error_en(s, \"pthread_cancel\");\n"
3829 msgstr ""
3830 "    printf(\"main(): sending cancellation request\\en\");\n"
3831 "    s = pthread_cancel(thr);\n"
3832 "    if (s != 0)\n"
3833 "        handle_error_en(s, \"pthread_cancel\");\n"
3834
3835 #. type: Plain text
3836 #: build/C/man3/pthread_cancel.3:211
3837 #, no-wrap
3838 msgid "    /* Join with thread to see what its exit status was */\n"
3839 msgstr "    /* Join with thread to see what its exit status was */\n"
3840
3841 #. type: Plain text
3842 #: build/C/man3/pthread_cancel.3:215 build/C/man3/pthread_cleanup_push.3:303
3843 #, no-wrap
3844 msgid ""
3845 "    s = pthread_join(thr, &res);\n"
3846 "    if (s != 0)\n"
3847 "        handle_error_en(s, \"pthread_join\");\n"
3848 msgstr ""
3849 "    s = pthread_join(thr, &res);\n"
3850 "    if (s != 0)\n"
3851 "        handle_error_en(s, \"pthread_join\");\n"
3852
3853 #. type: Plain text
3854 #: build/C/man3/pthread_cancel.3:222
3855 #, no-wrap
3856 msgid ""
3857 "    if (res == PTHREAD_CANCELED)\n"
3858 "        printf(\"main(): thread was canceled\\en\");\n"
3859 "    else\n"
3860 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3861 "    exit(EXIT_SUCCESS);\n"
3862 "}\n"
3863 msgstr ""
3864 "    if (res == PTHREAD_CANCELED)\n"
3865 "        printf(\"main(): thread was canceled\\en\");\n"
3866 "    else\n"
3867 "        printf(\"main(): thread wasn\\(aqt canceled (shouldn\\(aqt happen!)\\en\");\n"
3868 "    exit(EXIT_SUCCESS);\n"
3869 "}\n"
3870
3871 #. type: Plain text
3872 #: build/C/man3/pthread_cancel.3:235
3873 msgid ""
3874 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3875 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3876 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3877 msgstr ""
3878 "B<pthread_cleanup_push>(3), B<pthread_create>(3), B<pthread_exit>(3), "
3879 "B<pthread_join>(3), B<pthread_key_create>(3), B<pthread_setcancelstate>(3), "
3880 "B<pthread_setcanceltype>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
3881
3882 #. type: TH
3883 #: build/C/man3/pthread_cleanup_push.3:26
3884 #, no-wrap
3885 msgid "PTHREAD_CLEANUP_PUSH"
3886 msgstr "PTHREAD_CLEANUP_PUSH"
3887
3888 #. type: TH
3889 #: build/C/man3/pthread_cleanup_push.3:26
3890 #: build/C/man3/pthread_setcancelstate.3:26
3891 #, no-wrap
3892 msgid "2008-11-24"
3893 msgstr "2008-11-24"
3894
3895 #. type: Plain text
3896 #: build/C/man3/pthread_cleanup_push.3:30
3897 msgid ""
3898 "pthread_cleanup_push, pthread_cleanup_pop - push and pop thread cancellation "
3899 "clean-up handlers"
3900 msgstr ""
3901 "pthread_cleanup_push, pthread_cleanup_pop - スレッドの\n"
3902 "キャンセルクリーンアップハンドラの push/pop を行う"
3903
3904 #. type: Plain text
3905 #: build/C/man3/pthread_cleanup_push.3:37
3906 #, no-wrap
3907 msgid ""
3908 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3909 "B<                          void *>I<arg>B<);>\n"
3910 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3911 msgstr ""
3912 "B<void pthread_cleanup_push(void (*>I<routine>B<)(void *),>\n"
3913 "B<                          void *>I<arg>B<);>\n"
3914 "B<void pthread_cleanup_pop(int >I<execute>B<);>\n"
3915
3916 #. type: Plain text
3917 #: build/C/man3/pthread_cleanup_push.3:48
3918 msgid ""
3919 "These functions manipulate the calling thread's stack of thread-cancellation "
3920 "clean-up handlers.  A clean-up handler is a function that is automatically "
3921 "executed when a thread is canceled (or in various other circumstances "
3922 "described below); it might, for example, unlock a mutex so that it becomes "
3923 "available to other threads in the process."
3924 msgstr ""
3925 "これらの関数は、呼び出したスレッドのスレッドキャンセル時のクリーンアッ\n"
3926 "プハンドラのスタックの操作を行う。クリーンアップハンドラは、スレッドが\n"
3927 "キャンセルされた場合 (や以下で説明する他の種々の状況において) 自動的に\n"
3928 "実行される関数である。例えば、mutex のロック解除を行い、プロセス内の\n"
3929 "他のスレッドが利用できるようにする関数などが考えられる。"
3930
3931 #. type: Plain text
3932 #: build/C/man3/pthread_cleanup_push.3:59
3933 msgid ""
3934 "The B<pthread_cleanup_push>()  function pushes I<routine> onto the top of "
3935 "the stack of clean-up handlers.  When I<routine> is later invoked, it will "
3936 "be given I<arg> as its argument."
3937 msgstr ""
3938 "B<pthread_cleanup_push>() 関数は、 I<routine> をクリーンアップ\n"
3939 "ハンドラのスタックの一番上にプッシュする。 I<routine> が後で\n"
3940 "起動される際には、 I<arg> が関数の引き数と渡される。"
3941
3942 #. type: Plain text
3943 #: build/C/man3/pthread_cleanup_push.3:66
3944 msgid ""
3945 "The B<pthread_cleanup_pop>()  function removes the routine at the top of the "
3946 "stack of clean-up handlers, and optionally executes it if I<execute> is "
3947 "nonzero."
3948 msgstr ""
3949 "B<pthread_cleanup_pop>() 関数は、クリーンアップハンドラの\n"
3950 "スタックの一番上のルーチンを削除する。\n"
3951 "I<execute> が 0 以外の場合にはそのルーチンを追加で実行する。"
3952
3953 #. type: Plain text
3954 #: build/C/man3/pthread_cleanup_push.3:69
3955 msgid ""
3956 "A cancellation clean-up handler is popped from the stack and executed in the "
3957 "following circumstances:"
3958 msgstr ""
3959 "キャンセルクリーンアップハンドラは、以下に示す場合に\n"
3960 "スタックから取り出され実行される。"
3961
3962 #. type: Plain text
3963 #: build/C/man3/pthread_cleanup_push.3:73
3964 msgid ""
3965 "When a thread is canceled, all of the stacked clean-up handlers are popped "
3966 "and executed in the reverse of the order in which they were pushed onto the "
3967 "stack."
3968 msgstr ""
3969 "スレッドがキャンセルされた際に、スタックに登録された全てのクリーン\n"
3970 "アップハンドラが取り出されて、実行される。クリーンアップハンドラの\n"
3971 "実行は、スタックに登録されたのと逆の順序で行われる。"
3972
3973 #. type: Plain text
3974 #: build/C/man3/pthread_cleanup_push.3:81
3975 msgid ""
3976 "When a thread terminates by calling B<pthread_exit>(3), all clean-up "
3977 "handlers are executed as described in the preceding point.  (Clean-up "
3978 "handlers are I<not> called if the thread terminates by performing a "
3979 "I<return> from the thread start function.)"
3980 msgstr ""
3981 "スレッドが B<pthread_exit>(3) を呼び出して終了する際に、全てのクリーン\n"
3982 "アップハンドラが上の項目で述べたのと同様に実行される。\n"
3983 "(スレッドがスレッド開始関数からの I<return> の実行により終了する場合に\n"
3984 "は、クリーンアップハンドラはI<呼び出されない>。)"
3985
3986 #. type: Plain text
3987 #: build/C/man3/pthread_cleanup_push.3:87
3988 msgid ""
3989 "When a thread calls B<pthread_cleanup_pop>()  with a nonzero I<execute> "
3990 "argument, the top-most clean-up handler is popped and executed."
3991 msgstr ""
3992 "スレッドが 0 以外の I<execute> 引き数で B<pthread_cleanup_pop>() を\n"
3993 "呼び出した際に、スタックの一番上のクリーンアップハンドラが取り出されて\n"
3994 "実行される。"
3995
3996 #. type: Plain text
3997 #: build/C/man3/pthread_cleanup_push.3:99
3998 msgid ""
3999 "POSIX.1 permits B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  to "
4000 "be implemented as macros that expand to text containing \\(aqB<{>\\(aq and "
4001 "\\(aqB<}>\\(aq, respectively.  For this reason, the caller must ensure that "
4002 "calls to these functions are paired within the same function, and at the "
4003 "same lexical nesting level.  (In other words, a clean-up handler is only "
4004 "established during the execution of a specified section of code.)"
4005 msgstr ""
4006 "POSIX.1 では、 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>() を\n"
4007 "それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開するマクロと\n"
4008 "して実装することを許容している。\n"
4009 "このため、呼び出し側では、これらの関数の呼び出しが同じ関数の中で対と\n"
4010 "なり、かつ文法的に同じネストレベル (nesting level) になることを保証\n"
4011 "しなければならない。 (言い換えると、クリーンアップハンドラは、コード\n"
4012 "の特定のセクションの実行の中でのみ設定するものであると言える。)"
4013
4014 #. type: Plain text
4015 #: build/C/man3/pthread_cleanup_push.3:119
4016 msgid ""
4017 "Calling B<longjmp>(3)  (B<siglongjmp>(3))  produces undefined results if any "
4018 "call has been made to B<pthread_cleanup_push>()  or B<pthread_cleanup_pop>"
4019 "()  without the matching call of the pair since the jump buffer was filled "
4020 "by B<setjmp>(3)  (B<sigsetjmp>(3)).  Likewise, calling B<longjmp>(3)  "
4021 "(B<siglongjmp>(3))  from inside a clean-up handler produces undefined "
4022 "results unless the jump buffer was also filled by B<setjmp>(3)  (B<sigsetjmp>"
4023 "(3))  inside the handler."
4024 msgstr ""
4025 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しは、\n"
4026 "B<pthread_cleanup_push>() や B<pthread_cleanup_pop>() の呼び出しが対と\n"
4027 "なる呼び出しがない状態で行われた場合には、どのような結果になるかは不定\n"
4028 "である。これは jump バッファは B<setjmp>(3) (B<sigsetjmp>(3)) により設\n"
4029 "定されるからである。同様に、クリーンアップハンドラ内からの\n"
4030 "B<longjmp>(3) (B<siglongjmp>(3)) の呼び出しも、jump バッファがハンドラ\n"
4031 "内で B<setjmp>(3) (B<sigsetjmp>(3)) で設定されていない限り、どのような\n"
4032 "結果になるかは不定である。"
4033
4034 #. type: Plain text
4035 #: build/C/man3/pthread_cleanup_push.3:121
4036 msgid "These functions do not return a value."
4037 msgstr "これらの関数は値を返さない。"
4038
4039 #.  SH VERSIONS
4040 #.  Available since glibc 2.0
4041 #. type: Plain text
4042 #: build/C/man3/pthread_cleanup_push.3:125
4043 msgid "There are no errors."
4044 msgstr "エラーはない。"
4045
4046 #. type: Plain text
4047 #: build/C/man3/pthread_cleanup_push.3:136
4048 msgid ""
4049 "On Linux, the B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>()  "
4050 "functions I<are> implemented as macros that expand to text containing \\(aqB<"
4051 "{>\\(aq and \\(aqB<}>\\(aq, respectively.  This means that variables "
4052 "declared within the scope of paired calls to these functions will only be "
4053 "visible within that scope."
4054 msgstr ""
4055 "Linux では、関数 B<pthread_cleanup_push>() と B<pthread_cleanup_pop>()\n"
4056 "は、それぞれ \\(aqB<{>\\(aq と \\(aqB<}>\\(aq を含むテキストに展開する\n"
4057 "マクロとして実装されている。このことは、これらの関数を対で呼び出した\n"
4058 "スコープ内で宣言された変数は、そのスコープの中でしか参照できない\n"
4059 "ということを意味している。"
4060
4061 #.  The text was actually added in the 2004 TC2
4062 #. type: Plain text
4063 #: build/C/man3/pthread_cleanup_push.3:151
4064 msgid ""
4065 "POSIX.1 says that the effect of using I<return>, I<break>, I<continue>, or "
4066 "I<goto> to prematurely leave a block bracketed B<pthread_cleanup_push>()  "
4067 "and B<pthread_cleanup_pop>()  is undefined.  Portable applications should "
4068 "avoid doing this."
4069 msgstr ""
4070 "POSIX.1 には、括弧を含む B<pthread_cleanup_push>() と\n"
4071 "B<pthread_cleanup_pop>() のブロックをそのままにしたままで、 \n"
4072 "I<return>, I<break>, I<continue>, I<goto> を使った場合の影響は\n"
4073 "不定であると書かれている。\n"
4074 "移植性が必要なアプリケーションではこれを行うのは避けるべきである。"
4075
4076 #. type: Plain text
4077 #: build/C/man3/pthread_cleanup_push.3:166
4078 msgid ""
4079 "The program below provides a simple example of the use of the functions "
4080 "described in this page.  The program creates a thread that executes a loop "
4081 "bracketed by B<pthread_cleanup_push>()  and B<pthread_cleanup_pop>().  This "
4082 "loop increments a global variable, I<cnt>, once each second.  Depending on "
4083 "what command-line arguments are supplied, the main thread sends the other "
4084 "thread a cancellation request, or sets a global variable that causes the "
4085 "other thread to exit its loop and terminate normally (by doing a I<return>)."
4086 msgstr ""
4087 "以下のプログラムは、このページで説明した関数の簡単な使用例を示すもので\n"
4088 "ある。このプログラムは B<pthread_cleanup_push>() と\n"
4089 "B<pthread_cleanup_pop>() で囲まれたループを実行するスレッドを作成する。\n"
4090 "このループではグローバル変数 I<cnt> を 1 秒に 1 ずつ増やしていく。\n"
4091 "指定されたコマンドライン引き数の内容に基づいて、メインスレッドはもう一\n"
4092 "つのスレッドにキャンセル要求を送ったり、もう一つのスレッドがループを\n"
4093 "抜けて (I<return> を呼び出して) 正常終了するようにグローバル変数を\n"
4094 "設定したりする。"
4095
4096 #. type: Plain text
4097 #: build/C/man3/pthread_cleanup_push.3:169
4098 msgid ""
4099 "In the following shell session, the main thread sends a cancellation request "
4100 "to the other thread:"
4101 msgstr ""
4102 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
4103 "キャンセル要求を送信する。"
4104
4105 #. type: Plain text
4106 #: build/C/man3/pthread_cleanup_push.3:179
4107 #, no-wrap
4108 msgid ""
4109 "$ B<./a.out>\n"
4110 "New thread started\n"
4111 "cnt = 0\n"
4112 "cnt = 1\n"
4113 "Canceling thread\n"
4114 "Called clean-up handler\n"
4115 "Thread was canceled; cnt = 0\n"
4116 msgstr ""
4117 "$ B<./a.out>\n"
4118 "New thread started\n"
4119 "cnt = 0\n"
4120 "cnt = 1\n"
4121 "Canceling thread\n"
4122 "Called clean-up handler\n"
4123 "Thread was canceled; cnt = 0\n"
4124
4125 #. type: Plain text
4126 #: build/C/man3/pthread_cleanup_push.3:187
4127 msgid ""
4128 "From the above, we see that the thread was canceled, and that the "
4129 "cancellation clean-up handler was called and it reset the value of the "
4130 "global variable I<cnt> to 0."
4131 msgstr ""
4132 "上記の実行例から、スレッドがキャンセルされ、\n"
4133 "キャンセルクリーンアップハンドラが呼び出され、\n"
4134 "グローバル変数 I<cnt> の値が 0 にリセットされていることが確認できる。"
4135
4136 #. type: Plain text
4137 #: build/C/man3/pthread_cleanup_push.3:190
4138 msgid ""
4139 "In the next run, the main program sets a global variable that causes other "
4140 "thread to terminate normally:"
4141 msgstr ""
4142 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4143 "もう一つのスレッドが正常終了するようにしている。"
4144
4145 #. type: Plain text
4146 #: build/C/man3/pthread_cleanup_push.3:198
4147 #, no-wrap
4148 msgid ""
4149 "$ B<./a.out x>\n"
4150 "New thread started\n"
4151 "cnt = 0\n"
4152 "cnt = 1\n"
4153 "Thread terminated normally; cnt = 2\n"
4154 msgstr ""
4155 "$ B<./a.out x>\n"
4156 "New thread started\n"
4157 "cnt = 0\n"
4158 "cnt = 1\n"
4159 "Thread terminated normally; cnt = 2\n"
4160
4161 #. type: Plain text
4162 #: build/C/man3/pthread_cleanup_push.3:206
4163 msgid ""
4164 "From the above, we see that the clean-up handler was not executed (because "
4165 "I<cleanup_pop_arg> was 0), and therefore the value of I<cnt> was not reset."
4166 msgstr ""
4167 "上記では、 (I<cleanup_pop_arg> が 0 なので) クリーンアップハンドラは\n"
4168 "実行されておらず、その結果 I<cnt> の値はリセットされていないことが\n"
4169 "分かる。"
4170
4171 #. type: Plain text
4172 #: build/C/man3/pthread_cleanup_push.3:211
4173 msgid ""
4174 "In the next run, the main program sets a global variable that causes the "
4175 "other thread to terminate normally, and supplies a nonzero value for "
4176 "I<cleanup_pop_arg>:"
4177 msgstr ""
4178 "次の実行例では、メインプログラムはグローバル変数を設定して、\n"
4179 "もう一つのスレッドが正常終了するようにし、さらに\n"
4180 "I<cleanup_pop_arg> に 0 以外の値を渡している。"
4181
4182 #. type: Plain text
4183 #: build/C/man3/pthread_cleanup_push.3:220
4184 #, no-wrap
4185 msgid ""
4186 "$ B<./a.out x 1>\n"
4187 "New thread started\n"
4188 "cnt = 0\n"
4189 "cnt = 1\n"
4190 "Called clean-up handler\n"
4191 "Thread terminated normally; cnt = 0\n"
4192 msgstr ""
4193 "$ B<./a.out x 1>\n"
4194 "New thread started\n"
4195 "cnt = 0\n"
4196 "cnt = 1\n"
4197 "Called clean-up handler\n"
4198 "Thread terminated normally; cnt = 0\n"
4199
4200 #. type: Plain text
4201 #: build/C/man3/pthread_cleanup_push.3:227
4202 msgid ""
4203 "In the above, we see that although the thread was not canceled, the clean-up "
4204 "handler was executed, because the argument given to B<pthread_cleanup_pop>"
4205 "()  was nonzero."
4206 msgstr ""
4207 "上記では、スレッドはキャンセルされていないが、クリーンアップハンドラが\n"
4208 "実行されていないことが分かる。これは B<pthread_cleanup_pop>() の引き数\n"
4209 "に 0 以外を渡したからである。"
4210
4211 #. type: Plain text
4212 #: build/C/man3/pthread_cleanup_push.3:236
4213 #, no-wrap
4214 msgid ""
4215 "#include E<lt>pthread.hE<gt>\n"
4216 "#include E<lt>sys/types.hE<gt>\n"
4217 "#include E<lt>stdio.hE<gt>\n"
4218 "#include E<lt>stdlib.hE<gt>\n"
4219 "#include E<lt>unistd.hE<gt>\n"
4220 "#include E<lt>errno.hE<gt>\n"
4221 msgstr ""
4222 "#include E<lt>pthread.hE<gt>\n"
4223 "#include E<lt>sys/types.hE<gt>\n"
4224 "#include E<lt>stdio.hE<gt>\n"
4225 "#include E<lt>stdlib.hE<gt>\n"
4226 "#include E<lt>unistd.hE<gt>\n"
4227 "#include E<lt>errno.hE<gt>\n"
4228
4229 #. type: Plain text
4230 #: build/C/man3/pthread_cleanup_push.3:243
4231 #, no-wrap
4232 msgid ""
4233 "static int done = 0;\n"
4234 "static int cleanup_pop_arg = 0;\n"
4235 "static int cnt = 0;\n"
4236 msgstr ""
4237 "static int done = 0;\n"
4238 "static int cleanup_pop_arg = 0;\n"
4239 "static int cnt = 0;\n"
4240
4241 #. type: Plain text
4242 #: build/C/man3/pthread_cleanup_push.3:250
4243 #, no-wrap
4244 msgid ""
4245 "static void\n"
4246 "cleanup_handler(void *arg)\n"
4247 "{\n"
4248 "    printf(\"Called clean-up handler\\en\");\n"
4249 "    cnt = 0;\n"
4250 "}\n"
4251 msgstr ""
4252 "static void\n"
4253 "cleanup_handler(void *arg)\n"
4254 "{\n"
4255 "    printf(\"Called clean-up handler\\en\");\n"
4256 "    cnt = 0;\n"
4257 "}\n"
4258
4259 #. type: Plain text
4260 #: build/C/man3/pthread_cleanup_push.3:255
4261 #, no-wrap
4262 msgid ""
4263 "static void *\n"
4264 "thread_start(void *arg)\n"
4265 "{\n"
4266 "    time_t start, curr;\n"
4267 msgstr ""
4268 "static void *\n"
4269 "thread_start(void *arg)\n"
4270 "{\n"
4271 "    time_t start, curr;\n"
4272
4273 #. type: Plain text
4274 #: build/C/man3/pthread_cleanup_push.3:257
4275 #, no-wrap
4276 msgid "    printf(\"New thread started\\en\");\n"
4277 msgstr "    printf(\"New thread started\\en\");\n"
4278
4279 #. type: Plain text
4280 #: build/C/man3/pthread_cleanup_push.3:259
4281 #, no-wrap
4282 msgid "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4283 msgstr "    pthread_cleanup_push(cleanup_handler, NULL);\n"
4284
4285 #. type: Plain text
4286 #: build/C/man3/pthread_cleanup_push.3:261
4287 #, no-wrap
4288 msgid "    curr = start = time(NULL);\n"
4289 msgstr "    curr = start = time(NULL);\n"
4290
4291 #. type: Plain text
4292 #: build/C/man3/pthread_cleanup_push.3:270
4293 #, no-wrap
4294 msgid ""
4295 "    while (!done) {\n"
4296 "        pthread_testcancel();           /* A cancellation point */\n"
4297 "        if (curr E<lt> time(NULL)) {\n"
4298 "            curr = time(NULL);\n"
4299 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4300 "            cnt++;\n"
4301 "        }\n"
4302 "    }\n"
4303 msgstr ""
4304 "    while (!done) {\n"
4305 "        pthread_testcancel();           /* A cancellation point */\n"
4306 "        if (curr E<lt> time(NULL)) {\n"
4307 "            curr = time(NULL);\n"
4308 "            printf(\"cnt = %d\\en\", cnt);  /* A cancellation point */\n"
4309 "            cnt++;\n"
4310 "        }\n"
4311 "    }\n"
4312
4313 #. type: Plain text
4314 #: build/C/man3/pthread_cleanup_push.3:274
4315 #, no-wrap
4316 msgid ""
4317 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4318 "    return NULL;\n"
4319 "}\n"
4320 msgstr ""
4321 "    pthread_cleanup_pop(cleanup_pop_arg);\n"
4322 "    return NULL;\n"
4323 "}\n"
4324
4325 #. type: Plain text
4326 #: build/C/man3/pthread_cleanup_push.3:281
4327 #, no-wrap
4328 msgid ""
4329 "int\n"
4330 "main(int argc, char *argv[])\n"
4331 "{\n"
4332 "    pthread_t thr;\n"
4333 "    int s;\n"
4334 "    void *res;\n"
4335 msgstr ""
4336 "int\n"
4337 "main(int argc, char *argv[])\n"
4338 "{\n"
4339 "    pthread_t thr;\n"
4340 "    int s;\n"
4341 "    void *res;\n"
4342
4343 #. type: Plain text
4344 #: build/C/man3/pthread_cleanup_push.3:285
4345 #, no-wrap
4346 msgid ""
4347 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4348 "    if (s != 0)\n"
4349 "        handle_error_en(s, \"pthread_create\");\n"
4350 msgstr ""
4351 "    s = pthread_create(&thr, NULL, thread_start, NULL);\n"
4352 "    if (s != 0)\n"
4353 "        handle_error_en(s, \"pthread_create\");\n"
4354
4355 #. type: Plain text
4356 #: build/C/man3/pthread_cleanup_push.3:287
4357 #, no-wrap
4358 msgid "    sleep(2);           /* Allow new thread to run a while */\n"
4359 msgstr "    sleep(2);           /* Allow new thread to run a while */\n"
4360
4361 #. type: Plain text
4362 #: build/C/man3/pthread_cleanup_push.3:292
4363 #, no-wrap
4364 msgid ""
4365 "    if (argc E<gt> 1) {\n"
4366 "        if (argc E<gt> 2)\n"
4367 "            cleanup_pop_arg = atoi(argv[2]);\n"
4368 "        done = 1;\n"
4369 msgstr ""
4370 "    if (argc E<gt> 1) {\n"
4371 "        if (argc E<gt> 2)\n"
4372 "            cleanup_pop_arg = atoi(argv[2]);\n"
4373 "        done = 1;\n"
4374
4375 #. type: Plain text
4376 #: build/C/man3/pthread_cleanup_push.3:299
4377 #, no-wrap
4378 msgid ""
4379 "    } else {\n"
4380 "        printf(\"Canceling thread\\en\");\n"
4381 "        s = pthread_cancel(thr);\n"
4382 "        if (s != 0)\n"
4383 "            handle_error_en(s, \"pthread_cancel\");\n"
4384 "    }\n"
4385 msgstr ""
4386 "    } else {\n"
4387 "        printf(\"Canceling thread\\en\");\n"
4388 "        s = pthread_cancel(thr);\n"
4389 "        if (s != 0)\n"
4390 "            handle_error_en(s, \"pthread_cancel\");\n"
4391 "    }\n"
4392
4393 #. type: Plain text
4394 #: build/C/man3/pthread_cleanup_push.3:310
4395 #, no-wrap
4396 msgid ""
4397 "    if (res == PTHREAD_CANCELED)\n"
4398 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4399 "    else\n"
4400 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4401 "    exit(EXIT_SUCCESS);\n"
4402 "}\n"
4403 msgstr ""
4404 "    if (res == PTHREAD_CANCELED)\n"
4405 "        printf(\"Thread was canceled; cnt = %d\\en\", cnt);\n"
4406 "    else\n"
4407 "        printf(\"Thread terminated normally; cnt = %d\\en\", cnt);\n"
4408 "    exit(EXIT_SUCCESS);\n"
4409 "}\n"
4410
4411 #. type: Plain text
4412 #: build/C/man3/pthread_cleanup_push.3:317
4413 msgid ""
4414 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4415 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4416 msgstr ""
4417 "B<pthread_cancel>(3), B<pthread_cleanup_push_defer_np>(3), "
4418 "B<pthread_setcancelstate>(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4419
4420 #. type: TH
4421 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4422 #, no-wrap
4423 msgid "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4424 msgstr "PTHREAD_CLEANUP_PUSH_DEFER_NP"
4425
4426 #. type: TH
4427 #: build/C/man3/pthread_cleanup_push_defer_np.3:26
4428 #, no-wrap
4429 msgid "2008-12-04"
4430 msgstr "2008-12-04"
4431
4432 #. type: Plain text
4433 #: build/C/man3/pthread_cleanup_push_defer_np.3:30
4434 msgid ""
4435 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - push and pop "
4436 "thread cancellation clean-up handlers while saving cancelability type"
4437 msgstr ""
4438 "pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np - "
4439 "cancelability type を保持したままでスレッドのキャンセルクリーンアップハンドラ"
4440 "の push/pop を行う"
4441
4442 #. type: Plain text
4443 #: build/C/man3/pthread_cleanup_push_defer_np.3:37
4444 #, no-wrap
4445 msgid ""
4446 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4447 "B<                                   void *>I<arg>B<);>\n"
4448 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4449 msgstr ""
4450 "B<void pthread_cleanup_push_defer_np(void (*>I<routine>B<)(void *),>\n"
4451 "B<                                   void *>I<arg>B<);>\n"
4452 "B<void pthread_cleanup_pop_restore_np(int >I<execute>B<);>\n"
4453
4454 #. type: Plain text
4455 #: build/C/man3/pthread_cleanup_push_defer_np.3:40
4456 #: build/C/man3/pthread_create.3:38 build/C/man3/pthread_detach.3:37
4457 #: build/C/man3/pthread_join.3:37 build/C/man3/pthread_kill.3:37
4458 #: build/C/man3/pthread_setname_np.3:39 build/C/man3/pthread_sigmask.3:38
4459 #: build/C/man3/pthread_sigqueue.3:37 build/C/man3/pthread_tryjoin_np.3:42
4460 #: build/C/man3/pthread_yield.3:37
4461 msgid "Compile and link with I<-pthread>."
4462 msgstr "I<-pthread> を付けてコンパイルとリンクを行う。"
4463
4464 #. type: Plain text
4465 #: build/C/man3/pthread_cleanup_push_defer_np.3:46
4466 msgid ""
4467 "These functions are the same as B<pthread_cleanup_push>(3)  and "
4468 "B<pthread_cleanup_pop>(3), except for the differences noted on this page."
4469 msgstr ""
4470 "これらの関数は B<pthread_cleanup_push>(3) と B<pthread_cleanup_pop>(3) と同じ"
4471 "だが、このページで説明する点が異なる。"
4472
4473 #. type: Plain text
4474 #: build/C/man3/pthread_cleanup_push_defer_np.3:59
4475 msgid ""
4476 "Like B<pthread_cleanup_push>(3), B<pthread_cleanup_push_defer_np>()  pushes "
4477 "I<routine> onto the thread's stack of cancellation clean-up handlers.  In "
4478 "addition, it also saves the thread's current cancelability type, and sets "
4479 "the cancelability type to \"deferred\" (see B<pthread_setcanceltype>(3)); "
4480 "this ensures that cancellation clean-up will occur even if the thread's "
4481 "cancelability type was \"asynchronous\" before the call."
4482 msgstr ""
4483 "B<pthread_cleanup_push>(3) と同様に、\n"
4484 "B<pthread_cleanup_push_defer_np>() は I<routine> をそのスレッドの\n"
4485 "クリーンアップハンドラのスタックに追加する。これに加えて、\n"
4486 "B<pthread_cleanup_push_defer_np>() は現在の cancelability type も\n"
4487 "保存し、cancelability type は \"deferred\" に設定する\n"
4488 "(B<pthread_setcanceltype>(3) 参照)。\n"
4489 "これにより、この関数が呼び出される前のスレッドの cancelability type が\n"
4490 "\"asynchronous\" であったとしても、キャンセルクリーンアップが行われること\n"
4491 "が保証される。"
4492
4493 #. type: Plain text
4494 #: build/C/man3/pthread_cleanup_push_defer_np.3:68
4495 msgid ""
4496 "Like B<pthread_cleanup_pop>(3), B<pthread_cleanup_pop_restore_np>()  pops "
4497 "the top-most clean-up handler from the thread's stack of cancellation clean-"
4498 "up handlers.  In addition, it restores the thread's cancelability type to "
4499 "its value at the time of the matching B<pthread_cleanup_push_defer_np>()."
4500 msgstr ""
4501 "B<pthread_cleanup_pop>(3) と同様に、\n"
4502 "B<pthread_cleanup_pop_restore_np>() はそのスレッドのキャンセル\n"
4503 "クリーンアップハンドラのスタックから一番上にあるクリーンアップハンドラ\n"
4504 "を取り出す。これに加えて、そのスレッドの cancelability type を、対応\n"
4505 "する B<pthread_cleanup_push_defer_np>() が呼ばれた時点の値に戻す。"
4506
4507 #. type: Plain text
4508 #: build/C/man3/pthread_cleanup_push_defer_np.3:74
4509 msgid ""
4510 "The caller must ensure that calls to these functions are paired within the "
4511 "same function, and at the same lexical nesting level.  Other restrictions "
4512 "apply, as described in B<pthread_cleanup_push>(3)."
4513 msgstr ""
4514 "呼び出し側では、これらの関数の呼び出しが同じ関数の中で対となり、かつ\n"
4515 "文法的に同じネストレベル (nesting level) になることを保証しなければ\n"
4516 "ならない。 B<pthread_cleanup_push>(3) で説明されている他の制限も\n"
4517 "適用される。"
4518
4519 #. type: Plain text
4520 #: build/C/man3/pthread_cleanup_push_defer_np.3:76
4521 msgid "This sequence of calls:"
4522 msgstr "以下の一連の呼び出し"
4523
4524 #. type: Plain text
4525 #: build/C/man3/pthread_cleanup_push_defer_np.3:81
4526 #, no-wrap
4527 msgid ""
4528 "pthread_cleanup_push_defer_np(routine, arg);\n"
4529 "pthread_cleanup_pop_restore_np(execute);\n"
4530 msgstr ""
4531 "pthread_cleanup_push_defer_np(routine, arg);\n"
4532 "pthread_cleanup_pop_restore_np(execute);\n"
4533
4534 #. type: Plain text
4535 #: build/C/man3/pthread_cleanup_push_defer_np.3:85
4536 msgid "is equivalent to (but shorter and more efficient than):"
4537 msgstr "と以下は等価である (但し、上の方がより簡潔で効率的である)。"
4538
4539 #. type: Plain text
4540 #: build/C/man3/pthread_cleanup_push_defer_np.3:91
4541 #, no-wrap
4542 msgid "int oldtype;\n"
4543 msgstr "int oldtype;\n"
4544
4545 #. type: Plain text
4546 #: build/C/man3/pthread_cleanup_push_defer_np.3:97
4547 #, no-wrap
4548 msgid ""
4549 "pthread_cleanup_push(routine, arg);\n"
4550 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4551 "\\&...\n"
4552 "pthread_setcanceltype(oldtype, NULL);\n"
4553 "pthread_cleanup_pop(execute);\n"
4554 msgstr ""
4555 "pthread_cleanup_push(routine, arg);\n"
4556 "pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);\n"
4557 "\\&...\n"
4558 "pthread_setcanceltype(oldtype, NULL);\n"
4559 "pthread_cleanup_pop(execute);\n"
4560
4561 #. type: Plain text
4562 #: build/C/man3/pthread_cleanup_push_defer_np.3:110
4563 msgid ""
4564 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4565 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4566 msgstr ""
4567 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
4568 "(3), B<pthread_testcancel>(3), B<pthreads>(7)"
4569
4570 #. type: TH
4571 #: build/C/man3/pthread_create.3:26
4572 #, no-wrap
4573 msgid "PTHREAD_CREATE"
4574 msgstr "PTHREAD_CREATE"
4575
4576 #. type: TH
4577 #: build/C/man3/pthread_create.3:26 build/C/man3/pthread_sigmask.3:26
4578 #, fuzzy, no-wrap
4579 #| msgid "2012-03-15"
4580 msgid "2012-08-03"
4581 msgstr "2012-03-15"
4582
4583 #. type: Plain text
4584 #: build/C/man3/pthread_create.3:29
4585 msgid "pthread_create - create a new thread"
4586 msgstr "pthread_create - 新しいスレッドを作成する"
4587
4588 #. type: Plain text
4589 #: build/C/man3/pthread_create.3:35
4590 #, no-wrap
4591 msgid ""
4592 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4593 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4594 msgstr ""
4595 "B<int pthread_create(pthread_t *>I<thread>B<, const pthread_attr_t *>I<attr>B<,>\n"
4596 "B<                   void *(*>I<start_routine>B<) (void *), void *>I<arg>B<);>\n"
4597
4598 #. type: Plain text
4599 #: build/C/man3/pthread_create.3:47
4600 msgid ""
4601 "The B<pthread_create>()  function starts a new thread in the calling "
4602 "process.  The new thread starts execution by invoking I<start_routine>(); "
4603 "I<arg> is passed as the sole argument of I<start_routine>()."
4604 msgstr ""
4605 "B<pthread_create>() 関数は、呼び出したプロセス内に新しいスレッドを作成す"
4606 "る。\n"
4607 "新しいスレッドの実行は、 I<start_routine>() を起動することで開始される。\n"
4608 "I<start_routine>() は引き数を一つだけ取り、\n"
4609 "I<arg> が I<start_routine>() の引き数として渡される。"
4610
4611 #. type: Plain text
4612 #: build/C/man3/pthread_create.3:49
4613 msgid "The new thread terminates in one of the following ways:"
4614 msgstr "新しく作成されたスレッドは、以下のいずれかで終了する。"
4615
4616 #. type: IP
4617 #: build/C/man3/pthread_create.3:49 build/C/man3/pthread_create.3:55
4618 #: build/C/man3/pthread_create.3:63 build/C/man3/pthread_create.3:66
4619 #: build/C/man3/pthread_getattr_np.3:52 build/C/man3/pthread_getattr_np.3:55
4620 #: build/C/man3/pthread_getattr_np.3:58
4621 #, no-wrap
4622 msgid "*"
4623 msgstr "*"
4624
4625 #. type: Plain text
4626 #: build/C/man3/pthread_create.3:55
4627 msgid ""
4628 "It calls B<pthread_exit>(3), specifying an exit status value that is "
4629 "available to another thread in the same process that calls B<pthread_join>"
4630 "(3)."
4631 msgstr ""
4632 "スレッドが B<pthread_exit>(3) を呼び出す。\n"
4633 "B<pthread_exit>(3) を呼び出す際には終了ステータス値を指定する。\n"
4634 "この値は B<pthread_join>(3) を呼び出した同じプロセス内の\n"
4635 "別のスレッドで参照できる。"
4636
4637 #. type: Plain text
4638 #: build/C/man3/pthread_create.3:63
4639 msgid ""
4640 "It returns from I<start_routine>().  This is equivalent to calling "
4641 "B<pthread_exit>(3)  with the value supplied in the I<return> statement."
4642 msgstr ""
4643 "スレッドが I<start_routine>() から返る。これは、\n"
4644 "I<return> 文に渡した値で B<pthread_exit>(3) を呼び出すのと等価である。"
4645
4646 #. type: Plain text
4647 #: build/C/man3/pthread_create.3:66
4648 msgid "It is canceled (see B<pthread_cancel>(3))."
4649 msgstr "スレッドがキャンセルされる (B<pthread_cancel>(3) 参照)。"
4650
4651 #. type: Plain text
4652 #: build/C/man3/pthread_create.3:72
4653 msgid ""
4654 "Any of the threads in the process calls B<exit>(3), or the main thread "
4655 "performs a return from I<main>().  This causes the termination of all "
4656 "threads in the process."
4657 msgstr ""
4658 "プロセス内のいずれかのスレッドで B<exit>(3) が呼ばれるか、\n"
4659 "メインスレッドで I<main>() 内で return が実行される。\n"
4660 "この場合は、プロセス内の全てのスレッドが終了される。"
4661
4662 #. type: Plain text
4663 #: build/C/man3/pthread_create.3:86
4664 msgid ""
4665 "The I<attr> argument points to a I<pthread_attr_t> structure whose contents "
4666 "are used at thread creation time to determine attributes for the new thread; "
4667 "this structure is initialized using B<pthread_attr_init>(3)  and related "
4668 "functions.  If I<attr> is NULL, then the thread is created with default "
4669 "attributes."
4670 msgstr ""
4671 "I<attr> 引き数は I<pthread_attr_t> 構造体へのポインタであり、\n"
4672 "I<pthread_attr_t> 構造体の内容を使用して、スレッド作成時に\n"
4673 "新しいスレッドの属性が決定される。\n"
4674 "この構造体は B<pthread_attr_init>(3) や関連の関数を使って初期化される。\n"
4675 "I<attr> が NULL の場合、新しいスレッドはデフォルトの属性で作成される。"
4676
4677 #. type: Plain text
4678 #: build/C/man3/pthread_create.3:93
4679 msgid ""
4680 "Before returning, a successful call to B<pthread_create>()  stores the ID of "
4681 "the new thread in the buffer pointed to by I<thread>; this identifier is "
4682 "used to refer to the thread in subsequent calls to other pthreads functions."
4683 msgstr ""
4684 "成功した場合は、 B<pthread_create>() は返る前に新しいスレッドの ID を\n"
4685 "I<thread> が指すバッファに格納する。この ID は、これ以降に他の\n"
4686 "pthreads 関数の呼び出しでスレッドを参照するのに使用される。"
4687
4688 #. type: Plain text
4689 #: build/C/man3/pthread_create.3:101
4690 msgid ""
4691 "The new thread inherits a copy of the creating thread's signal mask "
4692 "(B<pthread_sigmask>(3)).  The set of pending signals for the new thread is "
4693 "empty (B<sigpending>(2)).  The new thread does not inherit the creating "
4694 "thread's alternate signal stack (B<sigaltstack>(2))."
4695 msgstr ""
4696 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスク\n"
4697 "(B<pthread_sigmask>(3) 参照) のコピーを継承する。\n"
4698 "新しいスレッドの処理待ちシグナル (B<sigpending>(2)) の集合は空となる。\n"
4699 "新しいスレッドはスレッドを作成したスレッドの代替シグナルスタック\n"
4700 "(B<sigaltstack>(2)) を継承しない。"
4701
4702 #. type: Plain text
4703 #: build/C/man3/pthread_create.3:104
4704 msgid ""
4705 "The new thread inherits the calling thread's floating-point environment "
4706 "(B<fenv>(3))."
4707 msgstr ""
4708 "新しいスレッドは呼び出したスレッドの浮動小数点環境 (B<fenv>(3))\n"
4709 "を継承する。"
4710
4711 #.  CLOCK_THREAD_CPUTIME_ID in clock_gettime(2)
4712 #. type: Plain text
4713 #: build/C/man3/pthread_create.3:109
4714 msgid ""
4715 "The initial value of the new thread's CPU-time clock is 0 (see "
4716 "B<pthread_getcpuclockid>(3))."
4717 msgstr ""
4718 "新しいスレッドの CPU 時間時計の初期値は 0 である\n"
4719 "(B<pthread_getcpuclockid>(3) 参照)。"
4720
4721 #. type: SS
4722 #: build/C/man3/pthread_create.3:109
4723 #, no-wrap
4724 msgid "Linux-specific details"
4725 msgstr "Linux 固有の詳細"
4726
4727 #. type: Plain text
4728 #: build/C/man3/pthread_create.3:115
4729 msgid ""
4730 "The new thread inherits copies of the calling thread's capability sets (see "
4731 "B<capabilities>(7))  and CPU affinity mask (see B<sched_setaffinity>(2))."
4732 msgstr ""
4733 "新しいスレッドは、呼び出したスレッドの\n"
4734 "ケーパビリティセット (B<capabilities>(7) 参照) と \n"
4735 "CPU affinity マスク (B<sched_setaffinity>(2) 参照) の\n"
4736 "コピーをを継承しない。"
4737
4738 #. type: Plain text
4739 #: build/C/man3/pthread_create.3:122
4740 msgid ""
4741 "On success, B<pthread_create>()  returns 0; on error, it returns an error "
4742 "number, and the contents of I<*thread> are undefined."
4743 msgstr ""
4744 "成功すると、 B<pthread_create>() は 0 を返す。\n"
4745 "エラーの場合は、エラー番号が返され、 I<*thread> の内容は不定である。"
4746
4747 #. type: TP
4748 #: build/C/man3/pthread_create.3:123 build/C/man3/pthread_sigqueue.3:71
4749 #, no-wrap
4750 msgid "B<EAGAIN>"
4751 msgstr "B<EAGAIN>"
4752
4753 #. type: Plain text
4754 #: build/C/man3/pthread_create.3:137
4755 msgid ""
4756 "Insufficient resources to create another thread, or a system-imposed limit "
4757 "on the number of threads was encountered.  The latter case may occur in two "
4758 "ways: the B<RLIMIT_NPROC> soft resource limit (set via B<setrlimit>(2)), "
4759 "which limits the number of process for a real user ID, was reached; or the "
4760 "kernel's system-wide limit on the number of threads, I</proc/sys/kernel/"
4761 "threads-max>, was reached."
4762 msgstr ""
4763 "別のスレッドを作成するのに十分なリソースがないか、システムで設定された\n"
4764 "スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。\n"
4765 "一つは、実ユーザ ID 当たりのプロセス数の上限である、B<RLIMIT_NPROC> \n"
4766 "ソフトリソース上限 (B<setrlimit>(2) で設定できる) に達していた場合\n"
4767 "である。もう一つはカーネルのシステム全体のスレッド数の上限である\n"
4768 "I</proc/sys/kernel/threads-max> が達していた場合である。"
4769
4770 #. type: Plain text
4771 #: build/C/man3/pthread_create.3:141
4772 msgid "Invalid settings in I<attr>."
4773 msgstr "I<attr> で指定された設定が不正である。"
4774
4775 #. type: TP
4776 #: build/C/man3/pthread_create.3:141 build/C/man3/pthread_setschedparam.3:129
4777 #: build/C/man3/pthread_setschedprio.3:66
4778 #, no-wrap
4779 msgid "B<EPERM>"
4780 msgstr "B<EPERM>"
4781
4782 #. type: Plain text
4783 #: build/C/man3/pthread_create.3:146
4784 msgid ""
4785 "No permission to set the scheduling policy and parameters specified in "
4786 "I<attr>."
4787 msgstr ""
4788 "I<attr> に指定されたスケジューリングポリシーとパラメータを\n"
4789 "設定する許可がない。"
4790
4791 #. type: Plain text
4792 #: build/C/man3/pthread_create.3:160
4793 msgid ""
4794 "See B<pthread_self>(3)  for further information on the thread ID returned in "
4795 "I<*thread> by B<pthread_create>().  Unless real-time scheduling policies are "
4796 "being employed, after a call to B<pthread_create>(), it is indeterminate "
4797 "which thread\\(emthe caller or the new thread\\(emwill next execute."
4798 msgstr ""
4799 "B<pthread_create>() が I<*thread> で返すスレッド ID についての\n"
4800 "詳しい情報は B<pthread_self>(3) を参照のこと。\n"
4801 "リアルタイムスケジューリングポリシーが使用されない限り、\n"
4802 "B<pthread_create>() の呼び出し後に、\n"
4803 "どのスレッドが\\(em呼び出したスレッドか新しいスレッドか\\(em\n"
4804 "次に実行されるかは決まっていない。"
4805
4806 #. type: Plain text
4807 #: build/C/man3/pthread_create.3:180
4808 msgid ""
4809 "A thread may either be I<joinable> or I<detached>.  If a thread is joinable, "
4810 "then another thread can call B<pthread_join>(3)  to wait for the thread to "
4811 "terminate and fetch its exit status.  Only when a terminated joinable thread "
4812 "has been joined are the last of its resources released back to the system.  "
4813 "When a detached thread terminates, its resources are automatically released "
4814 "back to the system: it is not possible to join with the thread in order to "
4815 "obtain its exit status.  Making a thread detached is useful for some types "
4816 "of daemon threads whose exit status the application does not need to care "
4817 "about.  By default, a new thread is created in a joinable state, unless "
4818 "I<attr> was set to create the thread in a detached state (using "
4819 "B<pthread_attr_setdetachstate>(3))."
4820 msgstr ""
4821 "スレッドは I<join 可能>か I<detached (切り離された状態)> のどちらかに\n"
4822 "することができる。スレッドが join 可能な場合、別のスレッドが\n"
4823 "B<pthread_join>(3) を使って終了したスレッドを待ち、終了ステータスを取得\n"
4824 "することができる。終了した join 可能なスレッドは join された場合にのみ、\n"
4825 "そのスレッドの最後に残ったリソースが解放されシステムに戻される。\n"
4826 "detached 状態のスレッドが終了すると、そのスレッドのリソースは自動的に\n"
4827 "システムに戻される。detached 状態のスレッドを join して、その終了\n"
4828 "ステータスを取得することはできない。スレッドを detached 状態にするのは、\n"
4829 "その終了ステータスをアプリケーションが気にする必要がないある種の\n"
4830 "デーモン (daemon) スレッドでは有用である。\n"
4831 "デフォルトでは、新しいスレッドは join 可能な状態で作成される。\n"
4832 "(B<pthread_attr_setdetachstate>(3) を使って) I<attr> でスレッドが\n"
4833 "detached 状態で作成されるように設定されていない限り、join 可能な状態で\n"
4834 "作成される。"
4835
4836 #.  FIXME . Perhaps some of the following detail should be in
4837 #.  a future pthread_attr_setstacksize(3) page.
4838 #. type: Plain text
4839 #: build/C/man3/pthread_create.3:196
4840 msgid ""
4841 "On Linux/x86-32, the default stack size for a new thread is 2 megabytes.  "
4842 "Under the NPTL threading implementation, if the B<RLIMIT_STACK> soft "
4843 "resource limit I<at the time the program started> has any value other than "
4844 "\"unlimited\", then it determines the default stack size of new threads.  "
4845 "Using B<pthread_attr_setstacksize>(3), the stack size attribute can be "
4846 "explicitly set in the I<attr> argument used to create a thread, in order to "
4847 "obtain a stack size other than the default."
4848 msgstr ""
4849 "Linux/x86-32 では、新しいスレッドのデフォルトのスタックサイズは 2MB で\n"
4850 "ある。NPTL スレッド実装の下では、I<プログラム開始時の> B<RLIMIT_STACK>\n"
4851 "ソフトリソース上限が\"unlimited\" 以外の場合、その値が新しいスレッドのデ\n"
4852 "フォルトのスタックサイズとなる。\n"
4853 "B<pthread_attr_setstacksize>(3) を使って、スレッドを作成する際の\n"
4854 "I<attr> 引き数に明示的にスタックサイズ属性を設定することで、\n"
4855 "デフォルト値以外のスタックサイズを得ることができる。"
4856
4857 #. type: Plain text
4858 #: build/C/man3/pthread_create.3:202
4859 msgid ""
4860 "In the obsolete LinuxThreads implementation, each of the threads in a "
4861 "process has a different process ID.  This is in violation of the POSIX "
4862 "threads specification, and is the source of many other nonconformances to "
4863 "the standard; see B<pthreads>(7)."
4864 msgstr ""
4865 "廃止予定の LinuxThreads 実装では、プロセス内の各スレッドは異なる\n"
4866 "プロセス ID を持つ。これは POSIX スレッドの規格に違反しており、\n"
4867 "他の多くの標準非準拠の点の原因になっている。\n"
4868 "B<pthreads>(7) を参照のこと。"
4869
4870 #. type: Plain text
4871 #: build/C/man3/pthread_create.3:206
4872 msgid ""
4873 "The program below demonstrates the use of B<pthread_create>(), as well as a "
4874 "number of other functions in the pthreads API."
4875 msgstr ""
4876 "以下のプログラムは、 B<pthread_create>() や\n"
4877 "pthreads API の他のいろいろな関数の使用例を示している。"
4878
4879 #. type: Plain text
4880 #: build/C/man3/pthread_create.3:211
4881 msgid ""
4882 "In the following run, on a system providing the NPTL threading "
4883 "implementation, the stack size defaults to the value given by the \"stack "
4884 "size\" resource limit:"
4885 msgstr ""
4886 "以下の実行例は、 NPTL スレッド実装が提供されているシステムでのもので、\n"
4887 "スタックサイズがデフォルト値の \"stack size\" リソース上限で指定される値\n"
4888 "になる。"
4889
4890 #. type: Plain text
4891 #: build/C/man3/pthread_create.3:223
4892 #, no-wrap
4893 msgid ""
4894 "$B< ulimit -s>\n"
4895 "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4896 "$B< ./a.out hola salut servus>\n"
4897 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4898 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4899 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4900 "Joined with thread 1; returned value was HOLA\n"
4901 "Joined with thread 2; returned value was SALUT\n"
4902 "Joined with thread 3; returned value was SERVUS\n"
4903 msgstr ""
4904 "$B< ulimit -s>\n"
4905 "8192            # The stack size limit is 8 MB (0x80000 bytes)\n"
4906 "$B< ./a.out hola salut servus>\n"
4907 "Thread 1: top of stack near 0xb7dd03b8; argv_string=hola\n"
4908 "Thread 2: top of stack near 0xb75cf3b8; argv_string=salut\n"
4909 "Thread 3: top of stack near 0xb6dce3b8; argv_string=servus\n"
4910 "Joined with thread 1; returned value was HOLA\n"
4911 "Joined with thread 2; returned value was SALUT\n"
4912 "Joined with thread 3; returned value was SERVUS\n"
4913
4914 #. type: Plain text
4915 #: build/C/man3/pthread_create.3:229
4916 msgid ""
4917 "In the next run, the program explicitly sets a stack size of 1MB (using "
4918 "B<pthread_attr_setstacksize>(3))  for the created threads:"
4919 msgstr ""
4920 "次の実行例では、プログラム内で、作成されるスレッドに対して\n"
4921 "(B<pthread_attr_setstacksize>(3) を使って1MB のスタックサイズを\n"
4922 "明示的に設定している。"
4923
4924 #. type: Plain text
4925 #: build/C/man3/pthread_create.3:239
4926 #, no-wrap
4927 msgid ""
4928 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4929 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4930 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4931 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4932 "Joined with thread 1; returned value was HOLA\n"
4933 "Joined with thread 2; returned value was SALUT\n"
4934 "Joined with thread 3; returned value was SERVUS\n"
4935 msgstr ""
4936 "$B< ./a.out -s 0x100000 hola salut servus>\n"
4937 "Thread 1: top of stack near 0xb7d723b8; argv_string=hola\n"
4938 "Thread 2: top of stack near 0xb7c713b8; argv_string=salut\n"
4939 "Thread 3: top of stack near 0xb7b703b8; argv_string=servus\n"
4940 "Joined with thread 1; returned value was HOLA\n"
4941 "Joined with thread 2; returned value was SALUT\n"
4942 "Joined with thread 3; returned value was SERVUS\n"
4943
4944 #. type: Plain text
4945 #: build/C/man3/pthread_create.3:251
4946 #, no-wrap
4947 msgid ""
4948 "#include E<lt>pthread.hE<gt>\n"
4949 "#include E<lt>string.hE<gt>\n"
4950 "#include E<lt>stdio.hE<gt>\n"
4951 "#include E<lt>stdlib.hE<gt>\n"
4952 "#include E<lt>unistd.hE<gt>\n"
4953 "#include E<lt>errno.hE<gt>\n"
4954 "#include E<lt>ctype.hE<gt>\n"
4955 msgstr ""
4956 "#include E<lt>pthread.hE<gt>\n"
4957 "#include E<lt>string.hE<gt>\n"
4958 "#include E<lt>stdio.hE<gt>\n"
4959 "#include E<lt>stdlib.hE<gt>\n"
4960 "#include E<lt>unistd.hE<gt>\n"
4961 "#include E<lt>errno.hE<gt>\n"
4962 "#include E<lt>ctype.hE<gt>\n"
4963
4964 #. type: Plain text
4965 #: build/C/man3/pthread_create.3:257 build/C/man3/pthread_getcpuclockid.3:110
4966 #, no-wrap
4967 msgid ""
4968 "#define handle_error(msg) \\e\n"
4969 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4970 msgstr ""
4971 "#define handle_error(msg) \\e\n"
4972 "        do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
4973
4974 #. type: Plain text
4975 #: build/C/man3/pthread_create.3:263
4976 #, no-wrap
4977 msgid ""
4978 "struct thread_info {    /* Used as argument to thread_start() */\n"
4979 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4980 "    int       thread_num;       /* Application-defined thread # */\n"
4981 "    char     *argv_string;      /* From command-line argument */\n"
4982 "};\n"
4983 msgstr ""
4984 "struct thread_info {    /* Used as argument to thread_start() */\n"
4985 "    pthread_t thread_id;        /* ID returned by pthread_create() */\n"
4986 "    int       thread_num;       /* Application-defined thread # */\n"
4987 "    char     *argv_string;      /* From command-line argument */\n"
4988 "};\n"
4989
4990 #. type: Plain text
4991 #: build/C/man3/pthread_create.3:266
4992 #, no-wrap
4993 msgid ""
4994 "/* Thread start function: display address near top of our stack,\n"
4995 "   and return upper-cased copy of argv_string */\n"
4996 msgstr ""
4997 "/* Thread start function: display address near top of our stack,\n"
4998 "   and return upper-cased copy of argv_string */\n"
4999
5000 #. type: Plain text
5001 #: build/C/man3/pthread_create.3:272
5002 #, fuzzy, no-wrap
5003 #| msgid ""
5004 #| "static void *\n"
5005 #| "thread_start(void *arg)\n"
5006 #| "{\n"
5007 #| "    struct thread_info *tinfo = (struct thread_info *) arg;\n"
5008 #| "    char *uargv, *p;\n"
5009 msgid ""
5010 "static void *\n"
5011 "thread_start(void *arg)\n"
5012 "{\n"
5013 "    struct thread_info *tinfo = arg;\n"
5014 "    char *uargv, *p;\n"
5015 msgstr ""
5016 "static void *\n"
5017 "thread_start(void *arg)\n"
5018 "{\n"
5019 "    struct thread_info *tinfo = (struct thread_info *) arg;\n"
5020 "    char *uargv, *p;\n"
5021
5022 #. type: Plain text
5023 #: build/C/man3/pthread_create.3:275
5024 #, no-wrap
5025 msgid ""
5026 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5027 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5028 msgstr ""
5029 "    printf(\"Thread %d: top of stack near %p; argv_string=%s\\en\",\n"
5030 "            tinfo-E<gt>thread_num, &p, tinfo-E<gt>argv_string);\n"
5031
5032 #. type: Plain text
5033 #: build/C/man3/pthread_create.3:279
5034 #, no-wrap
5035 msgid ""
5036 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5037 "    if (uargv == NULL)\n"
5038 "        handle_error(\"strdup\");\n"
5039 msgstr ""
5040 "    uargv = strdup(tinfo-E<gt>argv_string);\n"
5041 "    if (uargv == NULL)\n"
5042 "        handle_error(\"strdup\");\n"
5043
5044 #. type: Plain text
5045 #: build/C/man3/pthread_create.3:282
5046 #, no-wrap
5047 msgid ""
5048 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5049 "        *p = toupper(*p);\n"
5050 msgstr ""
5051 "    for (p = uargv; *p != \\(aq\\e0\\(aq; p++)\n"
5052 "        *p = toupper(*p);\n"
5053
5054 #. type: Plain text
5055 #: build/C/man3/pthread_create.3:285
5056 #, no-wrap
5057 msgid ""
5058 "    return uargv;\n"
5059 "}\n"
5060 msgstr ""
5061 "    return uargv;\n"
5062 "}\n"
5063
5064 #. type: Plain text
5065 #: build/C/man3/pthread_create.3:294
5066 #, no-wrap
5067 msgid ""
5068 "int\n"
5069 "main(int argc, char *argv[])\n"
5070 "{\n"
5071 "    int s, tnum, opt, num_threads;\n"
5072 "    struct thread_info *tinfo;\n"
5073 "    pthread_attr_t attr;\n"
5074 "    int stack_size;\n"
5075 "    void *res;\n"
5076 msgstr ""
5077 "int\n"
5078 "main(int argc, char *argv[])\n"
5079 "{\n"
5080 "    int s, tnum, opt, num_threads;\n"
5081 "    struct thread_info *tinfo;\n"
5082 "    pthread_attr_t attr;\n"
5083 "    int stack_size;\n"
5084 "    void *res;\n"
5085
5086 #. type: Plain text
5087 #: build/C/man3/pthread_create.3:296
5088 #, no-wrap
5089 msgid "    /* The \"-s\" option specifies a stack size for our threads */\n"
5090 msgstr "    /* The \"-s\" option specifies a stack size for our threads */\n"
5091
5092 #. type: Plain text
5093 #: build/C/man3/pthread_create.3:303
5094 #, no-wrap
5095 msgid ""
5096 "    stack_size = -1;\n"
5097 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5098 "        switch (opt) {\n"
5099 "        case \\(aqs\\(aq:\n"
5100 "            stack_size = strtoul(optarg, NULL, 0);\n"
5101 "            break;\n"
5102 msgstr ""
5103 "    stack_size = -1;\n"
5104 "    while ((opt = getopt(argc, argv, \"s:\")) != -1) {\n"
5105 "        switch (opt) {\n"
5106 "        case \\(aqs\\(aq:\n"
5107 "            stack_size = strtoul(optarg, NULL, 0);\n"
5108 "            break;\n"
5109
5110 #. type: Plain text
5111 #: build/C/man3/pthread_create.3:310
5112 #, no-wrap
5113 msgid ""
5114 "        default:\n"
5115 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5116 "                    argv[0]);\n"
5117 "            exit(EXIT_FAILURE);\n"
5118 "        }\n"
5119 "    }\n"
5120 msgstr ""
5121 "        default:\n"
5122 "            fprintf(stderr, \"Usage: %s [-s stack-size] arg...\\en\",\n"
5123 "                    argv[0]);\n"
5124 "            exit(EXIT_FAILURE);\n"
5125 "        }\n"
5126 "    }\n"
5127
5128 #. type: Plain text
5129 #: build/C/man3/pthread_create.3:312
5130 #, no-wrap
5131 msgid "    num_threads = argc - optind;\n"
5132 msgstr "    num_threads = argc - optind;\n"
5133
5134 #. type: Plain text
5135 #: build/C/man3/pthread_create.3:314
5136 #, no-wrap
5137 msgid "    /* Initialize thread creation attributes */\n"
5138 msgstr "    /* Initialize thread creation attributes */\n"
5139
5140 #. type: Plain text
5141 #: build/C/man3/pthread_create.3:318
5142 #, no-wrap
5143 msgid ""
5144 "    s = pthread_attr_init(&attr);\n"
5145 "    if (s != 0)\n"
5146 "        handle_error_en(s, \"pthread_attr_init\");\n"
5147 msgstr ""
5148 "    s = pthread_attr_init(&attr);\n"
5149 "    if (s != 0)\n"
5150 "        handle_error_en(s, \"pthread_attr_init\");\n"
5151
5152 #. type: Plain text
5153 #: build/C/man3/pthread_create.3:324
5154 #, no-wrap
5155 msgid ""
5156 "    if (stack_size E<gt> 0) {\n"
5157 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5158 "        if (s != 0)\n"
5159 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5160 "    }\n"
5161 msgstr ""
5162 "    if (stack_size E<gt> 0) {\n"
5163 "        s = pthread_attr_setstacksize(&attr, stack_size);\n"
5164 "        if (s != 0)\n"
5165 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
5166 "    }\n"
5167
5168 #. type: Plain text
5169 #: build/C/man3/pthread_create.3:326
5170 #, no-wrap
5171 msgid "    /* Allocate memory for pthread_create() arguments */\n"
5172 msgstr "    /* Allocate memory for pthread_create() arguments */\n"
5173
5174 #. type: Plain text
5175 #: build/C/man3/pthread_create.3:330
5176 #, no-wrap
5177 msgid ""
5178 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5179 "    if (tinfo == NULL)\n"
5180 "        handle_error(\"calloc\");\n"
5181 msgstr ""
5182 "    tinfo = calloc(num_threads, sizeof(struct thread_info));\n"
5183 "    if (tinfo == NULL)\n"
5184 "        handle_error(\"calloc\");\n"
5185
5186 #. type: Plain text
5187 #: build/C/man3/pthread_create.3:332
5188 #, no-wrap
5189 msgid "    /* Create one thread for each command-line argument */\n"
5190 msgstr "    /* Create one thread for each command-line argument */\n"
5191
5192 #. type: Plain text
5193 #: build/C/man3/pthread_create.3:336
5194 #, no-wrap
5195 msgid ""
5196 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5197 "        tinfo[tnum].thread_num = tnum + 1;\n"
5198 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5199 msgstr ""
5200 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5201 "        tinfo[tnum].thread_num = tnum + 1;\n"
5202 "        tinfo[tnum].argv_string = argv[optind + tnum];\n"
5203
5204 #. type: Plain text
5205 #: build/C/man3/pthread_create.3:339
5206 #, no-wrap
5207 msgid ""
5208 "        /* The pthread_create() call stores the thread ID into\n"
5209 "           corresponding element of tinfo[] */\n"
5210 msgstr ""
5211 "        /* The pthread_create() call stores the thread ID into\n"
5212 "           corresponding element of tinfo[] */\n"
5213
5214 #. type: Plain text
5215 #: build/C/man3/pthread_create.3:345
5216 #, no-wrap
5217 msgid ""
5218 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5219 "                           &thread_start, &tinfo[tnum]);\n"
5220 "        if (s != 0)\n"
5221 "            handle_error_en(s, \"pthread_create\");\n"
5222 "    }\n"
5223 msgstr ""
5224 "        s = pthread_create(&tinfo[tnum].thread_id, &attr,\n"
5225 "                           &thread_start, &tinfo[tnum]);\n"
5226 "        if (s != 0)\n"
5227 "            handle_error_en(s, \"pthread_create\");\n"
5228 "    }\n"
5229
5230 #. type: Plain text
5231 #: build/C/man3/pthread_create.3:348
5232 #, no-wrap
5233 msgid ""
5234 "    /* Destroy the thread attributes object, since it is no\n"
5235 "       longer needed */\n"
5236 msgstr ""
5237 "    /* Destroy the thread attributes object, since it is no\n"
5238 "       longer needed */\n"
5239
5240 #. type: Plain text
5241 #: build/C/man3/pthread_create.3:352 build/C/man3/pthread_setschedparam.3:423
5242 #, no-wrap
5243 msgid ""
5244 "    s = pthread_attr_destroy(&attr);\n"
5245 "    if (s != 0)\n"
5246 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5247 msgstr ""
5248 "    s = pthread_attr_destroy(&attr);\n"
5249 "    if (s != 0)\n"
5250 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
5251
5252 #. type: Plain text
5253 #: build/C/man3/pthread_create.3:354
5254 #, no-wrap
5255 msgid "    /* Now join with each thread, and display its returned value */\n"
5256 msgstr "    /* Now join with each thread, and display its returned value */\n"
5257
5258 #. type: Plain text
5259 #: build/C/man3/pthread_create.3:359
5260 #, no-wrap
5261 msgid ""
5262 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5263 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5264 "        if (s != 0)\n"
5265 "            handle_error_en(s, \"pthread_join\");\n"
5266 msgstr ""
5267 "    for (tnum = 0; tnum E<lt> num_threads; tnum++) {\n"
5268 "        s = pthread_join(tinfo[tnum].thread_id, &res);\n"
5269 "        if (s != 0)\n"
5270 "            handle_error_en(s, \"pthread_join\");\n"
5271
5272 #. type: Plain text
5273 #: build/C/man3/pthread_create.3:364
5274 #, no-wrap
5275 msgid ""
5276 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5277 "                tinfo[tnum].thread_num, (char *) res);\n"
5278 "        free(res);      /* Free memory allocated by thread */\n"
5279 "    }\n"
5280 msgstr ""
5281 "        printf(\"Joined with thread %d; returned value was %s\\en\",\n"
5282 "                tinfo[tnum].thread_num, (char *) res);\n"
5283 "        free(res);      /* Free memory allocated by thread */\n"
5284 "    }\n"
5285
5286 #. type: Plain text
5287 #: build/C/man3/pthread_create.3:368
5288 #, no-wrap
5289 msgid ""
5290 "    free(tinfo);\n"
5291 "    exit(EXIT_SUCCESS);\n"
5292 "}\n"
5293 msgstr ""
5294 "    free(tinfo);\n"
5295 "    exit(EXIT_SUCCESS);\n"
5296 "}\n"
5297
5298 #. type: Plain text
5299 #: build/C/man3/pthread_create.3:382
5300 msgid ""
5301 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5302 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5303 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5304 "(7)"
5305 msgstr ""
5306 "B<getrlimit>(2), B<pthread_attr_init>(3), B<pthread_cancel>(3), "
5307 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
5308 "B<pthread_getattr_np>(3), B<pthread_join>(3), B<pthread_self>(3), B<pthreads>"
5309 "(7)"
5310
5311 #. type: TH
5312 #: build/C/man3/pthread_detach.3:26
5313 #, no-wrap
5314 msgid "PTHREAD_DETACH"
5315 msgstr "PTHREAD_DETACH"
5316
5317 #. type: TH
5318 #: build/C/man3/pthread_detach.3:26 build/C/man3/pthread_join.3:26
5319 #, no-wrap
5320 msgid "2008-11-27"
5321 msgstr "2008-11-27"
5322
5323 #. type: Plain text
5324 #: build/C/man3/pthread_detach.3:29
5325 msgid "pthread_detach - detach a thread"
5326 msgstr "pthread_detach - スレッドを切り離す (detach する)"
5327
5328 #. type: Plain text
5329 #: build/C/man3/pthread_detach.3:34
5330 #, no-wrap
5331 msgid "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5332 msgstr "B<int pthread_detach(pthread_t >I<thread>B<);>\n"
5333
5334 #. type: Plain text
5335 #: build/C/man3/pthread_detach.3:46
5336 msgid ""
5337 "The B<pthread_detach>()  function marks the thread identified by I<thread> "
5338 "as detached.  When a detached thread terminates, its resources are "
5339 "automatically released back to the system without the need for another "
5340 "thread to join with the terminated thread."
5341 msgstr ""
5342 "B<pthread_detach>() 関数は I<thread> で識別されるスレッドに\n"
5343 "detached (切り離された状態) という印を付ける。\n"
5344 "detached 状態のスレッドが終了すると、\n"
5345 "別のスレッドが終了されたスレッドを join しなくても、\n"
5346 "そのスレッドのリソースは自動的に解放されてシステムに戻される。"
5347
5348 #. type: Plain text
5349 #: build/C/man3/pthread_detach.3:49
5350 msgid ""
5351 "Attempting to detach an already detached thread results in unspecified "
5352 "behavior."
5353 msgstr ""
5354 "すでに detach 状態のスレッドを detach しようとした場合に\n"
5355 "どのような結果となるかは規定されていない。"
5356
5357 #. type: Plain text
5358 #: build/C/man3/pthread_detach.3:54
5359 msgid ""
5360 "On success, B<pthread_detach>()  returns 0; on error, it returns an error "
5361 "number."
5362 msgstr ""
5363 "成功すると、B<pthread_detach>() は 0 を返す。\n"
5364 "エラーの場合、エラー番号を返す。"
5365
5366 #. type: Plain text
5367 #: build/C/man3/pthread_detach.3:59 build/C/man3/pthread_join.3:89
5368 msgid "I<thread> is not a joinable thread."
5369 msgstr "I<thread> が join 可能なスレッドではない。"
5370
5371 #. type: Plain text
5372 #: build/C/man3/pthread_detach.3:70
5373 msgid ""
5374 "Once a thread has been detached, it can't be joined with B<pthread_join>(3)  "
5375 "or be made joinable again."
5376 msgstr ""
5377 "いったんスレッドを detached 状態にすると、\n"
5378 "そのスレッドを B<pthread_join>(3) で join したり、\n"
5379 "もう一度 join 可能にしたりすることはできない。"
5380
5381 #. type: Plain text
5382 #: build/C/man3/pthread_detach.3:77
5383 msgid ""
5384 "A new thread can be created in a detached state using "
5385 "B<pthread_attr_setdetachstate>(3)  to set the detached attribute of the "
5386 "I<attr> argument of B<pthread_create>(3)."
5387 msgstr ""
5388 "B<pthread_attr_setdetachstate>(3) を使って\n"
5389 "B<pthread_create>(3) の I<attr> 引き数の detached 属性を設定することで、\n"
5390 "新しいスレッドを detached 状態で作成することができる。"
5391
5392 #. type: Plain text
5393 #: build/C/man3/pthread_detach.3:84
5394 msgid ""
5395 "The detached attribute merely determines the behavior of the system when the "
5396 "thread terminates; it does not prevent the thread from being terminated if "
5397 "the process terminates using B<exit>(3)  (or equivalently, if the main "
5398 "thread returns)."
5399 msgstr ""
5400 "detached 属性は、スレッドが終了した際のシステムの動作を決めるだけである。\n"
5401 "プロセスが B<exit>(3) を使って終了した場合に、そのスレッドが終了され\n"
5402 "なくなるようなことはない (なお、メインスレッドが return した場合も\n"
5403 "プロセスが B<exit>(3) を使って終了した場合と全く同じである)。 "
5404
5405 #. type: Plain text
5406 #: build/C/man3/pthread_detach.3:93
5407 msgid ""
5408 "Either B<pthread_join>(3)  or B<pthread_detach>()  should be called for each "
5409 "thread that an application creates, so that system resources for the thread "
5410 "can be released.  (But note that the resources of all threads are freed when "
5411 "the process terminates.)"
5412 msgstr ""
5413 "アプリケーションが作成した各スレッドについて、そのスレッドが使用して\n"
5414 "いるシステムリソースを解放できるように、B<pthread_join>(3) か\n"
5415 "B<pthread_detach>() のどちらかを呼び出すべきである (ただし、プロセスが\n"
5416 "終了するときには、全てのスレッドのリソースが解放される)。"
5417
5418 #. type: Plain text
5419 #: build/C/man3/pthread_detach.3:95
5420 msgid "The following statement detaches the calling thread:"
5421 msgstr "以下の文は、呼び出したスレッド自身を detach する。"
5422
5423 #. type: Plain text
5424 #: build/C/man3/pthread_detach.3:97
5425 #, no-wrap
5426 msgid "    pthread_detach(pthread_self());\n"
5427 msgstr "    pthread_detach(pthread_self());\n"
5428
5429 #. type: Plain text
5430 #: build/C/man3/pthread_detach.3:104
5431 msgid ""
5432 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5433 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5434 msgstr ""
5435 "B<pthread_attr_setdetachstate>(3), B<pthread_cancel>(3), B<pthread_create>"
5436 "(3), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
5437
5438 #. type: TH
5439 #: build/C/man3/pthread_equal.3:26
5440 #, no-wrap
5441 msgid "PTHREAD_EQUAL"
5442 msgstr "PTHREAD_EQUAL"
5443
5444 #. type: TH
5445 #: build/C/man3/pthread_equal.3:26 build/C/man3/pthread_exit.3:26
5446 #, no-wrap
5447 msgid "2009-03-30"
5448 msgstr "2009-03-30"
5449
5450 #. type: Plain text
5451 #: build/C/man3/pthread_equal.3:29
5452 msgid "pthread_equal - compare thread IDs"
5453 msgstr "pthread_equal - スレッド ID を比較する"
5454
5455 #. type: Plain text
5456 #: build/C/man3/pthread_equal.3:34
5457 #, no-wrap
5458 msgid "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5459 msgstr "B<int pthread_equal(pthread_t >I<t1>B<, pthread_t >I<t2>B<);>\n"
5460
5461 #. type: Plain text
5462 #: build/C/man3/pthread_equal.3:41
5463 msgid "The B<pthread_equal>()  function compares two thread identifiers."
5464 msgstr "B<pthread_equal>() 関数は 2 つのスレッド識別子の比較を行う。"
5465
5466 #. type: Plain text
5467 #: build/C/man3/pthread_equal.3:45
5468 msgid ""
5469 "If the two thread IDs are equal, B<pthread_equal>()  returns a nonzero "
5470 "value; otherwise, it returns 0."
5471 msgstr ""
5472 "B<pthread_equal>() は、2 つのスレッド ID が等しければ 0 以外の値を返し、\n"
5473 "そうでなければ 0 を返す。"
5474
5475 #.  SH VERSIONS
5476 #.  Available since glibc 2.0
5477 #. type: Plain text
5478 #: build/C/man3/pthread_equal.3:47 build/C/man3/pthread_exit.3:75
5479 #: build/C/man3/pthread_self.3:50 build/C/man3/pthread_testcancel.3:58
5480 msgid "This function always succeeds."
5481 msgstr "この関数は常に成功する。"
5482
5483 #. type: Plain text
5484 #: build/C/man3/pthread_equal.3:56
5485 msgid ""
5486 "The B<pthread_equal>()  function is necessary because thread IDs should be "
5487 "considered opaque: there is no portable way for applications to directly "
5488 "compare two I<pthread_t> values."
5489 msgstr ""
5490 "B<pthread_equal>() 関数が必要なのは、\n"
5491 "スレッド ID はその内部構造を意識すべきではないためである。\n"
5492 "アプリケーションが 2 つの I<pthread_t> の値を直接比較する場合、\n"
5493 "移植性を確保できる形で比較する方法はない。"
5494
5495 #. type: Plain text
5496 #: build/C/man3/pthread_equal.3:60
5497 msgid "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5498 msgstr "B<pthread_create>(3), B<pthread_self>(3), B<pthreads>(7)"
5499
5500 #. type: TH
5501 #: build/C/man3/pthread_exit.3:26
5502 #, no-wrap
5503 msgid "PTHREAD_EXIT"
5504 msgstr "PTHREAD_EXIT"
5505
5506 #. type: Plain text
5507 #: build/C/man3/pthread_exit.3:29
5508 msgid "pthread_exit - terminate calling thread"
5509 msgstr "pthread_exit - 呼び出したスレッドを終了する"
5510
5511 #. type: Plain text
5512 #: build/C/man3/pthread_exit.3:34
5513 #, no-wrap
5514 msgid "B<void pthread_exit(void *>I<retval>B<);>\n"
5515 msgstr "B<void pthread_exit(void *>I<retval>B<);>\n"
5516
5517 #. type: Plain text
5518 #: build/C/man3/pthread_exit.3:45
5519 msgid ""
5520 "The B<pthread_exit>()  function terminates the calling thread and returns a "
5521 "value via I<retval> that (if the thread is joinable)  is available to "
5522 "another thread in the same process that calls B<pthread_join>(3)."
5523 msgstr ""
5524 "B<pthread_exit>() 関数は、呼び出したスレッドを終了し、\n"
5525 "I<retval> 経由で値を返す。\n"
5526 "この値は (そのスレッドが join 可能な場合に) B<pthread_join>(3) を\n"
5527 "呼び出した同じプロセス内の別のスレッドが参照できる値と同じである。"
5528
5529 #. type: Plain text
5530 #: build/C/man3/pthread_exit.3:55
5531 msgid ""
5532 "Any clean-up handlers established by B<pthread_cleanup_push>(3)  that have "
5533 "not yet been popped, are popped (in the reverse of the order in which they "
5534 "were pushed)  and executed.  If the thread has any thread-specific data, "
5535 "then, after the clean-up handlers have been executed, the corresponding "
5536 "destructor functions are called, in an unspecified order."
5537 msgstr ""
5538 "B<pthread_cleanup_push>(3) で設定されたクリーンアップハンドラのうち、\n"
5539 "まだ pop (取り出されていない) ハンドラを (push されたのと逆の順序で)\n"
5540 "取り出して実行する。そのスレッドがスレッド固有のデータを持っている\n"
5541 "場合は、クリーンアップハンドラが実行された後に、スレッド固有のデータ\n"
5542 "に対応するデストラクタ (destructor) 関数が呼び出される (呼び出し順序\n"
5543 "は規定されていない)。"
5544
5545 #. type: Plain text
5546 #: build/C/man3/pthread_exit.3:62
5547 msgid ""
5548 "When a thread terminates, process-shared resources (e.g., mutexes, condition "
5549 "variables, semaphores, and file descriptors) are not released, and functions "
5550 "registered using B<atexit>(3)  are not called."
5551 msgstr ""
5552 "スレッドが終了する際に、プロセスの共有リソース (例えば、mutex、状態変数\n"
5553 "(condition variables)、セマフォ、ファイルディスクリプタ)が解放される。\n"
5554 "B<atexit>(3) を使って登録された関数は呼び出されない。"
5555
5556 #. type: Plain text
5557 #: build/C/man3/pthread_exit.3:71
5558 msgid ""
5559 "After the last thread in a process terminates, the process terminates as by "
5560 "calling B<exit>(3)  with an exit status of zero; thus, process-shared "
5561 "resources are released and functions registered using B<atexit>(3)  are "
5562 "called."
5563 msgstr ""
5564 "プロセスの最後のスレッドが終了すると、そのプロセスは、終了ステータス 0\n"
5565 "で B<exit>(3) を呼び出した場合と全く同じように終了する。したがって、\n"
5566 "プロセスの共有リソースは解放され、B<atexit>(3) を使って登録された関数\n"
5567 "が呼び出される。"
5568
5569 #. type: Plain text
5570 #: build/C/man3/pthread_exit.3:73
5571 msgid "This function does not return to the caller."
5572 msgstr "この関数は呼び出し側には返らない。"
5573
5574 #. type: Plain text
5575 #: build/C/man3/pthread_exit.3:82
5576 msgid ""
5577 "Performing a return from the start function of any thread other than the "
5578 "main thread results in an implicit call to B<pthread_exit>(), using the "
5579 "function's return value as the thread's exit status."
5580 msgstr ""
5581 "メインスレッド以外のスレッドの開始関数 (start function) がreturn を\n"
5582 "行うと、暗黙のうちに B<pthread_exit>() が呼び出され、\n"
5583 "関数の返り値がスレッドの終了ステータスとして使用される。"
5584
5585 #. type: Plain text
5586 #: build/C/man3/pthread_exit.3:88
5587 msgid ""
5588 "To allow other threads to continue execution, the main thread should "
5589 "terminate by calling B<pthread_exit>()  rather than B<exit>(3)."
5590 msgstr ""
5591 "他のスレッドが実行を継続できるように、メインスレッドは B<exit>(3) では\n"
5592 "なく B<pthread_exit>() を呼び出して終了すべきである。"
5593
5594 #. type: Plain text
5595 #: build/C/man3/pthread_exit.3:93
5596 msgid ""
5597 "The value pointed to by I<retval> should not be located on the calling "
5598 "thread's stack, since the contents of that stack are undefined after the "
5599 "thread terminates."
5600 msgstr ""
5601 "I<retval> が指す値は、呼び出したスレッドのスタックに置くべきではない。\n"
5602 "呼び出したスレッドが終了した後は、そのスタックの内容が不定となるから\n"
5603 "である。"
5604
5605 #.  Linux 2.6.27
5606 #.  FIXME . review a later kernel to see if this gets fixed
5607 #.  http://thread.gmane.org/gmane.linux.kernel/611611
5608 #.  http://marc.info/?l=linux-kernel&m=122525468300823&w=2
5609 #. type: Plain text
5610 #: build/C/man3/pthread_exit.3:105
5611 msgid ""
5612 "Currently, there are limitations in the kernel implementation logic for "
5613 "B<wait>(2)ing on a stopped thread group with a dead thread group leader.  "
5614 "This can manifest in problems such as a locked terminal if a stop signal is "
5615 "sent to a foreground process whose thread group leader has already called "
5616 "B<pthread_exit>()."
5617 msgstr ""
5618 "現在のところ、停止 (stop) されたスレッドグループを、すでに終了した\n"
5619 "(dead) スレッドグループリーダーで B<wait>(2) する場合の、\n"
5620 "カーネル実装の論理には制限がある。\n"
5621 "この制限は、すでにスレッドグループリーダーが B<pthread_exit>() を\n"
5622 "呼び出しているようなフォアグラウンドプロセスにストップシグナルが送信\n"
5623 "された場合に、端末がロックされてしまう、といった問題として表に見える\n"
5624 "場合がある。"
5625
5626 #. type: Plain text
5627 #: build/C/man3/pthread_exit.3:109
5628 msgid "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5629 msgstr "B<pthread_create>(3), B<pthread_join>(3), B<pthreads>(7)"
5630
5631 #. type: TH
5632 #: build/C/man3/pthread_getattr_np.3:26
5633 #, no-wrap
5634 msgid "PTHREAD_GETATTR_NP"
5635 msgstr "PTHREAD_GETATTR_NP"
5636
5637 #. type: Plain text
5638 #: build/C/man3/pthread_getattr_np.3:29
5639 msgid "pthread_getattr_np - get attributes of created thread"
5640 msgstr "pthread_getattr_np - 作成されたスレッドの属性を取得する"
5641
5642 #. type: Plain text
5643 #: build/C/man3/pthread_getattr_np.3:35
5644 #, no-wrap
5645 msgid "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5646 msgstr "B<int pthread_getattr_np(pthread_t >I<thread>B<, pthread_attr_t *>I<attr>B<);>\n"
5647
5648 #. type: Plain text
5649 #: build/C/man3/pthread_getattr_np.3:45
5650 msgid ""
5651 "The B<pthread_getattr_np>()  function initializes the thread attributes "
5652 "object referred to by I<attr> so that it contains actual attribute values "
5653 "describing the running thread I<thread>."
5654 msgstr ""
5655 "B<pthread_getattr_np>() 関数は、\n"
5656 "I<attr> が参照するスレッド属性オブジェクトを初期化し、\n"
5657 "そのオブジェクトに実行中のスレッド I<thread> の実際の属性値を\n"
5658 "格納して返す。"
5659
5660 #. type: Plain text
5661 #: build/C/man3/pthread_getattr_np.3:52
5662 msgid ""
5663 "The returned attribute values may differ from the corresponding attribute "
5664 "values passed in the I<attr> object that was used to create the thread using "
5665 "B<pthread_create>(3).  In particular, the following attributes may differ:"
5666 msgstr ""
5667 "返される属性値は、B<pthread_create>(3) でスレッドを作成する際に\n"
5668 "使われたI<attr> オブジェクトで渡された属性値と異なる場合がある。\n"
5669 "特に、以下の属性は異なる場合がある。"
5670
5671 #. type: Plain text
5672 #: build/C/man3/pthread_getattr_np.3:55
5673 msgid ""
5674 "the detach state, since a joinable thread may have detached itself after "
5675 "creation;"
5676 msgstr ""
5677 "detach state. join 可能なスレッドは作成後に自分自身を\n"
5678 "切り離す (detach する) ことができるからである。"
5679
5680 #. type: Plain text
5681 #: build/C/man3/pthread_getattr_np.3:58
5682 msgid ""
5683 "the stack size, which the implementation may align to a suitable boundary."
5684 msgstr ""
5685 "スタックサイズ。\n"
5686 "スレッドの実装によって適切な境界に揃えられる可能があるためである。"
5687
5688 #. type: Plain text
5689 #: build/C/man3/pthread_getattr_np.3:63
5690 msgid ""
5691 "and the guard size, which the implementation may round upward to a multiple "
5692 "of the page size, or ignore (i.e., treat as 0), if the application is "
5693 "allocating its own stack."
5694 msgstr ""
5695 "guard size.\n"
5696 "スレッドの実装によりページサイズの倍数に切り上げられたり、\n"
5697 "アプリケーションが自分でスタックを割り当てる場合には無視される\n"
5698 "(0 として扱われる) ことがあるからである。"
5699
5700 #. type: Plain text
5701 #: build/C/man3/pthread_getattr_np.3:68
5702 msgid ""
5703 "Furthermore, if the stack address attribute was not set in the thread "
5704 "attributes object used to create the thread, then the returned thread "
5705 "attributes object will report the actual stack address that the "
5706 "implementation selected for the thread."
5707 msgstr ""
5708 "さらに、スレッドを作成する際に使用されたスレッド属性オブジェクトで\n"
5709 "スタックアドレスが設定されていなかった場合、\n"
5710 "返されたスレッド属性オブジェクトではスレッドの実装がそのスレッドに\n"
5711 "割り当てた実際のスタックアドレスが報告される。"
5712
5713 #. type: Plain text
5714 #: build/C/man3/pthread_getattr_np.3:73
5715 msgid ""
5716 "When the thread attributes object returned by B<pthread_getattr_np>()  is no "
5717 "longer required, it should be destroyed using B<pthread_attr_destroy>(3)."
5718 msgstr ""
5719 "B<pthread_getattr_np>() が返したスレッド属性オブジェクトが\n"
5720 "必要なくなった際には、  B<pthread_attr_destroy>(3) を使って\n"
5721 "そのオブジェクトを破棄すべきである。"
5722
5723 #. type: Plain text
5724 #: build/C/man3/pthread_getattr_np.3:76
5725 #: build/C/man3/pthread_getcpuclockid.3:49
5726 msgid ""
5727 "On success, this function returns 0; on error, it returns a nonzero error "
5728 "number."
5729 msgstr ""
5730 "成功すると、この関数は 0 を返す。\n"
5731 "エラーの場合、 0 以外のエラー番号を返す。"
5732
5733 #.  Can happen (but unlikely) while trying to allocate memory for cpuset
5734 #. type: Plain text
5735 #: build/C/man3/pthread_getattr_np.3:81
5736 msgid "Insufficient memory."
5737 msgstr "メモリが十分になかった。"
5738
5739 #. type: Plain text
5740 #: build/C/man3/pthread_getattr_np.3:96
5741 msgid ""
5742 "In addition, if I<thread> refers to the main thread, then "
5743 "B<pthread_getattr_np>()  can fail because of errors from various underlying "
5744 "calls: B<fopen>(3), if I</proc/self/maps> can't be opened; and B<getrlimit>"
5745 "(2), if the B<RLIMIT_STACK> resource limit is not supported."
5746 msgstr ""
5747 "さらに、 I<thread> がメインスレッドを参照している場合には、\n"
5748 "B<pthread_getattr_np>() は内部で行われる様々な呼び出しでの\n"
5749 "エラーで失敗する可能性がある。\n"
5750 "I</proc/self/maps> がオープンできない場合には B<fopen>(3)\n"
5751 "でエラーが発生し、リソース上限 B<RLIMIT_STACK> が\n"
5752 "サポートされていない場合には B<getrlimit>(2) でエラーが発生する。"
5753
5754 #. type: Plain text
5755 #: build/C/man3/pthread_getattr_np.3:98
5756 msgid "This function is available in glibc since version 2.2.3."
5757 msgstr "この関数は glibc バージョン 2.2.3 以降で利用できる。"
5758
5759 #. type: Plain text
5760 #: build/C/man3/pthread_getattr_np.3:101
5761 #: build/C/man3/pthread_kill_other_threads_np.3:50
5762 msgid ""
5763 "This function is a nonstandard GNU extension; hence the suffix \"_np"
5764 "\" (nonportable) in the name."
5765 msgstr ""
5766 "この関数は非標準の GNU による拡張である。\n"
5767 "そのため、名前に \"_np\" (nonportable; 移植性がない) という接尾辞が\n"
5768 "付いている。"
5769
5770 #. type: Plain text
5771 #: build/C/man3/pthread_getattr_np.3:111
5772 msgid ""
5773 "The program below demonstrates the use of B<pthread_getattr_np>().  The "
5774 "program creates a thread that then uses B<pthread_getattr_np>()  to retrieve "
5775 "and display its guard size, stack address, and stack size attributes.  "
5776 "Command-line arguments can be used to set these attributes to values other "
5777 "than the default when creating the thread.  The shell sessions below "
5778 "demonstrate the use of the program."
5779 msgstr ""
5780 "以下のプログラムは B<pthread_getattr_np>() の使用例を示したものである。\n"
5781 "このプログラムは、スレッドを作成し、それから\n"
5782 "B<pthread_getattr_np>() を使ってそのスレッドの属性 guard size、\n"
5783 "スタックアドレス、スタックサイズを取得し表示する。\n"
5784 "コマンドライン引き数での指定で、スレッドを作成する際に\n"
5785 "上記の属性にデフォルト値以外の値を設定することができる。\n"
5786 "下記のシェルのセッションはこのプログラムの使用例である。"
5787
5788 #. type: Plain text
5789 #: build/C/man3/pthread_getattr_np.3:114
5790 msgid ""
5791 "In the first run, on an x86-32 system, a thread is created using default "
5792 "attributes:"
5793 msgstr ""
5794 "最初の実行例は、デフォルトの属性でスレッドが作成されている\n"
5795 "(x86-32 システム上で実行)。"
5796
5797 #. type: Plain text
5798 #: build/C/man3/pthread_getattr_np.3:124
5799 #, no-wrap
5800 msgid ""
5801 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5802 "unlimited\n"
5803 "$B< ./a.out>\n"
5804 "Attributes of created thread:\n"
5805 "        Guard size          = 4096 bytes\n"
5806 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5807 "        Stack size          = 0x201000 (2101248) bytes\n"
5808 msgstr ""
5809 "$B< ulimit -s>      # No stack limit ==E<gt> default stack size is 2MB\n"
5810 "unlimited\n"
5811 "$B< ./a.out>\n"
5812 "Attributes of created thread:\n"
5813 "        Guard size          = 4096 bytes\n"
5814 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5815 "        Stack size          = 0x201000 (2101248) bytes\n"
5816
5817 #. type: Plain text
5818 #: build/C/man3/pthread_getattr_np.3:130
5819 msgid ""
5820 "In the following run, we see that if a guard size is specified, it is "
5821 "rounded up to the next multiple of the system page size (4096 bytes on "
5822 "x86-32):"
5823 msgstr ""
5824 "次の実行例では、guard size が指定された場合、\n"
5825 "guard size はシステムのページサイズの倍数に切り上げられることが分かる\n"
5826 "(x86-32 ではシステムのページサイズは 4096 バイトである)。"
5827
5828 #. type: Plain text
5829 #: build/C/man3/pthread_getattr_np.3:138
5830 #, no-wrap
5831 msgid ""
5832 "$B< ./a.out -g 4097>\n"
5833 "Thread attributes object after initializations:\n"
5834 "        Guard size          = 4097 bytes\n"
5835 "        Stack address       = (nil)\n"
5836 "        Stack size          = 0x0 (0) bytes\n"
5837 msgstr ""
5838 "$B< ./a.out -g 4097>\n"
5839 "Thread attributes object after initializations:\n"
5840 "        Guard size          = 4097 bytes\n"
5841 "        Stack address       = (nil)\n"
5842 "        Stack size          = 0x0 (0) bytes\n"
5843
5844 #. type: Plain text
5845 #: build/C/man3/pthread_getattr_np.3:143
5846 #, no-wrap
5847 msgid ""
5848 "Attributes of created thread:\n"
5849 "        Guard size          = 8192 bytes\n"
5850 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5851 "        Stack size          = 0x201000 (2101248) bytes\n"
5852 msgstr ""
5853 "Attributes of created thread:\n"
5854 "        Guard size          = 8192 bytes\n"
5855 "        Stack address       = 0x40196000 (EOS = 0x40397000)\n"
5856 "        Stack size          = 0x201000 (2101248) bytes\n"
5857
5858 #. .in +4n
5859 #. .nf
5860 #. $ ./a.out \-s 0x8000
5861 #. Thread attributes object after initializations:
5862 #.         Guard size          = 4096 bytes
5863 #.         Stack address       = 0xffff8000 (EOS = (nil))
5864 #.         Stack size          = 0x8000 (32768) bytes
5865 #. Attributes of created thread:
5866 #.         Guard size          = 4096 bytes
5867 #.         Stack address       = 0x4001e000 (EOS = 0x40026000)
5868 #.         Stack size          = 0x8000 (32768) bytes
5869 #. .fi
5870 #. .in
5871 #. type: Plain text
5872 #: build/C/man3/pthread_getattr_np.3:162
5873 msgid ""
5874 "In the last run, the program manually allocates a stack for the thread.  In "
5875 "this case, the guard size attribute is ignored."
5876 msgstr ""
5877 "最後の実行例では、プログラムでスレッド用のスタックを手動で割り当てている。\n"
5878 "この場合には、guard size 属性は無視される。"
5879
5880 #. type: Plain text
5881 #: build/C/man3/pthread_getattr_np.3:167
5882 #, no-wrap
5883 msgid ""
5884 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5885 "Allocated thread stack at 0x804d000\n"
5886 msgstr ""
5887 "$B< ./a.out -g 4096 -s 0x8000 -a>\n"
5888 "Allocated thread stack at 0x804d000\n"
5889
5890 #. type: Plain text
5891 #: build/C/man3/pthread_getattr_np.3:172
5892 #, no-wrap
5893 msgid ""
5894 "Thread attributes object after initializations:\n"
5895 "        Guard size          = 4096 bytes\n"
5896 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5897 "        Stack size          = 0x8000 (32768) bytes\n"
5898 msgstr ""
5899 "Thread attributes object after initializations:\n"
5900 "        Guard size          = 4096 bytes\n"
5901 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5902 "        Stack size          = 0x8000 (32768) bytes\n"
5903
5904 #. type: Plain text
5905 #: build/C/man3/pthread_getattr_np.3:177
5906 #, no-wrap
5907 msgid ""
5908 "Attributes of created thread:\n"
5909 "        Guard size          = 0 bytes\n"
5910 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5911 "        Stack size          = 0x8000 (32768) bytes\n"
5912 msgstr ""
5913 "Attributes of created thread:\n"
5914 "        Guard size          = 0 bytes\n"
5915 "        Stack address       = 0x804d000 (EOS = 0x8055000)\n"
5916 "        Stack size          = 0x8000 (32768) bytes\n"
5917
5918 #. type: Plain text
5919 #: build/C/man3/pthread_getattr_np.3:198
5920 #, no-wrap
5921 msgid ""
5922 "static void\n"
5923 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5924 "{\n"
5925 "    int s;\n"
5926 "    size_t stack_size, guard_size;\n"
5927 "    void *stack_addr;\n"
5928 msgstr ""
5929 "static void\n"
5930 "display_stack_related_attributes(pthread_attr_t *attr, char *prefix)\n"
5931 "{\n"
5932 "    int s;\n"
5933 "    size_t stack_size, guard_size;\n"
5934 "    void *stack_addr;\n"
5935
5936 #. type: Plain text
5937 #: build/C/man3/pthread_getattr_np.3:203
5938 #, no-wrap
5939 msgid ""
5940 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5941 "    if (s != 0)\n"
5942 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5943 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5944 msgstr ""
5945 "    s = pthread_attr_getguardsize(attr, &guard_size);\n"
5946 "    if (s != 0)\n"
5947 "        handle_error_en(s, \"pthread_attr_getguardsize\");\n"
5948 "    printf(\"%sGuard size          = %d bytes\\en\", prefix, guard_size);\n"
5949
5950 #. type: Plain text
5951 #: build/C/man3/pthread_getattr_np.3:214
5952 #, no-wrap
5953 msgid ""
5954 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5955 "    if (s != 0)\n"
5956 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5957 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5958 "    if (stack_size E<gt> 0)\n"
5959 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5960 "    printf(\"\\en\");\n"
5961 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5962 "            prefix, stack_size, stack_size);\n"
5963 "}\n"
5964 msgstr ""
5965 "    s = pthread_attr_getstack(attr, &stack_addr, &stack_size);\n"
5966 "    if (s != 0)\n"
5967 "        handle_error_en(s, \"pthread_attr_getstack\");\n"
5968 "    printf(\"%sStack address       = %p\", prefix, stack_addr);\n"
5969 "    if (stack_size E<gt> 0)\n"
5970 "        printf(\" (EOS = %p)\", (char *) stack_addr + stack_size);\n"
5971 "    printf(\"\\en\");\n"
5972 "    printf(\"%sStack size          = 0x%x (%d) bytes\\en\",\n"
5973 "            prefix, stack_size, stack_size);\n"
5974 "}\n"
5975
5976 #. type: Plain text
5977 #: build/C/man3/pthread_getattr_np.3:220
5978 #, no-wrap
5979 msgid ""
5980 "static void\n"
5981 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5982 "{\n"
5983 "    int s;\n"
5984 "    pthread_attr_t attr;\n"
5985 msgstr ""
5986 "static void\n"
5987 "display_thread_attributes(pthread_t thread, char *prefix)\n"
5988 "{\n"
5989 "    int s;\n"
5990 "    pthread_attr_t attr;\n"
5991
5992 #. type: Plain text
5993 #: build/C/man3/pthread_getattr_np.3:224
5994 #, no-wrap
5995 msgid ""
5996 "    s = pthread_getattr_np(thread, &attr);\n"
5997 "    if (s != 0)\n"
5998 "        handle_error_en(s, \"pthread_getattr_np\");\n"
5999 msgstr ""
6000 "    s = pthread_getattr_np(thread, &attr);\n"
6001 "    if (s != 0)\n"
6002 "        handle_error_en(s, \"pthread_getattr_np\");\n"
6003
6004 #. type: Plain text
6005 #: build/C/man3/pthread_getattr_np.3:226
6006 #, no-wrap
6007 msgid "    display_stack_related_attributes(&attr, prefix);\n"
6008 msgstr "    display_stack_related_attributes(&attr, prefix);\n"
6009
6010 #. type: Plain text
6011 #: build/C/man3/pthread_getattr_np.3:231
6012 #, no-wrap
6013 msgid ""
6014 "    s = pthread_attr_destroy(&attr);\n"
6015 "    if (s != 0)\n"
6016 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6017 "}\n"
6018 msgstr ""
6019 "    s = pthread_attr_destroy(&attr);\n"
6020 "    if (s != 0)\n"
6021 "        handle_error_en(s, \"pthread_attr_destroy\");\n"
6022 "}\n"
6023
6024 #. type: Plain text
6025 #: build/C/man3/pthread_getattr_np.3:237
6026 #, no-wrap
6027 msgid ""
6028 "static void *           /* Start function for thread we create */\n"
6029 "thread_start(void *arg)\n"
6030 "{\n"
6031 "    printf(\"Attributes of created thread:\\en\");\n"
6032 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6033 msgstr ""
6034 "static void *           /* Start function for thread we create */\n"
6035 "thread_start(void *arg)\n"
6036 "{\n"
6037 "    printf(\"Attributes of created thread:\\en\");\n"
6038 "    display_thread_attributes(pthread_self(), \"\\et\");\n"
6039
6040 #. type: Plain text
6041 #: build/C/man3/pthread_getattr_np.3:251
6042 #, no-wrap
6043 msgid ""
6044 "static void\n"
6045 "usage(char *pname, char *msg)\n"
6046 "{\n"
6047 "    if (msg != NULL)\n"
6048 "        fputs(msg, stderr);\n"
6049 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6050 "            \" [-g guard-size]\\en\", pname);\n"
6051 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6052 "    exit(EXIT_FAILURE);\n"
6053 "}\n"
6054 msgstr ""
6055 "static void\n"
6056 "usage(char *pname, char *msg)\n"
6057 "{\n"
6058 "    if (msg != NULL)\n"
6059 "        fputs(msg, stderr);\n"
6060 "    fprintf(stderr, \"Usage: %s [-s stack-size [-a]]\"\n"
6061 "            \" [-g guard-size]\\en\", pname);\n"
6062 "    fprintf(stderr, \"\\et\\et-a means program should allocate stack\\en\");\n"
6063 "    exit(EXIT_FAILURE);\n"
6064 "}\n"
6065
6066 #. type: Plain text
6067 #: build/C/man3/pthread_getattr_np.3:264
6068 #, no-wrap
6069 msgid ""
6070 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6071 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6072 "                              pthread_attr_t *attrp)\n"
6073 "{\n"
6074 "    int s, opt, allocate_stack;\n"
6075 "    long stack_size, guard_size;\n"
6076 "            void *stack_addr;\n"
6077 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6078 "                                           a thread attributes object */\n"
6079 "    allocate_stack = 0;\n"
6080 "    stack_size = -1;\n"
6081 "    guard_size = -1;\n"
6082 msgstr ""
6083 "static pthread_attr_t *   /* Get thread attributes from command line */\n"
6084 "get_thread_attributes_from_cl(int argc, char *argv[],\n"
6085 "                              pthread_attr_t *attrp)\n"
6086 "{\n"
6087 "    int s, opt, allocate_stack;\n"
6088 "    long stack_size, guard_size;\n"
6089 "            void *stack_addr;\n"
6090 "    pthread_attr_t *ret_attrp = NULL;   /* Set to attrp if we initialize\n"
6091 "                                           a thread attributes object */\n"
6092 "    allocate_stack = 0;\n"
6093 "    stack_size = -1;\n"
6094 "    guard_size = -1;\n"
6095
6096 #. type: Plain text
6097 #: build/C/man3/pthread_getattr_np.3:273
6098 #, no-wrap
6099 msgid ""
6100 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6101 "        switch (opt) {\n"
6102 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6103 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6104 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6105 "        default:    usage(argv[0], NULL);\n"
6106 "        }\n"
6107 "    }\n"
6108 msgstr ""
6109 "    while ((opt = getopt(argc, argv, \"ag:s:\")) != -1) {\n"
6110 "        switch (opt) {\n"
6111 "        case \\(aqa\\(aq:   allocate_stack = 1;                     break;\n"
6112 "        case \\(aqg\\(aq:   guard_size = strtoul(optarg, NULL, 0);  break;\n"
6113 "        case \\(aqs\\(aq:   stack_size = strtoul(optarg, NULL, 0);  break;\n"
6114 "        default:    usage(argv[0], NULL);\n"
6115 "        }\n"
6116 "    }\n"
6117
6118 #. type: Plain text
6119 #: build/C/man3/pthread_getattr_np.3:276
6120 #, no-wrap
6121 msgid ""
6122 "    if (allocate_stack && stack_size == -1)\n"
6123 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6124 msgstr ""
6125 "    if (allocate_stack && stack_size == -1)\n"
6126 "        usage(argv[0], \"Specifying -a without -s makes no sense\\en\");\n"
6127
6128 #. type: Plain text
6129 #: build/C/man3/pthread_getattr_np.3:279
6130 #, no-wrap
6131 msgid ""
6132 "    if (argc E<gt> optind)\n"
6133 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6134 msgstr ""
6135 "    if (argc E<gt> optind)\n"
6136 "        usage(argv[0], \"Extraneous command-line arguments\\en\");\n"
6137
6138 #. type: Plain text
6139 #: build/C/man3/pthread_getattr_np.3:282
6140 #, no-wrap
6141 msgid ""
6142 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6143 "        ret_attrp = attrp;\n"
6144 msgstr ""
6145 "    if (stack_size E<gt>= 0 || guard_size E<gt> 0) {\n"
6146 "        ret_attrp = attrp;\n"
6147
6148 #. type: Plain text
6149 #: build/C/man3/pthread_getattr_np.3:287
6150 #, no-wrap
6151 msgid ""
6152 "        s = pthread_attr_init(attrp);\n"
6153 "        if (s != 0)\n"
6154 "            handle_error_en(s, \"pthread_attr_init\");\n"
6155 "    }\n"
6156 msgstr ""
6157 "        s = pthread_attr_init(attrp);\n"
6158 "        if (s != 0)\n"
6159 "            handle_error_en(s, \"pthread_attr_init\");\n"
6160 "    }\n"
6161
6162 #. type: Plain text
6163 #: build/C/man3/pthread_getattr_np.3:299
6164 #, no-wrap
6165 msgid ""
6166 "    if (stack_size E<gt>= 0) {\n"
6167 "        if (!allocate_stack) {\n"
6168 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6169 "            if (s != 0)\n"
6170 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6171 "        } else {\n"
6172 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6173 "                               stack_size);\n"
6174 "            if (s != 0)\n"
6175 "                handle_error_en(s, \"posix_memalign\");\n"
6176 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6177 msgstr ""
6178 "    if (stack_size E<gt>= 0) {\n"
6179 "        if (!allocate_stack) {\n"
6180 "            s = pthread_attr_setstacksize(attrp, stack_size);\n"
6181 "            if (s != 0)\n"
6182 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6183 "        } else {\n"
6184 "            s = posix_memalign(&stack_addr, sysconf(_SC_PAGESIZE),\n"
6185 "                               stack_size);\n"
6186 "            if (s != 0)\n"
6187 "                handle_error_en(s, \"posix_memalign\");\n"
6188 "            printf(\"Allocated thread stack at %p\\en\\en\", stack_addr);\n"
6189
6190 #. type: Plain text
6191 #: build/C/man3/pthread_getattr_np.3:305
6192 #, no-wrap
6193 msgid ""
6194 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6195 "            if (s != 0)\n"
6196 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6197 "        }\n"
6198 "    }\n"
6199 msgstr ""
6200 "            s = pthread_attr_setstack(attrp, stack_addr, stack_size);\n"
6201 "            if (s != 0)\n"
6202 "                handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6203 "        }\n"
6204 "    }\n"
6205
6206 #. type: Plain text
6207 #: build/C/man3/pthread_getattr_np.3:311
6208 #, no-wrap
6209 msgid ""
6210 "    if (guard_size E<gt>= 0) {\n"
6211 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6212 "        if (s != 0)\n"
6213 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6214 "    }\n"
6215 msgstr ""
6216 "    if (guard_size E<gt>= 0) {\n"
6217 "        s = pthread_attr_setguardsize(attrp, guard_size);\n"
6218 "        if (s != 0)\n"
6219 "            handle_error_en(s, \"pthread_attr_setstacksize\");\n"
6220 "    }\n"
6221
6222 #. type: Plain text
6223 #: build/C/man3/pthread_getattr_np.3:314
6224 #, no-wrap
6225 msgid ""
6226 "    return ret_attrp;\n"
6227 "}\n"
6228 msgstr ""
6229 "    return ret_attrp;\n"
6230 "}\n"
6231
6232 #. type: Plain text
6233 #: build/C/man3/pthread_getattr_np.3:323
6234 #, no-wrap
6235 msgid ""
6236 "int\n"
6237 "main(int argc, char *argv[])\n"
6238 "{\n"
6239 "    int s;\n"
6240 "    pthread_t thr;\n"
6241 "    pthread_attr_t attr;\n"
6242 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6243 "                                        a thread attributes object */\n"
6244 msgstr ""
6245 "int\n"
6246 "main(int argc, char *argv[])\n"
6247 "{\n"
6248 "    int s;\n"
6249 "    pthread_t thr;\n"
6250 "    pthread_attr_t attr;\n"
6251 "    pthread_attr_t *attrp = NULL;    /* Set to &attr if we initialize\n"
6252 "                                        a thread attributes object */\n"
6253
6254 #. type: Plain text
6255 #: build/C/man3/pthread_getattr_np.3:325
6256 #, no-wrap
6257 msgid "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6258 msgstr "    attrp = get_thread_attributes_from_cl(argc, argv, &attr);\n"
6259
6260 #. type: Plain text
6261 #: build/C/man3/pthread_getattr_np.3:331
6262 #, no-wrap
6263 msgid ""
6264 "    if (attrp != NULL) {\n"
6265 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6266 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6267 "        printf(\"\\en\");\n"
6268 "    }\n"
6269 msgstr ""
6270 "    if (attrp != NULL) {\n"
6271 "        printf(\"Thread attributes object after initializations:\\en\");\n"
6272 "        display_stack_related_attributes(attrp, \"\\et\");\n"
6273 "        printf(\"\\en\");\n"
6274 "    }\n"
6275
6276 #. type: Plain text
6277 #: build/C/man3/pthread_getattr_np.3:361
6278 msgid ""
6279 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6280 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6281 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6282 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6283 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6284 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6285 msgstr ""
6286 "B<pthread_attr_getaffinity_np>(3), B<pthread_attr_getdetachstate>(3), "
6287 "B<pthread_attr_getguardsize>(3), B<pthread_attr_getinheritsched>(3), "
6288 "B<pthread_attr_getschedparam>(3), B<pthread_attr_getschedpolicy>(3), "
6289 "B<pthread_attr_getscope>(3), B<pthread_attr_getstack>(3), "
6290 "B<pthread_attr_getstackaddr>(3), B<pthread_attr_getstacksize>(3), "
6291 "B<pthread_attr_init>(3), B<pthread_create>(3), B<pthreads>(7)"
6292
6293 #. type: TH
6294 #: build/C/man3/pthread_getcpuclockid.3:26
6295 #, no-wrap
6296 msgid "PTHREAD_GETCPUCLOCKID"
6297 msgstr "PTHREAD_GETCPUCLOCKID"
6298
6299 #. type: TH
6300 #: build/C/man3/pthread_getcpuclockid.3:26
6301 #, no-wrap
6302 msgid "2009-02-08"
6303 msgstr "2009-02-08"
6304
6305 #. type: Plain text
6306 #: build/C/man3/pthread_getcpuclockid.3:29
6307 msgid "pthread_getcpuclockid - retrieve ID of a thread's CPU time clock"
6308 msgstr "pthread_getcpuclockid - スレッドの CPU 時間時計の ID を取得する"
6309
6310 #. type: Plain text
6311 #: build/C/man3/pthread_getcpuclockid.3:33
6312 #, no-wrap
6313 msgid ""
6314 "B<#include E<lt>pthread.hE<gt>>\n"
6315 "B<#include E<lt>time.hE<gt>>\n"
6316 msgstr ""
6317 "B<#include E<lt>pthread.hE<gt>>\n"
6318 "B<#include E<lt>time.hE<gt>>\n"
6319
6320 #. type: Plain text
6321 #: build/C/man3/pthread_getcpuclockid.3:35
6322 #, no-wrap
6323 msgid "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6324 msgstr "B<int pthread_getcpuclockid(pthread_t >I<thread>B<, clockid_t *>I<clock_id);>\n"
6325
6326 #.  The clockid is constructed as follows:
6327 #.  *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE)
6328 #.  where CLOCK_IDFIELD_SIZE is 3.
6329 #. type: Plain text
6330 #: build/C/man3/pthread_getcpuclockid.3:46
6331 msgid ""
6332 "The B<pthread_getcpuclockid>()  function returns the clock ID for the CPU "
6333 "time clock of the thread I<thread>."
6334 msgstr ""
6335 "B<pthread_getcpuclockid>() 関数は、\n"
6336 "スレッド I<thread> の CPU 時間時計のクロック ID を返す。"
6337
6338 #. type: TP
6339 #: build/C/man3/pthread_getcpuclockid.3:50
6340 #, no-wrap
6341 msgid "B<ENOENT>"
6342 msgstr "B<ENOENT>"
6343
6344 #.  CLOCK_THREAD_CPUTIME_ID not defined
6345 #.  Looking at nptl/pthread_getcpuclockid.c an ERANGE error would
6346 #.  be possible if kernel thread IDs took more than 29 bits (which
6347 #.  they currently cannot).
6348 #. type: Plain text
6349 #: build/C/man3/pthread_getcpuclockid.3:58
6350 msgid "Per-thread CPU time clocks are not supported by the system."
6351 msgstr "スレッド単位の CPU 時間時計はこのシステムではサポートされていない。"
6352
6353 #. type: Plain text
6354 #: build/C/man3/pthread_getcpuclockid.3:65
6355 msgid "This function is available in glibc since version 2.2."
6356 msgstr "この関数は glibc バージョン 2.2 以降で利用できる。"
6357
6358 #. type: Plain text
6359 #: build/C/man3/pthread_getcpuclockid.3:78
6360 msgid ""
6361 "When I<thread> refers to the calling thread, this function returns an "
6362 "identifier that refers to the same clock manipulated by B<clock_gettime>(2)  "
6363 "and B<clock_settime>(2)  when given the clock ID B<CLOCK_THREAD_CPUTIME_ID>."
6364 msgstr ""
6365 "I<thread> が呼び出したスレッドを参照している場合、\n"
6366 "クロック ID B<CLOCK_THREAD_CPUTIME_ID> が指定されていれば、\n"
6367 "B<clock_gettime>(2) と B<clock_settime>(2) が操作するのと同じ時計\n"
6368 "を参照する ID が返される。"
6369
6370 #. type: Plain text
6371 #: build/C/man3/pthread_getcpuclockid.3:84
6372 msgid ""
6373 "The program below creates a thread and then uses B<clock_gettime>(2)  to "
6374 "retrieve the total process CPU time, and the per-thread CPU time consumed by "
6375 "the two threads.  The following shell session shows an example run:"
6376 msgstr ""
6377 "以下のプログラムは、スレッドを作成し、それから\n"
6378 "B<clock_gettime>(2) を使ってプロセス全体の CPU 時間を取得し、\n"
6379 "B<pthread_getcpuclockid>(3) を使って 2 つのスレッドが消費した\n"
6380 "スレッド毎の CPU 時間を取得する。\n"
6381 "下記のシェルのセッションは実行例である。"
6382
6383 #. type: Plain text
6384 #: build/C/man3/pthread_getcpuclockid.3:93
6385 #, no-wrap
6386 msgid ""
6387 "$ B<./a.out>\n"
6388 "Main thread sleeping\n"
6389 "Subthread starting infinite loop\n"
6390 "Main thread consuming some CPU time...\n"
6391 "Process total CPU time:    1.368\n"
6392 "Main thread CPU time:      0.376\n"
6393 "Subthread CPU time:        0.992\n"
6394 msgstr ""
6395 "$ B<./a.out>\n"
6396 "Main thread sleeping\n"
6397 "Subthread starting infinite loop\n"
6398 "Main thread consuming some CPU time...\n"
6399 "Process total CPU time:    1.368\n"
6400 "Main thread CPU time:      0.376\n"
6401 "Subthread CPU time:        0.992\n"
6402
6403 #. type: Plain text
6404 #: build/C/man3/pthread_getcpuclockid.3:99
6405 #, no-wrap
6406 msgid "/* Link with \"-lrt\" */\n"
6407 msgstr "/* \"-lrt\" でリンクする */\n"
6408
6409 #. type: Plain text
6410 #: build/C/man3/pthread_getcpuclockid.3:107
6411 #, no-wrap
6412 msgid ""
6413 "#include E<lt>time.hE<gt>\n"
6414 "#include E<lt>stdio.hE<gt>\n"
6415 "#include E<lt>stdlib.hE<gt>\n"
6416 "#include E<lt>unistd.hE<gt>\n"
6417 "#include E<lt>pthread.hE<gt>\n"
6418 "#include E<lt>string.hE<gt>\n"
6419 "#include E<lt>errno.hE<gt>\n"
6420 msgstr ""
6421 "#include E<lt>time.hE<gt>\n"
6422 "#include E<lt>stdio.hE<gt>\n"
6423 "#include E<lt>stdlib.hE<gt>\n"
6424 "#include E<lt>unistd.hE<gt>\n"
6425 "#include E<lt>pthread.hE<gt>\n"
6426 "#include E<lt>string.hE<gt>\n"
6427 "#include E<lt>errno.hE<gt>\n"
6428
6429 #. type: Plain text
6430 #: build/C/man3/pthread_getcpuclockid.3:121
6431 #, no-wrap
6432 msgid ""
6433 "static void *\n"
6434 "thread_start(void *arg)\n"
6435 "{\n"
6436 "    printf(\"Subthread starting infinite loop\\en\");\n"
6437 "    for (;;)\n"
6438 "        continue;\n"
6439 "}\n"
6440 msgstr ""
6441 "static void *\n"
6442 "thread_start(void *arg)\n"
6443 "{\n"
6444 "    printf(\"Subthread starting infinite loop\\en\");\n"
6445 "    for (;;)\n"
6446 "        continue;\n"
6447 "}\n"
6448
6449 #. type: Plain text
6450 #: build/C/man3/pthread_getcpuclockid.3:126
6451 #, no-wrap
6452 msgid ""
6453 "static void\n"
6454 "pclock(char *msg, clockid_t cid)\n"
6455 "{\n"
6456 "    struct timespec ts;\n"
6457 msgstr ""
6458 "static void\n"
6459 "pclock(char *msg, clockid_t cid)\n"
6460 "{\n"
6461 "    struct timespec ts;\n"
6462
6463 #. type: Plain text
6464 #: build/C/man3/pthread_getcpuclockid.3:132
6465 #, no-wrap
6466 msgid ""
6467 "    printf(\"%s\", msg);\n"
6468 "    if (clock_gettime(cid, &ts) == -1)\n"
6469 "        handle_error(\"clock_gettime\");\n"
6470 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6471 "}\n"
6472 msgstr ""
6473 "    printf(\"%s\", msg);\n"
6474 "    if (clock_gettime(cid, &ts) == -1)\n"
6475 "        handle_error(\"clock_gettime\");\n"
6476 "    printf(\"%4ld.%03ld\\en\", ts.tv_sec, ts.tv_nsec / 1000000);\n"
6477 "}\n"
6478
6479 #. type: Plain text
6480 #: build/C/man3/pthread_getcpuclockid.3:139
6481 #, no-wrap
6482 msgid ""
6483 "int\n"
6484 "main(int argc, char *argv[])\n"
6485 "{\n"
6486 "    pthread_t thread;\n"
6487 "    clockid_t cid;\n"
6488 "    int j, s;\n"
6489 msgstr ""
6490 "int\n"
6491 "main(int argc, char *argv[])\n"
6492 "{\n"
6493 "    pthread_t thread;\n"
6494 "    clockid_t cid;\n"
6495 "    int j, s;\n"
6496
6497 #. type: Plain text
6498 #: build/C/man3/pthread_getcpuclockid.3:143
6499 #, no-wrap
6500 msgid ""
6501 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6502 "    if (s != 0)\n"
6503 "        handle_error_en(s, \"pthread_create\");\n"
6504 msgstr ""
6505 "    s = pthread_create(&thread, NULL, thread_start, NULL);\n"
6506 "    if (s != 0)\n"
6507 "        handle_error_en(s, \"pthread_create\");\n"
6508
6509 #. type: Plain text
6510 #: build/C/man3/pthread_getcpuclockid.3:146
6511 #, no-wrap
6512 msgid ""
6513 "    printf(\"Main thread sleeping\\en\");\n"
6514 "    sleep(1);\n"
6515 msgstr ""
6516 "    printf(\"Main thread sleeping\\en\");\n"
6517 "    sleep(1);\n"
6518
6519 #. type: Plain text
6520 #: build/C/man3/pthread_getcpuclockid.3:150
6521 #, no-wrap
6522 msgid ""
6523 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6524 "    for (j = 0; j E<lt> 2000000; j++)\n"
6525 "        getppid();\n"
6526 msgstr ""
6527 "    printf(\"Main thread consuming some CPU time...\\en\");\n"
6528 "    for (j = 0; j E<lt> 2000000; j++)\n"
6529 "        getppid();\n"
6530
6531 #. type: Plain text
6532 #: build/C/man3/pthread_getcpuclockid.3:152
6533 #, no-wrap
6534 msgid "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6535 msgstr "    pclock(\"Process total CPU time: \", CLOCK_PROCESS_CPUTIME_ID);\n"
6536
6537 #. type: Plain text
6538 #: build/C/man3/pthread_getcpuclockid.3:157
6539 #, no-wrap
6540 msgid ""
6541 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6542 "    if (s != 0)\n"
6543 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6544 "    pclock(\"Main thread CPU time:   \", cid);\n"
6545 msgstr ""
6546 "    s = pthread_getcpuclockid(pthread_self(), &cid);\n"
6547 "    if (s != 0)\n"
6548 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6549 "    pclock(\"Main thread CPU time:   \", cid);\n"
6550
6551 #. type: Plain text
6552 #: build/C/man3/pthread_getcpuclockid.3:160
6553 #, no-wrap
6554 msgid ""
6555 "    /* The preceding 4 lines of code could have been replaced by:\n"
6556 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6557 msgstr ""
6558 "    /* The preceding 4 lines of code could have been replaced by:\n"
6559 "       pclock(\"Main thread CPU time:   \", CLOCK_THREAD_CPUTIME_ID); */\n"
6560
6561 #. type: Plain text
6562 #: build/C/man3/pthread_getcpuclockid.3:165
6563 #, no-wrap
6564 msgid ""
6565 "    s = pthread_getcpuclockid(thread, &cid);\n"
6566 "    if (s != 0)\n"
6567 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6568 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6569 msgstr ""
6570 "    s = pthread_getcpuclockid(thread, &cid);\n"
6571 "    if (s != 0)\n"
6572 "        handle_error_en(s, \"pthread_getcpuclockid\");\n"
6573 "    pclock(\"Subthread CPU time: 1    \", cid);\n"
6574
6575 #. type: Plain text
6576 #: build/C/man3/pthread_getcpuclockid.3:168
6577 #, no-wrap
6578 msgid ""
6579 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6580 "}\n"
6581 msgstr ""
6582 "    exit(EXIT_SUCCESS);         /* Terminates both threads */\n"
6583 "}\n"
6584
6585 #. type: Plain text
6586 #: build/C/man3/pthread_getcpuclockid.3:177
6587 msgid ""
6588 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6589 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6590 msgstr ""
6591 "B<clock_gettime>(2), B<clock_settime>(2), B<timer_create>(2), "
6592 "B<clock_getcpuclockid>(3), B<pthread_self>(3), B<pthreads>(7), B<time>(7)"
6593
6594 #. type: TH
6595 #: build/C/man3/pthread_join.3:26
6596 #, no-wrap
6597 msgid "PTHREAD_JOIN"
6598 msgstr "PTHREAD_JOIN"
6599
6600 #. type: Plain text
6601 #: build/C/man3/pthread_join.3:29
6602 msgid "pthread_join - join with a terminated thread"
6603 msgstr "pthread_join - 終了したスレッドを join する"
6604
6605 #. type: Plain text
6606 #: build/C/man3/pthread_join.3:34
6607 #, no-wrap
6608 msgid "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6609 msgstr "B<int pthread_join(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
6610
6611 #. type: Plain text
6612 #: build/C/man3/pthread_join.3:49
6613 msgid ""
6614 "The B<pthread_join>()  function waits for the thread specified by I<thread> "
6615 "to terminate.  If that thread has already terminated, then B<pthread_join>"
6616 "()  returns immediately.  The thread specified by I<thread> must be joinable."
6617 msgstr ""
6618 "B<pthread_join>() 関数は、I<thread> で指定されたスレッドが\n"
6619 "終了するのを待つ。そのスレッドがすでに終了している場合、\n"
6620 "B<pthread_join>() はすぐに返る。\n"
6621 "I<thread> で指定されたスレッドは join 可能でなければならない。"
6622
6623 #. type: Plain text
6624 #: build/C/man3/pthread_join.3:63
6625 msgid ""
6626 "If I<retval> is not NULL, then B<pthread_join>()  copies the exit status of "
6627 "the target thread (i.e., the value that the target thread supplied to "
6628 "B<pthread_exit>(3))  into the location pointed to by I<*retval>.  If the "
6629 "target thread was canceled, then B<PTHREAD_CANCELED> is placed in I<*retval>."
6630 msgstr ""
6631 "I<retval> が NULL でない場合、 B<pthread_join>() は対象スレッドの終了\n"
6632 "ステータス (すなわち、対象スレッドが B<pthread_exit>(3) に渡した値) を\n"
6633 "I<*retval> が指す場所にコピーする。対象スレッドがキャンセルされた場合、\n"
6634 "I<*retval> には B<PTHREAD_CANCELED> が格納される。"
6635
6636 #. type: Plain text
6637 #: build/C/man3/pthread_join.3:70
6638 msgid ""
6639 "If multiple threads simultaneously try to join with the same thread, the "
6640 "results are undefined.  If the thread calling B<pthread_join>()  is "
6641 "canceled, then the target thread will remain joinable (i.e., it will not be "
6642 "detached)."
6643 msgstr ""
6644 "複数のスレッドが同時に同じスレッドを join しようとした場合、その結果\n"
6645 "は不定である。B<pthread_join>() を呼び出しているスレッドがキャンセル\n"
6646 "された場合、対象スレッドは join 可能のままとなる (detached 状態には\n"
6647 "ならない)。"
6648
6649 #. type: Plain text
6650 #: build/C/man3/pthread_join.3:75
6651 msgid ""
6652 "On success, B<pthread_join>()  returns 0; on error, it returns an error "
6653 "number."
6654 msgstr ""
6655 "成功すると、 B<pthread_join>() は 0 を返す。\n"
6656 "エラーの場合、エラー番号を返す。"
6657
6658 #. type: TP
6659 #: build/C/man3/pthread_join.3:76
6660 #, no-wrap
6661 msgid "B<EDEADLK>"
6662 msgstr "B<EDEADLK>"
6663
6664 #.  The following verified by testing on glibc 2.8/NPTL:
6665 #.  The following verified by testing on glibc 2.8/NPTL:
6666 #. type: Plain text
6667 #: build/C/man3/pthread_join.3:85
6668 msgid ""
6669 "A deadlock was detected (e.g., two threads tried to join with each other); "
6670 "or I<thread> specifies the calling thread."
6671 msgstr ""
6672 "デッドロックが検出された (例えば、二つのスレッドが互いに join しようと\n"
6673 "した場合)、または I<thread> に呼び出したスレッドが指定されている。"
6674
6675 #.  POSIX.1-2001 does not specify this error case.
6676 #. type: Plain text
6677 #: build/C/man3/pthread_join.3:93
6678 msgid "Another thread is already waiting to join with this thread."
6679 msgstr "別のスレッドがすでにこのスレッドの join 待ちである。"
6680
6681 #. type: Plain text
6682 #: build/C/man3/pthread_join.3:104
6683 msgid ""
6684 "After a successful call to B<pthread_join>(), the caller is guaranteed that "
6685 "the target thread has terminated."
6686 msgstr ""
6687 "B<pthread_join>() の呼び出しが成功した場合は、\n"
6688 "呼び出し側には、対象スレッドが終了していることが保証される。"
6689
6690 #. type: Plain text
6691 #: build/C/man3/pthread_join.3:107
6692 msgid ""
6693 "Joining with a thread that has previously been joined results in undefined "
6694 "behavior."
6695 msgstr "すでに join されたスレッドを join した場合の結果は不定である。"
6696
6697 #. type: Plain text
6698 #: build/C/man3/pthread_join.3:115
6699 msgid ""
6700 "Failure to join with a thread that is joinable (i.e., one that is not "
6701 "detached), produces a \"zombie thread\".  Avoid doing this, since each "
6702 "zombie thread consumes some system resources, and when enough zombie threads "
6703 "have accumulated, it will no longer be possible to create new threads (or "
6704 "processes)."
6705 msgstr ""
6706 "join 可能なスレッド (detached 状態でないスレッド) の join に失敗した場合、\n"
6707 "\"ゾンビスレッド (zombie thread)\" が生成される。\n"
6708 "各ゾンビスレッドはシステムリソースをいくらかは消費し、\n"
6709 "ゾンビスレッドがたくさん生成されてしまうと、\n"
6710 "新しいスレッド (やプロセス) がそれ以上作成できなくなってしまうので、\n"
6711 "このようなことが起きるのは避けること。"
6712
6713 #. type: Plain text
6714 #: build/C/man3/pthread_join.3:121
6715 msgid ""
6716 "There is no pthreads analog of I<waitpid(-1,\\ &status,\\ 0)>, that is, "
6717 "\"join with any terminated thread\".  If you believe you need this "
6718 "functionality, you probably need to rethink your application design."
6719 msgstr ""
6720 "pthreads には、 I<waitpid(-1,\\ &status,\\ 0)>、つまり\n"
6721 "\"終了されたスレッドのどれかを join する\" といった機能はない。\n"
6722 "この機能が必要だと思うような場合には、おそらく\n"
6723 "自分のアプリケーションの設計を考え直す必要があるだろう。"
6724
6725 #. type: Plain text
6726 #: build/C/man3/pthread_join.3:124
6727 msgid ""
6728 "All of the threads in a process are peers: any thread can join with any "
6729 "other thread in the process."
6730 msgstr ""
6731 "プロセス内の全てのスレッドは対等であり、\n"
6732 "どのスレッドでもプロセス内の他のスレッドを join できる。"
6733
6734 #. type: Plain text
6735 #: build/C/man3/pthread_join.3:134
6736 msgid ""
6737 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6738 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6739 msgstr ""
6740 "B<pthread_cancel>(3), B<pthread_create>(3), B<pthread_detach>(3), "
6741 "B<pthread_exit>(3), B<pthread_tryjoin_np>(3), B<pthreads>(7)"
6742
6743 #. type: TH
6744 #: build/C/man3/pthread_kill.3:26
6745 #, no-wrap
6746 msgid "PTHREAD_KILL"
6747 msgstr "PTHREAD_KILL"
6748
6749 #. type: TH
6750 #: build/C/man3/pthread_kill.3:26 build/C/man3/pthread_sigqueue.3:25
6751 #, fuzzy, no-wrap
6752 #| msgid "2012-03-15"
6753 msgid "2012-08-19"
6754 msgstr "2012-03-15"
6755
6756 #. type: Plain text
6757 #: build/C/man3/pthread_kill.3:29
6758 msgid "pthread_kill - send a signal to a thread"
6759 msgstr "pthread_kill - スレッドにシグナルを送信する"
6760
6761 #. type: Plain text
6762 #: build/C/man3/pthread_kill.3:32 build/C/man3/pthread_sigmask.3:32
6763 #, no-wrap
6764 msgid "B<#include E<lt>signal.hE<gt>>\n"
6765 msgstr "B<#include E<lt>signal.hE<gt>>\n"
6766
6767 #. type: Plain text
6768 #: build/C/man3/pthread_kill.3:34
6769 #, no-wrap
6770 msgid "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6771 msgstr "B<int pthread_kill(pthread_t >I<thread>B<, int >I<sig>B<);>\n"
6772
6773 #. type: Plain text
6774 #: build/C/man3/pthread_kill.3:47
6775 #, fuzzy
6776 #| msgid ""
6777 #| "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, "
6778 #| "another thread in the same process as the caller.  The signal is "
6779 #| "asynchronously directed to I<thread>."
6780 msgid ""
6781 "The B<pthread_kill>()  function sends the signal I<sig> to I<thread>, a "
6782 "thread in the same process as the caller.  The signal is asynchronously "
6783 "directed to I<thread>."
6784 msgstr ""
6785 "B<pthread_kill>() 関数は、呼び出したスレッドと同じプロセスの\n"
6786 "別のスレッド I<thread> にシグナル I<sig> を送信する。\n"
6787 "シグナルは非同期に I<thread> へ直接送られる。"
6788
6789 #. type: Plain text
6790 #: build/C/man3/pthread_kill.3:52
6791 msgid ""
6792 "If I<sig> is 0, then no signal is sent, but error checking is still "
6793 "performed; this can be used to check for the existence of a thread ID."
6794 msgstr ""
6795 "I<sig> が 0 の場合、シグナルは送信されないが、\n"
6796 "エラーチェックだけは実行される。\n"
6797 "これを使うと、スレッド ID が存在するかの確認を行うことができる。"
6798
6799 #. type: Plain text
6800 #: build/C/man3/pthread_kill.3:57
6801 msgid ""
6802 "On success, B<pthread_kill>()  returns 0; on error, it returns an error "
6803 "number, and no signal is sent."
6804 msgstr ""
6805 "成功すると、 B<pthread_kill>() は 0 を返す。\n"
6806 "エラーの場合、エラー番号を返し、シグナルの送信は行わない。"
6807
6808 #. type: Plain text
6809 #: build/C/man3/pthread_kill.3:61
6810 msgid "An invalid signal was specified."
6811 msgstr "無効なシグナルが指定された。"
6812
6813 #. type: Plain text
6814 #: build/C/man3/pthread_kill.3:75
6815 msgid ""
6816 "Signal dispositions are process-wide: if a signal handler is installed, the "
6817 "handler will be invoked in the thread I<thread>, but if the disposition of "
6818 "the signal is \"stop\", \"continue\", or \"terminate\", this action will "
6819 "affect the whole process."
6820 msgstr ""
6821 "シグナルの配送はプロセス全体で行われる。\n"
6822 "シグナルハンドラが設定されている場合、\n"
6823 "そのハンドラがスレッド I<thread> で起動されるが、\n"
6824 "シグナルの配送が \"stop\", \"continue\", \"terminate\" のいずれかの場合、\n"
6825 "シグナルに対するアクションはプロセス全体に影響がある。"
6826
6827 #. type: Plain text
6828 #: build/C/man3/pthread_kill.3:84
6829 #, fuzzy
6830 #| msgid ""
6831 #| "B<kill>(2)  B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6832 #| "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6833 msgid ""
6834 "B<kill>(2), B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6835 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6836 msgstr ""
6837 "B<kill>(2)  B<sigaction>(2), B<sigpending>(2), B<pthread_self>(3), "
6838 "B<pthread_sigmask>(3), B<raise>(3), B<pthreads>(7), B<signal>(7)"
6839
6840 #. type: TH
6841 #: build/C/man3/pthread_kill_other_threads_np.3:26
6842 #, no-wrap
6843 msgid "PTHREAD_KILL_OTHER_THREADS_NP"
6844 msgstr "PTHREAD_KILL_OTHER_THREADS_NP"
6845
6846 #. type: TH
6847 #: build/C/man3/pthread_kill_other_threads_np.3:26
6848 #, no-wrap
6849 msgid "2010-09-09"
6850 msgstr "2010-09-09"
6851
6852 #. type: Plain text
6853 #: build/C/man3/pthread_kill_other_threads_np.3:29
6854 msgid "pthread_kill_other_threads_np - terminate all other threads in process"
6855 msgstr "pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する"
6856
6857 #. type: Plain text
6858 #: build/C/man3/pthread_kill_other_threads_np.3:34
6859 #, no-wrap
6860 msgid "B<void pthread_kill_other_threads_np(void);>\n"
6861 msgstr "B<void pthread_kill_other_threads_np(void);>\n"
6862
6863 #.  .SH VERSIONS
6864 #.  Available since glibc 2.0
6865 #. type: Plain text
6866 #: build/C/man3/pthread_kill_other_threads_np.3:47
6867 msgid ""
6868 "B<pthread_kill_other_threads_np>()  only has an effect in the LinuxThreads "
6869 "threading implementation.  On that implementation, calling this function "
6870 "causes the immediate termination of all threads in the application, except "
6871 "the calling thread.  The cancellation state and cancellation type of the to-"
6872 "be-terminated threads are ignored, and the cleanup handlers are not called "
6873 "in those threads."
6874 msgstr ""
6875 "B<pthread_kill_other_threads_np>() は、\n"
6876 "LinuxThreads スレッド実装においてのみ効果がある。\n"
6877 "LinuxThreads スレッド実装では、この関数を呼び出すと\n"
6878 "アプリケーション内の全てのスレッドがすぐに終了される。\n"
6879 "終了対象のスレッドの cancelability state と cancelability type は\n"
6880 "無視され、それらのスレッドのクリーンアップハンドラは呼び出されない。"
6881
6882 #. type: Plain text
6883 #: build/C/man3/pthread_kill_other_threads_np.3:59
6884 msgid ""
6885 "B<pthread_kill_other_threads_np>()  is intended to be called just before a "
6886 "thread calls B<execve>(2)  or a similar function.  This function is designed "
6887 "to address a limitation in the obsolete LinuxThreads implementation whereby "
6888 "the other threads of an application are not automatically terminated (as "
6889 "POSIX.1-2001 requires) during B<execve>(2)."
6890 msgstr ""
6891 "B<pthread_kill_other_threads_np>() は、\n"
6892 "スレッドが B<execve>(2) や同様の関数を呼び出す直前に\n"
6893 "呼ばれることを目的として用意されている。\n"
6894 "この関数は、(廃止予定の) LinuxThreads スレッド実装における、\n"
6895 "B<execve>(2) の際にアプリケーションの他のスレッドが自動的に\n"
6896 "終了されないという制限を解決するために設計された。"
6897
6898 #. type: Plain text
6899 #: build/C/man3/pthread_kill_other_threads_np.3:66
6900 msgid ""
6901 "In the NPTL threading implementation, B<pthread_kill_other_threads_np>()  "
6902 "exists, but does nothing.  (Nothing needs to be done, because the "
6903 "implementation does the right thing during an B<execve>(2).)"
6904 msgstr ""
6905 "NPTL スレッド実装では、 B<pthread_kill_other_threads_np>() は存在するが、\n"
6906 "何もしない(NPTL 実装は B<execve>(2) の際に適切な動作をするので、\n"
6907 "何もする必要がないということだ)。"
6908
6909 #. type: Plain text
6910 #: build/C/man3/pthread_kill_other_threads_np.3:72
6911 msgid ""
6912 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6913 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6914 msgstr ""
6915 "B<execve>(2), B<pthread_cancel>(3), B<pthread_setcancelstate>(3), "
6916 "B<pthread_setcanceltype>(3), B<pthreads>(7)"
6917
6918 #. type: TH
6919 #: build/C/man3/pthread_self.3:26
6920 #, no-wrap
6921 msgid "PTHREAD_SELF"
6922 msgstr "PTHREAD_SELF"
6923
6924 #. type: Plain text
6925 #: build/C/man3/pthread_self.3:29
6926 msgid "pthread_self - obtain ID of the calling thread"
6927 msgstr "pthread_self - 呼び出したスレッドの ID を取得する"
6928
6929 #. type: Plain text
6930 #: build/C/man3/pthread_self.3:34
6931 #, no-wrap
6932 msgid "B<pthread_t pthread_self(void);>\n"
6933 msgstr "B<pthread_t pthread_self(void);>\n"
6934
6935 #. type: Plain text
6936 #: build/C/man3/pthread_self.3:46
6937 msgid ""
6938 "The B<pthread_self>()  function returns the ID of the calling thread.  This "
6939 "is the same value that is returned in I<*thread> in the B<pthread_create>"
6940 "(3)  call that created this thread."
6941 msgstr ""
6942 "B<pthread_self>() 関数は、呼び出したスレッドの ID を返す。\n"
6943 "得られる ID は、このスレッドが作成された B<pthread_create>(3) の\n"
6944 "呼び出しで I<*thread> で返されるのと同じ値である。"
6945
6946 #. type: Plain text
6947 #: build/C/man3/pthread_self.3:48
6948 msgid "This function always succeeds, returning the calling thread's ID."
6949 msgstr "この関数は常に成功し、呼び出したスレッドの ID を返す。"
6950
6951 #. type: Plain text
6952 #: build/C/man3/pthread_self.3:63
6953 msgid ""
6954 "POSIX.1 allows an implementation wide freedom in choosing the type used to "
6955 "represent a thread ID; for example, representation using either an "
6956 "arithmetic type or a structure is permitted.  Therefore, variables of type "
6957 "I<pthread_t> can't portably be compared using the C equality operator "
6958 "(B<==>); use B<pthread_equal>(3)  instead."
6959 msgstr ""
6960 "POSIX.1 では、スレッド ID を表現するのに使用する型は、\n"
6961 "スレッド実装が完全に自由に選択してよいことになっている。\n"
6962 "例えば、スレッド ID を表現するのに数値型を使っても構造体を使ってもよい。\n"
6963 "そのため、移植性を確保しつつ、 C 言語の等価演算子 (B<==>) を使って、\n"
6964 "I<pthread_t> 型の変数の比較を行うことはできない。\n"
6965 "代わりに B<pthread_equal>(3) を使うこと。"
6966
6967 #. type: Plain text
6968 #: build/C/man3/pthread_self.3:67
6969 msgid ""
6970 "Thread identifiers should be considered opaque: any attempt to use a thread "
6971 "ID other than in pthreads calls is nonportable and can lead to unspecified "
6972 "results."
6973 msgstr ""
6974 "スレッド識別子はその内部構造を意識すべきではない。\n"
6975 "pthreads 関数以外でスレッド ID を利用しようとした場合、\n"
6976 "移植性がなくなり、どのような結果が得られるかも分からない。"
6977
6978 #. type: Plain text
6979 #: build/C/man3/pthread_self.3:71
6980 msgid ""
6981 "Thread IDs are only guaranteed to be unique within a process.  A thread ID "
6982 "may be reused after a terminated thread has been joined, or a detached "
6983 "thread has terminated."
6984 msgstr ""
6985 "スレッド ID の一意性が保証されるのは、あるプロセス内においてのみである。\n"
6986 "終了したスレッドが join されたり、\n"
6987 "切り離された (detached) スレッドが終了されたりした後は、\n"
6988 "そのスレッド ID は再利用されることがある。"
6989
6990 #. type: Plain text
6991 #: build/C/man3/pthread_self.3:76
6992 msgid ""
6993 "The thread ID returned by B<pthread_self>()  is not the same thing as the "
6994 "kernel thread ID returned by a call to B<gettid>(2)."
6995 msgstr ""
6996 "B<pthread_self>() が返すスレッド ID は、\n"
6997 "B<gettid>(2) が返すカーネルスレッド ID とは違うものである。"
6998
6999 #. type: Plain text
7000 #: build/C/man3/pthread_self.3:80
7001 msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7002 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
7003
7004 #. type: TH
7005 #: build/C/man3/pthread_setaffinity_np.3:26
7006 #, no-wrap
7007 msgid "PTHREAD_SETAFFINITY_NP"
7008 msgstr "PTHREAD_SETAFFINITY_NP"
7009
7010 #. type: Plain text
7011 #: build/C/man3/pthread_setaffinity_np.3:30
7012 msgid ""
7013 "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of a "
7014 "thread"
7015 msgstr ""
7016 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7017 "CPU affinity の設定/取得を行う"
7018
7019 #. type: Plain text
7020 #: build/C/man3/pthread_setaffinity_np.3:39
7021 #, no-wrap
7022 msgid ""
7023 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7024 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7025 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7026 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7027 msgstr ""
7028 "B<int pthread_setaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7029 "B<                           const cpu_set_t *>I<cpuset>B<);>\n"
7030 "B<int pthread_getaffinity_np(pthread_t >I<thread>B<, size_t >I<cpusetsize>B<,>\n"
7031 "B<                           cpu_set_t *>I<cpuset>B<);>\n"
7032
7033 #. type: Plain text
7034 #: build/C/man3/pthread_setaffinity_np.3:54
7035 msgid ""
7036 "The B<pthread_setaffinity_np>()  function sets the CPU affinity mask of the "
7037 "thread I<thread> to the CPU set pointed to by I<cpuset>.  If the call is "
7038 "successful, and the thread is not currently running on one of the CPUs in "
7039 "I<cpuset>, then it is migrated to one of those CPUs."
7040 msgstr ""
7041 "B<pthread_setaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7042 "マスクに I<cpuset> が指す CPU 集合を設定する。呼び出しが成功し、\n"
7043 "そのスレッドが現在 I<cpuset> で指定された CPU 上でが実行されていない\n"
7044 "場合は、スレッドは指定された CPU のいずれかに移動される。"
7045
7046 #. type: Plain text
7047 #: build/C/man3/pthread_setaffinity_np.3:61
7048 msgid ""
7049 "The B<pthread_getaffinity_np>()  function returns the CPU affinity mask of "
7050 "the thread I<thread> in the buffer pointed to by I<cpuset>."
7051 msgstr ""
7052 "B<pthread_getaffinity_np>() 関数は、スレッド I<thread> の CPU affinity\n"
7053 "マスクを、I<cpuset> が指すバッファに入れて返す。"
7054
7055 #. type: Plain text
7056 #: build/C/man3/pthread_setaffinity_np.3:77
7057 msgid ""
7058 "The argument I<cpusetsize> is the length (in bytes) of the buffer pointed to "
7059 "by I<cpuset>.  Typically, this argument would be specified as I<sizeof"
7060 "(cpu_set_t)>.  (It may be some other value, if using the macros described in "
7061 "B<CPU_SET>(3)  for dynamically allocating a CPU set.)"
7062 msgstr ""
7063 "引き数 I<cpusetsize> は I<cpuset> が指すバッファの長さ (バイト単位) で\n"
7064 "ある。通常は、この引き数には I<sizeof(cpu_set_t)> を指定する\n"
7065 "(B<CPU_SET>(3) に書かれているマクロを使って CPU 集合を動的に\n"
7066 "割り当てている場合には、別の値になることもある)。"
7067
7068 #. type: TP
7069 #: build/C/man3/pthread_setaffinity_np.3:81
7070 #, no-wrap
7071 msgid "B<EFAULT>"
7072 msgstr "B<EFAULT>"
7073
7074 #. type: Plain text
7075 #: build/C/man3/pthread_setaffinity_np.3:84
7076 msgid "A supplied memory address was invalid."
7077 msgstr "指定されたメモリアドレスが無効である。"
7078
7079 #. type: Plain text
7080 #: build/C/man3/pthread_setaffinity_np.3:93
7081 msgid ""
7082 "(B<pthread_setaffinity_np>())  The affinity bit mask I<mask> contains no "
7083 "processors that are currently physically on the system and permitted to the "
7084 "thread according to any restrictions that may be imposed by the \"cpuset\" "
7085 "mechanism described in B<cpuset>(7)."
7086 msgstr ""
7087 "(B<pthread_setaffinity_np>()) affinity ビットマスク I<mask> に、\n"
7088 "その時点でシステム上に物理的に存在して、かつそのスレッドに対して許可\n"
7089 "されているプロセッサが一つも含まれていない。\n"
7090 "スレッドに対してどのプロセッサの利用が許可されるかは、B<cpuset>(7) で\n"
7091 "説明されている \"cpuset\" 機構に適用される制限に基づいて決まる。"
7092
7093 #.  FIXME . ?
7094 #.  Loic Domaigne commented: it seems that in the future the
7095 #.  kernel developers want to make cpumask_t dynamic, so
7096 #.  CONFIG_NR_CPUS might become obsolete in the future.
7097 #.  cpumask_t
7098 #.  The raw sched_getaffinity() system call returns the size (in bytes)
7099 #.  of the cpumask_t type.
7100 #. type: Plain text
7101 #: build/C/man3/pthread_setaffinity_np.3:109
7102 msgid ""
7103 "(B<pthread_setaffinity_np>())  I<cpuset> specified a CPU that was outside "
7104 "the set supported by the kernel.  (The kernel configuration option "
7105 "B<CONFIG_NR_CPUS> defines the range of the set supported by the kernel data "
7106 "type used to represent CPU sets.)"
7107 msgstr ""
7108 "(B<pthread_setaffinity_np>()) I<cpuset> が、カーネルがサポートする CPU\n"
7109 "集合に含まれない CPU を指定していた。(カーネルの設定オプション\n"
7110 "B<CONFIG_NR_CPUS> により、CPU 集合を表現するのに使われるカーネルの\n"
7111 "データ型がサポートする CPU 集合の範囲が定義される。)"
7112
7113 #. type: Plain text
7114 #: build/C/man3/pthread_setaffinity_np.3:114
7115 msgid ""
7116 "(B<pthread_getaffinity_np>())  I<cpusetsize> is smaller than the size of the "
7117 "affinity mask used by the kernel."
7118 msgstr ""
7119 "(B<pthread_getaffinity_np>()) I<cpusetsize> がカーネルが使用する\n"
7120 "affinity マスクの大きさよりも小さい。"
7121
7122 #. type: Plain text
7123 #: build/C/man3/pthread_setaffinity_np.3:137
7124 msgid ""
7125 "After a call to B<pthread_setaffinity_np>(), the set of CPUs on which the "
7126 "thread will actually run is the intersection of the set specified in the "
7127 "I<cpuset> argument and the set of CPUs actually present on the system.  The "
7128 "system may further restrict the set of CPUs on which the thread runs if the "
7129 "\"cpuset\" mechanism described in B<cpuset>(7)  is being used.  These "
7130 "restrictions on the actual set of CPUs on which the thread will run are "
7131 "silently imposed by the kernel."
7132 msgstr ""
7133 "B<pthread_setaffinity_np>() を呼び出した後、\n"
7134 "そのスレッドが実際に実行される CPU 集合は、\n"
7135 "I<cpuset> 引き数で指定された集合と\n"
7136 "システムに実際に存在する CPU 集合の共通部分になる。\n"
7137 "また、 B<cpuset>(7) で説明されている \"cpuset\" 機構が使われている場合\n"
7138 "には、そのスレッドが実行される CPU 集合がシステムによってさらに制限\n"
7139 "される場合がある。そのスレッドが実行される実際の CPU 集合に対する\n"
7140 "これらの制限は、カーネルにより黙って適用される。"
7141
7142 #. type: Plain text
7143 #: build/C/man3/pthread_setaffinity_np.3:143
7144 msgid ""
7145 "These functions are implemented on top of the B<sched_setaffinity>(2)  and "
7146 "B<sched_getaffinity>(2)  system calls."
7147 msgstr ""
7148 "これらの関数は、システムコール B<sched_setaffinity>(2) と\n"
7149 "B<sched_getaffinity>(2) を使って実装されている。"
7150
7151 #. type: Plain text
7152 #: build/C/man3/pthread_setaffinity_np.3:154
7153 msgid ""
7154 "A new thread created by B<pthread_create>(3)  inherits a copy of its "
7155 "creator's CPU affinity mask."
7156 msgstr ""
7157 "B<pthread_create>(3) で作成される新しいスレッドは、\n"
7158 "作成者の CPU affinity マスクを継承する。"
7159
7160 #. type: Plain text
7161 #: build/C/man3/pthread_setaffinity_np.3:162
7162 msgid ""
7163 "In the following program, the main thread uses B<pthread_setaffinity_np>()  "
7164 "to set its CPU affinity mask to include CPUs 0 to 7 (which may not all be "
7165 "available on the system), and then calls B<pthread_getaffinity_np>()  to "
7166 "check the resulting CPU affinity mask of the thread."
7167 msgstr ""
7168 "以下のプログラムでは、メインスレッドは\n"
7169 "B<pthread_setaffinity_np>() を使って自分の CPU affinity マスクに\n"
7170 "CPU 0 から 7 が含まれるように設定し\n"
7171 "(システム上には 0 から 7 に対応する CPU が全て存在するとは限らない)、\n"
7172 "その後で B<pthread_getaffinity_np>() を使って\n"
7173 "スレッドに実際に設定された CPU affinity マスクを確認している。"
7174
7175 #. type: Plain text
7176 #: build/C/man3/pthread_setaffinity_np.3:169
7177 #, no-wrap
7178 msgid ""
7179 "#define _GNU_SOURCE\n"
7180 "#include E<lt>pthread.hE<gt>\n"
7181 "#include E<lt>stdio.hE<gt>\n"
7182 "#include E<lt>stdlib.hE<gt>\n"
7183 "#include E<lt>errno.hE<gt>\n"
7184 msgstr ""
7185 "#define _GNU_SOURCE\n"
7186 "#include E<lt>pthread.hE<gt>\n"
7187 "#include E<lt>stdio.hE<gt>\n"
7188 "#include E<lt>stdlib.hE<gt>\n"
7189 "#include E<lt>errno.hE<gt>\n"
7190
7191 #. type: Plain text
7192 #: build/C/man3/pthread_setaffinity_np.3:179
7193 #, no-wrap
7194 msgid ""
7195 "int\n"
7196 "main(int argc, char *argv[])\n"
7197 "{\n"
7198 "    int s, j;\n"
7199 "    cpu_set_t cpuset;\n"
7200 "    pthread_t thread;\n"
7201 msgstr ""
7202 "int\n"
7203 "main(int argc, char *argv[])\n"
7204 "{\n"
7205 "    int s, j;\n"
7206 "    cpu_set_t cpuset;\n"
7207 "    pthread_t thread;\n"
7208
7209 #. type: Plain text
7210 #: build/C/man3/pthread_setaffinity_np.3:181
7211 #, no-wrap
7212 msgid "    thread = pthread_self();\n"
7213 msgstr "    thread = pthread_self();\n"
7214
7215 #. type: Plain text
7216 #: build/C/man3/pthread_setaffinity_np.3:183
7217 #, no-wrap
7218 msgid "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7219 msgstr "    /* Set affinity mask to include CPUs 0 to 7 */\n"
7220
7221 #. type: Plain text
7222 #: build/C/man3/pthread_setaffinity_np.3:187
7223 #, no-wrap
7224 msgid ""
7225 "    CPU_ZERO(&cpuset);\n"
7226 "    for (j = 0; j E<lt> 8; j++)\n"
7227 "        CPU_SET(j, &cpuset);\n"
7228 msgstr ""
7229 "    CPU_ZERO(&cpuset);\n"
7230 "    for (j = 0; j E<lt> 8; j++)\n"
7231 "        CPU_SET(j, &cpuset);\n"
7232
7233 #. type: Plain text
7234 #: build/C/man3/pthread_setaffinity_np.3:191
7235 #, no-wrap
7236 msgid ""
7237 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7238 "    if (s != 0)\n"
7239 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7240 msgstr ""
7241 "    s = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7242 "    if (s != 0)\n"
7243 "        handle_error_en(s, \"pthread_setaffinity_np\");\n"
7244
7245 #. type: Plain text
7246 #: build/C/man3/pthread_setaffinity_np.3:193
7247 #, no-wrap
7248 msgid "    /* Check the actual affinity mask assigned to the thread */\n"
7249 msgstr "    /* Check the actual affinity mask assigned to the thread */\n"
7250
7251 #. type: Plain text
7252 #: build/C/man3/pthread_setaffinity_np.3:197
7253 #, no-wrap
7254 msgid ""
7255 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7256 "    if (s != 0)\n"
7257 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7258 msgstr ""
7259 "    s = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset);\n"
7260 "    if (s != 0)\n"
7261 "        handle_error_en(s, \"pthread_getaffinity_np\");\n"
7262
7263 #. type: Plain text
7264 #: build/C/man3/pthread_setaffinity_np.3:202
7265 #, no-wrap
7266 msgid ""
7267 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7268 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7269 "        if (CPU_ISSET(j, &cpuset))\n"
7270 "            printf(\"    CPU %d\\en\", j);\n"
7271 msgstr ""
7272 "    printf(\"Set returned by pthread_getaffinity_np() contained:\\en\");\n"
7273 "    for (j = 0; j E<lt> CPU_SETSIZE; j++)\n"
7274 "        if (CPU_ISSET(j, &cpuset))\n"
7275 "            printf(\"    CPU %d\\en\", j);\n"
7276
7277 #. type: Plain text
7278 #: build/C/man3/pthread_setaffinity_np.3:205
7279 #: build/C/man3/pthread_setschedparam.3:430
7280 #, no-wrap
7281 msgid ""
7282 "    exit(EXIT_SUCCESS);\n"
7283 "}\n"
7284 msgstr ""
7285 "    exit(EXIT_SUCCESS);\n"
7286 "}\n"
7287
7288 #. type: Plain text
7289 #: build/C/man3/pthread_setaffinity_np.3:214
7290 msgid ""
7291 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7292 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7293 "B<cpuset>(7), B<pthreads>(7)"
7294 msgstr ""
7295 "B<sched_setaffinity>(2), B<sched_setscheduler>(2), "
7296 "B<pthread_attr_setaffinity_np>(3), B<pthread_self>(3), B<sched_getcpu>(3), "
7297 "B<cpuset>(7), B<pthreads>(7)"
7298
7299 #. type: TH
7300 #: build/C/man3/pthread_setcancelstate.3:26
7301 #, no-wrap
7302 msgid "PTHREAD_SETCANCELSTATE"
7303 msgstr "PTHREAD_SETCANCELSTATE"
7304
7305 #. type: Plain text
7306 #: build/C/man3/pthread_setcancelstate.3:30
7307 msgid ""
7308 "pthread_setcancelstate, pthread_setcanceltype - set cancelability state and "
7309 "type"
7310 msgstr ""
7311 "pthread_setcancelstate, pthread_setcanceltype - cancelability state と "
7312 "cancelability type を設定する"
7313
7314 #. type: Plain text
7315 #: build/C/man3/pthread_setcancelstate.3:36
7316 #, no-wrap
7317 msgid ""
7318 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7319 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7320 msgstr ""
7321 "B<int pthread_setcancelstate(int >I<state>B<, int *>I<oldstate>B<);>\n"
7322 "B<int pthread_setcanceltype(int >I<type>B<, int *>I<oldtype>B<);>\n"
7323
7324 #. type: Plain text
7325 #: build/C/man3/pthread_setcancelstate.3:51
7326 msgid ""
7327 "The B<pthread_setcancelstate>()  sets the cancelability state of the calling "
7328 "thread to the value given in I<state>.  The previous cancelability state of "
7329 "the thread is returned in the buffer pointed to by I<oldstate>.  The "
7330 "I<state> argument must have one of the following values:"
7331 msgstr ""
7332 "B<pthread_setcancelstate>() は、呼び出したスレッドの\n"
7333 "cancelability state に I<state> で指定された\n"
7334 "値を設定する。変更前のスレッドの cancelability state は\n"
7335 "I<oldstate> が指すバッファで返される。\n"
7336 "I<state> 引き数には以下の値のいずれか一つを指定しなければならない。"
7337
7338 #. type: TP
7339 #: build/C/man3/pthread_setcancelstate.3:51
7340 #, no-wrap
7341 msgid "B<PTHREAD_CANCEL_ENABLE>"
7342 msgstr "B<PTHREAD_CANCEL_ENABLE>"
7343
7344 #. type: Plain text
7345 #: build/C/man3/pthread_setcancelstate.3:58
7346 msgid ""
7347 "The thread is cancelable.  This is the default cancelability state in all "
7348 "new threads, including the initial thread.  The thread's cancelability type "
7349 "determines when a cancelable thread will respond to a cancellation request."
7350 msgstr ""
7351 "スレッドは取り消し可能 (cancelable) である。\n"
7352 "これが全ての新しく作成されるスレッドでのデフォルトの\n"
7353 "cancelability state である。これには最初のスレッドも含まれる。\n"
7354 "スレッドの cancelability type により、取り消し可能なスレッドが\n"
7355 "取り消し要求にいつ反応するかが決まる。"
7356
7357 #. type: TP
7358 #: build/C/man3/pthread_setcancelstate.3:58
7359 #, no-wrap
7360 msgid "B<PTHREAD_CANCEL_DISABLE>"
7361 msgstr "B<PTHREAD_CANCEL_DISABLE>"
7362
7363 #. type: Plain text
7364 #: build/C/man3/pthread_setcancelstate.3:63
7365 msgid ""
7366 "The thread is not cancelable.  If a cancellation request is received, it is "
7367 "blocked until cancelability is enabled."
7368 msgstr ""
7369 "スレッドは取り消しできない。取り消し要求を受信した際は、\n"
7370 "取り消し可能に設定されるまでその要求はブロックされる。"
7371
7372 #. type: Plain text
7373 #: build/C/man3/pthread_setcancelstate.3:75
7374 msgid ""
7375 "The B<pthread_setcanceltype>()  sets the cancelability type of the calling "
7376 "thread to the value given in I<type>.  The previous cancelability type of "
7377 "the thread is returned in the buffer pointed to by I<oldtype>.  The I<type> "
7378 "argument must have one of the following values:"
7379 msgstr ""
7380 "B<pthread_setcanceltype>() は、呼び出したスレッドの\n"
7381 "cancelability type に I<type> で指定された値を設定する。\n"
7382 "変更前のスレッドの cancelability type は\n"
7383 "I<oldtype> が指すバッファで返される。\n"
7384 "I<type> 引き数には以下の値のいずれか一つを指定しなければならない。"
7385
7386 #. type: TP
7387 #: build/C/man3/pthread_setcancelstate.3:75
7388 #, no-wrap
7389 msgid "B<PTHREAD_CANCEL_DEFERRED>"
7390 msgstr "B<PTHREAD_CANCEL_DEFERRED>"
7391
7392 #. type: Plain text
7393 #: build/C/man3/pthread_setcancelstate.3:82
7394 msgid ""
7395 "A cancellation request is deferred until the thread next calls a function "
7396 "that is a cancellation point (see B<pthreads>(7)).  This is the default "
7397 "cancelability type in all new threads, including the initial thread."
7398 msgstr ""
7399 "そのスレッドが次に取り消しポイント (cancellation point) の関数を\n"
7400 "呼び出すまで取り消し要求が遅延される。これが全ての新しく作成される\n"
7401 "スレッドでのデフォルトの cancelability type である。\n"
7402 "これには最初のスレッドも含まれる。"
7403
7404 #. type: TP
7405 #: build/C/man3/pthread_setcancelstate.3:82
7406 #, no-wrap
7407 msgid "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7408 msgstr "B<PTHREAD_CANCEL_ASYNCHRONOUS>"
7409
7410 #. type: Plain text
7411 #: build/C/man3/pthread_setcancelstate.3:88
7412 msgid ""
7413 "The thread can be canceled at any time.  (Typically, it will be canceled "
7414 "immediately upon receiving a cancellation request, but the system doesn't "
7415 "guarantee this.)"
7416 msgstr ""
7417 "スレッドはいつでも取り消すことができる (通常はすぐにキャンセルされるが、\n"
7418 "システムがそのことを保証しているわけではない)。"
7419
7420 #. type: Plain text
7421 #: build/C/man3/pthread_setcancelstate.3:92
7422 msgid ""
7423 "The set-and-get operation performed by each of these functions is atomic "
7424 "with respect to other threads in the process calling the same function."
7425 msgstr ""
7426 "これらの関数により実行される「設定と取得」操作 (set-and-get operation) は、\n"
7427 "同じ関数を呼び出したプロセス内の他のスレッドがあっても、\n"
7428 "アトミックに行われる。"
7429
7430 #. type: Plain text
7431 #: build/C/man3/pthread_setcancelstate.3:99
7432 msgid "The B<pthread_setcancelstate>()  can fail with the following error:"
7433 msgstr "B<pthread_setcancelstate>() は以下のエラーで失敗する場合がある。"
7434
7435 #. type: Plain text
7436 #: build/C/man3/pthread_setcancelstate.3:103
7437 msgid "Invalid value for I<state>."
7438 msgstr "I<state> に無効な値が指定された。"
7439
7440 #. type: Plain text
7441 #: build/C/man3/pthread_setcancelstate.3:107
7442 msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7443 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7444
7445 #.  .SH VERSIONS
7446 #.  Available since glibc 2.0
7447 #. type: Plain text
7448 #: build/C/man3/pthread_setcancelstate.3:113
7449 msgid "Invalid value for I<type>."
7450 msgstr "I<type> に無効な値が指定された。"
7451
7452 #. type: Plain text
7453 #: build/C/man3/pthread_setcancelstate.3:118
7454 msgid ""
7455 "For details of what happens when a thread is canceled, see B<pthread_cancel>"
7456 "(3)."
7457 msgstr ""
7458 "スレッドが取り消された場合に何が起こるかの詳細については\n"
7459 "B<pthread_cancel>(3) を参照。"
7460
7461 #. type: Plain text
7462 #: build/C/man3/pthread_setcancelstate.3:125
7463 msgid ""
7464 "Briefly disabling cancelability is useful if a thread performs some critical "
7465 "action that must not be interrupted by a cancellation request.  Beware of "
7466 "disabling cancelability for long periods, or around operations that may "
7467 "block for long periods, since that will render the thread unresponsive to "
7468 "cancellation requests."
7469 msgstr ""
7470 "取り消し要求により中断されてはならない重要なアクションをスレッドが\n"
7471 "実行する場合、短い時間だけ cancelability を無効にするのは有用である。\n"
7472 "長い時間 cancelability を無効にしたり、長い時間停止 (block) される\n"
7473 "可能性のある操作の前後で cancelability を無効にしたりする際には\n"
7474 "注意すること。なぜなら、無効にしてしまうと、キャンセル要求に対して\n"
7475 "スレッドが応答しない状態になってしまうからである。"
7476
7477 #. type: Plain text
7478 #: build/C/man3/pthread_setcancelstate.3:156
7479 msgid ""
7480 "Setting the cancelability type to B<PTHREAD_CANCEL_ASYNCHRONOUS> is rarely "
7481 "useful.  Since the thread could be canceled at I<any> time, it cannot safely "
7482 "reserve resources (e.g., allocating memory with B<malloc>(3)), acquire "
7483 "mutexes, semaphores, or locks, and so on.  Reserving resources is unsafe "
7484 "because the application has no way of knowing what the state of these "
7485 "resources is when the thread is canceled; that is, did cancellation occur "
7486 "before the resources were reserved, while they were reserved, or after they "
7487 "were released? Furthermore, some internal data structures (e.g., the linked "
7488 "list of free blocks managed by the B<malloc>(3)  family of functions) may be "
7489 "left in an inconsistent state if cancellation occurs in the middle of the "
7490 "function call.  Consequently, clean-up handlers cease to be useful.  "
7491 "Functions that can be safely asynchronously canceled are called I<async-"
7492 "cancel-safe functions>.  POSIX.1-2001 only requires that B<pthread_cancel>"
7493 "(3), B<pthread_setcancelstate>(), and B<pthread_setcanceltype>()  be async-"
7494 "cancel-safe.  In general, other library functions can't be safely called "
7495 "from an asynchronously cancelable thread.  One of the few circumstances in "
7496 "which asynchronous cancelability is useful is for cancellation of a thread "
7497 "that is in a pure compute-bound loop."
7498 msgstr ""
7499 "cancelability type を B<PTHREAD_CANCEL_ASYNCHRONOUS> に設定して役に立つ\n"
7500 "ことはめったにない。スレッドはI<いつでも>キャンセルすることができること\n"
7501 "になるので、スレッドが安全にリソースの確保 (例えば B<malloc>(3) で\n"
7502 "メモリを割り当てる) や mutex、セマフォ、ロックなどの獲得を行うことがで\n"
7503 "きない。アプリケーションは、スレッドがキャンセルされる際に、これらのリ\n"
7504 "ソースがどのような状態にあるかを知る術はないので、リソースの確保が安全\n"
7505 "ではなくなる。つまり、キャンセルが起こったのが、リソースの確保前なのか、\n"
7506 "確保中なのか、確保後なのかが分からない。さらに、関数呼び出しの最中に\n"
7507 "キャンセルが発生すると、いくつかの内部データ構造 (例えば、B<malloc>(3)\n"
7508 "関連の関数が管理している未使用ブロックのリンクリスト) が一貫性のない\n"
7509 "状態のままになってしまう可能性がある。その結果、クリーンアップハンドラ\n"
7510 "が役に立たないものになってしまう。\n"
7511 "非同期で安全にキャンセルできる関数は I<async-cancel-safe functions> と\n"
7512 "呼ばれる。 POSIX.1-2001 で、非同期で安全にキャンセルできるように求めら\n"
7513 "れている関数は B<pthread_cancel>(3), B<pthread_setcancelstate>(),\n"
7514 "B<pthread_setcanceltype>() だけである。一般的には、それ以外のライブラリ\n"
7515 "関数は、非同期にキャンセルできるスレッドから安全に呼び出すことはできな\n"
7516 "い。非同期でのキャンセルが有効な数少ない状況としては、純粋に計算だけを\n"
7517 "行うループに入っているスレッドをキャンセルするといった場面がある。"
7518
7519 #.  It looks like at least Solaris, FreeBSD and Tru64 support this.
7520 #. type: Plain text
7521 #: build/C/man3/pthread_setcancelstate.3:174
7522 msgid ""
7523 "The Linux threading implementations permit the I<oldstate> argument of "
7524 "B<pthread_setcancelstate>()  to be NULL, in which case the information about "
7525 "the previous cancelability state is not returned to the caller.  Many other "
7526 "implementations also permit a NULL I<oldstat> argument, but POSIX.1-2001 "
7527 "does not specify this point, so portable applications should always specify "
7528 "a non-NULL value in I<oldstate>.  A precisely analogous set of statements "
7529 "applies for the I<oldtype> argument of B<pthread_setcanceltype>()."
7530 msgstr ""
7531 "Linux のスレッド実装では、 B<pthread_setcancelstate>() の I<oldstate>\n"
7532 "引き数に NULL を指定することを認めている。 NULL が指定された場合、\n"
7533 "変更前の cancelability state の情報が呼び出し側に返されない。\n"
7534 "他の多くの実装でも I<oldstate> 引き数に NULL を指定することを認めて\n"
7535 "いるが、 POSIX.1-2001 ではこの点については規定されていない。\n"
7536 "したがって、移植性が必要なアプリケーションでは常に I<oldstate> に\n"
7537 "NULL 以外の値を指定するようにすべきである。\n"
7538 "B<pthread_setcanceltype>() の I<oldtype> 引き数についても、\n"
7539 "全く同じことが言える。"
7540
7541 #. type: Plain text
7542 #: build/C/man3/pthread_setcancelstate.3:177
7543 msgid "See B<pthread_cancel>(3)."
7544 msgstr "B<pthread_cancel>(3) を参照。"
7545
7546 #. type: Plain text
7547 #: build/C/man3/pthread_setcancelstate.3:182
7548 msgid ""
7549 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7550 "B<pthreads>(7)"
7551 msgstr ""
7552 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_testcancel>(3), "
7553 "B<pthreads>(7)"
7554
7555 #. type: TH
7556 #: build/C/man3/pthread_setconcurrency.3:25
7557 #, no-wrap
7558 msgid "PTHREAD_SETCONCURRENCY"
7559 msgstr "PTHREAD_SETCONCURRENCY"
7560
7561 #. type: TH
7562 #: build/C/man3/pthread_setconcurrency.3:25
7563 #, no-wrap
7564 msgid "2009-04-10"
7565 msgstr "2009-04-10"
7566
7567 #. type: Plain text
7568 #: build/C/man3/pthread_setconcurrency.3:29
7569 msgid ""
7570 "pthread_setconcurrency, pthread_getconcurrency - set/get the concurrency "
7571 "level"
7572 msgstr ""
7573 "pthread_setconcurrency, pthread_getconcurrency - 並列処理レベルの設定/取得を"
7574 "行う"
7575
7576 #. type: Plain text
7577 #: build/C/man3/pthread_setconcurrency.3:35
7578 #, no-wrap
7579 msgid ""
7580 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7581 "B<int pthread_getconcurrency(void);>\n"
7582 msgstr ""
7583 "B<int pthread_setconcurrency(int >I<new_level>B<);>\n"
7584 "B<int pthread_getconcurrency(void);>\n"
7585
7586 #. type: Plain text
7587 #: build/C/man3/pthread_setconcurrency.3:48
7588 msgid ""
7589 "The B<pthread_setconcurrency>()  function informs the implementation of the "
7590 "application's desired concurrency level, specified in I<new_level>.  The "
7591 "implementation only takes this as a hint: POSIX.1 does not specify the level "
7592 "of concurrency that should be provided as a result of calling "
7593 "B<pthread_setconcurrency>()."
7594 msgstr ""
7595 "B<pthread_setconcurrency>() 関数は、アプリケーションが希望する\n"
7596 "並列処理レベル (concurrency level) をスレッド実装に通知する。\n"
7597 "希望する並列処理レベルは I<new_level> で指定する。\n"
7598 "スレッド実装はこの情報を参考情報として利用する。\n"
7599 "POSIX.1 では、 B<pthread_setconcurrency>() の呼び出した結果、\n"
7600 "どのような並列度になるべきかは規定されていない。"
7601
7602 #. type: Plain text
7603 #: build/C/man3/pthread_setconcurrency.3:53
7604 msgid ""
7605 "Specifying I<new_level> as 0 instructs the implementation to manage the "
7606 "concurrency level as it deems appropriate."
7607 msgstr ""
7608 "I<new_level> に 0 を指定すると、スレッド実装は並列処理レベルを\n"
7609 "実装側で適切とみなしたレベルに設定するようになる。"
7610
7611 #. type: Plain text
7612 #: build/C/man3/pthread_setconcurrency.3:56
7613 msgid ""
7614 "B<pthread_getconcurrency>()  returns the current value of the concurrency "
7615 "level for this process."
7616 msgstr ""
7617 "B<pthread_getconcurrency>() は、このプロセスの concurrency level\n"
7618 "の現在値を返す。"
7619
7620 #. type: Plain text
7621 #: build/C/man3/pthread_setconcurrency.3:61
7622 msgid ""
7623 "On success, B<pthread_setconcurrency>()  returns 0; on error, it returns a "
7624 "nonzero error number."
7625 msgstr ""
7626 "成功すると、 B<pthread_setconcurrency>() は 0 を返す。\n"
7627 "エラーの場合、 0 以外のエラー番号を返す。"
7628
7629 #. type: Plain text
7630 #: build/C/man3/pthread_setconcurrency.3:68
7631 msgid ""
7632 "B<pthread_getconcurrency>()  always succeeds, returning the concurrency "
7633 "level set by a previous call to B<pthread_setconcurrency>(), or 0, if "
7634 "B<pthread_setconcurrency>()  has not previously been called."
7635 msgstr ""
7636 "B<pthread_getconcurrency>() は常に成功し、最後の\n"
7637 "B<pthread_getconcurrency>() の呼び出しで設定された \n"
7638 "concurrency level を返す。 B<pthread_getconcurrency>() が\n"
7639 "それまでに一度も呼び出されていない場合は 0 が返る。"
7640
7641 #. type: Plain text
7642 #: build/C/man3/pthread_setconcurrency.3:71
7643 msgid "B<pthread_setconcurrency>()  can fail with the following error:"
7644 msgstr "B<pthread_setconcurrency>() は以下のエラーで失敗する場合がある。"
7645
7646 #. type: Plain text
7647 #: build/C/man3/pthread_setconcurrency.3:75
7648 msgid "I<new_level> is negative."
7649 msgstr "I<new_level> が負である。"
7650
7651 #. type: Plain text
7652 #: build/C/man3/pthread_setconcurrency.3:81
7653 msgid ""
7654 "POSIX.1-2001 also documents an B<EAGAIN> error (\"the value specified by "
7655 "I<new_level> would cause a system resource to be exceeded\")."
7656 msgstr ""
7657 "POSIX.1-2001 には、エラー B<EAGAIN> も記載されている\n"
7658 "(「I<new_level> に指定された値を適用すると、システムリソースが\n"
7659 "超過してしまう」)。"
7660
7661 #. type: Plain text
7662 #: build/C/man3/pthread_setconcurrency.3:83
7663 msgid "These functions are available in glibc since version 2.1."
7664 msgstr "これらの関数は glibc バージョン 2.1 以降で利用できる。"
7665
7666 #. type: Plain text
7667 #: build/C/man3/pthread_setconcurrency.3:87
7668 msgid "The default concurrency level is 0."
7669 msgstr "デフォルトの concurrency level は 0 である。"
7670
7671 #. type: Plain text
7672 #: build/C/man3/pthread_setconcurrency.3:94
7673 msgid ""
7674 "Concurrency levels are only meaningful for M:N threading implementations, "
7675 "where at any moment a subset of a process's set of user-level threads may be "
7676 "bound to a smaller number of kernel-scheduling entities.  Setting the "
7677 "concurrency level allows the application to give the system a hint as to the "
7678 "number of kernel-scheduling entities that should be provided for efficient "
7679 "execution of the application."
7680 msgstr ""
7681 "並列処理レベルが意味を持つのは M:N スレッド実装の場合のみである。\n"
7682 "M:N スレッド実装では、ある瞬間において、あるプロセスのユーザレベルスレッ\n"
7683 "ドの集合のサブ集合が、そのサブ集合のサイズよりも少ない数のカーネルの\n"
7684 "スケジューリング実体 (kernel-scheduling entity) に結び付けられる。\n"
7685 "並列処理レベルを設定すると、そのアプリケーションの効率的な実行に必要な\n"
7686 "カーネルのスケジューリング実体の数のヒントを、アプリケーションはシステ\n"
7687 "ムに伝えることができる。"
7688
7689 #. type: Plain text
7690 #: build/C/man3/pthread_setconcurrency.3:100
7691 msgid ""
7692 "Both LinuxThreads and NPTL are 1:1 threading implementations, so setting the "
7693 "concurrency level has no meaning.  In other words, on Linux these functions "
7694 "merely exist for compatibility with other systems, and they have no effect "
7695 "on the execution of a program."
7696 msgstr ""
7697 "LinuxThreads と NPTL のどちらも 1:1 スレッド実装であり、\n"
7698 "並列処理レベルを設定しても何の意味もない。\n"
7699 "言い換えると、 Linux では、これらの関数は、\n"
7700 "他のシステムとの互換性のためだけに存在し、\n"
7701 "プログラムの実行には何の影響も与えないということである。"
7702
7703 #. type: Plain text
7704 #: build/C/man3/pthread_setconcurrency.3:103
7705 msgid "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7706 msgstr "B<pthread_attr_setscope>(3), B<pthreads>(7)"
7707
7708 #. type: TH
7709 #: build/C/man3/pthread_setname_np.3:26
7710 #, fuzzy, no-wrap
7711 #| msgid "PTHREAD_GETATTR_NP"
7712 msgid "PTHREAD_SETNAME_NP"
7713 msgstr "PTHREAD_GETATTR_NP"
7714
7715 #. type: TH
7716 #: build/C/man3/pthread_setname_np.3:26
7717 #, fuzzy, no-wrap
7718 #| msgid "2010-02-03"
7719 msgid "2013-02-04"
7720 msgstr "2010-02-03"
7721
7722 #. type: Plain text
7723 #: build/C/man3/pthread_setname_np.3:29
7724 #, fuzzy
7725 #| msgid ""
7726 #| "pthread_setaffinity_np, pthread_getaffinity_np - set/get CPU affinity of "
7727 #| "a thread"
7728 msgid "pthread_setname_np, pthread_getname_np - set/get the name of a thread"
7729 msgstr ""
7730 "pthread_setaffinity_np, pthread_getaffinity_np - スレッドの\n"
7731 "CPU affinity の設定/取得を行う"
7732
7733 #. type: Plain text
7734 #: build/C/man3/pthread_setname_np.3:36
7735 #, no-wrap
7736 msgid ""
7737 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7738 "B<#include E<lt>pthread.hE<gt>>\n"
7739 "B<int pthread_setname_np(pthread_t *>I<thread>B<, const char *>I<name>B<);>\n"
7740 "B<int pthread_getname_np(pthread_t *>I<thread>B<,>\n"
7741 "B<                       const char *>I<name>B<, size_t >I<len>B<);>\n"
7742 msgstr ""
7743
7744 #. type: Plain text
7745 #: build/C/man3/pthread_setname_np.3:55
7746 msgid ""
7747 "By default, all the threads created using B<pthread_create>()  inherit the "
7748 "program name.  The B<pthread_setname_np>()  function can be used to set a "
7749 "unique name for a thread, which can be useful for debugging multithreaded "
7750 "applications.  The thread name is a meaningful C language string, whose "
7751 "length is restricted to 16 characters, including the terminating null byte.  "
7752 "The I<thread> argument specifies the thread whose name is to be changed; "
7753 "I<name> specifies the new name."
7754 msgstr ""
7755
7756 #. type: Plain text
7757 #: build/C/man3/pthread_setname_np.3:72
7758 msgid ""
7759 "The B<pthread_getname_np>()  function can be used to retrieve the name of "
7760 "the thread.  The I<thread> argument specifies the thread whose name is to be "
7761 "retrieved.  The buffer I<name> is used to return the thread name; I<len> "
7762 "specifies the number of bytes available in I<name>.  The buffer specified by "
7763 "I<name> should be at least 16 characters in length.  The returned thread "
7764 "name in the output buffer will be null terminated."
7765 msgstr ""
7766
7767 #. type: Plain text
7768 #: build/C/man3/pthread_setname_np.3:79
7769 #, fuzzy
7770 #| msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7771 msgid ""
7772 "The B<pthread_setname_np>()  function can fail with the following error:"
7773 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7774
7775 #. type: TP
7776 #: build/C/man3/pthread_setname_np.3:79 build/C/man3/pthread_setname_np.3:88
7777 #, no-wrap
7778 msgid "B<ERANGE>"
7779 msgstr ""
7780
7781 #. type: Plain text
7782 #: build/C/man3/pthread_setname_np.3:84
7783 msgid ""
7784 "The length of the string specified pointed to by I<name> exceeds the allowed "
7785 "limit."
7786 msgstr ""
7787
7788 #. type: Plain text
7789 #: build/C/man3/pthread_setname_np.3:88
7790 #, fuzzy
7791 #| msgid "The B<pthread_setcanceltype>()  can fail with the following error:"
7792 msgid ""
7793 "The B<pthread_getname_np>()  function can fail with the following error:"
7794 msgstr "B<pthread_setcanceltype>() は以下のエラーで失敗する場合がある。"
7795
7796 #. type: Plain text
7797 #: build/C/man3/pthread_setname_np.3:95
7798 msgid ""
7799 "The buffer specified by I<name> and I<len> is too small to hold the thread "
7800 "name."
7801 msgstr ""
7802
7803 #. type: Plain text
7804 #: build/C/man3/pthread_setname_np.3:100
7805 msgid ""
7806 "If either of these functions fails to open I</proc/self/task/[tid]/comm>, "
7807 "then the call may fail with one of the errors described in B<open>(2)."
7808 msgstr ""
7809
7810 #. type: Plain text
7811 #: build/C/man3/pthread_setname_np.3:102
7812 #, fuzzy
7813 #| msgid "These functions first appeared in glibc in version 2.3.3."
7814 msgid "These functions first appeared in glibc in version 2.12."
7815 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
7816
7817 #. type: Plain text
7818 #: build/C/man3/pthread_setname_np.3:104
7819 #, fuzzy
7820 #| msgid "This function is a GNU extension."
7821 msgid "These functions are nonstandard GNU extensions."
7822 msgstr "この関数は GNU による拡張である。"
7823
7824 #. type: Plain text
7825 #: build/C/man3/pthread_setname_np.3:112
7826 msgid ""
7827 "B<pthread_setname_np>()  internally writes to the thread specific comm file "
7828 "under I</proc> filesystem: I</proc/self/task/[tid]/comm>.  "
7829 "B<pthread_getname_np>()  retrieves it from the same location."
7830 msgstr ""
7831
7832 #. type: Plain text
7833 #: build/C/man3/pthread_setname_np.3:118
7834 #, fuzzy
7835 #| msgid ""
7836 #| "The program below demonstrates the use of B<pthread_create>(), as well as "
7837 #| "a number of other functions in the pthreads API."
7838 msgid ""
7839 "The program below demonstrates the use of B<pthread_setname_np>()  and "
7840 "B<pthread_getname_np>()."
7841 msgstr ""
7842 "以下のプログラムは、 B<pthread_create>() や\n"
7843 "pthreads API の他のいろいろな関数の使用例を示している。"
7844
7845 #. type: Plain text
7846 #: build/C/man3/pthread_setname_np.3:120
7847 #, fuzzy
7848 #| msgid ""
7849 #| "In the following shell session, the main thread sends a cancellation "
7850 #| "request to the other thread:"
7851 msgid "The following shell session shows a sample run of the program:"
7852 msgstr ""
7853 "以下のシェルセッションでは、メインスレッドはもう一つのスレッドに\n"
7854 "キャンセル要求を送信する。"
7855
7856 #. type: Plain text
7857 #: build/C/man3/pthread_setname_np.3:136
7858 #, no-wrap
7859 msgid ""
7860 "$B< ./a.out>\n"
7861 "Created a thread. Default name is: a.out\n"
7862 "The thread name after setting it is THREADFOO.\n"
7863 "B<^Z>                           # Suspend the program\n"
7864 "[1]+  Stopped           ./a.out\n"
7865 "$ B<ps H -C a.out -o 'pid tid cmd comm'>\n"
7866 "  PID   TID CMD                         COMMAND\n"
7867 " 5990  5990 ./a.out                     a.out\n"
7868 " 5990  5991 ./a.out                     THREADFOO\n"
7869 "$ B<cat /proc/5990/task/5990/comm>\n"
7870 "a.out\n"
7871 "$ B<cat /proc/5990/task/5991/comm>\n"
7872 "THREADFOO\n"
7873 msgstr ""
7874
7875 #. type: Plain text
7876 #: build/C/man3/pthread_setname_np.3:148
7877 #, fuzzy, no-wrap
7878 #| msgid ""
7879 #| "#include E<lt>pthread.hE<gt>\n"
7880 #| "#include E<lt>stdio.hE<gt>\n"
7881 #| "#include E<lt>stdlib.hE<gt>\n"
7882 #| "#include E<lt>unistd.hE<gt>\n"
7883 #| "#include E<lt>signal.hE<gt>\n"
7884 #| "#include E<lt>errno.hE<gt>\n"
7885 msgid ""
7886 "#define _GNU_SOURCE\n"
7887 "#include E<lt>pthread.hE<gt>\n"
7888 "#include E<lt>stdio.hE<gt>\n"
7889 "#include E<lt>string.hE<gt>\n"
7890 "#include E<lt>unistd.hE<gt>\n"
7891 "#include E<lt>errno.hE<gt>\n"
7892 "#include E<lt>stdlib.hE<gt>\n"
7893 msgstr ""
7894 "#include E<lt>pthread.hE<gt>\n"
7895 "#include E<lt>stdio.hE<gt>\n"
7896 "#include E<lt>stdlib.hE<gt>\n"
7897 "#include E<lt>unistd.hE<gt>\n"
7898 "#include E<lt>signal.hE<gt>\n"
7899 "#include E<lt>errno.hE<gt>\n"
7900
7901 #. type: Plain text
7902 #: build/C/man3/pthread_setname_np.3:150
7903 #, no-wrap
7904 msgid "#define NAMELEN 16\n"
7905 msgstr ""
7906
7907 #. type: Plain text
7908 #: build/C/man3/pthread_setname_np.3:154
7909 #, fuzzy, no-wrap
7910 #| msgid ""
7911 #| "#define handle_error_en(en, msg) \\e\n"
7912 #| "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
7913 msgid ""
7914 "#define errExitEN(en, msg) \\e\n"
7915 "            do { errno = en; perror(msg); exit(EXIT_FAILURE); \\e\n"
7916 "        } while (0)\n"
7917 msgstr ""
7918 "#define handle_error_en(en, msg) \\e\n"
7919 "        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)\n"
7920
7921 #. type: Plain text
7922 #: build/C/man3/pthread_setname_np.3:161
7923 #, no-wrap
7924 msgid ""
7925 "static void *\n"
7926 "threadfunc(void *parm)\n"
7927 "{\n"
7928 "    sleep(5);          // allow main program to set the thread name\n"
7929 "    return NULL;\n"
7930 "}\n"
7931 msgstr ""
7932
7933 #. type: Plain text
7934 #: build/C/man3/pthread_setname_np.3:168
7935 #, fuzzy, no-wrap
7936 #| msgid ""
7937 #| "int\n"
7938 #| "main(int argc, char *argv[])\n"
7939 #| "{\n"
7940 #| "    pthread_t thr;\n"
7941 #| "    int s;\n"
7942 #| "    void *res;\n"
7943 msgid ""
7944 "int\n"
7945 "main(int argc, char **argv)\n"
7946 "{\n"
7947 "    pthread_t thread;\n"
7948 "    int rc;\n"
7949 "    char thread_name[NAMELEN];\n"
7950 msgstr ""
7951 "int\n"
7952 "main(int argc, char *argv[])\n"
7953 "{\n"
7954 "    pthread_t thr;\n"
7955 "    int s;\n"
7956 "    void *res;\n"
7957
7958 #. type: Plain text
7959 #: build/C/man3/pthread_setname_np.3:172
7960 #, fuzzy, no-wrap
7961 #| msgid ""
7962 #| "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
7963 #| "    if (s != 0)\n"
7964 #| "        handle_error_en(s, \"pthread_create\");\n"
7965 msgid ""
7966 "    rc = pthread_create(&thread, NULL, threadfunc, NULL);\n"
7967 "    if (rc != 0)\n"
7968 "        errExitEN(rc, \"pthread_create\");\n"
7969 msgstr ""
7970 "    s = pthread_create(&thr, NULL, &thread_func, NULL);\n"
7971 "    if (s != 0)\n"
7972 "        handle_error_en(s, \"pthread_create\");\n"
7973
7974 #. type: Plain text
7975 #: build/C/man3/pthread_setname_np.3:176
7976 #, fuzzy, no-wrap
7977 #| msgid ""
7978 #| "    s = pthread_getattr_np(thread, &attr);\n"
7979 #| "    if (s != 0)\n"
7980 #| "        handle_error_en(s, \"pthread_getattr_np\");\n"
7981 msgid ""
7982 "    rc = pthread_getname_np(thread, thread_name, NAMELEN);\n"
7983 "    if (rc != 0)\n"
7984 "        errExitEN(rc, \"pthread_getname_np\");\n"
7985 msgstr ""
7986 "    s = pthread_getattr_np(thread, &attr);\n"
7987 "    if (s != 0)\n"
7988 "        handle_error_en(s, \"pthread_getattr_np\");\n"
7989
7990 #. type: Plain text
7991 #: build/C/man3/pthread_setname_np.3:181
7992 #, no-wrap
7993 msgid ""
7994 "    printf(\"Created a thread. Default name is: %s\\en\", thread_name);\n"
7995 "    rc = pthread_setname_np(thread, (argc E<gt> 1) ? argv[1] : \"THREADFOO\");\n"
7996 "    if (rc != 0)\n"
7997 "        errExitEN(rc, \"pthread_setname_np\");\n"
7998 msgstr ""
7999
8000 #. type: Plain text
8001 #: build/C/man3/pthread_setname_np.3:183
8002 #, no-wrap
8003 msgid "    sleep(2);\n"
8004 msgstr ""
8005
8006 #. type: Plain text
8007 #: build/C/man3/pthread_setname_np.3:189
8008 #, no-wrap
8009 msgid ""
8010 "    rc = pthread_getname_np(thread, thread_name,\n"
8011 "                            (argc E<gt> 2) ? atoi(argv[1]) : NAMELEN);\n"
8012 "    if (rc != 0)\n"
8013 "        errExitEN(rc, \"pthread_getname_np\");\n"
8014 "    printf(\"The thread name after setting it is %s.\\en\", thread_name);\n"
8015 msgstr ""
8016
8017 #. type: Plain text
8018 #: build/C/man3/pthread_setname_np.3:193
8019 #, fuzzy, no-wrap
8020 #| msgid ""
8021 #| "    s = pthread_join(thread, NULL);\n"
8022 #| "    if (s != 0)\n"
8023 #| "        handle_error_en(s, \"pthread_join\");\n"
8024 msgid ""
8025 "    rc = pthread_join(thread, NULL);\n"
8026 "    if (rc != 0)\n"
8027 "        errExitEN(rc, \"pthread_join\");\n"
8028 msgstr ""
8029 "    s = pthread_join(thread, NULL);\n"
8030 "    if (s != 0)\n"
8031 "        handle_error_en(s, \"pthread_join\");\n"
8032
8033 #. type: Plain text
8034 #: build/C/man3/pthread_setname_np.3:197
8035 #, fuzzy, no-wrap
8036 #| msgid ""
8037 #| "    printf(\"main: exiting\\en\");\n"
8038 #| "    exit(EXIT_SUCCESS);\n"
8039 #| "}\n"
8040 msgid ""
8041 "    printf(\"Done\\en\");\n"
8042 "    exit(EXIT_SUCCESS);\n"
8043 "}\n"
8044 msgstr ""
8045 "    printf(\"main: exiting\\en\");\n"
8046 "    exit(EXIT_SUCCESS);\n"
8047 "}\n"
8048
8049 #. type: Plain text
8050 #: build/C/man3/pthread_setname_np.3:204
8051 #, fuzzy
8052 #| msgid "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
8053 msgid "B<prctl>(2), B<pthread_create>(3), B<pthreads>(7)"
8054 msgstr "B<pthread_create>(3), B<pthread_equal>(3), B<pthreads>(7)"
8055
8056 #. type: TH
8057 #: build/C/man3/pthread_setschedparam.3:26
8058 #, no-wrap
8059 msgid "PTHREAD_SETSCHEDPARAM"
8060 msgstr "PTHREAD_SETSCHEDPARAM"
8061
8062 #. type: Plain text
8063 #: build/C/man3/pthread_setschedparam.3:30
8064 msgid ""
8065 "pthread_setschedparam, pthread_getschedparam - set/get scheduling policy and "
8066 "parameters of a thread"
8067 msgstr ""
8068 "pthread_setschedparam, pthread_getschedparam - スレッドの\n"
8069 "スケジューリングポリシーとパラメータを設定/取得する"
8070
8071 #. type: Plain text
8072 #: build/C/man3/pthread_setschedparam.3:38
8073 #, no-wrap
8074 msgid ""
8075 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8076 "B<                      const struct sched_param *>I<param>B<);>\n"
8077 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8078 "B<                      struct sched_param *>I<param>B<);>\n"
8079 msgstr ""
8080 "B<pthread_setschedparam(pthread_t >I<thread>B<, int >I<policy>B<,>\n"
8081 "B<                      const struct sched_param *>I<param>B<);>\n"
8082 "B<pthread_getschedparam(pthread_t >I<thread>B<, int *>I<policy>B<,>\n"
8083 "B<                      struct sched_param *>I<param>B<);>\n"
8084
8085 #. type: Plain text
8086 #: build/C/man3/pthread_setschedparam.3:46
8087 msgid ""
8088 "The B<pthread_setschedparam>()  function sets the scheduling policy and "
8089 "parameters of the thread I<thread>."
8090 msgstr ""
8091 "B<pthread_setschedparam>() 関数は、スレッド I<thread> の\n"
8092 "スケジューリングポリシーとスケジューリングパラメータを設定する。"
8093
8094 #.  FIXME . pthread_setschedparam() places no restriction on the policy,
8095 #.  but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
8096 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7013
8097 #. type: Plain text
8098 #: build/C/man3/pthread_setschedparam.3:57
8099 msgid ""
8100 "I<policy> specifies the new scheduling policy for I<thread>.  The supported "
8101 "values for I<policy>, and their semantics, are described in "
8102 "B<sched_setscheduler>(2)."
8103 msgstr ""
8104 "I<policy> は I<thread> の新しいスケジューリングポリシーを指定する。\n"
8105 "I<policy> に指定できる値とその意味は B<sched_setscheduler>(2) で\n"
8106 "説明されている。"
8107
8108 #. type: Plain text
8109 #: build/C/man3/pthread_setschedparam.3:63
8110 msgid ""
8111 "The structure pointed to by I<param> specifies the new scheduling parameters "
8112 "for I<thread>.  Scheduling parameters are maintained in the following "
8113 "structure:"
8114 msgstr ""
8115 "I<param> が指す構造体は I<thread> の新しいスケジューリングパラメータを\n"
8116 "指定する。スケジューリングパラメータは以下の構造体で管理される。"
8117
8118 #.  FIXME . nptl/pthread_setschedparam.c has the following
8119 #.    /* If the thread should have higher priority because of some
8120 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8121 #.  Eventually (perhaps after writing the mutexattr pages), we
8122 #.  may want to add something on the topic to this page.
8123 #. type: Plain text
8124 #: build/C/man3/pthread_setschedparam.3:104
8125 msgid ""
8126 "The B<pthread_getschedparam>()  function returns the scheduling policy and "
8127 "parameters of the thread I<thread>, in the buffers pointed to by I<policy> "
8128 "and I<param>, respectively.  The returned priority value is that set by the "
8129 "most recent B<pthread_setschedparam>(), B<pthread_setschedprio>(3), or "
8130 "B<pthread_create>(3)  call that affected I<thread>.  The returned priority "
8131 "does not reflect any temporary priority adjustments as a result of calls to "
8132 "any priority inheritance or priority ceiling functions (see, for example, "
8133 "B<pthread_mutexattr_setprioceiling>(3)  and B<pthread_mutexattr_setprotocol>"
8134 "(3))."
8135 msgstr ""
8136 "B<pthread_getschedparam>() 関数は、スレッド I<thread> の\n"
8137 "スケジューリングポリシーとパラメータを、\n"
8138 "それぞれ I<policy> と I<param> が指すバッファに入れて返す。\n"
8139 "返された優先度の値は、最も最近実行した I<thread> に影響を与える\n"
8140 "B<pthread_setschedparam>(), B<pthread_setschedprio>,\n"
8141 "B<pthread_create> で設定された値となる。\n"
8142 "返された優先度は、優先度の継承や優先度の上限を設定する関数\n"
8143 "(例えば B<pthread_mutexattr_setprioceiling>(3) や\n"
8144 "B<pthread_mutexattr_setprotocol>(3) を参照) の呼び出しの結果\n"
8145 "行われる一時的な優先度の調整の影響を受けない。"
8146
8147 #. type: Plain text
8148 #: build/C/man3/pthread_setschedparam.3:112
8149 msgid ""
8150 "On success, these functions return 0; on error, they return a nonzero error "
8151 "number.  If B<pthread_setschedparam>()  fails, the scheduling policy and "
8152 "parameters of I<thread> are not changed."
8153 msgstr ""
8154 "成功すると、これらの関数は 0 を返す。\n"
8155 "エラーの場合、0 以外のエラー番号を返す。\n"
8156 "B<pthread_setschedparam>() が失敗した場合、 I<thread> の\n"
8157 "スケジューリングポリシーとパラメータは変更されない。"
8158
8159 #. type: Plain text
8160 #: build/C/man3/pthread_setschedparam.3:114
8161 msgid "Both of these functions can fail with the following error:"
8162 msgstr "これらの関数はどちらも以下のエラーで失敗する場合がある。"
8163
8164 #. type: Plain text
8165 #: build/C/man3/pthread_setschedparam.3:122
8166 msgid ""
8167 "B<pthread_setschedparam>()  may additionally fail with the following errors:"
8168 msgstr "B<pthread_setschedparam>() はさらに以下のエラーで失敗する場合がある。"
8169
8170 #. type: Plain text
8171 #: build/C/man3/pthread_setschedparam.3:129
8172 msgid ""
8173 "I<policy> is not a recognized policy, or I<param> does not make sense for "
8174 "the I<policy>."
8175 msgstr ""
8176 "I<policy> が認識できないポリシーであるか、\n"
8177 "I<param> が I<policy> では意味を持たない値である。"
8178
8179 #. type: Plain text
8180 #: build/C/man3/pthread_setschedparam.3:133
8181 msgid ""
8182 "The caller does not have appropriate privileges to set the specified "
8183 "scheduling policy and parameters."
8184 msgstr ""
8185 "呼び出し側が、指定されたスケジューリングポリシーやパラメータを設定する\n"
8186 "のに必要な特権を持たない。"
8187
8188 #.  .SH VERSIONS
8189 #.  Available since glibc 2.0
8190 #. type: Plain text
8191 #: build/C/man3/pthread_setschedparam.3:141
8192 msgid ""
8193 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8194 "policy or scheduling parameters to an unsupported value\") error for "
8195 "B<pthread_setschedparam>()."
8196 msgstr ""
8197 "POSIX.1-2001 では、 B<pthread_setschedparam>() に関して\n"
8198 "エラー B<ENOTSUP> (\"サポートされていない値をスケジューリングポリシーや\n"
8199 "パラメータに設定しようとした\") も追加で規定されている。"
8200
8201 #. type: Plain text
8202 #: build/C/man3/pthread_setschedparam.3:149
8203 msgid ""
8204 "For a description of the permissions required to, and the effect of, "
8205 "changing a thread's scheduling policy and priority, and details of the "
8206 "permitted ranges for priorities in each scheduling policy, see "
8207 "B<sched_setscheduler>(2)."
8208 msgstr ""
8209 "スレッドのスケジューリングポリシーや優先度を変更するために必要な許可や\n"
8210 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8211 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8212
8213 #. type: Plain text
8214 #: build/C/man3/pthread_setschedparam.3:156
8215 msgid ""
8216 "The program below demonstrates the use of B<pthread_setschedparam>()  and "
8217 "B<pthread_getschedparam>(), as well as the use of a number of other "
8218 "scheduling-related pthreads functions."
8219 msgstr ""
8220 "以下のプログラムは B<pthread_setschedparam>() と\n"
8221 "B<pthread_getschedparam>() やスケジューリングに関連する pthreads の\n"
8222 "他のいろいろな関数の使用例を示すものである。"
8223
8224 #. type: Plain text
8225 #: build/C/man3/pthread_setschedparam.3:172
8226 msgid ""
8227 "In the following run, the main thread sets its scheduling policy to "
8228 "B<SCHED_FIFO> with a priority of 10, and initializes a thread attributes "
8229 "object with a scheduling policy attribute of B<SCHED_RR> and a scheduling "
8230 "priority attribute of 20.  The program then sets (using "
8231 "B<pthread_attr_setinheritsched>(3))  the inherit scheduler attribute of the "
8232 "thread attributes object to B<PTHREAD_EXPLICIT_SCHED>, meaning that threads "
8233 "created using this attributes object should take their scheduling attributes "
8234 "from the thread attributes object.  The program then creates a thread using "
8235 "the thread attributes object, and that thread displays its scheduling policy "
8236 "and priority."
8237 msgstr ""
8238 "以下の実行例では、メインスレッドは、自分のスケジューリングポリシーを\n"
8239 "優先度 10 の B<SCHED_FIFO> を設定し、スレッド属性オブジェクトを\n"
8240 "スケジューリングポリシー属性 B<SCHED_RR> とスケジューリング優先度\n"
8241 "属性 20 で初期化する。\n"
8242 "次に、このプログラムは (B<pthread_attr_setinheritsched>(3) を使って) \n"
8243 "そのスレッド属性オブジェクトの inherit scheduler 属性に\n"
8244 "B<PTHREAD_EXPLICIT_SCHED> を設定する。B<PTHREAD_EXPLICIT_SCHED> は、\n"
8245 "そのスレッド属性オブジェクトを使って作成されたスレッドはスレッド属性\n"
8246 "オブジェクトからスケジューリング属性を取得して使うことを意味する。\n"
8247 "それから、このスレッド属性オブジェクトを使ってスレッドを作成し、\n"
8248 "作成したスレッドのスケジューリングポリシーと優先度を表示する。"
8249
8250 #. type: Plain text
8251 #: build/C/man3/pthread_setschedparam.3:180
8252 #, no-wrap
8253 msgid ""
8254 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8255 "Password:\n"
8256 "# B<./a.out -mf10 -ar20 -i e>\n"
8257 "Scheduler settings of main thread\n"
8258 "    policy=SCHED_FIFO, priority=10\n"
8259 msgstr ""
8260 "$ B<su>      # Need privilege to set real-time scheduling policies\n"
8261 "Password:\n"
8262 "# B<./a.out -mf10 -ar20 -i e>\n"
8263 "Scheduler settings of main thread\n"
8264 "    policy=SCHED_FIFO, priority=10\n"
8265
8266 #. type: Plain text
8267 #: build/C/man3/pthread_setschedparam.3:184
8268 #, no-wrap
8269 msgid ""
8270 "Scheduler settings in \\(aqattr\\(aq\n"
8271 "    policy=SCHED_RR, priority=20\n"
8272 "    inheritsched is EXPLICIT\n"
8273 msgstr ""
8274 "Scheduler settings in \\(aqattr\\(aq\n"
8275 "    policy=SCHED_RR, priority=20\n"
8276 "    inheritsched is EXPLICIT\n"
8277
8278 #. type: Plain text
8279 #: build/C/man3/pthread_setschedparam.3:187
8280 #, no-wrap
8281 msgid ""
8282 "Scheduler attributes of new thread\n"
8283 "    policy=SCHED_RR, priority=20\n"
8284 msgstr ""
8285 "Scheduler attributes of new thread\n"
8286 "    policy=SCHED_RR, priority=20\n"
8287
8288 #. type: Plain text
8289 #: build/C/man3/pthread_setschedparam.3:192
8290 msgid ""
8291 "In the above output, one can see that the scheduling policy and priority "
8292 "were taken from the values specified in the thread attributes object."
8293 msgstr ""
8294 "上記の出力では、スケジューリングポリシーと優先度がスレッド属性\n"
8295 "オブジェクトで指定された値から取られていることが分かる。"
8296
8297 #. type: Plain text
8298 #: build/C/man3/pthread_setschedparam.3:199
8299 msgid ""
8300 "The next run is the same as the previous, except that the inherit scheduler "
8301 "attribute is set to B<PTHREAD_INHERIT_SCHED>, meaning that threads created "
8302 "using the thread attributes object should ignore the scheduling attributes "
8303 "specified in the attributes object and instead take their scheduling "
8304 "attributes from the creating thread."
8305 msgstr ""
8306 "次の実行例は前のものと同じだが、 inherit scheduler 属性が \n"
8307 "B<PTHREAD_INHERIT_SCHED> に設定される点が異なる。\n"
8308 "B<PTHREAD_INHERIT_SCHED> は、そのスレッド属性オブジェクトを使って作成\n"
8309 "されたスレッドは、スレッド属性オブジェクトからスケジューリング属性を\n"
8310 "無視し、代わりに呼び出したスレッドからスケジューリング属性を取得する\n"
8311 "ことを意味する。"
8312
8313 #. type: Plain text
8314 #: build/C/man3/pthread_setschedparam.3:205
8315 #, no-wrap
8316 msgid ""
8317 "# B<./a.out -mf10 -ar20 -i i>\n"
8318 "Scheduler settings of main thread\n"
8319 "    policy=SCHED_FIFO, priority=10\n"
8320 msgstr ""
8321 "# B<./a.out -mf10 -ar20 -i i>\n"
8322 "Scheduler settings of main thread\n"
8323 "    policy=SCHED_FIFO, priority=10\n"
8324
8325 #. type: Plain text
8326 #: build/C/man3/pthread_setschedparam.3:209
8327 #, no-wrap
8328 msgid ""
8329 "Scheduler settings in \\(aqattr\\(aq\n"
8330 "    policy=SCHED_RR, priority=20\n"
8331 "    inheritsched is INHERIT\n"
8332 msgstr ""
8333 "Scheduler settings in \\(aqattr\\(aq\n"
8334 "    policy=SCHED_RR, priority=20\n"
8335 "    inheritsched is INHERIT\n"
8336
8337 #. type: Plain text
8338 #: build/C/man3/pthread_setschedparam.3:212
8339 #, no-wrap
8340 msgid ""
8341 "Scheduler attributes of new thread\n"
8342 "    policy=SCHED_FIFO, priority=10\n"
8343 msgstr ""
8344 "Scheduler attributes of new thread\n"
8345 "    policy=SCHED_FIFO, priority=10\n"
8346
8347 #. type: Plain text
8348 #: build/C/man3/pthread_setschedparam.3:218
8349 msgid ""
8350 "In the above output, one can see that the scheduling policy and priority "
8351 "were taken from the creating thread, rather than the thread attributes "
8352 "object."
8353 msgstr ""
8354 "上記の出力では、スケジューリングポリシーと優先度が、\n"
8355 "スレッド属性オブジェクトからではなく、\n"
8356 "スレッドを作成したスレッドから取れれていることが分かる。"
8357
8358 #. type: Plain text
8359 #: build/C/man3/pthread_setschedparam.3:224
8360 msgid ""
8361 "Note that if we had omitted the I<-i\\ i> option, the output would have been "
8362 "the same, since B<PTHREAD_INHERIT_SCHED> is the default for the inherit "
8363 "scheduler attribute."
8364 msgstr ""
8365 "なお、 I<-i\\ i> を省略した場合でも、\n"
8366 "B<PTHREAD_INHERIT_SCHED> が inherit scheduler 属性のデフォルト値なので、\n"
8367 "出力は同じになる。"
8368
8369 #. type: Plain text
8370 #: build/C/man3/pthread_setschedparam.3:228
8371 #, no-wrap
8372 msgid "/* pthreads_sched_test.c */\n"
8373 msgstr "/* pthreads_sched_test.c */\n"
8374
8375 #. type: Plain text
8376 #: build/C/man3/pthread_setschedparam.3:234
8377 #, no-wrap
8378 msgid ""
8379 "#include E<lt>pthread.hE<gt>\n"
8380 "#include E<lt>stdio.hE<gt>\n"
8381 "#include E<lt>stdlib.hE<gt>\n"
8382 "#include E<lt>unistd.hE<gt>\n"
8383 "#include E<lt>errno.hE<gt>\n"
8384 msgstr ""
8385 "#include E<lt>pthread.hE<gt>\n"
8386 "#include E<lt>stdio.hE<gt>\n"
8387 "#include E<lt>stdlib.hE<gt>\n"
8388 "#include E<lt>unistd.hE<gt>\n"
8389 "#include E<lt>errno.hE<gt>\n"
8390
8391 #. type: Plain text
8392 #: build/C/man3/pthread_setschedparam.3:243
8393 #, no-wrap
8394 msgid ""
8395 "static void\n"
8396 "usage(char *prog_name, char *msg)\n"
8397 "{\n"
8398 "    if (msg != NULL)\n"
8399 "        fputs(msg, stderr);\n"
8400 msgstr ""
8401 "static void\n"
8402 "usage(char *prog_name, char *msg)\n"
8403 "{\n"
8404 "    if (msg != NULL)\n"
8405 "        fputs(msg, stderr);\n"
8406
8407 #. type: Plain text
8408 #: build/C/man3/pthread_setschedparam.3:260
8409 #, no-wrap
8410 msgid ""
8411 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8412 "    fprintf(stderr, \"Options are:\\en\");\n"
8413 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8414 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8415 "    fpe(\"                 thread attributes object\\en\");\n"
8416 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8417 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8418 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8419 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8420 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8421 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8422 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8423 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8424 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8425 "    exit(EXIT_FAILURE);\n"
8426 "}\n"
8427 msgstr ""
8428 "    fprintf(stderr, \"Usage: %s [options]\\en\", prog_name);\n"
8429 "    fprintf(stderr, \"Options are:\\en\");\n"
8430 "#define fpe(msg) fprintf(stderr, \"\\et%s\", msg);          /* Shorter */\n"
8431 "    fpe(\"-aE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority in\\en\");\n"
8432 "    fpe(\"                 thread attributes object\\en\");\n"
8433 "    fpe(\"                 E<lt>policyE<gt> can be\\en\");\n"
8434 "    fpe(\"                     f  SCHED_FIFO\\en\");\n"
8435 "    fpe(\"                     r  SCHED_RR\\en\");\n"
8436 "    fpe(\"                     o  SCHED_OTHER\\en\");\n"
8437 "    fpe(\"-A               Use default thread attributes object\\en\");\n"
8438 "    fpe(\"-i {e|s}         Set inherit scheduler attribute to\\en\");\n"
8439 "    fpe(\"                 \\(aqexplicit\\(aq or \\(aqinherit\\(aq\\en\");\n"
8440 "    fpe(\"-mE<lt>policyE<gt>E<lt>prioE<gt> Set scheduling policy and priority on\\en\");\n"
8441 "    fpe(\"                 main thread before pthread_create() call\\en\");\n"
8442 "    exit(EXIT_FAILURE);\n"
8443 "}\n"
8444
8445 #. type: Plain text
8446 #: build/C/man3/pthread_setschedparam.3:271
8447 #, no-wrap
8448 msgid ""
8449 "static int\n"
8450 "get_policy(char p, int *policy)\n"
8451 "{\n"
8452 "    switch (p) {\n"
8453 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8454 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8455 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8456 "    default:  return 0;\n"
8457 "    }\n"
8458 "}\n"
8459 msgstr ""
8460 "static int\n"
8461 "get_policy(char p, int *policy)\n"
8462 "{\n"
8463 "    switch (p) {\n"
8464 "    case \\(aqf\\(aq: *policy = SCHED_FIFO;     return 1;\n"
8465 "    case \\(aqr\\(aq: *policy = SCHED_RR;       return 1;\n"
8466 "    case \\(aqo\\(aq: *policy = SCHED_OTHER;    return 1;\n"
8467 "    default:  return 0;\n"
8468 "    }\n"
8469 "}\n"
8470
8471 #. type: Plain text
8472 #: build/C/man3/pthread_setschedparam.3:282
8473 #, no-wrap
8474 msgid ""
8475 "static void\n"
8476 "display_sched_attr(int policy, struct sched_param *param)\n"
8477 "{\n"
8478 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8479 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8480 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8481 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8482 "            \"???\",\n"
8483 "            param-E<gt>sched_priority);\n"
8484 "}\n"
8485 msgstr ""
8486 "static void\n"
8487 "display_sched_attr(int policy, struct sched_param *param)\n"
8488 "{\n"
8489 "    printf(\"    policy=%s, priority=%d\\en\",\n"
8490 "            (policy == SCHED_FIFO)  ? \"SCHED_FIFO\" :\n"
8491 "            (policy == SCHED_RR)    ? \"SCHED_RR\" :\n"
8492 "            (policy == SCHED_OTHER) ? \"SCHED_OTHER\" :\n"
8493 "            \"???\",\n"
8494 "            param-E<gt>sched_priority);\n"
8495 "}\n"
8496
8497 #. type: Plain text
8498 #: build/C/man3/pthread_setschedparam.3:288
8499 #, no-wrap
8500 msgid ""
8501 "static void\n"
8502 "display_thread_sched_attr(char *msg)\n"
8503 "{\n"
8504 "    int policy, s;\n"
8505 "    struct sched_param param;\n"
8506 msgstr ""
8507 "static void\n"
8508 "display_thread_sched_attr(char *msg)\n"
8509 "{\n"
8510 "    int policy, s;\n"
8511 "    struct sched_param param;\n"
8512
8513 #. type: Plain text
8514 #: build/C/man3/pthread_setschedparam.3:292
8515 #, no-wrap
8516 msgid ""
8517 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8518 "    if (s != 0)\n"
8519 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8520 msgstr ""
8521 "    s = pthread_getschedparam(pthread_self(), &policy, &param);\n"
8522 "    if (s != 0)\n"
8523 "        handle_error_en(s, \"pthread_getschedparam\");\n"
8524
8525 #. type: Plain text
8526 #: build/C/man3/pthread_setschedparam.3:296
8527 #, no-wrap
8528 msgid ""
8529 "    printf(\"%s\\en\", msg);\n"
8530 "    display_sched_attr(policy, &param);\n"
8531 "}\n"
8532 msgstr ""
8533 "    printf(\"%s\\en\", msg);\n"
8534 "    display_sched_attr(policy, &param);\n"
8535 "}\n"
8536
8537 #. type: Plain text
8538 #: build/C/man3/pthread_setschedparam.3:301
8539 #, no-wrap
8540 msgid ""
8541 "static void *\n"
8542 "thread_start(void *arg)\n"
8543 "{\n"
8544 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8545 msgstr ""
8546 "static void *\n"
8547 "thread_start(void *arg)\n"
8548 "{\n"
8549 "    display_thread_sched_attr(\"Scheduler attributes of new thread\");\n"
8550
8551 #. type: Plain text
8552 #: build/C/man3/pthread_setschedparam.3:304
8553 #, no-wrap
8554 msgid ""
8555 "    return NULL;\n"
8556 "}\n"
8557 msgstr ""
8558 "    return NULL;\n"
8559 "}\n"
8560
8561 #. type: Plain text
8562 #: build/C/man3/pthread_setschedparam.3:314
8563 #, no-wrap
8564 msgid ""
8565 "int\n"
8566 "main(int argc, char *argv[])\n"
8567 "{\n"
8568 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8569 "    pthread_t thread;\n"
8570 "    pthread_attr_t attr;\n"
8571 "    pthread_attr_t *attrp;\n"
8572 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8573 "    struct sched_param param;\n"
8574 msgstr ""
8575 "int\n"
8576 "main(int argc, char *argv[])\n"
8577 "{\n"
8578 "    int s, opt, inheritsched, use_null_attrib, policy;\n"
8579 "    pthread_t thread;\n"
8580 "    pthread_attr_t attr;\n"
8581 "    pthread_attr_t *attrp;\n"
8582 "    char *attr_sched_str, *main_sched_str, *inheritsched_str;\n"
8583 "    struct sched_param param;\n"
8584
8585 #. type: Plain text
8586 #: build/C/man3/pthread_setschedparam.3:316
8587 #, no-wrap
8588 msgid "    /* Process command-line options */\n"
8589 msgstr "    /* Process command-line options */\n"
8590
8591 #. type: Plain text
8592 #: build/C/man3/pthread_setschedparam.3:321
8593 #, no-wrap
8594 msgid ""
8595 "    use_null_attrib = 0;\n"
8596 "    attr_sched_str = NULL;\n"
8597 "    main_sched_str = NULL;\n"
8598 "    inheritsched_str = NULL;\n"
8599 msgstr ""
8600 "    use_null_attrib = 0;\n"
8601 "    attr_sched_str = NULL;\n"
8602 "    main_sched_str = NULL;\n"
8603 "    inheritsched_str = NULL;\n"
8604
8605 #. type: Plain text
8606 #: build/C/man3/pthread_setschedparam.3:331
8607 #, no-wrap
8608 msgid ""
8609 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8610 "        switch (opt) {\n"
8611 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8612 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8613 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8614 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8615 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8616 "        }\n"
8617 "    }\n"
8618 msgstr ""
8619 "    while ((opt = getopt(argc, argv, \"a:Ai:m:\")) != -1) {\n"
8620 "        switch (opt) {\n"
8621 "        case \\(aqa\\(aq: attr_sched_str = optarg;      break;\n"
8622 "        case \\(aqA\\(aq: use_null_attrib = 1;          break;\n"
8623 "        case \\(aqi\\(aq: inheritsched_str = optarg;    break;\n"
8624 "        case \\(aqm\\(aq: main_sched_str = optarg;      break;\n"
8625 "        default:  usage(argv[0], \"Unrecognized option\\en\");\n"
8626 "        }\n"
8627 "    }\n"
8628
8629 #. type: Plain text
8630 #: build/C/man3/pthread_setschedparam.3:335
8631 #, no-wrap
8632 msgid ""
8633 "    if (use_null_attrib &&\n"
8634 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8635 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8636 msgstr ""
8637 "    if (use_null_attrib &&\n"
8638 "            (inheritsched_str != NULL || attr_sched_str != NULL))\n"
8639 "        usage(argv[0], \"Can\\(aqt specify -A with -i or -a\\en\");\n"
8640
8641 #. type: Plain text
8642 #: build/C/man3/pthread_setschedparam.3:338
8643 #, no-wrap
8644 msgid ""
8645 "    /* Optionally set scheduling attributes of main thread,\n"
8646 "       and display the attributes */\n"
8647 msgstr ""
8648 "    /* Optionally set scheduling attributes of main thread,\n"
8649 "       and display the attributes */\n"
8650
8651 #. type: Plain text
8652 #: build/C/man3/pthread_setschedparam.3:343
8653 #, no-wrap
8654 msgid ""
8655 "    if (main_sched_str != NULL) {\n"
8656 "        if (!get_policy(main_sched_str[0], &policy))\n"
8657 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8658 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8659 msgstr ""
8660 "    if (main_sched_str != NULL) {\n"
8661 "        if (!get_policy(main_sched_str[0], &policy))\n"
8662 "            usage(argv[0], \"Bad policy for main thread (-s)\\en\");\n"
8663 "        param.sched_priority = strtol(&main_sched_str[1], NULL, 0);\n"
8664
8665 #. type: Plain text
8666 #: build/C/man3/pthread_setschedparam.3:348
8667 #, no-wrap
8668 msgid ""
8669 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8670 "        if (s != 0)\n"
8671 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8672 "    }\n"
8673 msgstr ""
8674 "        s = pthread_setschedparam(pthread_self(), policy, &param);\n"
8675 "        if (s != 0)\n"
8676 "            handle_error_en(s, \"pthread_setschedparam\");\n"
8677 "    }\n"
8678
8679 #. type: Plain text
8680 #: build/C/man3/pthread_setschedparam.3:351
8681 #, no-wrap
8682 msgid ""
8683 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8684 "    printf(\"\\en\");\n"
8685 msgstr ""
8686 "    display_thread_sched_attr(\"Scheduler settings of main thread\");\n"
8687 "    printf(\"\\en\");\n"
8688
8689 #. type: Plain text
8690 #: build/C/man3/pthread_setschedparam.3:353
8691 #, no-wrap
8692 msgid "    /* Initialize thread attributes object according to options */\n"
8693 msgstr "    /* Initialize thread attributes object according to options */\n"
8694
8695 #. type: Plain text
8696 #: build/C/man3/pthread_setschedparam.3:362
8697 #, no-wrap
8698 msgid ""
8699 "    if (!use_null_attrib) {\n"
8700 "        s = pthread_attr_init(&attr);\n"
8701 "        if (s != 0)\n"
8702 "            handle_error_en(s, \"pthread_attr_init\");\n"
8703 "        attrp = &attr;\n"
8704 "    }\n"
8705 msgstr ""
8706 "    if (!use_null_attrib) {\n"
8707 "        s = pthread_attr_init(&attr);\n"
8708 "        if (s != 0)\n"
8709 "            handle_error_en(s, \"pthread_attr_init\");\n"
8710 "        attrp = &attr;\n"
8711 "    }\n"
8712
8713 #. type: Plain text
8714 #: build/C/man3/pthread_setschedparam.3:370
8715 #, no-wrap
8716 msgid ""
8717 "    if (inheritsched_str != NULL) {\n"
8718 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8719 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8720 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8721 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8722 "        else\n"
8723 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8724 msgstr ""
8725 "    if (inheritsched_str != NULL) {\n"
8726 "        if (inheritsched_str[0] == \\(aqe\\(aq)\n"
8727 "            inheritsched = PTHREAD_EXPLICIT_SCHED;\n"
8728 "        else if (inheritsched_str[0] == \\(aqi\\(aq)\n"
8729 "            inheritsched = PTHREAD_INHERIT_SCHED;\n"
8730 "        else\n"
8731 "            usage(argv[0], \"Value for -i must be \\(aqe\\(aq or \\(aqi\\(aq\\en\");\n"
8732
8733 #. type: Plain text
8734 #: build/C/man3/pthread_setschedparam.3:375
8735 #, no-wrap
8736 msgid ""
8737 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8738 "        if (s != 0)\n"
8739 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8740 "    }\n"
8741 msgstr ""
8742 "        s = pthread_attr_setinheritsched(&attr, inheritsched);\n"
8743 "        if (s != 0)\n"
8744 "            handle_error_en(s, \"pthread_attr_setinheritsched\");\n"
8745 "    }\n"
8746
8747 #. type: Plain text
8748 #: build/C/man3/pthread_setschedparam.3:381
8749 #, no-wrap
8750 msgid ""
8751 "    if (attr_sched_str != NULL) {\n"
8752 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8753 "            usage(argv[0],\n"
8754 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8755 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8756 msgstr ""
8757 "    if (attr_sched_str != NULL) {\n"
8758 "        if (!get_policy(attr_sched_str[0], &policy))\n"
8759 "            usage(argv[0],\n"
8760 "                    \"Bad policy for \\(aqattr\\(aq (-a)\\en\");\n"
8761 "        param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);\n"
8762
8763 #. type: Plain text
8764 #: build/C/man3/pthread_setschedparam.3:389
8765 #, no-wrap
8766 msgid ""
8767 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8768 "        if (s != 0)\n"
8769 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8770 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8771 "        if (s != 0)\n"
8772 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8773 "    }\n"
8774 msgstr ""
8775 "        s = pthread_attr_setschedpolicy(&attr, policy);\n"
8776 "        if (s != 0)\n"
8777 "            handle_error_en(s, \"pthread_attr_setschedpolicy\");\n"
8778 "        s = pthread_attr_setschedparam(&attr, &param);\n"
8779 "        if (s != 0)\n"
8780 "            handle_error_en(s, \"pthread_attr_setschedparam\");\n"
8781 "    }\n"
8782
8783 #. type: Plain text
8784 #: build/C/man3/pthread_setschedparam.3:392
8785 #, no-wrap
8786 msgid ""
8787 "    /* If we initialized a thread attributes object, display\n"
8788 "       the scheduling attributes that were set in the object */\n"
8789 msgstr ""
8790 "    /* If we initialized a thread attributes object, display\n"
8791 "       the scheduling attributes that were set in the object */\n"
8792
8793 #. type: Plain text
8794 #: build/C/man3/pthread_setschedparam.3:400
8795 #, no-wrap
8796 msgid ""
8797 "    if (attrp != NULL) {\n"
8798 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8799 "        if (s != 0)\n"
8800 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8801 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8802 "        if (s != 0)\n"
8803 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8804 msgstr ""
8805 "    if (attrp != NULL) {\n"
8806 "        s = pthread_attr_getschedparam(&attr, &param);\n"
8807 "        if (s != 0)\n"
8808 "            handle_error_en(s, \"pthread_attr_getschedparam\");\n"
8809 "        s = pthread_attr_getschedpolicy(&attr, &policy);\n"
8810 "        if (s != 0)\n"
8811 "            handle_error_en(s, \"pthread_attr_getschedpolicy\");\n"
8812
8813 #. type: Plain text
8814 #: build/C/man3/pthread_setschedparam.3:403
8815 #, no-wrap
8816 msgid ""
8817 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8818 "        display_sched_attr(policy, &param);\n"
8819 msgstr ""
8820 "        printf(\"Scheduler settings in \\(aqattr\\(aq\\en\");\n"
8821 "        display_sched_attr(policy, &param);\n"
8822
8823 #. type: Plain text
8824 #: build/C/man3/pthread_setschedparam.3:411
8825 #, no-wrap
8826 msgid ""
8827 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8828 "        printf(\"    inheritsched is %s\\en\",\n"
8829 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8830 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8831 "                \"???\");\n"
8832 "        printf(\"\\en\");\n"
8833 "    }\n"
8834 msgstr ""
8835 "        s = pthread_attr_getinheritsched(&attr, &inheritsched);\n"
8836 "        printf(\"    inheritsched is %s\\en\",\n"
8837 "                (inheritsched == PTHREAD_INHERIT_SCHED)  ? \"INHERIT\" :\n"
8838 "                (inheritsched == PTHREAD_EXPLICIT_SCHED) ? \"EXPLICIT\" :\n"
8839 "                \"???\");\n"
8840 "        printf(\"\\en\");\n"
8841 "    }\n"
8842
8843 #. type: Plain text
8844 #: build/C/man3/pthread_setschedparam.3:413
8845 #, no-wrap
8846 msgid "    /* Create a thread that will display its scheduling attributes */\n"
8847 msgstr "    /* Create a thread that will display its scheduling attributes */\n"
8848
8849 #. type: Plain text
8850 #: build/C/man3/pthread_setschedparam.3:417
8851 #, no-wrap
8852 msgid ""
8853 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8854 "    if (s != 0)\n"
8855 "        handle_error_en(s, \"pthread_create\");\n"
8856 msgstr ""
8857 "    s = pthread_create(&thread, attrp, &thread_start, NULL);\n"
8858 "    if (s != 0)\n"
8859 "        handle_error_en(s, \"pthread_create\");\n"
8860
8861 #. type: Plain text
8862 #: build/C/man3/pthread_setschedparam.3:419
8863 #, no-wrap
8864 msgid "    /* Destroy unneeded thread attributes object */\n"
8865 msgstr "    /* Destroy unneeded thread attributes object */\n"
8866
8867 #. type: Plain text
8868 #: build/C/man3/pthread_setschedparam.3:427
8869 #, no-wrap
8870 msgid ""
8871 "    s = pthread_join(thread, NULL);\n"
8872 "    if (s != 0)\n"
8873 "        handle_error_en(s, \"pthread_join\");\n"
8874 msgstr ""
8875 "    s = pthread_join(thread, NULL);\n"
8876 "    if (s != 0)\n"
8877 "        handle_error_en(s, \"pthread_join\");\n"
8878
8879 #. type: Plain text
8880 #: build/C/man3/pthread_setschedparam.3:445
8881 msgid ""
8882 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8883 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8884 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8885 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8886 "B<pthreads>(7)"
8887 msgstr ""
8888 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8889 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8890 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8891 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedprio>(3), "
8892 "B<pthreads>(7)"
8893
8894 #. type: TH
8895 #: build/C/man3/pthread_setschedprio.3:26
8896 #, no-wrap
8897 msgid "PTHREAD_SETSCHEDPRIO"
8898 msgstr "PTHREAD_SETSCHEDPRIO"
8899
8900 #. type: TH
8901 #: build/C/man3/pthread_setschedprio.3:26
8902 #, no-wrap
8903 msgid "2008-11-06"
8904 msgstr "2008-11-06"
8905
8906 #. type: Plain text
8907 #: build/C/man3/pthread_setschedprio.3:29
8908 msgid "pthread_setschedprio - set scheduling priority of a thread"
8909 msgstr "pthread_setschedprio - スレッドのスケジューリング優先度を設定する"
8910
8911 #. type: Plain text
8912 #: build/C/man3/pthread_setschedprio.3:34
8913 #, no-wrap
8914 msgid "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8915 msgstr "B<pthread_setschedprio(pthread_t >I<thread>B<, int >I<prio>B<);>\n"
8916
8917 #.  FIXME . nptl/pthread_setschedprio.c has the following
8918 #.    /* If the thread should have higher priority because of some
8919 #.       PTHREAD_PRIO_PROTECT mutexes it holds, adjust the priority. */
8920 #.  Eventually (perhaps after writing the mutexattr pages), we
8921 #.  may want to add something on the topic to this page.
8922 #.  nptl/pthread_setschedparam.c has a similar case.
8923 #. type: Plain text
8924 #: build/C/man3/pthread_setschedprio.3:53
8925 msgid ""
8926 "The B<pthread_setschedprio>()  function sets the scheduling priority of the "
8927 "thread I<thread> to the value specified in I<prio>.  (By contrast "
8928 "B<pthread_setschedparam>(3)  changes both the scheduling policy and priority "
8929 "of a thread.)"
8930 msgstr ""
8931 "B<pthread_setschedprio>() 関数は、スレッド I<thread> のスケジューリング\n"
8932 "優先度に I<prio> で指定された値を設定する\n"
8933 "(一方、B<pthread_setschedparam>(3) はスレッドのスケジューリングポリシー\n"
8934 "と優先度の両方を変更する)。"
8935
8936 #. type: Plain text
8937 #: build/C/man3/pthread_setschedprio.3:61
8938 msgid ""
8939 "On success, this function returns 0; on error, it returns a nonzero error "
8940 "number.  If B<pthread_setschedprio>()  fails, the scheduling priority of "
8941 "I<thread> is not changed."
8942 msgstr ""
8943 "成功すると、この関数は 0 を返す。\n"
8944 "エラーの場合、0 以外のエラー番号を返す。\n"
8945 "B<pthread_setschedprio>() が失敗した場合、 I<thread> の\n"
8946 "スケジューリング優先度は変更されない。"
8947
8948 #. type: Plain text
8949 #: build/C/man3/pthread_setschedprio.3:66
8950 msgid "I<prio> is not valid for the scheduling policy of the specified thread."
8951 msgstr ""
8952 "指定されたスレッドのスケジューリングポリシーでは、 I<prio> は無効である。"
8953
8954 #. type: Plain text
8955 #: build/C/man3/pthread_setschedprio.3:70
8956 msgid ""
8957 "The caller does not have appropriate privileges to set the specified "
8958 "priority."
8959 msgstr "呼び出し側が、指定された優先度を設定するのに必要な特権を持っていない。"
8960
8961 #. type: Plain text
8962 #: build/C/man3/pthread_setschedprio.3:81
8963 msgid ""
8964 "POSIX.1-2001 also documents an B<ENOTSUP> (\"attempt was made to set the "
8965 "priority to an unsupported value\") error for B<pthread_setschedparam>(3)."
8966 msgstr ""
8967 "POSIX.1-2001 では、 B<pthread_setschedprio>() に関して\n"
8968 "エラー B<ENOTSUP> (\"サポートされていない値を優先度\n"
8969 "に設定しようとした\") も追加で規定されている。"
8970
8971 #. type: Plain text
8972 #: build/C/man3/pthread_setschedprio.3:83
8973 msgid "This function is available in glibc since version 2.3.4."
8974 msgstr "この関数は glibc バージョン 2.3.4 以降で利用できる。"
8975
8976 #. type: Plain text
8977 #: build/C/man3/pthread_setschedprio.3:91
8978 msgid ""
8979 "For a description of the permissions required to, and the effect of, "
8980 "changing a thread's scheduling priority, and details of the permitted ranges "
8981 "for priorities in each scheduling policy, see B<sched_setscheduler>(2)."
8982 msgstr ""
8983 "スレッドのスケジューリング優先度を変更するために必要な許可や\n"
8984 "変更した場合の影響、および各スケジューリングポリシーで認められる優先度\n"
8985 "の範囲の詳細については、 B<sched_setscheduler>(2) を参照。"
8986
8987 #. type: Plain text
8988 #: build/C/man3/pthread_setschedprio.3:105
8989 msgid ""
8990 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8991 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8992 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8993 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
8994 "B<pthreads>(7)"
8995 msgstr ""
8996 "B<getrlimit>(2), B<sched_get_priority_min>(2), B<sched_setscheduler>(2), "
8997 "B<pthread_attr_init>(3), B<pthread_attr_setinheritsched>(3), "
8998 "B<pthread_attr_setschedparam>(3), B<pthread_attr_setschedpolicy>(3), "
8999 "B<pthread_create>(3), B<pthread_self>(3), B<pthread_setschedparam>(3), "
9000 "B<pthreads>(7)"
9001
9002 #. type: TH
9003 #: build/C/man3/pthread_sigmask.3:26
9004 #, no-wrap
9005 msgid "PTHREAD_SIGMASK"
9006 msgstr "PTHREAD_SIGMASK"
9007
9008 #. type: Plain text
9009 #: build/C/man3/pthread_sigmask.3:29
9010 msgid "pthread_sigmask - examine and change mask of blocked signals"
9011 msgstr "pthread_sigmask - 禁止するシグナルマスクの確認と変更を行う"
9012
9013 #. type: Plain text
9014 #: build/C/man3/pthread_sigmask.3:35
9015 #, no-wrap
9016 msgid "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9017 msgstr "B<int pthread_sigmask(int >I<how>B<, const sigset_t *>I<set>B<, sigset_t *>I<oldset>B<);>\n"
9018
9019 #. type: Plain text
9020 #: build/C/man3/pthread_sigmask.3:46
9021 msgid ""
9022 "The B<pthread_sigmask>()  function is just like B<sigprocmask>(2), with the "
9023 "difference that its use in multithreaded programs is explicitly specified by "
9024 "POSIX.1-2001.  Other differences are noted in this page."
9025 msgstr ""
9026 "B<pthread_sigmask>() 関数は B<sigprocmask>(2) と全く同様だが、\n"
9027 "マルチスレッドプログラムでの利用が POSIX.1-2001 で明示的に規定されて\n"
9028 "いる点が異なる。他の違いはこのマニュアルページで説明する。"
9029
9030 #. type: Plain text
9031 #: build/C/man3/pthread_sigmask.3:49
9032 msgid ""
9033 "For a description of the arguments and operation of this function, see "
9034 "B<sigprocmask>(2)."
9035 msgstr "この関数の引き数と動作の説明は B<sigprocmask>(2) を参照。"
9036
9037 #. type: Plain text
9038 #: build/C/man3/pthread_sigmask.3:54
9039 msgid ""
9040 "On success, B<pthread_sigmask>()  returns 0; on error, it returns an error "
9041 "number."
9042 msgstr ""
9043 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9044 "エラーの場合、エラー番号を返す。"
9045
9046 #. type: Plain text
9047 #: build/C/man3/pthread_sigmask.3:57
9048 msgid "See B<sigprocmask>(2)."
9049 msgstr "B<sigprocmask>(2) を参照。"
9050
9051 #. type: Plain text
9052 #: build/C/man3/pthread_sigmask.3:61
9053 msgid "A new thread inherits a copy of its creator's signal mask."
9054 msgstr ""
9055 "新しいスレッドは、スレッドを作成したスレッドのシグナルマスクのコピーを\n"
9056 "継承する。"
9057
9058 #. type: Plain text
9059 #: build/C/man3/pthread_sigmask.3:66
9060 msgid ""
9061 "The program below blocks some signals in the main thread, and then creates a "
9062 "dedicated thread to fetch those signals via B<sigwait>(3).  The following "
9063 "shell session demonstrates its use:"
9064 msgstr ""
9065 "以下のプログラムは、メインスレッドでシグナルのいくつかを禁止 (block)\n"
9066 "するように設定を行い、 B<sigwait>(3) 経由でそれらのシグナルを集める\n"
9067 "専用のスレッドを作成する。\n"
9068 "下記のシェルのセッションはその利用例を示したものである。"
9069
9070 #. type: Plain text
9071 #: build/C/man3/pthread_sigmask.3:77
9072 #, no-wrap
9073 msgid ""
9074 "$B< ./a.out &>\n"
9075 "[1] 5423\n"
9076 "$B< kill -QUIT %1>\n"
9077 "Signal handling thread got signal 3\n"
9078 "$B< kill -USR1 %1>\n"
9079 "Signal handling thread got signal 10\n"
9080 "$B< kill -TERM %1>\n"
9081 "[1]+  Terminated              ./a.out\n"
9082 msgstr ""
9083 "$B< ./a.out &>\n"
9084 "[1] 5423\n"
9085 "$B< kill -QUIT %1>\n"
9086 "Signal handling thread got signal 3\n"
9087 "$B< kill -USR1 %1>\n"
9088 "Signal handling thread got signal 10\n"
9089 "$B< kill -TERM %1>\n"
9090 "[1]+  Terminated              ./a.out\n"
9091
9092 #. type: Plain text
9093 #: build/C/man3/pthread_sigmask.3:88
9094 #, no-wrap
9095 msgid ""
9096 "#include E<lt>pthread.hE<gt>\n"
9097 "#include E<lt>stdio.hE<gt>\n"
9098 "#include E<lt>stdlib.hE<gt>\n"
9099 "#include E<lt>unistd.hE<gt>\n"
9100 "#include E<lt>signal.hE<gt>\n"
9101 "#include E<lt>errno.hE<gt>\n"
9102 msgstr ""
9103 "#include E<lt>pthread.hE<gt>\n"
9104 "#include E<lt>stdio.hE<gt>\n"
9105 "#include E<lt>stdlib.hE<gt>\n"
9106 "#include E<lt>unistd.hE<gt>\n"
9107 "#include E<lt>signal.hE<gt>\n"
9108 "#include E<lt>errno.hE<gt>\n"
9109
9110 #. type: Plain text
9111 #: build/C/man3/pthread_sigmask.3:90
9112 #, no-wrap
9113 msgid "/* Simple error handling functions */\n"
9114 msgstr "/* Simple error handling functions */\n"
9115
9116 #. type: Plain text
9117 #: build/C/man3/pthread_sigmask.3:99
9118 #, fuzzy, no-wrap
9119 #| msgid ""
9120 #| "static void *\n"
9121 #| "sig_thread(void *arg)\n"
9122 #| "{\n"
9123 #| "    sigset_t *set = (sigset_t *) arg;\n"
9124 #| "    int s, sig;\n"
9125 msgid ""
9126 "static void *\n"
9127 "sig_thread(void *arg)\n"
9128 "{\n"
9129 "    sigset_t *set = arg;\n"
9130 "    int s, sig;\n"
9131 msgstr ""
9132 "static void *\n"
9133 "sig_thread(void *arg)\n"
9134 "{\n"
9135 "    sigset_t *set = (sigset_t *) arg;\n"
9136 "    int s, sig;\n"
9137
9138 #. type: Plain text
9139 #: build/C/man3/pthread_sigmask.3:107
9140 #, no-wrap
9141 msgid ""
9142 "    for (;;) {\n"
9143 "        s = sigwait(set, &sig);\n"
9144 "        if (s != 0)\n"
9145 "            handle_error_en(s, \"sigwait\");\n"
9146 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9147 "    }\n"
9148 "}\n"
9149 msgstr ""
9150 "    for (;;) {\n"
9151 "        s = sigwait(set, &sig);\n"
9152 "        if (s != 0)\n"
9153 "            handle_error_en(s, \"sigwait\");\n"
9154 "        printf(\"Signal handling thread got signal %d\\en\", sig);\n"
9155 "    }\n"
9156 "}\n"
9157
9158 #. type: Plain text
9159 #: build/C/man3/pthread_sigmask.3:114
9160 #, no-wrap
9161 msgid ""
9162 "int\n"
9163 "main(int argc, char *argv[])\n"
9164 "{\n"
9165 "    pthread_t thread;\n"
9166 "    sigset_t set;\n"
9167 "    int s;\n"
9168 msgstr ""
9169 "int\n"
9170 "main(int argc, char *argv[])\n"
9171 "{\n"
9172 "    pthread_t thread;\n"
9173 "    sigset_t set;\n"
9174 "    int s;\n"
9175
9176 #. type: Plain text
9177 #: build/C/man3/pthread_sigmask.3:117
9178 #, no-wrap
9179 msgid ""
9180 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9181 "       will inherit a copy of the signal mask. */\n"
9182 msgstr ""
9183 "    /* Block SIGQUIT and SIGUSR1; other threads created by main()\n"
9184 "       will inherit a copy of the signal mask. */\n"
9185
9186 #. type: Plain text
9187 #: build/C/man3/pthread_sigmask.3:124
9188 #, no-wrap
9189 msgid ""
9190 "    sigemptyset(&set);\n"
9191 "    sigaddset(&set, SIGQUIT);\n"
9192 "    sigaddset(&set, SIGUSR1);\n"
9193 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9194 "    if (s != 0)\n"
9195 "        handle_error_en(s, \"pthread_sigmask\");\n"
9196 msgstr ""
9197 "    sigemptyset(&set);\n"
9198 "    sigaddset(&set, SIGQUIT);\n"
9199 "    sigaddset(&set, SIGUSR1);\n"
9200 "    s = pthread_sigmask(SIG_BLOCK, &set, NULL);\n"
9201 "    if (s != 0)\n"
9202 "        handle_error_en(s, \"pthread_sigmask\");\n"
9203
9204 #. type: Plain text
9205 #: build/C/man3/pthread_sigmask.3:128
9206 #, no-wrap
9207 msgid ""
9208 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9209 "    if (s != 0)\n"
9210 "        handle_error_en(s, \"pthread_create\");\n"
9211 msgstr ""
9212 "    s = pthread_create(&thread, NULL, &sig_thread, (void *) &set);\n"
9213 "    if (s != 0)\n"
9214 "        handle_error_en(s, \"pthread_create\");\n"
9215
9216 #. type: Plain text
9217 #: build/C/man3/pthread_sigmask.3:131
9218 #, no-wrap
9219 msgid ""
9220 "    /* Main thread carries on to create other threads and/or do\n"
9221 "       other work */\n"
9222 msgstr ""
9223 "    /* Main thread carries on to create other threads and/or do\n"
9224 "       other work */\n"
9225
9226 #. type: Plain text
9227 #: build/C/man3/pthread_sigmask.3:134
9228 #, no-wrap
9229 msgid ""
9230 "    pause();            /* Dummy pause so we can test program */\n"
9231 "}\n"
9232 msgstr ""
9233 "    pause();            /* Dummy pause so we can test program */\n"
9234 "}\n"
9235
9236 #. type: Plain text
9237 #: build/C/man3/pthread_sigmask.3:144
9238 #, fuzzy
9239 #| msgid ""
9240 #| "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2)  B<pthread_create>"
9241 #| "(3), B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9242 msgid ""
9243 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2), B<pthread_create>(3), "
9244 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9245 msgstr ""
9246 "B<sigaction>(2), B<sigpending>(2), B<sigprocmask>(2)  B<pthread_create>(3), "
9247 "B<pthread_kill>(3), B<sigsetops>(3), B<pthreads>(7), B<signal>(7)"
9248
9249 #. type: TH
9250 #: build/C/man3/pthread_sigqueue.3:25
9251 #, no-wrap
9252 msgid "PTHREAD_SIGQUEUE"
9253 msgstr "PTHREAD_SIGQUEUE"
9254
9255 #. type: Plain text
9256 #: build/C/man3/pthread_sigqueue.3:28
9257 msgid "pthread_sigqueue - queue a signal and data to a thread"
9258 msgstr "pthread_sigqueue - スレッドに対するシグナルとデータをキューに入れる"
9259
9260 #. type: Plain text
9261 #: build/C/man3/pthread_sigqueue.3:34
9262 #, no-wrap
9263 msgid ""
9264 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9265 "B<                     const union sigval >I<value>B<);>\n"
9266 msgstr ""
9267 "B<int pthread_sigqueue(pthread_t *>I<thread>B<, int >I<sig>B<,>\n"
9268 "B<                     const union sigval >I<value>B<);>\n"
9269
9270 #. type: Plain text
9271 #: build/C/man3/pthread_sigqueue.3:45
9272 msgid "B<pthread_sigqueue>(): _GNU_SOURCE"
9273 msgstr "B<pthread_sigqueue>(): _GNU_SOURCE"
9274
9275 #. type: Plain text
9276 #: build/C/man3/pthread_sigqueue.3:53
9277 #, fuzzy
9278 #| msgid ""
9279 #| "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9280 #| "(3), but, rather than sending a signal to another process, it sends a "
9281 #| "signal to another thread in the same process as the calling thread."
9282 msgid ""
9283 "The B<pthread_sigqueue>()  function performs a similar task to B<sigqueue>"
9284 "(3), but, rather than sending a signal to a process, it sends a signal to a "
9285 "thread in the same process as the calling thread."
9286 msgstr ""
9287 "B<pthread_sigqueue>() 関数は B<sigqueue>(3) と同様の処理を実行するが、\n"
9288 "別のプロセスにシグナルを送信するのではなく、呼び出したスレッドと\n"
9289 "同じプロセス内の他のスレッドにシグナルを送信する。"
9290
9291 #. type: Plain text
9292 #: build/C/man3/pthread_sigqueue.3:65
9293 #, fuzzy
9294 #| msgid ""
9295 #| "The I<thread> argument is the ID of another thread in the same process as "
9296 #| "the caller.  The I<sig> argument specifies the signal to be sent.  The "
9297 #| "I<value> argument specifies data to accompany the signal; see B<sigqueue>"
9298 #| "(3)  for details."
9299 msgid ""
9300 "The I<thread> argument is the ID of a thread in the same process as the "
9301 "caller.  The I<sig> argument specifies the signal to be sent.  The I<value> "
9302 "argument specifies data to accompany the signal; see B<sigqueue>(3)  for "
9303 "details."
9304 msgstr ""
9305 "I<thread> 引き数は、呼び出し側と同じプロセスの別のスレッドの ID である。\n"
9306 "I<sig> 引き数は送信するシグナルを指定する。\n"
9307 "I<value> 引き数はシグナルと一緒に渡すデータを指定する。\n"
9308 "詳細は B<sigqueue>(3) を参照。"
9309
9310 #. type: Plain text
9311 #: build/C/man3/pthread_sigqueue.3:70
9312 msgid ""
9313 "On success, B<pthread_sigqueue>()  returns 0; on error, it returns an error "
9314 "number."
9315 msgstr ""
9316 "成功すると、 B<pthread_sigmask>() は 0 を返す。\n"
9317 "エラーの場合、エラー番号を返す。"
9318
9319 #. type: Plain text
9320 #: build/C/man3/pthread_sigqueue.3:77
9321 msgid ""
9322 "The limit of signals which may be queued has been reached.  (See B<signal>"
9323 "(7)  for further information.)"
9324 msgstr ""
9325 "キューに入れられるシグナル数が上限に達していた\n"
9326 "(詳しい情報は (B<signal>(7) を参照)。"
9327
9328 #. type: Plain text
9329 #: build/C/man3/pthread_sigqueue.3:81
9330 msgid "I<sig> was invalid."
9331 msgstr "I<sig> が無効であった。"
9332
9333 #. type: TP
9334 #: build/C/man3/pthread_sigqueue.3:81
9335 #, no-wrap
9336 msgid "B<ENOSYS>"
9337 msgstr "B<ENOSYS>"
9338
9339 #. type: Plain text
9340 #: build/C/man3/pthread_sigqueue.3:85
9341 msgid "B<pthread_sigqueue>()  is not supported on this system."
9342 msgstr "B<pthread_sigqueue>() がこのシステムではサポートされていない。"
9343
9344 #. type: Plain text
9345 #: build/C/man3/pthread_sigqueue.3:89
9346 msgid "I<thread> is not valid."
9347 msgstr "I<thread> が無効である。"
9348
9349 #. type: Plain text
9350 #: build/C/man3/pthread_sigqueue.3:93
9351 msgid "The B<pthread_sigqueue>()  function first appeared in glibc 2.11."
9352 msgstr "B<pthread_sigqueue>() 関数は glibc 2.11 で初めて登場した。"
9353
9354 #. type: Plain text
9355 #: build/C/man3/pthread_sigqueue.3:95
9356 msgid "This function is a GNU extension."
9357 msgstr "この関数は GNU による拡張である。"
9358
9359 #. type: Plain text
9360 #: build/C/man3/pthread_sigqueue.3:103
9361 msgid ""
9362 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), B<sigqueue>"
9363 "(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9364 msgstr ""
9365 "B<rt_tgsigqueueinfo>(2), B<sigaction>(2), B<pthread_sigmask>(3), \n"
9366 "B<sigqueue>(3), B<sigwait>(3), B<pthreads>(7), B<signal>(7)"
9367
9368 #. type: TH
9369 #: build/C/man3/pthread_testcancel.3:26
9370 #, no-wrap
9371 msgid "PTHREAD_TESTCANCEL"
9372 msgstr "PTHREAD_TESTCANCEL"
9373
9374 #. type: TH
9375 #: build/C/man3/pthread_testcancel.3:26
9376 #, no-wrap
9377 msgid "2012-04-14"
9378 msgstr "2012-04-14"
9379
9380 #. type: Plain text
9381 #: build/C/man3/pthread_testcancel.3:29
9382 msgid ""
9383 "pthread_testcancel - request delivery of any pending cancellation request"
9384 msgstr "pthread_testcancel - 処理待ちの取り消し要求の配送を要求する"
9385
9386 #. type: Plain text
9387 #: build/C/man3/pthread_testcancel.3:34
9388 #, no-wrap
9389 msgid "B<void pthread_testcancel(void);>\n"
9390 msgstr "B<void pthread_testcancel(void);>\n"
9391
9392 #. type: Plain text
9393 #: build/C/man3/pthread_testcancel.3:43
9394 msgid ""
9395 "Calling B<pthread_testcancel>()  creates a cancellation point within the "
9396 "calling thread, so that a thread that is otherwise executing code that "
9397 "contains no cancellation points will respond to a cancellation request."
9398 msgstr ""
9399 "B<pthread_testcancel>() を呼び出すと、呼び出したスレッド内に取り消し\n"
9400 "ポイント (cancellation point) が作成される。\n"
9401 "これにより、これ以外には取り消しポイントを含まないコードを実行して\n"
9402 "いるスレッドが取り消し要求に対応することができるようになる。"
9403
9404 #. type: Plain text
9405 #: build/C/man3/pthread_testcancel.3:50
9406 #, fuzzy
9407 #| msgid ""
9408 #| "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9409 #| "cancellation request is pending, then a call to B<pthread_testcancel>(3)  "
9410 #| "has no effect."
9411 msgid ""
9412 "If cancelability is disabled (using B<pthread_setcancelstate>(3)), or no "
9413 "cancellation request is pending, then a call to B<pthread_testcancel>()  has "
9414 "no effect."
9415 msgstr ""
9416 "(B<pthread_setcancelstate>(3) を使って) キャンセルが無効になっている\n"
9417 "場合や処理待ちの取り消し要求がない場合は、B<pthread_testcancel>(3) を\n"
9418 "呼び出しても何の影響もない。"
9419
9420 #. type: Plain text
9421 #: build/C/man3/pthread_testcancel.3:54
9422 msgid ""
9423 "This function does not return a value.  If the calling thread is canceled as "
9424 "a consequence of a call to this function, then the function does not return."
9425 msgstr ""
9426 "この関数は値を返さない。この関数の呼び出しの結果、呼び出したスレッドが\n"
9427 "キャンセルされた場合、この関数が返ることはない。"
9428
9429 #. type: Plain text
9430 #: build/C/man3/pthread_testcancel.3:63
9431 msgid "See B<pthread_cleanup_push>(3)."
9432 msgstr "B<pthread_cleanup_push>(3) を参照。"
9433
9434 #. type: Plain text
9435 #: build/C/man3/pthread_testcancel.3:68
9436 msgid ""
9437 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9438 "(3), B<pthreads>(7)"
9439 msgstr ""
9440 "B<pthread_cancel>(3), B<pthread_cleanup_push>(3), B<pthread_setcancelstate>"
9441 "(3), B<pthreads>(7)"
9442
9443 #. type: TH
9444 #: build/C/man3/pthread_tryjoin_np.3:26
9445 #, no-wrap
9446 msgid "PTHREAD_TRYJOIN_NP"
9447 msgstr "PTHREAD_TRYJOIN_NP"
9448
9449 #. type: Plain text
9450 #: build/C/man3/pthread_tryjoin_np.3:30
9451 msgid ""
9452 "pthread_tryjoin_np, pthread_timedjoin_np - try to join with a terminated "
9453 "thread"
9454 msgstr ""
9455 "pthread_tryjoin_np, pthread_timedjoin_np - 終了したスレッドの join を\n"
9456 "試みる"
9457
9458 #. type: Plain text
9459 #: build/C/man3/pthread_tryjoin_np.3:36
9460 #, no-wrap
9461 msgid "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9462 msgstr "B<int pthread_tryjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<);>\n"
9463
9464 #. type: Plain text
9465 #: build/C/man3/pthread_tryjoin_np.3:39
9466 #, no-wrap
9467 msgid ""
9468 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9469 "B<                         const struct timespec *>I<abstime>B<);>\n"
9470 msgstr ""
9471 "B<int pthread_timedjoin_np(pthread_t >I<thread>B<, void **>I<retval>B<,>\n"
9472 "B<                         const struct timespec *>I<abstime>B<);>\n"
9473
9474 #. type: Plain text
9475 #: build/C/man3/pthread_tryjoin_np.3:46
9476 msgid ""
9477 "These functions operate in the same way as B<pthread_join>(3), except for "
9478 "the differences described on this page."
9479 msgstr ""
9480 "これらの関数は B<pthread_join>(3) と同じように動作するが、\n"
9481 "このページで説明する違いがある。"
9482
9483 #. type: Plain text
9484 #: build/C/man3/pthread_tryjoin_np.3:58
9485 msgid ""
9486 "The B<pthread_tryjoin_np>()  function performs a nonblocking join with the "
9487 "thread I<thread>, returning the exit status of the thread in I<*retval>.  If "
9488 "I<thread> has not yet terminated, then instead of blocking, as is done by "
9489 "B<pthread_join>(3), the call returns an error."
9490 msgstr ""
9491 "B<pthread_tryjoin_np>() 関数は、スレッド I<thread> の非停止\n"
9492 "(nonblocking) での join を実行し、スレッドの終了ステータスを\n"
9493 "I<*retval> に入れて返す。I<thread> がまだ終了していない場合は、\n"
9494 "B<pthread_join>(3) のように停止 (block) せずに、エラーを返す。"
9495
9496 #. type: Plain text
9497 #: build/C/man3/pthread_tryjoin_np.3:76
9498 msgid ""
9499 "The B<pthread_timedjoin_np>()  function performs a join-with-timeout.  If "
9500 "I<thread> has not yet terminated, then the call blocks until a maximum time, "
9501 "specified in I<abstime>.  If the timeout expires before I<thread> "
9502 "terminates, the call returns an error.  The I<abstime> argument is a "
9503 "structure of the following form, specifying an absolute time measured since "
9504 "the Epoch (see B<time>(2)):"
9505 msgstr ""
9506 "B<pthread_timedjoin_np>() 関数は、タイムアウト付きの join を行う。\n"
9507 "I<thread> がまだ終了していない場合、 I<abstime> で指定された最大時間\n"
9508 "まで停止する。 I<thread> が終了する前にタイムアウト時間が経過した場合は、\n"
9509 "エラーを返す。I<abstime> 引き数は以下に示す構造体であり、\n"
9510 "Epoch (時刻紀元; B<time>(2) 参照) から測った絶対時刻を指定する。"
9511
9512 #. type: Plain text
9513 #: build/C/man3/pthread_tryjoin_np.3:83
9514 #, no-wrap
9515 msgid ""
9516 "struct timespec {\n"
9517 "    time_t tv_sec;     /* seconds */\n"
9518 "    long   tv_nsec;    /* nanoseconds */\n"
9519 "};\n"
9520 msgstr ""
9521 "struct timespec {\n"
9522 "    time_t tv_sec;     /* seconds */\n"
9523 "    long   tv_nsec;    /* nanoseconds */\n"
9524 "};\n"
9525
9526 #. type: Plain text
9527 #: build/C/man3/pthread_tryjoin_np.3:89
9528 msgid ""
9529 "On success, these functions return 0; on error, they return an error number."
9530 msgstr ""
9531 "成功すると、これらの関数は 0 を返す。\n"
9532 "エラーの場合、エラー番号を返す。"
9533
9534 #. type: Plain text
9535 #: build/C/man3/pthread_tryjoin_np.3:94
9536 msgid ""
9537 "These functions can fail with the same errors as B<pthread_join>(3).  "
9538 "B<pthread_tryjoin_np>()  can in addition fail with the following error:"
9539 msgstr ""
9540 "これらの関数は B<pthread_join>(3) と同じエラーで失敗する。\n"
9541 "B<pthread_tryjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9542
9543 #. type: TP
9544 #: build/C/man3/pthread_tryjoin_np.3:94
9545 #, no-wrap
9546 msgid "B<EBUSY>"
9547 msgstr "B<EBUSY>"
9548
9549 #. type: Plain text
9550 #: build/C/man3/pthread_tryjoin_np.3:98
9551 msgid "I<thread> had not yet terminated at the time of the call."
9552 msgstr "呼び出しを行った時点では I<thread> はまだ終了していない。"
9553
9554 #. type: Plain text
9555 #: build/C/man3/pthread_tryjoin_np.3:101
9556 msgid ""
9557 "B<pthread_timedjoin_np>()  can in addition fail with the following error:"
9558 msgstr "B<pthread_timedjoin_np>() はさらに以下のエラーで失敗する場合がある。"
9559
9560 #. type: TP
9561 #: build/C/man3/pthread_tryjoin_np.3:101
9562 #, no-wrap
9563 msgid "B<ETIMEDOUT>"
9564 msgstr "B<ETIMEDOUT>"
9565
9566 #. type: Plain text
9567 #: build/C/man3/pthread_tryjoin_np.3:106
9568 msgid "The call timed out before I<thread> terminated."
9569 msgstr "I<thread> が終了する前に呼び出しがタイムアウトとなった。"
9570
9571 #. type: Plain text
9572 #: build/C/man3/pthread_tryjoin_np.3:110
9573 msgid "B<pthread_timedjoin_np>()  never returns the error B<EINTR>."
9574 msgstr "B<pthread_timedjoin_np>() がエラー B<EINTR> を返すことはない。"
9575
9576 #. type: Plain text
9577 #: build/C/man3/pthread_tryjoin_np.3:112
9578 msgid "These functions first appeared in glibc in version 2.3.3."
9579 msgstr "これらの関数は glibc バージョン 2.3.3 で初めて登場した。"
9580
9581 #. type: Plain text
9582 #: build/C/man3/pthread_tryjoin_np.3:117
9583 msgid "The following code waits to join for up to 5 seconds:"
9584 msgstr "以下のコードは、最大 5 秒まで join を待つ。"
9585
9586 #. type: Plain text
9587 #: build/C/man3/pthread_tryjoin_np.3:121
9588 #, no-wrap
9589 msgid ""
9590 "    struct timespec ts;\n"
9591 "    int s;\n"
9592 msgstr ""
9593 "    struct timespec ts;\n"
9594 "    int s;\n"
9595
9596 #. type: Plain text
9597 #: build/C/man3/pthread_tryjoin_np.3:123
9598 #, no-wrap
9599 msgid "    ...\n"
9600 msgstr "    ...\n"
9601
9602 #. type: Plain text
9603 #: build/C/man3/pthread_tryjoin_np.3:127
9604 #, no-wrap
9605 msgid ""
9606 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9607 "\t/* Handle error */\n"
9608 "    }\n"
9609 msgstr ""
9610 "    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {\n"
9611 "\t/* Handle error */\n"
9612 "    }\n"
9613
9614 #. type: Plain text
9615 #: build/C/man3/pthread_tryjoin_np.3:129
9616 #, no-wrap
9617 msgid "    ts.tv_sec += 5;\n"
9618 msgstr "    ts.tv_sec += 5;\n"
9619
9620 #. type: Plain text
9621 #: build/C/man3/pthread_tryjoin_np.3:134
9622 #, no-wrap
9623 msgid ""
9624 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9625 "    if (s != 0) {\n"
9626 "        /* Handle error */\n"
9627 "    }\n"
9628 msgstr ""
9629 "    s = pthread_timedjoin_np(thread, NULL, &ts);\n"
9630 "    if (s != 0) {\n"
9631 "        /* Handle error */\n"
9632 "    }\n"
9633
9634 #. type: Plain text
9635 #: build/C/man3/pthread_tryjoin_np.3:140
9636 msgid ""
9637 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9638 msgstr ""
9639 "B<clock_gettime>(2), B<pthread_exit>(3), B<pthread_join>(3), B<pthreads>(7)"
9640
9641 #. type: TH
9642 #: build/C/man3/pthread_yield.3:25
9643 #, no-wrap
9644 msgid "PTHREAD_YIELD"
9645 msgstr "PTHREAD_YIELD"
9646
9647 #. type: TH
9648 #: build/C/man3/pthread_yield.3:25
9649 #, fuzzy, no-wrap
9650 #| msgid "2012-03-15"
9651 msgid "2013-03-05"
9652 msgstr "2012-03-15"
9653
9654 #. type: Plain text
9655 #: build/C/man3/pthread_yield.3:28
9656 msgid "pthread_yield - yield the processor"
9657 msgstr "pthread_yield - プロセッサを明け渡す (yield)"
9658
9659 #. type: Plain text
9660 #: build/C/man3/pthread_yield.3:34
9661 #, no-wrap
9662 msgid "B<int pthread_yield(void);>\n"
9663 msgstr "B<int pthread_yield(void);>\n"
9664
9665 #. type: Plain text
9666 #: build/C/man3/pthread_yield.3:44
9667 msgid ""
9668 "B<pthread_yield>()  causes the calling thread to relinquish the CPU.  The "
9669 "thread is placed at the end of the run queue for its static priority and "
9670 "another thread is scheduled to run.  For further details, see B<sched_yield>"
9671 "(2)"
9672 msgstr ""
9673 "B<pthread_yield>() を呼び出すと、呼び出したスレッドは CPU を手放す。\n"
9674 "スレッドはそのスレッドの静的優先度の実行キューの末尾に回り、\n"
9675 "別のスレッドが実行されるようにスケジューリングされる。\n"
9676 "詳細は B<sched_yield>(2) を参照。"
9677
9678 #. type: Plain text
9679 #: build/C/man3/pthread_yield.3:49
9680 msgid ""
9681 "On success, B<pthread_yield>()  returns 0; on error, it returns an error "
9682 "number."
9683 msgstr ""
9684 "成功すると、 B<pthread_yield>() は 0 を返す。\n"
9685 "エラーの場合、エラー番号を返す。"
9686
9687 #. type: Plain text
9688 #: build/C/man3/pthread_yield.3:53
9689 msgid ""
9690 "On Linux, this call always succeeds (but portable and future-proof "
9691 "applications should nevertheless handle a possible error return)."
9692 msgstr ""
9693 "Linux では、この関数の呼び出しは常に成功する\n"
9694 "(ただし、移植性や将来も動作することを保証したいアプリケーションでは\n"
9695 "正のエラーの返り値を処理するようにすべきである)。"
9696
9697 #.  e.g., the BSDs, Tru64, AIX, and Irix.
9698 #. type: Plain text
9699 #: build/C/man3/pthread_yield.3:59
9700 msgid ""
9701 "This call is nonstandard, but present on several other systems.  Use the "
9702 "standardized B<sched_yield>(2)  instead."
9703 msgstr ""
9704 "この関数は非標準だが、他のいくつかのシステムにも存在する。\n"
9705 "代わりに、標準化されている B<sched_yield>(2) を使うこと。"
9706
9707 #. type: Plain text
9708 #: build/C/man3/pthread_yield.3:62
9709 msgid "On Linux, this function is implemented as a call to B<sched_yield>(2)."
9710 msgstr ""
9711 "Linux では、この関数は B<sched_yield>(2) を呼び出す形で実装されている。"
9712
9713 #. type: Plain text
9714 #: build/C/man3/pthread_yield.3:66
9715 #, fuzzy
9716 #| msgid "B<sched_setscheduler>(2), B<sched_yield>(2)  B<pthreads>(7)"
9717 msgid "B<sched_setscheduler>(2), B<sched_yield>(2), B<pthreads>(7)"
9718 msgstr "B<sched_setscheduler>(2), B<sched_yield>(2)  B<pthreads>(7)"
9719
9720 #. type: TH
9721 #: build/C/man7/pthreads.7:26
9722 #, no-wrap
9723 msgid "PTHREADS"
9724 msgstr "PTHREADS"
9725
9726 #. type: TH
9727 #: build/C/man7/pthreads.7:26
9728 #, no-wrap
9729 msgid "2010-11-14"
9730 msgstr "2010-11-14"
9731
9732 #. type: Plain text
9733 #: build/C/man7/pthreads.7:29
9734 msgid "pthreads - POSIX threads"
9735 msgstr "pthreads - POSIX スレッド"
9736
9737 #. type: Plain text
9738 #: build/C/man7/pthreads.7:36
9739 msgid ""
9740 "POSIX.1 specifies a set of interfaces (functions, header files) for threaded "
9741 "programming commonly known as POSIX threads, or Pthreads.  A single process "
9742 "can contain multiple threads, all of which are executing the same program.  "
9743 "These threads share the same global memory (data and heap segments), but "
9744 "each thread has its own stack (automatic variables)."
9745 msgstr ""
9746 "POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログ"
9747 "ラミングのインタフェース群 (関数、ヘッダファイル)  を規定している。一つのプロ"
9748 "セスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行す"
9749 "る。 これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各"
9750 "スレッドは自分専用のスタック (自動変数) を持つ。"
9751
9752 #. type: Plain text
9753 #: build/C/man7/pthreads.7:39
9754 msgid ""
9755 "POSIX.1 also requires that threads share a range of other attributes (i.e., "
9756 "these attributes are process-wide rather than per-thread):"
9757 msgstr ""
9758 "POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つま"
9759 "り、これらの属性はスレッド単位ではなくプロセス全体で共通である):"
9760
9761 #. type: IP
9762 #: build/C/man7/pthreads.7:39 build/C/man7/pthreads.7:41
9763 #: build/C/man7/pthreads.7:43 build/C/man7/pthreads.7:45
9764 #: build/C/man7/pthreads.7:47 build/C/man7/pthreads.7:49
9765 #: build/C/man7/pthreads.7:51 build/C/man7/pthreads.7:54
9766 #: build/C/man7/pthreads.7:56 build/C/man7/pthreads.7:59
9767 #: build/C/man7/pthreads.7:65 build/C/man7/pthreads.7:70
9768 #: build/C/man7/pthreads.7:73 build/C/man7/pthreads.7:76
9769 #: build/C/man7/pthreads.7:84 build/C/man7/pthreads.7:88
9770 #: build/C/man7/pthreads.7:91 build/C/man7/pthreads.7:95
9771 #: build/C/man7/pthreads.7:98 build/C/man7/pthreads.7:105
9772 #: build/C/man7/pthreads.7:108 build/C/man7/pthreads.7:685
9773 #: build/C/man7/pthreads.7:692 build/C/man7/pthreads.7:704
9774 #: build/C/man7/pthreads.7:714 build/C/man7/pthreads.7:718
9775 #: build/C/man7/pthreads.7:727 build/C/man7/pthreads.7:737
9776 #: build/C/man7/pthreads.7:744 build/C/man7/pthreads.7:751
9777 #: build/C/man7/pthreads.7:753 build/C/man7/pthreads.7:756
9778 #: build/C/man7/pthreads.7:762 build/C/man7/pthreads.7:765
9779 #: build/C/man7/pthreads.7:767 build/C/man7/pthreads.7:769
9780 #: build/C/man7/pthreads.7:779 build/C/man7/pthreads.7:799
9781 #: build/C/man7/pthreads.7:808 build/C/man7/pthreads.7:814
9782 #: build/C/man7/pthreads.7:816 build/C/man7/pthreads.7:818
9783 #: build/C/man7/pthreads.7:822 build/C/man7/pthreads.7:827
9784 #: build/C/man7/pthreads.7:835
9785 #, no-wrap
9786 msgid "-"
9787 msgstr "-"
9788
9789 #. type: Plain text
9790 #: build/C/man7/pthreads.7:41
9791 msgid "process ID"
9792 msgstr "プロセス ID"
9793
9794 #. type: Plain text
9795 #: build/C/man7/pthreads.7:43
9796 msgid "parent process ID"
9797 msgstr "親プロセス ID"
9798
9799 #. type: Plain text
9800 #: build/C/man7/pthreads.7:45
9801 msgid "process group ID and session ID"
9802 msgstr "プロセスグループ ID とセッション ID"
9803
9804 #. type: Plain text
9805 #: build/C/man7/pthreads.7:47
9806 msgid "controlling terminal"
9807 msgstr "制御端末"
9808
9809 #. type: Plain text
9810 #: build/C/man7/pthreads.7:49
9811 msgid "user and group IDs"
9812 msgstr "ユーザ ID とグループ ID"
9813
9814 #. type: Plain text
9815 #: build/C/man7/pthreads.7:51
9816 msgid "open file descriptors"
9817 msgstr "オープンするファイルディスクリプタ"
9818
9819 #. type: Plain text
9820 #: build/C/man7/pthreads.7:54
9821 msgid "record locks (see B<fcntl>(2))"
9822 msgstr "レコードのロック (B<fcntl>(3)  参照)"
9823
9824 #. type: Plain text
9825 #: build/C/man7/pthreads.7:56
9826 msgid "signal dispositions"
9827 msgstr "シグナルの配置"
9828
9829 #. type: Plain text
9830 #: build/C/man7/pthreads.7:59
9831 msgid "file mode creation mask (B<umask>(2))"
9832 msgstr "ファイルモード作成マスク (B<umask>(2))"
9833
9834 #. type: Plain text
9835 #: build/C/man7/pthreads.7:65
9836 msgid "current directory (B<chdir>(2))  and root directory (B<chroot>(2))"
9837 msgstr ""
9838 "カレント・ディレクトリ (B<chdir>(2))  とルート・ディレクトリ (B<chroot>(2))"
9839
9840 #. type: Plain text
9841 #: build/C/man7/pthreads.7:70
9842 msgid ""
9843 "interval timers (B<setitimer>(2))  and POSIX timers (B<timer_create>(2))"
9844 msgstr ""
9845 "インターバル・タイマ (B<setitimer>(2))  と POSIX タイマ (B<timer_create>(2))"
9846
9847 #. type: Plain text
9848 #: build/C/man7/pthreads.7:73
9849 msgid "nice value (B<setpriority>(2))"
9850 msgstr "nice 値 (B<setpriority>(2))"
9851
9852 #. type: Plain text
9853 #: build/C/man7/pthreads.7:76
9854 msgid "resource limits (B<setrlimit>(2))"
9855 msgstr "リソース制限 (B<setrlimit>(2))"
9856
9857 #. type: Plain text
9858 #: build/C/man7/pthreads.7:81
9859 msgid ""
9860 "measurements of the consumption of CPU time (B<times>(2))  and resources "
9861 "(B<getrusage>(2))"
9862 msgstr "CPU 時間 (B<times>(2))  とリソース (B<getrusage>(2))  の消費状況の計測"
9863
9864 #. type: Plain text
9865 #: build/C/man7/pthreads.7:84
9866 msgid ""
9867 "As well as the stack, POSIX.1 specifies that various other attributes are "
9868 "distinct for each thread, including:"
9869 msgstr ""
9870 "スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理され"
9871 "るかを規定している:"
9872
9873 #. type: Plain text
9874 #: build/C/man7/pthreads.7:88
9875 msgid "thread ID (the I<pthread_t> data type)"
9876 msgstr "スレッド ID (B<pthread_t> データ型)"
9877
9878 #. type: Plain text
9879 #: build/C/man7/pthreads.7:91
9880 msgid "signal mask (B<pthread_sigmask>(3))"
9881 msgstr "シグナルマスク (B<pthread_sigmask>(3))"
9882
9883 #. type: Plain text
9884 #: build/C/man7/pthreads.7:95
9885 msgid "the I<errno> variable"
9886 msgstr "I<errno> 変数"
9887
9888 #. type: Plain text
9889 #: build/C/man7/pthreads.7:98
9890 msgid "alternate signal stack (B<sigaltstack>(2))"
9891 msgstr "代替シグナルスタック (B<sigaltstack>(2))"
9892
9893 #. type: Plain text
9894 #: build/C/man7/pthreads.7:103
9895 msgid ""
9896 "real-time scheduling policy and priority (B<sched_setscheduler>(2)  and "
9897 "B<sched_setparam>(2))"
9898 msgstr ""
9899 "リアルタイム・スケジューリングのポリシーと優先度 (B<sched_setscheduler>(2)  "
9900 "と B<sched_setparam>(2))"
9901
9902 #. type: Plain text
9903 #: build/C/man7/pthreads.7:105
9904 msgid "The following Linux-specific features are also per-thread:"
9905 msgstr "以下の Linux 特有の機能もスレッド単位である:"
9906
9907 #. type: Plain text
9908 #: build/C/man7/pthreads.7:108
9909 msgid "capabilities (see B<capabilities>(7))"
9910 msgstr "ケーパビリティ (B<capabilities>(7)  参照)"
9911
9912 #. type: Plain text
9913 #: build/C/man7/pthreads.7:111
9914 msgid "CPU affinity (B<sched_setaffinity>(2))"
9915 msgstr "CPU affinity (親和度)  (B<sched_setaffinity>(2))"
9916
9917 #. type: SS
9918 #: build/C/man7/pthreads.7:111
9919 #, no-wrap
9920 msgid "Pthreads function return values"
9921 msgstr "pthreads 関数の返り値"
9922
9923 #. type: Plain text
9924 #: build/C/man7/pthreads.7:118
9925 msgid ""
9926 "Most pthreads functions return 0 on success, and an error number of "
9927 "failure.  Note that the pthreads functions do not set I<errno>.  For each of "
9928 "the pthreads functions that can return an error, POSIX.1-2001 specifies that "
9929 "the function can never fail with the error B<EINTR>."
9930 msgstr ""
9931 "ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返"
9932 "す。 pthreads 関数は I<errno> をセットしない点に注意すること。 POSIX.1-2001 "
9933 "では、 エラーを返す可能性のある pthreads 関数がエラー B<EINTR> で失敗すること"
9934 "は決してないと規定している。"
9935
9936 #. type: SS
9937 #: build/C/man7/pthreads.7:118
9938 #, no-wrap
9939 msgid "Thread IDs"
9940 msgstr "スレッド ID"
9941
9942 #. type: Plain text
9943 #: build/C/man7/pthreads.7:132
9944 msgid ""
9945 "Each of the threads in a process has a unique thread identifier (stored in "
9946 "the type I<pthread_t>).  This identifier is returned to the caller of "
9947 "B<pthread_create>(3), and a thread can obtain its own thread identifier "
9948 "using B<pthread_self>(3).  Thread IDs are only guaranteed to be unique "
9949 "within a process.  A thread ID may be reused after a terminated thread has "
9950 "been joined, or a detached thread has terminated.  In all pthreads functions "
9951 "that accept a thread ID as an argument, that ID by definition refers to a "
9952 "thread in the same process as the caller."
9953 msgstr ""
9954 "あるプロセス内の各スレッドは (I<pthread_t> 型の) 一意なスレッド識別子を持"
9955 "つ。 この識別子は、 B<pthread_create>(3)  の呼び出し元に返される。また、ス"
9956 "レッドは自身のスレッド識別子を B<pthread_self>(3)  を使って取得できる。 ス"
9957 "レッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。 終了"
9958 "したスレッドが join された後では、スレッド ID は再利用される可能性がある。 ス"
9959 "レッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同"
9960 "じプロセス内の一つのスレッドを参照する。"
9961
9962 #. type: SS
9963 #: build/C/man7/pthreads.7:132
9964 #, no-wrap
9965 msgid "Thread-safe functions"
9966 msgstr "スレッドセーフな関数"
9967
9968 #. type: Plain text
9969 #: build/C/man7/pthreads.7:136
9970 msgid ""
9971 "A thread-safe function is one that can be safely (i.e., it will deliver the "
9972 "same results regardless of whether it is)  called from multiple threads at "
9973 "the same time."
9974 msgstr ""
9975 "スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわ"
9976 "ち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。"
9977
9978 #. type: Plain text
9979 #: build/C/man7/pthreads.7:140
9980 msgid ""
9981 "POSIX.1-2001 and POSIX.1-2008 require that all functions specified in the "
9982 "standard shall be thread-safe, except for the following functions:"
9983 msgstr ""
9984 "POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、 標準で規定されている全て"
9985 "の関数がスレッドセーフであることを要求している。 以下の関数が例外である。"
9986
9987 #. type: Plain text
9988 #: build/C/man7/pthreads.7:234
9989 #, no-wrap
9990 msgid ""
9991 "asctime()\n"
9992 "basename()\n"
9993 "catgets()\n"
9994 "crypt()\n"
9995 "ctermid() if passed a non-NULL argument\n"
9996 "ctime()\n"
9997 "dbm_clearerr()\n"
9998 "dbm_close()\n"
9999 "dbm_delete()\n"
10000 "dbm_error()\n"
10001 "dbm_fetch()\n"
10002 "dbm_firstkey()\n"
10003 "dbm_nextkey()\n"
10004 "dbm_open()\n"
10005 "dbm_store()\n"
10006 "dirname()\n"
10007 "dlerror()\n"
10008 "drand48()\n"
10009 "ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10010 "encrypt()\n"
10011 "endgrent()\n"
10012 "endpwent()\n"
10013 "endutxent()\n"
10014 "fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10015 "ftw()\n"
10016 "gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10017 "getc_unlocked()\n"
10018 "getchar_unlocked()\n"
10019 "getdate()\n"
10020 "getenv()\n"
10021 "getgrent()\n"
10022 "getgrgid()\n"
10023 "getgrnam()\n"
10024 "gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10025 "gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10026 "gethostent()\n"
10027 "getlogin()\n"
10028 "getnetbyaddr()\n"
10029 "getnetbyname()\n"
10030 "getnetent()\n"
10031 "getopt()\n"
10032 "getprotobyname()\n"
10033 "getprotobynumber()\n"
10034 "getprotoent()\n"
10035 "getpwent()\n"
10036 "getpwnam()\n"
10037 "getpwuid()\n"
10038 "getservbyname()\n"
10039 "getservbyport()\n"
10040 "getservent()\n"
10041 "getutxent()\n"
10042 "getutxid()\n"
10043 "getutxline()\n"
10044 "gmtime()\n"
10045 "hcreate()\n"
10046 "hdestroy()\n"
10047 "hsearch()\n"
10048 "inet_ntoa()\n"
10049 "l64a()\n"
10050 "lgamma()\n"
10051 "lgammaf()\n"
10052 "lgammal()\n"
10053 "localeconv()\n"
10054 "localtime()\n"
10055 "lrand48()\n"
10056 "mrand48()\n"
10057 "nftw()\n"
10058 "nl_langinfo()\n"
10059 "ptsname()\n"
10060 "putc_unlocked()\n"
10061 "putchar_unlocked()\n"
10062 "putenv()\n"
10063 "pututxline()\n"
10064 "rand()\n"
10065 "readdir()\n"
10066 "setenv()\n"
10067 "setgrent()\n"
10068 "setkey()\n"
10069 "setpwent()\n"
10070 "setutxent()\n"
10071 "strerror()\n"
10072 "strsignal() [Added in POSIX.1-2008]\n"
10073 "strtok()\n"
10074 "system() [Added in POSIX.1-2008]\n"
10075 "tmpnam() if passed a non-NULL argument\n"
10076 "ttyname()\n"
10077 "unsetenv()\n"
10078 "wcrtomb() if its final argument is NULL\n"
10079 "wcsrtombs() if its final argument is NULL\n"
10080 "wcstombs()\n"
10081 "wctomb()\n"
10082 msgstr ""
10083 "asctime()\n"
10084 "basename()\n"
10085 "catgets()\n"
10086 "crypt()\n"
10087 "ctermid() (NULL でない引き数を渡された場合)\n"
10088 "ctime()\n"
10089 "dbm_clearerr()\n"
10090 "dbm_close()\n"
10091 "dbm_delete()\n"
10092 "dbm_error()\n"
10093 "dbm_fetch()\n"
10094 "dbm_firstkey()\n"
10095 "dbm_nextkey()\n"
10096 "dbm_open()\n"
10097 "dbm_store()\n"
10098 "dirname()\n"
10099 "dlerror()\n"
10100 "drand48()\n"
10101 "ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10102 "encrypt()\n"
10103 "endgrent()\n"
10104 "endpwent()\n"
10105 "endutxent()\n"
10106 "fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10107 "ftw()\n"
10108 "gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10109 "getc_unlocked()\n"
10110 "getchar_unlocked()\n"
10111 "getdate()\n"
10112 "getenv()\n"
10113 "getgrent()\n"
10114 "getgrgid()\n"
10115 "getgrnam()\n"
10116 "gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10117 "gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10118 "gethostent()\n"
10119 "getlogin()\n"
10120 "getnetbyaddr()\n"
10121 "getnetbyname()\n"
10122 "getnetent()\n"
10123 "getopt()\n"
10124 "getprotobyname()\n"
10125 "getprotobynumber()\n"
10126 "getprotoent()\n"
10127 "getpwent()\n"
10128 "getpwnam()\n"
10129 "getpwuid()\n"
10130 "getservbyname()\n"
10131 "getservbyport()\n"
10132 "getservent()\n"
10133 "getutxent()\n"
10134 "getutxid()\n"
10135 "getutxline()\n"
10136 "gmtime()\n"
10137 "hcreate()\n"
10138 "hdestroy()\n"
10139 "hsearch()\n"
10140 "inet_ntoa()\n"
10141 "l64a()\n"
10142 "lgamma()\n"
10143 "lgammaf()\n"
10144 "lgammal()\n"
10145 "localeconv()\n"
10146 "localtime()\n"
10147 "lrand48()\n"
10148 "mrand48()\n"
10149 "nftw()\n"
10150 "nl_langinfo()\n"
10151 "ptsname()\n"
10152 "putc_unlocked()\n"
10153 "putchar_unlocked()\n"
10154 "putenv()\n"
10155 "pututxline()\n"
10156 "rand()\n"
10157 "readdir()\n"
10158 "setenv()\n"
10159 "setgrent()\n"
10160 "setkey()\n"
10161 "setpwent()\n"
10162 "setutxent()\n"
10163 "strerror()\n"
10164 "strsignal() [POSIX.1-2008 で追加された]\n"
10165 "strtok()\n"
10166 "system() [POSIX.1-2008 で追加された]\n"
10167 "tmpnam() (NULL でない引き数を渡された場合)\n"
10168 "ttyname()\n"
10169 "unsetenv()\n"
10170 "wcrtomb() (最後の引き数が NULL の場合)\n"
10171 "wcsrtombs() (最後の引き数が NULL の場合)\n"
10172 "wcstombs()\n"
10173 "wctomb()\n"
10174
10175 #. type: SS
10176 #: build/C/man7/pthreads.7:236
10177 #, no-wrap
10178 msgid "Async-cancel-safe functions"
10179 msgstr "async-cancel-safe 関数"
10180
10181 #. type: Plain text
10182 #: build/C/man7/pthreads.7:240
10183 msgid ""
10184 "An async-cancel-safe function is one that can be safely called in an "
10185 "application where asynchronous cancelability is enabled (see "
10186 "B<pthread_setcancelstate>(3))."
10187 msgstr ""
10188 "async-cancel-safe 関数は、\n"
10189 "非同期キャンセル機能が有効になっているアプリケーションで\n"
10190 "安全に呼び出すことができる関数のことである\n"
10191 "(B<pthread_setcancelstate>(3) を参照)。"
10192
10193 #. type: Plain text
10194 #: build/C/man7/pthreads.7:243
10195 msgid ""
10196 "Only the following functions are required to be async-cancel-safe by "
10197 "POSIX.1-2001 and POSIX.1-2008:"
10198 msgstr ""
10199 "以下の関数だけが、POSIX.1-2001 と POSIX.1-2008 で async-cancel-safe で\n"
10200 "なければならないとされている。"
10201
10202 #. type: Plain text
10203 #: build/C/man7/pthreads.7:249
10204 #, no-wrap
10205 msgid ""
10206 "pthread_cancel()\n"
10207 "pthread_setcancelstate()\n"
10208 "pthread_setcanceltype()\n"
10209 msgstr ""
10210 "pthread_cancel()\n"
10211 "pthread_setcancelstate()\n"
10212 "pthread_setcanceltype()\n"
10213
10214 #. type: SS
10215 #: build/C/man7/pthreads.7:251
10216 #, fuzzy, no-wrap
10217 #| msgid "Cancellation Points"
10218 msgid "Cancellation points"
10219 msgstr "取り消しポイント (cancellation points)"
10220
10221 #. type: Plain text
10222 #: build/C/man7/pthreads.7:258
10223 msgid ""
10224 "POSIX.1 specifies that certain functions must, and certain other functions "
10225 "may, be cancellation points.  If a thread is cancelable, its cancelability "
10226 "type is deferred, and a cancellation request is pending for the thread, then "
10227 "the thread is canceled when it calls a function that is a cancellation point."
10228 msgstr ""
10229 "POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の"
10230 "関数は取り消しポイントであってもよいとされている。 あるスレッドが取り消し可能"
10231 "で、その取り消し種別 (cancelability type)  が延期 (deferred) で、そのスレッド"
10232 "に対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した"
10233 "時点で、そのスレッドのキャンセルが 行われる。"
10234
10235 #. type: Plain text
10236 #: build/C/man7/pthreads.7:261
10237 msgid ""
10238 "The following functions are required to be cancellation points by "
10239 "POSIX.1-2001 and/or POSIX.1-2008:"
10240 msgstr ""
10241 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10242 "は、取り消しポイント (cancellation points) で あることが必須となっている。"
10243
10244 #. type: Plain text
10245 #: build/C/man7/pthreads.7:324
10246 #, no-wrap
10247 msgid ""
10248 "accept()\n"
10249 "aio_suspend()\n"
10250 "clock_nanosleep()\n"
10251 "close()\n"
10252 "connect()\n"
10253 "creat()\n"
10254 "fcntl() F_SETLKW\n"
10255 "fdatasync()\n"
10256 "fsync()\n"
10257 "getmsg()\n"
10258 "getpmsg()\n"
10259 "lockf() F_LOCK\n"
10260 "mq_receive()\n"
10261 "mq_send()\n"
10262 "mq_timedreceive()\n"
10263 "mq_timedsend()\n"
10264 "msgrcv()\n"
10265 "msgsnd()\n"
10266 "msync()\n"
10267 "nanosleep()\n"
10268 "open()\n"
10269 "openat() [Added in POSIX.1-2008]\n"
10270 "pause()\n"
10271 "poll()\n"
10272 "pread()\n"
10273 "pselect()\n"
10274 "pthread_cond_timedwait()\n"
10275 "pthread_cond_wait()\n"
10276 "pthread_join()\n"
10277 "pthread_testcancel()\n"
10278 "putmsg()\n"
10279 "putpmsg()\n"
10280 "pwrite()\n"
10281 "read()\n"
10282 "readv()\n"
10283 "recv()\n"
10284 "recvfrom()\n"
10285 "recvmsg()\n"
10286 "select()\n"
10287 "sem_timedwait()\n"
10288 "sem_wait()\n"
10289 "send()\n"
10290 "sendmsg()\n"
10291 "sendto()\n"
10292 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10293 "sigsuspend()\n"
10294 "sigtimedwait()\n"
10295 "sigwait()\n"
10296 "sigwaitinfo()\n"
10297 "sleep()\n"
10298 "system()\n"
10299 "tcdrain()\n"
10300 "usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]\n"
10301 "wait()\n"
10302 "waitid()\n"
10303 "waitpid()\n"
10304 "write()\n"
10305 "writev()\n"
10306 msgstr ""
10307 "accept()\n"
10308 "aio_suspend()\n"
10309 "clock_nanosleep()\n"
10310 "close()\n"
10311 "connect()\n"
10312 "creat()\n"
10313 "fcntl() F_SETLKW\n"
10314 "fdatasync()\n"
10315 "fsync()\n"
10316 "getmsg()\n"
10317 "getpmsg()\n"
10318 "lockf() F_LOCK\n"
10319 "mq_receive()\n"
10320 "mq_send()\n"
10321 "mq_timedreceive()\n"
10322 "mq_timedsend()\n"
10323 "msgrcv()\n"
10324 "msgsnd()\n"
10325 "msync()\n"
10326 "nanosleep()\n"
10327 "open()\n"
10328 "openat() [POSIX.1-2008 で追加された]\n"
10329 "pause()\n"
10330 "poll()\n"
10331 "pread()\n"
10332 "pselect()\n"
10333 "pthread_cond_timedwait()\n"
10334 "pthread_cond_wait()\n"
10335 "pthread_join()\n"
10336 "pthread_testcancel()\n"
10337 "putmsg()\n"
10338 "putpmsg()\n"
10339 "pwrite()\n"
10340 "read()\n"
10341 "readv()\n"
10342 "recv()\n"
10343 "recvfrom()\n"
10344 "recvmsg()\n"
10345 "select()\n"
10346 "sem_timedwait()\n"
10347 "sem_wait()\n"
10348 "send()\n"
10349 "sendmsg()\n"
10350 "sendto()\n"
10351 "sigpause() [POSIX.1-2001 only (moves to \"may\" list in POSIX.1-2008)]\n"
10352 "sigsuspend()\n"
10353 "sigtimedwait()\n"
10354 "sigwait()\n"
10355 "sigwaitinfo()\n"
10356 "sleep()\n"
10357 "system()\n"
10358 "tcdrain()\n"
10359 "usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]\n"
10360 "wait()\n"
10361 "waitid()\n"
10362 "waitpid()\n"
10363 "write()\n"
10364 "writev()\n"
10365
10366 #. type: Plain text
10367 #: build/C/man7/pthreads.7:329
10368 msgid ""
10369 "The following functions may be cancellation points according to POSIX.1-2001 "
10370 "and/or POSIX.1-2008:"
10371 msgstr ""
10372 "POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、 以下の関数"
10373 "は、取り消しポイント (cancellation points) で あってもよいことになっている。"
10374
10375 #. type: Plain text
10376 #: build/C/man7/pthreads.7:557
10377 #, no-wrap
10378 msgid ""
10379 "access()\n"
10380 "asctime()\n"
10381 "asctime_r()\n"
10382 "catclose()\n"
10383 "catgets()\n"
10384 "catopen()\n"
10385 "chmod() [Added in POSIX.1-2008]\n"
10386 "chown() [Added in POSIX.1-2008]\n"
10387 "closedir()\n"
10388 "closelog()\n"
10389 "ctermid()\n"
10390 "ctime()\n"
10391 "ctime_r()\n"
10392 "dbm_close()\n"
10393 "dbm_delete()\n"
10394 "dbm_fetch()\n"
10395 "dbm_nextkey()\n"
10396 "dbm_open()\n"
10397 "dbm_store()\n"
10398 "dlclose()\n"
10399 "dlopen()\n"
10400 "dprintf() [Added in POSIX.1-2008]\n"
10401 "endgrent()\n"
10402 "endhostent()\n"
10403 "endnetent()\n"
10404 "endprotoent()\n"
10405 "endpwent()\n"
10406 "endservent()\n"
10407 "endutxent()\n"
10408 "faccessat() [Added in POSIX.1-2008]\n"
10409 "fchmod() [Added in POSIX.1-2008]\n"
10410 "fchmodat() [Added in POSIX.1-2008]\n"
10411 "fchown() [Added in POSIX.1-2008]\n"
10412 "fchownat() [Added in POSIX.1-2008]\n"
10413 "fclose()\n"
10414 "fcntl() (for any value of cmd argument)\n"
10415 "fflush()\n"
10416 "fgetc()\n"
10417 "fgetpos()\n"
10418 "fgets()\n"
10419 "fgetwc()\n"
10420 "fgetws()\n"
10421 "fmtmsg()\n"
10422 "fopen()\n"
10423 "fpathconf()\n"
10424 "fprintf()\n"
10425 "fputc()\n"
10426 "fputs()\n"
10427 "fputwc()\n"
10428 "fputws()\n"
10429 "fread()\n"
10430 "freopen()\n"
10431 "fscanf()\n"
10432 "fseek()\n"
10433 "fseeko()\n"
10434 "fsetpos()\n"
10435 "fstat()\n"
10436 "fstatat() [Added in POSIX.1-2008]\n"
10437 "ftell()\n"
10438 "ftello()\n"
10439 "ftw()\n"
10440 "futimens() [Added in POSIX.1-2008]\n"
10441 "fwprintf()\n"
10442 "fwrite()\n"
10443 "fwscanf()\n"
10444 "getaddrinfo()\n"
10445 "getc()\n"
10446 "getc_unlocked()\n"
10447 "getchar()\n"
10448 "getchar_unlocked()\n"
10449 "getcwd()\n"
10450 "getdate()\n"
10451 "getdelim() [Added in POSIX.1-2008]\n"
10452 "getgrent()\n"
10453 "getgrgid()\n"
10454 "getgrgid_r()\n"
10455 "getgrnam()\n"
10456 "getgrnam_r()\n"
10457 "gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10458 "gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10459 "gethostent()\n"
10460 "gethostid()\n"
10461 "gethostname()\n"
10462 "getline() [Added in POSIX.1-2008]\n"
10463 "getlogin()\n"
10464 "getlogin_r()\n"
10465 "getnameinfo()\n"
10466 "getnetbyaddr()\n"
10467 "getnetbyname()\n"
10468 "getnetent()\n"
10469 "getopt() (if opterr is nonzero)\n"
10470 "getprotobyname()\n"
10471 "getprotobynumber()\n"
10472 "getprotoent()\n"
10473 "getpwent()\n"
10474 "getpwnam()\n"
10475 "getpwnam_r()\n"
10476 "getpwuid()\n"
10477 "getpwuid_r()\n"
10478 "gets()\n"
10479 "getservbyname()\n"
10480 "getservbyport()\n"
10481 "getservent()\n"
10482 "getutxent()\n"
10483 "getutxid()\n"
10484 "getutxline()\n"
10485 "getwc()\n"
10486 "getwchar()\n"
10487 "getwd() [SUSv3 only (function removed in POSIX.1-2008)]\n"
10488 "glob()\n"
10489 "iconv_close()\n"
10490 "iconv_open()\n"
10491 "ioctl()\n"
10492 "link()\n"
10493 "linkat() [Added in POSIX.1-2008]\n"
10494 "lio_listio() [Added in POSIX.1-2008]\n"
10495 "localtime()\n"
10496 "localtime_r()\n"
10497 "lockf() [Added in POSIX.1-2008]\n"
10498 "lseek()\n"
10499 "lstat()\n"
10500 "mkdir() [Added in POSIX.1-2008]\n"
10501 "mkdirat() [Added in POSIX.1-2008]\n"
10502 "mkdtemp() [Added in POSIX.1-2008]\n"
10503 "mkfifo() [Added in POSIX.1-2008]\n"
10504 "mkfifoat() [Added in POSIX.1-2008]\n"
10505 "mknod() [Added in POSIX.1-2008]\n"
10506 "mknodat() [Added in POSIX.1-2008]\n"
10507 "mkstemp()\n"
10508 "mktime()\n"
10509 "nftw()\n"
10510 "opendir()\n"
10511 "openlog()\n"
10512 "pathconf()\n"
10513 "pclose()\n"
10514 "perror()\n"
10515 "popen()\n"
10516 "posix_fadvise()\n"
10517 "posix_fallocate()\n"
10518 "posix_madvise()\n"
10519 "posix_openpt()\n"
10520 "posix_spawn()\n"
10521 "posix_spawnp()\n"
10522 "posix_trace_clear()\n"
10523 "posix_trace_close()\n"
10524 "posix_trace_create()\n"
10525 "posix_trace_create_withlog()\n"
10526 "posix_trace_eventtypelist_getnext_id()\n"
10527 "posix_trace_eventtypelist_rewind()\n"
10528 "posix_trace_flush()\n"
10529 "posix_trace_get_attr()\n"
10530 "posix_trace_get_filter()\n"
10531 "posix_trace_get_status()\n"
10532 "posix_trace_getnext_event()\n"
10533 "posix_trace_open()\n"
10534 "posix_trace_rewind()\n"
10535 "posix_trace_set_filter()\n"
10536 "posix_trace_shutdown()\n"
10537 "posix_trace_timedgetnext_event()\n"
10538 "posix_typed_mem_open()\n"
10539 "printf()\n"
10540 "psiginfo() [Added in POSIX.1-2008]\n"
10541 "psignal() [Added in POSIX.1-2008]\n"
10542 "pthread_rwlock_rdlock()\n"
10543 "pthread_rwlock_timedrdlock()\n"
10544 "pthread_rwlock_timedwrlock()\n"
10545 "pthread_rwlock_wrlock()\n"
10546 "putc()\n"
10547 "putc_unlocked()\n"
10548 "putchar()\n"
10549 "putchar_unlocked()\n"
10550 "puts()\n"
10551 "pututxline()\n"
10552 "putwc()\n"
10553 "putwchar()\n"
10554 "readdir()\n"
10555 "readdir_r()\n"
10556 "readlink() [Added in POSIX.1-2008]\n"
10557 "readlinkat() [Added in POSIX.1-2008]\n"
10558 "remove()\n"
10559 "rename()\n"
10560 "renameat() [Added in POSIX.1-2008]\n"
10561 "rewind()\n"
10562 "rewinddir()\n"
10563 "scandir() [Added in POSIX.1-2008]\n"
10564 "scanf()\n"
10565 "seekdir()\n"
10566 "semop()\n"
10567 "setgrent()\n"
10568 "sethostent()\n"
10569 "setnetent()\n"
10570 "setprotoent()\n"
10571 "setpwent()\n"
10572 "setservent()\n"
10573 "setutxent()\n"
10574 "sigpause() [Added in POSIX.1-2008]\n"
10575 "stat()\n"
10576 "strerror()\n"
10577 "strerror_r()\n"
10578 "strftime()\n"
10579 "symlink()\n"
10580 "symlinkat() [Added in POSIX.1-2008]\n"
10581 "sync()\n"
10582 "syslog()\n"
10583 "tmpfile()\n"
10584 "tmpnam()\n"
10585 "ttyname()\n"
10586 "ttyname_r()\n"
10587 "tzset()\n"
10588 "ungetc()\n"
10589 "ungetwc()\n"
10590 "unlink()\n"
10591 "unlinkat() [Added in POSIX.1-2008]\n"
10592 "utime() [Added in POSIX.1-2008]\n"
10593 "utimensat() [Added in POSIX.1-2008]\n"
10594 "utimes() [Added in POSIX.1-2008]\n"
10595 "vdprintf() [Added in POSIX.1-2008]\n"
10596 "vfprintf()\n"
10597 "vfwprintf()\n"
10598 "vprintf()\n"
10599 "vwprintf()\n"
10600 "wcsftime()\n"
10601 "wordexp()\n"
10602 "wprintf()\n"
10603 "wscanf()\n"
10604 msgstr ""
10605 "access()\n"
10606 "asctime()\n"
10607 "asctime_r()\n"
10608 "catclose()\n"
10609 "catgets()\n"
10610 "catopen()\n"
10611 "chmod() [POSIX.1-2008 で追加された]\n"
10612 "chown() [POSIX.1-2008 で追加された]\n"
10613 "closedir()\n"
10614 "closelog()\n"
10615 "ctermid()\n"
10616 "ctime()\n"
10617 "ctime_r()\n"
10618 "dbm_close()\n"
10619 "dbm_delete()\n"
10620 "dbm_fetch()\n"
10621 "dbm_nextkey()\n"
10622 "dbm_open()\n"
10623 "dbm_store()\n"
10624 "dlclose()\n"
10625 "dlopen()\n"
10626 "dprintf() [POSIX.1-2008 で追加された]\n"
10627 "endgrent()\n"
10628 "endhostent()\n"
10629 "endnetent()\n"
10630 "endprotoent()\n"
10631 "endpwent()\n"
10632 "endservent()\n"
10633 "endutxent()\n"
10634 "faccessat() [POSIX.1-2008 で追加された]\n"
10635 "fchmod() [POSIX.1-2008 で追加された]\n"
10636 "fchmodat() [POSIX.1-2008 で追加された]\n"
10637 "fchown() [POSIX.1-2008 で追加された]\n"
10638 "fchownat() [POSIX.1-2008 で追加された]\n"
10639 "fclose()\n"
10640 "fcntl() (cmd 引き数が何であっても)\n"
10641 "fflush()\n"
10642 "fgetc()\n"
10643 "fgetpos()\n"
10644 "fgets()\n"
10645 "fgetwc()\n"
10646 "fgetws()\n"
10647 "fmtmsg()\n"
10648 "fopen()\n"
10649 "fpathconf()\n"
10650 "fprintf()\n"
10651 "fputc()\n"
10652 "fputs()\n"
10653 "fputwc()\n"
10654 "fputws()\n"
10655 "fread()\n"
10656 "freopen()\n"
10657 "fscanf()\n"
10658 "fseek()\n"
10659 "fseeko()\n"
10660 "fsetpos()\n"
10661 "fstat()\n"
10662 "fstatat() [POSIX.1-2008 で追加された]\n"
10663 "ftell()\n"
10664 "ftello()\n"
10665 "ftw()\n"
10666 "futimens() [POSIX.1-2008 で追加された]\n"
10667 "fwprintf()\n"
10668 "fwrite()\n"
10669 "fwscanf()\n"
10670 "getaddrinfo()\n"
10671 "getc()\n"
10672 "getc_unlocked()\n"
10673 "getchar()\n"
10674 "getchar_unlocked()\n"
10675 "getcwd()\n"
10676 "getdate()\n"
10677 "getdelim() [POSIX.1-2008 で追加された]\n"
10678 "getgrent()\n"
10679 "getgrgid()\n"
10680 "getgrgid_r()\n"
10681 "getgrnam()\n"
10682 "getgrnam_r()\n"
10683 "gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10684 "gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10685 "gethostent()\n"
10686 "gethostid()\n"
10687 "gethostname()\n"
10688 "getline() [POSIX.1-2008 で追加された]\n"
10689 "getlogin()\n"
10690 "getlogin_r()\n"
10691 "getnameinfo()\n"
10692 "getnetbyaddr()\n"
10693 "getnetbyname()\n"
10694 "getnetent()\n"
10695 "getopt() (opterr が 0 以外の場合)\n"
10696 "getprotobyname()\n"
10697 "getprotobynumber()\n"
10698 "getprotoent()\n"
10699 "getpwent()\n"
10700 "getpwnam()\n"
10701 "getpwnam_r()\n"
10702 "getpwuid()\n"
10703 "getpwuid_r()\n"
10704 "gets()\n"
10705 "getservbyname()\n"
10706 "getservbyport()\n"
10707 "getservent()\n"
10708 "getutxent()\n"
10709 "getutxid()\n"
10710 "getutxline()\n"
10711 "getwc()\n"
10712 "getwchar()\n"
10713 "getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]\n"
10714 "glob()\n"
10715 "iconv_close()\n"
10716 "iconv_open()\n"
10717 "ioctl()\n"
10718 "link()\n"
10719 "linkat() [POSIX.1-2008 で追加された]\n"
10720 "lio_listio() [POSIX.1-2008 で追加された]\n"
10721 "localtime()\n"
10722 "localtime_r()\n"
10723 "lockf() [POSIX.1-2008 で追加された]\n"
10724 "lseek()\n"
10725 "lstat()\n"
10726 "mkdir() [POSIX.1-2008 で追加された]\n"
10727 "mkdirat() [POSIX.1-2008 で追加された]\n"
10728 "mkdtemp() [POSIX.1-2008 で追加された]\n"
10729 "mkfifo() [POSIX.1-2008 で追加された]\n"
10730 "mkfifoat() [POSIX.1-2008 で追加された]\n"
10731 "mknod() [POSIX.1-2008 で追加された]\n"
10732 "mknodat() [POSIX.1-2008 で追加された]\n"
10733 "mkstemp()\n"
10734 "mktime()\n"
10735 "nftw()\n"
10736 "opendir()\n"
10737 "openlog()\n"
10738 "pathconf()\n"
10739 "pclose()\n"
10740 "perror()\n"
10741 "popen()\n"
10742 "posix_fadvise()\n"
10743 "posix_fallocate()\n"
10744 "posix_madvise()\n"
10745 "posix_openpt()\n"
10746 "posix_spawn()\n"
10747 "posix_spawnp()\n"
10748 "posix_trace_clear()\n"
10749 "posix_trace_close()\n"
10750 "posix_trace_create()\n"
10751 "posix_trace_create_withlog()\n"
10752 "posix_trace_eventtypelist_getnext_id()\n"
10753 "posix_trace_eventtypelist_rewind()\n"
10754 "posix_trace_flush()\n"
10755 "posix_trace_get_attr()\n"
10756 "posix_trace_get_filter()\n"
10757 "posix_trace_get_status()\n"
10758 "posix_trace_getnext_event()\n"
10759 "posix_trace_open()\n"
10760 "posix_trace_rewind()\n"
10761 "posix_trace_set_filter()\n"
10762 "posix_trace_shutdown()\n"
10763 "posix_trace_timedgetnext_event()\n"
10764 "posix_typed_mem_open()\n"
10765 "printf()\n"
10766 "psiginfo() [POSIX.1-2008 で追加された]\n"
10767 "psignal() [POSIX.1-2008 で追加された]\n"
10768 "pthread_rwlock_rdlock()\n"
10769 "pthread_rwlock_timedrdlock()\n"
10770 "pthread_rwlock_timedwrlock()\n"
10771 "pthread_rwlock_wrlock()\n"
10772 "putc()\n"
10773 "putc_unlocked()\n"
10774 "putchar()\n"
10775 "putchar_unlocked()\n"
10776 "puts()\n"
10777 "pututxline()\n"
10778 "putwc()\n"
10779 "putwchar()\n"
10780 "readdir()\n"
10781 "readdir_r()\n"
10782 "readlink() [POSIX.1-2008 で追加された]\n"
10783 "readlinkat() [POSIX.1-2008 で追加された]\n"
10784 "remove()\n"
10785 "rename()\n"
10786 "renameat() [POSIX.1-2008 で追加された]\n"
10787 "rewind()\n"
10788 "rewinddir()\n"
10789 "scandir() [POSIX.1-2008 で追加された]\n"
10790 "scanf()\n"
10791 "seekdir()\n"
10792 "semop()\n"
10793 "setgrent()\n"
10794 "sethostent()\n"
10795 "setnetent()\n"
10796 "setprotoent()\n"
10797 "setpwent()\n"
10798 "setservent()\n"
10799 "setutxent()\n"
10800 "sigpause() [POSIX.1-2008 で追加された]\n"
10801 "stat()\n"
10802 "strerror()\n"
10803 "strerror_r()\n"
10804 "strftime()\n"
10805 "symlink()\n"
10806 "symlinkat() [POSIX.1-2008 で追加された]\n"
10807 "sync()\n"
10808 "syslog()\n"
10809 "tmpfile()\n"
10810 "tmpnam()\n"
10811 "ttyname()\n"
10812 "ttyname_r()\n"
10813 "tzset()\n"
10814 "ungetc()\n"
10815 "ungetwc()\n"
10816 "unlink()\n"
10817 "unlinkat() [POSIX.1-2008 で追加された]\n"
10818 "utime() [POSIX.1-2008 で追加された]\n"
10819 "utimensat() [POSIX.1-2008 で追加された]\n"
10820 "utimes() [POSIX.1-2008 で追加された]\n"
10821 "vdprintf() [POSIX.1-2008 で追加された]\n"
10822 "vfprintf()\n"
10823 "vfwprintf()\n"
10824 "vprintf()\n"
10825 "vwprintf()\n"
10826 "wcsftime()\n"
10827 "wordexp()\n"
10828 "wprintf()\n"
10829 "wscanf()\n"
10830
10831 #.  So, scanning "cancellation point" comments in the glibc 2.8 header
10832 #.  files, it looks as though at least the following nonstandard
10833 #.  functions are cancellation points:
10834 #.  endnetgrent
10835 #.  endspent
10836 #.  epoll_pwait
10837 #.  epoll_wait
10838 #.  fcloseall
10839 #.  fdopendir
10840 #.  fflush_unlocked
10841 #.  fgetc_unlocked
10842 #.  fgetgrent
10843 #.  fgetgrent_r
10844 #.  fgetpwent
10845 #.  fgetpwent_r
10846 #.  fgets_unlocked
10847 #.  fgetspent
10848 #.  fgetspent_r
10849 #.  fgetwc_unlocked
10850 #.  fgetws_unlocked
10851 #.  fputc_unlocked
10852 #.  fputs_unlocked
10853 #.  fputwc_unlocked
10854 #.  fputws_unlocked
10855 #.  fread_unlocked
10856 #.  fwrite_unlocked
10857 #.  gai_suspend
10858 #.  getaddrinfo_a
10859 #.  getdate_r
10860 #.  getgrent_r
10861 #.  getgrouplist
10862 #.  gethostbyaddr_r
10863 #.  gethostbyname2
10864 #.  gethostbyname2_r
10865 #.  gethostbyname_r
10866 #.  gethostent_r
10867 #.  getnetbyaddr_r
10868 #.  getnetbyname_r
10869 #.  getnetent_r
10870 #.  getnetgrent
10871 #.  getnetgrent_r
10872 #.  getprotobyname_r
10873 #.  getprotobynumber_r
10874 #.  getprotoent_r
10875 #.  getpw
10876 #.  getpwent_r
10877 #.  getservbyname_r
10878 #.  getservbyport_r
10879 #.  getservent_r
10880 #.  getspent
10881 #.  getspent_r
10882 #.  getspnam
10883 #.  getspnam_r
10884 #.  getutmp
10885 #.  getutmpx
10886 #.  getw
10887 #.  getwc_unlocked
10888 #.  getwchar_unlocked
10889 #.  initgroups
10890 #.  innetgr
10891 #.  mkostemp
10892 #.  mkostemp64
10893 #.  mkstemp64
10894 #.  ppoll
10895 #.  pthread_timedjoin_np
10896 #.  putgrent
10897 #.  putpwent
10898 #.  putspent
10899 #.  putw
10900 #.  putwc_unlocked
10901 #.  putwchar_unlocked
10902 #.  rcmd
10903 #.  rcmd_af
10904 #.  rexec
10905 #.  rexec_af
10906 #.  rresvport
10907 #.  rresvport_af
10908 #.  ruserok
10909 #.  ruserok_af
10910 #.  setnetgrent
10911 #.  setspent
10912 #.  sgetspent
10913 #.  sgetspent_r
10914 #.  updwtmpx
10915 #.  utmpxname
10916 #.  vfscanf
10917 #.  vfwscanf
10918 #.  vscanf
10919 #.  vsyslog
10920 #.  vwscanf
10921 #. type: Plain text
10922 #: build/C/man7/pthreads.7:655
10923 msgid ""
10924 "An implementation may also mark other functions not specified in the "
10925 "standard as cancellation points.  In particular, an implementation is likely "
10926 "to mark any nonstandard function that may block as a cancellation point.  "
10927 "(This includes most functions that can touch files.)"
10928 msgstr ""
10929 "実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすること"
10930 "も認められている。 特に、停止 (block) する可能性がある非標準の関数を取り消し"
10931 "ポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの"
10932 "関数がこれに含まれる)。"
10933
10934 #. type: SS
10935 #: build/C/man7/pthreads.7:655
10936 #, no-wrap
10937 msgid "Compiling on Linux"
10938 msgstr "Linux でのコンパイル"
10939
10940 #. type: Plain text
10941 #: build/C/man7/pthreads.7:658
10942 msgid ""
10943 "On Linux, programs that use the Pthreads API should be compiled using I<cc -"
10944 "pthread>."
10945 msgstr ""
10946 "Linux では、Pthreads API を用いたプログラムは I<cc -pthread> でコンパイルすべ"
10947 "きである。"
10948
10949 #. type: SS
10950 #: build/C/man7/pthreads.7:658
10951 #, fuzzy, no-wrap
10952 #| msgid "Linux Implementations of POSIX Threads"
10953 msgid "Linux implementations of POSIX threads"
10954 msgstr "POSIX スレッドの Linux での実装"
10955
10956 #. type: Plain text
10957 #: build/C/man7/pthreads.7:661
10958 msgid ""
10959 "Over time, two threading implementations have been provided by the GNU C "
10960 "library on Linux:"
10961 msgstr ""
10962 "これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてき"
10963 "た。"
10964
10965 #. type: TP
10966 #: build/C/man7/pthreads.7:661
10967 #, no-wrap
10968 msgid "B<LinuxThreads>"
10969 msgstr "B<LinuxThreads>"
10970
10971 #. type: Plain text
10972 #: build/C/man7/pthreads.7:665
10973 msgid ""
10974 "This is the original Pthreads implementation.  Since glibc 2.4, this "
10975 "implementation is no longer supported."
10976 msgstr ""
10977 "最初の Pthreads の実装。\n"
10978 "glibc 2.4 以降は、この実装はもはやサポートされていない。"
10979
10980 #. type: TP
10981 #: build/C/man7/pthreads.7:665
10982 #, no-wrap
10983 msgid "B<NPTL> (Native POSIX Threads Library)"
10984 msgstr "B<NPTL> (Native POSIX Threads Library)"
10985
10986 #. type: Plain text
10987 #: build/C/man7/pthreads.7:673
10988 msgid ""
10989 "This is the modern Pthreads implementation.  By comparison with "
10990 "LinuxThreads, NPTL provides closer conformance to the requirements of the "
10991 "POSIX.1 specification and better performance when creating large numbers of "
10992 "threads.  NPTL is available since glibc 2.3.2, and requires features that "
10993 "are present in the Linux 2.6 kernel."
10994 msgstr ""
10995 "新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様"
10996 "への準拠の度合いが高く、 多数のスレッドを作成した際の性能も高い。 NPTL は "
10997 "glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6 カーネルに実"
10998 "装されている機能が必要である。"
10999
11000 #. type: Plain text
11001 #: build/C/man7/pthreads.7:683
11002 msgid ""
11003 "Both of these are so-called 1:1 implementations, meaning that each thread "
11004 "maps to a kernel scheduling entity.  Both threading implementations employ "
11005 "the Linux B<clone>(2)  system call.  In NPTL, thread synchronization "
11006 "primitives (mutexes, thread joining, and so on) are implemented using the "
11007 "Linux B<futex>(2)  system call."
11008 msgstr ""
11009 "どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケ"
11010 "ジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux の "
11011 "B<clone>(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機"
11012 "構 (mutex や スレッドの join 等) は Linux の B<futex>(2)  システムコールを"
11013 "使って実装されている。"
11014
11015 #. type: SS
11016 #: build/C/man7/pthreads.7:683
11017 #, no-wrap
11018 msgid "LinuxThreads"
11019 msgstr "LinuxThreads"
11020
11021 #. type: Plain text
11022 #: build/C/man7/pthreads.7:685
11023 msgid "The notable features of this implementation are the following:"
11024 msgstr "この実装の大きな特徴は以下の通りである:"
11025
11026 #. type: Plain text
11027 #: build/C/man7/pthreads.7:692
11028 msgid ""
11029 "In addition to the main (initial) thread, and the threads that the program "
11030 "creates using B<pthread_create>(3), the implementation creates a \"manager\" "
11031 "thread.  This thread handles thread creation and termination.  (Problems can "
11032 "result if this thread is inadvertently killed.)"
11033 msgstr ""
11034 "メインスレッド (最初のスレッド) とプログラムが B<pthread_create>(3)  を使って"
11035 "作成したスレッドに加え、 この実装では「管理 (manager)」スレッドが作成され"
11036 "る。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり "
11037 "kill されると、問題が起こることがある)。"
11038
11039 #. type: Plain text
11040 #: build/C/man7/pthreads.7:704
11041 msgid ""
11042 "Signals are used internally by the implementation.  On Linux 2.2 and later, "
11043 "the first three real-time signals are used (see also B<signal>(7)).  On "
11044 "older Linux kernels, B<SIGUSR1> and B<SIGUSR2> are used.  Applications must "
11045 "avoid the use of whichever set of signals is employed by the implementation."
11046 msgstr ""
11047 "この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシ"
11048 "グナルのうち最初の 3つが使われる (B<signal>(7)  参照)。 それ以前のカーネルで"
11049 "は B<SIGUSR1> と B<SIGUSR2> が使われる。 アプリケーションは、スレッド実装で利"
11050 "用されているシグナルを どれも使わないようにしなければならない。"
11051
11052 #. type: Plain text
11053 #: build/C/man7/pthreads.7:711
11054 msgid ""
11055 "Threads do not share process IDs.  (In effect, LinuxThreads threads are "
11056 "implemented as processes which share more information than usual, but which "
11057 "do not share a common process ID.)  LinuxThreads threads (including the "
11058 "manager thread)  are visible as separate processes using B<ps>(1)."
11059 msgstr ""
11060 "スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常"
11061 "よりは情報を共有するプロセスとして 実装されているが、一つの共通のプロセス ID "
11062 "を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは B<ps>(1)  "
11063 "を使うと別のプロセスのように見える。"
11064
11065 #. type: Plain text
11066 #: build/C/man7/pthreads.7:714
11067 msgid ""
11068 "The LinuxThreads implementation deviates from the POSIX.1 specification in a "
11069 "number of ways, including the following:"
11070 msgstr ""
11071 "LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に"
11072 "示すような点がある:"
11073
11074 #. type: Plain text
11075 #: build/C/man7/pthreads.7:718
11076 msgid "Calls to B<getpid>(2)  return a different value in each thread."
11077 msgstr "B<getpid>(2)  を呼び出したときに、スレッド毎に異なる値が返される。"
11078
11079 #. type: Plain text
11080 #: build/C/man7/pthreads.7:727
11081 msgid ""
11082 "Calls to B<getppid>(2)  in threads other than the main thread return the "
11083 "process ID of the manager thread; instead B<getppid>(2)  in these threads "
11084 "should return the same value as B<getppid>(2)  in the main thread."
11085 msgstr ""
11086 "メインスレッド以外のスレッドで B<getppid>(2)  を呼び出すと、管理スレッドのプ"
11087 "ロセス ID が返される。 本当は、これらのスレッドで B<getppid>(2)  を呼んだ場合"
11088 "にはメインスレッドでの B<getppid>(2)  と同じ値が返るべきである。"
11089
11090 #. type: Plain text
11091 #: build/C/man7/pthreads.7:737
11092 msgid ""
11093 "When one thread creates a new child process using B<fork>(2), any thread "
11094 "should be able to B<wait>(2)  on the child.  However, the implementation "
11095 "only allows the thread that created the child to B<wait>(2)  on it."
11096 msgstr ""
11097 "あるスレッドが B<fork>(2)  を使って新しい子プロセスを作成した場合、 どのス"
11098 "レッドでもこの子プロセスを B<wait>(2)  できるべきである。しかしながら、この実"
11099 "装では子プロセスを作成した スレッドだけがこの子プロセスを B<wait>(2)  でき"
11100 "る。"
11101
11102 #. type: Plain text
11103 #: build/C/man7/pthreads.7:744
11104 msgid ""
11105 "When a thread calls B<execve>(2), all other threads are terminated (as "
11106 "required by POSIX.1).  However, the resulting process has the same PID as "
11107 "the thread that called B<execve>(2): it should have the same PID as the main "
11108 "thread."
11109 msgstr ""
11110 "あるスレッドが B<execve>(2)  を呼び出した場合、他のスレッドは全て終了される "
11111 "(POSIX.1 の仕様通り)。 しかしながら、新しいプロセスは B<execve>(2)  を呼んだ"
11112 "スレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID を持つべきであ"
11113 "る。"
11114
11115 #. type: Plain text
11116 #: build/C/man7/pthreads.7:751
11117 msgid ""
11118 "Threads do not share user and group IDs.  This can cause complications with "
11119 "set-user-ID programs and can cause failures in Pthreads functions if an "
11120 "application changes its credentials using B<seteuid>(2)  or similar."
11121 msgstr ""
11122 "スレッド間でユーザ ID とグループ ID が共有されない このことは、set-user-ID プ"
11123 "ログラムで面倒な事態を招いたり、 アプリケーションが B<seteuid>(2)  などを使っ"
11124 "て信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。"
11125
11126 #. type: Plain text
11127 #: build/C/man7/pthreads.7:753
11128 msgid "Threads do not share a common session ID and process group ID."
11129 msgstr "スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。"
11130
11131 #. type: Plain text
11132 #: build/C/man7/pthreads.7:756
11133 msgid "Threads do not share record locks created using B<fcntl>(2)."
11134 msgstr ""
11135 "スレッド間で B<fcntl>(2)  を使って作成されるレコード・ロックを共有しない。"
11136
11137 #. type: Plain text
11138 #: build/C/man7/pthreads.7:762
11139 msgid ""
11140 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11141 "rather than process-wide."
11142 msgstr ""
11143 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11144 "単位の情報である。"
11145
11146 #. type: Plain text
11147 #: build/C/man7/pthreads.7:765
11148 msgid "Threads do not share semaphore undo values (see B<semop>(2))."
11149 msgstr "スレッド間でセマフォのアンドゥ値 (B<semop>(2)  参照) を共有しない。"
11150
11151 #. type: Plain text
11152 #: build/C/man7/pthreads.7:767
11153 msgid "Threads do not share interval timers."
11154 msgstr "スレッド間でインターバル・タイマを共有しない。"
11155
11156 #.  FIXME . bug report filed for NPTL nice nonconformance
11157 #.  http://bugzilla.kernel.org/show_bug.cgi?id=6258
11158 #.  Sep 08: there is a patch by Denys Vlasenko to address this
11159 #.  "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
11160 #.  Monitor this to see if it makes it into mainline.
11161 #. type: Plain text
11162 #: build/C/man7/pthreads.7:769 build/C/man7/pthreads.7:806
11163 msgid "Threads do not share a common nice value."
11164 msgstr "スレッドは共通の nice 値を共有しない。"
11165
11166 #. type: Plain text
11167 #: build/C/man7/pthreads.7:779
11168 msgid ""
11169 "POSIX.1 distinguishes the notions of signals that are directed to the "
11170 "process as a whole and signals that are directed to individual threads.  "
11171 "According to POSIX.1, a process-directed signal (sent using B<kill>(2), for "
11172 "example) should be handled by a single, arbitrarily selected thread within "
11173 "the process.  LinuxThreads does not support the notion of process-directed "
11174 "signals: signals may only be sent to specific threads."
11175 msgstr ""
11176 "POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送ら"
11177 "れるシグナルを区別して考えている。 POSIX.1 によると、プロセスに送られたシグナ"
11178 "ル (例えば B<kill>(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝"
11179 "手に (arbitrarily) に選択された一つのスレッドにより処理される ことになってい"
11180 "る。LinuxThreads はプロセスに送られるシグナルの 概念に対応しておらず、シグナ"
11181 "ルは特定のスレッドにだけ送ることができる。"
11182
11183 #. type: Plain text
11184 #: build/C/man7/pthreads.7:788
11185 msgid ""
11186 "Threads have distinct alternate signal stack settings.  However, a new "
11187 "thread's alternate signal stack settings are copied from the thread that "
11188 "created it, so that the threads initially share an alternate signal stack.  "
11189 "(A new thread should start with no alternate signal stack defined.  If two "
11190 "threads handle signals on their shared alternate signal stack at the same "
11191 "time, unpredictable program failures are likely to occur.)"
11192 msgstr ""
11193 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11194 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11195 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する。 (仕様で"
11196 "は、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべ"
11197 "きとされている。 2つのスレッドが共有されている代替シグナルスタック上で同時に "
11198 "シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)"
11199
11200 #. type: SS
11201 #: build/C/man7/pthreads.7:788
11202 #, no-wrap
11203 msgid "NPTL"
11204 msgstr "NPTL"
11205
11206 #. type: Plain text
11207 #: build/C/man7/pthreads.7:797
11208 msgid ""
11209 "With NPTL, all of the threads in a process are placed in the same thread "
11210 "group; all members of a thread group share the same PID.  NPTL does not "
11211 "employ a manager thread.  NPTL makes internal use of the first two real-time "
11212 "signals (see also B<signal>(7)); these signals cannot be used in "
11213 "applications."
11214 msgstr ""
11215 "NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; "
11216 "スレッド・グループの全メンバーは同じ PID を共有する。 NPTL は管理スレッド "
11217 "(manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初"
11218 "の 2つの番号を使用しており (B<signal>(7)  参照)、これらのシグナルはアプリケー"
11219 "ションでは使用できない。"
11220
11221 #. type: Plain text
11222 #: build/C/man7/pthreads.7:799
11223 msgid "NPTL still has at least one nonconformance with POSIX.1:"
11224 msgstr "NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:"
11225
11226 #. type: Plain text
11227 #: build/C/man7/pthreads.7:808
11228 msgid "Some NPTL nonconformances only occur with older kernels:"
11229 msgstr "NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:"
11230
11231 #. type: Plain text
11232 #: build/C/man7/pthreads.7:814
11233 msgid ""
11234 "The information returned by B<times>(2)  and B<getrusage>(2)  is per-thread "
11235 "rather than process-wide (fixed in kernel 2.6.9)."
11236 msgstr ""
11237 "B<times>(2)  と B<getrusage>(2)  が返す情報がプロセス全体の情報でなくスレッド"
11238 "単位の情報である (カーネル 2.6.9 で修正された)。"
11239
11240 #. type: Plain text
11241 #: build/C/man7/pthreads.7:816
11242 msgid "Threads do not share resource limits (fixed in kernel 2.6.10)."
11243 msgstr "スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。"
11244
11245 #. type: Plain text
11246 #: build/C/man7/pthreads.7:818
11247 msgid "Threads do not share interval timers (fixed in kernel 2.6.12)."
11248 msgstr ""
11249 "スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。"
11250
11251 #. type: Plain text
11252 #: build/C/man7/pthreads.7:822
11253 msgid ""
11254 "Only the main thread is permitted to start a new session using B<setsid>(2)  "
11255 "(fixed in kernel 2.6.16)."
11256 msgstr ""
11257 "メインスレッドだけが B<setsid>(2)  を使って新しいセッションを開始することがで"
11258 "きる (カーネル 2.6.16 で修正された)。"
11259
11260 #. type: Plain text
11261 #: build/C/man7/pthreads.7:827
11262 msgid ""
11263 "Only the main thread is permitted to make the process into a process group "
11264 "leader using B<setpgid>(2)  (fixed in kernel 2.6.16)."
11265 msgstr ""
11266 "メインスレッドだけが B<setpgid>(2)  を使ってそのプロセスをプロセス・グルー"
11267 "プ・リーダーにすることができる (カーネル 2.6.16 で修正された)。"
11268
11269 #. type: Plain text
11270 #: build/C/man7/pthreads.7:833
11271 msgid ""
11272 "Threads have distinct alternate signal stack settings.  However, a new "
11273 "thread's alternate signal stack settings are copied from the thread that "
11274 "created it, so that the threads initially share an alternate signal stack "
11275 "(fixed in kernel 2.6.16)."
11276 msgstr ""
11277 "スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいス"
11278 "レッドの代替シグナルスタックの設定は そのスレッドを作成したスレッドからコピー"
11279 "され、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネ"
11280 "ル 2.6.16 で修正された)。"
11281
11282 #. type: Plain text
11283 #: build/C/man7/pthreads.7:835
11284 msgid "Note the following further points about the NPTL implementation:"
11285 msgstr "NPTL の実装では以下の点についても注意すること:"
11286
11287 #. type: Plain text
11288 #: build/C/man7/pthreads.7:849
11289 msgid ""
11290 "If the stack size soft resource limit (see the description of "
11291 "B<RLIMIT_STACK> in B<setrlimit>(2))  is set to a value other than "
11292 "I<unlimited>, then this value defines the default stack size for new "
11293 "threads.  To be effective, this limit must be set before the program is "
11294 "executed, perhaps using the I<ulimit -s> shell built-in command (I<limit "
11295 "stacksize> in the C shell)."
11296 msgstr ""
11297 "スタックサイズのリソースのソフト・リミット (B<setrlimit>(2)  の "
11298 "B<RLIMIT_STACK> の説明を参照) が I<unlimited> 以外の値に設定されている場合、"
11299 "ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。 設"
11300 "定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなけ"
11301 "ればならない。たいていは、シェルの組み込みコマンドの I<ulimit -s> (C シェルで"
11302 "は I<limit stacksize>)  を使って設定する。"
11303
11304 #. type: SS
11305 #: build/C/man7/pthreads.7:849
11306 #, fuzzy, no-wrap
11307 #| msgid "Determining the Threading Implementation"
11308 msgid "Determining the threading implementation"
11309 msgstr "スレッド実装の判定"
11310
11311 #. type: Plain text
11312 #: build/C/man7/pthreads.7:854
11313 msgid ""
11314 "Since glibc 2.3.2, the B<getconf>(1)  command can be used to determine the "
11315 "system's threading implementation, for example:"
11316 msgstr ""
11317 "glibc 2.3.2 以降では、 B<getconf>(1)  コマンドを使って、 システムのスレッド実"
11318 "装を判定することができる。 以下に例を示す:"
11319
11320 #. type: Plain text
11321 #: build/C/man7/pthreads.7:859
11322 #, no-wrap
11323 msgid ""
11324 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11325 "NPTL 2.3.4\n"
11326 msgstr ""
11327 "bash$ getconf GNU_LIBPTHREAD_VERSION\n"
11328 "NPTL 2.3.4\n"
11329
11330 #. type: Plain text
11331 #: build/C/man7/pthreads.7:864
11332 msgid ""
11333 "With older glibc versions, a command such as the following should be "
11334 "sufficient to determine the default threading implementation:"
11335 msgstr ""
11336 "ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッ"
11337 "ド実装を判定することができる。"
11338
11339 #. type: Plain text
11340 #: build/C/man7/pthreads.7:870
11341 #, no-wrap
11342 msgid ""
11343 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11344 "                egrep -i \\(aqthreads|nptl\\(aq\n"
11345 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11346 msgstr ""
11347 "bash$ $( ldd /bin/ls | grep libc.so | awk \\(aq{print $3}\\(aq ) | \\e\n"
11348 "                egrep -i \\(aqthreads|ntpl\\(aq\n"
11349 "        Native POSIX Threads Library by Ulrich Drepper et al\n"
11350
11351 #. type: SS
11352 #: build/C/man7/pthreads.7:872
11353 #, fuzzy, no-wrap
11354 #| msgid "Selecting the Threading Implementation: LD_ASSUME_KERNEL"
11355 msgid "Selecting the threading implementation: LD_ASSUME_KERNEL"
11356 msgstr "スレッドの実装の選択: LD_ASSUME_KERNEL"
11357
11358 #. type: Plain text
11359 #: build/C/man7/pthreads.7:887
11360 msgid ""
11361 "On systems with a glibc that supports both LinuxThreads and NPTL (i.e., "
11362 "glibc 2.3.I<x>), the B<LD_ASSUME_KERNEL> environment variable can be used to "
11363 "override the dynamic linker's default choice of threading implementation.  "
11364 "This variable tells the dynamic linker to assume that it is running on top "
11365 "of a particular kernel version.  By specifying a kernel version that does "
11366 "not provide the support required by NPTL, we can force the use of "
11367 "LinuxThreads.  (The most likely reason for doing this is to run a (broken) "
11368 "application that depends on some nonconformant behavior in LinuxThreads.)  "
11369 "For example:"
11370 msgstr ""
11371 "LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.I<x>) があるシ"
11372 "ステムでは、 B<LD_ASSUME_KERNEL> 環境変数を使うことで、動的リンカがデフォルト"
11373 "で 選択するスレッド実装を上書きすることができる。 この変数により、動的リンカ"
11374 "が特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL "
11375 "が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、"
11376 "強制的に LinuxThreads を使うことができる (このようなことをする最もありそうな"
11377 "場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーショ"
11378 "ン を動作させる場合だろう)。 以下に例を示す:"
11379
11380 #. type: Plain text
11381 #: build/C/man7/pthreads.7:893
11382 #, no-wrap
11383 msgid ""
11384 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11385 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11386 "        linuxthreads-0.10 by Xavier Leroy\n"
11387 msgstr ""
11388 "bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\e\n"
11389 "                awk \\(aq{print $3}\\(aq ) | egrep -i \\(aqthreads|ntpl\\(aq\n"
11390 "        linuxthreads-0.10 by Xavier Leroy\n"
11391
11392 #. type: Plain text
11393 #: build/C/man7/pthreads.7:905
11394 msgid ""
11395 "B<clone>(2), B<futex>(2), B<gettid>(2), B<proc>(5), B<futex>(7), B<sigevent>"
11396 "(7), B<signal>(7),"
11397 msgstr ""
11398 "B<clone>(2), B<futex>(2), B<gettid>(2), B<futex>(7), B<sigevent>(7), "
11399 "B<signal>(7),"
11400
11401 #. type: Plain text
11402 #: build/C/man7/pthreads.7:929
11403 #, fuzzy
11404 #| msgid ""
11405 #| "and various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11406 #| "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11407 #| "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11408 #| "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11409 #| "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11410 #| "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11411 #| "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11412 #| "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>"
11413 #| "(3)"
11414 msgid ""
11415 "Various Pthreads manual pages, for example: B<pthread_attr_init>(3), "
11416 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3), "
11417 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3), "
11418 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3), "
11419 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3), "
11420 "B<pthread_mutex_unlock>(3), B<pthread_once>(3), B<pthread_setcancelstate>"
11421 "(3), B<pthread_setcanceltype>(3), B<pthread_setspecific>(3), "
11422 "B<pthread_sigmask>(3), B<pthread_sigqueue>(3), and B<pthread_testcancel>(3)"
11423 msgstr ""
11424 "および Pthreads の各種マニュアルページ、例えば: B<pthread_attr_init>(3),\n"
11425 "B<pthread_atfork>(3), B<pthread_cancel>(3), B<pthread_cleanup_push>(3),\n"
11426 "B<pthread_cond_signal>(3), B<pthread_cond_wait>(3), B<pthread_create>(3),\n"
11427 "B<pthread_detach>(3), B<pthread_equal>(3), B<pthread_exit>(3),\n"
11428 "B<pthread_key_create>(3), B<pthread_kill>(3), B<pthread_mutex_lock>(3),\n"
11429 "B<pthread_mutex_unlock>(3), B<pthread_once>(3),\n"
11430 "B<pthread_setcancelstate>(3), B<pthread_setcanceltype>(3),\n"
11431 "B<pthread_setspecific>(3), B<pthread_sigmask>(3), B<pthread_sigqueue>(3),\n"
11432 "and B<pthread_testcancel>(3)"
11433
11434 #~ msgid "2009-03-31"
11435 #~ msgstr "2009-03-31"
11436
11437 #~ msgid ""
11438 #~ "B<getcontext>(2), B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), "
11439 #~ "B<sigsetjmp>(3)"
11440 #~ msgstr ""
11441 #~ "B<getcontext>(2), B<sigaction>(2), B<sigaltstack>(2), B<sigprocmask>(2), "
11442 #~ "B<sigsetjmp>(3)"
11443
11444 #~ msgid "2009-01-28"
11445 #~ msgstr "2009-01-28"
11446
11447 #~ msgid "2011-10-16"
11448 #~ msgstr "2011-10-16"
11449
11450 #~ msgid "2011-09-23"
11451 #~ msgstr "2011-09-23"