> I think I observed a strange behaviour on Linux which does not comply
> with POSIX.
> That is, POSIX mandates that a thread blocked on pthread_cond_wait()
> and canceled
> via pthread_cancel() gets unblocked, the corresponding mutex
> re-acquired and _then_
> cancellation cleanup handlers called.
> However on Linux this was not true - thread unblocked from
> pthread_cond_wait() did
> not re-acquire the associated mutex.



Thank you, Ivo Raisr. That makes sense and seems to fix my problem. I
think the relevant section of POSIX is:

> A side-effect of acting on a cancellation request while a thread is
> blocked on a condition variable is to re-acquire the mutex before
> calling any of the cancellation cleanup handlers.

I find it strange that GLibc does not implement this case properly.


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to