Fix and improve sockets unit test and unit test sys_arch (with a little help of tcpip.c)

This commit is contained in:
goldsimon
2017-03-16 22:49:38 +01:00
parent 8313c4d870
commit fc47f846ed
6 changed files with 170 additions and 54 deletions

View File

@@ -50,14 +50,12 @@ 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()
@@ -99,6 +97,10 @@ 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 && LWIP_TIMERS */
#ifdef TCPIP_THREAD_TEST
int tcpip_thread_poll_one(void);
#endif
#ifdef __cplusplus
}
#endif