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.
This commit is contained in:
parent
a1134bb184
commit
cc1239c8c2
@ -354,8 +354,8 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
#ifdef DEBUG
|
||||
if (ldebug(rt_sendsig))
|
||||
printf(LMSG("rt_sendsig flags: 0x%x, sp: %p, ss: 0x%x, mask: 0x%x"),
|
||||
frame.sf_sc.uc_stack.ss_flags, p->p_sigstk.ss_sp,
|
||||
p->p_sigstk.ss_size, frame.sf_sc.uc_mcontext.sc_mask);
|
||||
frame.sf_sc.uc_stack.ss_flags, td->td_sigstk.ss_sp,
|
||||
td->td_sigstk.ss_size, frame.sf_sc.uc_mcontext.sc_mask);
|
||||
#endif
|
||||
|
||||
if (copyout(&frame, fp, sizeof(frame)) != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user