summaryrefslogtreecommitdiffstats
path: root/kernel/sched/cpuacct.h
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2013-03-29 07:37:06 +0100
committerIngo Molnar <mingo@kernel.org>2013-04-10 13:54:17 +0200
commit1966aaf7d54608e8ddb7ac454b461840e763409a (patch)
tree01010d8ff23842f4200e69d2955fd805f50d6e28 /kernel/sched/cpuacct.h
parentsched/cpuacct: Add cpuacct_init() (diff)
downloadlinux-1966aaf7d54608e8ddb7ac454b461840e763409a.tar.xz
linux-1966aaf7d54608e8ddb7ac454b461840e763409a.zip
sched/cpuacct: Add cpuacct_acount_field()
So we can remove open-coded cpuacct code in cputime.c. Signed-off-by: Li Zefan <lizefan@huawei.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/51553692.9060008@huawei.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/cpuacct.h')
-rw-r--r--kernel/sched/cpuacct.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched/cpuacct.h b/kernel/sched/cpuacct.h
index 551acd729562..bd0409b85525 100644
--- a/kernel/sched/cpuacct.h
+++ b/kernel/sched/cpuacct.h
@@ -43,6 +43,7 @@ static inline struct cpuacct *parent_ca(struct cpuacct *ca)
extern void cpuacct_init(void);
extern void cpuacct_charge(struct task_struct *tsk, u64 cputime);
+extern void cpuacct_account_field(struct task_struct *p, int index, u64 val);
#else
@@ -54,4 +55,9 @@ static inline void cpuacct_charge(struct task_struct *tsk, u64 cputime)
{
}
+static inline void
+cpuacct_account_field(struct task_struct *p, int index, u64 val)
+{
+}
+
#endif