rt_busy_sleep and rt_task_wait_period
Paolo Mantegazza
mantegazza at aero.polimi.it
Fri Jan 27 13:20:44 CET 2006
Yang Huang wrote:
> Hi list,
>
> A newbie's confuse about the difference between rt_busy_sleep and
> rt_task_wait_period, when being used to suspend a task: rt_busy_sleep
> takes the Time Stamp Clock as reference while rt_task_wait_period
> takes the Real Time Clock(8254), when the clocks are available. Is it
> correct?
>
No both use the same clock as assigned at start_rt_timer. Wait period is
an easy wayt to use rt_sleep_until, i.e. something like doing:
RTIME period = nano2count(my_period_in_nanos);
RTIME t = rt_get_time();
while(1) { ...... rt_sleep_until(t += period); ..... };
Paolo.
More information about the Rtai
mailing list