delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/26/16:52:17

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 26 Jul 2001 16:47:55 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: Pieter de Visser <pieterdv AT knoware DOT nl>
Cc: cygwin AT cygwin DOT com
Subject: Re: Bug in pthread_equal
Message-ID: <20010726164755.A21564@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: Pieter de Visser <pieterdv AT knoware DOT nl>, cygwin AT cygwin DOT com
References: <996153772 DOT 3b6019acb988c AT webmail3 DOT ision DOT nl>
Mime-Version: 1.0
User-Agent: Mutt/1.3.11i
In-Reply-To: <996153772.3b6019acb988c@webmail3.ision.nl>; from pieterdv@knoware.nl on Thu, Jul 26, 2001 at 03:22:52PM +0200

On Thu, Jul 26, 2001 at 03:22:52PM +0200, Pieter de Visser wrote:
>There seems to be a bug in pthread_equal:
>
>    int pthread_equal(pthread_t t1, pthread_t t2)
>
>should return a non-zero value if t1 and t2 refer to the same thread, and a 
>zero value otherwise. With the Cygwin DLL 1.3.2 implementation, it is the other 
>way around: the function returns zero if t1 and t2 refer to the same thread, 
>and a non-zero value otherwise.
>
>One way to solve this would be to change
>cygwin-1.3.2-1/winsup/cygwin/thread.cc, at line 1811: replace 
>
>int
>__pthread_equal (pthread_t * t1, pthread_t * t2)
>{
>  return (*t1 - *t2);
>}
>
>with
>
>int
>__pthread_equal (pthread_t * t1, pthread_t * t2)
>{
>  return (*t1 == *t2);
>}

Looks right to me.  I've applied this change.

Thanks for tracking it down.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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