* [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task
@ 2012-05-14 7:55 Roberto Bielli
2012-05-14 8:11 ` Gilles Chanteperdrix
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Roberto Bielli @ 2012-05-14 7:55 UTC (permalink / raw)
To: xenomai@xenomai.org, Gilles Chanteperdrix
Hi,
i saw in the documentation that rt_task_create and rt_task_delete should
re-scheduling the calling task.
So i lost the priority if in a task try to call rt_task_create or
rt_task create. Do i understand correctly ?
Is there a way to avoid this behaviour ? Or which are all the case of
re-scheduling whne calling rt_task_create/rt_task_delete ?
Thanks of all
P.S. the imx25 now it's perfect. Was only the reentrant interrupt.
--
+------------------------------------------------------------------------------------------------+
Roberto Bielli
Sviluppo Software
Axel S.r.l.
Via Del Cannino, 3
21020 Crosio Della Valle
Varese - Italy
Telefono: +39 0332 949600
Fax: +39 0332 969315
E-mail: roberto.bielli@domain.hid
Web Site: www.axelsw.it
+------------------------------------------------------------------------------------------------+
Si precisa che le informazioni contenute in questo messaggio sono riservate e ad uso esclusivo del destinatario.
Qualora il messaggio in parola Le fosse pervenuto per errore, La preghiamo di eliminarlo senza copiarlo e di non inoltrarlo a terzi,
dandocene gentilmente comunicazione. Grazie.
Informativa sul trattamento dei dati personali (D. Lgs. 196/2003).
I dati utilizzati per la spedizione del presente messaggio sono utilizzati da Axel S.r.l., titolare del trattamento,
per l'invio delle comunicazioni dei diversi settori aziendali, non essendo autorizzata la divulgazione a terzi.
Potrete rivolgere alla seguente mail richieste di verifica, rettifica o cancellazione dei Vostri dati: info@domain.hid
This e-mail and any attachments is confidential and may contain privileged information
intended for the addressee(s) only. Dissemination, copying, printing or use by anybody
else is unauthorised. If you are not the intended recipient,
please delete this message and any attachments and advise the sender
by return e-mail.Thank you.
+------------------------------------------------------------------------------------------------+
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task
2012-05-14 7:55 [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task Roberto Bielli
@ 2012-05-14 8:11 ` Gilles Chanteperdrix
2012-05-14 8:15 ` Philippe Gerum
2012-05-14 9:17 ` Gilles Chanteperdrix
2 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2012-05-14 8:11 UTC (permalink / raw)
To: Roberto Bielli; +Cc: xenomai@xenomai.org
On 05/14/2012 09:55 AM, Roberto Bielli wrote:
> Hi,
>
> i saw in the documentation that rt_task_create and rt_task_delete should
> re-scheduling the calling task.
rt_task_create may reschedule the calling task, only "may", not
"should". And it happens in the obvious case: when creating a task with
a higher priority than the current task.
The reason why rt_task_delete may reschedule is documented:
"Native tasks implement a mechanism by which they are immune from
deletion by other tasks while they run into a deemed safe section of
code. This feature is used internally by the native skin in order to
prevent tasks from being deleted in the middle of a critical section,
without resorting to interrupt masking when the latter is not an option.
For this reason, the caller of rt_task_delete() might be blocked and a
rescheduling take place, waiting for the target task to exit such
critical section."
Xenomai online documentation may be found here:
http://www.xenomai.org/documentation/xenomai-2.6/html/api/index.html
And a local copy is installed when you run xenomai package "make install".
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task
2012-05-14 7:55 [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task Roberto Bielli
2012-05-14 8:11 ` Gilles Chanteperdrix
@ 2012-05-14 8:15 ` Philippe Gerum
2012-05-14 9:17 ` Gilles Chanteperdrix
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2012-05-14 8:15 UTC (permalink / raw)
To: Roberto Bielli; +Cc: xenomai@xenomai.org
On 05/14/2012 09:55 AM, Roberto Bielli wrote:
> Hi,
>
> i saw in the documentation that rt_task_create and rt_task_delete should
> re-scheduling the calling task.
> So i lost the priority if in a task try to call rt_task_create or
> rt_task create. Do i understand correctly ?
> Is there a way to avoid this behaviour ? Or which are all the case of
> re-scheduling whne calling rt_task_create/rt_task_delete ?
There is no way to avoid rescheduling (assuming you are currently using
the user-space API). Creating and deleting tasks involves switching to
secondary mode to get/release linux resources it's impossible to access
from a primary context.
>
> Thanks of all
>
> P.S. the imx25 now it's perfect. Was only the reentrant interrupt.
>
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task
2012-05-14 7:55 [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task Roberto Bielli
2012-05-14 8:11 ` Gilles Chanteperdrix
2012-05-14 8:15 ` Philippe Gerum
@ 2012-05-14 9:17 ` Gilles Chanteperdrix
2 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2012-05-14 9:17 UTC (permalink / raw)
To: Roberto Bielli; +Cc: xenomai@xenomai.org
On 05/14/2012 09:55 AM, Roberto Bielli wrote:
> P.S. the imx25 now it's perfect. Was only the reentrant interrupt.
By the way, now that Linux runs all interrupt handlers with hardware irq
disabled, this option is completely useless: it will prevent a low
priority irq to interrupt a low priority irq while the high priority
interrupt handler is running, but since that handler is already running
with hardware interrupts off, this does not add anything.
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-14 9:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 7:55 [Xenomai-core] rt_task_create and rt_task delete re-scheduling calling task Roberto Bielli
2012-05-14 8:11 ` Gilles Chanteperdrix
2012-05-14 8:15 ` Philippe Gerum
2012-05-14 9:17 ` 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.