[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] pthread_cond_timedwait realtime clock race



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I can try to come up with a patch soon. I'll post it in this thread
once done for review.

Thanks!
David

Nick Mathewson:
> On Tue, Sep 18, 2012 at 4:14 PM, David Goulet <dgoulet@xxxxxxxxx>
> wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
>> 
>> Hi everyone,
>> 
>> I'm David from the LTTng project (http://lttng.org). I'm sharing
>> here an issue we ran into. The solution could benefit the
>> libevent project.
> 
> Hi, and thanks for the heads-up!
> 
> [...]
>> After some research, we discovered a fantastic call, 
>> pthread_condattr_setclock() which can be used to set the
>> condition to use the CLOCK_MONOTONIC hence having the guarantee
>> to never jump in time between calls.
> [...]
> 
> It looks like the only current user of a timed wait function in 
> Libevent is the unit tests.  That doesn't mean we shouldn't fix
> this, though.  Anybody want to come up with a patch?
> 
> yrs,
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJQWgMkAAoJEELoaioR9I02RvsIALYm662CsPJLiz+XbD3NU/hi
D6MBHQqRg3c30lCwafB0/JyPlpQiF1zxs2ri1Em3Y+2GZRHv9VeEB0JAIYq0Sz6s
MF6lQM5HNP06uHixLqnPmqfntUZXuzsHE01GZjU7RlWOPZ0swtSSpMqkD0xqMPpx
5PGHsivu1eyD2ifjg1gg30WAbnZ+JR4Pb/Xfb9ADGM4JjFMQEuAI12Otp84CnHJA
pWyy0vd5S3/goeqjJ2GhvgSDIJkBX1RgTvO7TbcnRDiKr1E6vz+GR53vm4JQCA52
4cAZuDouEAa95/7d67rXDrD7TPH39kWSq1/Az+kDTxwTB7n6x/NQqmus/mf0PMA=
=NNOg
-----END PGP SIGNATURE-----
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.