summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-04-28 12:11:01 +0000
committeralfred <alfred@FreeBSD.org>2001-04-28 12:11:01 +0000
commitb5d32120a1f4ef12c56c6beae601c40669398fe0 (patch)
tree071ad178ff456bfd5c7fb32401b32a8cedbf0882 /sys
parent3fd4820a392c002003951246503569efd4d5562e (diff)
downloadFreeBSD-src-b5d32120a1f4ef12c56c6beae601c40669398fe0.zip
FreeBSD-src-b5d32120a1f4ef12c56c6beae601c40669398fe0.tar.gz
Instead of asserting that a mutex is not still locked after unlocking it,
assert that the mutex is owned and not recursed prior to unlocking it. This should give a clearer diagnostic when a programming error is caught.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index d1d5916..f5bb326 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -238,8 +238,8 @@ debuglockmgr(lkp, flags, interlkp, p, name, file, line)
mtx_lock(lkp->lk_interlock);
if (flags & LK_INTERLOCK) {
+ mtx_assert(interlkp, MA_OWNED | MA_NOTRECURSED);
mtx_unlock(interlkp);
- mtx_assert(interlkp, MA_NOTOWNED);
}
extflags = (flags | lkp->lk_flags) & LK_EXTFLG_MASK;
OpenPOWER on IntegriCloud