diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 6056c2e5a9a8..d0013a95ea82 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -1461,6 +1461,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) alpha_pal_wrusp((unsigned long)sfp); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + /* XXXKSE fill other fields */ +} + /* * System call to cleanup state after a signal * has been taken. Reset signal mask and diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 47f4b79eec73..005e10e27fff 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -299,6 +299,25 @@ sendsig(catcher, sig, mask, code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + /* XXXKSE fill other fields */ +} + /* * System call to cleanup state after a signal * has been taken. Reset signal mask and diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 0719362e6c65..4b0eeeae4bc9 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -630,6 +630,26 @@ sendsig(catcher, sig, mask, code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + si->si_addr = (void *)td->td_frame->tf_err; + /* XXXKSE fill other fields */ +} + /* * System call to cleanup state after a signal * has been taken. Reset signal mask and diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 90bed549a93d..fbc9fa5428bc 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -937,6 +937,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + /* XXXKSE fill other fields */ +} + /* * System call to cleanup state after a signal * has been taken. Reset signal mask and diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 396d20a6eca9..e1d5f081235b 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -686,6 +686,26 @@ sendsig(catcher, sig, mask, code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + si->si_addr = (void *)td->td_frame->tf_err; + /* XXXKSE fill other fields */ +} + /* * System call to cleanup state after a signal * has been taken. Reset signal mask and diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 396d20a6eca9..e1d5f081235b 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -686,6 +686,26 @@ sendsig(catcher, sig, mask, code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + si->si_addr = (void *)td->td_frame->tf_err; + /* XXXKSE fill other fields */ +} + /* * System call to cleanup state after a signal * has been taken. Reset signal mask and diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index f9b3c5dddcab..e1f77dd1a8f9 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -505,6 +505,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + /* XXXKSE fill other fields */ +} + int sigreturn(struct thread *td, struct sigreturn_args *uap) { diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index f9b3c5dddcab..e1f77dd1a8f9 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -505,6 +505,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + /* XXXKSE fill other fields */ +} + int sigreturn(struct thread *td, struct sigreturn_args *uap) { diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index 2135b6dd5ad0..fd7d7a40cacd 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -488,6 +488,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) mtx_lock(&psp->ps_mtx); } +/* + * Build siginfo_t for SA thread + */ +void +thread_siginfo(int sig, u_long code, siginfo_t *si) +{ + struct proc *p; + struct thread *td; + + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + + bzero(si, sizeof(*si)); + si->si_signo = sig; + si->si_code = code; + /* XXXKSE fill other fields */ +} + #ifndef _SYS_SYSPROTO_H_ struct sigreturn_args { ucontext_t *ucp;