OSDN Git Service

Release some pages for LDP v3.79
[linuxjm/LDP_man-pages.git] / release / man3 / pthread_create.3
index a6fa890..4af83a6 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
 .\"     <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\"*******************************************************************
 .\"
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH PTHREAD_CREATE 3 2012\-03\-15 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2012-05-04, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH PTHREAD_CREATE 3 2014\-05\-28 Linux "Linux Programmer's Manual"
 .SH 名前
 pthread_create \- 新しいスレッドを作成する
 .SH 書式
@@ -60,14 +67,14 @@ pthread_create \- 新しいスレッドを作成する
 メインスレッドで \fImain\fP() 内で return が実行される。
 この場合は、プロセス内の全てのスレッドが終了される。
 .PP
-\fIattr\fP 引き数は \fIpthread_attr_t\fP 構造体へのポインタであり、
+\fIattr\fP å¼\95ã\81\8dæ\95°ã\81¯ \fIpthread_attr_t\fP æ§\8bé\80 ä½\93ã\81¸ã\81®ã\83\9dã\82¤ã\83³ã\82¿ã\83¼ã\81§ã\81\82ã\82\8aã\80\81
 \fIpthread_attr_t\fP 構造体の内容を使用して、スレッド作成時に
 新しいスレッドの属性が決定される。
 この構造体は \fBpthread_attr_init\fP(3) や関連の関数を使って初期化される。
 \fIattr\fP が NULL の場合、新しいスレッドはデフォルトの属性で作成される。
 
 成功した場合は、 \fBpthread_create\fP() は返る前に新しいスレッドの ID を
-\fIthread\fP が指すバッファに格納する。この ID は、これ以降に他の
+\fIthread\fP ã\81\8cæ\8c\87ã\81\99ã\83\90ã\83\83ã\83\95ã\82¡ã\83¼ã\81«æ ¼ç´\8dã\81\99ã\82\8bã\80\82ã\81\93ã\81® ID ã\81¯ã\80\81ã\81\93ã\82\8c以é\99\8dã\81«ä»\96ã\81®
 pthreads 関数の呼び出しでスレッドを参照するのに使用される。
 
 新しいスレッドは、スレッドを作成したスレッドのシグナルマスク
@@ -93,19 +100,22 @@ CPU affinity マスク (\fBsched_setaffinity\fP(2) 参照) の
 .SH エラー
 .TP 
 \fBEAGAIN\fP
-別のスレッドを作成するのに十分なリソースがないか、システムで設定された
-スレッド数の上限に達していた。後者が起こるのは 2 つの場合がある。
-一つは、実ユーザ ID 当たりのプロセス数の上限である、\fBRLIMIT_NPROC\fP
-ソフトリソース上限 (\fBsetrlimit\fP(2) で設定できる) に達していた場合
-である。もう一つはカーネルのシステム全体のスレッド数の上限である
-\fI/proc/sys/kernel/threads\-max\fP が達していた場合である。
+別のスレッドを作成するのに十分なリソースがない。
+.TP 
+\fBEAGAIN\fP
+.\" NOTE! The following should match the description in fork(2)
+システムで設定されたスレッド数の上限に達していた。 このエラーの原因となる上限値はいくつかある。 実ユーザー ID
+当たりのプロセス数とスレッド数の上限である、ソフトリソース上限 \fBRLIMIT_NPROC\fP に達していた (\fBsetrlimit\fP(2)
+で設定できる)。 カーネルのシステム全体のプロセスとスレッドの数の上限値である \fI/proc/sys/kernel/threads\-max\fP
+が達していた (\fBproc\fP(5) 参照)。 PID の最大値 \fI/proc/sys/kernel/pid_max\fP に達していた
+(\fBproc\fP(5) 参照)。
 .TP 
 \fBEINVAL\fP
 \fIattr\fP で指定された設定が不正である。
 .TP 
 .\" FIXME . Test the following
 \fBEPERM\fP
-\fIattr\fP に指定されたスケジューリングポリシーとパラメータを
+\fIattr\fP ã\81«æ\8c\87å®\9aã\81\95ã\82\8cã\81\9fã\82¹ã\82±ã\82¸ã\83¥ã\83¼ã\83ªã\83³ã\82°ã\83\9dã\83ªã\82·ã\83¼ã\81¨ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\83¼ã\82\92
 設定する許可がない。
 .SH 準拠
 POSIX.1\-2001.
@@ -157,7 +167,7 @@ pthreads API の他のいろいろな関数の使用例を示している。
 .in +4n
 .nf
 $\fB ulimit \-s\fP
-8192            # The stack size limit is 8 MB (0x80000 bytes)
+8192            # The stack size limit is 8 MB (0x800000 bytes)
 $\fB ./a.out hola salut servus\fP
 Thread 1: top of stack near 0xb7dd03b8; argv_string=hola
 Thread 2: top of stack near 0xb75cf3b8; argv_string=salut
@@ -212,7 +222,7 @@ struct thread_info {    /* Used as argument to thread_start() */
 static void *
 thread_start(void *arg)
 {
-    struct thread_info *tinfo = (struct thread_info *) arg;
+    struct thread_info *tinfo = arg;
     char *uargv, *p;
 
     printf("Thread %d: top of stack near %p; argv_string=%s\en",
@@ -312,11 +322,13 @@ main(int argc, char *argv[])
 }
 .fi
 .SH 関連項目
+.ad l
+.nh
 \fBgetrlimit\fP(2), \fBpthread_attr_init\fP(3), \fBpthread_cancel\fP(3),
 \fBpthread_detach\fP(3), \fBpthread_equal\fP(3), \fBpthread_exit\fP(3),
 \fBpthread_getattr_np\fP(3), \fBpthread_join\fP(3), \fBpthread_self\fP(3),
 \fBpthreads\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。