diff options
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r-- | sys/kern/subr_witness.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 18b7df6..ac309f2 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -1274,13 +1274,19 @@ witness_list(struct proc *p) critical_t savecrit; int nheld; + KASSERT(!witness_cold, ("%s: witness_cold", __func__)); +#ifdef DDB KASSERT(p == curproc || db_active, ("%s: p != curproc and we aren't in the debugger", __func__)); - KASSERT(!witness_cold, ("%s: witness_cold", __func__)); if (!db_active && witness_dead) return (0); +#else + KASSERT(p == curproc, ("%s: p != curproc", __func__)); + if (witness_dead) + return (0); +#endif nheld = witness_list_locks(&p->p_sleeplocks); /* |