various cleanups for -Wall. some inspired by James Jegers.

This commit is contained in:
cgd 1994-12-24 15:07:22 +00:00
parent d62964384c
commit d218233b36
4 changed files with 28 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_acct.c,v 1.37 1994/12/14 19:07:07 mycroft Exp $ */
/* $NetBSD: kern_acct.c,v 1.38 1994/12/24 15:07:22 cgd Exp $ */
/*-
* Copyright (c) 1994 Christopher G. Demetriou
@ -94,6 +94,7 @@ int acctchkfreq = 15; /* frequency (in seconds) to check space */
* Accounting system call. Written based on the specification and
* previous implementation done by Mark Tinguely.
*/
int
acct(p, uap, retval)
struct proc *p;
struct acct_args /* {
@ -152,6 +153,7 @@ acct(p, uap, retval)
* and are enumerated below. (They're also noted in the system
* "acct.h" header file.)
*/
int
acct_process(p)
struct proc *p;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_exit.c,v 1.28 1994/10/30 21:47:39 cgd Exp $ */
/* $NetBSD: kern_exit.c,v 1.29 1994/12/24 15:07:26 cgd Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -58,6 +58,7 @@
#include <sys/malloc.h>
#include <sys/resourcevar.h>
#include <sys/ptrace.h>
#include <sys/acct.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
@ -102,7 +103,6 @@ exit1(p, rv)
int rv;
{
register struct proc *q, *nq;
register struct proc **pp;
register struct vmspace *vm;
if (p->p_pid == 1)
@ -278,6 +278,7 @@ exit1(p, rv)
#define GETPS(rp) (rp)[PS]
#endif
int
compat_43_wait(p, uap, retval)
struct proc *p;
void *uap;
@ -307,6 +308,7 @@ compat_43_wait(p, uap, retval)
return (wait1(p, &a, retval, 1));
}
int
wait4(p, uap, retval)
struct proc *p;
struct wait4_args /* {

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_proc.c,v 1.10 1994/08/30 03:05:38 mycroft Exp $ */
/* $NetBSD: kern_proc.c,v 1.11 1994/12/24 15:07:27 cgd Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -50,6 +50,7 @@
#include <sys/mbuf.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/signalvar.h>
/*
* Structure associated with user cacheing.
@ -76,6 +77,7 @@ struct proclist zombproc;
/*
* Initialize global process hashing structures.
*/
void
procinit()
{
@ -127,6 +129,7 @@ chgproccnt(uid, diff)
/*
* Is p an inferior of the current process?
*/
int
inferior(p)
register struct proc *p;
{
@ -170,13 +173,13 @@ pgfind(pgid)
/*
* Move p to a new or existing process group (and session)
*/
int
enterpgrp(p, pgid, mksess)
register struct proc *p;
pid_t pgid;
int mksess;
{
register struct pgrp *pgrp = pgfind(pgid);
int n;
#ifdef DIAGNOSTIC
if (pgrp != NULL && mksess) /* firewalls */
@ -248,6 +251,7 @@ enterpgrp(p, pgid, mksess)
/*
* remove process from process group
*/
int
leavepgrp(p)
register struct proc *p;
{
@ -262,6 +266,7 @@ leavepgrp(p)
/*
* delete a process group
*/
void
pgdelete(pgrp)
register struct pgrp *pgrp;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_resource.c,v 1.24 1994/12/11 18:06:09 mycroft Exp $ */
/* $NetBSD: kern_resource.c,v 1.25 1994/12/24 15:07:29 cgd Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@ -53,10 +53,14 @@
#include <vm/vm.h>
int donice __P((struct proc *curp, struct proc *chgp, int n));
int dosetrlimit __P((struct proc *p, u_int which, struct rlimit *limp));
/*
* Resource controls and accounting.
*/
int
getpriority(curp, uap, retval)
struct proc *curp;
register struct getpriority_args /* {
@ -113,6 +117,7 @@ getpriority(curp, uap, retval)
}
/* ARGSUSED */
int
setpriority(curp, uap, retval)
struct proc *curp;
register struct setpriority_args /* {
@ -171,6 +176,7 @@ setpriority(curp, uap, retval)
return (error);
}
int
donice(curp, chgp, n)
register struct proc *curp, *chgp;
register int n;
@ -194,6 +200,7 @@ donice(curp, chgp, n)
#if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_SVR4)
/* ARGSUSED */
int
compat_43_setrlimit(p, uap, retval)
struct proc *p;
struct compat_43_setrlimit_args /* {
@ -215,6 +222,7 @@ compat_43_setrlimit(p, uap, retval)
}
/* ARGSUSED */
int
compat_43_getrlimit(p, uap, retval)
struct proc *p;
register struct compat_43_getrlimit_args /* {
@ -239,6 +247,7 @@ compat_43_getrlimit(p, uap, retval)
#endif /* COMPAT_43 || COMPAT_SUNOS || COMPAT_SVR4 */
/* ARGSUSED */
int
setrlimit(p, uap, retval)
struct proc *p;
register struct setrlimit_args /* {
@ -341,6 +350,7 @@ dosetrlimit(p, which, limp)
}
/* ARGSUSED */
int
getrlimit(p, uap, retval)
struct proc *p;
register struct getrlimit_args /* {
@ -360,6 +370,7 @@ getrlimit(p, uap, retval)
* Transform the running time and tick information in proc p into user,
* system, and interrupt time usage.
*/
void
calcru(p, up, sp, ip)
register struct proc *p;
register struct timeval *up;
@ -413,6 +424,7 @@ calcru(p, up, sp, ip)
}
/* ARGSUSED */
int
getrusage(p, uap, retval)
register struct proc *p;
register struct getrusage_args /* {
@ -441,6 +453,7 @@ getrusage(p, uap, retval)
sizeof (struct rusage)));
}
void
ruadd(ru, ru2)
register struct rusage *ru, *ru2;
{