The RTSupport module provides facilities supporting real-time code, at a priority just below that of the interrupt dispatch system, and above that of any SWIs being handled by the foreground application. Multiple priority levels are supported, so routines with tighter timing constraints can pre-empt other real-time routines. Code can be designed either using a callback model (where the system makes a function call to your entry point) or using a thread model (where the rest of the system gets CPU time while your thread sleeps).
Code typically executes in system (SYS) mode and has its own SYS and SVC stacks, and it may call SWIs (but only re-entrant SWIs) without preventing higher-priority routines from executing. There is no automatic time-slicing of routines; it is assumed that the application takes responsibility for ensuring that the system is not overloaded (although there is a relief valve to cope with overloaded systems, which ensures that the foreground process gets a little CPU time at least a few times per second).
Possible future enhancements: