Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/exec_machdep.c
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | #endif | ||||
mtx_lock(&psp->ps_mtx); | mtx_lock(&psp->ps_mtx); | ||||
} | } | ||||
#endif /* COMPAT_43 */ | #endif /* COMPAT_43 */ | ||||
#ifdef COMPAT_FREEBSD4 | #ifdef COMPAT_FREEBSD4 | ||||
static void | static void | ||||
freebsd4_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) | freebsd4_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) | ||||
{ | { | ||||
struct sigframe4 sf, *sfp; | struct freebsd4_sigframe sf, *sfp; | ||||
struct proc *p; | struct proc *p; | ||||
struct thread *td; | struct thread *td; | ||||
struct sigacts *psp; | struct sigacts *psp; | ||||
struct trapframe *regs; | struct trapframe *regs; | ||||
int sig; | int sig; | ||||
int oonstack; | int oonstack; | ||||
td = curthread; | td = curthread; | ||||
Show All 18 Lines | bzero(sf.sf_uc.uc_mcontext.mc_fpregs, | ||||
sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); | sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); | ||||
bzero(sf.sf_uc.uc_mcontext.__spare__, | bzero(sf.sf_uc.uc_mcontext.__spare__, | ||||
sizeof(sf.sf_uc.uc_mcontext.__spare__)); | sizeof(sf.sf_uc.uc_mcontext.__spare__)); | ||||
bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); | bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); | ||||
/* Allocate space for the signal handler context. */ | /* Allocate space for the signal handler context. */ | ||||
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && | if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && | ||||
SIGISMEMBER(psp->ps_sigonstack, sig)) { | SIGISMEMBER(psp->ps_sigonstack, sig)) { | ||||
sfp = (struct sigframe4 *)((uintptr_t)td->td_sigstk.ss_sp + | sfp = (struct freebsd4_sigframe *)((uintptr_t)td->td_sigstk.ss_sp + | ||||
td->td_sigstk.ss_size - sizeof(struct sigframe4)); | td->td_sigstk.ss_size - sizeof(struct freebsd4_sigframe)); | ||||
#if defined(COMPAT_43) | #if defined(COMPAT_43) | ||||
td->td_sigstk.ss_flags |= SS_ONSTACK; | td->td_sigstk.ss_flags |= SS_ONSTACK; | ||||
#endif | #endif | ||||
} else | } else | ||||
sfp = (struct sigframe4 *)regs->tf_esp - 1; | sfp = (struct freebsd4_sigframe *)regs->tf_esp - 1; | ||||
/* Build the argument list for the signal handler. */ | /* Build the argument list for the signal handler. */ | ||||
sf.sf_signum = sig; | sf.sf_signum = sig; | ||||
sf.sf_ucontext = (register_t)&sfp->sf_uc; | sf.sf_ucontext = (register_t)&sfp->sf_uc; | ||||
bzero(&sf.sf_si, sizeof(sf.sf_si)); | bzero(&sf.sf_si, sizeof(sf.sf_si)); | ||||
if (SIGISMEMBER(psp->ps_siginfo, sig)) { | if (SIGISMEMBER(psp->ps_siginfo, sig)) { | ||||
/* Signal handler installed with SA_SIGINFO. */ | /* Signal handler installed with SA_SIGINFO. */ | ||||
sf.sf_siginfo = (register_t)&sfp->sf_si; | sf.sf_siginfo = (register_t)&sfp->sf_si; | ||||
▲ Show 20 Lines • Show All 1,135 Lines • Show Last 20 Lines |