Add a KASSERT() to catch instances where the mutex that we pass in to
msleep() are recursed. Suggested by: cp
This commit is contained in:
parent
7280bb2b3d
commit
98932a243c
@ -434,6 +434,8 @@ msleep(ident, mtx, priority, wmesg, timo)
|
||||
mtx_enter(&sched_lock, MTX_SPIN);
|
||||
|
||||
if (mtx != NULL) {
|
||||
KASSERT(mtx->mtx_recurse == 0,
|
||||
("sleeping on recursed mutex %s", mtx->mtx_description));
|
||||
WITNESS_SAVE(mtx, mtx);
|
||||
mtx_exit(mtx, MTX_DEF | MTX_NOSWITCH);
|
||||
if (priority & PDROP)
|
||||
|
Loading…
Reference in New Issue
Block a user