[Top][All Lists]

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

Re: [lwip-users] LWIP Process Model confusion:

From: sandy tewari
Subject: Re: [lwip-users] LWIP Process Model confusion:
Date: Sat, 13 Dec 2008 12:22:08 -0800 (PST)

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?


From: Kieran Mansley <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Sent: Wednesday, December 10, 2008 2:59:36 AM
Subject: Re: [lwip-users] LWIP Process Model confusion:

On Wed, 2008-12-10 at 09:17 +0100, Simon Goldschmidt wrote:
> > > can i exec a process instead of a thread? and how will syncronization
> > > work b/w processes, if they aren't threads.
> >
> > Yes, you could execute a process instead of a thread.  However you would
> > then, as you realise, have to re-write the other parts of sys_arch.c to
> > use inter-process communication, rather than the simple inter-thread
> > communication that they do now.  The rest of lwIP has been written not
> > to know or care how communication is done between the threads/processes,
> > so you can use whatever method you like for synchronisation.
> Kieran, do you know that (i.e. tried it) or just saying this from
> reading/knowing the code?

I've not tried it.  If it doesn't work, then arguably it's a bug and
should be fixed.

> I would expect there are some (maybe hidden) problems where pointers
> are passed from thread to thread? The first thing that comes to my
> mind is tcp_callback or maybe the input functions. The problem here is
> that pointers are passed to sys_arch.c to be sent through an mbox
> without knowing the type of data behind the pointer. I don't think
> this would work as it is in a multi-process environment...

OK, so it's not as straightforward as I'd imagined it would be.  Would
be good for someone who was interested to try it and see how far they
can get.


lwip-users mailing list

reply via email to

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