blob: b9fc4f9ab470032d4a670e56ca9eec5c9bfe2f67 [file] [log] [blame]
Frederic Weisbeckerdcbf8322012-10-05 23:07:19 +02001#ifndef _LINUX_KERNEL_VTIME_H
2#define _LINUX_KERNEL_VTIME_H
3
4struct task_struct;
5
6#ifdef CONFIG_VIRT_CPU_ACCOUNTING
7extern void vtime_task_switch(struct task_struct *prev);
Frederic Weisbecker11113332012-10-24 18:05:51 +02008extern void __vtime_account_system(struct task_struct *tsk);
Frederic Weisbeckerdcbf8322012-10-05 23:07:19 +02009extern void vtime_account_system(struct task_struct *tsk);
Frederic Weisbecker11113332012-10-24 18:05:51 +020010extern void __vtime_account_idle(struct task_struct *tsk);
Frederic Weisbeckerdcbf8322012-10-05 23:07:19 +020011#else
12static inline void vtime_task_switch(struct task_struct *prev) { }
Frederic Weisbecker11113332012-10-24 18:05:51 +020013static inline void vtime_account_system(struct task_struct *tsk) { }
Frederic Weisbeckerdcbf8322012-10-05 23:07:19 +020014#endif
15
16#if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING)
17static inline void vtime_account(struct task_struct *tsk)
18{
19}
20#else
21extern void vtime_account(struct task_struct *tsk);
22#endif
23
24#endif /* _LINUX_KERNEL_VTIME_H */