lkml.org 
[lkml]   [2011]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] jump_label: jump_label for boot options.
From
Date
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 ;-)


\
 
 \ /
  Last update: 2011-12-01 18:47    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site