[Top][All Lists]

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

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

From: Joel Cunningham
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, 02 Jan 2018 12:33:51 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2


I think there is an issue with the test implementation for win32:

    LWIP_ASSERT("Function called without core lock", (current_thread_id == lwip_tcpip_thread_id) || lwip_core_locked);
    LWIP_ASSERT("Function called from wrong thread", current_thread_id == lwip_tcpip_thread_id);

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.  If the TCPIP thread is in code that requires the core lock, it should have it reserved otherwise there is a synchronization issue.  This was exactly what was happening with bug #52719 and due to the win32 implementation, why you aren't seeing assertions fail in sys_check_timeouts and sys_timeouts_sleeptime in your test environments.

For my embedded test platform, I've implemented the assertion checking by only examining if the core lock is held, which showed the problems in bug #52719 and also some other problems with tcpip_init() and executing the initfunc (which currently does not have the core lock held).


On 1/2/2018 7:07 AM, Dirk Ziegelmeier wrote:
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "lwIP Contrib - Contributed code for Lightweight TCP/IP stack".

The branch, master has been updated
        via  4c854d49bc7ae35b73fa70d0f284766eea74bfb9 (commit)
       from  a334ca484ae8577de5421fc0caf8197d3e5c2fdc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4c854d49bc7ae35b73fa70d0f284766eea74bfb9
Author: Dirk Ziegelmeier <address@hidden>
Date:   Tue Jan 2 14:07:34 2018 +0100

     Work on task #14780: Add debug helper asserts to ensure threading/locking 
requirements are met
     Extend checks to support LWIP_TCPIP_CORE_LOCKING


Summary of changes:
  ports/win32/include/lwipopts.h | 13 ++++++++++---
  ports/win32/sys_arch.c         | 23 ++++++++++++++++++-----
  2 files changed, 28 insertions(+), 8 deletions(-)


reply via email to

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