lwip-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-commits] [SCM] lwIP Contrib - Contributed code for Lightweight


From: address@hidden
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:00:57 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]