This is the mail archive of the cygwin-patches@cygwin.com 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]

Re: pthread_cond_timedwait, etc


On Mon, Jun 04, 2001 at 08:42:31PM +1000, Robert Collins wrote:
>----- Original Message -----
>From: "Robert Collins" <robert.collins@itdomain.com.au>
>
>> this may be an artifact of a particularly horrendous patch I had to
>> generate at one point. That does look buggy to me. Patch coming
>shortly.
>
>Patch attached at the end of the email. Thanks for catching that.
>pthread_cond_wait was also bust.
>
>> We could ignore it and return.. I'll try and get time to
>> check the spec and see if that's the expected behaviour. If it is,
>> consider that error a useful diagnostic for your code :].
>
>pthread_cond_broadcast is meant to never have an error, except when the
>condvariable is invalid. The attached patch fixs that little bit of
>bitrot as well. It snuck in from my test _verbose_ test code, and should
>have been trimmed back a little :]. You probably have code calling
>pthread_cond_broadcast to ensure that no threads are waiting when you
>exit the program.
>
>
>Changelog
>Mon Jun  4 20:39:00 2001  Robert Collins <rbtcollins@hotmail.com>
>
> * thread.cc (pthread_cond::Broadcast): Don't print error messages
> on invalid mutexs - user programs are allowed to call
> pthread_cond_broadcast like that.
> __pthread_cond_timedwait: Initialise themutex properly.
> __pthread_cond_wait: Initialise themutex properly.

Applied (after some ChangeLog tweaking).  Thanks.

cgf


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