diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-11-06 14:45:57 +0100 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-12-02 20:43:14 +0100 |
commit | 58135f574f1b791c926622387780ed3d090116d6 (patch) | |
tree | dc6c361777cd0f1bf051dbbddeccb7942400951d /include/linux/context_tracking_state.h | |
parent | 99c8b1ea0972be82ce1842d830e0173e70907065 (diff) | |
download | op-kernel-dev-58135f574f1b791c926622387780ed3d090116d6.zip op-kernel-dev-58135f574f1b791c926622387780ed3d090116d6.tar.gz |
context_tracking: Wrap static key check into more intuitive function name
Use a function with a meaningful name to check the global context
tracking state. static_key_false() is a bit confusing for reviewers.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/context_tracking_state.h')
-rw-r--r-- | include/linux/context_tracking_state.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 0f1979d..0db535b 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h @@ -22,6 +22,10 @@ struct context_tracking { extern struct static_key context_tracking_enabled; DECLARE_PER_CPU(struct context_tracking, context_tracking); +static inline bool context_tracking_is_enabled(void) +{ + return static_key_false(&context_tracking_enabled); +} static inline bool context_tracking_in_user(void) { return __this_cpu_read(context_tracking.state) == IN_USER; |