lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] get dynamic ip on lwip-1.4.0.rc1


From: address@hidden
Subject: Re: [lwip-users] get dynamic ip on lwip-1.4.0.rc1
Date: Mon, 25 Oct 2010 18:51:32 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5

Hi Thien,

PHAM ANH THIEN wrote:
I could not find a well sample dhcp source code on lwip-1.4.0.rc1 and contribute folder, could you please to point me where it is?
The main problem with your code isn't finding an example but understanding lwIP threading and how not to break it. Please read the chapter "Threading" in the doc/rawapi.txt file from the lwIP source directory.

Basically, lwIP is not thread-safe except for a very limited subset of the APIs and the APIs explicitly meant for multithreading applications. All funtions/modules not explicitly listed to be thread-safe must neither be called from any other thread than the tcpip_thread nor from interrupt context (ISR/DSR)! Having understood this basic requirement is crucial to implementing ports (which is what you are doing).

I understand that this requirement is sometimes not easy to follow and it took me some, too, to get used to it when starting lwIP, but that's the way it is. If our current documentation of this basic requirement isn't obvious enough, please do not hesitate to suggest documentation improvements, everybody!

Thanks,
Simon



reply via email to

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