mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 14:39:37 +00:00
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:
parent
289ef82e3c
commit
6157b69f4a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76100
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user