diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2006-02-01 06:05:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 11:53:13 -0500 |
commit | 952bbc87f01f552ef091a62ea2a721b5b2670e74 (patch) | |
tree | 21e98d4d4c715c30987dac59cc309ecd1987f20c /kernel/posix-timers.c | |
parent | 66188fae3bf7f8dd951e2291d2a81888ed1b65de (diff) |
[PATCH] hrtimers: set correct initial expiry time for relative SIGEV_NONE timers
The expiry time for relative timers with SIGEV_NONE set was never
updated to the correct value.
Pointed out by George Anzinger.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r-- | kernel/posix-timers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 28e72fd0029f..aad6f138d5c9 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -724,8 +724,13 @@ common_timer_set(struct k_itimer *timr, int flags, | |||
724 | timr->it.real.interval = timespec_to_ktime(new_setting->it_interval); | 724 | timr->it.real.interval = timespec_to_ktime(new_setting->it_interval); |
725 | 725 | ||
726 | /* SIGEV_NONE timers are not queued ! See common_timer_get */ | 726 | /* SIGEV_NONE timers are not queued ! See common_timer_get */ |
727 | if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) | 727 | if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) { |
728 | /* Setup correct expiry time for relative timers */ | ||
729 | if (mode == HRTIMER_REL) | ||
730 | timer->expires = ktime_add(timer->expires, | ||
731 | timer->base->get_time()); | ||
728 | return 0; | 732 | return 0; |
733 | } | ||
729 | 734 | ||
730 | hrtimer_start(timer, timer->expires, mode); | 735 | hrtimer_start(timer, timer->expires, mode); |
731 | return 0; | 736 | return 0; |