mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
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:
parent
9efe10b805
commit
9b679c347c
2 changed files with 25 additions and 19 deletions
12
tasks.c
12
tasks.c
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue