diff options
author | phk <phk@FreeBSD.org> | 1997-11-06 19:29:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-11-06 19:29:57 +0000 |
commit | 4c8218a5c7d132b8ae0bd2a5a677455d69fabaab (patch) | |
tree | 70e3bdde81d385220c0b0de7410976c4e83e5bbd /sys/kern/kern_threads.c | |
parent | 363a7ddf8560aa6b11580adeb58853d719217b26 (diff) | |
download | FreeBSD-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/kern/kern_threads.c')
-rw-r--r-- | sys/kern/kern_threads.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/kern_threads.c b/sys/kern/kern_threads.c index 93a2290..37b1461 100644 --- a/sys/kern/kern_threads.c +++ b/sys/kern/kern_threads.c @@ -46,7 +46,7 @@ * in Germany will I accept domestic beer. This code may or may not work * and I certainly make no claims as to its fitness for *any* purpose. * - * $Id: kern_threads.c,v 1.2 1997/07/06 02:40:42 dyson Exp $ + * $Id: kern_threads.c,v 1.3 1997/09/02 20:05:44 bde Exp $ */ #include <sys/param.h> @@ -67,7 +67,7 @@ * returns time waiting in ticks. */ int -thr_sleep(struct proc *p, struct thr_sleep_args *uap, int *retval) { +thr_sleep(struct proc *p, struct thr_sleep_args *uap) { int sleepstart; struct timespec ts; struct timeval atv, utv; @@ -104,7 +104,7 @@ thr_sleep(struct proc *p, struct thr_sleep_args *uap, int *retval) { timo = 1; } - retval[0] = 0; + p->p_retval[0] = 0; if (p->p_wakeup == 0) { sleepstart = ticks; p->p_flag |= P_SINTR; @@ -112,25 +112,25 @@ thr_sleep(struct proc *p, struct thr_sleep_args *uap, int *retval) { p->p_flag &= ~P_SINTR; if (error == EWOULDBLOCK) { p->p_wakeup = 0; - retval[0] = EAGAIN; + p->p_retval[0] = EAGAIN; return 0; } if (uap->timeout == 0) - retval[0] = ticks - sleepstart; + p->p_retval[0] = ticks - sleepstart; } p->p_wakeup = 0; return (0); } int -thr_wakeup(struct proc *p, struct thr_wakeup_args *uap, int *retval) { +thr_wakeup(struct proc *p, struct thr_wakeup_args *uap) { struct proc *pSlave = p->p_leader; while(pSlave && (pSlave->p_pid != uap->pid)) pSlave = pSlave->p_peers; if(pSlave == 0) { - retval[0] = ESRCH; + p->p_retval[0] = ESRCH; return(0); } @@ -140,7 +140,7 @@ thr_wakeup(struct proc *p, struct thr_wakeup_args *uap, int *retval) { return(0); } - retval[0] = EAGAIN; + p->p_retval[0] = EAGAIN; return 0; } @@ -148,10 +148,10 @@ thr_wakeup(struct proc *p, struct thr_wakeup_args *uap, int *retval) { * General purpose yield system call */ int -yield(struct proc *p, struct yield_args *uap, int *retval) { +yield(struct proc *p, struct yield_args *uap) { int s; - retval[0] = 0; + p->p_retval[0] = 0; s = splhigh(); p->p_priority = MAXPRI; |