From owner-cvs-all@FreeBSD.ORG Mon Mar 8 19:32:33 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D783316A4CE; Mon, 8 Mar 2004 19:32:33 -0800 (PST) Received: from cimlogic.com.au (adsl-20-121.swiftdsl.com.au [218.214.20.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB4A943D39; Mon, 8 Mar 2004 19:32:32 -0800 (PST) (envelope-from jb@cimlogic.com.au) Received: from cimlogic.com.au (localhost.cimlogic.com.au [127.0.0.1]) by cimlogic.com.au (8.12.11/8.12.11) with ESMTP id i293WR9a011569; Tue, 9 Mar 2004 14:32:29 +1100 (EST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.12.11/8.12.11/Submit) id i293WQdP011568; Tue, 9 Mar 2004 14:32:26 +1100 (EST) (envelope-from jb) Date: Tue, 9 Mar 2004 14:32:23 +1100 From: John Birrell To: Tim Robbins Message-ID: <20040309143223.Q234@freebsd3.cimlogic.com.au> References: <200403090245.i292j0a6035728@repoman.freebsd.org> <20040309032248.GA88649@cat.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040309032248.GA88649@cat.robbins.dropbear.id.au>; from tjr@freebsd.org on Tue, Mar 09, 2004 at 02:22:48PM +1100 cc: cvs-src@freebsd.org cc: John Birrell cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/stdio _flock_stub.c local.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 03:32:34 -0000 On Tue, Mar 09, 2004 at 02:22:48PM +1100, Tim Robbins wrote: > Is this a useful behaviour to support? ORIENT needs to be kept as > simple as possible since it is invoked for every single stdio call. > The extra conditional may make a difference for getc() and putc() > in the single-threaded case. If you were concerned about performance "for every single stdio call", the locking calls would never have been allowed into libc in the first place. In a single-threaded program they aren't required. Although the file name is _flock_stub.c, it doesn't truly contain stub functions with no code like when libc_r was added. In fact, this is one reason why libc_r was a completely separate library - so that libc performance wouldn't be impacted in the single threaded case. -- John Birrell