summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/machdep.c16
-rw-r--r--sys/amd64/ia32/ia32_signal.c24
2 files changed, 20 insertions, 20 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 0662e94..09b9f1c 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -246,8 +246,8 @@ sendsig(catcher, sig, mask, code)
/* Save user context. */
bzero(&sf, sizeof(sf));
sf.sf_uc.uc_sigmask = *mask;
- sf.sf_uc.uc_stack = p->p_sigstk;
- sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK)
+ sf.sf_uc.uc_stack = td->td_sigstk;
+ sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK)
? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE;
sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
bcopy(regs, &sf.sf_uc.uc_mcontext.mc_rdi, sizeof(*regs));
@@ -256,12 +256,12 @@ sendsig(catcher, sig, mask, code)
fpstate_drop(td);
/* Allocate space for the signal handler context. */
- if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack &&
+ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sp = p->p_sigstk.ss_sp +
- p->p_sigstk.ss_size - sizeof(struct sigframe);
+ sp = td->td_sigstk.ss_sp +
+ td->td_sigstk.ss_size - sizeof(struct sigframe);
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
- p->p_sigstk.ss_flags |= SS_ONSTACK;
+ td->td_sigstk.ss_flags |= SS_ONSTACK;
#endif
} else
sp = (char *)regs->tf_rsp - sizeof(struct sigframe) - 128;
@@ -403,9 +403,9 @@ sigreturn(td, uap)
PROC_LOCK(p);
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
if (ucp->uc_mcontext.mc_onstack & 1)
- p->p_sigstk.ss_flags |= SS_ONSTACK;
+ td->td_sigstk.ss_flags |= SS_ONSTACK;
else
- p->p_sigstk.ss_flags &= ~SS_ONSTACK;
+ td->td_sigstk.ss_flags &= ~SS_ONSTACK;
#endif
td->td_sigmask = ucp->uc_sigmask;
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c
index 0792309..966b826 100644
--- a/sys/amd64/ia32/ia32_signal.c
+++ b/sys/amd64/ia32/ia32_signal.c
@@ -194,9 +194,9 @@ freebsd4_ia32_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
/* Save user context. */
bzero(&sf, sizeof(sf));
sf.sf_uc.uc_sigmask = *mask;
- sf.sf_uc.uc_stack.ss_sp = (uintptr_t)p->p_sigstk.ss_sp;
- sf.sf_uc.uc_stack.ss_size = p->p_sigstk.ss_size;
- sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK)
+ sf.sf_uc.uc_stack.ss_sp = (uintptr_t)td->td_sigstk.ss_sp;
+ sf.sf_uc.uc_stack.ss_size = td->td_sigstk.ss_size;
+ sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK)
? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE;
sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
sf.sf_uc.uc_mcontext.mc_gs = rgs();
@@ -220,10 +220,10 @@ freebsd4_ia32_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
sf.sf_uc.uc_mcontext.mc_ss = regs->tf_ss;
/* Allocate space for the signal handler context. */
- if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack &&
+ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sfp = (struct ia32_sigframe4 *)(p->p_sigstk.ss_sp +
- p->p_sigstk.ss_size - sizeof(sf));
+ sfp = (struct ia32_sigframe4 *)(td->td_sigstk.ss_sp +
+ td->td_sigstk.ss_size - sizeof(sf));
} else
sfp = (struct ia32_sigframe4 *)regs->tf_rsp - 1;
PROC_UNLOCK(p);
@@ -308,9 +308,9 @@ ia32_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
/* Save user context. */
bzero(&sf, sizeof(sf));
sf.sf_uc.uc_sigmask = *mask;
- sf.sf_uc.uc_stack.ss_sp = (uintptr_t)p->p_sigstk.ss_sp;
- sf.sf_uc.uc_stack.ss_size = p->p_sigstk.ss_size;
- sf.sf_uc.uc_stack.ss_flags = (p->p_flag & P_ALTSTACK)
+ sf.sf_uc.uc_stack.ss_sp = (uintptr_t)td->td_sigstk.ss_sp;
+ sf.sf_uc.uc_stack.ss_size = td->td_sigstk.ss_size;
+ sf.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK)
? ((oonstack) ? SS_ONSTACK : 0) : SS_DISABLE;
sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
sf.sf_uc.uc_mcontext.mc_gs = rgs();
@@ -337,10 +337,10 @@ ia32_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
fpstate_drop(td);
/* Allocate space for the signal handler context. */
- if ((p->p_flag & P_ALTSTACK) != 0 && !oonstack &&
+ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
SIGISMEMBER(psp->ps_sigonstack, sig)) {
- sp = p->p_sigstk.ss_sp +
- p->p_sigstk.ss_size - sizeof(sf);
+ sp = td->td_sigstk.ss_sp +
+ td->td_sigstk.ss_size - sizeof(sf);
} else
sp = (char *)regs->tf_rsp - sizeof(sf);
/* Align to 16 bytes. */
OpenPOWER on IntegriCloud