aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 475a6f2b7158..82251c21f785 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5182,22 +5182,12 @@ void account_idle_ticks(unsigned long ticks)
5182 * Use precise platform statistics if available: 5182 * Use precise platform statistics if available:
5183 */ 5183 */
5184#ifdef CONFIG_VIRT_CPU_ACCOUNTING 5184#ifdef CONFIG_VIRT_CPU_ACCOUNTING
5185cputime_t task_utime(struct task_struct *p)
5186{
5187 return p->utime;
5188}
5189
5190cputime_t task_stime(struct task_struct *p)
5191{
5192 return p->stime;
5193}
5194
5195void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st) 5185void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
5196{ 5186{
5197 if (ut) 5187 if (ut)
5198 *ut = task_utime(p); 5188 *ut = p->utime;
5199 if (st) 5189 if (st)
5200 *st = task_stime(p); 5190 *st = p->stime;
5201} 5191}
5202#else 5192#else
5203 5193
@@ -5235,27 +5225,8 @@ void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
5235 if (st) 5225 if (st)
5236 *st = p->prev_stime; 5226 *st = p->prev_stime;
5237} 5227}
5238
5239cputime_t task_utime(struct task_struct *p)
5240{
5241 cputime_t utime;
5242 task_times(p, &utime, NULL);
5243 return utime;
5244}
5245
5246cputime_t task_stime(struct task_struct *p)
5247{
5248 cputime_t stime;
5249 task_times(p, NULL, &stime);
5250 return stime;
5251}
5252#endif 5228#endif
5253 5229
5254inline cputime_t task_gtime(struct task_struct *p)
5255{
5256 return p->gtime;
5257}
5258
5259/* 5230/*
5260 * This function gets called by the timer code, with HZ frequency. 5231 * This function gets called by the timer code, with HZ frequency.
5261 * We call it with interrupts disabled. 5232 * We call it with interrupts disabled.