lkml.org 
[lkml]   [2015]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 3/4] cgroups: allow a cgroup subsystem to reject a fork
On Sun, Apr 12, 2015 at 10:51:56AM +1000, Aleksa Sarai wrote:
> +/* list of all tags for subsystems */
> +enum cgroup_subsys_tag {
> +#define TAG_ID(_t) CGROUP_ ## _t
> +#define SUBSYS(_x) UNUSED_IDENT(_x),
> +#define TAG(_t) TAG_ID(_t), \
> + UNUSED_IDENT(_t) = TAG_ID(_t) - 2,
> +#define _COUNT(_t, _i) _i, \
> + CGROUP_ ## _t ## _COUNT = (TAG_ID(_t ## _END) - TAG_ID(_t ## _START)) + 1, \
> + UNUSED_IDENT(_t) = _i - 1,
> +#define COUNT(_t) _COUNT(_t, UNUSED_IDENT(_t))
> +#include <linux/cgroup_subsys.h>
> +#undef COUNT
> +#undef TAG
> +#undef SUBSYS
> +#undef TAG_ID
> +};

Ummm... is this really necessary? Can't we do something like the
following?

#define SUBSYS_TAG(tag) \
__##tag, \
tag = __##tag - 2,

--
tejun


\
 
 \ /
  Last update: 2015-04-13 17:01    [W:3.134 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site