Module Name:    src
Committed By:   matt
Date:           Sat Feb  6 14:41:40 UTC 2010

Modified Files:
        src/sys/arch/mips/mips [matt-nb5-mips64]: mips_softint.c

Log Message:
Add some more KASSERTs


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/mips/mips_softint.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/mips/mips_softint.c
diff -u src/sys/arch/mips/mips/mips_softint.c:1.1.2.2 src/sys/arch/mips/mips/mips_softint.c:1.1.2.3
--- src/sys/arch/mips/mips/mips_softint.c:1.1.2.2	Sat Feb  6 00:39:47 2010
+++ src/sys/arch/mips/mips/mips_softint.c	Sat Feb  6 14:41:40 2010
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mips_softint.c,v 1.1.2.2 2010/02/06 00:39:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_softint.c,v 1.1.2.3 2010/02/06 14:41:40 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -102,6 +102,7 @@
 		ci->ci_softints ^= SOFTINT_##level##_MASK; \
 		softint_fast_dispatch(ci->ci_softlwps[SOFTINT_##level], \
 		    IPL_SOFT##level); \
+		KASSERT(ci->ci_softlwps[SOFTINT_##level]->l_ctxswtch == 0); \
 		continue; \
 	}
 
@@ -114,6 +115,7 @@
 
 	KASSERT((ipending & MIPS_SOFT_INT_MASK) != 0);
 	KASSERT((ipending & ~MIPS_SOFT_INT_MASK) == 0);
+	KASSERT(ci->ci_mtx_count == 0);
 
 	if (ipending & MIPS_SOFT_INT_MASK_0) {
 		/*
@@ -139,6 +141,8 @@
 		DOSOFTINT(CLOCK);
 	}
 
+	KASSERT(ci->ci_mtx_count == 0);
+
 	_clrsoftintr(ipending);
 	splx(s);
 }

Reply via email to