kern_sig.c: ANSIfy and remove archaic register keyword

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2017-03-02 22:17:53 +00:00
parent ed085b68ab
commit e052a8b932
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314568

View File

@ -822,12 +822,10 @@ struct sigaction_args {
}; };
#endif #endif
int int
sys_sigaction(td, uap) sys_sigaction(struct thread *td, struct sigaction_args *uap)
struct thread *td;
register struct sigaction_args *uap;
{ {
struct sigaction act, oact; struct sigaction act, oact;
register struct sigaction *actp, *oactp; struct sigaction *actp, *oactp;
int error; int error;
actp = (uap->act != NULL) ? &act : NULL; actp = (uap->act != NULL) ? &act : NULL;
@ -852,12 +850,10 @@ struct freebsd4_sigaction_args {
}; };
#endif #endif
int int
freebsd4_sigaction(td, uap) freebsd4_sigaction(struct thread *td, struct freebsd4_sigaction_args *uap)
struct thread *td;
register struct freebsd4_sigaction_args *uap;
{ {
struct sigaction act, oact; struct sigaction act, oact;
register struct sigaction *actp, *oactp; struct sigaction *actp, *oactp;
int error; int error;
@ -884,13 +880,11 @@ struct osigaction_args {
}; };
#endif #endif
int int
osigaction(td, uap) osigaction(struct thread *td, struct osigaction_args *uap)
struct thread *td;
register struct osigaction_args *uap;
{ {
struct osigaction sa; struct osigaction sa;
struct sigaction nsa, osa; struct sigaction nsa, osa;
register struct sigaction *nsap, *osap; struct sigaction *nsap, *osap;
int error; int error;
if (uap->signum <= 0 || uap->signum >= ONSIG) if (uap->signum <= 0 || uap->signum >= ONSIG)
@ -920,9 +914,7 @@ osigaction(td, uap)
#if !defined(__i386__) #if !defined(__i386__)
/* Avoid replicating the same stub everywhere */ /* Avoid replicating the same stub everywhere */
int int
osigreturn(td, uap) osigreturn(struct thread *td, struct osigreturn_args *uap)
struct thread *td;
struct osigreturn_args *uap;
{ {
return (nosys(td, (struct nosys_args *)uap)); return (nosys(td, (struct nosys_args *)uap));
@ -935,8 +927,7 @@ osigreturn(td, uap)
* set to ignore signals that are ignored by default. * set to ignore signals that are ignored by default.
*/ */
void void
siginit(p) siginit(struct proc *p)
struct proc *p;
{ {
register int i; register int i;
struct sigacts *ps; struct sigacts *ps;
@ -1109,9 +1100,7 @@ struct sigprocmask_args {
}; };
#endif #endif
int int
sys_sigprocmask(td, uap) sys_sigprocmask(struct thread *td, struct sigprocmask_args *uap)
register struct thread *td;
struct sigprocmask_args *uap;
{ {
sigset_t set, oset; sigset_t set, oset;
sigset_t *setp, *osetp; sigset_t *setp, *osetp;
@ -1139,9 +1128,7 @@ struct osigprocmask_args {
}; };
#endif #endif
int int
osigprocmask(td, uap) osigprocmask(struct thread *td, struct osigprocmask_args *uap)
register struct thread *td;
struct osigprocmask_args *uap;
{ {
sigset_t set, oset; sigset_t set, oset;
int error; int error;
@ -1359,9 +1346,7 @@ struct sigpending_args {
}; };
#endif #endif
int int
sys_sigpending(td, uap) sys_sigpending(struct thread *td, struct sigpending_args *uap)
struct thread *td;
struct sigpending_args *uap;
{ {
struct proc *p = td->td_proc; struct proc *p = td->td_proc;
sigset_t pending; sigset_t pending;
@ -1380,9 +1365,7 @@ struct osigpending_args {
}; };
#endif #endif
int int
osigpending(td, uap) osigpending(struct thread *td, struct osigpending_args *uap)
struct thread *td;
struct osigpending_args *uap;
{ {
struct proc *p = td->td_proc; struct proc *p = td->td_proc;
sigset_t pending; sigset_t pending;
@ -1409,13 +1392,11 @@ struct osigvec_args {
#endif #endif
/* ARGSUSED */ /* ARGSUSED */
int int
osigvec(td, uap) osigvec(struct thread *td, struct osigvec_args *uap)
struct thread *td;
register struct osigvec_args *uap;
{ {
struct sigvec vec; struct sigvec vec;
struct sigaction nsa, osa; struct sigaction nsa, osa;
register struct sigaction *nsap, *osap; struct sigaction *nsap, *osap;
int error; int error;
if (uap->signum <= 0 || uap->signum >= ONSIG) if (uap->signum <= 0 || uap->signum >= ONSIG)
@ -1449,9 +1430,7 @@ struct osigblock_args {
}; };
#endif #endif
int int
osigblock(td, uap) osigblock(struct thread *td, struct osigblock_args *uap)
register struct thread *td;
struct osigblock_args *uap;
{ {
sigset_t set, oset; sigset_t set, oset;
@ -1467,9 +1446,7 @@ struct osigsetmask_args {
}; };
#endif #endif
int int
osigsetmask(td, uap) osigsetmask(struct thread *td, struct osigsetmask_args *uap)
struct thread *td;
struct osigsetmask_args *uap;
{ {
sigset_t set, oset; sigset_t set, oset;
@ -1491,9 +1468,7 @@ struct sigsuspend_args {
#endif #endif
/* ARGSUSED */ /* ARGSUSED */
int int
sys_sigsuspend(td, uap) sys_sigsuspend(struct thread *td, struct sigsuspend_args *uap)
struct thread *td;
struct sigsuspend_args *uap;
{ {
sigset_t mask; sigset_t mask;
int error; int error;
@ -1559,9 +1534,7 @@ struct osigsuspend_args {
#endif #endif
/* ARGSUSED */ /* ARGSUSED */
int int
osigsuspend(td, uap) osigsuspend(struct thread *td, struct osigsuspend_args *uap)
struct thread *td;
struct osigsuspend_args *uap;
{ {
sigset_t mask; sigset_t mask;
@ -1579,9 +1552,7 @@ struct osigstack_args {
#endif #endif
/* ARGSUSED */ /* ARGSUSED */
int int
osigstack(td, uap) osigstack(struct thread *td, struct osigstack_args *uap)
struct thread *td;
register struct osigstack_args *uap;
{ {
struct sigstack nss, oss; struct sigstack nss, oss;
int error = 0; int error = 0;
@ -1614,9 +1585,7 @@ struct sigaltstack_args {
#endif #endif
/* ARGSUSED */ /* ARGSUSED */
int int
sys_sigaltstack(td, uap) sys_sigaltstack(struct thread *td, struct sigaltstack_args *uap)
struct thread *td;
register struct sigaltstack_args *uap;
{ {
stack_t ss, oss; stack_t ss, oss;
int error; int error;
@ -1799,9 +1768,7 @@ sys_kill(struct thread *td, struct kill_args *uap)
} }
int int
sys_pdkill(td, uap) sys_pdkill(struct thread *td, struct pdkill_args *uap)
struct thread *td;
struct pdkill_args *uap;
{ {
struct proc *p; struct proc *p;
cap_rights_t rights; cap_rights_t rights;
@ -2986,7 +2953,7 @@ postsig(sig)
register int sig; register int sig;
{ {
struct thread *td = curthread; struct thread *td = curthread;
register struct proc *p = td->td_proc; struct proc *p = td->td_proc;
struct sigacts *ps; struct sigacts *ps;
sig_t action; sig_t action;
ksiginfo_t ksi; ksiginfo_t ksi;
@ -3059,9 +3026,7 @@ postsig(sig)
* Kill the current process for stated reason. * Kill the current process for stated reason.
*/ */
void void
killproc(p, why) killproc(struct proc *p, char *why)
struct proc *p;
char *why;
{ {
PROC_LOCK_ASSERT(p, MA_OWNED); PROC_LOCK_ASSERT(p, MA_OWNED);
@ -3082,9 +3047,7 @@ killproc(p, why)
* does not return. * does not return.
*/ */
void void
sigexit(td, sig) sigexit(struct thread *td, int sig)
struct thread *td;
int sig;
{ {
struct proc *p = td->td_proc; struct proc *p = td->td_proc;
@ -3573,9 +3536,7 @@ struct nosys_args {
#endif #endif
/* ARGSUSED */ /* ARGSUSED */
int int
nosys(td, args) nosys(struct thread *td, struct nosys_args *args)
struct thread *td;
struct nosys_args *args;
{ {
struct proc *p = td->td_proc; struct proc *p = td->td_proc;
@ -3590,9 +3551,7 @@ nosys(td, args)
* credentials rather than those of the current process. * credentials rather than those of the current process.
*/ */
void void
pgsigio(sigiop, sig, checkctty) pgsigio(struct sigio **sigiop, int sig, int checkctty)
struct sigio **sigiop;
int sig, checkctty;
{ {
ksiginfo_t ksi; ksiginfo_t ksi;
struct sigio *sigio; struct sigio *sigio;