Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/usermode adjust cpu_lwp_inkernel in mem ac...
details: https://anonhg.NetBSD.org/src/rev/e4b454cbb385
branches: trunk
changeset: 769292:e4b454cbb385
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Sep 05 21:38:05 2011 +0000
description:
adjust cpu_lwp_inkernel in mem access and illegal insn handlers
diffstat:
sys/arch/usermode/usermode/trap.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (57 lines):
diff -r f83925e0b8db -r e4b454cbb385 sys/arch/usermode/usermode/trap.c
--- a/sys/arch/usermode/usermode/trap.c Mon Sep 05 20:54:47 2011 +0000
+++ b/sys/arch/usermode/usermode/trap.c Mon Sep 05 21:38:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.27 2011/09/05 18:50:34 reinoud Exp $ */
+/* $NetBSD: trap.c,v 1.28 2011/09/05 21:38:05 jmcneill Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <reinoud%netbsd.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.27 2011/09/05 18:50:34 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.28 2011/09/05 21:38:05 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -48,6 +48,7 @@
//#include <machine/instr.h>
//#include <machine/userret.h>
+extern int cpu_lwp_inkernel;
/* forwards and externals */
void setup_signal_handlers(void);
@@ -117,6 +118,8 @@
void *onfault;
int kmem, lwp_errno, rv;
+ cpu_lwp_inkernel++;
+
recurse++;
if (recurse > 1)
printf("enter trap recursion level %d\n", recurse);
@@ -229,6 +232,7 @@
if (recurse > 1)
printf("leaving trap recursion level %d\n", recurse);
recurse--;
+ cpu_lwp_inkernel--;
}
static void
@@ -240,6 +244,7 @@
struct pcb *pcb;
vaddr_t va;
+ cpu_lwp_inkernel++;
recurse++;
if (recurse > 1)
printf("enter trap recursion level %d\n", recurse);
@@ -287,4 +292,5 @@
panic("illegal instruction encountered\n");
}
+ cpu_lwp_inkernel--;
}
Home |
Main Index |
Thread Index |
Old Index