tried to add basic socket unit tests (nonsense only for now); made LOCK_TCPIP_CORE()/UNLOCK_TCPIP_CORE() overridable for that

This commit is contained in:
goldsimon
2017-03-16 21:52:30 +01:00
parent 2d8e17aa89
commit 8313c4d870
7 changed files with 488 additions and 4 deletions

View File

@@ -50,12 +50,14 @@ extern "C" {
#endif
#if LWIP_TCPIP_CORE_LOCKING
#ifndef LOCK_TCPIP_CORE
/** The global semaphore to lock the stack. */
extern sys_mutex_t lock_tcpip_core;
/** Lock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */
#define LOCK_TCPIP_CORE() sys_mutex_lock(&lock_tcpip_core)
/** Unlock lwIP core mutex (needs @ref LWIP_TCPIP_CORE_LOCKING 1) */
#define UNLOCK_TCPIP_CORE() sys_mutex_unlock(&lock_tcpip_core)
#endif
#else /* LWIP_TCPIP_CORE_LOCKING */
#define LOCK_TCPIP_CORE()
#define UNLOCK_TCPIP_CORE()