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:
John Baldwin 2000-09-24 00:33:51 +00:00
parent 763fcb92c5
commit fd2802cfe0

View File

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