freertos/Kconfig: make optimized task selection dependent on FREERTOS_UNICORE option
freertos: fix decrement loop of high priority task selection
This commit is contained in:
parent
2c612ec1dc
commit
5d7564a039
3 changed files with 4 additions and 3 deletions
|
@ -41,6 +41,7 @@ menu "FreeRTOS"
|
|||
|
||||
config FREERTOS_OPTIMIZED_SCHEDULER
|
||||
bool "Enable FreeRTOS pĺatform optimized scheduler"
|
||||
depends on FREERTOS_UNICORE
|
||||
default y
|
||||
help
|
||||
On most platforms there are instructions can speedup the ready task
|
||||
|
|
|
@ -476,7 +476,7 @@ void vApplicationSleep( TickType_t xExpectedIdleTime );
|
|||
|
||||
/* Check the configuration. */
|
||||
#if( configMAX_PRIORITIES > 32 )
|
||||
#error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 difference priorities as tasks that share a priority will time slice.
|
||||
#error configUSE_PORT_OPTIMISED_TASK_SELECTION can only be set to 1 when configMAX_PRIORITIES is less than or equal to 32. It is very rare that a system requires more than 10 to 15 different priorities as tasks that share a priority will time slice.
|
||||
#endif
|
||||
|
||||
/* Store/clear the ready priorities in a bit map. */
|
||||
|
|
|
@ -2782,7 +2782,7 @@ void vTaskSwitchContext( void )
|
|||
vPortCPUAcquireMutex( &xTaskQueueMutex );
|
||||
#endif
|
||||
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
#if !configUSE_PORT_OPTIMISED_TASK_SELECTION
|
||||
unsigned portBASE_TYPE foundNonExecutingWaiter = pdFALSE, ableToSchedule = pdFALSE, resetListHead;
|
||||
unsigned portBASE_TYPE holdTop=pdFALSE;
|
||||
tskTCB * pxTCB;
|
||||
|
@ -2863,7 +2863,7 @@ void vTaskSwitchContext( void )
|
|||
}
|
||||
} while ((ableToSchedule == pdFALSE) && (pxTCB != pxRefTCB));
|
||||
} else {
|
||||
if (!holdTop) uxTopReadyPriority--;
|
||||
if (!holdTop) --uxTopReadyPriority;
|
||||
}
|
||||
--uxDynamicTopReady;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue