Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327210
b: refs/heads/master
c: 5fc0b02
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Wagner authored and Tejun Heo committed Sep 14, 2012
1 parent ca8fe54 commit ea816f2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be45c900fdc2c66baad5a7703fb8136991d88aeb
refs/heads/master: 5fc0b02544b3b9bd3db5a8156b5f3e7350f8e797
4 changes: 4 additions & 0 deletions trunk/include/linux/cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ extern const struct file_operations proc_cgroup_operations;

/* Define the enumeration of all builtin cgroup subsystems */
#define SUBSYS(_x) _x ## _subsys_id,
#define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option)
enum cgroup_subsys_id {
#include <linux/cgroup_subsys.h>
__CGROUP_TEMPORARY_PLACEHOLDER
};
#undef IS_SUBSYS_ENABLED
#undef SUBSYS
/*
* This define indicates the maximum number of subsystems that can be loaded
Expand Down Expand Up @@ -528,7 +530,9 @@ struct cgroup_subsys {
};

#define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
#define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option)
#include <linux/cgroup_subsys.h>
#undef IS_SUBSYS_ENABLED
#undef SUBSYS

static inline struct cgroup_subsys_state *cgroup_subsys_state(
Expand Down
24 changes: 12 additions & 12 deletions trunk/include/linux/cgroup_subsys.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,73 +7,73 @@

/* */

#ifdef CONFIG_CPUSETS
#if IS_SUBSYS_ENABLED(CONFIG_CPUSETS)
SUBSYS(cpuset)
#endif

/* */

#ifdef CONFIG_CGROUP_DEBUG
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_DEBUG)
SUBSYS(debug)
#endif

/* */

#ifdef CONFIG_CGROUP_SCHED
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_SCHED)
SUBSYS(cpu_cgroup)
#endif

/* */

#ifdef CONFIG_CGROUP_CPUACCT
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_CPUACCT)
SUBSYS(cpuacct)
#endif

/* */

#ifdef CONFIG_MEMCG
#if IS_SUBSYS_ENABLED(CONFIG_MEMCG)
SUBSYS(mem_cgroup)
#endif

/* */

#ifdef CONFIG_CGROUP_DEVICE
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_DEVICE)
SUBSYS(devices)
#endif

/* */

#ifdef CONFIG_CGROUP_FREEZER
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_FREEZER)
SUBSYS(freezer)
#endif

/* */

#ifdef CONFIG_NET_CLS_CGROUP
#if IS_SUBSYS_ENABLED(CONFIG_NET_CLS_CGROUP)
SUBSYS(net_cls)
#endif

/* */

#ifdef CONFIG_BLK_CGROUP
#if IS_SUBSYS_ENABLED(CONFIG_BLK_CGROUP)
SUBSYS(blkio)
#endif

/* */

#ifdef CONFIG_CGROUP_PERF
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_PERF)
SUBSYS(perf)
#endif

/* */

#ifdef CONFIG_NETPRIO_CGROUP
#if IS_SUBSYS_ENABLED(CONFIG_NETPRIO_CGROUP)
SUBSYS(net_prio)
#endif

/* */

#ifdef CONFIG_CGROUP_HUGETLB
#if IS_SUBSYS_ENABLED(CONFIG_CGROUP_HUGETLB)
SUBSYS(hugetlb)
#endif

Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
};
Expand Down

0 comments on commit ea816f2

Please sign in to comment.