aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/sparc64/machdep.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2003-06-28 06:34:08 +0000
committerDavid Xu <davidxu@FreeBSD.org>2003-06-28 06:34:08 +0000
commitb8f480ab94a392e86e754215b911d269f45a45be (patch)
tree033c1141141e4c9dd02b4566a65e6f6af162351b /sys/sparc64/sparc64/machdep.c
parentcf260fe35a587a367bdbad190485c8290941ea93 (diff)
downloadsrc-b8f480ab94a392e86e754215b911d269f45a45be.tar.gz
src-b8f480ab94a392e86e754215b911d269f45a45be.zip
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
Notes
Notes: svn path=/head/; revision=116958
Diffstat (limited to 'sys/sparc64/sparc64/machdep.c')
-rw-r--r--sys/sparc64/sparc64/machdep.c19
1 files changed, 19 insertions, 0 deletions
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;