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: Leon Woestenberg
Subject: Re: [lwip-devel] core/timers.c with NO_SYS?
Date: Sun, 12 Jun 2011 00:54:31 +0200

Hello Simon,

On Sat, Jun 11, 2011 at 11:08 AM, Simon Goldschmidt <address@hidden> wrote:
> Leon Woestenberg <address@hidden>:
>>
>> 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.
>

I still don't understand; how can it be we *must* implement a sys_arch
layer function when NO_SYS is set?

This makes a lower layer (the core API) depend on an optional higher
API abstraction layer (sys_arch). This breaks the architecture.

This probably explains why NO_SYS_NO_TIMERS is there.... core/timers.c
doesn't seem to be a core architecture module this way.

I think NO_SYS_NO_TIMERS should disappear, and the timers code should
still work with NO_SYS=1.


Regards,
-- 
Leon



reply via email to

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