De-k&r-ify function definitions in kern/kern_resource.c

No functional changes.
This commit is contained in:
Mateusz Guzik 2014-10-27 20:18:30 +00:00
parent b3ee0d3bbd
commit 8101958c4f

View File

@ -92,9 +92,7 @@ struct getpriority_args {
}; };
#endif #endif
int int
sys_getpriority(td, uap) sys_getpriority(struct thread *td, register struct getpriority_args *uap)
struct thread *td;
register struct getpriority_args *uap;
{ {
struct proc *p; struct proc *p;
struct pgrp *pg; struct pgrp *pg;
@ -177,9 +175,7 @@ struct setpriority_args {
}; };
#endif #endif
int int
sys_setpriority(td, uap) sys_setpriority(struct thread *td, struct setpriority_args *uap)
struct thread *td;
struct setpriority_args *uap;
{ {
struct proc *curp, *p; struct proc *curp, *p;
struct pgrp *pg; struct pgrp *pg;
@ -373,9 +369,7 @@ struct rtprio_args {
}; };
#endif #endif
int int
sys_rtprio(td, uap) sys_rtprio(struct thread *td, register struct rtprio_args *uap)
struct thread *td; /* curthread */
register struct rtprio_args *uap;
{ {
struct proc *p; struct proc *p;
struct thread *tdp; struct thread *tdp;
@ -541,9 +535,7 @@ struct osetrlimit_args {
}; };
#endif #endif
int int
osetrlimit(td, uap) osetrlimit(struct thread *td, register struct osetrlimit_args *uap)
struct thread *td;
register struct osetrlimit_args *uap;
{ {
struct orlimit olim; struct orlimit olim;
struct rlimit lim; struct rlimit lim;
@ -564,9 +556,7 @@ struct ogetrlimit_args {
}; };
#endif #endif
int int
ogetrlimit(td, uap) ogetrlimit(struct thread *td, register struct ogetrlimit_args *uap)
struct thread *td;
register struct ogetrlimit_args *uap;
{ {
struct orlimit olim; struct orlimit olim;
struct rlimit rl; struct rlimit rl;
@ -603,9 +593,7 @@ struct __setrlimit_args {
}; };
#endif #endif
int int
sys_setrlimit(td, uap) sys_setrlimit(struct thread *td, register struct __setrlimit_args *uap)
struct thread *td;
register struct __setrlimit_args *uap;
{ {
struct rlimit alim; struct rlimit alim;
int error; int error;
@ -797,9 +785,7 @@ struct __getrlimit_args {
#endif #endif
/* ARGSUSED */ /* ARGSUSED */
int int
sys_getrlimit(td, uap) sys_getrlimit(struct thread *td, register struct __getrlimit_args *uap)
struct thread *td;
register struct __getrlimit_args *uap;
{ {
struct rlimit rlim; struct rlimit rlim;
struct proc *p; struct proc *p;
@ -820,10 +806,7 @@ sys_getrlimit(td, uap)
* into user and system time usage. * into user and system time usage.
*/ */
void void
calccru(p, up, sp) calccru(struct proc *p, struct timeval *up, struct timeval *sp)
struct proc *p;
struct timeval *up;
struct timeval *sp;
{ {
PROC_LOCK_ASSERT(p, MA_OWNED); PROC_LOCK_ASSERT(p, MA_OWNED);
@ -976,9 +959,7 @@ struct getrusage_args {
}; };
#endif #endif
int int
sys_getrusage(td, uap) sys_getrusage(register struct thread *td, register struct getrusage_args *uap)
register struct thread *td;
register struct getrusage_args *uap;
{ {
struct rusage ru; struct rusage ru;
int error; int error;
@ -1133,8 +1114,7 @@ lim_alloc()
} }
struct plimit * struct plimit *
lim_hold(limp) lim_hold(struct plimit *limp)
struct plimit *limp;
{ {
refcount_acquire(&limp->pl_refcnt); refcount_acquire(&limp->pl_refcnt);
@ -1142,8 +1122,7 @@ lim_hold(limp)
} }
static __inline int static __inline int
lim_shared(limp) lim_shared(struct plimit *limp)
struct plimit *limp;
{ {
return (limp->pl_refcnt > 1); return (limp->pl_refcnt > 1);
@ -1164,8 +1143,7 @@ lim_fork(struct proc *p1, struct proc *p2)
} }
void void
lim_free(limp) lim_free(struct plimit *limp)
struct plimit *limp;
{ {
if (refcount_release(&limp->pl_refcnt)) if (refcount_release(&limp->pl_refcnt))
@ -1177,8 +1155,7 @@ lim_free(limp)
* We share these structures copy-on-write after fork. * We share these structures copy-on-write after fork.
*/ */
void void
lim_copy(dst, src) lim_copy(struct plimit *dst, struct plimit *src)
struct plimit *dst, *src;
{ {
KASSERT(!lim_shared(dst), ("lim_copy to shared limit")); KASSERT(!lim_shared(dst), ("lim_copy to shared limit"));
@ -1240,8 +1217,7 @@ uihashinit()
* uihashtbl_lock must be locked. * uihashtbl_lock must be locked.
*/ */
static struct uidinfo * static struct uidinfo *
uilookup(uid) uilookup(uid_t uid)
uid_t uid;
{ {
struct uihashhead *uipp; struct uihashhead *uipp;
struct uidinfo *uip; struct uidinfo *uip;
@ -1261,8 +1237,7 @@ uilookup(uid)
* uifree() should be called on a struct uidinfo when released. * uifree() should be called on a struct uidinfo when released.
*/ */
struct uidinfo * struct uidinfo *
uifind(uid) uifind(uid_t uid)
uid_t uid;
{ {
struct uidinfo *old_uip, *uip; struct uidinfo *old_uip, *uip;
@ -1300,8 +1275,7 @@ uifind(uid)
* Place another refcount on a uidinfo struct. * Place another refcount on a uidinfo struct.
*/ */
void void
uihold(uip) uihold(struct uidinfo *uip)
struct uidinfo *uip;
{ {
refcount_acquire(&uip->ui_ref); refcount_acquire(&uip->ui_ref);
@ -1323,8 +1297,7 @@ uihold(uip)
* order to try again. * order to try again.
*/ */
void void
uifree(uip) uifree(struct uidinfo *uip)
struct uidinfo *uip;
{ {
int old; int old;
@ -1380,10 +1353,7 @@ ui_racct_foreach(void (*callback)(struct racct *racct,
* a given user is using. When 'max' is 0, don't enforce a limit * a given user is using. When 'max' is 0, don't enforce a limit
*/ */
int int
chgproccnt(uip, diff, max) chgproccnt(struct uidinfo *uip, int diff, rlim_t max)
struct uidinfo *uip;
int diff;
rlim_t max;
{ {
/* Don't allow them to exceed max, but allow subtraction. */ /* Don't allow them to exceed max, but allow subtraction. */
@ -1404,11 +1374,7 @@ chgproccnt(uip, diff, max)
* Change the total socket buffer size a user has used. * Change the total socket buffer size a user has used.
*/ */
int int
chgsbsize(uip, hiwat, to, max) chgsbsize(struct uidinfo *uip, u_int *hiwat, u_int to, rlim_t max)
struct uidinfo *uip;
u_int *hiwat;
u_int to;
rlim_t max;
{ {
int diff; int diff;
@ -1432,10 +1398,7 @@ chgsbsize(uip, hiwat, to, max)
* a given user is using. When 'max' is 0, don't enforce a limit * a given user is using. When 'max' is 0, don't enforce a limit
*/ */
int int
chgptscnt(uip, diff, max) chgptscnt(struct uidinfo *uip, int diff, rlim_t max)
struct uidinfo *uip;
int diff;
rlim_t max;
{ {
/* Don't allow them to exceed max, but allow subtraction. */ /* Don't allow them to exceed max, but allow subtraction. */