Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2004 14:32:23 +1100
From:      John Birrell <jb@cimlogic.com.au>
To:        Tim Robbins <tjr@freebsd.org>
Cc:        cvs-all@freebsd.org
Subject:   Re: cvs commit: src/lib/libc/stdio _flock_stub.c local.h
Message-ID:  <20040309143223.Q234@freebsd3.cimlogic.com.au>
In-Reply-To: <20040309032248.GA88649@cat.robbins.dropbear.id.au>; from tjr@freebsd.org on Tue, Mar 09, 2004 at 02:22:48PM %2B1100
References:  <200403090245.i292j0a6035728@repoman.freebsd.org> <20040309032248.GA88649@cat.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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