diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-10-22 03:48:06 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-10-22 03:48:06 -0400 |
commit | 268a3dcfea2077fca60d3715caa5c96f9b5e6ea7 (patch) | |
tree | c2232774508424e677e27f296090a68c775e4669 /kernel/posix-timers.c | |
parent | c4bd822e7b12a9008241d76db45b665f2fef180c (diff) | |
parent | 592aa999d6a272856c9bfbdaac0cfba1bb37c24c (diff) |
Merge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2
Conflicts:
kernel/time/tick-sched.c
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r-- | kernel/posix-timers.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index b931d7cedbfa..5e79c662294b 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -639,7 +639,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting) | |||
639 | (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) | 639 | (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) |
640 | timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv); | 640 | timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv); |
641 | 641 | ||
642 | remaining = ktime_sub(timer->expires, now); | 642 | remaining = ktime_sub(hrtimer_get_expires(timer), now); |
643 | /* Return 0 only, when the timer is expired and not pending */ | 643 | /* Return 0 only, when the timer is expired and not pending */ |
644 | if (remaining.tv64 <= 0) { | 644 | if (remaining.tv64 <= 0) { |
645 | /* | 645 | /* |
@@ -733,7 +733,7 @@ common_timer_set(struct k_itimer *timr, int flags, | |||
733 | hrtimer_init(&timr->it.real.timer, timr->it_clock, mode); | 733 | hrtimer_init(&timr->it.real.timer, timr->it_clock, mode); |
734 | timr->it.real.timer.function = posix_timer_fn; | 734 | timr->it.real.timer.function = posix_timer_fn; |
735 | 735 | ||
736 | timer->expires = timespec_to_ktime(new_setting->it_value); | 736 | hrtimer_set_expires(timer, timespec_to_ktime(new_setting->it_value)); |
737 | 737 | ||
738 | /* Convert interval */ | 738 | /* Convert interval */ |
739 | timr->it.real.interval = timespec_to_ktime(new_setting->it_interval); | 739 | timr->it.real.interval = timespec_to_ktime(new_setting->it_interval); |
@@ -742,14 +742,12 @@ common_timer_set(struct k_itimer *timr, int flags, | |||
742 | if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) { | 742 | if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) { |
743 | /* Setup correct expiry time for relative timers */ | 743 | /* Setup correct expiry time for relative timers */ |
744 | if (mode == HRTIMER_MODE_REL) { | 744 | if (mode == HRTIMER_MODE_REL) { |
745 | timer->expires = | 745 | hrtimer_add_expires(timer, timer->base->get_time()); |
746 | ktime_add_safe(timer->expires, | ||
747 | timer->base->get_time()); | ||
748 | } | 746 | } |
749 | return 0; | 747 | return 0; |
750 | } | 748 | } |
751 | 749 | ||
752 | hrtimer_start(timer, timer->expires, mode); | 750 | hrtimer_start_expires(timer, mode); |
753 | return 0; | 751 | return 0; |
754 | } | 752 | } |
755 | 753 | ||