Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2007 21:53:56 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Warner Losh <imp@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/lib/libc/stdtime localtime.c
Message-ID:  <20071219210516.I37050@delplex.bde.org>
In-Reply-To: <200712190430.lBJ4UB7M018392@repoman.freebsd.org>

index | next in thread | previous in thread | raw e-mail

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.

Bruce


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071219210516.I37050>