This is a special case where locking is taken care of. However:
- SYS_LIGHTWEIGHT_PROT needs to be set (this takes care of locking the
memp pools)
I have SYS_LIGHTWEIGHT_PROT defined as 1
- pbuf_alloc/pbuf_take/pbuf_free are ok to call from your own thread as
long as you don't use the heap (e.g. don't use PBUF_RAM, don't enable
MEMP_MEM_MALLOC)
I use PBUF_POOL to alloc pbufs
- netif->input must point to tcpip_input() to ensure the actual packet
processing takes place in lwIP thread context, not in your RX thread.
To
do that, pass tcpip_input (not ethernet_input) to netif_add().
I init my interface like this:
netif_add(&mynet, &ip, &mask, &gw, NULL, mynet_init, NO_SYS ?
netif_input : tcpip_input);
But i also tried this with exactly the same result:
netif_add(&mynet, &ip, &mask, &gw, NULL, mynet_init, tcpip_input);
Still have the issue...
--
S pozdravem
Best regards
Tomáš Mudruňka - SPOJE.NET s.r.o.
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users