[En-Nut-Discussion] error of compiler

Andreas Heinzen heinzen at fh-koblenz.de
Fri Sep 22 15:19:07 CEST 2006


> Thanks Ole, i will read this. But for me now it shouldn't be the problem.
that is the problem, because you has given your thread a high priorty:
>#define SIACMDPRIORITY 10
>....
>NutThreadSetPriority(SIACMDPRIORITY);  


> 
> The thread starts with NutTcpAccept() .. so the loop isn't running and 
> it's waiting for an incomming connection. I do have there some 
> NutNetSleeps().
> 
> So I can't see why it should be blocking other threads.
> 

no other thread with lower priorty, will start running even it is finish.
The Online API says:
void NutSleep ( u_long ms  ) 
Temporarily suspends the current thread. 
Causes the current thread to wait for a specified interval or, if the specified interval is zero, to give up the CPU for another thread with higher or same priority.
 This function may switch to another application thread, that got the same or a higher priority and is ready to run.

Try to comment the line:
//NutThreadSetPriority(SIACMDPRIORITY);

Best regards,
Andreas Heinzen



More information about the En-Nut-Discussion mailing list