lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using in a single thread with NO_SYS = 1


From: Dirk Ziegelmeier
Subject: Re: [lwip-users] Using in a single thread with NO_SYS = 1
Date: Sun, 8 Jan 2017 09:29:34 +0100

Yes, but read and apply these:

http://www.nongnu.org/lwip/2_0_0/pitfalls.html
http://www.nongnu.org/lwip/2_0_0/group__lwip__nosys.html

Pay especially attention to your netif driver, it must not call netif->input() from IRQ context! See example code on the page of the second link above.

Also note you need a separate thread for lwIP, which needs to periodically poll the packet queue that is filled by netif driver from IRQ context and periodically call sys_check_timeouts() to make lwIP timers work.
If you do it the simple way, this creates continuous CPU load. If you put work in it, you can block the lwIP thread on packet queue AND on the expiry time of the next timeout (= you need to implement the timeout mechanism by yourself).

Dirk


reply via email to

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