mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
remove my private assertions from tsleep.
add one assertion to ensure we don't sleep while holding vm.
This commit is contained in:
parent
2c3c846931
commit
5ee5c3aa1f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76830
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user