lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Re: PBUF Leak Problems...


From: Jonathan Larmour
Subject: Re: [lwip-users] Re: PBUF Leak Problems...
Date: Fri, 21 Sep 2007 14:42:23 +0100
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Thomas Catalino wrote:
Absolutely agree, sys_mbox_post cannot block.

One other side effect of our bug was that the socket's rcvevent count was now out of whack with mailbox. Just an FYI.

Sizing the mailbox to hold all pbufs is a reasonable solution I think (given the goal of lightweight) [snip]

That's certainly what I've had to do in my port. Although it's still not reliable without immense mailboxes.

But perhaps there is a different solution - in line with sys_arch_mbox_tryfetch, maybe there should be a sys_arch_mbox_tryput.

Mboxes posted to by the application threads, such as posting a message _to_ the tcpip thread, can block. But anything from the tcpip thread cannot.

In many cases, there would no change because the mboxes are being used as a way to wake a thread up. If the mbox is full, then the thread will already be awake so the error can be ignored. So there may not be as much overhead as all that for error checking.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
 >>>> Visit us on stand 810 at The Embedded Systems Show 2007, NEC <<<<
 >>>> Oct 17-18 Birmingham, UK http://www.edaexhibitions.com/ess/  <<<<
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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