summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-11-15 22:30:48 +0000
committerjhb <jhb@FreeBSD.org>2000-11-15 22:30:48 +0000
commit0efbfa0260e20fd09ec20131b349b2b2abe0ec93 (patch)
treee7fbc31b12fbdae3d68369328ee478b3dedd68f9 /sys
parentc70d0c6d5a38e9cc74b98ee9ed8f5fa7ba524508 (diff)
downloadFreeBSD-src-0efbfa0260e20fd09ec20131b349b2b2abe0ec93.zip
FreeBSD-src-0efbfa0260e20fd09ec20131b349b2b2abe0ec93.tar.gz
- Replace a KASSERT() that knew too much about mutex internals with a
mtx_assert() that ensures the mutex we release during msleep() is both not recursed and owned by the current process.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_synch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 66eb5d6..3d7f6f4 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -424,8 +424,7 @@ 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));
+ mtx_assert(mtx, MA_OWNED | MA_NOTRECURSED);
WITNESS_SAVE(mtx, mtx);
mtx_exit(mtx, MTX_DEF | MTX_NOSWITCH);
if (priority & PDROP)
OpenPOWER on IntegriCloud