Ahh ok. Thanks for that, should've looked further into the spec. I assumed from 
other documentation I read that it could work.

So, now I'm a bit stuck on mixing the signal-based POSIX timers with mutexes. I 
will see about other synchronization mechanism.

Best,
Matias

On Tue, Jan 12, 2021, at 21:19, Gregory Nutt wrote:
> 
> > pthread_cond_wait() is not supposed to return if a signal is received: 
> > https://pubs.opengroup.org/onlinepubs/009696699/functions/pthread_cond_wait.html
> >
> > EINTR is not one of the valid return values from pthread_cond_wait().
> 
> This is the specific POSIX requirement that must be followed: "If a 
> signal is delivered to a thread waiting for a condition variable, upon 
> return from the signal handler the thread resumes waiting for the 
> condition variable as if it was not interrupted, or it shall return zero 
> due to spurious wakeup."
> 
> "Spurious wakeups" are not handled.
> 
> 

Reply via email to