发现啦
之前看的资料是原子丛书的左忠凯老师的FreeRTOS源码详解与应用开发的时间片调度部分,该部分仅仅仅仅仅仅仅仅针对于时间片调度实验而言,想了解更多还得看源码。
定位到xPortSysTickHandler函数的xTaskIncrementTick函数,
#if ( configUSE_PREEMPTION == 1 )
{
/* Preemption is on, but a context switch should
only be performed if the unblocked task has a
priority that is equal to or higher than the
currently executing task. */
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
{
xSwitchRequired = pdTRUE;
}
else
{
mtCOVERAGE_TEST_MARKER();
}
}
#endif /* configUSE_PREEMPTION */