lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Using pbuf_free outside of the lwip main thread


From: address@hidden
Subject: Re: [lwip-users] Using pbuf_free outside of the lwip main thread
Date: Wed, 19 May 2010 19:20:37 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

multiplex wrote:
Is it safe to then call pbuf_free from this other thread ?
lwIP 1.3.0 (Xilinx microblaze port), socket based.
pbuf_free() is thread-safe for all pbuf types if SYS_LIGHTWEIGHT_PROT==1 (or SYS_ARCH_PROTECT defined by yourself). The only limitation here is that to call pbuf_free() from interrupt context, you additionally have to set LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT==1 since otherwise, mem_free() tries to wait on a mutex (which it can't, from an interrupt).

Simon



reply via email to

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