219
219
#define prvAddTaskToReadyList ( pxTCB ) \
220
220
traceMOVED_TASK_TO_READY_STATE( pxTCB ); \
221
221
taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \
222
- vListInsertEnd ( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \
222
+ listINSERT_END ( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \
223
223
tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
224
224
/*-----------------------------------------------------------*/
225
225
@@ -2233,8 +2233,9 @@ BaseType_t xTaskResumeAll( void )
2233
2233
while ( listLIST_IS_EMPTY ( & xPendingReadyList ) == pdFALSE )
2234
2234
{
2235
2235
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 ) );
2238
2239
prvAddTaskToReadyList ( pxTCB );
2239
2240
2240
2241
/* If the moved task has a priority higher than or equal to
@@ -2794,13 +2795,13 @@ BaseType_t xTaskIncrementTick( void )
2794
2795
}
2795
2796
2796
2797
/* It is time to remove the item from the Blocked state. */
2797
- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
2798
+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
2798
2799
2799
2800
/* Is the task waiting on an event also? If so remove
2800
2801
* it from the event list. */
2801
2802
if ( listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) ) != NULL )
2802
2803
{
2803
- ( void ) uxListRemove ( & ( pxTCB -> xEventListItem ) );
2804
+ listREMOVE_ITEM ( & ( pxTCB -> xEventListItem ) );
2804
2805
}
2805
2806
else
2806
2807
{
@@ -3127,7 +3128,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList,
3127
3128
* event group implementation - and interrupts don't access event groups
3128
3129
* directly (instead they access them indirectly by pending function calls to
3129
3130
* the task level). */
3130
- vListInsertEnd ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
3131
+ listINSERT_END ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
3131
3132
3132
3133
prvAddCurrentTaskToDelayedList ( xTicksToWait , pdTRUE );
3133
3134
}
@@ -3151,7 +3152,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList,
3151
3152
* In this case it is assume that this is the only task that is going to
3152
3153
* be waiting on this event list, so the faster vListInsertEnd() function
3153
3154
* can be used in place of vListInsert. */
3154
- vListInsertEnd ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
3155
+ listINSERT_END ( pxEventList , & ( pxCurrentTCB -> xEventListItem ) );
3155
3156
3156
3157
/* If the task should block indefinitely then set the block time to a
3157
3158
* value that will be recognised as an indefinite delay inside the
@@ -3188,11 +3189,11 @@ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
3188
3189
* pxEventList is not empty. */
3189
3190
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. */
3190
3191
configASSERT ( pxUnblockedTCB );
3191
- ( void ) uxListRemove ( & ( pxUnblockedTCB -> xEventListItem ) );
3192
+ listREMOVE_ITEM ( & ( pxUnblockedTCB -> xEventListItem ) );
3192
3193
3193
3194
if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
3194
3195
{
3195
- ( void ) uxListRemove ( & ( pxUnblockedTCB -> xStateListItem ) );
3196
+ listREMOVE_ITEM ( & ( pxUnblockedTCB -> xStateListItem ) );
3196
3197
prvAddTaskToReadyList ( pxUnblockedTCB );
3197
3198
3198
3199
#if ( configUSE_TICKLESS_IDLE != 0 )
@@ -3213,7 +3214,7 @@ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
3213
3214
{
3214
3215
/* The delayed and ready lists cannot be accessed, so hold this task
3215
3216
* pending until the scheduler is resumed. */
3216
- vListInsertEnd ( & ( xPendingReadyList ), & ( pxUnblockedTCB -> xEventListItem ) );
3217
+ listINSERT_END ( & ( xPendingReadyList ), & ( pxUnblockedTCB -> xEventListItem ) );
3217
3218
}
3218
3219
3219
3220
if ( pxUnblockedTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -3252,7 +3253,7 @@ void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem,
3252
3253
* event flags. */
3253
3254
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. */
3254
3255
configASSERT ( pxUnblockedTCB );
3255
- ( void ) uxListRemove ( pxEventListItem );
3256
+ listREMOVE_ITEM ( pxEventListItem );
3256
3257
3257
3258
#if ( configUSE_TICKLESS_IDLE != 0 )
3258
3259
{
@@ -3271,7 +3272,7 @@ void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem,
3271
3272
/* Remove the task from the delayed list and add it to the ready list. The
3272
3273
* scheduler is suspended so interrupts will not be accessing the ready
3273
3274
* lists. */
3274
- ( void ) uxListRemove ( & ( pxUnblockedTCB -> xStateListItem ) );
3275
+ listREMOVE_ITEM ( & ( pxUnblockedTCB -> xStateListItem ) );
3275
3276
prvAddTaskToReadyList ( pxUnblockedTCB );
3276
3277
3277
3278
if ( pxUnblockedTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -4922,7 +4923,7 @@ TickType_t uxTaskResetEventItemValue( void )
4922
4923
* notification then unblock it now. */
4923
4924
if ( ucOriginalNotifyState == taskWAITING_NOTIFICATION )
4924
4925
{
4925
- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
4926
+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
4926
4927
prvAddTaskToReadyList ( pxTCB );
4927
4928
4928
4929
/* The task should not have been on an event list. */
@@ -5069,14 +5070,14 @@ TickType_t uxTaskResetEventItemValue( void )
5069
5070
5070
5071
if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
5071
5072
{
5072
- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
5073
+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
5073
5074
prvAddTaskToReadyList ( pxTCB );
5074
5075
}
5075
5076
else
5076
5077
{
5077
5078
/* The delayed and ready lists cannot be accessed, so hold
5078
5079
* this task pending until the scheduler is resumed. */
5079
- vListInsertEnd ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
5080
+ listINSERT_END ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
5080
5081
}
5081
5082
5082
5083
if ( pxTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -5160,14 +5161,14 @@ TickType_t uxTaskResetEventItemValue( void )
5160
5161
5161
5162
if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
5162
5163
{
5163
- ( void ) uxListRemove ( & ( pxTCB -> xStateListItem ) );
5164
+ listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
5164
5165
prvAddTaskToReadyList ( pxTCB );
5165
5166
}
5166
5167
else
5167
5168
{
5168
5169
/* The delayed and ready lists cannot be accessed, so hold
5169
5170
* this task pending until the scheduler is resumed. */
5170
- vListInsertEnd ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
5171
+ listINSERT_END ( & ( xPendingReadyList ), & ( pxTCB -> xEventListItem ) );
5171
5172
}
5172
5173
5173
5174
if ( pxTCB -> uxPriority > pxCurrentTCB -> uxPriority )
@@ -5303,7 +5304,7 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait,
5303
5304
/* Add the task to the suspended task list instead of a delayed task
5304
5305
* list to ensure it is not woken by a timing event. It will block
5305
5306
* indefinitely. */
5306
- vListInsertEnd ( & xSuspendedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
5307
+ listINSERT_END ( & xSuspendedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
5307
5308
}
5308
5309
else
5309
5310
{
0 commit comments