|
@@ -676,7 +676,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
|
|
struct itimerspec *new, struct itimerspec *old)
|
|
struct itimerspec *new, struct itimerspec *old)
|
|
{
|
|
{
|
|
struct task_struct *p = timer->it.cpu.task;
|
|
struct task_struct *p = timer->it.cpu.task;
|
|
- union cpu_time_count old_expires, new_expires, val;
|
|
|
|
|
|
+ union cpu_time_count old_expires, new_expires, old_incr, val;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
if (unlikely(p == NULL)) {
|
|
if (unlikely(p == NULL)) {
|
|
@@ -707,6 +707,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
|
|
BUG_ON(!irqs_disabled());
|
|
BUG_ON(!irqs_disabled());
|
|
|
|
|
|
ret = 0;
|
|
ret = 0;
|
|
|
|
+ old_incr = timer->it.cpu.incr;
|
|
spin_lock(&p->sighand->siglock);
|
|
spin_lock(&p->sighand->siglock);
|
|
old_expires = timer->it.cpu.expires;
|
|
old_expires = timer->it.cpu.expires;
|
|
if (unlikely(timer->it.cpu.firing)) {
|
|
if (unlikely(timer->it.cpu.firing)) {
|
|
@@ -822,7 +823,7 @@ int posix_cpu_timer_set(struct k_itimer *timer, int flags,
|
|
out:
|
|
out:
|
|
if (old) {
|
|
if (old) {
|
|
sample_to_timespec(timer->it_clock,
|
|
sample_to_timespec(timer->it_clock,
|
|
- timer->it.cpu.incr, &old->it_interval);
|
|
|
|
|
|
+ old_incr, &old->it_interval);
|
|
}
|
|
}
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|