Re: [PATCH] jump_label: jump_label for boot options.

From: Peter Zijlstra
Date: Thu Dec 01 2011 - 12:45:39 EST


On Thu, 2011-12-01 at 18:39 +0100, Peter Zijlstra wrote:
> +#define SCHED_FEAT(name, enabled) \
> +static __always_inline bool static_branch_##name(struct jump_label_key *key) \
> +{ \
> + return static_branch_##enabled(key); \
> +}
> +
> +#include "features.h"
> +
> +#undef SCHED_FEAT
> +
> +#if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL)
> +static struct jump_label_key sched_feat_keys[__SCHED_FEAT_NR];
> +#define sched_feat(x) (static_branch(&sched_feat_keys[__SCHED_FEAT_##x]))

#define sched_feat(x) static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x])

of course ;-)
--
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/