aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_racct.c6
-rw-r--r--sys/sys/racct.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c
index 4b7b0bfba0b7..f6d2add90a51 100644
--- a/sys/kern/kern_racct.c
+++ b/sys/kern/kern_racct.c
@@ -74,13 +74,13 @@ FEATURE(racct, "Resource Accounting");
*/
static int pcpu_threshold = 1;
#ifdef RACCT_DEFAULT_TO_DISABLED
-int racct_enable = 0;
+bool __read_frequently racct_enable = false;
#else
-int racct_enable = 1;
+bool __read_frequently racct_enable = true;
#endif
SYSCTL_NODE(_kern, OID_AUTO, racct, CTLFLAG_RW, 0, "Resource Accounting");
-SYSCTL_UINT(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable,
+SYSCTL_BOOL(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable,
0, "Enable RACCT/RCTL");
SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold,
0, "Processes with higher %cpu usage than this value can be throttled.");
diff --git a/sys/sys/racct.h b/sys/sys/racct.h
index 73ec04a0a0cd..57291e1d45ba 100644
--- a/sys/sys/racct.h
+++ b/sys/sys/racct.h
@@ -91,7 +91,7 @@ struct ucred;
#define RACCT_DECAYING 0x20
extern int racct_types[];
-extern int racct_enable;
+extern bool racct_enable;
#define ASSERT_RACCT_ENABLED() KASSERT(racct_enable, \
("%s called with !racct_enable", __func__))