OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man7 / pthreads.7
index cdfae9e..f4bad4b 100644 (file)
@@ -1,4 +1,4 @@
-'\" t
+.\" t
 .\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
-.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
-.\" Translated 2005-09-06, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
-.\" Updated 2006-04-15, Akihiro MOTOKI, LDP v2.29
-.\" Updated 2007-01-05, Akihiro MOTOKI, LDP v2.43
-.\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
-.\" Updated 2008-11-05, Akihiro MOTOKI, LDP v3.12
-.\" Updated 2008-11-09, Akihiro MOTOKI, LDP v3.13
-.\" Updated 2008-12-26, Akihiro MOTOKI, LDP v3.14
+.\"*******************************************************************
 .\"
-.\"WORD:       manager thread          管理スレッド
-.\"WORD:       thread group            スレッド・グループ
-.\"WORD:       real-time signal        リアルタイムシグナル
-.\"WORD:       non-conformant          標準非準拠の
-.\"WORD:       alternate signal stack  代替シグナルスタック
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH PTHREADS 7  2008-11-18 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\"*******************************************************************
+.TH PTHREADS 7 2010\-11\-14 Linux "Linux Programmer's Manual"
 .SH 名前
-.\"O pthreads \- POSIX threads
 pthreads \- POSIX スレッド
-.\"O .SH DESCRIPTION
 .SH 説明
-.\"O POSIX.1 specifies a set of interfaces (functions, header files) for
-.\"O threaded programming commonly known as POSIX threads, or Pthreads.
-.\"O A single process can contain multiple threads,
-.\"O all of which are executing the same program.
-.\"O These threads share the same global memory (data and heap segments),
-.\"O but each thread has its own stack (automatic variables).
-POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる
-スレッド・プログラミングのインタフェース群 (関数、ヘッダファイル)
-を規定している。一つのプロセスは複数のスレッドを持つことができ、
-全てのスレッドは同じプログラムを実行する。
-これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、
-各スレッドは自分専用のスタック (自動変数) を持つ。
+POSIX.1 は、一般に POSIX スレッドや Pthreads として知られる スレッド・プログラミングのインタフェース群
+(関数、ヘッダファイル)  を規定している。一つのプロセスは複数のスレッドを持つことができ、 全てのスレッドは同じプログラムを実行する。
+これらのスレッドは同じ大域メモリ (データとヒープ領域) を共有するが、 各スレッドは自分専用のスタック (自動変数) を持つ。
 
-.\"O POSIX.1 also requires that threads share a range of other attributes
-.\"O (i.e., these attributes are process-wide rather than per-thread):
-POSIX.1 はスレッド間でどのような属性を共有するかについても定めている
-(つまり、これらの属性はスレッド単位ではなくプロセス全体で共通である):
+POSIX.1 はスレッド間でどのような属性を共有するかについても定めている (つまり、これらの属性はスレッド単位ではなくプロセス全体で共通である):
 .IP \- 3
-.\"O process ID
 プロセス ID
 .IP \- 3
-.\"O parent process ID
 親プロセス ID
 .IP \- 3
-.\"O process group ID and session ID
 プロセスグループ ID とセッション ID
 .IP \- 3
-.\"O controlling terminal
 制御端末
 .IP \- 3
-.\"O user and group IDs
 ユーザ ID とグループ ID
 .IP \- 3
-.\"O open file descriptors
 オープンするファイルディスクリプタ
 .IP \- 3
-.\"O record locks (see
-.\"O .BR fcntl (2))
-レコードのロック
-.RB ( fcntl (3)
-参照)
+レコードのロック (\fBfcntl\fP(3)  参照)
 .IP \- 3
-.\"O signal dispositions
 シグナルの配置
 .IP \- 3
-.\"O file mode creation mask
-.\"O .RB ( umask (2))
-ファイルモード作成マスク
-.RB ( umask (2))
+ファイルモード作成マスク (\fBumask\fP(2))
 .IP \- 3
-.\"O current directory
-カレント・ディレクトリ
-.RB ( chdir (2))
-.\"O and
-.\"O root directory
-とルート・ディレクトリ
-.RB ( chroot (2))
+カレント・ディレクトリ (\fBchdir\fP(2))  とルート・ディレクトリ (\fBchroot\fP(2))
 .IP \- 3
-.\"O interval timers
-インターバル・タイマ
-.RB ( setitimer (2))
-.\"O and POSIX timers
-と POSIX タイマ
-.RB ( timer_create (2))
+インターバル・タイマ (\fBsetitimer\fP(2))  と POSIX タイマ (\fBtimer_create\fP(2))
 .IP \- 3
-.\"O nice value
-nice 値
-.RB ( setpriority (2))
+nice 値 (\fBsetpriority\fP(2))
 .IP \- 3
-.\"O resource limits
-リソース制限
-.RB ( setrlimit (2))
+リソース制限 (\fBsetrlimit\fP(2))
 .IP \- 3
-.\"O measurements of the consumption of CPU time
-.\"O .RB ( times (2))
-.\"O and resources
-.\"O .RB ( getrusage (2))
-CPU 時間
-.RB ( times (2))
-とリソース
-.RB ( getrusage (2))
-の消費状況の計測
+CPU 時間 (\fBtimes\fP(2))  とリソース (\fBgetrusage\fP(2))  の消費状況の計測
 .PP
-.\"O As well as the stack, POSIX.1 specifies that various other
-.\"O attributes are distinct for each thread, including:
-スタックについても、POSIX.1 はどのような属性が
-個々のスレッドで独立に管理されるかを規定している:
+スタックについても、POSIX.1 はどのような属性が 個々のスレッドで独立に管理されるかを規定している:
 .IP \- 3
-.\"O thread ID (the
-.\"O .I pthread_t
-.\"O data type)
-スレッド ID
-.RB ( pthread_t
-データ型)
+スレッド ID (\fBpthread_t\fP データ型)
 .IP \- 3
-.\"O signal mask
-シグナルマスク
-.RB ( pthread_sigmask (3))
+シグナルマスク (\fBpthread_sigmask\fP(3))
 .IP \- 3
-.\"O the
-.\"O .I errno
-.\"O variable
-.I errno
-変数
+\fIerrno\fP 変数
 .IP \- 3
-.\"O alternate signal stack
-代替シグナルスタック
-.RB ( sigaltstack (2))
+代替シグナルスタック (\fBsigaltstack\fP(2))
 .IP \- 3
-.\"O real-time scheduling policy and priority
-リアルタイム・スケジューリングのポリシーと優先度
-.RB ( sched_setscheduler (2)
-.\"O and
-と
-.BR sched_setparam (2))
+リアルタイム・スケジューリングのポリシーと優先度 (\fBsched_setscheduler\fP(2)  と \fBsched_setparam\fP(2))
 .PP
-.\"O The following Linux-specific features are also per-thread:
 以下の Linux 特有の機能もスレッド単位である:
 .IP \- 3
-.\"O capabilities (see
-.\"O .BR capabilities (7))
-ケーパビリティ
-.RB ( capabilities (7)
-参照)
+ケーパビリティ (\fBcapabilities\fP(7)  参照)
 .IP \- 3
-.\"O CPU affinity
-CPU affinity (親和度)
-.RB ( sched_setaffinity (2))
-.\"O .SS "Pthreads function return values"
+CPU affinity (親和度)  (\fBsched_setaffinity\fP(2))
 .SS "pthreads 関数の返り値"
-.\"O Most pthreads functions return 0 on success, and an error number of failure.
-.\"O Note that the pthreads functions do not set
-.\"O .IR errno .
-.\"O For each of the pthreads functions that can return an error,
-.\"O POSIX.1-2001 specifies that the function can never fail with the error
-.\"O .BR EINTR .
-ほとんどの pthreads 関数は成功すると 0 を返し、
-失敗した場合エラー番号を返す。
-pthreads 関数は
-.I errno
-をセットしない点に注意すること。
-POSIX.1-2001 では、
-エラーを返す可能性のある pthreads 関数がエラー
-.B EINTR
+ほとんどの pthreads 関数は成功すると 0 を返し、 失敗した場合エラー番号を返す。 pthreads 関数は \fIerrno\fP
+をセットしない点に注意すること。 POSIX.1\-2001 では、 エラーを返す可能性のある pthreads 関数がエラー \fBEINTR\fP
 で失敗することは決してないと規定している。
-.\"O .SS Thread IDs
 .SS "スレッド ID"
-.\"O Each of the threads in a process has a unique thread identifier
-.\"O (stored in the type
-.\"O .IR pthread_t ).
-.\"O This identifier is returned to the caller of
-.\"O .BR pthread_create (3),
-.\"O and a thread can obtain its own thread identifier using
-.\"O .BR pthread_self (3).
-.\"O Thread IDs are only guaranteed to be unique within a process.
-.\"O A thread ID may be reused after a terminated thread has been joined,
-.\"O or a detached thread has terminated.
-.\"O In all pthreads functions that accept a thread ID as an argument,
-.\"O that ID by definition refers to a thread in
-.\"O the same process as the caller.
-あるプロセス内の各スレッドは
-.RI ( pthread_t
-型の) 一意なスレッド識別子を持つ。
-この識別子は、
-.BR pthread_create (3)
-の呼び出し元に返される。また、スレッドは自身のスレッド識別子を
-.BR pthread_self (3)
-を使って取得できる。
-スレッド ID の一意性が保証されるのは、一つのプロセス内においてのみである。
-終了したスレッドが join された後では、スレッド ID は再利用される可能性がある。
-スレッド ID を引き数に取る全てのスレッド関数において、
-その ID は呼び出し元と同じプロセス内の一つのスレッドを参照する。
-.\"O .SS "Thread-safe functions"
-.SS "スレッドセーフな関数"
-.\"O A thread-safe function is one that can be safely
-.\"O (i.e., it will deliver the same results regardless of whether it is)
-.\"O called from multiple threads at the same time.
-スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な
-(すなわち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。
+あるプロセス内の各スレッドは (\fIpthread_t\fP 型の) 一意なスレッド識別子を持つ。 この識別子は、 \fBpthread_create\fP(3)
+の呼び出し元に返される。また、スレッドは自身のスレッド識別子を \fBpthread_self\fP(3)  を使って取得できる。 スレッド ID
+の一意性が保証されるのは、一つのプロセス内においてのみである。 終了したスレッドが join された後では、スレッド ID は再利用される可能性がある。
+スレッド ID を引き数に取る全てのスレッド関数において、 その ID は呼び出し元と同じプロセス内の一つのスレッドを参照する。
+.SS スレッドセーフな関数
+スレッドセーフな関数は、複数のスレッドから同時に呼び出しても安全な (すなわち、同時に呼び出されたかに関わらず、同じ結果を返す) 関数のことである。
 
-.\"O POSIX.1-2001 and POSIX.1-2008 require that all functions specified
-.\"O in the standard shall be thread-safe,
-.\"O except for the following functions:
-POSIX.1-2001 と POSIX.1-2008では、一部の例外を除き、
-標準で規定されている全ての関数がスレッドセーフであることを要求している。
+POSIX.1\-2001 と POSIX.1\-2008では、一部の例外を除き、 標準で規定されている全ての関数がスレッドセーフであることを要求している。
 以下の関数が例外である。
 .in +4n
 .nf
@@ -236,7 +102,6 @@ asctime()
 basename()
 catgets()
 crypt()
-.\"O ctermid() if passed a non-NULL argument
 ctermid() (NULL でない引き数を渡された場合)
 ctime()
 dbm_clearerr()
@@ -251,17 +116,14 @@ dbm_store()
 dirname()
 dlerror()
 drand48()
-.\"O ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
-ecvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]
+ecvt() [POSIX.1\-2001 のみ (POSIX.1\-2008 で削除された)]
 encrypt()
 endgrent()
 endpwent()
 endutxent()
-.\"O fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
-fcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]
+fcvt() [POSIX.1\-2001 のみ (POSIX.1\-2008 で削除された)]
 ftw()
-.\"O gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
-gcvt() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]
+gcvt() [POSIX.1\-2001 のみ (POSIX.1\-2008 で削除された)]
 getc_unlocked()
 getchar_unlocked()
 getdate()
@@ -269,10 +131,8 @@ getenv()
 getgrent()
 getgrgid()
 getgrnam()
-.\"O gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
-.\"O gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
-gethostbyaddr() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]
-gethostbyname() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]
+gethostbyaddr() [POSIX.1\-2001 のみ (POSIX.1\-2008 で削除された)]
+gethostbyname() [POSIX.1\-2001 のみ (POSIX.1\-2008 で削除された)]
 gethostent()
 getlogin()
 getnetbyaddr()
@@ -319,43 +179,41 @@ setkey()
 setpwent()
 setutxent()
 strerror()
-.\"O strsignal() [Added in POSIX.1-2008]
-strsignal() [POSIX.1-2008 で追加された]
+strsignal() [POSIX.1\-2008 で追加された]
 strtok()
-.\"O system() [Added in POSIX.1-2008]
-system() [POSIX.1-2008 で追加された]
-.\"O tmpnam() if passed a non-NULL argument
+system() [POSIX.1\-2008 で追加された]
 tmpnam() (NULL でない引き数を渡された場合)
 ttyname()
 unsetenv()
-.\"O wcrtomb() if its final argument is NULL
 wcrtomb() (最後の引き数が NULL の場合)
-.\"O wcsrtombs() if its final argument is NULL
 wcsrtombs() (最後の引き数が NULL の場合)
 wcstombs()
 wctomb()
 .fi
 .in
-.\"O .SS Cancellation Points
-.SS 取り消しポイント (cancellation points)
-.\"O POSIX.1 specifies that certain functions must,
-.\"O and certain other functions may, be cancellation points.
-.\"O If a thread is cancelable, its cancelability type is deferred,
-.\"O and a cancellation request is pending for the thread,
-.\"O then the thread is canceled when it calls a function
-.\"O that is a cancellation point.
-POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、
-他の特定の関数は取り消しポイントであってもよいとされている。
-あるスレッドが取り消し可能で、その取り消し種別 (cancelability type)
-が延期 (deferred) で、そのスレッドに対する取り消し要求が処理待ちの場合、
-取り消しポイントである関数を呼び出した時点で、そのスレッドのキャンセルが
-行われる。
+.SS "async\-cancel\-safe 関数"
+async\-cancel\-safe 関数は、
+非同期キャンセル機能が有効になっているアプリケーションで
+安全に呼び出すことができる関数のことである
+(\fBpthread_setcancelstate\fP(3) を参照)。
 
