Module: xenomai-forge Branch: master Commit: 4b9e3c61d8c6657b757c40c682573d67d9d6fe17 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=4b9e3c61d8c6657b757c40c682573d67d9d6fe17
Author: Philippe Gerum <[email protected]> Date: Sat Nov 26 18:05:27 2011 +0100 alchemy: remove obsolete TM_ONESHOT definition We have no more timer "mode" like in 2.x, in the sense that the clock resolution setting passed to copperplate supersedes that older logic. For that reason, rt_timer_set_mode() already disappeared from the API. It is time to get rid of TM_ONESHOT, fixing its only user, namely rt_timer_inquire(). The incurred API change is minimal, and should not break any properly written legacy application: the period field for a tickless resolution will be set to 1 - meaning 1 tick == 1 nanosecond), instead of 0. Any computation done for non-zero values should still be fine then. Any test on TM_ONESHOT should lead to a build time error, and fixed accordingly. People testing 0 have no luck, but this is why we provide macro-definitions. --- include/alchemy/timer.h | 1 - lib/alchemy/timer.c | 3 --- 2 files changed, 0 insertions(+), 4 deletions(-) diff --git a/include/alchemy/timer.h b/include/alchemy/timer.h index 2467849..f3d3874 100644 --- a/include/alchemy/timer.h +++ b/include/alchemy/timer.h @@ -28,7 +28,6 @@ typedef sticks_t SRTIME; #define TM_INFINITE 0 #define TM_NOW 0 -#define TM_ONESHOT 0 #define TM_NONBLOCK ((RTIME)-1ULL) typedef struct rt_timer_info { diff --git a/lib/alchemy/timer.c b/lib/alchemy/timer.c index 28c5989..f19bf98 100644 --- a/lib/alchemy/timer.c +++ b/lib/alchemy/timer.c @@ -43,9 +43,6 @@ SRTIME rt_timer_ticks2ns(SRTIME ticks) int rt_timer_inquire(RT_TIMER_INFO *info) { info->period = clockobj_get_resolution(&alchemy_clock); - if (info->period == 1) - info->period = TM_ONESHOT; - clockobj_get_time(&alchemy_clock, &info->date, &info->tsc); return 0; _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
