diff --git a/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/FreeRTOS.h b/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/FreeRTOS.h index 6aa3b803c0..60abd75b6c 100644 --- a/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/FreeRTOS.h +++ b/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/FreeRTOS.h @@ -72,6 +72,14 @@ #include #endif +#ifdef configNEWLIB_REENTRANT_IS_DYNAMIC + #if ( configUSE_NEWLIB_REENTRANT != 1 ) + #error configUSE_NEWLIB_REENTRANT must be defined to 1 to enable configNEWLIB_REENTRANT_IS_DYNAMIC + #endif +#else /* configNEWLIB_REENTRANT_IS_DYNAMIC */ + #define configNEWLIB_REENTRANT_IS_DYNAMIC 0 +#endif /* configNEWLIB_REENTRANT_IS_DYNAMIC */ + /* * Check all the required application specific macros have been defined. * These macros are application specific and (as downloaded) are defined diff --git a/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/task.h b/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/task.h index 8a4e681e48..0a91ae8b98 100644 --- a/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/task.h +++ b/components/freertos/FreeRTOS-Kernel-SMP/include/freertos/task.h @@ -153,6 +153,9 @@ typedef struct xTASK_STATUS uint32_t ulRunTimeCounter; /* The total run time allocated to the task so far, as defined by the run time stats clock. See https://www.FreeRTOS.org/rtos-run-time-stats.html. Only valid when configGENERATE_RUN_TIME_STATS is defined as 1 in FreeRTOSConfig.h. */ StackType_t * pxStackBase; /* Points to the lowest address of the task's stack area. */ configSTACK_DEPTH_TYPE usStackHighWaterMark; /* The minimum amount of stack space that has remained for the task since the task was created. The closer this value is to zero the closer the task has come to overflowing its stack. */ +#if ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUM_CORES > 1 ) ) + UBaseType_t uxCoreAffinityMask; /* The core affinity mask for the task */ +#endif } TaskStatus_t; /* Possible return values for eTaskConfirmSleepModeStatus(). */ diff --git a/components/freertos/FreeRTOS-Kernel-SMP/porting_notes.md b/components/freertos/FreeRTOS-Kernel-SMP/porting_notes.md index 99bbfc90c7..86504067bf 100644 --- a/components/freertos/FreeRTOS-Kernel-SMP/porting_notes.md +++ b/components/freertos/FreeRTOS-Kernel-SMP/porting_notes.md @@ -14,7 +14,7 @@ The following terms will be used in this document to avoid confusion between the # Organization -This directory contains a copy of SMP FreeRTOS based off of upstream commit [2eff03708](https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/2eff037080996e67a79e381667f0b77252e653b8) +This directory contains a copy of SMP FreeRTOS based off of upstream commit [8128208](https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/8128208bdee1f997f83cae631b861f36aeea9b1f) - IDF FreeRTOS remains in `components/freertos/FreeRTOS-Kernel` - SMP FreeRTOS is entirely contained in `components/freertos/FreeRTOS-Kernel-SMP` diff --git a/components/freertos/FreeRTOS-Kernel-SMP/tasks.c b/components/freertos/FreeRTOS-Kernel-SMP/tasks.c index 18d1f9570b..ff3d3d9030 100644 --- a/components/freertos/FreeRTOS-Kernel-SMP/tasks.c +++ b/components/freertos/FreeRTOS-Kernel-SMP/tasks.c @@ -4722,6 +4722,12 @@ static void prvCheckTasksWaitingTermination( void ) pxTaskStatus->pxStackBase = pxTCB->pxStack; pxTaskStatus->xTaskNumber = pxTCB->uxTCBNumber; + #if ( ( configUSE_CORE_AFFINITY == 1 ) && ( configNUM_CORES > 1 ) ) + { + pxTaskStatus->uxCoreAffinityMask = pxTCB->uxCoreAffinityMask; + } + #endif + #if ( configUSE_MUTEXES == 1 ) { pxTaskStatus->uxBasePriority = pxTCB->uxBasePriority;