ia32: Sync signal context type names with i386.
- Use ia32_freebsd4_* instead of ia32_*4. - Use ia32_o* instead of ia32_*3. Reviewed by: brooks, imp, kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33882
This commit is contained in:
parent
efdb03e9a9
commit
bd7630ef61
@ -339,7 +339,7 @@ freebsd32_swapcontext(struct thread *td, struct freebsd32_swapcontext_args *uap)
|
||||
static void
|
||||
ia32_osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
{
|
||||
struct ia32_sigframe3 sf, *fp;
|
||||
struct ia32_osigframe sf, *fp;
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
struct sigacts *psp;
|
||||
@ -359,11 +359,11 @@ ia32_osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
/* Allocate space for the signal handler context. */
|
||||
if ((td->td_pflags & TDP_ALTSTACK) && !oonstack &&
|
||||
SIGISMEMBER(psp->ps_sigonstack, sig)) {
|
||||
fp = (struct ia32_sigframe3 *)((uintptr_t)td->td_sigstk.ss_sp +
|
||||
fp = (struct ia32_osigframe *)((uintptr_t)td->td_sigstk.ss_sp +
|
||||
td->td_sigstk.ss_size - sizeof(sf));
|
||||
td->td_sigstk.ss_flags |= SS_ONSTACK;
|
||||
} else
|
||||
fp = (struct ia32_sigframe3 *)regs->tf_rsp - 1;
|
||||
fp = (struct ia32_osigframe *)regs->tf_rsp - 1;
|
||||
|
||||
/* Build the argument list for the signal handler. */
|
||||
sf.sf_signum = sig;
|
||||
@ -441,7 +441,7 @@ ia32_osendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
static void
|
||||
freebsd4_ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
{
|
||||
struct ia32_sigframe4 sf, *sfp;
|
||||
struct ia32_freebsd4_sigframe sf, *sfp;
|
||||
struct siginfo32 siginfo;
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
@ -497,10 +497,10 @@ freebsd4_ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
/* Allocate space for the signal handler context. */
|
||||
if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
|
||||
SIGISMEMBER(psp->ps_sigonstack, sig)) {
|
||||
sfp = (struct ia32_sigframe4 *)((uintptr_t)td->td_sigstk.ss_sp +
|
||||
sfp = (struct ia32_freebsd4_sigframe *)((uintptr_t)td->td_sigstk.ss_sp +
|
||||
td->td_sigstk.ss_size - sizeof(sf));
|
||||
} else
|
||||
sfp = (struct ia32_sigframe4 *)regs->tf_rsp - 1;
|
||||
sfp = (struct ia32_freebsd4_sigframe *)regs->tf_rsp - 1;
|
||||
PROC_UNLOCK(p);
|
||||
|
||||
/* Build the argument list for the signal handler. */
|
||||
@ -696,7 +696,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
int
|
||||
ofreebsd32_sigreturn(struct thread *td, struct ofreebsd32_sigreturn_args *uap)
|
||||
{
|
||||
struct ia32_sigcontext3 sc, *scp;
|
||||
struct ia32_osigcontext sc, *scp;
|
||||
struct trapframe *regs;
|
||||
int eflags, error;
|
||||
ksiginfo_t ksi;
|
||||
@ -754,9 +754,9 @@ int
|
||||
freebsd4_freebsd32_sigreturn(struct thread *td,
|
||||
struct freebsd4_freebsd32_sigreturn_args *uap)
|
||||
{
|
||||
struct ia32_ucontext4 uc;
|
||||
struct ia32_freebsd4_ucontext uc;
|
||||
struct trapframe *regs;
|
||||
struct ia32_ucontext4 *ucp;
|
||||
struct ia32_freebsd4_ucontext *ucp;
|
||||
int cs, eflags, error;
|
||||
ksiginfo_t ksi;
|
||||
|
||||
|
@ -30,12 +30,12 @@ ASSYM(IA32_UC_SS, offsetof(struct ia32_ucontext, uc_mcontext.mc_ss));
|
||||
ASSYM(IA32_UC_FSBASE, offsetof(struct ia32_ucontext, uc_mcontext.mc_fsbase));
|
||||
ASSYM(IA32_UC_GSBASE, offsetof(struct ia32_ucontext, uc_mcontext.mc_gsbase));
|
||||
#ifdef COMPAT_43
|
||||
ASSYM(IA32_SIGF_SC, offsetof(struct ia32_sigframe3, sf_siginfo.si_sc));
|
||||
ASSYM(IA32_SIGF_SC, offsetof(struct ia32_osigframe, sf_siginfo.si_sc));
|
||||
#endif
|
||||
#ifdef COMPAT_FREEBSD4
|
||||
ASSYM(IA32_SIGF_UC4, offsetof(struct ia32_sigframe4, sf_uc));
|
||||
ASSYM(IA32_UC4_GS, offsetof(struct ia32_ucontext4, uc_mcontext.mc_gs));
|
||||
ASSYM(IA32_UC4_FS, offsetof(struct ia32_ucontext4, uc_mcontext.mc_fs));
|
||||
ASSYM(IA32_UC4_ES, offsetof(struct ia32_ucontext4, uc_mcontext.mc_es));
|
||||
ASSYM(IA32_UC4_DS, offsetof(struct ia32_ucontext4, uc_mcontext.mc_ds));
|
||||
ASSYM(IA32_SIGF_UC4, offsetof(struct ia32_freebsd4_sigframe, sf_uc));
|
||||
ASSYM(IA32_UC4_GS, offsetof(struct ia32_freebsd4_ucontext, uc_mcontext.mc_gs));
|
||||
ASSYM(IA32_UC4_FS, offsetof(struct ia32_freebsd4_ucontext, uc_mcontext.mc_fs));
|
||||
ASSYM(IA32_UC4_ES, offsetof(struct ia32_freebsd4_ucontext, uc_mcontext.mc_es));
|
||||
ASSYM(IA32_UC4_DS, offsetof(struct ia32_freebsd4_ucontext, uc_mcontext.mc_ds));
|
||||
#endif
|
||||
|
@ -89,7 +89,7 @@ struct ia32_ucontext {
|
||||
};
|
||||
|
||||
#if defined(COMPAT_FREEBSD4)
|
||||
struct ia32_mcontext4 {
|
||||
struct ia32_freebsd4_mcontext {
|
||||
uint32_t mc_onstack; /* XXX - sigcontext compat. */
|
||||
uint32_t mc_gs; /* machine state (struct trapframe) */
|
||||
uint32_t mc_fs;
|
||||
@ -114,9 +114,9 @@ struct ia32_mcontext4 {
|
||||
uint32_t __spare__[17];
|
||||
};
|
||||
|
||||
struct ia32_ucontext4 {
|
||||
struct ia32_freebsd4_ucontext {
|
||||
sigset_t uc_sigmask;
|
||||
struct ia32_mcontext4 uc_mcontext;
|
||||
struct ia32_freebsd4_mcontext uc_mcontext;
|
||||
uint32_t uc_link;
|
||||
struct sigaltstack32 uc_stack;
|
||||
uint32_t __spare__[8];
|
||||
@ -124,7 +124,7 @@ struct ia32_ucontext4 {
|
||||
#endif
|
||||
|
||||
#ifdef COMPAT_43
|
||||
struct ia32_sigcontext3 {
|
||||
struct ia32_osigcontext {
|
||||
uint32_t sc_onstack;
|
||||
uint32_t sc_mask;
|
||||
uint32_t sc_esp;
|
||||
@ -154,13 +154,13 @@ struct ia32_sigcontext3 {
|
||||
*/
|
||||
|
||||
#ifdef COMPAT_FREEBSD4
|
||||
struct ia32_sigframe4 {
|
||||
struct ia32_freebsd4_sigframe {
|
||||
uint32_t sf_signum;
|
||||
uint32_t sf_siginfo; /* code or pointer to sf_si */
|
||||
uint32_t sf_ucontext; /* points to sf_uc */
|
||||
uint32_t sf_addr; /* undocumented 4th arg */
|
||||
uint32_t sf_ah; /* action/handler pointer */
|
||||
struct ia32_ucontext4 sf_uc; /* = *sf_ucontext */
|
||||
struct ia32_freebsd4_ucontext sf_uc; /* = *sf_ucontext */
|
||||
struct siginfo32 sf_si; /* = *sf_siginfo (SA_SIGINFO case) */
|
||||
};
|
||||
#endif
|
||||
@ -177,19 +177,19 @@ struct ia32_sigframe {
|
||||
};
|
||||
|
||||
#ifdef COMPAT_43
|
||||
struct ia32_siginfo3 {
|
||||
struct ia32_osiginfo {
|
||||
struct ia32_sigcontext3 si_sc;
|
||||
int si_signo;
|
||||
int si_code;
|
||||
union sigval32 si_value;
|
||||
};
|
||||
struct ia32_sigframe3 {
|
||||
struct ia32_osigframe {
|
||||
int sf_signum;
|
||||
uint32_t sf_arg2; /* int or siginfo_t */
|
||||
uint32_t sf_scp;
|
||||
uint32_t sf_addr;
|
||||
uint32_t sf_ah; /* action/handler pointer */
|
||||
struct ia32_siginfo3 sf_siginfo;
|
||||
struct ia32_osiginfo sf_siginfo;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -78,9 +78,9 @@ CTASSERT(sizeof(struct ia32_ucontext) == 704);
|
||||
CTASSERT(sizeof(struct ia32_sigframe) == 800);
|
||||
CTASSERT(sizeof(struct siginfo32) == 64);
|
||||
#ifdef COMPAT_FREEBSD4
|
||||
CTASSERT(sizeof(struct ia32_mcontext4) == 260);
|
||||
CTASSERT(sizeof(struct ia32_ucontext4) == 324);
|
||||
CTASSERT(sizeof(struct ia32_sigframe4) == 408);
|
||||
CTASSERT(sizeof(struct ia32_freebsd4_mcontext) == 260);
|
||||
CTASSERT(sizeof(struct ia32_freebsd4_ucontext) == 324);
|
||||
CTASSERT(sizeof(struct ia32_freebsd4_sigframe) == 408);
|
||||
#endif
|
||||
|
||||
#include "vdso_ia32_offsets.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user