lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] sys_thread_new Newbie question


From: Kieran Mansley
Subject: [lwip-users] Re: [lwip] sys_thread_new Newbie question
Date: Thu, 09 Jan 2003 00:57:31 -0000

On Tue, 16 Jul 2002, kevin stokes wrote:

> Greetings,
>   I'm attempting to port lwIP to TI's DSP/BIOS operating system.
>
>   So far, I'm very pleased with lwIP, and it looks like it will be perfect
> for my application.
>
>   The DOC says you can implement sys_thread_new() if you like.  Some
> questions about that:
>
> 1.) If I want to start out without it, how do I go about specifying that, so
> I don't have to implement sys_thread_new()?

I take if you've read http://www.sics.se/~adam/lwip/os.html

You don't explicitly have to specify anything, just alters the parts of
lwip that you can make use of.  Also, you're responsible for calling the
tcp_tmr() function as it can't be implemented as a separate thread.

> 2.) sys_thread_new() creates a new thread, but what destroys it?  Are we
> supposed to implement code that knows when the (given) function returns and
> then delete the thread?   If we don't explicitly delete the thread, then RAM
> will be wasted..

Usually threads destroy themselves when their path of execution comes to
an end.  This is the same as the way a program destroys itself when you
call exit(), or main() returns, or whatever - you don't have to do
anything to clean it up.  I'm not familiar with the operating system
you're working with, so no idea if that's the case there.

Hope that helps,

Kieran

[This message was sent through the lwip discussion list.]




reply via email to

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