From: "address@hidden" <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Sent: Sunday, December 14, 2008 3:58:51 AM
Subject: Re: [lwip-users] LWIP Process Model confusion:
sandy tewari wrote:
> Thanks for your help guys. So i am trying to implement it.
> Things that i need to do:
> 1. change sys_arch.c to work on processes not threads: i am going to exec a process now, rather than p_thread_create
> 2. secondly, i want to make them share common data: is that only going to be on mailboxes? so i just have to make a way to attach sys_mbox_new
> data on to shared memory?
> 3. What about the pcb connection information? Don't they would want to share too? it will be great to know which structure to include in?
I don't want to bring you down, but I guess implementing this might not be as easy as you think and might involve changing some of the lwIP core code (which is normally not a good idea since you lose the option to just upgrade to new versions).
As I said before, the problem is that sys_arch_mbox_post does NOT know which kind of data it shall
post. Therefore, without changing this, you would have to move ALL memory passed through mboxes (e.g. pbufs, apimsg, etc.) to shared memory - although this might not work at all since some of this data is located on the stack of a socket thread!
To get it working properly, a change in the lwIP code is necessary: we would have to move from generic message passing that relies on pointers to a more specific way: if sys_arch_mbox_post would know the type of data to post, it could (in multiprocess environments) copy the data insted of passing a pointer and posting it to another process. If you create a good working patch for this which does not interfere with multi_threading_, I guess chances would be high it gets included in the main source. But I doubt any of the active developers finds the time to do this for you :-(
lwip-users mailing listaddress@hiddenhttp://lists.nongnu.org/mailman/listinfo/lwip-users