-.\"O The following functions are required to be cancellation points by
-.\"O POSIX.1-2001 and/or POSIX.1-2008:
-POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、
-以下の関数は、取り消しポイント (cancellation points) で
-あることが必須となっている。
+以下の関数だけが、POSIX.1\-2001 と POSIX.1\-2008 で async\-cancel\-safe で
+なければならないとされている。
+.in +4n
+.nf
+
+pthread_cancel()
+pthread_setcancelstate()
+pthread_setcanceltype()
+.fi
+.in
+.SS "取り消しポイント (cancellation points)"
+POSIX.1 の規定では、特定の関数は取り消しポイントでなければならず、 他の特定の関数は取り消しポイントであってもよいとされている。
+あるスレッドが取り消し可能で、その取り消し種別 (cancelability type)  が延期 (deferred)
+で、そのスレッドに対する取り消し要求が処理待ちの場合、 取り消しポイントである関数を呼び出した時点で、そのスレッドのキャンセルが 行われる。
+
+POSIX.1\-2001 と POSIX.1\-2008 の両方、もしくはいずれか一方では、 以下の関数は、取り消しポイント (cancellation
+points) で あることが必須となっている。
 
 .\" FIXME
 .\" Document the list of all functions that are cancellation points in glibc
@@ -382,8 +240,7 @@ msgsnd()
 msync()
 nanosleep()
 open()
-.\"O openat() [Added in POSIX.1-2008]
-openat() [POSIX.1-2008 で追加された]
+openat() [POSIX.1\-2008 で追加された]
 pause()
 poll()
 pread()
@@ -406,8 +263,7 @@ sem_wait()
 send()
 sendmsg()
 sendto()
-.\"O sigpause() [POSIX.1-2001 only (moves to "may" list in POSIX.1-2008)]
-sigpause() [POSIX.1-2001 only (moves to "may" list in POSIX.1-2008)]
+sigpause() [POSIX.1\-2001 only (moves to "may" list in POSIX.1\-2008)]
 sigsuspend()
 sigtimedwait()
 sigwait()
@@ -415,8 +271,7 @@ sigwaitinfo()
 sleep()
 system()
 tcdrain()
-.\"O usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
-usleep() [POSIX.1-2001 のみ (POSIX.1-2008 で削除された)]
+usleep() [POSIX.1\-2001 のみ (POSIX.1\-2008 で削除された)]
 wait()
 waitid()
 waitpid()
@@ -425,11 +280,8 @@ writev()
 .fi
 .in
 
-.\"O The following functions may be cancellation points according to
-.\"O POSIX.1-2001 and/or POSIX.1-2008:
-POSIX.1-2001 と POSIX.1-2008 の両方、もしくはいずれか一方では、
-以下の関数は、取り消しポイント (cancellation points) で
-あってもよいことになっている。
+POSIX.1\-2001 と POSIX.1\-2008 の両方、もしくはいずれか一方では、 以下の関数は、取り消しポイント (cancellation
+points) で あってもよいことになっている。
 
 .in +4n
 .nf
@@ -439,10 +291,8 @@ asctime_r()
 catclose()
 catgets()
 catopen()
-.\"O chmod() [Added in POSIX.1-2008]
-.\"O chown() [Added in POSIX.1-2008]
-chmod() [POSIX.1-2008 で追加された]
-chown() [POSIX.1-2008 で追加された]
+chmod() [POSIX.1\-2008 で追加された]
+chown() [POSIX.1\-2008 で追加された]
 closedir()
 closelog()
 ctermid()
@@ -456,8 +306,7 @@ dbm_open()
 dbm_store()
 dlclose()
 dlopen()
-.\"O dprintf() [Added in POSIX.1-2008]
-dprintf() [POSIX.1-2008 で追加された]
+dprintf() [POSIX.1\-2008 で追加された]
 endgrent()
 endhostent()
 endnetent()
@@ -465,18 +314,12 @@ endprotoent()
 endpwent()
 endservent()
 endutxent()
-.\"O faccessat() [Added in POSIX.1-2008]
-.\"O fchmod() [Added in POSIX.1-2008]
-.\"O fchmodat() [Added in POSIX.1-2008]
-.\"O fchown() [Added in POSIX.1-2008]
-.\"O fchownat() [Added in POSIX.1-2008]
-faccessat() [POSIX.1-2008 で追加された]
-fchmod() [POSIX.1-2008 で追加された]
-fchmodat() [POSIX.1-2008 で追加された]
-fchown() [POSIX.1-2008 で追加された]
-fchownat() [POSIX.1-2008 で追加された]
+faccessat() [POSIX.1\-2008 で追加された]
+fchmod() [POSIX.1\-2008 で追加された]
+fchmodat() [POSIX.1\-2008 で追加された]
+fchown() [POSIX.1\-2008 で追加された]
+fchownat() [POSIX.1\-2008 で追加された]
 fclose()
-.\"O fcntl() (for any value of cmd argument)
 fcntl() (cmd 引き数が何であっても)
 fflush()
 fgetc()
@@ -499,13 +342,11 @@ fseek()
 fseeko()
 fsetpos()
 fstat()
-.\"O fstatat() [Added in POSIX.1-2008]
-fstatat() [POSIX.1-2008 で追加された]
+fstatat() [POSIX.1\-2008 で追加された]
 ftell()
 ftello()
 ftw()
-.\"O futimens() [Added in POSIX.1-2008]
-futimens() [POSIX.1-2008 で追加された]
+futimens() [POSIX.1\-2008 で追加された]
 fwprintf()
 fwrite()
 fwscanf()
@@ -516,29 +357,24 @@ getchar()
 getchar_unlocked()
 getcwd()
 getdate()
-.\"O getdelim() [Added in POSIX.1-2008]
-getdelim() [POSIX.1-2008 で追加された]
+getdelim() [POSIX.1\-2008 で追加された]
 getgrent()
 getgrgid()
 getgrgid_r()
 getgrnam()
 getgrnam_r()
-.\"O gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]
-.\"O gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]
-gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]
-gethostbyname() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]
+gethostbyaddr() [SUSv3 のみ (この関数は POSIX.1\-2008 で削除されている)]
+gethostbyname() [SUSv3 のみ (この関数は POSIX.1\-2008 で削除されている)]
 gethostent()
 gethostid()
 gethostname()
-.\"O getline() [Added in POSIX.1-2008]
-getline() [POSIX.1-2008 で追加された]
+getline() [POSIX.1\-2008 で追加された]
 getlogin()
 getlogin_r()
 getnameinfo()
 getnetbyaddr()
 getnetbyname()
 getnetent()
-.\"O getopt() (if opterr is nonzero)
 getopt() (opterr が 0 以外の場合)
 getprotobyname()
 getprotobynumber()
