A remark to rt_task_make_periodic in lxrt (bug report !?)
Herman.Bruyninckx at mech.kuleuven.ac.be
Fri Aug 23 16:50:56 CEST 2002
On Fri, 23 Aug 2002 andreas.spieker at daimlerchrysler.com wrote:
> I understood that the problem was due to a starting time to
> lying a few seconds in the past.
> So I'd like to ask the developers, if they could prevent
> other users from making the same experience.
So, that would mean adding time comparison code to the section of
rt_task_make_periodic() that runs with interrupts disabled...
That seems to be a high price to pay ... An RTOS doesn't want to loose
time on checking the viability of all of the arguments it gets. Most
data structures are already checked via a MAGIC number, of things like
checking impossible times and other continuous parameters is a lot of
overhead. I think.
There is rt_task_make_periodic_relative_ns, which does:
``task->resume_time = rt_get_time() + start_delay;''
so misuse is more difficult. (Unless you give a negative number; and
checking that is again costly.)
More information about the Rtai