arduOS is a preemptive multitasking system, that allows to create own schedulers(polymorphism).
Install: extract the files from the zip and put them into $Arduino/libraries/
these macros are for disabling, enabling and waiting for the interrupt.
I wait for Interrupt
The RoundScheduler switches the tasks in a Round-Robin wise, ignoring tasks with a delay.
The PrioScheduler takes as constructor argument in wich array it searches first. (valid arguments: SYS::task_sect , SYS::scheduler_sect) It searches from the first position of the selected array to the last position of the other array. If it finds something this one will be executed.
A custom Scheduler needs to be a child of SYS::BasicScheduler.
You can reimplement the methods get() getTask() and getScheduler().
for further information you can look into the sourcecode of arduos_core.