@@ -557,37 +393,26 @@ getutxid()
 getutxline()
 getwc()
 getwchar()
-.\"O getwd() [SUSv3 only (function removed in POSIX.1-2008)]
-getwd() [SUSv3 のみ (この関数は POSIX.1-2008 で削除されている)]
+getwd() [SUSv3 のみ (この関数は POSIX.1\-2008 で削除されている)]
 glob()
 iconv_close()
 iconv_open()
 ioctl()
 link()
-.\"O linkat() [Added in POSIX.1-2008]
-.\"O lio_listio() [Added in POSIX.1-2008]
-linkat() [POSIX.1-2008 で追加された]
-lio_listio() [POSIX.1-2008 で追加された]
+linkat() [POSIX.1\-2008 で追加された]
+lio_listio() [POSIX.1\-2008 で追加された]
 localtime()
 localtime_r()
-.\"O lockf() [Added in POSIX.1-2008]
-lockf() [POSIX.1-2008 で追加された]
+lockf() [POSIX.1\-2008 で追加された]
 lseek()
 lstat()
-.\"O mkdir() [Added in POSIX.1-2008]
-.\"O mkdirat() [Added in POSIX.1-2008]
-.\"O mkdtemp() [Added in POSIX.1-2008]
-.\"O mkfifo() [Added in POSIX.1-2008]
-.\"O mkfifoat() [Added in POSIX.1-2008]
-.\"O mknod() [Added in POSIX.1-2008]
-.\"O mknodat() [Added in POSIX.1-2008]
-mkdir() [POSIX.1-2008 で追加された]
-mkdirat() [POSIX.1-2008 で追加された]
-mkdtemp() [POSIX.1-2008 で追加された]
-mkfifo() [POSIX.1-2008 で追加された]
-mkfifoat() [POSIX.1-2008 で追加された]
-mknod() [POSIX.1-2008 で追加された]
-mknodat() [POSIX.1-2008 で追加された]
+mkdir() [POSIX.1\-2008 で追加された]
+mkdirat() [POSIX.1\-2008 で追加された]
+mkdtemp() [POSIX.1\-2008 で追加された]
+mkfifo() [POSIX.1\-2008 で追加された]
+mkfifoat() [POSIX.1\-2008 で追加された]
+mknod() [POSIX.1\-2008 で追加された]
+mknodat() [POSIX.1\-2008 で追加された]
 mkstemp()
 mktime()
 nftw()
@@ -621,10 +446,8 @@ posix_trace_shutdown()
 posix_trace_timedgetnext_event()
 posix_typed_mem_open()
 printf()
-.\"O psiginfo() [Added in POSIX.1-2008]
-.\"O psignal() [Added in POSIX.1-2008]
-psiginfo() [POSIX.1-2008 で追加された]
-psignal() [POSIX.1-2008 で追加された]
+psiginfo() [POSIX.1\-2008 で追加された]
+psignal() [POSIX.1\-2008 で追加された]
 pthread_rwlock_rdlock()
 pthread_rwlock_timedrdlock()
 pthread_rwlock_timedwrlock()
@@ -639,18 +462,14 @@ putwc()
 putwchar()
 readdir()
 readdir_r()
-.\"O readlink() [Added in POSIX.1-2008]
-.\"O readlinkat() [Added in POSIX.1-2008]
-readlink() [POSIX.1-2008 で追加された]
-readlinkat() [POSIX.1-2008 で追加された]
+readlink() [POSIX.1\-2008 で追加された]
+readlinkat() [POSIX.1\-2008 で追加された]
 remove()
 rename()
-.\"O renameat() [Added in POSIX.1-2008]
-renameat() [POSIX.1-2008 で追加された]
+renameat() [POSIX.1\-2008 で追加された]
 rewind()
 rewinddir()
-.\"O scandir() [Added in POSIX.1-2008]
-scandir() [POSIX.1-2008 で追加された]
+scandir() [POSIX.1\-2008 で追加された]
 scanf()
 seekdir()
 semop()
@@ -661,15 +480,13 @@ setprotoent()
 setpwent()
 setservent()
 setutxent()
-.\"O sigpause() [Added in POSIX.1-2008]
-sigpause() [POSIX.1-2008 で追加された]
+sigpause() [POSIX.1\-2008 で追加された]
 stat()
 strerror()
 strerror_r()
 strftime()
 symlink()
-.\"O symlinkat() [Added in POSIX.1-2008]
-symlinkat() [POSIX.1-2008 で追加された]
+symlinkat() [POSIX.1\-2008 で追加された]
 sync()
 syslog()
 tmpfile()
@@ -680,16 +497,11 @@ tzset()
 ungetc()
 ungetwc()
 unlink()
-.\"O unlinkat() [Added in POSIX.1-2008]
-.\"O utime() [Added in POSIX.1-2008]
-.\"O utimensat() [Added in POSIX.1-2008]
-.\"O utimes() [Added in POSIX.1-2008]
-.\"O vdprintf() [Added in POSIX.1-2008]
-unlinkat() [POSIX.1-2008 で追加された]
-utime() [POSIX.1-2008 で追加された]
-utimensat() [POSIX.1-2008 で追加された]
-utimes() [POSIX.1-2008 で追加された]
-vdprintf() [POSIX.1-2008 で追加された]
+unlinkat() [POSIX.1\-2008 で追加された]
+utime() [POSIX.1\-2008 で追加された]
+utimensat() [POSIX.1\-2008 で追加された]
+utimes() [POSIX.1\-2008 で追加された]
+vdprintf() [POSIX.1\-2008 で追加された]
 vfprintf()
 vfwprintf()
 vprintf()
@@ -701,16 +513,6 @@ wscanf()
 .fi
 .in
 
-.\"O An implementation may also mark other functions
-.\"O not specified in the standard as cancellation points.
-.\"O In particular, an implementation is likely to mark
-.\"O any nonstandard function that may block as a cancellation point.
-.\"O (This includes most functions that can touch files.)
-実装時に、標準規格で規定されていないその他の関数を取り消しポイント
-とすることも認められている。
-特に、停止 (block) する可能性がある非標準の関数を取り消しポイントと
-する実装はあり得ることだろう
-(ファイルを扱う可能性のあるほとんどの関数がこれに含まれる)。
 .\" So, scanning "cancellation point" comments in the glibc 2.8 header
 .\" files, it looks as though at least the following nonstandard
 .\" functions are cancellation points:
@@ -801,367 +603,116 @@ wscanf()
 .\" vscanf
 .\" vsyslog
 .\" vwscanf
-.\"O .SS "Compiling on Linux"
+実装時に、標準規格で規定されていないその他の関数を取り消しポイント とすることも認められている。 特に、停止 (block)
+する可能性がある非標準の関数を取り消しポイントと する実装はあり得ることだろう (ファイルを扱う可能性のあるほとんどの関数がこれに含まれる)。
 .SS "Linux でのコンパイル"
