diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/vtime.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/vtime.h b/include/linux/vtime.h index 21ef703d1b25..5368af9bdf06 100644 --- a/include/linux/vtime.h +++ b/include/linux/vtime.h | |||
| @@ -10,12 +10,20 @@ extern void vtime_account_system_irqsafe(struct task_struct *tsk); | |||
| 10 | extern void vtime_account_idle(struct task_struct *tsk); | 10 | extern void vtime_account_idle(struct task_struct *tsk); |
| 11 | extern void vtime_account_user(struct task_struct *tsk); | 11 | extern void vtime_account_user(struct task_struct *tsk); |
| 12 | extern void vtime_account(struct task_struct *tsk); | 12 | extern void vtime_account(struct task_struct *tsk); |
| 13 | |||
| 14 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | ||
| 15 | extern bool vtime_accounting_enabled(void); | ||
| 13 | #else | 16 | #else |
| 17 | static inline bool vtime_accounting_enabled(void) { return true; } | ||
| 18 | #endif | ||
| 19 | |||
| 20 | #else /* !CONFIG_VIRT_CPU_ACCOUNTING */ | ||
| 14 | static inline void vtime_task_switch(struct task_struct *prev) { } | 21 | static inline void vtime_task_switch(struct task_struct *prev) { } |
| 15 | static inline void vtime_account_system(struct task_struct *tsk) { } | 22 | static inline void vtime_account_system(struct task_struct *tsk) { } |
| 16 | static inline void vtime_account_system_irqsafe(struct task_struct *tsk) { } | 23 | static inline void vtime_account_system_irqsafe(struct task_struct *tsk) { } |
| 17 | static inline void vtime_account_user(struct task_struct *tsk) { } | 24 | static inline void vtime_account_user(struct task_struct *tsk) { } |
| 18 | static inline void vtime_account(struct task_struct *tsk) { } | 25 | static inline void vtime_account(struct task_struct *tsk) { } |
| 26 | static inline bool vtime_accounting_enabled(void) { return false; } | ||
| 19 | #endif | 27 | #endif |
| 20 | 28 | ||
| 21 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | 29 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN |
