delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/11/18/09:43:55

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Sun, 18 Nov 2001 17:42:49 +0300
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.53 RC/4)
Reply-To: egor duda <cygwin-developers AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <1723856675.20011118174249@logos-m.ru>
To: cygwin-developers AT cygwin DOT com
Subject: Re: pthread_mutex_init fails
In-Reply-To: <00c501c17037$188e84b0$0200a8c0@lifelesswks>
References: <200111171814 DOT MAA29795 AT duracef DOT shout DOT net>
<20011117194703 DOT GA27975 AT redhat DOT com> <2615386444 DOT 20011118002102 AT logos-m DOT ru>
<028f01c1702f$d438a360$0200a8c0 AT lifelesswks>
<19373219704 DOT 20011118162457 AT logos-m DOT ru>
<00c501c17037$188e84b0$0200a8c0 AT lifelesswks>
MIME-Version: 1.0

Hi!

just to make it clear what we're talking about:

===================================================================
----- Original Message -----
From: "egor duda" <deo AT logos-m DOT 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 AT logos-m DOT 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 AT logos-m DOT 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 AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019