mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-29 00:32:51 +00:00
Added an overridable define to get informed when the tcpip_thread processes messages or timeouts to implement a watchdog.
This commit is contained in:
parent
3347762df3
commit
2e18a9be63
@ -13,6 +13,10 @@ HISTORY
|
|||||||
|
|
||||||
++ New features:
|
++ New features:
|
||||||
|
|
||||||
|
2010-04-14: Simon Goldschmidt
|
||||||
|
* tcpip.h/.c, timers.c: Added an overridable define to get informed when the
|
||||||
|
tcpip_thread processes messages or timeouts to implement a watchdog.
|
||||||
|
|
||||||
2010-03-28: Simon Goldschmidt
|
2010-03-28: Simon Goldschmidt
|
||||||
* ip_frag.c: create a new (contiguous) PBUF_RAM for every outgoing
|
* ip_frag.c: create a new (contiguous) PBUF_RAM for every outgoing
|
||||||
fragment if LWIP_NETIF_TX_SINGLE_PBUF==1
|
fragment if LWIP_NETIF_TX_SINGLE_PBUF==1
|
||||||
|
@ -83,6 +83,7 @@ tcpip_thread(void *arg)
|
|||||||
LOCK_TCPIP_CORE();
|
LOCK_TCPIP_CORE();
|
||||||
while (1) { /* MAIN Loop */
|
while (1) { /* MAIN Loop */
|
||||||
UNLOCK_TCPIP_CORE();
|
UNLOCK_TCPIP_CORE();
|
||||||
|
LWIP_TCPIP_THREAD_ALIVE();
|
||||||
/* wait for a message, timeouts are processed while waiting */
|
/* wait for a message, timeouts are processed while waiting */
|
||||||
sys_timeouts_mbox_fetch(&mbox, (void **)&msg);
|
sys_timeouts_mbox_fetch(&mbox, (void **)&msg);
|
||||||
LOCK_TCPIP_CORE();
|
LOCK_TCPIP_CORE();
|
||||||
|
@ -467,6 +467,7 @@ sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
|
|||||||
h(arg);
|
h(arg);
|
||||||
UNLOCK_TCPIP_CORE();
|
UNLOCK_TCPIP_CORE();
|
||||||
}
|
}
|
||||||
|
LWIP_TCPIP_THREAD_ALIVE();
|
||||||
|
|
||||||
/* We try again to fetch a message from the mbox. */
|
/* We try again to fetch a message from the mbox. */
|
||||||
goto again;
|
goto again;
|
||||||
|
@ -48,6 +48,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** Define this to something that triggers a watchdog. This is called from
|
||||||
|
* tcpip_thread after processing a message. */
|
||||||
|
#ifndef LWIP_TCPIP_THREAD_ALIVE
|
||||||
|
#define LWIP_TCPIP_THREAD_ALIVE()
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LWIP_TCPIP_CORE_LOCKING
|
#if LWIP_TCPIP_CORE_LOCKING
|
||||||
/** The global semaphore to lock the stack. */
|
/** The global semaphore to lock the stack. */
|
||||||
extern sys_mutex_t lock_tcpip_core;
|
extern sys_mutex_t lock_tcpip_core;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user