Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern When freeing a lwp, make sure it's biglock count is 0.



details:   https://anonhg.NetBSD.org/src/rev/90e651db53d8
branches:  trunk
changeset: 762224:90e651db53d8
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Feb 17 18:50:02 2011 +0000

description:
When freeing a lwp, make sure it's biglock count is 0.

diffstat:

 sys/kern/kern_lwp.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r ca930057ba7d -r 90e651db53d8 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c       Thu Feb 17 18:47:13 2011 +0000
+++ b/sys/kern/kern_lwp.c       Thu Feb 17 18:50:02 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lwp.c,v 1.154 2011/01/17 08:26:58 matt Exp $      */
+/*     $NetBSD: kern_lwp.c,v 1.155 2011/02/17 18:50:02 matt Exp $      */
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.154 2011/01/17 08:26:58 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.155 2011/02/17 18:50:02 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -1076,6 +1076,7 @@
 
        KASSERT(SLIST_EMPTY(&l->l_pi_lenders));
        KASSERT(l->l_inheritedprio == -1);
+       KASSERT(l->l_blcnt == 0);
        kdtrace_thread_dtor(NULL, l);
        if (!recycle)
                pool_cache_put(lwp_cache, l);



Home | Main Index | Thread Index | Old Index