diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-06-28 06:34:08 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-06-28 06:34:08 +0000 |
commit | bb3ae5a363724befe0ef582c8f0424dbf6a094d1 (patch) | |
tree | 033c1141141e4c9dd02b4566a65e6f6af162351b /sys/powerpc | |
parent | c55d515408e18d245f69424dd07336d2516e0fec (diff) | |
download | FreeBSD-src-bb3ae5a363724befe0ef582c8f0424dbf6a094d1.zip FreeBSD-src-bb3ae5a363724befe0ef582c8f0424dbf6a094d1.tar.gz |
Add a machine depended function thread_siginfo, SA signal code
will use the function to construct a siginfo structure and use
the result to export to userland.
Reviewed by: julian
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/aim/machdep.c | 19 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 19 |
2 files changed, 38 insertions, 0 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index f9b3c5d..e1f77dd 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 f9b3c5d..e1f77dd 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) { |