Brian L. wrote:
>> Yes, but when blocking native services are invoked, the caller has to be
>> a native thread again. Only pure non-RT threads with no shared critical
>> paths can be plain pthreads. When in doubt, study the native
>> documentation regarding allowed contexts. The statement "switches to
>> primary mode" indicates that a native thread is required.
> 
> So in this case, can I still call the functions from a thread created
> using pthread_create (assuming that they may momentarily increase in
> priority)?

You can call native (or more general: Xenomai) services from non-RT
threads when they do not let your thread block (or contain the risk of
blocking). To block on some RT resources like a queue or a mutex you
need a RT context, e.g. a native thread.

> 
> Can you explain "no shared critical paths"? Would this include
> contending for a mutex-protected resource which is also used by a
> real-time thread?

Yes, this is such a critical path. You may want that every thread
holding the mutex does this only for a bounded time. To ensure this,
priority inheritance may be applied on the mutex holder, thus it has to
be a rt-thread.

> 
> All of my non-time-critical threads are doing some form of
> communication with real-time threads, either through a queue or
> through mutex-protected memory. Can they still be pthread_create
> threads?

Nope, in this case they have to be extended, i.e. created as native threads.

> 
>> Hope I could clarify the situation.
> 
> You've been supremely helpful. I apologize for asking so many questions.
> 

No problem, I always hope this helps others implicitly as well. :)

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to