Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.
Variable Name Changes
Some of the variable names in µC/OS-II are changed for µC/OS-III to be more consistent with coding conventions. Significant variables are shown in Table C-6.
µC/OS-II (ucos_ii.h) |
µC/OS-III (os.h) |
Note |
OSCtxSwCtr |
OSTaskCtxSwCtr |
|
OSCPUUsage |
OSStatTaskCPUUsage |
(1) |
OSIdleCtr |
OSIdleTaskCtr |
|
OSIdleCtrMax |
OSIdleTaskCtrMax |
|
OSIntNesting |
OSIntNestingCtr |
(2) |
OSPrioCur |
OSPrioCur |
|
OSPrioHighRdy |
OSPrioHighRdy |
|
OSRunning |
OSRunning |
|
OSSchedNesting |
OSSchedLockNestingCtr |
(3) |
|
OSSchedLockTimeMax |
|
OSTaskCtr |
OSTaskQty |
|
OSTCBCur |
OSTCBCurPtr |
(4) |
OSTCBHighRdy |
OSTCBHighRdyPtr |
(4) |
OSTime |
OSTickCtr |
(5) |
OSTmrTime |
OSTmrTickCtr |
|
-
- Changes in variable naming
- In µC/OS-II, OSCPUUsage contains the total CPU utilization in percentage format. If the CPU is busy 12% of the time, OSCPUUsage has the value 12. In µC/OS-III, the same information is provided in OSStatTaskCPUUsage. However, as of µC/OS-III V3.03.00, the resolution of OSStatTaskCPUUsage is 1/100th of a percent or, 0.00% (value is 0) to 100.00% (value is 10,000).
- In µC/OS-II, OSIntNesting keeps track of the number of interrupts nesting. µC/OS-III uses OSIntNestingCtr. The “Ctr” has been added to indicate that this variable is a counter.
- OSSchedNesting represents the number of times OSSchedLock() is called. µC/OS-III renames this variable to OSSchedLockNestingCtr to better represent the variable’s meaning.
- In µC/OS-II, OSTCBCur and OSTCBHighRdy are pointers to the OS_TCB of the current task, and to the OS_TCB of the highest-priority task that is ready-to-run. In µC/OS-III, these are renamed by adding the “Ptr” to indicate that they are pointers.
- The internal counter of the number of ticks since power up, or the last time the variable was changed through OSTimeSet(), has been renamed to better reflect its function.
- Changes in variable naming