[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Debugging a hang in an lwIP-based application
From: |
Sergio R. Caprile |
Subject: |
Re: [lwip-users] Debugging a hang in an lwIP-based application |
Date: |
Fri, 22 Feb 2019 10:23:08 -0300 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Unfortunately I only know the RAW API and can't help you further. Did
you check the basics ?:
- core lwIP runs in a single thread. If your Ethernet is handled in
another thread, you don't call any lwIP functions from there, except for
the pbuf allocation/free functions; you queue your packets and the core
lwIP thread (tcpip_thread) will take them out of the queue and handle
them later.
- "one thread per socket", quote: "Netconn or Socket API functions are
thread safe against the core thread but they are not reentrant at the
control block granularity level. That is, a UDP or TCP control block
must not be shared among multiple threads without proper locking."
https://www.nongnu.org/lwip/2_1_x/multithreading.html
This is as far as I can go.