mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 11:37:47 +00:00
jump_label: Define guard() for jump_label_lock
Link: https://lore.kernel.org/all/173371207108.480397.12818384744149153972.stgit@devnote2/ Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
This commit is contained in:
parent
4e83017e4c
commit
e2b6e5e487
@ -75,6 +75,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/cleanup.h>
|
||||
|
||||
extern bool static_key_initialized;
|
||||
|
||||
@ -347,6 +348,8 @@ static inline void static_key_disable(struct static_key *key)
|
||||
|
||||
#endif /* CONFIG_JUMP_LABEL */
|
||||
|
||||
DEFINE_LOCK_GUARD_0(jump_label_lock, jump_label_lock(), jump_label_unlock())
|
||||
|
||||
#define STATIC_KEY_INIT STATIC_KEY_INIT_FALSE
|
||||
#define jump_label_enabled static_key_enabled
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user