From 4c8218a5c7d132b8ae0bd2a5a677455d69fabaab Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 6 Nov 1997 19:29:57 +0000 Subject: Move the "retval" (3rd) parameter from all syscall functions and put it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled. --- sys/kern/subr_trap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/kern/subr_trap.c') diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index ec74808..4cab4c1 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.112 1997/10/10 09:44:09 peter Exp $ + * $Id: trap.c,v 1.113 1997/10/10 12:42:48 peter Exp $ */ /* @@ -904,7 +904,7 @@ syscall(frame) struct proc *p = curproc; u_quad_t sticks; int error; - int args[8], rval[2]; + int args[8]; u_int code; sticks = p->p_sticks; @@ -956,10 +956,10 @@ syscall(frame) if (KTRPOINT(p, KTR_SYSCALL)) ktrsyscall(p->p_tracep, code, callp->sy_narg, args); #endif - rval[0] = 0; - rval[1] = frame.tf_edx; + p->p_retval[0] = 0; + p->p_retval[1] = frame.tf_edx; - error = (*callp->sy_call)(p, args, rval); + error = (*callp->sy_call)(p, args); switch (error) { @@ -969,8 +969,8 @@ syscall(frame) * if this is a child returning from fork syscall. */ p = curproc; - frame.tf_eax = rval[0]; - frame.tf_edx = rval[1]; + frame.tf_eax = p->p_retval[0]; + frame.tf_edx = p->p_retval[1]; frame.tf_eflags &= ~PSL_C; break; @@ -1007,7 +1007,7 @@ bad: #ifdef KTRACE if (KTRPOINT(p, KTR_SYSRET)) - ktrsysret(p->p_tracep, code, error, rval[0]); + ktrsysret(p->p_tracep, code, error, p->p_retval[0]); #endif } -- cgit v1.1