The approach used by SYS/BIOS is to closely mimic the traditional C approach that was just shown, but to conditionally allow add-ons of additional enhancements. To do this, the SYS/BIOS configuration tool automatically generates "interrupt stub" functions that will call the user-defined ISR functions at the appropriate points of execution. These auto-generated stub functions use the "interrupt" keyword, but the user-defined functions must be standard C callable functions. An example of a default stub for a SYS/BIOS ISR that schedules a Task to run from the ISR function is shown below. The ISR function (hwiFxn53) gets called after, the Task scheduler is disabled, the stack is switched from the interrupted Task's stack to the interrupt stack, the Swi scheduler is disabled, and the execution context is updated. After the function returns, the interrupt unwinds by restoring the Swi scheduler, restoring the execution context, switching back to the interrupted Task's stack, and restoring the Task scheduler and returning from the interrupt. Note that this stub looks like it carries a lot of overhead. But keep in mind that this is the generated C code for the stub, and the compiler and linker will optimizes this. Also, almost all of this is configurable by the developer. Shown here is a screenshot of the configuration tool’s window for configuring an MSP430 hardware interrupt. Note that there is a configure parameter that will direct all the SYS/BIOS, generated interrupt stubs, to emit to keep the CPU awake upon return from interrupt. This is provided as a debug aid, as well as a mechanism to ease porting of legacy MSP430 application code to run with SYS/BIOS.