Home |
RTKernel-32 Programming Manual Miscellaneous RTKernel-32 Operations Function RTKScheduler Function RTKSetTaskStartStopHook |
Function RTKSchedulerTo make task switches possible during cooperative scheduling, all tasks must regularly perform kernel calls. Function RTKScheduler has the sole purpose of performing task switches that may have become necessary: void RTKScheduler(void); RTKScheduler checks whether a task with a higher priority than the currently active task has become Ready; if so, a task switch to this task is performed. Optionally, RTKDelay(0) can be called. This, however, will also trigger task switches to tasks of the same priority (see section Function RTKDelay and Advanced Topics, Avoid Time Slicing). RTKScheduler is usually not required in preemptive scheduling mode, but it does no harm. RTKScheduler is very fast and it ensures that a piece of code runs smoothly with cooperative and preemptive scheduling.
|