Subject: Re: Linux/Mips syscall shift
To: matthew green <mrg@eterna.com.au>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-kern
Date: 09/15/2001 18:10:20
> couldn't you:
> 
>       - have a runtime test in mips/syscall.c ?

That one is not bad, what about this?

extern struct emul emul_linux;
/* ... */
if (p->p_emul == &emul_linux) 
        syscall_shift = 4000;
else
        syscall_shift = 0;

Would it be acceptable?

>       - or, have mips/linux_syscall.c #include mips/syscall.c, but
>       #define some magic first?  kinda like kern/exec_elf64.c?

I thought about that one, but I have to do something like this:

void
#ifdef SOMETHING
linux_syscall_plain
#else
syscall_plain
#endif
(struct proc *p, u_int status, u_int cause, u_int opc)

Ugly, isn't it?

-- 
Emmanuel Dreyfus.   
Il ne suffit pas de crier l'iMac, l'iMac! en sautant comme un cabri...
manu@netbsd.org