FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2005 Threads] an optimization to EventListPosted by ares.qi on June 22, 2005 Eventlist is sorted by ascending task's priority order, so lower priority task is in the front of the list and higher priority tasks is in the back of the list.
but in xTaskRemoveFromEventList(), at line 1287 in tasks.c , there is
pxUnblockedTCB = ( tskTCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); vListRemove( &( pxUnblockedTCB->xEventListItem ) );
from these code, we know we are glad to get the head of the list ---- remove the lowest task from the pxEventList. In common, this is not very effective, we should try out best to assure high priority task to use more system resource.
So when we remove a task from the pxEventList , we should always remove the highest priority task firstly, i think.
we can solve this problem by this:
(at line 1421 in task.c prvInitialiseTCBVariables() )
listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( portTickType ) uxPriority );
====changed to ====>>>
listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), configMAX_PRIORITIES - ( portTickType ) uxPriority );
RE: an optimization to EventListPosted by Richard on June 22, 2005 Again, this seems to be a good suggestion. Keep it up!
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|