Rastislav Uhrin wrote: > Question: Can I disable core locking, I mean: > #define LWIP_TCPIP_CORE_LOCKING 0 > >It works with and without locking. I don’t see any noticeable difference, but >I don’t understand if the core should be locked in my case > or no. Maybe it >works because of my task priorities?
The core code of lwIP is not protected against concurrent access. As such, "API" code has to take care of multithreading. The old method was message-passing (i.e. send -> message to tcpip_thread -> tcpip_thread executes the send and wakes up the API thread when done). Now when enabling CORE_LOCKING, we use a global mutex instead of message passing. Both versions work but with current operating systems, the mutex version should be faster since in the case when noone else is working with the core, grabbing a mutex is so much faster than 2 thread context switches. Simon _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
