Waking up a linux thread from a xenomai thread, without mode switch

Julien Blanc julien.blanc at sprinte.eu
Fri Dec 14 11:48:41 CET 2018


Hi,

We’re currently using semaphores and a shared buffer to allow
communication between a xenomai cobalt thread and a linux regular
thread (the xddp interface has been tested and does not perform well
for our use case, which is exchanging a lot a very small messages).

While this works fine most of the time, we’ve noticed that this incurs
a mode switch when the xenomai rt-thread calls real_sem_post, and,
under heavy load, it can results in that specific thread being
suspended for too long.

I couldn’t find in the documentation how to do this properly :
* waiting on a xenomai semaphore from a linux thread is forbidden
* posting a linux semaphore from a xenomai thread incurs a mode switch

I’d like each thread to stay in its mode. I can live with the linux
thread entering the primary mode for a small amount of time, but not
the xenomai thread entering the secondary mode.

Did i miss something obvious ?

Regards,

Julien




More information about the Xenomai mailing list