>> One scheme I have seen used in a co-operative OS is each task is >> assigned a priority number, the larger the number the lower >> priority of the task. ... >That's clever! Yes, that is what I thought when I first came across it. IIRC a task could be assigned a priority between 1 and 99, with the default being somewhere in the middle. For an embedded system I suspect 1 through 7 would be plenty sufficient, with 0 being the running task. If a number of tasks reached 0 together, then I think it did a round robin on them. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist