feat(freertos): Add SMP kernel changes to FreeRTOS v10.5.1

This commit adds the key kernel changes to the v10.5.1 kernel to support
dual-core SMP. These changes are temporarily documented in the `idf_changes.md`
document. This commit...

- Added changes to kernel data structures to support multiple cores
- Changes to scheduling algorithm support SMP scheduling.
- Changes to each FreeRTOS function to support multiple cores and SMP
scheduling algorithm.
This commit is contained in:
Darian Leung
2023-09-15 00:35:31 +08:00
parent ae80ad7ac7
commit db64e51e53
11 changed files with 1670 additions and 717 deletions

View File

@@ -107,7 +107,7 @@
/* ----------------------- System -------------------------- */
#define configMAX_TASK_NAME_LEN CONFIG_FREERTOS_MAX_TASK_NAME_LEN
#define configMAX_TASK_NAME_LEN CONFIG_FREERTOS_MAX_TASK_NAME_LEN
/* If deletion callbacks are enabled, the number of TLSP's are doubled (i.e.,
* the length of the TCB's pvThreadLocalStoragePointersThis array). This allows
@@ -257,10 +257,12 @@
#if !CONFIG_FREERTOS_SMP
#ifdef CONFIG_FREERTOS_UNICORE
#define configNUM_CORES 1
#define configNUMBER_OF_CORES 1
#else
#define configNUM_CORES 2
#define configNUMBER_OF_CORES 2
#endif /* CONFIG_FREERTOS_UNICORE */
/* For compatibility */
#define configNUM_CORES configNUMBER_OF_CORES
#ifdef CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID
#define configTASKLIST_INCLUDE_COREID 1
#endif /* CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID */