« Return to Thread: Thread management (killing threads)

Re: Thread management (killing threads)

by Rob van Lieshout (PragmaLab) :: Rate this Message:

Reply to Author | View in Thread

Hi Harald and Ole,

> > Just call NutThreadExit from the running thread or simply quit your
> > endless loop. In this case NutOS will remove the running
> thread from
> > the memory as soon as it was ended.
>
> Yes, and a related sample is available at
> http://www.ethernut.de/nutwiki/Run_Once_Thread

Glad to hear that a methode is available. Just to be sure: with this method
no 'NutOS remainders' are left in RAM? Ofcourse the application itself is
responsible for freeiing the resources it claimed during executon of thread,
but it doesn't know about resources that the threadmanagement claimed. I
already figured out that the 'NUTTHREADINFO' structure is allocated in the
same block as the threadstack itself (and so altogether removed in one
action in 'NutThreadDestroy())'.

In other words, no known memory leak issues when constantly creating and
killing the same thread ?

Thanks.

Regards,

Rob van Lieshout

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

 « Return to Thread: Thread management (killing threads)