mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-05-28 16:09:03 -04:00
Fix compiler error
This commit is contained in:
parent
c774dfda63
commit
69581faaa0
15
tasks.c
15
tasks.c
|
@ -463,6 +463,7 @@ typedef tskTCB TCB_t;
|
||||||
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-84 */
|
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-84 */
|
||||||
/* coverity[misra_c_2012_rule_8_4_violation] */
|
/* coverity[misra_c_2012_rule_8_4_violation] */
|
||||||
portDONT_DISCARD PRIVILEGED_DATA TCB_t * volatile pxCurrentTCBs[ configNUMBER_OF_CORES ];
|
portDONT_DISCARD PRIVILEGED_DATA TCB_t * volatile pxCurrentTCBs[ configNUMBER_OF_CORES ];
|
||||||
|
#define pxCurrentTCB prvGetCurrentTCBUnsafe()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Lists for ready and blocked tasks. --------------------
|
/* Lists for ready and blocked tasks. --------------------
|
||||||
|
@ -2810,7 +2811,6 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
TCB_t * pxTCB;
|
TCB_t * pxTCB;
|
||||||
UBaseType_t uxCurrentBasePriority, uxPriorityUsedOnEntry;
|
UBaseType_t uxCurrentBasePriority, uxPriorityUsedOnEntry;
|
||||||
BaseType_t xYieldRequired = pdFALSE;
|
BaseType_t xYieldRequired = pdFALSE;
|
||||||
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCB();
|
|
||||||
|
|
||||||
#if ( configNUMBER_OF_CORES > 1 )
|
#if ( configNUMBER_OF_CORES > 1 )
|
||||||
BaseType_t xYieldForTask = pdFALSE;
|
BaseType_t xYieldForTask = pdFALSE;
|
||||||
|
@ -2856,6 +2856,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
{
|
{
|
||||||
#if ( configNUMBER_OF_CORES == 1 )
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
{
|
{
|
||||||
|
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCB();
|
||||||
|
|
||||||
if( taskTASK_IS_RUNNING( pxTCB ) == pdFALSE )
|
if( taskTASK_IS_RUNNING( pxTCB ) == pdFALSE )
|
||||||
{
|
{
|
||||||
/* The priority of a task other than the currently
|
/* The priority of a task other than the currently
|
||||||
|
@ -3459,7 +3461,6 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
BaseType_t xYieldRequired = pdFALSE;
|
BaseType_t xYieldRequired = pdFALSE;
|
||||||
TCB_t * const pxTCB = xTaskToResume;
|
TCB_t * const pxTCB = xTaskToResume;
|
||||||
UBaseType_t uxSavedInterruptStatus;
|
UBaseType_t uxSavedInterruptStatus;
|
||||||
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
|
||||||
|
|
||||||
traceENTER_xTaskResumeFromISR( xTaskToResume );
|
traceENTER_xTaskResumeFromISR( xTaskToResume );
|
||||||
|
|
||||||
|
@ -3497,6 +3498,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
{
|
{
|
||||||
#if ( configNUMBER_OF_CORES == 1 )
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
{
|
{
|
||||||
|
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
||||||
|
|
||||||
/* Ready lists can be accessed so move the task from the
|
/* Ready lists can be accessed so move the task from the
|
||||||
* suspended list to the ready list directly. */
|
* suspended list to the ready list directly. */
|
||||||
if( pxTCB->uxPriority > pxConstCurrentTCB->uxPriority )
|
if( pxTCB->uxPriority > pxConstCurrentTCB->uxPriority )
|
||||||
|
@ -4019,7 +4022,6 @@ BaseType_t xTaskResumeAll( void )
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
{
|
{
|
||||||
BaseType_t xCoreID = portGET_CORE_ID();
|
BaseType_t xCoreID = portGET_CORE_ID();
|
||||||
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
|
||||||
|
|
||||||
/* If uxSchedulerSuspended is zero then this function does not match a
|
/* If uxSchedulerSuspended is zero then this function does not match a
|
||||||
* previous call to vTaskSuspendAll(). */
|
* previous call to vTaskSuspendAll(). */
|
||||||
|
@ -4047,6 +4049,8 @@ BaseType_t xTaskResumeAll( void )
|
||||||
|
|
||||||
#if ( configNUMBER_OF_CORES == 1 )
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
{
|
{
|
||||||
|
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
||||||
|
|
||||||
/* If the moved task has a priority higher than the current
|
/* If the moved task has a priority higher than the current
|
||||||
* task then a yield must be performed. */
|
* task then a yield must be performed. */
|
||||||
if( pxTCB->uxPriority > pxConstCurrentTCB->uxPriority )
|
if( pxTCB->uxPriority > pxConstCurrentTCB->uxPriority )
|
||||||
|
@ -4721,7 +4725,10 @@ BaseType_t xTaskIncrementTick( void )
|
||||||
TCB_t * pxTCB;
|
TCB_t * pxTCB;
|
||||||
TickType_t xItemValue;
|
TickType_t xItemValue;
|
||||||
BaseType_t xSwitchRequired = pdFALSE;
|
BaseType_t xSwitchRequired = pdFALSE;
|
||||||
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
|
||||||
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
|
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
||||||
|
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
|
||||||
|
|
||||||
#if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 )
|
#if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 )
|
||||||
BaseType_t xYieldRequiredForCore[ configNUMBER_OF_CORES ] = { pdFALSE };
|
BaseType_t xYieldRequiredForCore[ configNUMBER_OF_CORES ] = { pdFALSE };
|
||||||
|
|
Loading…
Reference in a new issue