Re: [PATCH 7/7] [hrtimers] Set correct initial expiry time forrelative SIGEV_NONE timers

From: Andrew Morton
Date: Fri Jan 20 2006 - 00:11:01 EST


Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
>
> The expiry time for relative timers with SIGEV_NONE set was never
> updated to the correct value.
>

Ahem.

> + if (mode == HRTIMER_REL)
> + timer->expires = ktime_add(timer-expires,
> + timer->base->get_time());

doesn't compile, hence isn't tested.

Please confirm that with the below fix we get something which works OK?

--- devel/kernel/posix-timers.c~hrtimers-set-correct-initial-expiry-time-for-relative-fix 2006-01-19 21:08:44.000000000 -0800
+++ devel-akpm/kernel/posix-timers.c 2006-01-19 21:08:44.000000000 -0800
@@ -727,7 +727,7 @@ common_timer_set(struct k_itimer *timr,
if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) {
/* Setup correct expiry time for relative timers */
if (mode == HRTIMER_REL)
- timer->expires = ktime_add(timer-expires,
+ timer->expires = ktime_add(timer->expires,
timer->base->get_time());
return 0;
}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/