@@ -387,7 +387,7 @@ const volatile UBaseType_t uxTopUsedPriority = configMAX_PRIORITIES - 1U;
387387 * kernel to move the task from the pending ready list into the real ready list
388388 * when the scheduler is unsuspended. The pending ready list itself can only be
389389 * 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 ;
391391
392392#if ( configGENERATE_RUN_TIME_STATS == 1 )
393393
@@ -1200,7 +1200,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
12001200 {
12011201 if ( pxTCB == pxCurrentTCB )
12021202 {
1203- configASSERT ( uxSchedulerSuspended == 0 );
1203+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
12041204 portYIELD_WITHIN_API ();
12051205 }
12061206 else
@@ -1223,7 +1223,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
12231223
12241224 configASSERT ( pxPreviousWakeTime );
12251225 configASSERT ( ( xTimeIncrement > 0U ) );
1226- configASSERT ( uxSchedulerSuspended == 0 );
1226+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
12271227
12281228 vTaskSuspendAll ();
12291229 {
@@ -1309,7 +1309,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
13091309 /* A delay time of zero just forces a reschedule. */
13101310 if ( xTicksToDelay > ( TickType_t ) 0U )
13111311 {
1312- configASSERT ( uxSchedulerSuspended == 0 );
1312+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
13131313 vTaskSuspendAll ();
13141314 {
13151315 traceTASK_DELAY ();
@@ -1748,7 +1748,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
17481748 if ( xSchedulerRunning != pdFALSE )
17491749 {
17501750 /* The current task has just been suspended. */
1751- configASSERT ( uxSchedulerSuspended == 0 );
1751+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
17521752 portYIELD_WITHIN_API ();
17531753 }
17541754 else
@@ -1914,7 +1914,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
19141914 traceTASK_RESUME_FROM_ISR ( pxTCB );
19151915
19161916 /* Check the ready lists can be accessed. */
1917- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
1917+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
19181918 {
19191919 /* Ready lists can be accessed so move the task from the
19201920 * suspended list to the ready list directly. */
@@ -2183,7 +2183,7 @@ BaseType_t xTaskResumeAll( void )
21832183
21842184 /* If uxSchedulerSuspended is zero then this function does not match a
21852185 * previous call to vTaskSuspendAll(). */
2186- configASSERT ( uxSchedulerSuspended );
2186+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
21872187
21882188 /* It is possible that an ISR caused a task to be removed from an event
21892189 * list while the scheduler was suspended. If this was the case then the
@@ -2194,7 +2194,7 @@ BaseType_t xTaskResumeAll( void )
21942194 {
21952195 -- uxSchedulerSuspended ;
21962196
2197- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
2197+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
21982198 {
21992199 if ( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U )
22002200 {
@@ -2642,7 +2642,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) /*lint !e971 Unqualified char
26422642 /* Arrange for xTickCount to reach xNextTaskUnblockTime in
26432643 * xTaskIncrementTick() when the scheduler resumes. This ensures
26442644 * that any delayed tasks are resumed at the correct time. */
2645- configASSERT ( uxSchedulerSuspended );
2645+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
26462646 configASSERT ( xTicksToJump != ( TickType_t ) 0 );
26472647
26482648 /* Prevent the tick interrupt modifying xPendedTicks simultaneously. */
@@ -2671,7 +2671,7 @@ BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp )
26712671
26722672 /* Must not be called with the scheduler suspended as the implementation
26732673 * relies on xPendedTicks being wound down to 0 in xTaskResumeAll(). */
2674- configASSERT ( uxSchedulerSuspended == 0 );
2674+ configASSERT ( uxSchedulerSuspended == ( UBaseType_t ) 0U );
26752675
26762676 /* Use xPendedTicks to mimic xTicksToCatchUp number of ticks occurring when
26772677 * the scheduler is suspended so the ticks are executed in xTaskResumeAll(). */
@@ -2780,7 +2780,7 @@ BaseType_t xTaskIncrementTick( void )
27802780 * tasks to be unblocked. */
27812781 traceTASK_INCREMENT_TICK ( xTickCount );
27822782
2783- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
2783+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
27842784 {
27852785 /* Minor optimisation. The tick count cannot change in this
27862786 * block. */
@@ -3060,7 +3060,7 @@ BaseType_t xTaskIncrementTick( void )
30603060
30613061void vTaskSwitchContext ( void )
30623062{
3063- if ( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE )
3063+ if ( uxSchedulerSuspended != ( UBaseType_t ) 0U )
30643064 {
30653065 /* The scheduler is currently suspended - do not allow a context
30663066 * switch. */
@@ -3165,7 +3165,7 @@ void vTaskPlaceOnUnorderedEventList( List_t * pxEventList,
31653165
31663166 /* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. It is used by
31673167 * the event groups implementation. */
3168- configASSERT ( uxSchedulerSuspended != 0 );
3168+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
31693169
31703170 /* Store the item value in the event list item. It is safe to access the
31713171 * 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 )
32403240 configASSERT ( pxUnblockedTCB );
32413241 listREMOVE_ITEM ( & ( pxUnblockedTCB -> xEventListItem ) );
32423242
3243- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
3243+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
32443244 {
32453245 listREMOVE_ITEM ( & ( pxUnblockedTCB -> xStateListItem ) );
32463246 prvAddTaskToReadyList ( pxUnblockedTCB );
@@ -3293,7 +3293,7 @@ void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem,
32933293
32943294 /* THIS FUNCTION MUST BE CALLED WITH THE SCHEDULER SUSPENDED. It is used by
32953295 * the event flags implementation. */
3296- configASSERT ( uxSchedulerSuspended != pdFALSE );
3296+ configASSERT ( uxSchedulerSuspended != ( UBaseType_t ) 0U );
32973297
32983298 /* Store the new item value in the event list. */
32993299 listSET_LIST_ITEM_VALUE ( pxEventListItem , xItemValue | taskEVENT_LIST_ITEM_VALUE_IN_USE );
@@ -4093,7 +4093,7 @@ static void prvResetNextTaskUnblockTime( void )
40934093 }
40944094 else
40954095 {
4096- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
4096+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
40974097 {
40984098 xReturn = taskSCHEDULER_RUNNING ;
40994099 }
@@ -5113,7 +5113,7 @@ TickType_t uxTaskResetEventItemValue( void )
51135113 /* The task should not have been on an event list. */
51145114 configASSERT ( listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) ) == NULL );
51155115
5116- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
5116+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
51175117 {
51185118 listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
51195119 prvAddTaskToReadyList ( pxTCB );
@@ -5204,7 +5204,7 @@ TickType_t uxTaskResetEventItemValue( void )
52045204 /* The task should not have been on an event list. */
52055205 configASSERT ( listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) ) == NULL );
52065206
5207- if ( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE )
5207+ if ( uxSchedulerSuspended == ( UBaseType_t ) 0U )
52085208 {
52095209 listREMOVE_ITEM ( & ( pxTCB -> xStateListItem ) );
52105210 prvAddTaskToReadyList ( pxTCB );
0 commit comments