aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-cpu-timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/posix-cpu-timers.c')
-rw-r--r--kernel/posix-cpu-timers.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 7c7166f766cc..cce2f0b2d406 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -676,7 +676,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
676 struct itimerspec *new, struct itimerspec *old) 676 struct itimerspec *new, struct itimerspec *old)
677{ 677{
678 struct task_struct *p = timer->it.cpu.task; 678 struct task_struct *p = timer->it.cpu.task;
679 union cpu_time_count old_expires, new_expires, val; 679 union cpu_time_count old_expires, new_expires, old_incr, val;
680 int ret; 680 int ret;
681 681
682 if (unlikely(p == NULL)) { 682 if (unlikely(p == NULL)) {
@@ -707,6 +707,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
707 BUG_ON(!irqs_disabled()); 707 BUG_ON(!irqs_disabled());
708 708
709 ret = 0; 709 ret = 0;
710 old_incr = timer->it.cpu.incr;
710 spin_lock(&p->sighand->siglock); 711 spin_lock(&p->sighand->siglock);
711 old_expires = timer->it.cpu.expires; 712 old_expires = timer->it.cpu.expires;
712 if (unlikely(timer->it.cpu.firing)) { 713 if (unlikely(timer->it.cpu.firing)) {
@@ -822,7 +823,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
822 out: 823 out:
823 if (old) { 824 if (old) {
824 sample_to_timespec(timer->it_clock, 825 sample_to_timespec(timer->it_clock,
825 timer->it.cpu.incr, &old->it_interval); 826 old_incr, &old->it_interval);
826 } 827 }
827 return ret; 828 return ret;
828} 829}