From owner-p4-projects Sat Jun 8 17:19:15 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0545837B405; Sat, 8 Jun 2002 17:19:11 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3AAA537B400 for ; Sat, 8 Jun 2002 17:19:10 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g590JAK92614 for perforce@freebsd.org; Sat, 8 Jun 2002 17:19:10 -0700 (PDT) (envelope-from jhb@freebsd.org) Date: Sat, 8 Jun 2002 17:19:10 -0700 (PDT) Message-Id: <200206090019.g590JAK92614@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 12583 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12583 Change 12583 by jhb@jhb_laptop on 2002/06/08 17:18:47 Let witness complain about unlocking an unowned mutex before mtx_assert() since witness gives more informative information. Affected files ... ... //depot/projects/smpng/sys/kern/kern_mutex.c#39 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_mutex.c#39 (text+ko) ==== @@ -333,7 +333,6 @@ { MPASS(curthread != NULL); - mtx_assert(m, MA_OWNED); #ifdef MUTEX_PROFILING if (m->acqtime != 0) { static const char *unknown = "(unknown)"; @@ -391,6 +390,7 @@ WITNESS_UNLOCK(&m->mtx_object, opts | LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("UNLOCK", &m->mtx_object, opts, m->mtx_recurse, file, line); + mtx_assert(m, MA_OWNED); _rel_sleep_lock(m, curthread, opts, file, line); } @@ -414,10 +414,10 @@ { MPASS(curthread != NULL); - mtx_assert(m, MA_OWNED); WITNESS_UNLOCK(&m->mtx_object, opts | LOP_EXCLUSIVE, file, line); LOCK_LOG_LOCK("UNLOCK", &m->mtx_object, opts, m->mtx_recurse, file, line); + mtx_assert(m, MA_OWNED); #if defined(SMP) || LOCK_DEBUG > 0 _rel_spin_lock(m); #else To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message