summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2012-09-12 16:12:05 +0200
committerTejun Heo <tj@kernel.org>2012-09-14 09:57:37 -0700
commit5fc0b02544b3b9bd3db5a8156b5f3e7350f8e797 (patch)
tree9382ec0de547289cbda8f4bdb90eb65a029398eb /kernel/cgroup.c
parentbe45c900fdc2c66baad5a7703fb8136991d88aeb (diff)
downloadlinux-5fc0b02544b3b9bd3db5a8156b5f3e7350f8e797.tar.gz
linux-5fc0b02544b3b9bd3db5a8156b5f3e7350f8e797.tar.bz2
linux-5fc0b02544b3b9bd3db5a8156b5f3e7350f8e797.zip
cgroup: Wrap subsystem selection macro
Before we are able to define all subsystem ids at compile time we need a more fine grained control what gets defined when we include cgroup_subsys.h. For example we define the enums for the subsystems or to declare for struct cgroup_subsys (builtin subsystem) by including cgroup_subsys.h and defining SUBSYS accordingly. Currently, the decision if a subsys is used is defined inside the header by testing if CONFIG_*=y is true. By moving this test outside of cgroup_subsys.h we are able to control it on the include level. This is done by introducing IS_SUBSYS_ENABLED which then is defined according the task, e.g. is CONFIG_*=y or CONFIG_*=m. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Cc: Gao feng <gaofeng@cn.fujitsu.com> Cc: Jamal Hadi Salim <jhs@mojatatu.com> Cc: John Fastabend <john.r.fastabend@intel.com> Cc: netdev@vger.kernel.org Cc: cgroups@vger.kernel.org
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 1b18090269ad..95e9f3fdb729 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -93,6 +93,7 @@ static DEFINE_MUTEX(cgroup_root_mutex);
* cgroup_mutex.
*/
#define SUBSYS(_x) &_x ## _subsys,
+#define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option)
static struct cgroup_subsys *subsys[CGROUP_SUBSYS_COUNT] = {
#include <linux/cgroup_subsys.h>
};