From 603809a1f8a21e8e96913c107c41f7351a0955bf Mon Sep 17 00:00:00 2001 From: Nate Willams Date: Fri, 10 Sep 1993 22:15:13 +0000 Subject: [PATCH] Removed volatile functions which were causing grief in the system, since volatile functions are undefined, and there is no reason to have them in our kernel. --- sys/i386/i386/vm_machdep.c | 12 ++++++++---- sys/kern/kern_exit.c | 7 +++++-- sys/sys/systm.h | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index c89dac91d3..72ce5630e4 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -49,7 +49,7 @@ /* * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ */ -static char rcsid[] = "$Header: /a/cvs/386BSD/src/sys/i386/i386/vm_machdep.c,v 1.3 1993/07/27 10:52:21 davidg Exp $"; +static char rcsid[] = "$Header: /usr/chroot/CVS/386BSD/src/sys/i386/i386/vm_machdep.c,v 1.3 1993/07/27 10:52:21 davidg Exp $"; #include "param.h" #include "systm.h" @@ -169,7 +169,7 @@ cpu_exit(p) /* NOTREACHED */ } #else -volatile void +void cpu_exit(p) register struct proc *p; { @@ -179,8 +179,12 @@ cpu_exit(p) #endif splclock(); swtch(); - /*NOTREACHED*/ - for(;;); + /* + * This is to shutup the compiler, and if swtch() failed I suppose + * this would be a good thing. This keeps gcc happy because panic + * is a volatile void function as well. + */ + panic("cpu_exit"); } cpu_wait(p) struct proc *p; { diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 38a04c8ac3..669f036d9a 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -66,7 +66,7 @@ struct rexit_args { int rval; }; /* ARGSUSED */ -volatile void +void rexit(p, uap, retval) struct proc *p; struct rexit_args *uap; @@ -83,7 +83,7 @@ rexit(p, uap, retval) * and parent's lists. Save exit status and rusage for wait(). * Check for child processes and orphan them. */ -volatile void +void kexit(p, rv) register struct proc *p; int rv; @@ -92,6 +92,9 @@ kexit(p, rv) register struct proc **pp; int s; + acct(p); /* do process accounting -- must be done before + address space is released */ + #ifdef PGINPROF vmsizmon(); #endif diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 2a86e85668..86f8192af9 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -47,8 +47,8 @@ ---- this really the first step in the work that's been done on sun-lamp to add kernel function prototypes. */ -__volatile void kexit __P((struct proc *, int)); -__volatile void cpu_exit __P((struct proc *)); +void kexit __P((struct proc *, int)); +void cpu_exit __P((struct proc *)); void swtch __P((void)); -- 2.20.1