Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Use sy_invoke
details: https://anonhg.NetBSD.org/src/rev/553a81ea6d79
branches: trunk
changeset: 787606:553a81ea6d79
user: matt <matt%NetBSD.org@localhost>
date: Wed Jun 26 08:38:03 2013 +0000
description:
Use sy_invoke
diffstat:
sys/arch/mips/mips/syscall.c | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
diffs (71 lines):
diff -r 2470bc126411 -r 553a81ea6d79 sys/arch/mips/mips/syscall.c
--- a/sys/arch/mips/mips/syscall.c Wed Jun 26 08:30:40 2013 +0000
+++ b/sys/arch/mips/mips/syscall.c Wed Jun 26 08:38:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.47 2012/02/19 21:06:19 rmind Exp $ */
+/* $NetBSD: syscall.c,v 1.48 2013/06/26 08:38:03 matt Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.47 2012/02/19 21:06:19 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.48 2013/06/26 08:38:03 matt Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -122,7 +122,6 @@
mips_reg_t *fargs = ®->r_regs[_R_A0];
register_t *args = NULL;
register_t copyargs[2+SYS_MAXSYSARGS];
- mips_reg_t saved_v0;
vaddr_t usp;
size_t nargs;
const struct sysent *callp;
@@ -149,9 +148,8 @@
reg->r_regs[_R_PC] = pc + sizeof(uint32_t);
callp = p->p_emul->e_sysent;
- saved_v0 = code = reg->r_regs[_R_V0];
-
- code -= SYSCALL_SHIFT;
+ const mips_reg_t saved_v0 = reg->r_regs[_R_V0];
+ code = saved_v0 - SYSCALL_SHIFT;
if (code == SYS_syscall
|| (code == SYS___syscall && abi != _MIPS_BSD_API_O32)) {
@@ -176,7 +174,6 @@
callp += code;
nargs = callp->sy_narg;
- reg->r_regs[_R_V0] = 0;
#if !defined(__mips_o32)
if (abi != _MIPS_BSD_API_O32) {
#endif
@@ -316,13 +313,8 @@
printf("\n");
#endif
- if (__predict_false(p->p_trace_enabled)
- && (error = trace_enter(code, args, nargs)) != 0)
- goto out;
+ error = sy_invoke(callp, l, args, ®->r_regs[_R_V0], code);
- error = (*callp->sy_call)(l, args, ®->r_regs[_R_V0]);
-
- out:
switch (error) {
case 0:
#if !defined(__mips_o32)
@@ -368,9 +360,6 @@
break;
}
- if (__predict_false(p->p_trace_enabled))
- trace_exit(code, ®->r_regs[_R_V0], error);
-
KASSERT(l->l_blcnt == 0);
KASSERT(curcpu()->ci_biglock_count == 0);
Home |
Main Index |
Thread Index |
Old Index