summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-06-28 06:34:08 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-06-28 06:34:08 +0000
commitbb3ae5a363724befe0ef582c8f0424dbf6a094d1 (patch)
tree033c1141141e4c9dd02b4566a65e6f6af162351b /sys/pc98
parentc55d515408e18d245f69424dd07336d2516e0fec (diff)
downloadFreeBSD-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/pc98')
-rw-r--r--sys/pc98/i386/machdep.c20
-rw-r--r--sys/pc98/pc98/machdep.c20
2 files changed, 40 insertions, 0 deletions
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).
OpenPOWER on IntegriCloud