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)?