[Xenomai] syncobj_wait_grant vs. signals

Philippe Gerum rpm at xenomai.org
Tue May 29 11:03:46 CEST 2018

On 05/29/2018 10:43 AM, Jan Kiszka wrote:
> On 2018-05-29 09:31, Philippe Gerum wrote:
>> On 05/28/2018 08:51 PM, Jan Kiszka wrote:
>>> Hi Philippe,
>>> struggling with an internal implementation on top of copperplate's
>>> syncobj_wait_grant, I was wondering if that function is supposed to
>>> return -EINTR on signal interruptions. It's mercury variant will not
>>> because it used pthread_cond_wait internally. The cobalt version does,
>>> and now I need to decide where to handle that best.
>> The only requirement is to have EINTR honored by wait_grant/wait_drain
>> calls upon syncobj_flush().
>> The reason the Cobalt side returns EINTR also on Linux signals is due to
>> cobalt_monitor_wait() not implementing the prologue/epilogue functional
>> split pthread_cond_wait() exhibits, which allows to filter out EINTR in
>> order to match the POSIX spec.
> Do you think it's worth changing that? It's trivial to catch downstream,
> at the caller site, with a while loop but if more callers than mine
> would like to have that, a central fix would be better.

Monitors are a cobalt-specific things, currently only used by the
syncobj abstraction for which is has been specifically crafted. I would
rather go for catching the condition downstream.


More information about the Xenomai mailing list