lwip-users
[Top][All Lists]
Advanced

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

Re: RE [lwip-users] : RE : RE : RE : managing storage problems.


From: Jonathan Larmour
Subject: Re: RE [lwip-users] : RE : RE : RE : managing storage problems.
Date: Wed, 31 Oct 2007 10:21:54 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

shai katzir wrote:

finally, I decided to give the sys_mbox_post function a success boolean
return as discussed and it worked just fine. still, i only added checks for udp receving and raw receive . the problem is that when the post fails, there has to be some error handling and reverse actions before giving up on
posting.
for example, in the tcp receive, before posting the packet to the recvmbox,
there are updates to the pcb and "tcp_update", this updastes should be
removed. I wasn't sure how to remove then and therefore i neglected the tcp
check for failed posting. Moreover, in the udp receive, before posting the packet to the recvmbox
there's a call to the conn callback, the process done in the callback should
be reversed too , but again, I didn't know what changes have been done.
Can I move the callbacks to be done after a successfull posting, or there is
a problem doing that in a multithreaded system ( where the fetch could be
done before the callback executes)?

Yes the fetch could be done before the callback.

For UDP, there should be no harm for your workaround to make the callbacks after the post, but all the other things should remain before the post, and be undone after if it failed.

For TCP, I don't see any code which updates the PCB or any mention of "tcp_update" in the whole stack. Where did you get your sources from?

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.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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