mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-23 15:01:56 -04:00
Update for performance
This commit is contained in:
parent
8200e590f1
commit
2883653d9a
8
tasks.c
8
tasks.c
|
@ -4725,10 +4725,6 @@ BaseType_t xTaskIncrementTick( void )
|
||||||
TickType_t xItemValue;
|
TickType_t xItemValue;
|
||||||
BaseType_t xSwitchRequired = pdFALSE;
|
BaseType_t xSwitchRequired = pdFALSE;
|
||||||
|
|
||||||
#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 };
|
||||||
#endif /* #if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 ) */
|
#endif /* #if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 ) */
|
||||||
|
@ -4832,6 +4828,8 @@ BaseType_t xTaskIncrementTick( void )
|
||||||
{
|
{
|
||||||
#if ( configNUMBER_OF_CORES == 1 )
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
{
|
{
|
||||||
|
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
||||||
|
|
||||||
/* Preemption is on, but a context switch should
|
/* Preemption is on, but a context switch should
|
||||||
* only be performed if the unblocked task's
|
* only be performed if the unblocked task's
|
||||||
* priority is higher than the currently executing
|
* priority is higher than the currently executing
|
||||||
|
@ -4867,6 +4865,8 @@ BaseType_t xTaskIncrementTick( void )
|
||||||
{
|
{
|
||||||
#if ( configNUMBER_OF_CORES == 1 )
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
{
|
{
|
||||||
|
TCB_t * const pxConstCurrentTCB = prvGetCurrentTaskTCBUnsafe();
|
||||||
|
|
||||||
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxConstCurrentTCB->uxPriority ] ) ) > 1U )
|
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxConstCurrentTCB->uxPriority ] ) ) > 1U )
|
||||||
{
|
{
|
||||||
xSwitchRequired = pdTRUE;
|
xSwitchRequired = pdTRUE;
|
||||||
|
|
Loading…
Reference in a new issue