|
From: | Dirk Ziegelmeier |
Subject: | Re: [lwip-commits] [SCM] lwIP Contrib - Contributed code for Lightweight TCP/IP stack branch, master, updated. STABLE-2_0_0_RELEASE-191-g4c854d4 |
Date: | Tue, 2 Jan 2018 21:08:00 +0100 |
Joel Cunningham wrote:
Dirk,
I think there is an issue with the test implementation for win32:
#if LWIP_TCPIP_CORE_LOCKING
LWIP_ASSERT("Function called without core lock", (current_thread_id
== lwip_tcpip_thread_id) || lwip_core_locked);
#else /* LWIP_TCPIP_CORE_LOCKING */
LWIP_ASSERT("Function called from wrong thread", current_thread_id
== lwip_tcpip_thread_id);
#endif /* LWIP_TCPIP_CORE_LOCKING */
For the LWIP_TCPIP_CORE_LOCKING case I don't think the assertion should
check if the current thread is the TCPIP thread, but rather always check
lwip_core_locked.
There's another issue here. The code in place checks that *any* thread has locked the core. Any other thread (or even an ISR) happening to call a function at that time passes the check... ;-)
Cheers,
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |