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/i386/ibcs2/ibcs2_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/i386/ibcs2/ibcs2_signal.c')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_signal.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/sys/i386/ibcs2/ibcs2_signal.c b/sys/i386/ibcs2/ibcs2_signal.c index 3a6082e..0084cbe 100644 --- a/sys/i386/ibcs2/ibcs2_signal.c +++ b/sys/i386/ibcs2/ibcs2_signal.c @@ -199,8 +199,8 @@ ibcs2_sigaction(td, uap) int error; sg = stackgap_init(); - nisa = uap->act; - oisa = uap->oact; + nisa = SCARG(uap, act); + oisa = SCARG(uap, oact); if (oisa != NULL) obsa = stackgap_alloc(&sg, sizeof(struct sigaction)); @@ -217,9 +217,9 @@ ibcs2_sigaction(td, uap) } else nbsa = NULL; - sa.sig = ibcs2_to_bsd_sig[_SIG_IDX(uap->sig)]; - sa.act = nbsa; - sa.oact = obsa; + SCARG(&sa, sig) = ibcs2_to_bsd_sig[_SIG_IDX(SCARG(uap, sig))]; + SCARG(&sa, act) = nbsa; + SCARG(&sa, oact) = obsa; if ((error = sigaction(td, &sa)) != 0) return error; @@ -242,24 +242,24 @@ ibcs2_sigsys(td, uap) { struct proc *p = td->td_proc; struct sigaction sa; - int signum = ibcs2_to_bsd_sig[_SIG_IDX(IBCS2_SIGNO(uap->sig))]; + int signum = ibcs2_to_bsd_sig[_SIG_IDX(IBCS2_SIGNO(SCARG(uap, sig)))]; int error; caddr_t sg = stackgap_init(); if (signum <= 0 || signum >= IBCS2_NSIG) { - if (IBCS2_SIGCALL(uap->sig) == IBCS2_SIGNAL_MASK || - IBCS2_SIGCALL(uap->sig) == IBCS2_SIGSET_MASK) + if (IBCS2_SIGCALL(SCARG(uap, sig)) == IBCS2_SIGNAL_MASK || + IBCS2_SIGCALL(SCARG(uap, sig)) == IBCS2_SIGSET_MASK) td->td_retval[0] = (int)IBCS2_SIG_ERR; return EINVAL; } - switch (IBCS2_SIGCALL(uap->sig)) { + switch (IBCS2_SIGCALL(SCARG(uap, sig))) { case IBCS2_SIGSET_MASK: /* * Check for SIG_HOLD action. * Otherwise, perform signal() except with different sa_flags. */ - if (uap->fp != IBCS2_SIG_HOLD) { + if (SCARG(uap, fp) != IBCS2_SIG_HOLD) { /* add sig to mask before exececuting signal handler */ sa.sa_flags = 0; goto ibcs2_sigset; @@ -273,9 +273,9 @@ ibcs2_sigsys(td, uap) SIGEMPTYSET(mask); SIGADDSET(mask, signum); - sa.how = SIG_BLOCK; - sa.set = &mask; - sa.oset = NULL; + SCARG(&sa, how) = SIG_BLOCK; + SCARG(&sa, set) = &mask; + SCARG(&sa, oset) = NULL; return sigprocmask(td, &sa); } @@ -296,11 +296,11 @@ ibcs2_sigsys(td, uap) ibcs2_sigset: 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 = uap->fp; + sa.sa_handler = SCARG(uap, fp); sigemptyset(&sa.sa_mask); #if 0 if (signum != SIGALRM) @@ -321,7 +321,7 @@ ibcs2_sigsys(td, uap) td->td_retval[0] = (int)sa.sa_handler; /* special sigset() check */ - if(IBCS2_SIGCALL(uap->sig) == IBCS2_SIGSET_MASK) { + if(IBCS2_SIGCALL(SCARG(uap, sig)) == IBCS2_SIGSET_MASK) { PROC_LOCK(p); /* check to make sure signal is not blocked */ if(sigismember(&p->p_sigmask, signum)) { @@ -343,9 +343,9 @@ ibcs2_sigsys(td, uap) SIGEMPTYSET(mask); SIGADDSET(mask, signum); - sa.how = SIG_UNBLOCK; - sa.set = &mask; - sa.oset = NULL; + SCARG(&sa, how) = SIG_UNBLOCK; + SCARG(&sa, set) = &mask; + SCARG(&sa, oset) = NULL; return sigprocmask(td, &sa); } @@ -355,9 +355,9 @@ ibcs2_sigsys(td, uap) struct sigaction *bsa; 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); @@ -380,7 +380,7 @@ ibcs2_sigsys(td, uap) mask = p->p_sigmask; PROC_UNLOCK(p); SIGDELSET(mask, signum); - sa.sigmask = &mask; + SCARG(&sa, sigmask) = &mask; return sigsuspend(td, &sa); } @@ -399,27 +399,27 @@ ibcs2_sigprocmask(td, uap) sigset_t bss; int error = 0; - if (uap->oset != NULL) { + if (SCARG(uap, oset) != NULL) { /* Fix the return value first if needed */ PROC_LOCK(p); bsd_to_ibcs2_sigset(&p->p_sigmask, &iss); PROC_UNLOCK(p); - if ((error = copyout(&iss, uap->oset, sizeof(iss))) != 0) + if ((error = copyout(&iss, SCARG(uap, oset), sizeof(iss))) != 0) return error; } - if (uap->set == NULL) + if (SCARG(uap, set) == NULL) /* Just examine */ return 0; - if ((error = copyin(uap->set, &iss, sizeof(iss))) != 0) + if ((error = copyin(SCARG(uap, set), &iss, sizeof(iss))) != 0) return error; ibcs2_to_bsd_sigset(&iss, &bss); PROC_LOCK(p); - switch (uap->how) { + switch (SCARG(uap, how)) { case IBCS2_SIG_BLOCK: SIGSETOR(p->p_sigmask, bss); SIG_CANTMASK(p->p_sigmask); @@ -461,7 +461,7 @@ ibcs2_sigpending(td, uap) PROC_UNLOCK(p); bsd_to_ibcs2_sigset(&bss, &iss); - return copyout(&iss, uap->mask, sizeof(iss)); + return copyout(&iss, SCARG(uap, mask), sizeof(iss)); } int @@ -474,11 +474,11 @@ ibcs2_sigsuspend(td, uap) struct sigsuspend_args sa; int error; - if ((error = copyin(uap->mask, &sss, sizeof(sss))) != 0) + if ((error = copyin(SCARG(uap, mask), &sss, sizeof(sss))) != 0) return error; ibcs2_to_bsd_sigset(&sss, &bss); - sa.sigmask = &bss; + SCARG(&sa, sigmask) = &bss; return sigsuspend(td, &sa); } @@ -494,7 +494,7 @@ ibcs2_pause(td, uap) PROC_LOCK(p); mask = td->td_proc->p_sigmask; PROC_UNLOCK(p); - sa.sigmask = &mask; + SCARG(&sa, sigmask) = &mask; return sigsuspend(td, &sa); } @@ -505,7 +505,7 @@ ibcs2_kill(td, uap) { struct kill_args ka; - ka.pid = uap->pid; - ka.signum = ibcs2_to_bsd_sig[_SIG_IDX(uap->signo)]; + SCARG(&ka, pid) = SCARG(uap, pid); + SCARG(&ka, signum) = ibcs2_to_bsd_sig[_SIG_IDX(SCARG(uap, signo))]; return kill(td, &ka); } |