mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
73e6aafd9e
- Use for() instead of while() loop in some functions to make the code simpler. - Use this_cpu_ptr() instead of per_cpu_ptr() to make the code cleaner and a bit faster. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Tejun Heo <htejun@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/d8a7ef9592f55224630cb26dea239f05b6398a4e.1458187654.git.zhaolei@cn.fujitsu.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
18 lines
359 B
C
18 lines
359 B
C
#ifdef CONFIG_CGROUP_CPUACCT
|
|
|
|
extern void cpuacct_charge(struct task_struct *tsk, u64 cputime);
|
|
extern void cpuacct_account_field(struct task_struct *tsk, int index, u64 val);
|
|
|
|
#else
|
|
|
|
static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime)
|
|
{
|
|
}
|
|
|
|
static inline void
|
|
cpuacct_account_field(struct task_struct *tsk, int index, u64 val)
|
|
{
|
|
}
|
|
|
|
#endif
|