[En-Nut-Discussion] NutThreadSetPriority

Yuri Staal staal.ya at stu.hsbrabant.nl
Thu Dec 4 14:59:28 CET 2003


Hi all,
im back with another question... :p
now that im really started programming my Ethernut, i come across some
problems. Some where solved, some i am still trying to fix.
Now i encountered this strange thing.
In the httpd example 4 server threads are started. Like this:
   /*
    * Start four server threads.
    */
   for (i = 1; i <= 4; i++) {
       char *thname = "httpd0";

       thname[5] = '0' + i;
       NutThreadCreate(thname, Service, (void *) (u_short) i, 640);
}

the priority is set outside the "for" loop.
this would explain the fact that the 4 server thread have a priority of
64
now, when i set the priority of the thread outside the "for" loop, and i
check HyperTerminal for debugging, i only see 2 threads getting
started...
and so the whole thing doesnt work anymore.
When i set the priority INSIDE the "for" loop, everything works, but
after some time, it seems to time-out.
Anyone have any ideas of what could be the problem?

Again, with kind regards,
Yuri




More information about the En-Nut-Discussion mailing list