Skip to contentSkip to conversation

RT, nonRT communication

Xenomai-help Patrick 2 participants 2 messages Oct 30, 2007

lore
Share & tools
lore

Patrick

author
#0 lore raw

Hi,

Is it possible to share a pthread_mutex between a rt task and a linux pthread ?

My two tasks must share resources and I must protect them against concurrent access.

If pthread_mutex is not the correct way to do it can you tell me how to achieve this ?

Thanks in advance

Patrick

#1 lore raw
Quoted 10 lines · Patrick

Hi,

Is it possible to share a pthread_mutex between a rt task and a linux pthread ?

No, it is not possible

Quoted 6 lines

My two tasks must share resources and I must protect them against concurrent access.

If pthread_mutex is not the correct way to do it can you tell me how to achieve this ?

The way to handle these border line cases is to make your linux pthread a xenomai thread running with the SCHED_OTHER scheduling policy. Note that the main thread already has this property.

Signature · 1 line
                                               Gilles Chanteperdrix