219219#define prvAddTaskToReadyList ( pxTCB ) \
220220 traceMOVED_TASK_TO_READY_STATE( pxTCB ); \
221221 taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \
222- vListInsertEnd ( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \
222+ listINSERT_END ( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \
223223 tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
224224/*-----------------------------------------------------------*/
225225
@@ -2233,8 +2233,9 @@ BaseType_t xTaskResumeAll( void )
22332233 while ( listLIST_IS_EMPTY ( & xPendingReadyList ) == pdFALSE )
22342234 {
22352235 pxTCB = listGET_OWNER_OF_HEAD_ENTRY ( ( & xPendingReadyList ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
2236- ( void ) uxListRemove ( & ( pxTCB -> xEventListItem ) );
2237- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
2236+ listREMOVE_ITEM ( & ( pxTCB -> xEventListItem ) );
2237+ portMEMORY_BARRIER ();
2238+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
22382239 prvAddTaskToReadyList ( pxTCB );
22392240
22402241 /* If the moved task has a priority higher than or equal to
@@ -2794,13 +2795,13 @@ BaseType_t xTaskIncrementTick( void )
27942795 }
27952796
27962797 /* It is time to remove the item from the Blocked state. */
2797- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
2798+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
27982799
27992800 /* Is the task waiting on an event also? If so remove
28002801 * it from the event list. */
28012802 if ( listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) ) != NULL )
28022803 {
2803- ( void ) uxListRemove ( & ( pxTCB -> xEventListItem ) );
2804+ listREMOVE_ITEM ( & ( pxTCB -> xEventListItem ) );
28042805 }
28052806 else
28062807 {
@@ -3127,7 +3128,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList,
31273128 * event group implementation - and interrupts don't access event groups
31283129 * directly (instead they access them indirectly by pending function calls to
31293130 * the task level). */
3130- vListInsertEnd ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
3131+ listINSERT_END ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
31313132
31323133 prvAddCurrentTaskToDelayedList ( xTicksToWait , pdTRUE );
31333134}
@@ -3151,7 +3152,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList,
31513152 * In this case it is assume that this is the only task that is going to
31523153 * be waiting on this event list, so the faster vListInsertEnd() function
31533154 * can be used in place of vListInsert. */
3154- vListInsertEnd ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
3155+ listINSERT_END ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
31553156
31563157 /* If the task should block indefinitely then set the block time to a
31573158 * value that will be recognised as an indefinite delay inside the
@@ -3188,11 +3189,11 @@ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
31883189 * pxEventList is not empty. */
31893190 pxUnblockedTCB = listGET_OWNER_OF_HEAD_ENTRY ( pxEventList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
31903191 configASSERT ( pxUnblockedTCB );
3191- ( void ) uxListRemove ( & ( pxUnblockedTCB -> xEventListItem ) );
3192+ listREMOVE_ITEM ( & ( pxUnblockedTCB -> xEventListItem ) );
31923193
31933194 if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
31943195 {
3195- ( void ) uxListRemove ( & ( pxUnblockedTCB -> xStateListItem ) );
3196+ listREMOVE_ITEM ( & ( pxUnblockedTCB -> xStateListItem ) );
31963197 prvAddTaskToReadyList ( pxUnblockedTCB );
31973198
31983199 #if ( configUSE_TICKLESS_IDLE != 0 )
@@ -3213,7 +3214,7 @@ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
32133214 {
32143215 /* The delayed and ready lists cannot be accessed, so hold this task
32153216 * pending until the scheduler is resumed. */
3216- vListInsertEnd ( & ( xPendingReadyList ), & ( pxUnblockedTCB -> xEventListItem ) );
3217+ listINSERT_END ( & ( xPendingReadyList ), & ( pxUnblockedTCB -> xEventListItem ) );
32173218 }
32183219
32193220 if ( pxUnblockedTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -3252,7 +3253,7 @@ void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem,
32523253 * event flags. */
32533254 pxUnblockedTCB = listGET_LIST_ITEM_OWNER ( pxEventListItem ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */
32543255 configASSERT ( pxUnblockedTCB );
3255- ( void ) uxListRemove ( pxEventListItem );
3256+ listREMOVE_ITEM ( pxEventListItem );
32563257
32573258 #if ( configUSE_TICKLESS_IDLE != 0 )
32583259 {
@@ -3271,7 +3272,7 @@ void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem,
32713272 /* Remove the task from the delayed list and add it to the ready list. The
32723273 * scheduler is suspended so interrupts will not be accessing the ready
32733274 * lists. */
3274- ( void ) uxListRemove ( & ( pxUnblockedTCB -> xStateListItem ) );
3275+ listREMOVE_ITEM ( & ( pxUnblockedTCB -> xStateListItem ) );
32753276 prvAddTaskToReadyList ( pxUnblockedTCB );
32763277
32773278 if ( pxUnblockedTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -4922,7 +4923,7 @@ TickType_t uxTaskResetEventItemValue( void )
49224923 * notification then unblock it now. */
49234924 if ( ucOriginalNotifyState == taskWAITING_NOTIFICATION )
49244925 {
4925- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
4926+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
49264927 prvAddTaskToReadyList ( pxTCB );
49274928
49284929 /* The task should not have been on an event list. */
@@ -5069,14 +5070,14 @@ TickType_t uxTaskResetEventItemValue( void )
50695070
50705071 if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
50715072 {
5072- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
5073+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
50735074 prvAddTaskToReadyList ( pxTCB );
50745075 }
50755076 else
50765077 {
50775078 /* The delayed and ready lists cannot be accessed, so hold
50785079 * this task pending until the scheduler is resumed. */
5079- vListInsertEnd ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
5080+ listINSERT_END ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
50805081 }
50815082
50825083 if ( pxTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -5160,14 +5161,14 @@ TickType_t uxTaskResetEventItemValue( void )
51605161
51615162 if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
51625163 {
5163- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
5164+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
51645165 prvAddTaskToReadyList ( pxTCB );
51655166 }
51665167 else
51675168 {
51685169 /* The delayed and ready lists cannot be accessed, so hold
51695170 * this task pending until the scheduler is resumed. */
5170- vListInsertEnd ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
5171+ listINSERT_END ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
51715172 }
51725173
51735174 if ( pxTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -5303,7 +5304,7 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait,
53035304 /* Add the task to the suspended task list instead of a delayed task
53045305 * list to ensure it is not woken by a timing event. It will block
53055306 * indefinitely. */
5306- vListInsertEnd ( & xSuspendedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
5307+ listINSERT_END ( & xSuspendedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
53075308 }
53085309 else
53095310 {
0 commit comments