Versions Compared

Key

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

...

  • how µC/OS-II handles access to critical sections of code,
  • what a task is, and how µC/OS-II knows about your tasks,
  • how tasks are scheduled,
  • how µC/OS-II determines the percent CPU your application is using,
  • how to write Interrupt Service Routines (ISRs),
  • what a clock tick is and how µC/OS-II handles it,
  • how to initialize µC/OS-II, and
  • how to start multitasking.

Contents of this Section

Table of Contents
maxLevel2

Application Services

This chapter also describes the application services listed in table 3.1. The code for OSSchedLock() and OSSchedUnlock() can be disabled by setting OS_SCHED_LOCK_EN to 0 in OS_CFG.H as shown in table 3.1. You should note that the other services cannot be ‘compiled out’ because they are an integral part of the core services offered by µC/OS-II.

...

Figure 3.1 µC/OS-II File Structure.

Contents of this Section

Table of ContentsmaxLevel2

Critical Sections, OS_ENTER_CRITICAL() and OS_EXIT_CRITICAL()

µC/OS-II, like all real-time kernels, needs to disable interrupts in order to access critical sections of code and to reenable interrupts when done. This allows µC/OS-II to protect critical code from being entered simultaneously from either multiple tasks or ISRs. The interrupt disable time is one of the most important specifications that a real-time kernel vendor can provide because it affects the responsiveness of your system to real-time events. µC/OS-II tries to keep the interrupt disable time to a minimum, but with µC/OS-II, interrupt disable time is largely dependent on the processor architecture and the quality of the code generated by the compiler.

...