lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwIP RAW API and "deferred processing" in differentcont


From: Simon Goldschmidt
Subject: Re: [lwip-users] lwIP RAW API and "deferred processing" in differentcontext
Date: Wed, 07 Dec 2011 13:07:35 +0100

Kieran Mansley <address@hidden> wrote:
> Our sockets implementation requires separate threads - one for the stack
> (the tcpip thread) and so another for the application.  It doesn't
> fundamentally have to be that way, but that's the way it is.

Actually, it should not be too hard to get single threaded support for our 
socket implementation: the 'op_completed' semaphores would just be booleans and 
the mboxes just normal queues. Then, while 'op_completed' is false or the mbox 
queue a socket waits for is empty, you'd just execute the loop code in 
tcpip_thread() (inside the big while(1)).

The big downside of that would however be that blocking socket calls wouldn't 
really make sense and thus, socket programming would be rather special 
(compared to how you normally write socket programs, i.e. sequential in a 
separate thread).

Simon
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

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