OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man3 / random_r.3
index 1954a8a..c2ecce7 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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\"
-.TH RANDOM_R 3  2008-03-07 "GNU" "Linux Programmer's Manual"
+.TH RANDOM_R 3  2014-03-25 "GNU" "Linux Programmer's Manual"
 .SH NAME
 random_r, srandom_r, initstate_r, setstate_r \- reentrant
 random number generator
@@ -95,8 +97,11 @@ function is like
 except that it modifies the state in the object pointer to by
 .IR buf ,
 rather than modifying the global state variable.
-.SH "RETURN VALUE"
-All of these functions return 0 on success, or \-1 on error.
+.SH RETURN VALUE
+All of these functions return 0 on success.
+On error, \-1 is returned, with
+.I errno
+set to indicate the cause of the error.
 .SH ERRORS
 .TP
 .B EINVAL
@@ -120,11 +125,28 @@ or
 argument to
 .BR random_r ()
 was NULL.
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR random_r (),
+.BR srandom_r (),
+.BR initstate_r (),
+and
+.BR setstate_r ()
+functions are thread-safe.
+.SH CONFORMING TO
 These functions are nonstandard glibc extensions.
 .\" These functions appear to be on Tru64, but don't seem to be on
 .\" Solaris, HP-UX, or FreeBSD.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR drand48 (3),
 .BR rand (3),
 .BR random (3)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.