Move some definitions from tcpip_priv.h to better places since they are of "public interest" (LWIP core locking mode, watchdog trigger)

This commit is contained in:
Dirk Ziegelmeier 2016-04-23 10:24:17 +02:00
parent 4d1a2e6699
commit b8b83c2994
3 changed files with 18 additions and 16 deletions

View File

@ -1371,6 +1371,14 @@
#define TCPIP_MBOX_SIZE 0
#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
/**
* SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread.
*/

View File

@ -47,22 +47,6 @@ extern "C" {
struct pbuf;
struct netif;
/** 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
/** The global semaphore to lock the stack. */
extern sys_mutex_t lock_tcpip_core;
#define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core)
#define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core)
#else /* LWIP_TCPIP_CORE_LOCKING */
#define LOCK_TCPIP_CORE()
#define UNLOCK_TCPIP_CORE()
#endif /* LWIP_TCPIP_CORE_LOCKING */
#if LWIP_MPU_COMPATIBLE
#define API_VAR_REF(name) (*(name))
#define API_VAR_DECLARE(type, name) type * name

View File

@ -44,6 +44,16 @@
extern "C" {
#endif
#if LWIP_TCPIP_CORE_LOCKING
/** The global semaphore to lock the stack. */
extern sys_mutex_t lock_tcpip_core;
#define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core)
#define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core)
#else /* LWIP_TCPIP_CORE_LOCKING */
#define LOCK_TCPIP_CORE()
#define UNLOCK_TCPIP_CORE()
#endif /* LWIP_TCPIP_CORE_LOCKING */
struct pbuf;
struct netif;