summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/trap.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
committerphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
commit4c8218a5c7d132b8ae0bd2a5a677455d69fabaab (patch)
tree70e3bdde81d385220c0b0de7410976c4e83e5bbd /sys/amd64/amd64/trap.c
parent363a7ddf8560aa6b11580adeb58853d719217b26 (diff)
downloadFreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.zip
FreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.tar.gz
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.
Diffstat (limited to 'sys/amd64/amd64/trap.c')
-rw-r--r--sys/amd64/amd64/trap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
index ec74808..4cab4c1 100644
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/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
}
OpenPOWER on IntegriCloud