From owner-cvs-src@FreeBSD.ORG Mon Mar 8 20:32:27 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AA7116A4CE; Mon, 8 Mar 2004 20:32:27 -0800 (PST) Received: from newman.gte.com (newman.gte.com [132.197.8.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46E1C43D39; Mon, 8 Mar 2004 20:32:25 -0800 (PST) (envelope-from ak03@gte.com) Received: from h132-197-179-27.gte.com (kanpc.gte.com [132.197.179.27]) by newman.gte.com (8.9.1/8.9.1) with ESMTP id XAA28211; Mon, 8 Mar 2004 23:32:10 -0500 (EST) Received: from kanpc.gte.com (ak03@localhost [127.0.0.1]) i294W9aE065279; Mon, 8 Mar 2004 23:32:09 -0500 (EST) (envelope-from ak03@kanpc.gte.com) Received: (from ak03@localhost) by kanpc.gte.com (8.12.11/8.12.11/Submit) id i294W8cl065278; Mon, 8 Mar 2004 23:32:08 -0500 (EST) (envelope-from ak03) Date: Mon, 8 Mar 2004 23:32:08 -0500 From: Alexander Kabaev To: John Birrell Message-ID: <20040309043207.GA65153@kanpc.gte.com> References: <200403090245.i292j0a6035728@repoman.freebsd.org> <20040309032248.GA88649@cat.robbins.dropbear.id.au> <20040309143223.Q234@freebsd3.cimlogic.com.au> <20040309035532.GA88825@cat.robbins.dropbear.id.au> <20040309150536.R234@freebsd3.cimlogic.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040309150536.R234@freebsd3.cimlogic.com.au> User-Agent: Mutt/1.5.6i cc: cvs-src@FreeBSD.org cc: John Birrell cc: cvs-all@FreeBSD.org cc: Tim Robbins cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/stdio _flock_stub.c local.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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: Tue, 09 Mar 2004 04:32:27 -0000 On Tue, Mar 09, 2004 at 03:05:36PM +1100, John Birrell wrote: > > I'm not sure that I agree that applications are 'broken' when they > use things that are defined in the header file along with the FILE > structure itself. I would like to see FILE to become transparent to applications and its definition moved to the libc-private header file with the specific purpose of making the hack you mentioned impossible. Are there any other means for you to achieve what you want? Can funopen be used to simulate stdio stream instead? > As I said in my previous mail, if you want to improve performance, > then remove the locking code from libc completely in the single-threaded > case. That will have more benefit than checking a NULL pointer that > has to be resolved anyway in order to access the fields it points > to. I think you're arguing about just a few instructions on i386. > I agree that handful of extra instruction won't make stdio much slower. Rather, I object to your change because it allows applications to become dependant on intimate knowledge of FILE internals which means inevitable ABI breakages and associated headaches in the future. -- Alexander Kabaev