rtel wrote on Friday, June 23, 2006:
> 1. In vTaskPrioritySet
> apart from changing a TCB’s uxPriority, we still need to chang TCB’s
> pxTCB->uxPriority = uxNewPriority;
> /* we have to add on this , i think */
> listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), configMAX_PRIORITIES -
> ( portTickType ) uxNewPriority );
I think you are correct. Thank you for bringing this to my attention, I will add a ‘known issue’ to the list on the download page of the FreeRTOS.org site.
This will have the effect of potentially an incorrect task being woken by an event if (1) Tasks of more than one priority are blocked waiting for the same event and (2) one of the blocked tasks has had it priority dynamically changed.
> 2. in vTaskCleanUpResources
> first , please tell me when and where i need to use this function
> second, we only remove xGenericListItem , but we may have to remove xEventListItem
> if necessisary , i think.
This function is only used by the demos that run on top of DOS. It is a tidy up exercise before returning to DOS following the conclusion of a debug session. It is in fact not required at all as DOS will automatically free memory allocated by a program when the program exists. I did not realise that at the time of writing - not being a DOS/Windows person.
Thanks ares.qi - keep up the good work!