[En-Nut-Discussion] Restart secific thread
Lorenzo Lombardo
lorenzo.lombardo at satbn.com
Thu Nov 2 10:09:50 CET 2006
Hi,
if your thread reach the end, there's no way to restart it (as far as I
know). You can recreate it, but this will mess up a few things considering
that the resources of the previous thread are not freed.
I use this code to lunch the thread every time I want:
First declare an handle:
HANDLE startExample;
Then here's the thread:
THREAD (example, arg)
{
while(1)
{
// wait for the event to be posted
NutEventWait(&startExample, NUT_WAIT_INFINITE);
<code>
}
}
When you want to lunch the thread, call:
NutEventPost(&startExample);
This work fine for me. If anyone have a better solution, he's welcome.
Regards,
Lorenzo
----- Original Message -----
From: "Petr Odlozil" <zip357 at centrum.cz>
To: <En-Nut-Discussion at egnite.de>
Sent: Thursday, November 02, 2006 8:53 AM
Subject: [En-Nut-Discussion] Restart secific thread
> Hello,
>
> Is there a way how to restart specific thread in NutOs ?
>
> Best Regards
>
> Petr Odlozil
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.409 / Virus Database: 268.13.22/512 - Release Date:
> 01/11/2006
>
>
More information about the En-Nut-Discussion
mailing list