back previous revision 1.9 off - compat code was changed to set

struct emul e_nsysent to *SYS_NSYSENT now, and the mask is more efficient
This commit is contained in:
jdolecek 2002-11-02 07:37:33 +00:00
parent dd07fed86d
commit 80f0f798bc

View File

@ -1,4 +1,4 @@
/* $NetBSD: syscall.c,v 1.9 2002/11/01 00:02:40 matt Exp $ */
/* $NetBSD: syscall.c,v 1.10 2002/11/02 07:37:33 jdolecek Exp $ */
/*
* Copyright (C) 2002 Matt Thomas
@ -81,7 +81,7 @@ extern struct sysent mach_sysent[];
#define EMULNAME(x) (x)
#define EMULNAMEU(x) (x)
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.9 2002/11/01 00:02:40 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.10 2002/11/02 07:37:33 jdolecek Exp $");
void
child_return(void *arg)
@ -137,7 +137,7 @@ EMULNAME(syscall_plain)(struct trapframe *frame)
#endif /* DEBUG_MACH */
code = -code;
callp = mach_sysent;
nsysent = MACH_SYS_MAXSYSCALL;
nsysent = MACH_SYS_NSYSENT;
} else
#endif /* MACH_SYSCALL */
{
@ -165,10 +165,7 @@ EMULNAME(syscall_plain)(struct trapframe *frame)
}
}
if (code >= nsysent) {
error = ENOSYS;
goto syscall_bad;
}
code &= (nsysent - 1);
callp += code;
argsize = callp->sy_argsize;
@ -253,7 +250,7 @@ EMULNAME(syscall_fancy)(struct trapframe *frame)
#endif /* DEBUG_MACH */
code = -code;
callp = mach_sysent;
nsysent = MACH_SYS_MAXSYSCALL;
nsysent = MACH_SYS_NSYSENT;
} else
#endif /* MACH_SYSCALL */
{
@ -281,10 +278,7 @@ EMULNAME(syscall_fancy)(struct trapframe *frame)
}
}
if (code >= nsysent) {
error = ENOSYS;
goto syscall_bad;
}
code &= (nsysent - 1);
callp += code;
argsize = callp->sy_argsize;