1.5.18: pthread_cond_wait() can return ETIMEDOUT too early

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Aug 5 11:32:00 GMT 2005


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/



More information about the Cygwin mailing list