lwIP - A Lightweight TCP/IP stack - Patches: patch #7855, Provide alternative timeout...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7855: Provide alternative timeout implementation
Submitter: | James Smith <rallysmith> | ||
Submitted: | Thu 27 Sep 2012 03:36:58 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Wont Do | Privacy: | Public |
Assigned to: | None | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Fri 26 Oct 2018 05:36:06 PM UTC, comment #11: |
Simon Goldschmidt <goldsimon> |
Sun 09 Aug 2015 06:15:20 PM UTC, comment #10: Oh, another idea might be to let the timer handler function return a new timeout (or 0/UINT_MAX/...) rather than re-registering. It seems reasonable to store timeout timers in a heap, in which case one could reuse the spot and sift-down instead of pop+push. But that's maybe just a micro-optimization ;) |
Michael Steinberg <decimad> |
Sat 08 Aug 2015 10:13:44 PM UTC, comment #9: Hello,
|
Michael Steinberg <decimad> |
Mon 16 Feb 2015 10:22:31 AM UTC, comment #8:
|
James Smith <rallysmith> |
Mon 16 Feb 2015 10:02:59 AM UTC, comment #7:
|
Simon Goldschmidt <goldsimon> |
Mon 16 Feb 2015 09:11:45 AM UTC, comment #6:
|
James Smith <rallysmith> |
Sun 15 Feb 2015 10:00:59 AM UTC, comment #5: going back to cyclic timers would make it harder to run lwip in setups where sleep is actually spent in hardware sleep with a configured interrupt.
|
chrysn <chrysn> |
Fri 13 Feb 2015 09:04:46 PM UTC, comment #4: Without digging too much into the patch again: by now I'd prefer a more generic approach where stack-internal timers that are all cyclic timers (all the timeout functions implemented in timers.c are) can be set up really cyclic by the port (e.g. providing a constant table of cyclic timers to the port at stack startup).
|
Simon Goldschmidt <goldsimon> |
Thu 21 Nov 2013 09:26:09 AM UTC, comment #3: @comparison: `endtime <= now` does not catch the case when now is before the timer wrap and endtime is after. you'd have to do at least `(endtime > last_time_i_checked && endtime <= now) || (last_time_i_checked > now && endtime <= now)` -- or map times back to be deltas again internally, so that a subtraction operation will take care of the wraps.
|
chrysn <chrysn> |
Thu 21 Nov 2013 09:15:30 AM UTC, comment #2: I do not see the "one-sided/two-sided comparison" point. Doing "endtime <= now" is only a single comparison in the timeout list processing.
|
James Smith <rallysmith> |
Thu 21 Nov 2013 08:09:43 AM UTC, comment #1: i thnk that a relative timeout scheme is better suited for timeouts, as it is easier to work with relative values in remainder class arithmetics. (by forming a delta, you only need a one-side comparison ("is it due yet?") as opposed to a two-side "is this timeout in the window i'm now working off?" comparison).
|
chrysn <chrysn> |
Thu 27 Sep 2012 03:36:58 PM UTC, original submission:
Attached is a patch that implements an absolute end-time based timeout scheme. It is a large-ish patch, but is a NOP if the relevant "lwipopts.h" options are not defined.
|
James Smith <rallysmith> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-10-26 | goldsimon | Status | None | Wont Do | |
Open/Closed | Open | Closed | |||
2012-09-27 | rallysmith | Attached File | - | Added timeouts_absolute_endtime.patch, #26659 |
Powered by Savane 3.13-f8d8.
Corresponding source code
I don't think we need this any more, timeouts have changed since then.