@@ -387,7 +387,7 @@ const volatile UBaseType_t uxTopUsedPriority = configMAX_PRIORITIES - 1U;
387
387
* kernel to move the task from the pending ready list into the real ready list
388
388
* when the scheduler is unsuspended. The pending ready list itself can only be
389
389
* accessed from a critical section. */
390
- PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended = ( UBaseType_t ) pdFALSE ;
390
+ PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended = ( UBaseType_t ) 0U ;
391
391
392
392
#if ( configGENERATE_RUN_TIME_STATS == 1 )
393
393
@@ -1200,7 +1200,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1200
1200
{
1201
1201
if ( pxTCB == pxCurrentTCB )
1202
1202
{
1203
- configASSERT ( uxSchedulerSuspended == 0 );
1203
+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
1204
1204
portYIELD_WITHIN_API ();
1205
1205
}
1206
1206
else
@@ -1223,7 +1223,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1223
1223
1224
1224
configASSERT ( pxPreviousWakeTime );
1225
1225
configASSERT ( ( xTimeIncrement > 0U ) );
1226
- configASSERT ( uxSchedulerSuspended == 0 );
1226
+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
1227
1227
1228
1228
vTaskSuspendAll ();
1229
1229
{
@@ -1309,7 +1309,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1309
1309
/* A delay time of zero just forces a reschedule. */
1310
1310
if ( xTicksToDelay > ( TickType_t ) 0U )
1311
1311
{
1312
- configASSERT ( uxSchedulerSuspended == 0 );
1312
+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
1313
1313
vTaskSuspendAll ();
1314
1314
{
1315
1315
traceTASK_DELAY ();
@@ -1748,7 +1748,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1748
1748
if ( xSchedulerRunning != pdFALSE )
1749
1749
{
1750
1750
/* The current task has just been suspended. */
1751
- configASSERT ( uxSchedulerSuspended == 0 );
1751
+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
1752
1752
portYIELD_WITHIN_API ();
1753
1753
}
1754
1754
else
@@ -1914,7 +1914,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1914
1914
traceTASK_RESUME_FROM_ISR ( pxTCB );
1915
1915
1916
1916
/* Check the ready lists can be accessed. */
1917
- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
1917
+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
1918
1918
{
1919
1919
/* Ready lists can be accessed so move the task from the
1920
1920
* suspended list to the ready list directly. */
@@ -2183,7 +2183,7 @@ BaseType_t xTaskResumeAll( void )
2183
2183
2184
2184
/* If uxSchedulerSuspended is zero then this function does not match a
2185
2185
* previous call to vTaskSuspendAll(). */
2186
- configASSERT ( uxSchedulerSuspended );
2186
+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
2187
2187
2188
2188
/* It is possible that an ISR caused a task to be removed from an event
2189
2189
* list while the scheduler was suspended. If this was the case then the
@@ -2194,7 +2194,7 @@ BaseType_t xTaskResumeAll( void )
2194
2194
{
2195
2195
-- uxSchedulerSuspended ;
2196
2196
2197
- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
2197
+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
2198
2198
{
2199
2199
if ( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U )
2200
2200
{
@@ -2642,7 +2642,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) /*lint !e971 Unqualified char
2642
2642
/* Arrange for xTickCount to reach xNextTaskUnblockTime in
2643
2643
* xTaskIncrementTick() when the scheduler resumes. This ensures
2644
2644
* that any delayed tasks are resumed at the correct time. */
2645
- configASSERT ( uxSchedulerSuspended );
2645
+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
2646
2646
configASSERT ( xTicksToJump != ( TickType_t ) 0 );
2647
2647
2648
2648
/* Prevent the tick interrupt modifying xPendedTicks simultaneously. */
@@ -2671,7 +2671,7 @@ BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp )
2671
2671
2672
2672
/* Must not be called with the scheduler suspended as the implementation
2673
2673
* relies on xPendedTicks being wound down to 0 in xTaskResumeAll(). */
2674
- configASSERT ( uxSchedulerSuspended == 0 );
2674
+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
2675
2675
2676
2676
/* Use xPendedTicks to mimic xTicksToCatchUp number of ticks occurring when
2677
2677
* the scheduler is suspended so the ticks are executed in xTaskResumeAll(). */
@@ -2780,7 +2780,7 @@ BaseType_t xTaskIncrementTick( void )
2780
2780
* tasks to be unblocked. */
2781
2781
traceTASK_INCREMENT_TICK ( xTickCount );
2782
2782
2783
- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
2783
+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
2784
2784
{
2785
2785
/* Minor optimisation. The tick count cannot change in this
2786
2786
* block. */
@@ -3060,7 +3060,7 @@ BaseType_t xTaskIncrementTick( void )
3060
3060
3061
3061
void vTaskSwitchContext ( void )
3062
3062
{
3063
- if ( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
3063
+ if ( uxSchedulerSuspended != ( UBaseType_t ) 0U )
3064
3064
{
3065
3065
/* The scheduler is currently suspended - do not allow a context
3066
3066
* switch. */
@@ -3165,7 +3165,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList,
3165
3165
3166
3166
/* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. It is used by
3167
3167
* the event groups implementation. */
3168
- configASSERT ( uxSchedulerSuspended != 0 );
3168
+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
3169
3169
3170
3170
/* Store the item value in the event list item. It is safe to access the
3171
3171
* event list item here as interrupts won't access the event list item of a
@@ -3240,7 +3240,7 @@ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList )
3240
3240
configASSERT ( pxUnblockedTCB );
3241
3241
listREMOVE_ITEM ( & ( pxUnblockedTCB -> xEventListItem ) );
3242
3242
3243
- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
3243
+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
3244
3244
{
3245
3245
listREMOVE_ITEM ( & ( pxUnblockedTCB -> xStateListItem ) );
3246
3246
prvAddTaskToReadyList ( pxUnblockedTCB );
@@ -3293,7 +3293,7 @@ void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem,
3293
3293
3294
3294
/* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. It is used by
3295
3295
* the event flags implementation. */
3296
- configASSERT ( uxSchedulerSuspended != pdFALSE );
3296
+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
3297
3297
3298
3298
/* Store the new item value in the event list. */
3299
3299
listSET_LIST_ITEM_VALUE ( pxEventListItem , xItemValue | taskEVENT_LIST_ITEM_VALUE_IN_USE );
@@ -4093,7 +4093,7 @@ static void prvResetNextTaskUnblockTime( void )
4093
4093
}
4094
4094
else
4095
4095
{
4096
- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
4096
+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
4097
4097
{
4098
4098
xReturn = taskSCHEDULER_RUNNING ;
4099
4099
}
@@ -5113,7 +5113,7 @@ TickType_t uxTaskResetEventItemValue( void )
5113
5113
/* The task should not have been on an event list. */
5114
5114
configASSERT ( listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) ) == NULL );
5115
5115
5116
- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
5116
+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
5117
5117
{
5118
5118
listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
5119
5119
prvAddTaskToReadyList ( pxTCB );
@@ -5204,7 +5204,7 @@ TickType_t uxTaskResetEventItemValue( void )
5204
5204
/* The task should not have been on an event list. */
5205
5205
configASSERT ( listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) ) == NULL );
5206
5206
5207
- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
5207
+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
5208
5208
{
5209
5209
listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
5210
5210
prvAddTaskToReadyList ( pxTCB );
0 commit comments