mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04: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
1 changed files with 2 additions and 7 deletions
|
|
@ -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 a new issue