[PATCH] drand48.3: ATTRIBUTES: Note functions that are not thread-safe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The functions drand48(), erand48(), lrand48(), nrand48(),
mrand48(), jrand48(), srand48(), seed48() and lcong48() are
not thread safe.

Signed-off-by: Peng Haitao <penght@xxxxxxxxxxxxxx>
---
 man3/drand48.3 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/man3/drand48.3 b/man3/drand48.3
index 3dad8fc..d65ae3d 100644
--- a/man3/drand48.3
+++ b/man3/drand48.3
@@ -201,6 +201,21 @@ has been called, a subsequent call to either
 or
 .BR seed48 ()
 will restore the standard values of \fIa\fP and \fIc\fP.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR drand48 (),
+.BR erand48 (),
+.BR lrand48 (),
+.BR nrand48 (),
+.BR mrand48 (),
+.BR jrand48 (),
+.BR srand48 (),
+.BR seed48 (),
+and
+.BR lcong48 ()
+functions use a global state of the random number generator,
+so they are not thread-safe.
 .SH CONFORMING TO
 SVr4, POSIX.1-2001.
 .SH NOTES
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux