From: Jan Kiszka <jan.kiszka@domain.hid>
To: mani bhatti <imranbashirbhatti@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: [Xenomai-help] Re: [Xenomai-core] aperiodic xenomai tasks
Date: Wed, 27 Sep 2006 17:44:36 +0200 [thread overview]
Message-ID: <451A9C64.7040802@domain.hid> (raw)
In-Reply-To: <20060927151753.9409.qmail@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
mani bhatti wrote:
> Thanks Jan for your reply
> Actually the semaphore and mutexes stuff you have referred to i have
> already grounds for them.The only problem i have is please some body
> tell me that i dont want to make a thread periodic i,e i dont want to
> call a thread after periodic time interval i wanted it to make it
> aperiodic like threads in C++ are scheduled by scheduler byitself
This has nothing to do with C++, rather with the class library you are
used to.
> and sleep on waiting condition with out any specific time interval
> and wake only when signalled from pariodic thread. I hope you
> understand my point.Thanks a lot .
Let's try it differently:
thread_a()
{
rt_task_set_periodic(...);
while (1) {
rt_task_wait_period(NULL);
/* do some work */
if (I_should_trigger_thread_b)
rt_sem_v(&sem);
}
}
thread_b()
{
while (1) {
rt_sem_p(&sem, TM_INFINITE);
/* so some other work */
}
}
Again, read up what the services are exactly doing or you will be lost
once you have to modify things only slightly.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next parent reply other threads:[~2006-09-27 15:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060927151753.9409.qmail@domain.hid>
2006-09-27 15:44 ` Jan Kiszka [this message]
2006-10-05 13:57 ` [Xenomai-help] Problem with Aperiodic xenomai tasks mani bhatti
2006-11-30 16:45 ` [Xenomai-help] porting to kernel 2.2 mani bhatti
[not found] <20061005134524.92486.qmail@domain.hid>
2006-10-05 15:24 ` [Xenomai-help] Re: [Xenomai-core] aperiodic xenomai tasks Jan Kiszka
[not found] <20060927135543.26891.qmail@domain.hid>
2006-09-27 14:34 ` Jan Kiszka
2006-09-26 15:41 mani bhatti
2006-09-26 16:00 ` [Xenomai-help] " Jan Kiszka
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=451A9C64.7040802@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=imranbashirbhatti@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.