Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_witness.c
Show First 20 Lines • Show All 355 Lines • ▼ Show 20 Lines | static struct witness_lock_order_data *witness_lock_order_get( | ||||
struct witness *parent, | struct witness *parent, | ||||
struct witness *child); | struct witness *child); | ||||
static void witness_list_lock(struct lock_instance *instance, | static void witness_list_lock(struct lock_instance *instance, | ||||
int (*prnt)(const char *fmt, ...)); | int (*prnt)(const char *fmt, ...)); | ||||
static int witness_output(const char *fmt, ...) __printflike(1, 2); | static int witness_output(const char *fmt, ...) __printflike(1, 2); | ||||
static int witness_voutput(const char *fmt, va_list ap) __printflike(1, 0); | static int witness_voutput(const char *fmt, va_list ap) __printflike(1, 0); | ||||
static void witness_setflag(struct lock_object *lock, int flag, int set); | static void witness_setflag(struct lock_object *lock, int flag, int set); | ||||
FEATURE(witness, "kernel has witness(9) support"); | |||||
static SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, | static SYSCTL_NODE(_debug, OID_AUTO, witness, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, | ||||
"Witness Locking"); | "Witness Locking"); | ||||
/* | /* | ||||
* If set to 0, lock order checking is disabled. If set to -1, | * If set to 0, lock order checking is disabled. If set to -1, | ||||
* witness is completely disabled. Otherwise witness performs full | * witness is completely disabled. Otherwise witness performs full | ||||
* lock order checking for all locks. At runtime, lock order checking | * lock order checking for all locks. At runtime, lock order checking | ||||
* may be toggled. However, witness cannot be reenabled once it is | * may be toggled. However, witness cannot be reenabled once it is | ||||
▲ Show 20 Lines • Show All 2,719 Lines • Show Last 20 Lines |