timers: rework the core locking around timers (bug #52719)

Want the core lock held while working on the timer data structures.
This commit is contained in:
Our Air Quality
2018-01-02 11:49:09 -06:00
committed by Joel Cunningham
parent 04b983b4f3
commit 53499f5e9f
2 changed files with 15 additions and 12 deletions

View File

@@ -99,11 +99,9 @@ tcpip_thread(void *arg)
LOCK_TCPIP_CORE();
while (1) { /* MAIN Loop */
UNLOCK_TCPIP_CORE();
LWIP_TCPIP_THREAD_ALIVE();
/* wait for a message, timeouts are processed while waiting */
TCPIP_MBOX_FETCH(&mbox, (void **)&msg);
LOCK_TCPIP_CORE();
if (msg == NULL) {
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n"));
LWIP_ASSERT("tcpip_thread: invalid message", 0);