Skip to content
  • Daniel Wagner's avatar
    cgroup: Wrap subsystem selection macro · 5fc0b025
    Daniel Wagner authored
    
    
    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: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    Acked-by: default avatarNeil 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
    5fc0b025