-.\"O On Linux, programs that use the Pthreads API should be compiled using
-.\"O .IR "cc \-pthread" .
-Linux では、Pthreads API を用いたプログラムは
-.I "cc \-pthread"
-でコンパイルすべきである。
-.\"O .SS "Linux Implementations of POSIX Threads"
+Linux では、Pthreads API を用いたプログラムは \fIcc \-pthread\fP でコンパイルすべきである。
 .SS "POSIX スレッドの Linux での実装"
-.\"O Over time, two threading implementations have been provided by
-.\"O the GNU C library on Linux:
-これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより
-提供されてきた。
-.TP
-.B LinuxThreads
-.\"O This is the original Pthreads implementation.
-.\"O Since glibc 2.4, this implementation is no longer supported.
-最初の Pthreads の実装。
-glibc 2.4 以降は、この実装はもはやサポートされていない。
-.TP
-.BR NPTL " (Native POSIX Threads Library)"
-.\"O This is the modern Pthreads implementation.
-.\"O By comparison with LinuxThreads, NPTL provides closer conformance to
-.\"O the requirements of the POSIX.1 specification and better performance
-.\"O when creating large numbers of threads.
-.\"O NPTL is available since glibc 2.3.2,
-.\"O and requires features that are present in the Linux 2.6 kernel.
-新しい Pthreads の実装。LinuxThreads と比べると、
-NPTL は POSIX.1 の要求仕様への準拠の度合いが高く、
-多数のスレッドを作成した際の性能も高い。
-NPTL は glibc 2.3.2 以降で利用可能である。
-NPTL を利用するには Linux 2.6 カーネルに実装されている機能が必要である。
+これまで、2つのスレッドの実装が Linux の GNU C ライブラリにより 提供されてきた。
+.TP 
+\fBLinuxThreads\fP
+最初の Pthreads の実装。 glibc 2.4 以降は、この実装はもはやサポートされていない。
+.TP 
+\fBNPTL\fP (Native POSIX Threads Library)
+新しい Pthreads の実装。LinuxThreads と比べると、 NPTL は POSIX.1 の要求仕様への準拠の度合いが高く、
+多数のスレッドを作成した際の性能も高い。 NPTL は glibc 2.3.2 以降で利用可能である。 NPTL を利用するには Linux 2.6
+カーネルに実装されている機能が必要である。
 .PP
-.\"O Both of these are so-called 1:1 implementations, meaning that each
-.\"O thread maps to a kernel scheduling entity.
-どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが
-カーネルのスケジューリング実体にマッピングされる。
-.\"O Both threading implementations employ the Linux
-.\"O .BR clone (2)
-.\"O system call.
-.\"O In NPTL, thread synchronization primitives (mutexes,
-.\"O thread joining, etc.) are implemented using the Linux
-.\"O .BR futex (2)
-.\"O system call.
-どちらのスレッドの実装も Linux の
-.BR clone (2)
-システムコールを利用している。
-NPTL では、スレッド同期の基本機構 (mutex や スレッドの join 等) は
-Linux の
-.BR futex (2)
-システムコールを使って実装されている。
+どちらの実装もいわゆる 1:1 実装、すなわち個々のスレッドが カーネルのスケジューリング実体にマッピングされる。 どちらのスレッドの実装も Linux
+の \fBclone\fP(2)  システムコールを利用している。 NPTL では、スレッド同期の基本機構 (mutex や スレッドの join 等) は
+Linux の \fBfutex\fP(2)  システムコールを使って実装されている。
 .SS LinuxThreads
-.\"O The notable features of this implementation are the following:
 この実装の大きな特徴は以下の通りである:
 .IP \- 3
-.\"O In addition to the main (initial) thread,
-.\"O and the threads that the program creates using
-.\"O .BR pthread_create (3),
-.\"O the implementation creates a "manager" thread.
-.\"O This thread handles thread creation and termination.
-.\"O (Problems can result if this thread is inadvertently killed.)
-メインスレッド (最初のスレッド) とプログラムが
-.BR pthread_create (3)
-を使って作成したスレッドに加え、
-この実装では「管理 (manager)」スレッドが作成される。
-管理スレッドはスレッドの作成と終了を取り扱う
-(このスレッドがうっかり kill されると、問題が起こることがある)。
+メインスレッド (最初のスレッド) とプログラムが \fBpthread_create\fP(3)  を使って作成したスレッドに加え、 この実装では「管理
+(manager)」スレッドが作成される。 管理スレッドはスレッドの作成と終了を取り扱う (このスレッドがうっかり kill
+されると、問題が起こることがある)。
 .IP \- 3
-.\"O Signals are used internally by the implementation.
-.\"O On Linux 2.2 and later, the first three real-time signals are used
-.\"O (see also
-.\"O .BR signal (7)).
-.\"O On older Linux kernels,
-.\"O .B SIGUSR1
-.\"O and
-.\"O .B SIGUSR2
-.\"O are used.
-.\"O Applications must avoid the use of whichever set of signals is
-.\"O employed by the implementation.
-この実装では内部でシグナルを使用している。
-Linux 2.2 以降では、リアルタイムシグナルのうち最初の 3つが使われる
-.RB ( signal (7)
-参照)。
-それ以前のカーネルでは
-.B SIGUSR1
-と
-.B SIGUSR2
-が使われる。
-アプリケーションは、スレッド実装で利用されているシグナルを
-どれも使わないようにしなければならない。
+この実装では内部でシグナルを使用している。 Linux 2.2 以降では、リアルタイムシグナルのうち最初の 3つが使われる (\fBsignal\fP(7)
+参照)。 それ以前のカーネルでは \fBSIGUSR1\fP と \fBSIGUSR2\fP が使われる。
+アプリケーションは、スレッド実装で利用されているシグナルを どれも使わないようにしなければならない。
 .IP \- 3
-.\"O Threads do not share process IDs.
-.\"O (In effect, LinuxThreads threads are implemented as processes which share
-.\"O more information than usual, but which do not share a common process ID.)
-.\"O LinuxThreads threads (including the manager thread)
-.\"O are visible as separate processes using
-.\"O .BR ps (1).
-スレッド間でプロセス ID を共有しない
-(実際には LinuxThreads のスレッドは通常よりは情報を共有するプロセスとして
-実装されているが、一つの共通のプロセス ID を共有してはいない)。
-(管理スレッドを含む) LinuxThreads スレッドは
-.BR ps (1)
+スレッド間でプロセス ID を共有しない (実際には LinuxThreads のスレッドは通常よりは情報を共有するプロセスとして
+実装されているが、一つの共通のプロセス ID を共有してはいない)。 (管理スレッドを含む) LinuxThreads スレッドは \fBps\fP(1)
 を使うと別のプロセスのように見える。
 .PP
-.\"O The LinuxThreads implementation deviates from the POSIX.1
-.\"O specification in a number of ways, including the following:
-LinuxThreads の実装では POSIX.1 仕様から逸脱している点が
-いくつかある。以下に示すような点がある:
+LinuxThreads の実装では POSIX.1 仕様から逸脱している点が いくつかある。以下に示すような点がある:
 .IP \- 3
-.\"O Calls to
-.\"O .BR getpid (2)
-.\"O return a different value in each thread.
-.BR getpid (2)
-を呼び出したときに、スレッド毎に異なる値が返される。
+\fBgetpid\fP(2)  を呼び出したときに、スレッド毎に異なる値が返される。
 .IP \- 3
