apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: [PATCH] apr win32 thread_cond
Date Wed, 29 Oct 2003 20:56:57 GMT
C K Tan wrote:

> I ran into a race condition on Win32 with the attached test program
> (pc.c). Looking at thread_cond.c, it became obvious where where this
> could happen:
>
> 1. on line 96, apr_thread_mutex_unlock can be called multiple times
> without corresponding lock operation (if the while loop executes more
> than once).
> 2. on line 101 & 115, the ReleaseMutex calls do not have the prior
> lock mutex.
>
> I have not fixed apr_thread_cond_broadcast() which has the same bugs.
>
> Also, apr_thread_cond_create does not register thread_cond_cleanup as
> was done by the unix version.

There are more problems in the Win32 condition variable implementation.
I'm working on them, and hope to have a patch ready by the end of this week.


-- 
Brane ─îibej   <brane@xbc.nu>   http://www.xbc.nu/brane/


Mime
View raw message