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 | |
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')
-rw-r--r-- | sys/alpha/alpha/machdep.c | 19 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 19 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 20 | ||||
-rw-r--r-- | sys/ia64/ia64/machdep.c | 19 | ||||
-rw-r--r-- | sys/pc98/i386/machdep.c | 20 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 20 | ||||
-rw-r--r-- | sys/powerpc/aim/machdep.c | 19 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 19 | ||||
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 19 |
9 files changed, 174 insertions, 0 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 6056c2e..d0013a9 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -1462,6 +1462,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) } /* + * 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 * stack state from context left by sendsig (above). diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 47f4b79..005e10e 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -300,6 +300,25 @@ sendsig(catcher, sig, mask, code) } /* + * 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 * stack state from context left by sendsig (above). diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 0719362..4b0eeea 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -631,6 +631,26 @@ sendsig(catcher, sig, mask, code) } /* + * 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 * stack state from context left by sendsig (above). diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 90bed54..fbc9fa5 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -938,6 +938,25 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) } /* + * 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 * stack state from context left by sendsig (above). diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 396d20a..e1d5f08 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -687,6 +687,26 @@ sendsig(catcher, sig, mask, code) } /* + * 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 * stack state from context left by sendsig (above). diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 396d20a..e1d5f08 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -687,6 +687,26 @@ sendsig(catcher, sig, mask, code) } /* + * 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 * stack state from context left by sendsig (above). 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) { diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index 2135b6d..fd7d7a4 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; |