mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
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:
@@ -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
|
||||||
|
@@ -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. */
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user