* [Xenomai-help] priority coupling and Linux threads
@ 2011-05-19 18:30 Jeff Weber
2011-05-19 18:35 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Weber @ 2011-05-19 18:30 UTC (permalink / raw)
To: xenomai
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
If XENO_OPT_PRIOCPL is enabled, can a non-Xenomai Linux thread, created
via __real_pthread_create() preempt a Xenomai primary-mode or Xenomai
secondary-mode thread?
For example, when the Linux kernel inherits the priority of a primary-mode
thread to run it in secondary mode, can the kernel then discover some other
Linux thread with better priority and preempt the secondary mode thread?
TIA,
Jeff
[-- Attachment #2: Type: text/html, Size: 462 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] priority coupling and Linux threads
2011-05-19 18:30 [Xenomai-help] priority coupling and Linux threads Jeff Weber
@ 2011-05-19 18:35 ` Gilles Chanteperdrix
2011-05-20 6:40 ` Henri Roosen
0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2011-05-19 18:35 UTC (permalink / raw)
To: Jeff Weber; +Cc: xenomai
On 05/19/2011 08:30 PM, Jeff Weber wrote:
> If XENO_OPT_PRIOCPL is enabled, can a non-Xenomai Linux thread, created
> via __real_pthread_create() preempt a Xenomai primary-mode or Xenomai
> secondary-mode thread?
a non-Xenomai Linux thread can preempt a Xenomai thread running in
secondary mode, independently from XENO_OPT_PRIOCPL. It can not preempt
a Xenomai thread running in primary mode, again, independently from
XENO_OPT_PRIOCTL.
What XENO_OPT_PRIOCTL changes, is that a Xenomai thread running in
secondary mode can preempt a Xenomai thread running in primary mode.
>
> For example, when the Linux kernel inherits the priority of a
> primary-mode thread to run it in secondary mode, can the kernel then
> discover some other Linux thread with better priority and preempt the
> secondary mode thread?
Yes, it can, but as soon as it decides to switch to this thread, the
priority coupling ends, and the system switches to primary mode threads,
if one is runnable.
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] priority coupling and Linux threads
2011-05-19 18:35 ` Gilles Chanteperdrix
@ 2011-05-20 6:40 ` Henri Roosen
0 siblings, 0 replies; 3+ messages in thread
From: Henri Roosen @ 2011-05-20 6:40 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On Thu, May 19, 2011 at 8:35 PM, Gilles Chanteperdrix
<gilles.chanteperdrix@xenomai.org> wrote:
> On 05/19/2011 08:30 PM, Jeff Weber wrote:
>> If XENO_OPT_PRIOCPL is enabled, can a non-Xenomai Linux thread, created
>> via __real_pthread_create() preempt a Xenomai primary-mode or Xenomai
>> secondary-mode thread?
>
> a non-Xenomai Linux thread can preempt a Xenomai thread running in
> secondary mode, independently from XENO_OPT_PRIOCPL. It can not preempt
> a Xenomai thread running in primary mode, again, independently from
> XENO_OPT_PRIOCTL.
>
> What XENO_OPT_PRIOCTL changes, is that a Xenomai thread running in
> secondary mode can preempt a Xenomai thread running in primary mode.
>
>>
>> For example, when the Linux kernel inherits the priority of a
>> primary-mode thread to run it in secondary mode, can the kernel then
>> discover some other Linux thread with better priority and preempt the
>> secondary mode thread?
>
> Yes, it can, but as soon as it decides to switch to this thread, the
> priority coupling ends, and the system switches to primary mode threads,
> if one is runnable.
Be careful to rely on priority coupling though, it cannot always
guarantee the scheduling it specifies. Be sure to read
https://mail.gna.org/public/xenomai-help/2011-03/msg00165.html
>
> --
> Gilles.
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-20 6:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-19 18:30 [Xenomai-help] priority coupling and Linux threads Jeff Weber
2011-05-19 18:35 ` Gilles Chanteperdrix
2011-05-20 6:40 ` Henri Roosen
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.