Hi Fotis,
On Sat, Feb 18, 2017 at 01:55:41PM +0200, Fotis Panagiotopoulos wrote:
> Hi,
>
> To begin with, I do call sys_check_timeouts() very often. I also tried
> v2.0.1, where the problem vanishes. I believe it is fixed by the following
> addition:
>
> } else if (timeout->time > msecs) {
> /* If this is the case, 'timeouts_last_time' and 'now' differs too
> much.
> This can be due to sys_check_timeouts() not being called at the
> right
> times, but also when stopping in a breakpoint. Anyway, let's
> assume
> this is not wanted, so add the first timer's time instead of
> 'diff' */
> timeout->time = msecs + next_timeout->time;
> }
> timeout->next = t->next;
>
> which looks more like a work-around for me, rather an actual fix.You can only enter that if your main timer continue to run while your system is suspended (eg. waiting on a breakpoint while debugging on a desktop computer), this is a work-around to help us using debuggers. Systems that suspend should call sys_restart_timeouts() on resume to prevent that. Otherwise it means you do not call sys_check_timeouts() at an acceptable rate or your sys_now() function is buggy. Sylvain
signature.asc
Description: Digital signature
_______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
