Fix comments in list.h and clarify list usage in xTaskRemoveFromEventList (#289)

* Change instances of "descending" to "ascending" to match implementation.

* Uncrustify

* Clarify list usage in xTaskRemoveFromEventList
This commit is contained in:
Paul Bartell 2021-03-25 12:39:08 -07:00 committed by GitHub
parent 9efe10b805
commit 9b679c347c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 19 deletions

12
tasks.c
View file

@ -295,7 +295,6 @@ typedef struct tskTaskControlBlock /* The old naming convention is used to
#endif
#if ( configUSE_NEWLIB_REENTRANT == 1 )
/* Allocate a Newlib reent structure that is specific to this task.
* Note Newlib support has been included by popular demand, but is not
* used by the FreeRTOS maintainers themselves. FreeRTOS is not
@ -3093,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 );