Date: Thu, 15 Feb 2001 10:58:21 -0500 From: "Brian F. Feldman" <green@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: Warner Losh <imp@harmony.village.org>, arch@FreeBSD.org Subject: Re: The whole libc thing. Message-ID: <200102151558.f1FFwLA21464@green.dyndns.org> In-Reply-To: Message from Bruce Evans <bde@zeta.org.au> of "Thu, 15 Feb 2001 21:38:45 %2B1100." <Pine.BSF.4.21.0102152135350.9729-100000@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> wrote: > On Thu, 15 Feb 2001, Warner Losh wrote: > > > Green's solution of stealing a pointer and using that to "grow" FILE. > > This would allow old binaris to keep working at the cost of binary > > compatibility. There's a few extra indirections in this case, you'll > > likely not be able to measure that performance loss. But it will work > > with the case above and most of the others we threw at it. > > Pointers to FILEs can be converted to pointers extensions of FILEs using > a hash lookup. This takes slightly more than a few indirections, but > it doesn't cost binary compatibilty. Please see http://people.freebsd.org/~green/libc-evil.patch for what my actual proposition is (ignoring style bugs at the moment, please, which I know for you is hard ;) What Warner meant is this will allow us to grow the FILE structure _without_ the cost of losing binary compatibility, which is what a direct changeover to __stdio with no ABI compatibility hack would get you iff every single library immediately got its version bumped. My proposition wouldn't break any binary compatibility because it would keep the FILE structure size the same. The actual contents are _not_ allowed to be known outside of libc, so anything that gets it wrong after this change deserves to break in many horrible ways. We don't need a hash lookup because there is already a _very_ seldom-used field, _up, which can be absorbed for this purpose. I initially thought _cookie was better, but convinced myself otherwise (though DES may still not be convinced). In fact, if it even _looks_ ugly, we can rearrange the inside of FILE at will so it looks nicer without actually then changing the size. -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102151558.f1FFwLA21464>