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:
jhb 2000-09-24 00:33:51 +00:00
parent 7280bb2b3d
commit 98932a243c

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)