A task is a sequential piece of code - it does not know when it is going to get suspended or resumed by the kernel
and does not even know when this has happened. Consider the example of a task being suspended immediately before executing an
instruction that sums the values contained within two processor registers.
To prevent this type of error it is essential that upon resumption a task has a context identical to that immediately prior to
its suspension. The operating system kernel is responsible for ensuring this is the case - and does so by saving the context of
a task as it is suspended. When the task is resumed its saved context is restored by the operating system kernel prior to its
execution. The process of saving the context of a task being suspended and restoring the context of a task being resumed is
called context switching.
Next: RTOS Fundamentals - Real Time Applications
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.