Subject: Re: Split of syscall code (please comment)
To: Matthew Orgass <darkstar@pgh.net>
From: Jaromír Dolecek <dolecek@ics.muni.cz>
List: tech-kern
Date: 11/28/2000 11:45:06
Matthew Orgass wrote:
> > Question here is, what is the best way to achieve this. Ideally,
> > there would be no code duplication at all; in any case
> > it's not wise to copy the syscall() code to n emulation-dependant files.

>   I don't think copying would be all that bad in this situation.  While it
> would make sense for the BSD systems to share, I don't see the gain in
> trying to force Linux emulation to share the same code.  It is not a large
> or frequently updated section of code and there are a number of
> differences.

The differences are not quite that big. Majority of code is shared.
On the other hand, if completely split, the code would be a bit more
readable.
Is the code in question really updated so seldomly ?

>   Also, I think it would be better to share by inline functions rather
> than messy #includes.  inline is now a standard C keyword and thanks to
> C++ is almost certainly supported by every compiler that is interesting.

How would inlines help here ?
Like you'd suggest to put the code in header file and pull in via
inline ? That would not work, I need to put pointer of the function
to struct emul.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, damn!  @@@@