diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-11-06 09:11:57 -0500 |
|---|---|---|
| committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-12-02 14:43:15 -0500 |
| commit | d0df09ebfc126b23c1005f98ddecc9907f9c5d25 (patch) | |
| tree | 66ac41ceb12f79e4895cee14170ad2b428171df6 /include/linux | |
| parent | 58135f574f1b791c926622387780ed3d090116d6 (diff) | |
context_tracking: Rename context_tracking_active() to context_tracking_cpu_is_enabled()
We currently have a confusing couple of API naming with the existing
context_tracking_active() and context_tracking_is_enabled().
Lets keep the latter one, context_tracking_is_enabled(), for global
context tracking state check and use context_tracking_cpu_is_enabled()
for local state check.
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')
| -rw-r--r-- | include/linux/context_tracking_state.h | 9 | ||||
| -rw-r--r-- | include/linux/vtime.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h index 0db535b79be7..97a81225d037 100644 --- a/include/linux/context_tracking_state.h +++ b/include/linux/context_tracking_state.h | |||
| @@ -26,14 +26,15 @@ static inline bool context_tracking_is_enabled(void) | |||
| 26 | { | 26 | { |
| 27 | return static_key_false(&context_tracking_enabled); | 27 | return static_key_false(&context_tracking_enabled); |
| 28 | } | 28 | } |
| 29 | static inline bool context_tracking_in_user(void) | 29 | |
| 30 | static inline bool context_tracking_cpu_is_enabled(void) | ||
| 30 | { | 31 | { |
| 31 | return __this_cpu_read(context_tracking.state) == IN_USER; | 32 | return __this_cpu_read(context_tracking.active); |
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | static inline bool context_tracking_active(void) | 35 | static inline bool context_tracking_in_user(void) |
| 35 | { | 36 | { |
| 36 | return __this_cpu_read(context_tracking.active); | 37 | return __this_cpu_read(context_tracking.state) == IN_USER; |
| 37 | } | 38 | } |
| 38 | #else | 39 | #else |
| 39 | static inline bool context_tracking_in_user(void) { return false; } | 40 | static inline bool context_tracking_in_user(void) { return false; } |
diff --git a/include/linux/vtime.h b/include/linux/vtime.h index 807c732cbf29..c5165fd256f9 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h | |||
| @@ -20,7 +20,7 @@ static inline bool vtime_accounting_enabled(void) { return true; } | |||
| 20 | static inline bool vtime_accounting_enabled(void) | 20 | static inline bool vtime_accounting_enabled(void) |
| 21 | { | 21 | { |
| 22 | if (context_tracking_is_enabled()) { | 22 | if (context_tracking_is_enabled()) { |
| 23 | if (context_tracking_active()) | 23 | if (context_tracking_cpu_is_enabled()) |
| 24 | return true; | 24 | return true; |
| 25 | } | 25 | } |
| 26 | 26 | ||
