cvs commit: src/lib/libc/stdio _flock_stub.c local.h
ak03 at gte.com
Mon Mar 8 20:32:27 PST 2004
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.
More information about the cvs-src