Mark kdb_active as __read_frequently and switch to bool to eat less space.

This commit is contained in:
Mateusz Guzik 2017-10-20 04:02:53 +00:00
parent a5db8ade37
commit c48a94251d
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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(). */