Deleted Added
full compact
30c30
< * $FreeBSD: head/sys/kern/subr_witness.c 67548 2000-10-25 04:37:54Z jhb $
---
> * $FreeBSD: head/sys/kern/subr_witness.c 67676 2000-10-27 02:59:30Z jhb $
52a53,54
> #include "opt_witness.h"
>
57a60
> #include <sys/sysctl.h>
683c686
< #ifdef KDEBUG
---
> #ifdef DDB
685c688
< * When WITNESS_KDEBUG is set to 1, it will cause the system to
---
> * When DDB is enabled and witness_ddb is set to 1, it will cause the system to
690,691c693,696
< #ifndef WITNESS_KDEBUG
< #define WITNESS_KDEBUG 0
---
> #ifdef WITNESS_DDB
> int witness_ddb = 1;
> #else
> int witness_ddb = 0;
693,694c698,699
< int witness_kdebug = WITNESS_KDEBUG;
< #endif /* KDEBUG */
---
> SYSCTL_INT(_debug, OID_AUTO, witness_ddb, CTLFLAG_RW, &witness_ddb, 0, "");
> #endif /* DDB */
696,697c701,704
< #ifndef WITNESS_SKIPSPIN
< #define WITNESS_SKIPSPIN 0
---
> #ifdef WITNESS_SKIPSPIN
> int witness_skipspin = 1;
> #else
> int witness_skipspin = 0;
699c706,707
< int witness_skipspin = WITNESS_SKIPSPIN;
---
> SYSCTL_INT(_debug, OID_AUTO, witness_skipspin, CTLFLAG_RD, &witness_skipspin, 0,
> "");
701,702c709
<
< static struct mtx w_mtx;
---
> MUTEX_DECLARE(static,w_mtx);
727,728d733
< "Kdebug", /* breaks rules and may or may not work */
< "Page Alias", /* sparc only, witness lock won't block intr */
734,737c739,740
< "log mtx",
< "zslock", /* sparc only above log, this one is a real hack */
< "time lock", /* above callout */
< "callout mtx", /* above wayout */
---
> "clk",
> "sio",
741,743d743
< "wayout mtx",
< "kernel_pmap", /* sparc only, logically equal "pmap" below */
< "pmap", /* sparc only */
748,759d747
< "tcb", "inp", "so_snd", "so_rcv", "Giant lock", NULL,
< "udb", "inp", NULL,
< "unp head", "unp", "so_snd", NULL,
< "de0", "Giant lock", NULL,
< "ifnet", "Giant lock", NULL,
< "fifo", "so_snd", NULL,
< "hme0", "Giant lock", NULL,
< "esp0", "Giant lock", NULL,
< "hfa0", "Giant lock", NULL,
< "so_rcv", "atm_global", NULL,
< "so_snd", "atm_global", NULL,
< "NFS", "Giant lock", NULL,
764,769d751
< "inp",
< "process group",
< "session",
< "unp",
< "rtentry",
< "rawcb",
816,818c798,800
< #ifdef KDEBUG
< int go_into_kdebug = 0;
< #endif /* KDEBUG */
---
> #ifdef DDB
> int go_into_ddb = 0;
> #endif /* DDB */
870,872c852,854
< #ifdef KDEBUG
< go_into_kdebug = 1;
< #endif /* KDEBUG */
---
> #ifdef DDB
> go_into_ddb = 1;
> #endif /* DDB */
914,916c896,898
< #ifdef KDEBUG
< go_into_kdebug = 1;
< #endif /* KDEBUG */
---
> #ifdef DDB
> go_into_ddb = 1;
> #endif /* DDB */
925,928c907,910
< #ifdef KDEBUG
< if (witness_kdebug && go_into_kdebug)
< kdebug();
< #endif /* KDEBUG */
---
> #ifdef DDB
> if (witness_ddb && go_into_ddb)
> Debugger("witness_enter");
> #endif /* DDB */
1062,1065c1044,1047
< #ifdef KDEBUG
< if (witness_kdebug && n)
< kdebug();
< #endif /* KDEBUG */
---
> #ifdef DDB
> if (witness_ddb && n)
> Debugger("witness_sleep");
> #endif /* DDB */
1084c1066
< mtx_init(&w_mtx, "witness lock", MTX_DEF);
---
> mtx_init(&w_mtx, "witness lock", MTX_COLD | MTX_DEF);