Subject: Re: system call numbers problem
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 08/31/2001 18:16:38
On Aug 31, 11:51pm, manu@netbsd.org (Emmanuel Dreyfus) wrote:
-- Subject: Re: system call numbers problem
| > Since your gonna have to supply your own linux_syscall.c, it is just
| > a simple one liner to subtract 4000 there. I don't think that we
| > need to generalize struct emul for just a single case here.
|
| But linux_syscalls.c is automatically generated, and it's just an array.
| Do you mean I should add 4000 empty entries in it gets generated?
No, I mean "linux_syscall.c" which is in mips/mips/linux_syscall.c,
not "linux_syscalls.c"
Like:
/*
* syscall(frame):
* System call request from POSIX system call gate interface to kernel.
* Like trap(), argument is call by reference.
*/
void
linux_syscall_plain(frame)
struct trapframe frame;
{
register const struct sysent *callp;
register struct proc *p;
int error;
size_t argsize;
register_t code, args[8], rval[2];
uvmexp.syscalls++;
p = curproc;
--> code = frame.tf_eax - 4000;
callp = linux_sysent;
code &= (LINUX_SYS_NSYSENT - 1);
callp += code;
argsize = callp->sy_argsize;
if (argsize) {
christos