In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote: Hi Sparks; You are definitely correct in being concerned about interaction in the case of this co-operative O/S. If one permits a thread to run for too long, then the various "tick clocks" well get jitter in them. And in severe cases, ticks could actually be missed; so you are probably right that some sort of "helper" would be useful to keep the unaware from outstripping the processor's capacity unknowingly. Regarding your example of receiving a number of bytes, and then calling a routine to process them, the current implementation (although in ASM, not yet in SX/B) already supports that. This is where the task switches to another routine. Tasks can also launch and terminate other tasks, as well as terminate themselves. Sure, I'll share this O/S with the community, but I want to do some more develoment and testing first, as well as write a good description of it as well as how to properly use it.... there are some restrictions. For example, the normal CALL/RET instructions cannot be used because different threads could (and certainly would, except for the most trivial cases) screw up the order and data on the call stack. So I have implemented CALL and RETURN macros and a "virtual stack" concept where each thread takes care of its own. This area could still use some further development and improvement...... its a little unelegant. In the mean time if anyone wants to try it (with the current warts) before I'm ready to release it globally, please express your interest. I will of course need to make up some descriptive information first. Cheers, Peter (pjv) ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157842#m160949 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)