diff options
author | alfred <alfred@FreeBSD.org> | 2002-12-13 22:41:47 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-12-13 22:41:47 +0000 |
commit | 4f48184fb2c8948c406b21c3f802b5b281cef957 (patch) | |
tree | a1ef524330ea7e253fb665abea3ddb594cde69fc /sys/compat/svr4/svr4_signal.c | |
parent | d19b4e039d47537b44233aae83d03b974d29d771 (diff) | |
download | FreeBSD-src-4f48184fb2c8948c406b21c3f802b5b281cef957.zip FreeBSD-src-4f48184fb2c8948c406b21c3f802b5b281cef957.tar.gz |
Backout removal SCARGS, the code freeze is only "selectively" over.
Diffstat (limited to 'sys/compat/svr4/svr4_signal.c')
-rw-r--r-- | sys/compat/svr4/svr4_signal.c | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c index 3e688e6..fea5317 100644 --- a/sys/compat/svr4/svr4_signal.c +++ b/sys/compat/svr4/svr4_signal.c @@ -269,12 +269,12 @@ svr4_sys_sigaction(td, uap) int error; DPRINTF(("@@@ svr4_sys_sigaction(%d, %d, %d)\n", td->td_proc->p_pid, - uap->signum, - SVR4_SVR42BSD_SIG(uap->signum))); + SCARG(uap, signum), + SVR4_SVR42BSD_SIG(SCARG(uap, signum)))); sg = stackgap_init(); - nisa = uap->nsa; - oisa = uap->osa; + nisa = SCARG(uap, nsa); + oisa = SCARG(uap, osa); if (oisa != NULL) obsa = stackgap_alloc(&sg, sizeof(struct sigaction)); @@ -301,9 +301,9 @@ svr4_sys_sigaction(td, uap) } #endif - sa.sig = SVR4_SVR42BSD_SIG(uap->signum); - sa.act = nbsa; - sa.oact = obsa; + SCARG(&sa, sig) = SVR4_SVR42BSD_SIG(SCARG(uap, signum)); + SCARG(&sa, act) = nbsa; + SCARG(&sa, oact) = obsa; if ((error = sigaction(td, &sa)) != 0) return error; @@ -332,8 +332,8 @@ svr4_sys_sigaltstack(td, uap) retval = td->td_retval; sg = stackgap_init(); - nsss = uap->nss; - osss = uap->oss; + nsss = SCARG(uap, nss); + osss = SCARG(uap, oss); if (osss != NULL) obss = stackgap_alloc(&sg, sizeof(struct sigaltstack)); @@ -350,8 +350,8 @@ svr4_sys_sigaltstack(td, uap) } else nbss = NULL; - sa.ss = nbss; - sa.oss = obss; + SCARG(&sa, ss) = nbss; + SCARG(&sa, oss) = obss; if ((error = sigaltstack(td, &sa)) != 0) return error; @@ -381,13 +381,13 @@ svr4_sys_signal(td, uap) DPRINTF(("@@@ svr4_sys_signal(%d)\n", td->td_proc->p_pid)); - signum = SVR4_SVR42BSD_SIG(SVR4_SIGNO(uap->signum)); + signum = SVR4_SVR42BSD_SIG(SVR4_SIGNO(SCARG(uap, signum))); if (signum <= 0 || signum > SVR4_NSIG) return (EINVAL); - switch (SVR4_SIGCALL(uap->signum)) { + switch (SVR4_SIGCALL(SCARG(uap, signum))) { case SVR4_SIGDEFER_MASK: - if (uap->handler == SVR4_SIG_HOLD) + if (SCARG(uap, handler) == SVR4_SIG_HOLD) goto sighold; /* FALLTHROUGH */ @@ -398,11 +398,11 @@ svr4_sys_signal(td, uap) nbsa = stackgap_alloc(&sg, sizeof(struct sigaction)); obsa = stackgap_alloc(&sg, sizeof(struct sigaction)); - sa_args.sig = signum; - sa_args.act = nbsa; - sa_args.oact = obsa; + SCARG(&sa_args, sig) = signum; + SCARG(&sa_args, act) = nbsa; + SCARG(&sa_args, oact) = obsa; - sa.sa_handler = (sig_t) uap->handler; + sa.sa_handler = (sig_t) SCARG(uap, handler); SIGEMPTYSET(sa.sa_mask); sa.sa_flags = 0; @@ -432,9 +432,9 @@ sighold: set = stackgap_alloc(&sg, sizeof(sigset_t)); SIGEMPTYSET(*set); SIGADDSET(*set, signum); - sa.how = SIG_BLOCK; - sa.set = set; - sa.oset = NULL; + SCARG(&sa, how) = SIG_BLOCK; + SCARG(&sa, set) = set; + SCARG(&sa, oset) = NULL; return sigprocmask(td, &sa); } @@ -446,9 +446,9 @@ sighold: set = stackgap_alloc(&sg, sizeof(sigset_t)); SIGEMPTYSET(*set); SIGADDSET(*set, signum); - sa.how = SIG_UNBLOCK; - sa.set = set; - sa.oset = NULL; + SCARG(&sa, how) = SIG_UNBLOCK; + SCARG(&sa, set) = set; + SCARG(&sa, oset) = NULL; return sigprocmask(td, &sa); } @@ -458,9 +458,9 @@ sighold: struct sigaction *bsa, sa; bsa = stackgap_alloc(&sg, sizeof(struct sigaction)); - sa_args.sig = signum; - sa_args.act = bsa; - sa_args.oact = NULL; + SCARG(&sa_args, sig) = signum; + SCARG(&sa_args, act) = bsa; + SCARG(&sa_args, oact) = NULL; sa.sa_handler = SIG_IGN; SIGEMPTYSET(sa.sa_mask); @@ -484,7 +484,7 @@ sighold: *set = td->td_proc->p_sigmask; PROC_UNLOCK(td->td_proc); SIGDELSET(*set, signum); - sa.sigmask = set; + SCARG(&sa, sigmask) = set; return sigsuspend(td, &sa); } @@ -504,26 +504,26 @@ svr4_sys_sigprocmask(td, uap) int error = 0, *retval; retval = td->td_retval; - if (uap->oset != NULL) { + if (SCARG(uap, oset) != NULL) { /* Fix the return value first if needed */ PROC_LOCK(td->td_proc); bsd_to_svr4_sigset(&td->td_proc->p_sigmask, &sss); PROC_UNLOCK(td->td_proc); - if ((error = copyout(&sss, uap->oset, sizeof(sss))) != 0) + if ((error = copyout(&sss, SCARG(uap, oset), sizeof(sss))) != 0) return error; } - if (uap->set == NULL) + if (SCARG(uap, set) == NULL) /* Just examine */ return 0; - if ((error = copyin(uap->set, &sss, sizeof(sss))) != 0) + if ((error = copyin(SCARG(uap, set), &sss, sizeof(sss))) != 0) return error; svr4_to_bsd_sigset(&sss, &bss); PROC_LOCK(td->td_proc); - switch (uap->how) { + switch (SCARG(uap, how)) { case SVR4_SIG_BLOCK: SIGSETOR(td->td_proc->p_sigmask, bss); SIG_CANTMASK(td->td_proc->p_sigmask); @@ -560,9 +560,9 @@ svr4_sys_sigpending(td, uap) DPRINTF(("@@@ svr4_sys_sigpending(%d)\n", td->td_proc->p_pid)); retval = td->td_retval; - switch (uap->what) { + switch (SCARG(uap, what)) { case 1: /* sigpending */ - if (uap->mask == NULL) + if (SCARG(uap, mask) == NULL) return 0; PROC_LOCK(td->td_proc); bss = td->td_proc->p_siglist; @@ -586,7 +586,7 @@ svr4_sys_sigpending(td, uap) return EINVAL; } - return copyout(&sss, uap->mask, sizeof(sss)); + return copyout(&sss, SCARG(uap, mask), sizeof(sss)); } int @@ -600,13 +600,13 @@ svr4_sys_sigsuspend(td, uap) int error; caddr_t sg = stackgap_init(); - if ((error = copyin(uap->ss, &sss, sizeof(sss))) != 0) + if ((error = copyin(SCARG(uap, ss), &sss, sizeof(sss))) != 0) return error; bss = stackgap_alloc(&sg, sizeof(sigset_t)); svr4_to_bsd_sigset(&sss, bss); - sa.sigmask = bss; + SCARG(&sa, sigmask) = bss; return sigsuspend(td, &sa); } @@ -618,8 +618,8 @@ svr4_sys_kill(td, uap) { struct kill_args ka; - ka.pid = uap->pid; - ka.signum = SVR4_SVR42BSD_SIG(uap->signum); + SCARG(&ka, pid) = SCARG(uap, pid); + SCARG(&ka, signum) = SVR4_SVR42BSD_SIG(SCARG(uap, signum)); return kill(td, &ka); } @@ -671,6 +671,6 @@ svr4_sys_pause(td, uap) { struct sigsuspend_args bsa; - bsa.sigmask = &td->td_proc->p_sigmask; + SCARG(&bsa, sigmask) = &td->td_proc->p_sigmask; return sigsuspend(td, &bsa); } |