Re: [PATCH v9 3/4] cgroups: allow a cgroup subsystem to reject a fork
From: Tejun Heo
Date: Mon Apr 13 2015 - 10:24:50 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/