Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Add an assert to make sure no unexpected spinlocks ...
details: https://anonhg.NetBSD.org/src/rev/1d5c4755eeb6
branches: trunk
changeset: 764221:1d5c4755eeb6
user: matt <matt%NetBSD.org@localhost>
date: Thu Apr 14 05:33:20 2011 +0000
description:
Add an assert to make sure no unexpected spinlocks are held in mi_switch
diffstat:
sys/kern/kern_synch.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 6518c8cbc1f5 -r 1d5c4755eeb6 sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c Thu Apr 14 05:22:47 2011 +0000
+++ b/sys/kern/kern_synch.c Thu Apr 14 05:33:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_synch.c,v 1.286 2011/01/03 13:22:32 pooka Exp $ */
+/* $NetBSD: kern_synch.c,v 1.287 2011/04/14 05:33:20 matt Exp $ */
/*-
* Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.286 2011/01/03 13:22:32 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.287 2011/04/14 05:33:20 matt Exp $");
#include "opt_kstack.h"
#include "opt_perfctrs.h"
@@ -739,6 +739,9 @@
* of the last lock - we must remain at IPL_SCHED during
* the context switch.
*/
+ KASSERTMSG(ci->ci_mtx_count == -1,
+ ("%s: cpu%u: ci_mtx_count (%d) != -1",
+ __func__, cpu_index(ci), ci->ci_mtx_count));
oldspl = MUTEX_SPIN_OLDSPL(ci);
ci->ci_mtx_count--;
lwp_unlock(l);
Home |
Main Index |
Thread Index |
Old Index