diff options
author | alfred <alfred@FreeBSD.org> | 2001-05-19 01:40:48 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-05-19 01:40:48 +0000 |
commit | 8aa6c173b087c6901df130efb252a23bd6eb1141 (patch) | |
tree | 757a308faff81a6a80c94b6af9071064b920bda6 /sys | |
parent | 3285b062fc60c46bbd206259ca2457715f9182ad (diff) | |
download | FreeBSD-src-8aa6c173b087c6901df130efb252a23bd6eb1141.zip FreeBSD-src-8aa6c173b087c6901df130efb252a23bd6eb1141.tar.gz |
remove my private assertions from tsleep.
add one assertion to ensure we don't sleep while holding vm.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_synch.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index e09a377..37337f5 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); |