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:
Felipe Neves 2019-11-11 09:54:15 +08:00
parent 2c612ec1dc
commit 5d7564a039
3 changed files with 4 additions and 3 deletions

View file

@ -41,6 +41,7 @@ menu "FreeRTOS"
config FREERTOS_OPTIMIZED_SCHEDULER config FREERTOS_OPTIMIZED_SCHEDULER
bool "Enable FreeRTOS pĺatform optimized scheduler" bool "Enable FreeRTOS pĺatform optimized scheduler"
depends on FREERTOS_UNICORE
default y default y
help help
On most platforms there are instructions can speedup the ready task On most platforms there are instructions can speedup the ready task

View file

@ -476,7 +476,7 @@ void vApplicationSleep( TickType_t xExpectedIdleTime );
/* Check the configuration. */ /* Check the configuration. */
#if( configMAX_PRIORITIES > 32 ) #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 #endif
/* Store/clear the ready priorities in a bit map. */ /* Store/clear the ready priorities in a bit map. */

View file

@ -2782,7 +2782,7 @@ void vTaskSwitchContext( void )
vPortCPUAcquireMutex( &xTaskQueueMutex ); vPortCPUAcquireMutex( &xTaskQueueMutex );
#endif #endif
#if !CONFIG_FREERTOS_UNICORE #if !configUSE_PORT_OPTIMISED_TASK_SELECTION
unsigned portBASE_TYPE foundNonExecutingWaiter = pdFALSE, ableToSchedule = pdFALSE, resetListHead; unsigned portBASE_TYPE foundNonExecutingWaiter = pdFALSE, ableToSchedule = pdFALSE, resetListHead;
unsigned portBASE_TYPE holdTop=pdFALSE; unsigned portBASE_TYPE holdTop=pdFALSE;
tskTCB * pxTCB; tskTCB * pxTCB;
@ -2863,7 +2863,7 @@ void vTaskSwitchContext( void )
} }
} while ((ableToSchedule == pdFALSE) && (pxTCB != pxRefTCB)); } while ((ableToSchedule == pdFALSE) && (pxTCB != pxRefTCB));
} else { } else {
if (!holdTop) uxTopReadyPriority--; if (!holdTop) --uxTopReadyPriority;
} }
--uxDynamicTopReady; --uxDynamicTopReady;
} }