diff options
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r-- | sys/kern/kern_lock.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index aaf09aa..6ee1c5c 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -232,19 +232,16 @@ debuglockmgr(lkp, flags, interlkp, td, name, file, line) else thr = td; - if ((flags & (LK_NOWAIT|LK_RELEASE)) == 0) { - if ((flags & LK_INTERLOCK) == 0) - WITNESS_SLEEP(1, NULL); - else - WITNESS_SLEEP(1, &interlkp->mtx_object); - } - - mtx_lock(lkp->lk_interlock); + if ((flags & LK_INTERNAL) == 0) + mtx_lock(lkp->lk_interlock); if (flags & LK_INTERLOCK) { mtx_assert(interlkp, MA_OWNED | MA_NOTRECURSED); mtx_unlock(interlkp); } + if ((flags & (LK_NOWAIT|LK_RELEASE)) == 0) + WITNESS_SLEEP(1, &lkp->lk_interlock->mtx_object); + if (panicstr != NULL) { mtx_unlock(lkp->lk_interlock); return (0); |