cvs commit: src/lib/libc/stdtime localtime.c

Bruce Evans brde at
Wed Dec 19 02:54:01 PST 2007

On Wed, 19 Dec 2007, Warner Losh wrote:

> imp         2007-12-19 04:30:11 UTC
>  FreeBSD src repository
>  Modified files:
>    lib/libc/stdtime     localtime.c
>  Log:
>  Reduce lock contention for simple cases.
>  # this really should be done with pthread_once, but I've debugged this code.
>  Reviewed by: arch@

Reviewers weren't happy with this.  I now think that the only bug in
it is that it unnecesarily depends i386 memory semantics (that writes
are not reordered).  There should be a write barrier before the flag
is set, to ensure that the writes which initialize things occur before
the write that sets the flag.


More information about the cvs-src mailing list