X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Flinux%2Fjump_label.h;fp=include%2Flinux%2Fjump_label.h;h=a0547c571800e7ca77f9a7ffed9412a16bee9262;hb=d0b40e192946f703e2d24577578eeef9499c10a6;hp=595fb46213fc4ae79965af911786b63784cbffd8;hpb=3c84aabde9cc5e2eead140cf4372606626cb7413;p=deliverable%2Flinux.git diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 595fb46213fc..a0547c571800 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -21,6 +21,8 @@ * * DEFINE_STATIC_KEY_TRUE(key); * DEFINE_STATIC_KEY_FALSE(key); + * DEFINE_STATIC_KEY_ARRAY_TRUE(keys, count); + * DEFINE_STATIC_KEY_ARRAY_FALSE(keys, count); * static_branch_likely() * static_branch_unlikely() * @@ -276,6 +278,16 @@ struct static_key_false { #define DECLARE_STATIC_KEY_FALSE(name) \ extern struct static_key_false name +#define DEFINE_STATIC_KEY_ARRAY_TRUE(name, count) \ + struct static_key_true name[count] = { \ + [0 ... (count) - 1] = STATIC_KEY_TRUE_INIT, \ + } + +#define DEFINE_STATIC_KEY_ARRAY_FALSE(name, count) \ + struct static_key_false name[count] = { \ + [0 ... (count) - 1] = STATIC_KEY_FALSE_INIT, \ + } + extern bool ____wrong_branch_error(void); #define static_key_enabled(x) \