mutex and timers
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).
Signature · 6 lines
/Jesper B. Christensen Development Engineer T +45 39 55 88 02 E [email protected] Thrane & Thrane A/S - Lundtoftegaardsvej 93D DK-2800 Kgs. Lyngby, Denmark - www.thrane.com
Quoted 7 lines · Jesper Christensen
Hello
I was wondering if (and i have a feeling i already know the answer) it is a no-go to call
rtdm_mutex_lockfrom 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.
Signature · 1 line
Philippe.
As i suspected, thank you very much.
/Jesper B. Christensen
Development Engineer
T +45 39 55 88 02
E [email protected]
Thrane & Thrane A/S - Lundtoftegaardsvej 93D
DK-2800 Kgs. Lyngby, Denmark - www.thrane.com
Quoted 13 lines · Philippe Gerum
Quoted 7 lines · Jesper Christensen
Hello
I was wondering if (and i have a feeling i already know the answer) it is a no-go to call
rtdm_mutex_lockfrom 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.
Quoted 7 lines · Jesper Christensen
Hello
I was wondering if (and i have a feeling i already know the answer) it is a no-go to call
rtdm_mutex_lockfrom 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.
Signature · 1 line
Philippe.
Okay i will do that, thanks.
/Jesper B. Christensen
Development Engineer
T +45 39 55 88 02
E [email protected]
Thrane & Thrane A/S - Lundtoftegaardsvej 93D
DK-2800 Kgs. Lyngby, Denmark - www.thrane.com
Quoted 14 lines · Philippe Gerum
Quoted 7 lines · Jesper Christensen
Hello
I was wondering if (and i have a feeling i already know the answer) it is a no-go to call
rtdm_mutex_lockfrom 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_NUCLEUSandXENO_OPT_DEBUG_RTDMin your kernel config (leave outDEBUG_QUEUES, it introduces a lot of overhead and should only be set when explicitly required). This would trap at such attempt, pinpointing the issue.