aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/itimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/itimer.c')
-rw-r--r--kernel/time/itimer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c
index 02068b2d5862..77f1e5635cc1 100644
--- a/kernel/time/itimer.c
+++ b/kernel/time/itimer.c
@@ -55,15 +55,10 @@ static void get_cpu_itimer(struct task_struct *tsk, unsigned int clock_id,
55 val = it->expires; 55 val = it->expires;
56 interval = it->incr; 56 interval = it->incr;
57 if (val) { 57 if (val) {
58 struct task_cputime cputime; 58 u64 t, samples[CPUCLOCK_MAX];
59 u64 t;
60 59
61 thread_group_cputimer(tsk, &cputime); 60 thread_group_sample_cputime(tsk, samples);
62 if (clock_id == CPUCLOCK_PROF) 61 t = samples[clock_id];
63 t = cputime.utime + cputime.stime;
64 else
65 /* CPUCLOCK_VIRT */
66 t = cputime.utime;
67 62
68 if (val < t) 63 if (val < t)
69 /* about to fire */ 64 /* about to fire */
@@ -213,6 +208,7 @@ again:
213 /* We are sharing ->siglock with it_real_fn() */ 208 /* We are sharing ->siglock with it_real_fn() */
214 if (hrtimer_try_to_cancel(timer) < 0) { 209 if (hrtimer_try_to_cancel(timer) < 0) {
215 spin_unlock_irq(&tsk->sighand->siglock); 210 spin_unlock_irq(&tsk->sighand->siglock);
211 hrtimer_cancel_wait_running(timer);
216 goto again; 212 goto again;
217 } 213 }
218 expires = timeval_to_ktime(value->it_value); 214 expires = timeval_to_ktime(value->it_value);