FreeRTOS: Make stack size in task create functions an uint32_t, so we can allocate more than 32K of stack if needed.

This commit is contained in:
Jeroen Domburg 2017-02-24 12:45:33 +08:00
parent 8af42554ba
commit db8c93afb1
2 changed files with 6 additions and 6 deletions

View file

@ -159,7 +159,7 @@ typedef struct xTASK_PARAMETERS
{ {
TaskFunction_t pvTaskCode; TaskFunction_t pvTaskCode;
const char * const pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ const char * const pcName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
uint16_t usStackDepth; uint32_t usStackDepth;
void *pvParameters; void *pvParameters;
UBaseType_t uxPriority; UBaseType_t uxPriority;
StackType_t *puxStackBuffer; StackType_t *puxStackBuffer;
@ -287,7 +287,7 @@ is used in assert() statements. */
BaseType_t xTaskCreate( BaseType_t xTaskCreate(
TaskFunction_t pvTaskCode, TaskFunction_t pvTaskCode,
const char * const pcName, const char * const pcName,
uint16_t usStackDepth, uint32_t usStackDepth,
void *pvParameters, void *pvParameters,
UBaseType_t uxPriority, UBaseType_t uxPriority,
TaskHandle_t *pvCreatedTask TaskHandle_t *pvCreatedTask
@ -377,7 +377,7 @@ is used in assert() statements. */
#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pxTaskCode, BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pxTaskCode,
const char * const pcName, const char * const pcName,
const uint16_t usStackDepth, const uint32_t usStackDepth,
void * const pvParameters, void * const pvParameters,
UBaseType_t uxPriority, UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask, TaskHandle_t * const pxCreatedTask,

View file

@ -724,7 +724,7 @@ void taskYIELD_OTHER_CORE( BaseType_t xCoreID, UBaseType_t uxPriority )
prvInitialiseNewTask( pxTaskDefinition->pvTaskCode, prvInitialiseNewTask( pxTaskDefinition->pvTaskCode,
pxTaskDefinition->pcName, pxTaskDefinition->pcName,
( uint32_t ) pxTaskDefinition->usStackDepth, pxTaskDefinition->usStackDepth,
pxTaskDefinition->pvParameters, pxTaskDefinition->pvParameters,
pxTaskDefinition->uxPriority, pxTaskDefinition->uxPriority,
pxCreatedTask, pxNewTCB, pxCreatedTask, pxNewTCB,
@ -746,7 +746,7 @@ void taskYIELD_OTHER_CORE( BaseType_t xCoreID, UBaseType_t uxPriority )
BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pxTaskCode, BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pxTaskCode,
const char * const pcName, const char * const pcName,
const uint16_t usStackDepth, const uint32_t usStackDepth,
void * const pvParameters, void * const pvParameters,
UBaseType_t uxPriority, UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask, TaskHandle_t * const pxCreatedTask,
@ -821,7 +821,7 @@ void taskYIELD_OTHER_CORE( BaseType_t xCoreID, UBaseType_t uxPriority )
} }
#endif /* configSUPPORT_STATIC_ALLOCATION */ #endif /* configSUPPORT_STATIC_ALLOCATION */
prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL, xCoreID ); prvInitialiseNewTask( pxTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL, xCoreID );
prvAddNewTaskToReadyList( pxNewTCB, pxTaskCode, xCoreID ); prvAddNewTaskToReadyList( pxNewTCB, pxTaskCode, xCoreID );
xReturn = pdPASS; xReturn = pdPASS;
} }