From 53e33d57450b9e5d07cc47fce6afa0727f7cedc7 Mon Sep 17 00:00:00 2001 From: bde Date: Mon, 23 Oct 1995 15:42:12 +0000 Subject: Simplify the pseudo-argument removal changes by not optimizing for the !COMPAT_43 case - use a common function even when there is no `old' function. The diffs for this are large because of code motion to restore the function order to what it was before the pseudo-argument changes. Include to get correct args structs and prototypes. The diffs for this are large because the declarations of the args structs were moved to become comments in the function headers. The comments may actually match the automatically generated declarations right now. Add prototypes. --- sys/kern/kern_exit.c | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) (limited to 'sys/kern/kern_exit.c') diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index c473a41..d4e9a08 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -36,11 +36,12 @@ * SUCH DAMAGE. * * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 - * $Id: kern_exit.c,v 1.15 1995/05/30 08:05:25 rgrimes Exp $ + * $Id: kern_exit.c,v 1.17 1995/10/08 00:06:03 swallace Exp $ */ #include #include +#include #include #include #include @@ -69,17 +70,18 @@ #include #include +static int wait1 __P((struct proc *, struct wait_args *, int [], int)); + /* * exit -- * Death of process. */ -struct rexit_args { - int rval; -}; __dead void exit(p, uap, retval) struct proc *p; - struct rexit_args *uap; + struct rexit_args /* { + int rval; + } */ *uap; int *retval; { @@ -281,13 +283,6 @@ done: cpu_exit(p); } -struct wait_args { - int pid; - int *status; - int options; - struct rusage *rusage; -}; - #if defined(COMPAT_43) || defined(COMPAT_IBCS2) #if defined(hp300) || defined(luna68k) #include @@ -296,16 +291,12 @@ struct wait_args { #define GETPS(rp) (rp)[PS] #endif -static int wait1(struct proc *, struct wait_args *, int [], int); - -struct owait_args { - int dummy; -}; - int owait(p, uap, retval) struct proc *p; - register struct owait_args *uap; + register struct owait_args /* { + int dummy; + } */ *uap; int *retval; { struct wait_args w; @@ -326,6 +317,7 @@ owait(p, uap, retval) w.status = NULL; return (wait1(p, &w, retval, 1)); } +#endif /* defined(COMPAT_43) || defined(COMPAT_IBCS2) */ int wait4(p, uap, retval) @@ -333,23 +325,21 @@ wait4(p, uap, retval) struct wait_args *uap; int *retval; { + return (wait1(p, uap, retval, 0)); } static int wait1(q, uap, retval, compat) register struct proc *q; - register struct wait_args *uap; + register struct wait_args /* { + int pid; + int *status; + int options; + struct rusage *rusage; + } */ *uap; int retval[]; int compat; -#else -int -wait4(q, uap, retval) - register struct proc *q; - register struct wait_args *uap; - int retval[]; -#endif - { register int nfound; register struct proc *p, *t; -- cgit v1.1