mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-10 08:07:46 -04:00
Fix UBaseType_t conversion for increment and decrement operations
This commit is contained in:
parent
0c0f9f3f62
commit
910891f21d
2 changed files with 6 additions and 6 deletions
|
@ -334,7 +334,7 @@ typedef struct xLIST
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
( pxItemToRemove )->pxContainer = NULL; \
|
( pxItemToRemove )->pxContainer = NULL; \
|
||||||
( ( pxList )->uxNumberOfItems ) -= ( UBaseType_t ) 1U; \
|
( ( pxList )->uxNumberOfItems ) = ( UBaseType_t ) ( ( ( pxList )->uxNumberOfItems ) - 1U ); \
|
||||||
} while( 0 )
|
} while( 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -381,7 +381,7 @@ typedef struct xLIST
|
||||||
/* Remember which list the item is in. */ \
|
/* Remember which list the item is in. */ \
|
||||||
( pxNewListItem )->pxContainer = ( pxList ); \
|
( pxNewListItem )->pxContainer = ( pxList ); \
|
||||||
\
|
\
|
||||||
( ( pxList )->uxNumberOfItems ) += ( UBaseType_t ) 1U; \
|
( ( pxList )->uxNumberOfItems ) = ( UBaseType_t ) ( ( ( pxList )->uxNumberOfItems ) + 1U ); \
|
||||||
} while( 0 )
|
} while( 0 )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
8
tasks.c
8
tasks.c
|
@ -255,7 +255,7 @@
|
||||||
pxTemp = pxDelayedTaskList; \
|
pxTemp = pxDelayedTaskList; \
|
||||||
pxDelayedTaskList = pxOverflowDelayedTaskList; \
|
pxDelayedTaskList = pxOverflowDelayedTaskList; \
|
||||||
pxOverflowDelayedTaskList = pxTemp; \
|
pxOverflowDelayedTaskList = pxTemp; \
|
||||||
xNumOfOverflows += ( BaseType_t ) 1; \
|
xNumOfOverflows = ( BaseType_t )( xNumOfOverflows + 1 ); \
|
||||||
prvResetNextTaskUnblockTime(); \
|
prvResetNextTaskUnblockTime(); \
|
||||||
} while( 0 )
|
} while( 0 )
|
||||||
|
|
||||||
|
@ -2022,7 +2022,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
* updated. */
|
* updated. */
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
uxCurrentNumberOfTasks += ( UBaseType_t ) 1U;
|
uxCurrentNumberOfTasks = ( UBaseType_t ) ( uxCurrentNumberOfTasks + 1U );
|
||||||
|
|
||||||
if( pxCurrentTCB == NULL )
|
if( pxCurrentTCB == NULL )
|
||||||
{
|
{
|
||||||
|
@ -3816,7 +3816,7 @@ void vTaskSuspendAll( void )
|
||||||
|
|
||||||
/* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment
|
/* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment
|
||||||
* is used to allow calls to vTaskSuspendAll() to nest. */
|
* is used to allow calls to vTaskSuspendAll() to nest. */
|
||||||
uxSchedulerSuspended += ( UBaseType_t ) 1U;
|
uxSchedulerSuspended = ( UBaseType_t ) ( uxSchedulerSuspended + 1U );
|
||||||
|
|
||||||
/* Enforces ordering for ports and optimised compilers that may otherwise place
|
/* Enforces ordering for ports and optimised compilers that may otherwise place
|
||||||
* the above increment elsewhere. */
|
* the above increment elsewhere. */
|
||||||
|
@ -3969,7 +3969,7 @@ BaseType_t xTaskResumeAll( void )
|
||||||
* previous call to vTaskSuspendAll(). */
|
* previous call to vTaskSuspendAll(). */
|
||||||
configASSERT( uxSchedulerSuspended != 0U );
|
configASSERT( uxSchedulerSuspended != 0U );
|
||||||
|
|
||||||
uxSchedulerSuspended -= ( UBaseType_t ) 1U;
|
uxSchedulerSuspended = ( UBaseType_t )( uxSchedulerSuspended - 1U );
|
||||||
portRELEASE_TASK_LOCK();
|
portRELEASE_TASK_LOCK();
|
||||||
|
|
||||||
if( uxSchedulerSuspended == ( UBaseType_t ) 0U )
|
if( uxSchedulerSuspended == ( UBaseType_t ) 0U )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue