lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] sockets without threads?


From: Colin Nichols
Subject: [lwip-devel] sockets without threads?
Date: Thu, 07 Jun 2012 10:57:16 -0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

Hi all,

I sent this to the users group yesterday but maybe it's better suited for this list.
----

I've run into a little snag while incorporating lwIP into my microkernel-based OS.
My OS does not support threads or shared memory, only full processes 
(with separate address spaces).  Thus, I cannot use the netconn API, as 
it is heavily reliant on multiple threads having access to the same 
address space.  And thus, lwIP's implementation of sockets will not work 
for me; I need a replacement.
For IPC, my OS uses blocking message-passing.  Syscalls and calls to 
drivers are carried out through the message-passing mechanism (similar 
to Minix, if you're familiar with that).
I have lwIP running in its own process, and I've got a small front-end 
that receives requests (in the form of IPC messages) and then calls the 
appropriate lwIP functions.  I need a sockets implementation where the 
recv() request comes in (as an IPC message), some non-blocking action is 
taken with regards to the recv request (probably using the raw API), and 
then once the data comes in (or immediately, if it's already there), 
some callback says "ok, we've got all the data for that receive!" and 
responds to the recv() request with an IPC message.
Anyone have experience with this?  I'm really hesitant to re-implement 
sockets, but I can't modify my OS at this point and I don't think I have 
a choice...
Any advice or thoughts are appreciated!

Thanks,
Colin



reply via email to

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