diff options
author | obrien <obrien@FreeBSD.org> | 2004-01-05 00:29:00 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-01-05 00:29:00 +0000 |
commit | fae4c97a55eb3fc444c2267f0f0e505a2b0d5f62 (patch) | |
tree | d6d22c75336ac8fd3a00080ddfb2fe5a4c28970e | |
parent | 84dcced1d556488335591b4c3fab4b873b25b450 (diff) | |
download | FreeBSD-src-fae4c97a55eb3fc444c2267f0f0e505a2b0d5f62.zip FreeBSD-src-fae4c97a55eb3fc444c2267f0f0e505a2b0d5f62.tar.gz |
Attempt to make the proper changes here for the proc.h commit:
Make sigaltstack as per-threaded, because per-process sigaltstack state
is useless for threaded programs, multiple threads can not share same
stack.
The alternative signal stack is private for thread, no lock is needed,
the orignal P_ALTSTACK is now moved into td_pflags and renamed to
TDP_ALTSTACK.
For single thread or Linux clone() based threaded program, there is no
semantic changed, because those programs only have one kernel thread
in every process.
which left out SVR4 bits.
-rw-r--r-- | sys/i386/svr4/svr4_machdep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c index a800b43..91ad9d3 100644 --- a/sys/i386/svr4/svr4_machdep.c +++ b/sys/i386/svr4/svr4_machdep.c @@ -206,7 +206,7 @@ svr4_setcontext(td, uc) #if defined(DONE_MORE_SIGALTSTACK_WORK) psp = p->p_sigacts; #endif - sf = &p->p_sigstk; + sf = &td->td_sigstk; /* * XXX: @@ -437,11 +437,11 @@ svr4_sendsig(catcher, sig, mask, code) /* * Allocate space for the signal handler context. */ - if ((p->p_flag & P_ALTSTACK) && !oonstack && + if ((td->td_pflags & TDP_ALTSTACK) && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - fp = (struct svr4_sigframe *)(p->p_sigstk.ss_sp + - p->p_sigstk.ss_size - sizeof(struct svr4_sigframe)); - p->p_sigstk.ss_flags |= SS_ONSTACK; + fp = (struct svr4_sigframe *)(td->td_sigstk.ss_sp + + td->td_sigstk.ss_size - sizeof(struct svr4_sigframe)); + td->td_sigstk.ss_flags |= SS_ONSTACK; } else { fp = (struct svr4_sigframe *)tf->tf_esp - 1; } |