Re: [collectd] [PATCH] Bugfix: correctly handle spurious wakeups in pthread_cond_timedwait

2010-02-25 Thread Florian Forster
Hi Michael,

On Wed, Feb 10, 2010 at 03:42:11PM +0100, Michael Stapelberg wrote:
 C99 also includes stdbool.h, which defines bool as an alias for _Bool.

I know, but iIrc we've had problems with stdbool.h in the past. Some -
arguably broken - libraries define true and false themselves. So I
prefer to stick to the standard which I hope to be the most reasonable
thing..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/


signature.asc
Description: Digital signature
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] [PATCH] Bugfix: correctly handle spurious wakeups in pthread_cond_timedwait

2010-02-10 Thread Florian Forster
Hi Michael,

On Sat, Feb 06, 2010 at 04:22:16PM +0100, Michael Stapelberg wrote:
 The problem was that pthread_cond_timedwait was used to sleep for a
 specific amount of time. However, spurious wakeups may happen and thus
 pthread_cond_timedwait may return without the timeout having actually
 passed.

thanks for the patch :) I've applied it to the collectd-4.8 branch, so
the next patch releases will include this fix.

I've done a minor modification: Rather than using bool I've changed
the timeout_reached to return _Bool which is a basic data type in
C99.

Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/


signature.asc
Description: Digital signature
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] [PATCH] Bugfix: correctly handle spurious wakeups in pthread_cond_timedwait

2010-02-10 Thread Michael Stapelberg
Hi Florian,

Thanks for merging.

Excerpts from Florian Forster's message of Mi Feb 10 12:22:10 +0100 2010:
 I've done a minor modification: Rather than using bool I've changed
 the timeout_reached to return _Bool which is a basic data type in
 C99.
C99 also includes stdbool.h, which defines bool as an alias for _Bool.
So you did not need to change that, and bool is more readable than _Bool
IMO ;-). But I don’t want to start a discussion on code style, I just
wanted to make sure you know about stdbool.h. So feel free to leave it
like it is or change it.

Best regards,
Michael

___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd