aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2017-02-17 14:55:59 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2017-02-17 14:55:59 +0000
commit7640beb9202f1e6bf2e1a1b1cdc5a48c05045118 (patch)
tree7c36eee887fac2a3fa4f297007a676398b9394eb /sys/sys
parent57abbcd5ad527c7a5f6dc70ab7e03d821a32640c (diff)
downloadsrc-7640beb9202f1e6bf2e1a1b1cdc5a48c05045118.tar.gz
src-7640beb9202f1e6bf2e1a1b1cdc5a48c05045118.zip
mtx: microoptimize lockstat handling in __mtx_lock_sleep
This saves a function call and multiple branches after the lock is acquired.
Notes
Notes: svn path=/head/; revision=313875
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/lockstat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/lockstat.h b/sys/sys/lockstat.h
index 77294fb356af..64745052974b 100644
--- a/sys/sys/lockstat.h
+++ b/sys/sys/lockstat.h
@@ -68,7 +68,7 @@ SDT_PROBE_DECLARE(lockstat, , , thread__spin);
#define LOCKSTAT_WRITER 0
#define LOCKSTAT_READER 1
-extern int lockstat_enabled;
+extern volatile int lockstat_enabled;
#ifdef KDTRACE_HOOKS