Skip to content

Commit

Permalink
locking/static_keys: Provide DECLARE and well as DEFINE macros
Browse files Browse the repository at this point in the history
We will need to provide declarations of static keys in header
files. Provide DECLARE_STATIC_KEY_{TRUE,FALSE} macros.

Signed-off-by: Tony Luck <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/816881cf85bd3cf13385d212882618f38a3b5d33.1472754711.git.tony.luck@intel.com
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
aegl authored and KAGA-KOKO committed Sep 5, 2016
1 parent c693593 commit b8fb037
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/linux/jump_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,15 @@ struct static_key_false {
#define DEFINE_STATIC_KEY_TRUE(name) \
struct static_key_true name = STATIC_KEY_TRUE_INIT

#define DECLARE_STATIC_KEY_TRUE(name) \
extern struct static_key_true name

#define DEFINE_STATIC_KEY_FALSE(name) \
struct static_key_false name = STATIC_KEY_FALSE_INIT

#define DECLARE_STATIC_KEY_FALSE(name) \
extern struct static_key_false name

extern bool ____wrong_branch_error(void);

#define static_key_enabled(x) \
Expand Down

0 comments on commit b8fb037

Please sign in to comment.