diff options
author | alfred <alfred@FreeBSD.org> | 2001-04-28 12:11:01 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-04-28 12:11:01 +0000 |
commit | b5d32120a1f4ef12c56c6beae601c40669398fe0 (patch) | |
tree | 071ad178ff456bfd5c7fb32401b32a8cedbf0882 | |
parent | 3fd4820a392c002003951246503569efd4d5562e (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/kern/kern_lock.c | 2 |
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; |