Problem in mutex?

Shachar Shemesh wine-devel at
Fri Aug 27 16:26:10 CDT 2004

Shachar Shemesh wrote:

>> sun at sun:~/sources/wine/threadtest$ time ../wine/wine Debug/main.exe  
>> > /dev/null
>> Program exit 299732
> Just for comparison, when running on Windows, I get as far as 298015, 
> but in less time.

Just for the record, if all the threads run to completion, and the mutex 
do their job, the number should have been 300000. Any other number seems 
to indicate that there was a problem with the mutex. If a mutex failed 
to be granted we should have seen messages, which didn't happen either.

This problem is for both Windows AND wine. I can only deduct that I'm 
doing something wrong. Maybe named mutexes are not shared like I thought 
they are? When I try to create the mutex only once and share the handle 
I get a lot of failed locking responses, also on Windows. Then again, 
when I use the original code, even on windows, the number is not a 
multiple of 1000, which suggests that not all increments happened.

The only explanation is that there is a bug in the win32 code. But what?


Shachar Shemesh
Lingnu Open Source Consulting ltd.

More information about the wine-devel mailing list