mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 23:47:06 +00:00
- 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 <[email protected]> Signed-off-by: Zhao Lei <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/d8a7ef9592f55224630cb26dea239f05b6398a4e.1458187654.git.zhaolei@cn.fujitsu.com Signed-off-by: Ingo Molnar <[email protected]>
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
|