-.\"O Calls to
-.\"O .BR getppid (2)
-.\"O in threads other than the main thread return the process ID of the
-.\"O manager thread; instead
-.\"O .BR getppid (2)
-.\"O in these threads should return the same value as
-.\"O .BR getppid (2)
-.\"O in the main thread.
-メインスレッド以外のスレッドで
-.BR getppid (2)
-を呼び出すと、管理スレッドのプロセス ID が返される。
-本当は、これらのスレッドで
-.BR getppid (2)
-を呼んだ場合にはメインスレッドでの
-.BR getppid (2)
-と同じ値が返るべきである。
+メインスレッド以外のスレッドで \fBgetppid\fP(2)  を呼び出すと、管理スレッドのプロセス ID が返される。 本当は、これらのスレッドで
+\fBgetppid\fP(2)  を呼んだ場合にはメインスレッドでの \fBgetppid\fP(2)  と同じ値が返るべきである。
 .IP \- 3
-.\"O When one thread creates a new child process using
-.\"O .BR fork (2),
-.\"O any thread should be able to
-.\"O .BR wait (2)
-.\"O on the child.
-.\"O However, the implementation only allows the thread that
-.\"O created the child to
-.\"O .BR wait (2)
-.\"O on it.
-あるスレッドが
-.BR fork (2)
-を使って新しい子プロセスを作成した場合、
-どのスレッドでもこの子プロセスを
-.BR wait (2)
-できるべきである。しかしながら、この実装では子プロセスを作成した
-スレッドだけがこの子プロセスを
-.BR wait (2)
-できる。
+あるスレッドが \fBfork\fP(2)  を使って新しい子プロセスを作成した場合、 どのスレッドでもこの子プロセスを \fBwait\fP(2)
+できるべきである。しかしながら、この実装では子プロセスを作成した スレッドだけがこの子プロセスを \fBwait\fP(2)  できる。
 .IP \- 3
-.\"O When a thread calls
-.\"O .BR execve (2),
-.\"O all other threads are terminated (as required by POSIX.1).
-.\"O However, the resulting process has the same PID as the thread that called
-.\"O .BR execve (2):
-.\"O it should have the same PID as the main thread.
-あるスレッドが
-.BR execve (2)
-を呼び出した場合、他のスレッドは全て終了される (POSIX.1 の仕様通り)。
-しかしながら、新しいプロセスは
-.BR execve (2)
-を呼んだスレッドと同じ PID を持つ。正しくは
-メインスレッドと同じ PID を持つべきである。
+あるスレッドが \fBexecve\fP(2)  を呼び出した場合、他のスレッドは全て終了される (POSIX.1 の仕様通り)。
+しかしながら、新しいプロセスは \fBexecve\fP(2)  を呼んだスレッドと同じ PID を持つ。正しくは メインスレッドと同じ PID
+を持つべきである。
 .IP \- 3
-.\"O Threads do not share user and group IDs.
-.\"O This can cause complications with set-user-ID programs and
-.\"O can cause failures in Pthreads functions if an application
-.\"O changes its credentials using
-.\"O .BR seteuid (2)
-.\"O or similar.
-スレッド間でユーザ ID とグループ ID が共有されない
-このことは、set-user-ID プログラムで面倒な事態を招いたり、
-アプリケーションが
-.BR seteuid (2)
-などを使って信用情報 (credentials) を変更した場合に
-Pthreads 関数が失敗する原因となる。
+スレッド間でユーザ ID とグループ ID が共有されない このことは、set\-user\-ID プログラムで面倒な事態を招いたり、 アプリケーションが
+\fBseteuid\fP(2)  などを使って信用情報 (credentials) を変更した場合に Pthreads 関数が失敗する原因となる。
 .IP \- 3
-.\"O Threads do not share a common session ID and process group ID.
 スレッド間で共通のセッション ID やプロセスグループ ID を共有しない。
 .IP \- 3
-.\"O Threads do not share record locks created using
-.\"O .BR fcntl (2).
-スレッド間で
-.BR fcntl (2)
-を使って作成されるレコード・ロックを共有しない。
+スレッド間で \fBfcntl\fP(2)  を使って作成されるレコード・ロックを共有しない。
 .IP \- 3
-.\"O The information returned by
-.\"O .BR times (2)
-.\"O and
-.\"O .BR getrusage (2)
-.\"O is per-thread rather than process-wide.
-.BR times (2)
-と
-.BR getrusage (2)
-が返す情報がプロセス全体の情報でなくスレッド単位の情報である。
+\fBtimes\fP(2)  と \fBgetrusage\fP(2)  が返す情報がプロセス全体の情報でなくスレッド単位の情報である。
 .IP \- 3
-.\"O Threads do not share semaphore undo values (see
-.\"O .BR semop (2)).
-スレッド間でセマフォのアンドゥ値
-.RB ( semop (2)
-参照) を共有しない。
+スレッド間でセマフォのアンドゥ値 (\fBsemop\fP(2)  参照) を共有しない。
 .IP \- 3
-.\"O Threads do not share interval timers.
 スレッド間でインターバル・タイマを共有しない。
 .IP \- 3
-.\"O Threads do not share a common nice value.
 スレッドは共通の nice 値を共有しない。
 .IP \- 3
-.\"O POSIX.1 distinguishes the notions of signals that are directed
-.\"O to the process as a whole and signals that are directed to individual
-.\"O threads.
-.\"O According to POSIX.1, a process-directed signal (sent using
-.\"O .BR kill (2),
-.\"O for example) should be handled by a single,
-.\"O arbitrarily selected thread within the process.
-.\"O LinuxThreads does not support the notion of process-directed signals:
-.\"O signals may only be sent to specific threads.
-POSXI.1 では、全体としてのプロセスに送られるシグナルと、
-個別のスレッドに送られるシグナルを区別して考えている。
-POSIX.1 によると、プロセスに送られたシグナル (例えば
-.BR kill (2)
-を使って送る) は、そのプロセスに属すスレッドのうち
-勝手に (arbitrarily) に選択された一つのスレッドにより処理される
-ことになっている。LinuxThreads はプロセスに送られるシグナルの
+POSXI.1 では、全体としてのプロセスに送られるシグナルと、 個別のスレッドに送られるシグナルを区別して考えている。 POSIX.1
+によると、プロセスに送られたシグナル (例えば \fBkill\fP(2)  を使って送る) は、そのプロセスに属すスレッドのうち 勝手に
+(arbitrarily) に選択された一つのスレッドにより処理される ことになっている。LinuxThreads はプロセスに送られるシグナルの
 概念に対応しておらず、シグナルは特定のスレッドにだけ送ることができる。
 .IP \- 3
