Module Name: src Committed By: matt Date: Wed Jun 26 06:31:53 UTC 2013
Modified Files: src/sys/arch/arm/arm: syscall.c src/sys/arch/powerpc/powerpc: syscall.c src/sys/arch/vax/vax: syscall.c Log Message: Use sy_invoke To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/arm/arm/syscall.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/powerpc/powerpc/syscall.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/vax/vax/syscall.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/arm/syscall.c diff -u src/sys/arch/arm/arm/syscall.c:1.56 src/sys/arch/arm/arm/syscall.c:1.57 --- src/sys/arch/arm/arm/syscall.c:1.56 Thu Aug 16 17:35:01 2012 +++ src/sys/arch/arm/arm/syscall.c Wed Jun 26 06:31:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.56 2012/08/16 17:35:01 matt Exp $ */ +/* $NetBSD: syscall.c,v 1.57 2013/06/26 06:31:53 matt Exp $ */ /*- * Copyright (c) 2000, 2003 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ #include <sys/param.h> -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.56 2012/08/16 17:35:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.57 2013/06/26 06:31:53 matt Exp $"); #include <sys/device.h> #include <sys/errno.h> @@ -254,17 +254,7 @@ syscall(struct trapframe *tf, lwp_t *l, args = &tf->tf_r0; } - if (!__predict_false(p->p_trace_enabled) - || __predict_false(callp->sy_flags & SYCALL_INDIRECT) - || (error = trace_enter(code, args, nargs)) == 0) { - rval[0] = 0; - rval[1] = 0; - error = (*callp->sy_call)(l, args, rval); - } - - if (__predict_false(p->p_trace_enabled) - || !__predict_false(callp->sy_flags & SYCALL_INDIRECT)) - trace_exit(code, rval, error); + error = sy_invoke(callp, l, args, rval, code); switch (error) { case 0: Index: src/sys/arch/powerpc/powerpc/syscall.c diff -u src/sys/arch/powerpc/powerpc/syscall.c:1.51 src/sys/arch/powerpc/powerpc/syscall.c:1.52 --- src/sys/arch/powerpc/powerpc/syscall.c:1.51 Fri Jul 20 14:21:20 2012 +++ src/sys/arch/powerpc/powerpc/syscall.c Wed Jun 26 06:31:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.51 2012/07/20 14:21:20 matt Exp $ */ +/* $NetBSD: syscall.c,v 1.52 2013/06/26 06:31:53 matt Exp $ */ /* * Copyright (C) 2002 Matt Thomas @@ -61,7 +61,7 @@ #define EMULNAME(x) (x) #define EMULNAMEU(x) (x) -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.51 2012/07/20 14:21:20 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.52 2013/06/26 06:31:53 matt Exp $"); void child_return(void *arg) @@ -144,18 +144,7 @@ EMULNAME(syscall)(struct trapframe *tf) params = args; } - if (!__predict_false(p->p_trace_enabled) - || __predict_false(callp->sy_flags & SYCALL_INDIRECT) - || (error = trace_enter(realcode, params, callp->sy_narg)) == 0) { - rval[0] = 0; - rval[1] = 0; - error = sy_call(callp, l, params, rval); - } - - if (__predict_false(p->p_trace_enabled) - && !__predict_false(callp->sy_flags & SYCALL_INDIRECT)) { - trace_exit(code, rval, error); - } + error = sy_invoke(callp, l, params, rval, code); if (__predict_true(error == 0)) { tf->tf_fixreg[FIRSTARG] = rval[0]; Index: src/sys/arch/vax/vax/syscall.c diff -u src/sys/arch/vax/vax/syscall.c:1.22 src/sys/arch/vax/vax/syscall.c:1.23 --- src/sys/arch/vax/vax/syscall.c:1.22 Tue Jan 15 10:18:38 2013 +++ src/sys/arch/vax/vax/syscall.c Wed Jun 26 06:31:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.22 2013/01/15 10:18:38 martin Exp $ */ +/* $NetBSD: syscall.c,v 1.23 2013/06/26 06:31:53 matt Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -33,7 +33,7 @@ /* All bugs are subject to removal without further notice */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.22 2013/01/15 10:18:38 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.23 2013/06/26 06:31:53 matt Exp $"); #include "opt_multiprocessor.h" @@ -103,11 +103,7 @@ syscall(struct trapframe *tf) * Only trace if tracing is enabled and the syscall isn't indirect * (SYS_syscall or SYS___syscall) */ - if (__predict_true(!p->p_trace_enabled) - || __predict_false(callp->sy_flags & SYCALL_INDIRECT) - || (error = trace_enter(tf->tf_code, args, callp->sy_narg)) == 0) { - error = sy_call(callp, curlwp, args, rval); - } + error = sy_invoke(callp, curlwp, args, rval, tf->tf_code); TDB(("return %s pc %lx, psl %lx, sp %lx, pid %d, err %d r0 %d, r1 %d, " "tf %p\n", syscallnames[tf->tf_code], tf->tf_pc, tf->tf_psl, @@ -134,10 +130,6 @@ bad: break; } - if (__predict_false(p->p_trace_enabled) - && __predict_true(!(callp->sy_flags & SYCALL_INDIRECT))) - trace_exit(tf->tf_code, rval, error); - userret(l, tf, oticks); }