diff options
author | jhb <jhb@FreeBSD.org> | 2001-08-10 22:33:59 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-08-10 22:33:59 +0000 |
commit | 63014c2530236dbd3818166d675b28e0e61b427e (patch) | |
tree | bbc432db57f77be2c6da1fd6532d999565ee9115 /sys/kern/subr_witness.c | |
parent | 44bfd6c08a098084bf024edcefbcc7d05846fe94 (diff) | |
download | FreeBSD-src-63014c2530236dbd3818166d675b28e0e61b427e.zip FreeBSD-src-63014c2530236dbd3818166d675b28e0e61b427e.tar.gz |
Make witness compile w/o DDB.
Reported by: wpaul
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); /* |