mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-19 22:56:57 +08:00
Added an option to disable tcpip_(un)timeout code since the linker cannot do this automatically to save space.
This commit is contained in:
@@ -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 ----------
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user