This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_cond_broadcast(...) leads to a deadlock


Alex Kotliarov wrote:

- any reason why pthread_mutex_lock (cleanup_args->mutexPtr) was moved
to the top? Algorithm 8A has this line at the bottom of ptw32_cond_wait_cleanup()




I read, in an authoritative forum, that the external mutex is required to be held during cv cancel cleanup. The cleanup routine is also part of the normal cv wake-up logic but the change passed the test suite and so it seemed safe. I don't know if it's still a potential conformance problem, but this change obviously wasn't the solution.

The current version of pthread_cond_wait.c with the change undone is in CVS:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/pthreads/pthread_cond_wait.c?rev=1.8&content-type=text/plain&cvsroot=pthreads-win32

Apologies.
Ross

Thanks,

Alexander Kotliarov.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]