-.\"O Threads have distinct alternate signal stack settings.
-.\"O However, a new thread's alternate signal stack settings
-.\"O are copied from the thread that created it, so that
-.\"O the threads initially share an alternate signal stack.
-.\"O (A new thread should start with no alternate signal stack defined.
-.\"O If two threads handle signals on their shared alternate signal
-.\"O stack at the same time, unpredictable program failures are
-.\"O likely to occur.)
-スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。
-しかし、新しいスレッドの代替シグナルスタックの設定は
-そのスレッドを作成したスレッドからコピーされ、そのため
-スレッドは最初は一つの代替シグナルスタックを共有する。
-(仕様では、新しいスレッドは代替シグナルスタックが定義されていない状態
-で開始されるべきとされている。
-2つのスレッドが共有されている代替シグナルスタック上で同時に
-シグナルの処理を行った場合、予測不可能なプログラムのエラーが
-起こり得る。)
+スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいスレッドの代替シグナルスタックの設定は
+そのスレッドを作成したスレッドからコピーされ、そのため スレッドは最初は一つの代替シグナルスタックを共有する。
+(仕様では、新しいスレッドは代替シグナルスタックが定義されていない状態 で開始されるべきとされている。
+2つのスレッドが共有されている代替シグナルスタック上で同時に シグナルの処理を行った場合、予測不可能なプログラムのエラーが 起こり得る。)
 .SS NPTL
-.\"O With NPTL, all of the threads in a process are placed
-.\"O in the same thread group;
-.\"O all members of a thread group share the same PID.
-.\"O NPTL does not employ a manager thread.
-.\"O NPTL makes internal use of the first two real-time signals
-.\"O (see also
-.\"O .BR signal (7));
-.\"O these signals cannot be used in applications.
-NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ
-に属する; スレッド・グループの全メンバーは同じ PID を共有する。
-NPTL は管理スレッド (manager thread) を利用しない。
-NPTL は内部でリアルタイムシグナルのうち最初の 2つの番号を使用しており
-.RB ( signal (7)
-参照)、これらのシグナルはアプリケーションでは使用できない。
+NPTL では、一つのプロセスの全てのスレッドは同じスレッド・グループ に属する; スレッド・グループの全メンバーは同じ PID を共有する。 NPTL
+は管理スレッド (manager thread) を利用しない。 NPTL は内部でリアルタイムシグナルのうち最初の 2つの番号を使用しており
+(\fBsignal\fP(7)  参照)、これらのシグナルはアプリケーションでは使用できない。
 
-.\"O NPTL still has at least one nonconformance with POSIX.1:
 NPTL にも POSIX.1 に準拠していない点が少なくとも一つある:
 .IP \- 3
-.\"O Threads do not share a common nice value.
-スレッドは共通の nice 値を共有しない。
 .\" FIXME . bug report filed for NPTL nice nonconformance
 .\" http://bugzilla.kernel.org/show_bug.cgi?id=6258
 .\" Sep 08: there is a patch by Denys Vlasenko to address this
 .\" "make setpriority POSIX compliant; introduce PRIO_THREAD extension"
 .\" Monitor this to see if it makes it into mainline.
+スレッドは共通の nice 値を共有しない。
 .PP
-.\"O Some NPTL nonconformances only occur with older kernels:
 NPTL の標準非準拠な点のうちいくつかは以前のカーネルでのみ発生する:
 .IP \- 3
-.\"O The information returned by
-.\"O .BR times (2)
-.\"O and
-.\"O .BR getrusage (2)
-.\"O is per-thread rather than process-wide (fixed in kernel 2.6.9).
-.BR times (2)
-と
-.BR getrusage (2)
-が返す情報がプロセス全体の情報でなくスレッド単位の情報である
-(カーネル 2.6.9 で修正された)。
+\fBtimes\fP(2)  と \fBgetrusage\fP(2)  が返す情報がプロセス全体の情報でなくスレッド単位の情報である (カーネル 2.6.9
+で修正された)。
 .IP \- 3
-.\"O Threads do not share resource limits (fixed in kernel 2.6.10).
 スレッド間でリソース制限を共有しない (カーネル 2.6.10 で修正された)。
 .IP \- 3
-.\"O Threads do not share interval timers (fixed in kernel 2.6.12).
-スレッド間でインターバル・タイマを共有しない
-(カーネル 2.6.12 で修正された)。
+スレッド間でインターバル・タイマを共有しない (カーネル 2.6.12 で修正された)。
 .IP \- 3
-.\"O Only the main thread is permitted to start a new session using
-.\"O .BR setsid (2)
-.\"O (fixed in kernel 2.6.16).
-メインスレッドだけが
-.BR setsid (2)
-を使って新しいセッションを開始することができる
-(カーネル 2.6.16 で修正された)。
+メインスレッドだけが \fBsetsid\fP(2)  を使って新しいセッションを開始することができる (カーネル 2.6.16 で修正された)。
 .IP \- 3
-.\"O Only the main thread is permitted to make the process into a
-.\"O process group leader using
-.\"O .BR setpgid (2)
-.\"O (fixed in kernel 2.6.16).
-メインスレッドだけが
-.BR setpgid (2)
-を使ってそのプロセスをプロセス・グループ・リーダーにすることができる
-(カーネル 2.6.16 で修正された)。
+メインスレッドだけが \fBsetpgid\fP(2)  を使ってそのプロセスをプロセス・グループ・リーダーにすることができる (カーネル 2.6.16
+で修正された)。
 .IP \- 3
-.\"O Threads have distinct alternate signal stack settings.
-.\"O However, a new thread's alternate signal stack settings
-.\"O are copied from the thread that created it, so that
-.\"O the threads initially share an alternate signal stack
-.\"O (fixed in kernel 2.6.16).
-スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。
-しかし、新しいスレッドの代替シグナルスタックの設定は
-そのスレッドを作成したスレッドからコピーされ、そのため
-スレッドは最初は一つの代替シグナルスタックを共有する
-(カーネル 2.6.16 で修正された)。
+スレッドはそれぞれの独自の代替シグナルスタックの設定を持つ。 しかし、新しいスレッドの代替シグナルスタックの設定は
+そのスレッドを作成したスレッドからコピーされ、そのため スレッドは最初は一つの代替シグナルスタックを共有する (カーネル 2.6.16 で修正された)。
 .PP
-.\"O Note the following further points about the NPTL implementation:
 NPTL の実装では以下の点についても注意すること:
 .IP \- 3
-.\"O If the stack size soft resource limit (see the description of
-.\"O .B RLIMIT_STACK
-.\"O in
-.\"O .BR setrlimit (2))
-.\"O is set to a value other than
-.\"O .IR unlimited ,
-.\"O then this value defines the default stack size for new threads.
-.\"O To be effective, this limit must be set before the program
-.\"O is executed, perhaps using the
-.\"O .I ulimit -s
-.\"O shell built-in command
-.\"O .RI ( "limit stacksize"
-.\"O in the C shell).
-スタックサイズのリソースのソフト・リミット
-.RB ( setrlimit (2)
-の
-.B RLIMIT_STACK
-の説明を参照) が
-.I unlimited
-以外の値に設定されている場合、ソフト・リミットの値が
-新しいスレッドのデフォルトのスタックサイズとなる。
-設定を有効にするためには、プログラムを実行する前にリミット値を
-設定しておかなければならない。たいていは、シェルの組み込みコマンドの
-.I ulimit -s
-(C シェルでは
-.IR "limit stacksize" )
-を使って設定する。
-.\"O .SS "Determining the Threading Implementation"
-.SS "スレッド実装の判定"
-.\"O Since glibc 2.3.2, the
-.\"O .BR getconf (1)
-.\"O command can be used to determine
-.\"O the system's threading implementation, for example:
-glibc 2.3.2 以降では、
-.BR getconf (1)
-コマンドを使って、
-システムのスレッド実装を判定することができる。
-以下に例を示す:
+スタックサイズのリソースのソフト・リミット (\fBsetrlimit\fP(2)  の \fBRLIMIT_STACK\fP の説明を参照) が
+\fIunlimited\fP 以外の値に設定されている場合、ソフト・リミットの値が 新しいスレッドのデフォルトのスタックサイズとなる。
+設定を有効にするためには、プログラムを実行する前にリミット値を 設定しておかなければならない。たいていは、シェルの組み込みコマンドの \fIulimit
+\-s\fP (C シェルでは \fIlimit stacksize\fP)  を使って設定する。
+.SS スレッド実装の判定
+glibc 2.3.2 以降では、 \fBgetconf\fP(1)  コマンドを使って、 システムのスレッド実装を判定することができる。 以下に例を示す:
 .nf
 .in +4n
 
@@ -1170,84 +721,42 @@ NPTL 2.3.4
 .in
 .fi
 .PP
-.\"O With older glibc versions, a command such as the following should
-.\"O be sufficient to determine the default threading implementation:
-ぞれ以前の glibc のバージョンでは、以下のようなコマンドで
-デフォルトのスレッド実装を判定することができる。
+ぞれ以前の glibc のバージョンでは、以下のようなコマンドで デフォルトのスレッド実装を判定することができる。
 .nf
 .in +4n
 
-bash$ $( ldd /bin/ls | grep libc.so | awk \(aq{print $3}\(aq ) | \\
+bash$ $( ldd /bin/ls | grep libc.so | awk \(aq{print $3}\(aq ) | \e
                 egrep \-i \(aqthreads|ntpl\(aq
         Native POSIX Threads Library by Ulrich Drepper et al
 .in
 .fi
-.\"O .SS "Selecting the Threading Implementation: LD_ASSUME_KERNEL"
 .SS "スレッドの実装の選択: LD_ASSUME_KERNEL"
-.\"O On systems with a glibc that supports both LinuxThreads and NPTL
-.\"O (i.e., glibc 2.3.\fIx\fP), the
-.\"O .B LD_ASSUME_KERNEL
-.\"O environment variable can be used to override
-.\"O the dynamic linker's default choice of threading implementation.
-.\"O This variable tells the dynamic linker to assume that it is
-.\"O running on top of a particular kernel version.
-LinuxThreads と NPTL の両方をサポートしている glibc
-(glibc 2.3.\fIx\fP) があるシステムでは、
-.B LD_ASSUME_KERNEL
-環境変数を使うことで、動的リンカがデフォルトで
-選択するスレッド実装を上書きすることができる。
-この変数により、動的リンカが特定のバージョンのカーネル上で
-動作していると仮定するように指定する。
-.\"O By specifying a kernel version that does not
-.\"O provide the support required by NPTL, we can force the use
-.\"O of LinuxThreads.
-.\"O (The most likely reason for doing this is to run a
-.\"O (broken) application that depends on some nonconformant behavior
-.\"O in LinuxThreads.)
-.\"O For example:
-NPTL が必要とするサポート機能を提供していないカーネルバージョンを
-指定することで、強制的に LinuxThreads を使うことができる
-(このようなことをする最もありそうな場面は、
-LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーション
-を動作させる場合だろう)。
-以下に例を示す:
+LinuxThreads と NPTL の両方をサポートしている glibc (glibc 2.3.\fIx\fP) があるシステムでは、
+\fBLD_ASSUME_KERNEL\fP 環境変数を使うことで、動的リンカがデフォルトで 選択するスレッド実装を上書きすることができる。
+この変数により、動的リンカが特定のバージョンのカーネル上で 動作していると仮定するように指定する。 NPTL
+が必要とするサポート機能を提供していないカーネルバージョンを 指定することで、強制的に LinuxThreads を使うことができる
+(このようなことをする最もありそうな場面は、 LinuxThreads の標準非準拠な振舞いに依存する (壊れた) アプリケーション
+を動作させる場合だろう)。 以下に例を示す:
 .nf
 .in +4n
 
-bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \\
+bash$ $( LD_ASSUME_KERNEL=2.2.5 ldd /bin/ls | grep libc.so | \e
                 awk \(aq{print $3}\(aq ) | egrep \-i \(aqthreads|ntpl\(aq
-        linuxthreads-0.10 by Xavier Leroy
+        linuxthreads\-0.10 by Xavier Leroy
 .in
 .fi
-.\"O .SH "SEE ALSO"
 .SH 関連項目
-.BR clone (2),
-.BR futex (2),
-.BR gettid (2),
-.BR futex (7),
-.BR sigevent (7),
-.BR signal (7),
+.ad l
+.nh
+\fBclone\fP(2), \fBfutex\fP(2), \fBgettid\fP(2), \fBfutex\fP(7), \fBsigevent\fP(7),
+\fBsignal\fP(7),
 .br
-.\"O and various Pthreads manual pages, for example:
-および Pthreads の各種マニュアルページ、例えば:
-.BR pthread_attr_init (3),
-.BR pthread_atfork (3),
-.BR pthread_cancel (3),
-.BR pthread_cleanup_push (3),
-.BR pthread_cond_signal (3),
-.BR pthread_cond_wait (3),
-.BR pthread_create (3),
-.BR pthread_detach (3),
-.BR pthread_equal (3),
-.BR pthread_exit (3),
-.BR pthread_key_create (3),
-.BR pthread_kill (3),
-.BR pthread_mutex_lock (3),
-.BR pthread_mutex_unlock (3),
-.BR pthread_once (3),
-.BR pthread_setcancelstate (3),
-.BR pthread_setcanceltype (3),
-.BR pthread_setspecific (3),
-.BR pthread_sigmask (3),
-.\"O and
-.BR pthread_testcancel (3)
+および Pthreads の各種マニュアルページ、例えば: \fBpthread_attr_init\fP(3),
+\fBpthread_atfork\fP(3), \fBpthread_cancel\fP(3), \fBpthread_cleanup_push\fP(3),
+\fBpthread_cond_signal\fP(3), \fBpthread_cond_wait\fP(3), \fBpthread_create\fP(3),
+\fBpthread_detach\fP(3), \fBpthread_equal\fP(3), \fBpthread_exit\fP(3),
+\fBpthread_key_create\fP(3), \fBpthread_kill\fP(3), \fBpthread_mutex_lock\fP(3),
+\fBpthread_mutex_unlock\fP(3), \fBpthread_once\fP(3),
+\fBpthread_setcancelstate\fP(3), \fBpthread_setcanceltype\fP(3),
+\fBpthread_setspecific\fP(3), \fBpthread_sigmask\fP(3), \fBpthread_sigqueue\fP(3),
+and \fBpthread_testcancel\fP(3)