Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When µC/OS-III decides to run a different task (see Chapter 7, “Scheduling” Scheduling), it saves the current task’s context, which typically consists of the CPU registers, onto the current task’s stack and restores the context of the new task and resumes execution of that task. This process is called a Context Switch.

...

The context switch code is generally part of a processor’s port of µC/OS-III. A port is the code needed to adapt µC/OS-III to the desired processor. This code is placed in special C and assembly language files: os_cpu.h, os_cpu_c.c and os_cpu_a.asm. Chapter 18, “Porting Porting µC/OS-III”III provides more details on the steps needed to port µC/OS-III to different CPU architectures.

...