From 5ee5c3aa1f8aaed2d8045f2b8119928105f4c822 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Sat, 19 May 2001 01:40:48 +0000 Subject: [PATCH] remove my private assertions from tsleep. add one assertion to ensure we don't sleep while holding vm. --- sys/kern/kern_synch.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index e09a3772c8b..37337f58d6d 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -378,13 +378,8 @@ msleep(ident, mtx, priority, wmesg, timo) int rval = 0; WITNESS_SAVE_DECL(mtx); - KASSERT(ident == &proc0 || /* XXX: swapper */ - timo != 0 || /* XXX: we might still miss a wakeup */ - mtx_owned(&Giant) || mtx != NULL, - ("indefinite sleep without mutex, wmesg: \"%s\" ident: %p", - wmesg, ident)); - if (mtx_owned(&vm_mtx) && mtx != &vm_mtx) - panic("sleeping with vm_mtx held."); + KASSERT(!mtx_owned(&vm_mtx) || mtx == &vm_mtx, + ("sleeping with vm_mtx held.")); #ifdef KTRACE if (p && KTRPOINT(p, KTR_CSW)) ktrcsw(p->p_tracep, 1, 0);