Bogus conversion to ns in rt_task_make_periodic() emulation
PATCH 1/1 Bogus conversion to ns in rt_task_make_periodic() emulation
The RTAI function rt_task_make_periodic() takes absolute ticks as the start_time argument, however this was being compared to ns in the RTAI emulation layer.
This patch fixes this, and also removes '+ period' as this seems wrong with the way xnpod_set_thread_periodic() works.
Patch is against r1717 so it won't apply directly to head, but the same logical bug seems to exist there?
ksrc/skins/rtai/task.c +1 -1
@@ -272,7 +272,7 @@ int rt_task_make_periodic(RT_TASK *task, RTIME start_time, RTIME period) goto unlock_and_exit; } -if (start_time + period <=xnpod_ticks2ns (xnpod_get_time ())) +if (start_time <=xnpod_get_time ()) start_time =XN_INFINITE ; err =xnpod_set_thread_periodic (&task->thread_base, start_time, period);
Philippe Gerum
AppliedQuoted 7 lines · Andrew Dennison
The RTAI function
rt_task_make_periodic()takes absolute ticks as thestart_timeargument, however this was being compared to ns in the RTAI emulation layer.This patch fixes this, and also removes '+ period' as this seems wrong with the way
xnpod_set_thread_periodic()works.
Applied, thanks.
Quoted 2 lines
Patch is against r1717 so it won't apply directly to head, but the same logical bug seems to exist there?
Indeed. Fixed in the trunk/ too, thanks.
Signature · 1 line
Philippe.