I did not choose for a timer interrupt switcher, like most others do, because then a switch can occur everywhere in the program. Also in the middle of a C statement where a variable is written. Then this variable contains partial old, partial new data. This task switcher does not use, nor disable any interrupts. They are free for your hard realtime application.
Task switching is done by software which makes inter tasking communication very easy.
Even non reentrant system calls and global functions can be shared between tasks. Some knowledge of stack frames. Includes Timers, Hardware and Software watchdog. Full control of task switching gives you efficient task managing functions. Suppose task1 and task2 are already running and each have a proper stack frame stack1 resp stack2.