Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 5 Aug 2005 13:32:04 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.5.18: pthread_cond_wait() can return ETIMEDOUT too early Message-ID: <20050805113204.GD14783@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i On Aug 4 15:57, Bart Van Assche wrote: > Hello, > > For me it is convenient to call pthread_cond_timedwait() to > specify { 0x7fffffff, 0 } as the deadline instead of calling > pthread_cond_wait(). Apparently this works with the Linux > implementation of pthread_cond_timedwait() I tried, but not with > Cygwin's implementation. I had a look at Cygwin's implementation > (winsup/cygwin/thread.c version 1.190), and I expect that this bug is > caused by an arithmetic overflow during the conversion of the timespec > deadline into a signed 32-bit timeout in milliseconds. Thanks for the testcase. I've applied a patch to current CVS which should avoid overflow problems. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/