From 4b5c9cf62f33d8359a272dda846930aaa7c635f8 Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Wed, 29 Apr 2015 10:23:02 +0000 Subject: Add kern.racct.enable tunable and RACCT_DISABLED config option. The point of this is to be able to add RACCT (with RACCT_DISABLED) to GENERIC, to avoid having to rebuild the kernel to use rctl(8). Differential Revision: https://reviews.freebsd.org/D2369 Reviewed by: kib@ MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation --- sys/sys/racct.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/sys/racct.h') diff --git a/sys/sys/racct.h b/sys/sys/racct.h index 966d27a11183..313d5d05de96 100644 --- a/sys/sys/racct.h +++ b/sys/sys/racct.h @@ -83,6 +83,10 @@ struct ucred; #define RACCT_DECAYING 0x20 extern int racct_types[]; +extern int racct_enable; + +#define ASSERT_RACCT_ENABLED() KASSERT(racct_enable, \ + ("%s called with !racct_enable", __func__)) /* * Amount stored in c_resources[] is 10**6 times bigger than what's -- cgit v1.2.3