lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] how to set the link up


From: massimiliano cialdi
Subject: Re: [lwip-users] how to set the link up
Date: Thu, 6 Jul 2017 12:51:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]