Summary: New function tcpip_callback_wait()
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jllledo
Submitted on: Sun 19 May 2019 11:29:52 AM CEST
Priority: 5 - Normal
Assigned to: None
Discussion Lock: Any
Planned Release: None
I wrote a patch which adds a new function to call a callback inside the tcpip
thread ans block the calling thread until the callback finishes. While writing
it I came into some questions:
1.- Do you think it's useful to add support for LWIP_NETCONN_SEM_PER_THREAD?
2.- Should I use TCPIP_MSG_VAR_ALLOC() and friends instead of declaring msg
directly? I understand what these macros do, but I don't know what's the
problem they solve. So i don't know whether this new function should use
3.- Should I allocate msg in dynamic memory instead of declaring it locally?
Since the calling thread is blocked, msg will remain in the scope when the
tcpip thread tries to read it.
4.- If I allocate msg, then should the tcpip thread free it?