Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 11 months ago
parent
commit
d5adfdeb18
  1. 4
      Changes
  2. 16
      ev.c

4
Changes

@ -3,6 +3,10 @@ Revision history for libev, a high-performance and full-featured event loop.
TODO: for next ABI/API change, consider moving EV__IOFDSSET into io->fd instead and provide a getter.
TODO: document EV_TSTAMP_T
- due to a logic bug, timerfd availability did not always translate
into fewer wakeups - libev is now more aggressive in using
longer sleeps, even when timerfd is not in use.
4.33 Wed Mar 18 13:22:29 CET 2020
- no changes w.r.t. 4.32.

16
ev.c

@ -4094,17 +4094,19 @@ ev_run (EV_P_ int flags)
{
waittime = EV_TS_CONST (MAX_BLOCKTIME);
if (ecb_expect_true (have_monotonic))
{
#if EV_USE_TIMERFD
/* sleep a lot longer when we can reliably detect timejumps */
if (ecb_expect_true (timerfd >= 0))
waittime = EV_TS_CONST (MAX_BLOCKTIME2);
/* sleep a lot longer when we can reliably detect timejumps */
if (ecb_expect_true (timerfd != -1))
waittime = EV_TS_CONST (MAX_BLOCKTIME2);
#endif
#if !EV_PERIODIC_ENABLE
/* without periodics but with monotonic clock there is no need */
/* for any time jump detection, so sleep longer */
if (ecb_expect_true (have_monotonic))
waittime = EV_TS_CONST (MAX_BLOCKTIME2);
/* without periodics but with monotonic clock there is no need */
/* for any time jump detection, so sleep longer */
waittime = EV_TS_CONST (MAX_BLOCKTIME2);
#endif
}
if (timercnt)
{

Loading…
Cancel
Save