Added an option to disable tcpip_(un)timeout code since the linker cannot do this automatically to save space.

This commit is contained in:
goldsimon
2010-03-20 11:55:41 +00:00
parent 5fd410db4b
commit f70014b8ea
4 changed files with 22 additions and 1 deletions

View File

@@ -1321,6 +1321,13 @@
#define LWIP_NETCONN 1
#endif
/** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout tod create
* timers running in tcpip_thread from another thread.
*/
#ifndef LWIP_TCPIP_TIMEOUT
#define LWIP_TCPIP_TIMEOUT 1
#endif
/*
------------------------------------
---------- Socket options ----------

View File

@@ -96,8 +96,10 @@ err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t bloc
err_t pbuf_free_callback(struct pbuf *p);
err_t mem_free_callback(void *m);
#if LWIP_TCPIP_TIMEOUT
err_t tcpip_timeout(u32_t msecs, sys_timeout_handler h, void *arg);
err_t tcpip_untimeout(sys_timeout_handler h, void *arg);
#endif /* LWIP_TCPIP_TIMEOUT */
enum tcpip_msg_type {
#if LWIP_NETCONN
@@ -108,8 +110,10 @@ enum tcpip_msg_type {
TCPIP_MSG_NETIFAPI,
#endif /* LWIP_NETIF_API */
TCPIP_MSG_CALLBACK,
#if LWIP_TCPIP_TIMEOUT
TCPIP_MSG_TIMEOUT,
TCPIP_MSG_UNTIMEOUT
TCPIP_MSG_UNTIMEOUT,
#endif /* LWIP_TCPIP_TIMEOUT */
};
struct tcpip_msg {
@@ -130,11 +134,13 @@ struct tcpip_msg {
tcpip_callback_fn function;
void *ctx;
} cb;
#if LWIP_TCPIP_TIMEOUT
struct {
u32_t msecs;
sys_timeout_handler h;
void *arg;
} tmo;
#endif /* LWIP_TCPIP_TIMEOUT */
} msg;
};