mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00: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:
parent
6929a786aa
commit
7d604a23f0
@ -225,6 +225,10 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2010-06-24: Simon Goldschmidt
|
||||
* init.c, timers.c/.h, opt.h, memp_std.h: From patch #7221: added flag
|
||||
NO_SYS_NO_TIMERS to drop timer support for NO_SYS==1 for easier upgrading
|
||||
|
||||
2010-06-24: Simon Goldschmidt
|
||||
* api(_lib).c/.h, api_msg.c/.h, sockets.c/.h: Fixed bug #10088: Correctly
|
||||
implemented shutdown at socket level.
|
||||
|
@ -145,7 +145,7 @@
|
||||
#error "One and exactly one of LWIP_EVENT_API and LWIP_CALLBACK_API has to be enabled in your lwipopts.h"
|
||||
#endif
|
||||
/* There must be sufficient timeouts, taking into account requirements of the subsystems. */
|
||||
#if (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT))
|
||||
#if LWIP_TIMERS && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT))
|
||||
#error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts"
|
||||
#endif
|
||||
#if (IP_REASSEMBLY && (MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS))
|
||||
@ -261,7 +261,9 @@ lwip_init(void)
|
||||
|
||||
/* Modules initialization */
|
||||
stats_init();
|
||||
#if !NO_SYS
|
||||
sys_init();
|
||||
#endif /* !NO_SYS */
|
||||
mem_init();
|
||||
memp_init();
|
||||
pbuf_init();
|
||||
@ -295,5 +297,7 @@ lwip_init(void)
|
||||
dns_init();
|
||||
#endif /* LWIP_DNS */
|
||||
|
||||
#if LWIP_TIMERS
|
||||
sys_timeouts_init();
|
||||
#endif /* LWIP_TIMERS */
|
||||
}
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#include "lwip/timers.h"
|
||||
|
||||
#if LWIP_TIMERS
|
||||
|
||||
#include "lwip/def.h"
|
||||
#include "lwip/memp.h"
|
||||
#include "lwip/tcpip.h"
|
||||
@ -485,3 +488,11 @@ sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
|
||||
}
|
||||
|
||||
#endif /* NO_SYS */
|
||||
|
||||
#else /* LWIP_TIMERS */
|
||||
/* Satisfy the TCP code which calls this function */
|
||||
void
|
||||
tcp_timer_needed(void)
|
||||
{
|
||||
}
|
||||
#endif /* LWIP_TIMERS */
|
||||
|
@ -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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user