Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern turnstile_block: turn a comment into KASSERTs.
details: https://anonhg.NetBSD.org/src/rev/5017d5ce34f0
branches: trunk
changeset: 749117:5017d5ce34f0
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Nov 18 12:25:15 2009 +0000
description:
turnstile_block: turn a comment into KASSERTs.
diffstat:
sys/kern/kern_turnstile.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 3a2dc27b6255 -r 5017d5ce34f0 sys/kern/kern_turnstile.c
--- a/sys/kern/kern_turnstile.c Wed Nov 18 12:24:05 2009 +0000
+++ b/sys/kern/kern_turnstile.c Wed Nov 18 12:25:15 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_turnstile.c,v 1.26 2009/10/21 21:12:06 rmind Exp $ */
+/* $NetBSD: kern_turnstile.c,v 1.27 2009/11/18 12:25:15 yamt Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_turnstile.c,v 1.26 2009/10/21 21:12:06 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_turnstile.c,v 1.27 2009/11/18 12:25:15 yamt Exp $");
#include <sys/param.h>
#include <sys/lockdebug.h>
@@ -253,7 +253,6 @@
sq = &ts->ts_sleepq[q];
ts->ts_waiters[q]++;
sleepq_enter(sq, l, tc->tc_mutex);
- /* now tc->tc_mutex is also cur->l_mutex and l->l_mutex */
LOCKDEBUG_BARRIER(tc->tc_mutex, 1);
l->l_kpriority = true;
obase = l->l_kpribase;
@@ -276,7 +275,8 @@
* compiling a kernel with LOCKDEBUG to pinpoint the problem.
*/
prio = lwp_eprio(l);
-
+ KASSERT(cur == l);
+ KASSERT(tc->tc_mutex == cur->l_mutex);
for (;;) {
bool dolock;
Home |
Main Index |
Thread Index |
Old Index