Simplify arguments to signal handlers on mips.
- Use ksi_addr directly as si_addr in the siginfo instead of the 'badvaddr' register. - Remove a duplicate assignment of si_code. - Use ksi_addr as the 4th argument to the old-style handler instead of 'badvaddr'. Reviewed by: brooks, kevans Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23013
This commit is contained in:
parent
20723f186a
commit
9f669cf0a2
@ -147,12 +147,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
/* fill siginfo structure */
|
||||
sf.sf_si = ksi->ksi_info;
|
||||
sf.sf_si.si_signo = sig;
|
||||
sf.sf_si.si_code = ksi->ksi_code;
|
||||
sf.sf_si.si_addr = (void*)(intptr_t)regs->badvaddr;
|
||||
} else {
|
||||
/* Old FreeBSD-style arguments. */
|
||||
regs->a1 = ksi->ksi_code;
|
||||
regs->a3 = regs->badvaddr;
|
||||
regs->a3 = (uintptr_t)ksi->ksi_addr;
|
||||
/* sf.sf_ahu.sf_handler = catcher; */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user