lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] [PATCH] tcpip clean shutdown


From: address@hidden
Subject: Re: [lwip-devel] [PATCH] tcpip clean shutdown
Date: Fri, 20 Nov 2009 21:39:20 +0100
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Ross Philipson wrote:

This patch allows the tcpip processing thread to be shutdown cleanly by posting a shutdown message to its queue.


I hate to disappoint people, but you aren't the first that we turned down on this: there were some attempts in the past (on this mailing list and in the patches section on savannah) to implement graceful shutdown for the stack. However, all of them (including yours) had the downside that they
a) added code for people that don't need it and
b) weren't complete in that really all resources are freed (and all threads terminated!)

I.e. in your code, you only stop the tcpip_thread, but this is far from what you have to do to shut down the stack. You would have to unblock all application threads blocking on semaphores for socket/netconn or tcpip_callback and preven adding new messages to the queue, you would have to free memory allocated by the various protocols, and so on.

Since lwIP is a stack designed for embedded systems that keep the stack running while they are turned on, there has been (aside from a few people including you) not much need for a graceful shutdown, which is why we want to avoid the effort of starting with it.

Simon




reply via email to

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