mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
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:
parent
d87740bb96
commit
d569a22c73
@ -93,11 +93,11 @@ tcpip_thread(void *arg)
|
|||||||
|
|
||||||
LWIP_MARK_TCPIP_THREAD();
|
LWIP_MARK_TCPIP_THREAD();
|
||||||
|
|
||||||
|
LOCK_TCPIP_CORE();
|
||||||
if (tcpip_init_done != NULL) {
|
if (tcpip_init_done != NULL) {
|
||||||
tcpip_init_done(tcpip_init_done_arg);
|
tcpip_init_done(tcpip_init_done_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOCK_TCPIP_CORE();
|
|
||||||
while (1) { /* MAIN Loop */
|
while (1) { /* MAIN Loop */
|
||||||
LWIP_TCPIP_THREAD_ALIVE();
|
LWIP_TCPIP_THREAD_ALIVE();
|
||||||
/* wait for a message, timeouts are processed while waiting */
|
/* wait for a message, timeouts are processed while waiting */
|
||||||
|
Loading…
Reference in New Issue
Block a user