summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_witness.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-06-08 05:24:21 +0000
committerpeter <peter@FreeBSD.org>2001-06-08 05:24:21 +0000
commit4b91e2ecf0aa1bb9c2c89a4f0ef1701e5aec268f (patch)
tree86b0161dd1235a75cc934e1a85ca5844895edd8f /sys/kern/subr_witness.c
parentaa18b0b03200ae9ae0c0f42a9a5253d50a170e64 (diff)
downloadFreeBSD-src-4b91e2ecf0aa1bb9c2c89a4f0ef1701e5aec268f.zip
FreeBSD-src-4b91e2ecf0aa1bb9c2c89a4f0ef1701e5aec268f.tar.gz
"Fix" the previous initial attempt at fixing TUNABLE_INT(). This time
around, use a common function for looking up and extracting the tunables from the kernel environment. This saves duplicating the same function over and over again. This way typically has an overhead of 8 bytes + the path string, versus about 26 bytes + the path string.
Diffstat (limited to 'sys/kern/subr_witness.c')
-rw-r--r--sys/kern/subr_witness.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index fb788aa..1a23ab4 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -145,7 +145,7 @@ static struct lock_instance *find_instance(struct lock_list_entry *lock_list,
MALLOC_DEFINE(M_WITNESS, "witness", "witness structure");
static int witness_watch = 1;
-TUNABLE_INT("debug.witness_watch", witness_watch);
+TUNABLE_INT("debug.witness_watch", &witness_watch);
SYSCTL_INT(_debug, OID_AUTO, witness_watch, CTLFLAG_RD, &witness_watch, 0, "");
#ifdef DDB
@@ -160,7 +160,7 @@ int witness_ddb = 1;
#else
int witness_ddb = 0;
#endif
-TUNABLE_INT("debug.witness_ddb", witness_ddb);
+TUNABLE_INT("debug.witness_ddb", &witness_ddb);
SYSCTL_INT(_debug, OID_AUTO, witness_ddb, CTLFLAG_RW, &witness_ddb, 0, "");
#endif /* DDB */
@@ -169,7 +169,7 @@ int witness_skipspin = 1;
#else
int witness_skipspin = 0;
#endif
-TUNABLE_INT("debug.witness_skipspin", witness_skipspin);
+TUNABLE_INT("debug.witness_skipspin", &witness_skipspin);
SYSCTL_INT(_debug, OID_AUTO, witness_skipspin, CTLFLAG_RD, &witness_skipspin, 0,
"");
OpenPOWER on IntegriCloud