Hi, I've read the .pdf document on the amforth's multitasker and, as I am a newbie with it, I am overhelmed by a term "task" and its friends so not easy to follow at least on the first reading. I think that cooperative mutlitasker is basically a multithreader, where we may have many threads, and each thread may contain one or more tasks. So for example:
: run1-demo ( my task - interesting stuff in here ... ) ; : run2-demo ... ; $20 $20 0 thread: thread_demo \ create thread, allot tcb + stack space : thread-demo-start thread_demo tcb>tid activate \ words/tasks after this line are run in the new thread run1-demo run2-demo ; and for example: : thread-stop ( -- ) pass status ! pause ; \ sleep current thread : thread-sleep ( tid -- ) pass swap ! ; \ sleep another thread : thread-awake ( tid -- ) wake swap ! ; \ wake another thread etc... What I want to show here is maybe the way how to better structure the stuff - into "threads" and its "tasks".. p. -- - - Reklama - - - - - - - - - - - - - - Maturity, přijímací zkoušky, státnice, diplomky... Vše o závěru studia na středních a vysokých školách čtěte na portálu VOLNÝ.cz na http://bit.ly/LfImCR ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel