We're using a mix of regular NPTL posix threads and RT cobalt threads
in our application, using XDDP communication between them.

In a few places, we need to identify the calling context, ie, whether
we're being called from a cobalt RT thread or from a regular NPTL
thread, and act accordingly.

My understanding is that calling pthread_getschedparam and checking
that the returned policy is SCHED_FIFO does the job.

* is it correct ? Or are they some corner cases not covered by this
test ?
* is it the canonical way, or is there another one ? (maybe cheaper -
since this call will do two calls in case of a posix thread, there must
be a cheaper way to detect the running context).

Regards,

Julien



_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to