I would like to design and implement a bare metal, OS-like simple and safe scheduler.
The mechanism should handle IRQ context (USB and SDH), and 3-4 main subroutines two of them manipulate both USB and SDH controllers and all have some CPU usage.
What is the best and most efficient direction to go with for ARM cortex A12 single core, in order to implement a safe scheduling mechanism runs all the subroutines (all on privileged mode) and can handle the IRQ context?