aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2017-10-20 04:02:53 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2017-10-20 04:02:53 +0000
commitc48a94251d8d7f0330cf6bf29e9a576dfac21b5a (patch)
treece352c6e6851f39b7f1d8aa44394abf4cd2fcbb8
parenta5db8ade37993b7fcb556e0c034d1ace79867002 (diff)
downloadsrc-c48a94251d8d7f0330cf6bf29e9a576dfac21b5a.tar.gz
src-c48a94251d8d7f0330cf6bf29e9a576dfac21b5a.zip
Mark kdb_active as __read_frequently and switch to bool to eat less space.
Notes
Notes: svn path=/head/; revision=324789
-rw-r--r--sys/kern/subr_kdb.c2
-rw-r--r--sys/sys/kdb.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c
index d20c56b85ef4..121dc20e8b19 100644
--- a/sys/kern/subr_kdb.c
+++ b/sys/kern/subr_kdb.c
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$");
#include <machine/smp.h>
#endif
-int kdb_active = 0;
+bool __read_frequently kdb_active = 0;
static void *kdb_jmpbufp = NULL;
struct kdb_dbbe *kdb_dbbe = NULL;
static struct pcb kdb_pcb;
diff --git a/sys/sys/kdb.h b/sys/sys/kdb.h
index 49c8c32071d8..27d2475cc224 100644
--- a/sys/sys/kdb.h
+++ b/sys/sys/kdb.h
@@ -59,7 +59,7 @@ struct kdb_dbbe {
}; \
DATA_SET(kdb_dbbe_set, name##_dbbe)
-extern int kdb_active; /* Non-zero while in debugger. */
+extern bool kdb_active; /* Non-zero while in debugger. */
extern int debugger_on_panic; /* enter the debugger on panic. */
extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */
extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */