AW: AW: [En-Nut-Discussion] Again a thread question

Oliver Schulz Oliver.Schulz at bong.de
Wed Jun 9 14:00:58 CEST 2004


Hi Ole,

> But should'nt we think about a scheduling algorithm that won't let a
> thread freeze?
No, I think scheduling the threads is no object of a cooperative OS. If you are aware of that you're using a cooperative OS, there is no problem.

In fact, a construct like 'for (;;) NutThreadYield();' doesn't make sense, unless it is the idle thread. And that's it was the idle thread does with the lowest possible priority.

As pointed out ealier, it's a good idea to use the main thread also as worker thread after initialization code. By doing so, you would not waste the stack memory, that is reserved for the main thread (768 bytes I think).

So long,
Oliver.



More information about the En-Nut-Discussion mailing list