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.
This commit is contained in:
Alfred Perlstein 2001-04-28 12:11:01 +00:00
parent 289ef82e3c
commit 6157b69f4a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76100

View File

@ -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;