[En-Nut-Discussion] Thread management (killing threads)
Ole Reinhardt
ole.reinhardt at embedded-it.de
Tue Jul 7 15:33:03 CEST 2009
Hi Rob!
> I know that in the history of NutOS killing threads has always been
> troublesome and I searched the archives to see what the current status was
> on this topic, without any new clues. Simply calling 'NutThreadKill' from
> the running thread doesn't work, at least that is my experience so far.
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.
Another thing you should consider is to allocate memory dynamical from
the heap instead of reserving large stack space. So you could even save
memory within the context of a running thread as well.
Bye,
Ole Reinhadt
--
_____________________________________________________________
| |
| Embedded-IT |
| |
| Ole Reinhardt Tel. / Fax: +49 (0)271 7420433 |
| Luisenstraße 29 Mobil: +49 (0)177 7420433 |
| 57076 Siegen eMail: ole.reinhardt at embedded-it.de |
| Germany Web: http://www.embedded-it.de |
|_____________________________________________________________|
More information about the En-Nut-Discussion
mailing list