Clarify list usage in xTaskRemoveFromEventList

This commit is contained in:
Paul Bartell 2021-03-24 13:07:12 -07:00
parent 7649ebabd5
commit f99a788336

11
tasks.c
View file

@ -3092,8 +3092,15 @@ void vTaskPlaceOnEventList( List_t * const pxEventList,
/* Place the event list item of the TCB in the appropriate event list.
* This is placed in the list in priority order so the highest priority task
* is the first to be woken by the event. The queue that contains the event
* list is locked, preventing simultaneous access from interrupts. */
* is the first to be woken by the event.
*
* Note: Lists are sorted in ascending order by ListItem_t.xItemValue.
* Normally, the xItemValue of a TCB's ListItem_t members is:
* xItemValue = ( configMAX_PRIORITIES - uxPriority )
* Therefore, the event list is sorted in descending priority order.
*
* The queue that contains the event list is locked, preventing
* simultaneous access from interrupts. */
vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) );
prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE );