OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / draft / man3 / random_r.3
index eab76f8..a9684dd 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright 2008 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.
@@ -19,6 +20,7 @@
 .\"
 .\" 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 RANDOM_R 3 2008\-03\-07 GNU "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
+.\"         all rights reserved.
+.\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
+.\"
+.TH RANDOM_R 3 2014\-03\-25 GNU "Linux Programmer's Manual"
 .SH 名前
 random_r, srandom_r, initstate_r, setstate_r \- リエントラントな 乱数生成器
 .SH 書式
@@ -55,7 +62,7 @@ _SVID_SOURCE || _BSD_SOURCE
 .ad b
 .SH 説明
 これらの関数は、 \fBrandom\fP(3)  で説明されている関数のリエントラント版で、等価な機能を持つ。
\81\93ã\82\8cã\82\89ã\81¯ã\80\81ç\8b¬ç«\8bã\81\97ã\81\9få\86\8dç\8f¾å\8f¯è\83½ã\81ªä¹±æ\95°å\88\97ã\82\92å\90\84ã\82¹ã\83¬ã\83\83ã\83\89ã\81\8cå¾\97ã\82\8bå¿\85è¦\81ã\81\8cã\81\82ã\82\8bã\82\88ã\81\86ã\81ª ã\83\9eã\83«ã\83\81ã\82¹ã\83¬ã\83\83ã\83\89ã\83»ã\83\97ã\83­ã\82°ã\83©ã\83 ã\81§ã\81®ä½¿ç\94¨ã\81«é\81©ã\81\97ã\81¦ã\81\84ã\82\8bã\80\82
+これらは、独立した再現可能な乱数列を各スレッドが得る必要があるような マルチスレッドプログラムでの使用に適している。
 
 \fBrandom_r\fP()  関数は \fBrandom\fP(3)  と同様だが、 大域変数 (global variable)
 で管理される状態情報を使うのではなく、 \fIbuf\fP が指す引き数に格納された状態情報を使う。 生成された乱数は引き数 \fIresult\fP
@@ -70,7 +77,7 @@ _SVID_SOURCE || _BSD_SOURCE
 \fBsetstate_r\fP()  関数は \fBsetstate\fP(3)  と同様だが、大域変数で管理される状態を変更するのではなく、 \fIbuf\fP
 が指すオブジェクト内の状態を変更する。
 .SH 返り値
\81\93ã\82\8cã\82\89ã\81®é\96¢æ\95°ã\81¯ã\80\81æ\88\90å\8a\9fã\81\99ã\82\8bã\81¨ 0 ã\82\92è¿\94ã\81\97ã\80\81 ã\82¨ã\83©ã\83¼ã\81®å ´å\90\88ã\81¯ \-1 ã\82\92è¿\94ã\81\99
\81\93ã\82\8cã\82\89ã\81®é\96¢æ\95°ã\81¯ã\81\99ã\81¹ã\81¦ã\80\81æ\88\90å\8a\9fã\81\99ã\82\8bã\81¨ 0 ã\82\92è¿\94ã\81\99ã\80\82 ã\82¨ã\83©ã\83¼ã\81®å ´å\90\88ã\80\81\-1 ã\82\92è¿\94ã\81\97ã\80\81 \fIerrno\fP ã\81«ã\82¨ã\83©ã\83¼ã\81®å\8e\9få\9b ã\82\92示ã\81\99å\80¤ã\81\8cã\82»ã\83\83ã\83\88ã\81\95ã\82\8cã\82\8b
 .SH エラー
 .TP 
 \fBEINVAL\fP
@@ -81,9 +88,17 @@ _SVID_SOURCE || _BSD_SOURCE
 .TP 
 \fBEINVAL\fP
 \fBrandom_r\fP()  の引き数 \fIbuf\fP か \fIresult\fP が NULL であった。
+.SH 属性
+.SS "マルチスレッディング (pthreads(7) 参照)"
+関数 \fBrandom_r\fP(), \fBsrandom_r\fP(), \fBinitstate_r\fP(), \fBsetstate_r\fP()
+はスレッドセーフである。
 .SH 準拠
 .\" These functions appear to be on Tru64, but don't seem to be on
 .\" Solaris, HP-UX, or FreeBSD.
 これらの関数は非標準で glibc による拡張である。
 .SH 関連項目
 \fBdrand48\fP(3), \fBrand\fP(3), \fBrandom\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。