Global¶
- group Global_switchScheduler
switchScheduler globals
lorem
Variables¶
- group Variables_switchScheduler_h
API’s¶
- group Apis_switchScheduler_h
Getters¶
- group Getters_switchScheduler_h
Setters¶
- group Setters_switchScheduler_h
General¶
- group General_switchScheduler_h
Defines
-
switchScheduler_classicScheduling(schedulerCfg, schedulableCfg, stackPointerRetVal, timerTicks, startTick, currentTick)¶
Classic scheduling function. DEMO.
- Parameters
CosmOS_SchedulerConfigurationType – * schedulerCfg
CosmOS_SchedulableConfigurationType – * schedulableCfg
StackPointerType – [in] * stackPointerRetVal
BitWidthType – [in] * timerTicks
BitWidthType – [in] startTick
BitWidthType – [in] currentTick
- Returns
none
-
switchScheduler_performanceScheduling(schedulerCfg, schedulableCfg, stackPointerRetVal, timerTicks)¶
-
switchScheduler_schedulable_setStackPointer(priorSchedulableCfg, stackPointer)¶
-
switchScheduler_updateAlarms(coreCfg, priorTickStep)¶
Functions
-
void scheduler_performanceScheduling(CosmOS_SchedulerConfigurationType *schedulerVar, CosmOS_SchedulableConfigurationType **schedulableCfg, StackPointerType *stackPointerRetVal, BitWidthType *timerTicks)¶
Performance scheduling function. This function cannot be called from the unprivileged context directly. DEMO.
Performance scheduling function. DEMO.
The implementation contains obtaining of the thread list elements number by calling scheduler_getSchedulerThreadListElementsNum function. Then the for loop is implemented that iterates over all possible thread identifiers and uses them for obtaining thread variable by calling function scheduler_getSchedulerThreadListThreadVar. From the thread variable is the schedulable variable extracted by calling thread_getThreadSchedulable function and the schedulable state is obtained by calling function schedulable_getState. Then the if condition is implemented that checks if the schedulable state is equal to the SCHEDULABLE_STATE_ENUM__READY and if yes the for loop breaks, otherwise continues till it finds thread in ready state for execution. The thread list is priority sorted and has to contain as the lowest priority thread the idle thread. The found schedulable variable from the for loop is then used in the function schedulable_getStackPointer to get its stack pointer and the preempt tick is obtained by calling function scheduler_getSchedulerPreemptTick and passed to the timer ticks.
- Parameters
scheduler – [in] configuration pointerVar
schedulableCfg – [in] pointer
stackPointerRetVal – [in] stack pointer of the current schedulable
timerTicks – [in] timer ticks to set, usually preempt period
CosmOS_SchedulerConfigurationType – * schedulerCfg
CosmOS_SchedulableConfigurationType – * schedulableCfg
StackPointerType – [in] * stackPointerRetVal
BitWidthType – [in] * timerTicks
- Returns
none
- Returns
none
-
switchScheduler_classicScheduling(schedulerCfg, schedulableCfg, stackPointerRetVal, timerTicks, startTick, currentTick)¶