diff options
Diffstat (limited to 'sys/arch/sparc/sparc/machdep.c')
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 92 |
1 files changed, 6 insertions, 86 deletions
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index 0db30c9afcd..0e4ba58c863 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -427,7 +427,7 @@ struct sigframe { int sf_xxx; /* placeholder */ #endif union { - int sfu_addr; /* SunOS compat */ + caddr_t sfu_addr; /* SunOS compat */ siginfo_t *sfu_sip; /* native */ } sf_u; struct sigcontext sf_sc; /* actual sigcontext */ @@ -463,11 +463,12 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) * Send an interrupt to process. */ void -sendsig(catcher, sig, mask, code, addr) +sendsig(catcher, sig, mask, code, type, val) sig_t catcher; int sig, mask; u_long code; - caddr_t addr; + int type; + union sigval val; { register struct proc *p = curproc; register struct sigacts *psp = p->p_sigacts; @@ -513,7 +514,7 @@ sendsig(catcher, sig, mask, code, addr) #ifdef COMPAT_SUNOS if (p->p_emul == &emul_sunos) { sf.sf_scp = &fp->sf_sc; - sf.sf_u.sfu_addr = (u_int)addr; + sf.sf_u.sfu_addr = val.sival_ptr; } #endif @@ -531,17 +532,7 @@ sendsig(catcher, sig, mask, code, addr) if (psp->ps_siginfo & sigmask(sig)) { sf.sf_u.sfu_sip = &fp->sf_si; - initsiginfo(sf.sf_u.sfu_sip, sig); - fixsiginfo(sf.sf_u.sfu_sip, sig, code, addr); -#if 0 - if (sig == SIGSEGV) { - /* try to be more specific about read or write */ - if (tf->tf_err & PGEX_W) - sf.sf_si.si_code = SEGV_ACCERR; - else - sf.sf_si.si_code = SEGV_MAPERR; - } -#endif + initsiginfo(sf.sf_u.sfu_sip, sig, code, type, val); } /* @@ -652,77 +643,6 @@ sys_sigreturn(p, v, retval) return (EJUSTRETURN); } -void -fixsiginfo(si, sig, code, addr) - siginfo_t *si; - int sig; - u_long code; - caddr_t addr; -{ - si->si_addr = addr; - -#if 0 - switch (code) { - case T_PRIVINFLT: - si->si_code = ILL_PRVOPC; - si->si_trapno = T_PRIVINFLT; - break; - case T_BPTFLT: - si->si_code = TRAP_BRKPT; - si->si_trapno = T_BPTFLT; - break; - case T_ARITHTRAP: - si->si_code = FPE_INTOVF; - si->si_trapno = T_DIVIDE; - break; - case T_PROTFLT: - si->si_code = SEGV_ACCERR; - si->si_trapno = T_PROTFLT; - break; - case T_TRCTRAP: - si->si_code = TRAP_TRACE; - si->si_trapno = T_TRCTRAP; - break; - case T_PAGEFLT: - si->si_code = SEGV_ACCERR; - si->si_trapno = T_PAGEFLT; - break; - case T_ALIGNFLT: - si->si_code = BUS_ADRALN; - si->si_trapno = T_ALIGNFLT; - break; - case T_DIVIDE: - si->si_code = FPE_FLTDIV; - si->si_trapno = T_DIVIDE; - break; - case T_OFLOW: - si->si_code = FPE_FLTOVF; - si->si_trapno = T_DIVIDE; - break; - case T_BOUND: - si->si_code = FPE_FLTSUB; - si->si_trapno = T_BOUND; - break; - case T_DNA: - si->si_code = FPE_FLTINV; - si->si_trapno = T_DNA; - break; - case T_FPOPFLT: - si->si_code = FPE_FLTINV; - si->si_trapno = T_FPOPFLT; - break; - case T_SEGNPFLT: - si->si_code = SEGV_MAPERR; - si->si_trapno = T_SEGNPFLT; - break; - case T_STKFLT: - si->si_code = ILL_BADSTK; - si->si_trapno = T_STKFLT; - break; - } -#endif -} - int waittime = -1; void |