summaryrefslogtreecommitdiff
path: root/sys/arch/usermode/dev
diff options
context:
space:
mode:
authorreinoud <reinoud@NetBSD.org>2012-03-03 21:15:15 +0000
committerreinoud <reinoud@NetBSD.org>2012-03-03 21:15:15 +0000
commitb0e9142561b63d7684c9f4f4e6bb2976141b7cd6 (patch)
tree43755f5460cb29b52937428bb548e7d806a9425e /sys/arch/usermode/dev
parent7335d238d14a9d836c405fe378b595ef7e65f7c1 (diff)
Implement signal forwarding to userland for usermode kernels. Especially
SIGFPE is important since the urkel shouldn't stop when a userland program devides by zero!
Diffstat (limited to 'sys/arch/usermode/dev')
-rw-r--r--sys/arch/usermode/dev/cpu.c10
-rw-r--r--sys/arch/usermode/dev/ttycons.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/usermode/dev/cpu.c b/sys/arch/usermode/dev/cpu.c
index 73276cfabff..0f56c17c3dc 100644
--- a/sys/arch/usermode/dev/cpu.c
+++ b/sys/arch/usermode/dev/cpu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.69 2012/01/21 22:09:56 reinoud Exp $ */
+/* $NetBSD: cpu.c,v 1.70 2012/03/03 21:15:15 reinoud Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
@@ -30,7 +30,7 @@
#include "opt_hz.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.69 2012/01/21 22:09:56 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.70 2012/03/03 21:15:15 reinoud Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -242,7 +242,7 @@ cpu_switchto(lwp_t *oldlwp, lwp_t *newlwp, bool returning)
/* create atomic switcher */
thunk_makecontext(&sc->sc_ucp, (void (*)(void)) cpu_switchto_atomic,
- 2, oldlwp, newlwp, NULL);
+ 2, oldlwp, newlwp, NULL, NULL);
KASSERT(sc);
if (oldpcb) {
@@ -341,7 +341,7 @@ cpu_lwp_trampoline(ucontext_t *ucp, void (*func)(void *), void *arg)
lwp_startup(curcpu()->ci_stash, curlwp);
/* actual jump */
- thunk_makecontext(ucp, (void (*)(void)) func, 1, arg, NULL, NULL);
+ thunk_makecontext(ucp, (void (*)(void)) func, 1, arg, NULL, NULL, NULL);
thunk_setcontext(ucp);
}
@@ -381,7 +381,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
pcb2->pcb_ucp.uc_flags = _UC_STACK | _UC_CPU | _UC_SIGMASK;
thunk_makecontext(&pcb2->pcb_ucp,
(void (*)(void)) cpu_lwp_trampoline,
- 3, &pcb2->pcb_ucp, func, arg);
+ 3, &pcb2->pcb_ucp, func, arg, NULL);
}
void
diff --git a/sys/arch/usermode/dev/ttycons.c b/sys/arch/usermode/dev/ttycons.c
index d496329f08c..3f65cc22ce1 100644
--- a/sys/arch/usermode/dev/ttycons.c
+++ b/sys/arch/usermode/dev/ttycons.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ttycons.c,v 1.18 2012/01/21 22:09:57 reinoud Exp $ */
+/* $NetBSD: ttycons.c,v 1.19 2012/03/03 21:15:15 reinoud Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttycons.c,v 1.18 2012/01/21 22:09:57 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttycons.c,v 1.19 2012/03/03 21:15:15 reinoud Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -389,7 +389,7 @@ ttycons_softintr(void *priv)
* argument 'pc' and 'va' are not used.
*/
static void
-ttycons_ctrlc(vaddr_t from_userland, vaddr_t pc, vaddr_t va)
+ttycons_ctrlc(siginfo_t *info, vaddr_t from_userland, vaddr_t pc, vaddr_t va)
{
struct ttycons_softc *sc;
@@ -416,7 +416,7 @@ ttycons_softctrlc(void *priv)
* argument 'pc' and 'va' are not used.
*/
static void
-ttycons_ctrlz(vaddr_t from_userland, vaddr_t pc, vaddr_t va)
+ttycons_ctrlz(siginfo_t *info, vaddr_t from_userland, vaddr_t pc, vaddr_t va)
{
struct ttycons_softc *sc;