[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] opt.h - LWIP_EVENT_API
From: |
Bill Auerbach |
Subject: |
RE: [lwip-devel] opt.h - LWIP_EVENT_API |
Date: |
Mon, 6 Dec 2010 12:16:40 -0500 |
I guess I feel compelled to ask, why doesn't the code just use
#if ! LWIP_EVENT_API
Where it uses
#if LWIP_CALLBACK_API
This is only used for TCP. Tcp_impl.h could be the owner who defines
LWIP_CALLBACK_API (to ! LWIP_EVENT_API).
>I don't like that. How about
>
>#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API)
>#define LWIP_EVENT_API 0
>#define LWIP_CALLBACK_API 1
>#endif
That's fine and the check in init.c will find any inconsistency.
I might be wrong here but I think if one saves opts.h as lwipopts.h (and
changes the multiple #include check) that lwIP should build.
>(or the other way around, I'm not sure which is the most sensible
>default)
I've often wondered the breakdown of users with NO_SYS = 1 and NO_SYS = 0.
I'm not sure the default matter too much.
Why isn't it:
#define LWIP_EVENT_API (! NO_SYS)
#define LWIP_CALLBACK_API (NO_SYS)
Bill