From: Johan Borkhuis <j.borkhuis@domain.hid>
To: Fabien MAHOT <fabien.mahot@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem of thread creation with Xenomai Posix
Date: Thu, 14 Feb 2008 14:48:03 +0100 [thread overview]
Message-ID: <47B44693.6070203@domain.hid> (raw)
In-Reply-To: <12460.62.39.72.60.1202995942.squirrel@domain.hid>
Fabien MAHOT wrote:
> Hi,
>
> I need your help to understand why my application doesn't work correctly.
>
> I use the Xenomai 2.3.4 kernel with its POSIX skin to develop a real time
> application. In this program, I create several threads thanks to a main
> thread which has the highest priority (SCHED_FIFO configuration). The aim
> is that the main thread stays in execution during the creation of all the
> other threads.
>
> However, in my program, when the main thread calls the posix function
> pthread_create to create a new thread, it's preempted by a thread created
> previously. In spite of the main thread has the highest priority.
>
> I would like to know why I ve got this problem with Xenomai. If you ve got
> an idea, please , give me your opinion.
>
>
This is quite easy to explain: the task you create is a real time task.
This task will always run before your main task, which is a Linux task.
If you add a call to rt_task_shadow after the mlockall your main task
will also become a Xenomai task, and you will see the same behavior as
with Linux.
Kind regards,
Johan Borkhuis
--
Johan Borkhuis Dutch Space BV
email: j.borkhuis@domain.hid Newtonweg 1
phone: 071-5245788 Leiden
fax: 071-5245499 The Netherlands
next prev parent reply other threads:[~2008-02-14 13:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 13:32 [Xenomai-help] Problem of thread creation with Xenomai Posix Fabien MAHOT
2008-02-14 13:46 ` Gilles Chanteperdrix
2008-02-14 13:48 ` Johan Borkhuis [this message]
2008-02-14 13:51 ` Gilles Chanteperdrix
2008-02-14 14:55 ` Johan Borkhuis
2008-02-14 15:10 ` 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=47B44693.6070203@domain.hid \
--to=j.borkhuis@domain.hid \
--cc=fabien.mahot@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.