mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/freertos_enable_port_optimized_task_selection_on_riscv_targets' into 'master'
freertos: Enable configUSE_PORT_OPTIMISED_TASK_SELECTION for RISC-V targets See merge request espressif/esp-idf!20652
This commit is contained in:
commit
7a58ffa972
@ -17,7 +17,11 @@
|
||||
|
||||
// ------------------ Scheduler Related --------------------
|
||||
|
||||
#ifdef CONFIG_FREERTOS_OPTIMIZED_SCHEDULER
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||
#else
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
|
||||
#endif
|
||||
#define configMAX_API_CALL_INTERRUPT_PRIORITY 0
|
||||
|
||||
/* ------------------------------------------------ ESP-IDF Additions --------------------------------------------------
|
||||
|
@ -399,6 +399,19 @@ FORCE_INLINE_ATTR BaseType_t xPortGetCoreID(void)
|
||||
#define portALT_GET_RUN_TIME_COUNTER_VALUE(x) do {x = (uint32_t)esp_timer_get_time();} while(0)
|
||||
#endif
|
||||
|
||||
// -------------- Optimized Task Selection -----------------
|
||||
|
||||
#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1
|
||||
/* 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 different priorities as tasks that share a priority will time slice.
|
||||
#endif
|
||||
|
||||
/* Store/clear the ready priorities in a bit map. */
|
||||
#define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )
|
||||
#define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )
|
||||
#define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31 - __builtin_clz( ( uxReadyPriorities ) ) )
|
||||
#endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */
|
||||
|
||||
|
||||
/* --------------------------------------------- Inline Implementations ------------------------------------------------
|
||||
|
@ -38,13 +38,12 @@ menu "FreeRTOS"
|
||||
details).
|
||||
|
||||
config FREERTOS_OPTIMIZED_SCHEDULER
|
||||
# Todo: Not available in SMP FREERTOS (IDF-4986)
|
||||
# Todo: Rename to CONFIG_FREERTOS_USE_PORT_OPTIMISED_TASK_SELECTION (IDF-4986)
|
||||
# Todo: Not available in SMP FREERTOS (IDF-3733)
|
||||
bool "configUSE_PORT_OPTIMISED_TASK_SELECTION"
|
||||
depends on FREERTOS_UNICORE
|
||||
default y
|
||||
help
|
||||
Enables port specific task selection method. This option can will speed up the search of ready tasks
|
||||
Enables port specific task selection method. This option can speed up the search of ready tasks
|
||||
when scheduling (see configUSE_PORT_OPTIMISED_TASK_SELECTION documentation for more details).
|
||||
|
||||
choice FREERTOS_CHECK_STACKOVERFLOW
|
||||
|
Loading…
x
Reference in New Issue
Block a user