This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: 1.5.18: pthread_cond_wait() can return ETIMEDOUT too early
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 5 Aug 2005 13:32:04 +0200
- Subject: Re: 1.5.18: pthread_cond_wait() can return ETIMEDOUT too early
- References: <e2e10826050804065723859878@mail.gmail.com>
- Reply-to: cygwin at cygwin dot com
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@cygwin.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/