I'm glad to hear from you.
I've found a raw function that is thread safe: tcpip_try_callback() function.
only the functions from these API header files are thread-safe: api.h, netbuf.h, netdb.h, netifapi.h, pppapi.h, sockets.h, sys.h.
I saw a note above the tcpip_try_callback() function, it said that the function can be called in interruption. However, tcpip_try_callback() function is not in the API header files mentioned above!
Maybe it's because the maintenance of the docs is a bit behind the updates to the code. I think we should go with source code and actual test results.
Netconn is not always thread safe.
Suppose there are two threads and one netconn, one thread receives through this net conn while another thread sends through this net conn, in this case netconn is not thread safe.
More details can be seen in this link:
https://lists.gnu.org/archive/html/lwip-users/2009-05/msg00049.html Last but not least, when you send an email to the lwip-user mail list, please follow these steps:
1. Edit the contacts to "
lwip-users@nongnu.org"
2. Edit the subject to the thread title that you want to join in or reply to. (This can make your mail be archived in the mail list in the same subject.)
3. Clear the content of the email if you send a new email by clicking the reply button. (This can make your email more readable.)
4. Just write what you want to write and send it.
Please don't reply to the lwip-users Digest mail directly or use a subject name just like "lwip-users Digest, Vol 229, Issue 13". It's confusing a lot.
If my understanding is different from yours, exchange of ideas is very welcome.
Best regards,
Lan