All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] difference between "alarm_wait" and "task_wait_period"
@ 2008-04-01 10:59 Mouaiad Alras
  2008-04-09 15:21 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Mouaiad Alras @ 2008-04-01 10:59 UTC (permalink / raw)
  To: xenomai

Hello,
is there any difference between "periodic task" and "periodic alarm 
triggered task" ??

are "task1" and "task2" the same in this example ? :



void task1_do(void *cookies){
       while(1){
            rt_alarm_wait(&alarm1);
            ......
        }
}

int main(void){
    ......
    rt_alarm_create(&alarm1,"alarm1");
    rt_task_create(&task1,"task1",_STK,_PRIO,_MOD);
    rt_task_start(&task1, &task1_do, NULL);
    rt_alarm_start(&alarm1,_OFFSET,_INTERVAL);
    ......
}

===================================

void task2_do(void *cookies){
       while(1){
             rt_task_wait_period(&task2);
             ......
       }
}

int main(void){
    ......
    rt_task_create(&task2,"task2",_STK,_PRIO,_MOD);
    rt_task_set_periodic(&task2,_OFFSET,_INTERVAL);
    rt_task_start(&task2, &task2_do, NULL);
    ......
}




thank you,


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-09 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-01 10:59 [Xenomai-help] difference between "alarm_wait" and "task_wait_period" Mouaiad Alras
2008-04-09 15:21 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.