[En-Nut-Discussion] Kill the idle thread?

Ulrich Prinz uprinz2 at netscape.net
Sat Sep 11 11:58:16 CEST 2010


May be it is a better way to check how many stack space the thread 
really needs and then reduce the ammount to the minimum + some safety.

That might free some memory and not end up in unpredictable system behavior.

Regrards
Ulrich

Am 11.09.2010 03:31, schrieb Henrik Maier:
> Thanks for all the replies.
>
> I did play around with the idea a bit but the practical challenge seems to
> kill the idle thread from another thread.
>
> The other option of hacking the Nut/OS core and modify nutinit.c is feasable
> but probably not worth it for the sake of saving some 384 bytes of stack
> space.
>
> Henrik
>
>> -----Original Message-----
>> From: en-nut-discussion-bounces at egnite.de [mailto:en-nut-discussion-
>> bounces at egnite.de] On Behalf Of Ulrich Prinz
>> Sent: Saturday, 11 September 2010 2:26 AM
>> To: Ethernut User Chat (English)
>> Subject: Re: [En-Nut-Discussion] Kill the idle thread?
>>
>> Hi!
>>
>> But don't forget that the garbage collector for threads is running
>> there... If you ever kill a thread, you don't get the heap back.
>>
>> Greets
>> Ulrich
>>
>> Am 10.09.2010 16:02, schrieb Matthias Ringwald:
>>> Hi Henrik
>>>
>>> LOL...
>>>
>>> if you like, just patch Nut/OS to not create the IDLE thread,
>> somewhere in the startup. Not sure, if anybody will miss it (mostly the
>> scheduler...)
>>>
>>> Best,
>>>    Matthias
>>>
>>> On 10.09.2010, at 15:13, Henrik Maier wrote:
>>>
>>>> Just out of curiosity, could one kill the idle thread?
>>>>
>>>> Why? Just to save some resource as I anyway have main as the lowest
>> priority
>>>> thread and this is never surrendering any CPU time. So idle has no
>> chance to
>>>> ever run.
>>>>
>>>> Kind Regards
>>>>
>>>> Henrik
>>>>
>>>>
>>>> _______________________________________________
>>>> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>>>
>>> _______________________________________________
>>> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>> _______________________________________________
>> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion



More information about the En-Nut-Discussion mailing list