* [Xenomai] mutex and timers
@ 2012-11-29 10:53 Jesper Christensen
2012-11-29 10:56 ` Philippe Gerum
2012-11-29 10:59 ` Philippe Gerum
0 siblings, 2 replies; 5+ messages in thread
From: Jesper Christensen @ 2012-11-29 10:53 UTC (permalink / raw)
To: xenomai
Hello
I was wondering if (and i have a feeling i already know the answer) it
is a no-go to call rtdm_mutex_lock from a rtdm timer handler? I've just
discovered that is what we do, and i have a feeling it is causing
trouble (most of the time it seems to work however).
--
/Jesper B. Christensen
Development Engineer
T +45 39 55 88 02
E jesper.christensen@cobham.com
Thrane & Thrane A/S - Lundtoftegaardsvej 93D
DK-2800 Kgs. Lyngby, Denmark - www.thrane.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] mutex and timers
2012-11-29 10:53 [Xenomai] mutex and timers Jesper Christensen
@ 2012-11-29 10:56 ` Philippe Gerum
2012-11-29 10:57 ` Jesper Christensen
2012-11-29 10:59 ` Philippe Gerum
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2012-11-29 10:56 UTC (permalink / raw)
To: jesper.christensen; +Cc: Jesper Christensen, xenomai
On 11/29/2012 11:53 AM, Jesper Christensen wrote:
> Hello
>
> I was wondering if (and i have a feeling i already know the answer) it
> is a no-go to call rtdm_mutex_lock from a rtdm timer handler? I've just
> discovered that is what we do, and i have a feeling it is causing
> trouble (most of the time it seems to work however).
>
no go indeed. As soon as the mutex is contented, an attempt is made to
put the caller to sleep, which can't be done over an IRQ context. So the
situation is essentially, a mess.
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] mutex and timers
2012-11-29 10:56 ` Philippe Gerum
@ 2012-11-29 10:57 ` Jesper Christensen
0 siblings, 0 replies; 5+ messages in thread
From: Jesper Christensen @ 2012-11-29 10:57 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai
As i suspected, thank you very much.
/Jesper B. Christensen
Development Engineer
T +45 39 55 88 02
E jesper.christensen@cobham.com
Thrane & Thrane A/S - Lundtoftegaardsvej 93D
DK-2800 Kgs. Lyngby, Denmark - www.thrane.com
On 11/29/2012 11:56 AM, Philippe Gerum wrote:
> On 11/29/2012 11:53 AM, Jesper Christensen wrote:
>> Hello
>>
>> I was wondering if (and i have a feeling i already know the answer) it
>> is a no-go to call rtdm_mutex_lock from a rtdm timer handler? I've just
>> discovered that is what we do, and i have a feeling it is causing
>> trouble (most of the time it seems to work however).
>>
>
> no go indeed. As soon as the mutex is contented, an attempt is made to
> put the caller to sleep, which can't be done over an IRQ context. So the
> situation is essentially, a mess.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] mutex and timers
2012-11-29 10:53 [Xenomai] mutex and timers Jesper Christensen
2012-11-29 10:56 ` Philippe Gerum
@ 2012-11-29 10:59 ` Philippe Gerum
2012-11-29 11:07 ` Jesper Christensen
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2012-11-29 10:59 UTC (permalink / raw)
To: jesper.christensen; +Cc: Jesper Christensen, xenomai
On 11/29/2012 11:53 AM, Jesper Christensen wrote:
> Hello
>
> I was wondering if (and i have a feeling i already know the answer) it
> is a no-go to call rtdm_mutex_lock from a rtdm timer handler? I've just
> discovered that is what we do, and i have a feeling it is causing
> trouble (most of the time it seems to work however).
>
Btw, you should enable XENO_OPT_DEBUG_NUCLEUS and XENO_OPT_DEBUG_RTDM in
your kernel config (leave out DEBUG_QUEUES, it introduces a lot of
overhead and should only be set when explicitly required). This would
trap at such attempt, pinpointing the issue.
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] mutex and timers
2012-11-29 10:59 ` Philippe Gerum
@ 2012-11-29 11:07 ` Jesper Christensen
0 siblings, 0 replies; 5+ messages in thread
From: Jesper Christensen @ 2012-11-29 11:07 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai
Okay i will do that, thanks.
/Jesper B. Christensen
Development Engineer
T +45 39 55 88 02
E jesper.christensen@cobham.com
Thrane & Thrane A/S - Lundtoftegaardsvej 93D
DK-2800 Kgs. Lyngby, Denmark - www.thrane.com
On 11/29/2012 11:59 AM, Philippe Gerum wrote:
> On 11/29/2012 11:53 AM, Jesper Christensen wrote:
>> Hello
>>
>> I was wondering if (and i have a feeling i already know the answer) it
>> is a no-go to call rtdm_mutex_lock from a rtdm timer handler? I've just
>> discovered that is what we do, and i have a feeling it is causing
>> trouble (most of the time it seems to work however).
>>
>
> Btw, you should enable XENO_OPT_DEBUG_NUCLEUS and XENO_OPT_DEBUG_RTDM in
> your kernel config (leave out DEBUG_QUEUES, it introduces a lot of
> overhead and should only be set when explicitly required). This would
> trap at such attempt, pinpointing the issue.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-29 11:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29 10:53 [Xenomai] mutex and timers Jesper Christensen
2012-11-29 10:56 ` Philippe Gerum
2012-11-29 10:57 ` Jesper Christensen
2012-11-29 10:59 ` Philippe Gerum
2012-11-29 11:07 ` Jesper Christensen
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.