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

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

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