Paolo Mantegazza wrote:

I'm not sure if I understand who the periodic mode runs.
First I have to declare that the specified task will run periodicaly
with a period of ns or units, depending which function is called. 
Then the task runs until a call of rt_task_wait_period().
This period is the one defined in the m,ake_period call.
If start_rt_timer() has never been called, the task will never resumed ?
Does start_rt_timer( period ) defines the same period as in the
make_periodic call ?


> When you do rt_set_periodic you stop any running timer. The sequence is:
> rt_set_periodic_mode();
> start_rt_timer(....);
In the examples directory in the stress module I found following
#define ONE_SHOT
...
#ifdef ONE_SHOT
        rt_set_oneshot_mode();
#endif
        period = start_rt_timer(nano2count(TICK_TIME));
        expected = start = rt_get_time() + 10*period;
        rt_task_make_periodic(&thread, start, period);
...
Why is here first set the oneshot mode?
Also the manual for rt_set_oneshot_mode says that before each
start_rt_timer call rt_set_oneshot_mode should be called.


> Beside the fact that it does not make sense to set the timer mode after
> having starting the timer, you must not do that in tasks but at the
> initting of your module. Note also that the periodic mode is the the
> default one and need not to be set, if you never used oneshot before.
> 
> Moreover what's the type msec2start? Hope long long, or you get into
> trouble if it is sligtly more that 4000.
Its of type RTIME
> 
> Ciao, Paolo.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to