>Does it really need to know the 'type' of message, or does it just need the size of the message. I'm thinking that if you added a size argument, the sys_arch_mbox_post could copy the >right amount of data to the other process's mbox. Internally, it could keep the size in the mbox structure to hide that from the user. The task would then be to edit the core to call:
>sys_mbox_post(mbox,msg, sizeof(msg)) instead of sys_mbox_post(mbox,msg).
>This might even be done by a #define.
>What do you think?
Can you be a little more specific? What do u mean, when u say just post a message. This isnt clear to me implementation wise, :(
According to me, i was thinking of setting a shared memory segment b/w processes through shmget, but implementation wise i dont get it how my idea would work.
A little help from you, and i might able to get through.
On Dec 14, 2008, at 12:33 PM, sandy
> Thanks for your quick reply! I am going to think more over it and come back.
> From: "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?
> > netconn?
> 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 list
> lwip-users mailing list
lwip-users mailing listaddress@hiddenhttp://lists.nongnu.org/mailman/listinfo/lwip-users