mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'bugfix/freertos_psram_stack_v5.2' into 'release/v5.2'
bugfix(freertos): Fixed task creation function for PSRAM stack (v5.2) See merge request espressif/esp-idf!26949
This commit is contained in:
@@ -1173,7 +1173,7 @@ void * pvTaskGetCurrentTCBForCore( BaseType_t xCoreID )
|
|||||||
UBaseType_t uxCoreAffinityMask,
|
UBaseType_t uxCoreAffinityMask,
|
||||||
UBaseType_t uxStackMemoryCaps,
|
UBaseType_t uxStackMemoryCaps,
|
||||||
TaskHandle_t * const pxCreatedTask )
|
TaskHandle_t * const pxCreatedTask )
|
||||||
#else
|
#else /* CONFIG_FREERTOS_SMP */
|
||||||
BaseType_t prvTaskCreateDynamicPinnedToCoreWithCaps( TaskFunction_t pxTaskCode,
|
BaseType_t prvTaskCreateDynamicPinnedToCoreWithCaps( TaskFunction_t pxTaskCode,
|
||||||
const char * const pcName,
|
const char * const pcName,
|
||||||
const configSTACK_DEPTH_TYPE usStackDepth,
|
const configSTACK_DEPTH_TYPE usStackDepth,
|
||||||
@@ -1182,7 +1182,7 @@ void * pvTaskGetCurrentTCBForCore( BaseType_t xCoreID )
|
|||||||
const BaseType_t xCoreID,
|
const BaseType_t xCoreID,
|
||||||
UBaseType_t uxStackMemoryCaps,
|
UBaseType_t uxStackMemoryCaps,
|
||||||
TaskHandle_t * const pxCreatedTask )
|
TaskHandle_t * const pxCreatedTask )
|
||||||
#endif /* if CONFIG_FREERTOS_SMP */
|
#endif /* CONFIG_FREERTOS_SMP */
|
||||||
{
|
{
|
||||||
TCB_t * pxNewTCB;
|
TCB_t * pxNewTCB;
|
||||||
BaseType_t xReturn;
|
BaseType_t xReturn;
|
||||||
@@ -1202,12 +1202,8 @@ void * pvTaskGetCurrentTCBForCore( BaseType_t xCoreID )
|
|||||||
pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) );
|
pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) );
|
||||||
|
|
||||||
if( pxNewTCB != NULL )
|
if( pxNewTCB != NULL )
|
||||||
{
|
|
||||||
#if CONFIG_FREERTOS_USE_KERNEL_10_5_1
|
|
||||||
{
|
{
|
||||||
memset( ( void * ) pxNewTCB, 0x00, sizeof( TCB_t ) );
|
memset( ( void * ) pxNewTCB, 0x00, sizeof( TCB_t ) );
|
||||||
}
|
|
||||||
#endif /* CONFIG_FREERTOS_USE_KERNEL_10_5_1 */
|
|
||||||
|
|
||||||
/* Store the stack location in the TCB. */
|
/* Store the stack location in the TCB. */
|
||||||
pxNewTCB->pxStack = pxStack;
|
pxNewTCB->pxStack = pxStack;
|
||||||
@@ -1234,16 +1230,20 @@ void * pvTaskGetCurrentTCBForCore( BaseType_t xCoreID )
|
|||||||
#endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */
|
#endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */
|
||||||
|
|
||||||
#if CONFIG_FREERTOS_SMP
|
#if CONFIG_FREERTOS_SMP
|
||||||
|
{
|
||||||
prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL );
|
prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL );
|
||||||
#if ( ( configNUM_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
|
#if ( ( configNUM_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
|
||||||
{
|
{
|
||||||
/* Set the task's affinity before scheduling it */
|
/* Set the task's affinity before scheduling it */
|
||||||
pxNewTCB->uxCoreAffinityMask = uxCoreAffinityMask;
|
pxNewTCB->uxCoreAffinityMask = uxCoreAffinityMask;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* ( ( configNUM_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) ) */
|
||||||
#else
|
}
|
||||||
|
#else /* CONFIG_FREERTOS_SMP */
|
||||||
|
{
|
||||||
prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL, xCoreID );
|
prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL, xCoreID );
|
||||||
#endif
|
}
|
||||||
|
#endif /* CONFIG_FREERTOS_SMP */
|
||||||
|
|
||||||
prvAddNewTaskToReadyList( pxNewTCB );
|
prvAddNewTaskToReadyList( pxNewTCB );
|
||||||
xReturn = pdPASS;
|
xReturn = pdPASS;
|
||||||
@@ -1256,5 +1256,5 @@ void * pvTaskGetCurrentTCBForCore( BaseType_t xCoreID )
|
|||||||
return xReturn;
|
return xReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SPIRAM
|
#endif /* CONFIG_SPIRAM */
|
||||||
/*----------------------------------------------------------*/
|
/*----------------------------------------------------------*/
|
||||||
|
Reference in New Issue
Block a user