aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/cputime.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched/cputime.c')
-rw-r--r--kernel/sched/cputime.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index c0aa1ba752ea..2e8d34aac97e 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -443,6 +443,19 @@ void vtime_account_system_irqsafe(struct task_struct *tsk)
443} 443}
444EXPORT_SYMBOL_GPL(vtime_account_system_irqsafe); 444EXPORT_SYMBOL_GPL(vtime_account_system_irqsafe);
445 445
446#ifndef __ARCH_HAS_VTIME_TASK_SWITCH
447void vtime_task_switch(struct task_struct *prev)
448{
449 if (is_idle_task(prev))
450 vtime_account_idle(prev);
451 else
452 vtime_account_system(prev);
453
454 vtime_account_user(prev);
455 arch_vtime_task_switch(prev);
456}
457#endif
458
446/* 459/*
447 * Archs that account the whole time spent in the idle task 460 * Archs that account the whole time spent in the idle task
448 * (outside irq) as idle time can rely on this and just implement 461 * (outside irq) as idle time can rely on this and just implement