I still have some bugs to get out, but preemptive multitasking is currently being developed for zeptoforth. Ultimately, the goal is to have zeptoforth serve as an RTOS, which would be a distinguishing feature vis-a-vis the main option for Cortex-M Forth computing, Mecrisp-Stellaris. It may still be a bit before it is ready (currently it crashes after context-switching a few times), but once the bugs are out there will soon be a new release containing this new functionality. Note that the preemptive multitasker is backwards compatible to any older code that used the cooperative multitasker, provided code is added for critical sections.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Nice! Do you still see use cases for Inner-interpreter based multitasking or will the preemptive approach replace the old one?
Are you sure? yes | no
The preemptive approach will replace the old one, but code can still relinquish control of the CPU with PAUSE. The main difference is that code may need to add critical sections, particularly in code pertaining to inter-task communication.
Are you sure? yes | no