aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-09-01 18:02:30 -0400
committerArjan van de Ven <arjan@linux.intel.com>2008-09-06 00:35:13 -0400
commitcc584b213f252bf698849cf4be2377cd3ec7501a (patch)
tree621ba11da6a2ab8598f9ed453836cd2c44192260 /kernel/posix-timers.c
parent23dd7bb09bd8d7efd8a602aed97b93d52f85e675 (diff)
hrtimer: convert kernel/* to the new hrtimer apis
In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts kernel/* to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index e36d5798cbff..f85efcdcab2d 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -668,7 +668,7 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
668 (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) 668 (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE))
669 timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv); 669 timr->it_overrun += (unsigned int) hrtimer_forward(timer, now, iv);
670 670
671 remaining = ktime_sub(timer->expires, now); 671 remaining = ktime_sub(hrtimer_get_expires(timer), now);
672 /* Return 0 only, when the timer is expired and not pending */ 672 /* Return 0 only, when the timer is expired and not pending */
673 if (remaining.tv64 <= 0) { 673 if (remaining.tv64 <= 0) {
674 /* 674 /*
@@ -762,7 +762,7 @@ common_timer_set(struct k_itimer *timr, int flags,
762 hrtimer_init(&timr->it.real.timer, timr->it_clock, mode); 762 hrtimer_init(&timr->it.real.timer, timr->it_clock, mode);
763 timr->it.real.timer.function = posix_timer_fn; 763 timr->it.real.timer.function = posix_timer_fn;
764 764
765 timer->expires = timespec_to_ktime(new_setting->it_value); 765 hrtimer_set_expires(timer, timespec_to_ktime(new_setting->it_value));
766 766
767 /* Convert interval */ 767 /* Convert interval */
768 timr->it.real.interval = timespec_to_ktime(new_setting->it_interval); 768 timr->it.real.interval = timespec_to_ktime(new_setting->it_interval);
@@ -771,14 +771,12 @@ common_timer_set(struct k_itimer *timr, int flags,
771 if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) { 771 if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE)) {
772 /* Setup correct expiry time for relative timers */ 772 /* Setup correct expiry time for relative timers */
773 if (mode == HRTIMER_MODE_REL) { 773 if (mode == HRTIMER_MODE_REL) {
774 timer->expires = 774 hrtimer_add_expires(timer, timer->base->get_time());
775 ktime_add_safe(timer->expires,
776 timer->base->get_time());
777 } 775 }
778 return 0; 776 return 0;
779 } 777 }
780 778
781 hrtimer_start(timer, timer->expires, mode); 779 hrtimer_start_expires(timer, mode);
782 return 0; 780 return 0;
783} 781}
784 782