lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #52748] the bug in timeouts.c


From: Douglas
Subject: [lwip-devel] [bug #52748] the bug in timeouts.c
Date: Mon, 8 Jan 2018 03:52:22 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

Follow-up Comment #18, bug #52748 (project lwip):

Thank you for morning it forward.

> Fix that one of Douglas' optimizations broke the timers

That is not a fair attribution, my version used:
TIME_LESS_THAN(now, tmptimeout->time)
which was broken when it was replaced with:
TIME_LESS_THAN_OR_EQUAL_THAN(now, tmptimeout->time)
and then just fixed by changing it to:
TIME_LESS_THAN_OR_EQUAL_THAN(tmptimeout->time, now) == 0
which is equivalent to my version but more convoluted.

A similar problem was introduced in sys_timeout, where if the times are equal
the new timeout is place first, not FIFO, which does not seem best and is a
change from the prior code.

The use in sys_timeouts_sleeptime does not care if it returns true or false
when they are equal, so it can be TIME_LESS_THAN as-is.

So perhaps consider taking another look at just using the simpler
TIME_LESS_THAN.

> Make _cyclic_ timers interval more deterministic - next timeout is
calculated from last due time instead of relative to current time. This
eliminates the cyclic timer jitter

The cyclic timer fixes do not appear to have made it, they are still broken.
Need to be able to set a timeout at an absolute time, not just at an offset in
msec from sys_now(), so need a new function.



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?52748>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]