summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4/svr4_signal.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-03-31 22:49:17 +0000
committerjeff <jeff@FreeBSD.org>2003-03-31 22:49:17 +0000
commit46e6ba39f10b4874298cd617b4db656bb562eb37 (patch)
treeda7bdaf8a9eef1885d86203074ba0ad8ae222e7c /sys/compat/svr4/svr4_signal.c
parent803202f956e45b36a05029bd98db32041fa3a23d (diff)
downloadFreeBSD-src-46e6ba39f10b4874298cd617b4db656bb562eb37.zip
FreeBSD-src-46e6ba39f10b4874298cd617b4db656bb562eb37.tar.gz
- Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread with
a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK.
Diffstat (limited to 'sys/compat/svr4/svr4_signal.c')
-rw-r--r--sys/compat/svr4/svr4_signal.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c
index 3e688e6..c45b7cb 100644
--- a/sys/compat/svr4/svr4_signal.c
+++ b/sys/compat/svr4/svr4_signal.c
@@ -481,7 +481,7 @@ sighold:
set = stackgap_alloc(&sg, sizeof(sigset_t));
PROC_LOCK(td->td_proc);
- *set = td->td_proc->p_sigmask;
+ *set = td->td_sigmask;
PROC_UNLOCK(td->td_proc);
SIGDELSET(*set, signum);
sa.sigmask = set;
@@ -507,7 +507,7 @@ svr4_sys_sigprocmask(td, uap)
if (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);
+ bsd_to_svr4_sigset(&td->td_sigmask, &sss);
PROC_UNLOCK(td->td_proc);
if ((error = copyout(&sss, uap->oset, sizeof(sss))) != 0)
return error;
@@ -525,19 +525,19 @@ svr4_sys_sigprocmask(td, uap)
PROC_LOCK(td->td_proc);
switch (uap->how) {
case SVR4_SIG_BLOCK:
- SIGSETOR(td->td_proc->p_sigmask, bss);
- SIG_CANTMASK(td->td_proc->p_sigmask);
+ SIGSETOR(td->td_sigmask, bss);
+ SIG_CANTMASK(td->td_sigmask);
break;
case SVR4_SIG_UNBLOCK:
- SIGSETNAND(td->td_proc->p_sigmask, bss);
- signotify(td->td_proc);
+ SIGSETNAND(td->td_sigmask, bss);
+ signotify(td);
break;
case SVR4_SIG_SETMASK:
- td->td_proc->p_sigmask = bss;
- SIG_CANTMASK(td->td_proc->p_sigmask);
- signotify(td->td_proc);
+ td->td_sigmask = bss;
+ SIG_CANTMASK(td->td_sigmask);
+ signotify(td);
break;
default:
@@ -566,7 +566,8 @@ svr4_sys_sigpending(td, uap)
return 0;
PROC_LOCK(td->td_proc);
bss = td->td_proc->p_siglist;
- SIGSETAND(bss, td->td_proc->p_sigmask);
+ SIGSETOR(bss, td->td_siglist);
+ SIGSETAND(bss, td->td_sigmask);
PROC_UNLOCK(td->td_proc);
bsd_to_svr4_sigset(&bss, &sss);
break;
@@ -636,7 +637,7 @@ svr4_sys_context(td, uap)
case 0:
PROC_LOCK(td->td_proc);
DPRINTF(("getcontext(%p)\n", uap->uc));
- svr4_getcontext(td, &uc, &td->td_proc->p_sigmask,
+ svr4_getcontext(td, &uc, &td->td_sigmask,
sigonstack(cpu_getstack(td)));
PROC_UNLOCK(td->td_proc);
return copyout(&uc, uap->uc, sizeof(uc));
@@ -671,6 +672,6 @@ svr4_sys_pause(td, uap)
{
struct sigsuspend_args bsa;
- bsa.sigmask = &td->td_proc->p_sigmask;
+ bsa.sigmask = &td->td_sigmask;
return sigsuspend(td, &bsa);
}
OpenPOWER on IntegriCloud