if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority )
{
/* Return true if the task removed from the event list has a higher
priority than the calling task. This allows the calling task to know if
it should force a context switch now. */
xReturn = pdTRUE;
/* Mark that a yield is pending in case the user is not using the
"xHigherPriorityTaskWoken" parameter to an ISR safe FreeRTOS function. */
xYieldPending = pdTRUE;
}
xYieldPending 这个变量被设置了为真;
/* Called by the portable layer each time a tick interrupt occurs. Increments the tick then checks to see if the new tick value will cause any
tasks to be unblocked. */ traceTASK_INCREMENT_TICK( xTickCount );
if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) {
/* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */
++xTickCount;
}
else {
++uxPendedTicks;
/* The tick hook gets called at regular intervals, even if the scheduler is locked. */
#if ( configUSE_TICK_HOOK == 1 ) {
vApplicationTickHook(); }
#endif }
/* If the moved task has a priority higher than the current
task then a yield must be performed. */
if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority )
{ xYieldPending = pdTRUE;//指示可以调度,任务已经被移到 就绪表中了 从 挂起就绪表;
}
else
{
mtCOVERAGE_TEST_MARKER();
}