OpenEdv-开源电子网

标题: freertos xTaskResumeAll函数中xPendingReadyList列表 [打印本页]

作者: 1597685605    时间: 2021-11-15 15:21
标题: freertos xTaskResumeAll函数中xPendingReadyList列表

请教下大佬们,xTaskResumeAll()函数中xPendingReadyList 链表插入节点,是在哪里插入的,本人菜鸟,求大佬指教
appropriate ready list. */
while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE )
{
        pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too.  Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
        ( void ) uxListRemove( &( pxTCB->xEventListItem ) );
        ( void ) uxListRemove( &( pxTCB->xStateListItem ) );
        prvAddTaskToReadyList( pxTCB );

        /* 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();
        }
}


作者: 正点原子    时间: 2021-11-16 02:33
帮顶
作者: unnormal    时间: 2021-11-16 08:21
我也是菜鸟    正在学习free  所以我也来凑个热闹   真正的解释还是让高手回答吧

我理解是这样的    一般在任务调度器挂起期间   产生了某个事件  此时  不能立即进行任务切换  所以把这些事件都放在 xPendingReadyList 这个列表中  一般都是中断产生时的操作   不过也有一种情况是  从事件列表中移除某一个任务情况   这样的话   当恢复任务调度器时,就需要把 xPendingReadyList 中的事件逐个处理
作者: 1597685605    时间: 2021-11-16 11:03
unnormal 发表于 2021-11-16 08:21
我也是菜鸟    正在学习free  所以我也来凑个热闹   真正的解释还是让高手回答吧

我理解是这样的    一 ...

感觉差不多是这个意思,就是什么时候这些任务插入到xPendingReadyList中的,我没找到,所以疑惑




欢迎光临 OpenEdv-开源电子网 (http://www.openedv.com:80/) Powered by Discuz! X3.4