tcpip: ensure core is locked for init done function

This ensures the core is locked when executing the init done function
passed to tcpip_init

The could manifest as a synchronization issue during early init if
another thread was in the LwIP context at the same time
This commit is contained in:
Joel Cunningham 2018-01-02 13:44:34 -06:00
parent d87740bb96
commit d569a22c73

View File

@ -93,11 +93,11 @@ tcpip_thread(void *arg)
LWIP_MARK_TCPIP_THREAD();
LOCK_TCPIP_CORE();
if (tcpip_init_done != NULL) {
tcpip_init_done(tcpip_init_done_arg);
}
LOCK_TCPIP_CORE();
while (1) { /* MAIN Loop */
LWIP_TCPIP_THREAD_ALIVE();
/* wait for a message, timeouts are processed while waiting */