This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.5.18: pthread_cond_wait() can return ETIMEDOUT too early


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]