Subject: Re: Linux/Mips syscall shift
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: tech-kern
Date: 09/15/2001 19:16:45
[I'm far from an expert, so let's keep this on tech-kern so someone can
 stop me from talking total nonsense]

On Sat, 15 Sep 2001, Emmanuel Dreyfus wrote:
> What about one more field in struct emul? What are the drawbacks there?
> 
> I can also add an syscall_offset argument to syscall_plain() and
> syscall_fancy(). In linux_syscall.c, I would duplicate syscall() code
> (named linux_syscall() here), and I would call syscall_plain and
> syscall_fancy with a 4000 argument. 
> 
> syscall_plain and syscall_fancy would not be duplicated and would stay
> in syscall.c
> 
> Is that good?

You still have to do the subtract in both codepaths. 

How about you take the source, and make it subtract a value of
SYSCALL_OFFSET, then compile the code once with SYSCALL_OFFSET =0 and =
4000? That way the compiler could optimize things properly.
Of course that leads to mode object code.

Just an idea from some non-kernel person.


 - Hubert

-- 
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html 
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/