lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] how lwip know internet cable is unplug


From: ake . forslund
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Date: Fri, 2 Sep 2011 14:25:20 +0200

I'm not quite sure what you're suggesting. Is it to put all calls that may change states of netif, dhcp etc. in a single thread or is it the use of a separate thread to handle RX, or something else?

-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21  Markaryd
Tel +46-(0)433-273296



From: "Simon Goldschmidt" <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Date: 2011-09-02 14:15
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Sent by: address@hidden






address@hidden wrote:
> Thanks for the tip. set_link_up/down looks pretty safe to use from my
> rx-thread (rx handled by a separate thread triggered by eth-interrupt). Is
> it the callback that need to be protected from threding issues?

Even if it is now, it is only so by chance and you shouldn't rely on it. Such mixed threading code is a no-go, you only risk producing bugs that are *very* hard to track down later. Just do it right now and be safe: it's just the lwIP principle that things like this are not protected from concurrent access by the lwIP core code.

Simon
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro!
https://freundschaftswerbung.gmx.de

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



reply via email to

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