mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-19 22:56:57 +08:00
From patch #7221: added flag NO_SYS_NO_TIMERS to drop timer support for NO_SYS==1 for easier upgrading
This commit is contained in:
@@ -71,7 +71,9 @@ LWIP_MEMPOOL(ARP_QUEUE, MEMP_NUM_ARP_QUEUE, sizeof(struct etharp_q_en
|
||||
LWIP_MEMPOOL(IGMP_GROUP, MEMP_NUM_IGMP_GROUP, sizeof(struct igmp_group), "IGMP_GROUP")
|
||||
#endif /* LWIP_IGMP */
|
||||
|
||||
#if LWIP_TIMERS
|
||||
LWIP_MEMPOOL(SYS_TIMEOUT, MEMP_NUM_SYS_TIMEOUT, sizeof(struct sys_timeo), "SYS_TIMEOUT")
|
||||
#endif /* LWIP_TIMERS */
|
||||
|
||||
#if LWIP_SNMP
|
||||
LWIP_MEMPOOL(SNMP_ROOTNODE, MEMP_NUM_SNMP_ROOTNODE, sizeof(struct mib_list_rootnode), "SNMP_ROOTNODE")
|
||||
|
||||
@@ -68,6 +68,14 @@
|
||||
#define NO_SYS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1
|
||||
* Mainly for compatibility to old versions.
|
||||
*/
|
||||
#ifndef NO_SYS_NO_TIMERS
|
||||
#define NO_SYS_NO_TIMERS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* MEMCPY: override this if you have a faster implementation at hand than the
|
||||
* one included in your C library
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
/* Timers are not supported when NO_SYS==1 and NO_SYS_NO_TIMERS==1 */
|
||||
#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS))
|
||||
|
||||
#if LWIP_TIMERS
|
||||
|
||||
#include "lwip/err.h"
|
||||
#include "lwip/sys.h"
|
||||
|
||||
@@ -89,4 +94,5 @@ void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_TIMERS */
|
||||
#endif /* __LWIP_TIMERS_H__ */
|
||||
|
||||
Reference in New Issue
Block a user