The application code could explicitly save all the processor registers on entering the ISR, but doing so would result in some processor registers being saved twice - once by the compiler generated code and then again by the application code. This is undesirable and can be avoided by using the 'naked' attribute in addition to the 'signal' attribute.
When the 'naked' attribute is used the compiler does not generate any function entry or exit code so this
must now be added explicitly. The macros portSAVE_CONTEXT() and portRESTORE_CONTEXT() respectively save and
restore the entire execution context.:
Next: RTOS Implementation - The FreeRTOS Tick Code
Any and all data, files, source code, html content and documentation included in the FreeRTOS distribution or available on this site are the exclusive property of Richard Barry.
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Richard Barry.