patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8712, Allow custom timing implementation...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8712: Allow custom timing implementation on NO_SYS builds

Submitter:  Michael Steinberg <decimad>
Submitted:  Sat 08 Aug 2015 10:20:23 PM UTC
   
 
Category:  Platform ports Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Wed 27 Jul 2016 08:14:00 PM UTC, comment #4: 

I've added LWIP_TIMERS_CUSTOM, which leaves the timeouts function prototypes but removes the implementation, so independent of the NO_SYS setting, you're now free to provide your own timeout implementation.

Thanks for the hint.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 10 Sep 2015 09:36:30 PM UTC, comment #3: 

Agreed, that's the answer I actually expected ;-), I will let Simon decide then.

Sylvain Rochet <gradator>
Group Member
Thu 10 Sep 2015 08:19:28 PM UTC, comment #2: 

Well, the advantage would be (well, here it is already), there are not two systems running alongside for the same purpose plus a more stringent code on the loop. This shaves off a few text bytes, bss bytes and cycles too, especially considering the current implementation...

Michael Steinberg <decimad>
Thu 10 Sep 2015 07:49:07 PM UTC, comment #1: 

Hi,

I don't see the clear advantage of doing that, is the following unacceptable for you:

while(1) {
  /* get the lowest timeout for lwIP timeouts and yours timeouts */
  uint32_t timeout = MIN(sys_timeouts_sleeptime(), yours_timeouts_sleeptime());
  select-like-function(......, timeout);
  sys_check_timeouts();   /* run lwIP timeouts */
  yours_check_timeouts(); /* run yours timeouts */
}

Sylvain

Sylvain Rochet <gradator>
Group Member
Sat 08 Aug 2015 10:20:23 PM UTC, original submission:  

Hi, I found it to be advantageous to roll my own "tcpip"-thread, using LWIP in its NO_SYS configuration. However it would still implement a kind of timing system, so I made the few changes necessary to implement the timing externally. I'm no great C coder, so this is only meant as a basis for discussion.

Kind Regards

Michael Steinberg <decimad>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #34610:  custom_timers.patch added by decimad (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by gradator (Posted a comment)
  • -email is unavailable- added by decimad (Submitted the item)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-27 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2015-08-08 decimad Attached File- Added custom_timers.patch, #34610

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code