[En-Nut-Discussion] Weird problem...

Harald Kipp harald.kipp at egnite.de
Mon Aug 2 18:00:48 CEST 2004


No idea, if this really helps. Change the main thread's
priority to 253. 254 is used by the idle thread and, as
Matthias Ringwald recently pointed out, NutThreadYield
doesn't really switch context.

Before version 3.4, the idle's priority had been 255.


>         NutThreadSetPriority(254);
>
>         for (;;)
>                 NutThreadYield();

In many NutSleeps you use values below 63, which will
not work on hardware with clock crystals. Anything
below 63 will end up in a NutThreadYield(). This will
again produce the problem of not switching the
context of threads running at equal priorities.

But nothing changed here since 3.3, AFAIK.

Harald






More information about the En-Nut-Discussion mailing list