This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch/RFC] tr1::shared_ptr<> removal of lock, choosing thread safety


Peter Dimov wrote:

http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdlib/random.c?rev=1.18&content-type=text/x-cvsweb-markup&cvsroot=glibc


says that


/* POSIX.1c requires that there is mutual exclusion for the `rand' and
  `srand' functions to prevent concurrent calls from modifying common
  data.  */

and seems to have a lock around __random, which rand calls.

Interesting, I never studied that code before... But I don't think we can be similarly sure about all the other libcs that we are supporting...


Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]