About thread safe, in all the examples I found the sequence of instructions is this:

tcpip_init(NULL, NULL);

netif_add(&fsl_netif0, &fsl_netif0_ipaddr, &fsl_netif0_netmask, &fsl_netif0_gw, NULL, ethernetif_init, tcpip_input);
    netif_set_default(&fsl_netif0);
    netif_set_up(&fsl_netif0);

I guess that netif_add()m call should be netifapi_netif_add() instead, because is called from a different task from tcpip_thread.


What about the other two calls?


best regadrs

Max


On 05/07/2017 19:08, Sylvain Rochet wrote:
Hi,

On Wed, Jul 05, 2017 at 04:55:24PM +0000, Noam Weissman wrote:
My DHCP task calls dhcp_start and wait for an IP. If there is a
timeout the task will assign a static default IP. You can do something
similar.
Erm, should I add that dhcp_start() is not thread safe ?

Sylvain



_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to