lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] core/timers.c with NO_SYS?


From: Simon Goldschmidt
Subject: Re: [lwip-devel] core/timers.c with NO_SYS?
Date: Sat, 11 Jun 2011 11:08:59 +0200

Leon Woestenberg <address@hidden>:

> Hello Simon,
> 
> I see you are working on a timers.c implementation in core/.
> 
> There is no sys_now() definition for minimal systems (without the
> system abstraction layer), so this currently does not compile for me:
> 
> #if NO_SYS
>  /* Initialise timestamp for sys_check_timeouts */
>  timeouts_last_time = sys_now();
> #endif
> 
> As core/timers.c seems a core API it must not rely on the availability
> of the system layer, i.e. the core functionality must work with
> NO_SYS.
> Is that assured?

Yes that's assured. Maybe the function name is not ideal, but whatever the 
NO_SYS setting is, sys_now() is a port-defined function that should return the 
'uptime' in milliseconds. Implementing this function is a new requirement for 
1.4.0 ports which want to use the timers.c NO_SYS implementation (or PPP, by 
the way), which is probably why it doesn't compile for you.

Anyway, users are free to use the old (self-implemented) way to call the timer 
functions at the right interval by setting the appropriate define to off 
(sorry, I don't have access the sources right now to see which define that was).

Simon
> 



reply via email to

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