From owner-cvs-src@FreeBSD.ORG Wed Dec 19 10:54:01 2007 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B44416A417; Wed, 19 Dec 2007 10:54:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 91CF713C461; Wed, 19 Dec 2007 10:54:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lBJAruFW010517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Dec 2007 21:53:57 +1100 Date: Wed, 19 Dec 2007 21:53:56 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Warner Losh In-Reply-To: <200712190430.lBJ4UB7M018392@repoman.freebsd.org> Message-ID: <20071219210516.I37050@delplex.bde.org> References: <200712190430.lBJ4UB7M018392@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/stdtime localtime.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2007 10:54:01 -0000 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