[En-Nut-Discussion] Thread priority

Michel Hendriks michel at streamit.eu
Wed May 16 09:02:45 CEST 2007


Thanks for your answer.

So the comment is a guideline at best, not a 'hard' restriction.(?)

The reason I am asking is because I want to service a watchdog in
a thread and I want to make sure that it gets serviced when there
is any time to do so. This thread will do nothing else than the 
watchdog so it CPU usage should be very low.

Greets,
Michel

> -----Oorspronkelijk bericht-----
> Van: en-nut-discussion-bounces at egnite.de 
> [mailto:en-nut-discussion-bounces at egnite.de] Namens Ernst Stippl
> Verzonden: dinsdag 15 mei 2007 21:53
> Aan: 'Ethernut User Chat (English)'
> Onderwerp: Re: [En-Nut-Discussion] Thread priority
> 
> Hi Michel!
> 
> This comment was added in version 4.1.9, it did not exists in 
> 4.1.4 Interestingly, the ocde of NutThreadSetPriority has not 
> changed (besides 3 "#ifdef NUTDEBUG") I grep'ed for 
> NutThreadSetPriority (output below) and it canbe seen that 
> Seems like a "OS versa apps" divide here. Only device driver 
> threads have prios lower than 32.
> The important thing is that some quite undesired effects may 
> occur when interfering with them.
> Make sure you are giving up the CPU fast enough when running 
> on such prio!
> 
> regards
> ernst
> -------------------------------------
> 
> -----Ursprüngliche Nachricht-----
> Von: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von 
> Michel Hendriks
> Gesendet: Dienstag, 15. Mai 2007 13:54
> An: En-Nut-Discussion at egnite.de
> Betreff: [En-Nut-Discussion] Thread priority
> 
> Hi guys, 
> 
> Can anyone answer me why the comment for the 
> NutThreadSetPriority() function says that thread priority of 
> applications are limited to the 32.254 range?
> 
> The reason I am asking is because e.g. the "rxi5" thread has 
> a prio of 9 and I would like to create a thread that is 
> *always* the highest prio.
> Can I safely ignore the comment and use prio 1, or should I 
> lower the prio of the rxi5 thread???? 
> 
> Greets
> Michel Hendriks 
> 




More information about the En-Nut-Discussion mailing list