lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: multi-threaded environment


From: tbutler
Subject: [lwip-users] Re: multi-threaded environment
Date: Mon, 22 Mar 2004 13:04:33 +0100




>From: Peter Graf <address@hidden>
>Subject: Re: [lwip-users] multi-threaded environment
>To: Mailing list for lwIP users <address@hidden>
>Message-ID: <address@hidden>
>Content-Type: text/plain; charset=us-ascii; format=flowed
>
>Tom C. Barker wrote:
>
>>[Snip]
>>Additionally, has anyone written a guide to initializing
>>tasks. I've found samples but it seems that no real
>>explanations are lying around.
>>
>>
>No, but for me reading the according portions of sys_arch.c from the
>Unix port was not too hard, and gave me a good idea of what had to be
done.
>
>As you mention task initialization (which is quite unproblematic) I'd
>like to point to the more complicated (clean) removal of tasks from lwIP
>usage. This issue hasn't been given much (any?) attention, probably
>because embedded multitasking systems tend to create tasks only once and
>then never remove them. Are there any plans to standardize task removal,
>or is it not of general interest? (I have always been postponing to
>implement it, but someday I'll surely need it.)
>
>Peter

I've run into this problem using PPP with a modem. In response to
pppSigHUP(),
the logic in ppp.c terminates the serial input thread without any cleanup
whatsoever. So I created the funcion sys_thread_free() as the counterpart
to
sys_thread_new() in sys_arch, and added the corresponding call in ppp.c
before
the input thread falls out the bottom.

Incidentally, I believe the PPP input thread can terminate for other
reasons
than an explicit call to pppSigHUP() or pppClose(). For example, if IPCP
fails
to reach open state, I'm pretty sure that the end result will be that the
PPP input thread is terminated.

Tim Butler





reply via email to

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