From: Mouaiad Alras <Mouaiad.Alras@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] difference between "alarm_wait" and "task_wait_period"
Date: Tue, 01 Apr 2008 12:59:27 +0200 [thread overview]
Message-ID: <47F2158F.307@domain.hid> (raw)
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,
next reply other threads:[~2008-04-01 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 10:59 Mouaiad Alras [this message]
2008-04-09 15:21 ` [Xenomai-help] difference between "alarm_wait" and "task_wait_period" Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F2158F.307@domain.hid \
--to=mouaiad.alras@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.