Hi,

attached to this email you find a patch against git revision
ced2f3438fb1c333cd582a7d944d524b56ba0ef3, fixing a problem on machines with
more than one CPU (I did not test if single-machine computers are also
affected, though) running NetBSD (other systems might be affected, too).

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.
Therefore, I implemented a function which checks if the timeout has already
happened and calls pthread_cond_timedwait again if it has not.

This behaviour of pthread_cond_timedwait is documented in its manpage (the
linux manpage of pthread_cond_timedwait is much more helpful than the one
delivered with NetBSD in this case).

So, please merge this commit for the next release.

Best regards,
Michael

Attachment: 0001-Bugfix-spurious-wakeups.patch
Description: Binary data

_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd

Reply via email to