This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: pthread_mutex_init fails
- From: egor duda <deo at logos-m dot ru>
- To: cygwin-developers at cygwin dot com
- Date: Sun, 18 Nov 2001 17:42:49 +0300
- Subject: Re: pthread_mutex_init fails
- Organization: deo
- References: <200111171814.MAA29795@duracef.shout.net><20011117194703.GA27975@redhat.com> <2615386444.20011118002102@logos-m.ru><028f01c1702f$d438a360$0200a8c0@lifelesswks><19373219704.20011118162457@logos-m.ru><00c501c17037$188e84b0$0200a8c0@lifelesswks>
- Reply-to: egor duda <cygwin-developers at cygwin dot com>
[Get raw message]
Hi!
just to make it clear what we're talking about:
===================================================================
----- Original Message -----
From: "egor duda" <deo@logos-m.ru>
Subject: Re: pthread_mutex_init fails
i believe we have one more known problem problem in pthread
code -- see this thread http://sources.redhat.com/ml/cygwin-patches/2001-q4/msg00224.html
for details. it looks like this patch fixes things:
2001-11-18 Egor Duda <deo@logos-m.ru>
* thread.cc (pthread_cond::Signal): Check for correct number
of waiting threads.
Index: thread.cc
===================================================================
RCS file: /cvs/uberbaum/winsup/cygwin/thread.cc,v
retrieving revision 1.54
diff -u -p -2 -r1.54 thread.cc
--- thread.cc 2001/11/15 11:10:38 1.54
+++ thread.cc 2001/11/17 21:16:12
@@ -506,5 +506,5 @@ pthread_cond::Signal ()
*/
int spins = 10;
- while (InterlockedIncrement (&waiting) != (temp - 1) && spins)
+ while (InterlockedIncrement (&waiting) != temp && spins)
{
InterlockedDecrement (&waiting);
feel free to apply it if you think it's correct. after this patch only
one thread is waken up when condvar is signalled.
===================================================================
RC> ----- Original Message -----
RC> From: "egor duda" <deo@logos-m.ru>
>> the problem remains that the patched code still won't work on w95, but
>> the current code doesn't work at all!
RC> The current code should run fine on w95 and 2k - it did for me before
RC> committing it 0 I tested on both 9x and 2k.
RC> However the bug is likely the cause for Jasons continued python
RC> failures.
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19