lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Call tcp_close() out of tcp_recv()-context?


From: address@hidden
Subject: Re: [lwip-users] Call tcp_close() out of tcp_recv()-context?
Date: Mon, 07 Sep 2015 20:25:15 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Karl Karpfen wrote:
My question: can I do a tcp_close() from within my_recv() which is called in lwIP's receive-context

Yes you can. And the lwIP API allows it.

(which possibly may be a receive-IRQ)?

No. Unless you take special action to prevent concurrent access to the lwIP core (i.e. block ETH IRQ when calling lwIP functions from main loop), receive functions must not be called from ISR. If that is the case, most often the creator of your lwIP port has done something wrong. This has been the case for some microcontroller vendor's ports in the past.

Simon



reply via email to

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