return context_tracking_enabled();
}
-static inline bool vtime_accounting_enabled_this_cpu(void)
+static inline bool vtime_accounting_enabled_cpu(int cpu)
{
- if (vtime_accounting_enabled()) {
- if (context_tracking_enabled_this_cpu())
- return true;
- }
+ return (vtime_accounting_enabled() && context_tracking_enabled_cpu(cpu));
+}
- return false;
+static inline bool vtime_accounting_enabled_this_cpu(void)
+{
+ return (vtime_accounting_enabled() && context_tracking_enabled_this_cpu());
}
extern void vtime_task_switch_generic(struct task_struct *prev);
#else /* !CONFIG_VIRT_CPU_ACCOUNTING */
+static inline bool vtime_accounting_enabled_cpu(int cpu) {return false; }
static inline bool vtime_accounting_enabled_this_cpu(void) { return false; }
static inline void vtime_task_switch(struct task_struct *prev) { }