mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-13 16:27:43 -04:00
use configSTACK_DEPTH_TYPE consequently (updated for 11.0.x) (#942)
* use configSTACK_DEPTH_TYPE consequently * update default to uint32_t * Update FreeRTOS.h Revert for backwards compatibility * Update portable.h * configSTACK_DEPTH_TYPE - unify stack variable naming * update lexicon.txt * update typo lexicon.txt * Update task.h * Update timers.h * fix merge typo * fix stack type * fix timer stack type * fix timer stack more * fix affinity set stack * adjust ports to use configSTACK_DEPTH_TYPE * fix vTaskListTasks * set default stack depth type in portable.h * fix History.txt * update affinityset * resolve reviewer comments * fix prvTaskCheckFreeStackSpace for variable stack size type * restore CoRoutine defines * remove obsolete stack ttype casts * fix (attempt) for format portable.h * Formatting fixes * prvTaskCheckFreeStackSpace make variable naming compliant * Update portable/GCC/ARM_CM33/non_secure/port.c Co-authored-by: Soren Ptak <ptaksoren@gmail.com> * Update portable/GCC/ARM_CM23/non_secure/port.c Co-authored-by: Soren Ptak <ptaksoren@gmail.com> * Apply suggestions from code review Update ulStackDepth to uxStackDepth Co-authored-by: Soren Ptak <ptaksoren@gmail.com> * Correct uxStackDepth in port.c Also add uint32_t cast prvGetMPURegionSizeSetting. * Update ARM CM3 MPU port.c Revert casting of ( uint32_t ) pxBottomOfStack * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> Co-authored-by: Soren Ptak <ptaksoren@gmail.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
5040a67939
commit
14dd5b503a
38 changed files with 197 additions and 189 deletions
|
@ -1642,7 +1642,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskCreateStatic
|
||||
#define traceENTER_xTaskCreateStatic( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer )
|
||||
#define traceENTER_xTaskCreateStatic( pxTaskCode, pcName, uxStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer )
|
||||
#endif
|
||||
|
||||
#ifndef traceRETURN_xTaskCreateStatic
|
||||
|
@ -1650,7 +1650,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskCreateStaticAffinitySet
|
||||
#define traceENTER_xTaskCreateStaticAffinitySet( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer, uxCoreAffinityMask )
|
||||
#define traceENTER_xTaskCreateStaticAffinitySet( pxTaskCode, pcName, uxStackDepth, pvParameters, uxPriority, puxStackBuffer, pxTaskBuffer, uxCoreAffinityMask )
|
||||
#endif
|
||||
|
||||
#ifndef traceRETURN_xTaskCreateStaticAffinitySet
|
||||
|
@ -1690,7 +1690,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskCreate
|
||||
#define traceENTER_xTaskCreate( pxTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask )
|
||||
#define traceENTER_xTaskCreate( pxTaskCode, pcName, uxStackDepth, pvParameters, uxPriority, pxCreatedTask )
|
||||
#endif
|
||||
|
||||
#ifndef traceRETURN_xTaskCreate
|
||||
|
@ -1698,7 +1698,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef traceENTER_xTaskCreateAffinitySet
|
||||
#define traceENTER_xTaskCreateAffinitySet( pxTaskCode, pcName, usStackDepth, pvParameters, uxPriority, uxCoreAffinityMask, pxCreatedTask )
|
||||
#define traceENTER_xTaskCreateAffinitySet( pxTaskCode, pcName, uxStackDepth, pvParameters, uxPriority, uxCoreAffinityMask, pxCreatedTask )
|
||||
#endif
|
||||
|
||||
#ifndef traceRETURN_xTaskCreateAffinitySet
|
||||
|
|
|
@ -138,13 +138,13 @@ BaseType_t MPU_xTaskGetSchedulerState( void ) FREERTOS_SYSTEM_CALL;
|
|||
* with all the APIs. */
|
||||
BaseType_t MPU_xTaskCreate( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const uint16_t usStackDepth,
|
||||
const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION;
|
||||
TaskHandle_t MPU_xTaskCreateStatic( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const uint32_t ulStackDepth,
|
||||
const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
StackType_t * const puxStackBuffer,
|
||||
|
|
|
@ -85,6 +85,10 @@
|
|||
#define portARCH_NAME NULL
|
||||
#endif
|
||||
|
||||
#ifndef configSTACK_DEPTH_TYPE
|
||||
#define configSTACK_DEPTH_TYPE StackType_t
|
||||
#endif
|
||||
|
||||
#ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
|
||||
/* Defaults to 0 for backward compatibility. */
|
||||
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
|
||||
|
@ -228,7 +232,7 @@ void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
|
|||
void vPortStoreTaskMPUSettings( xMPU_SETTINGS * xMPUSettings,
|
||||
const struct xMEMORY_REGION * const xRegions,
|
||||
StackType_t * pxBottomOfStack,
|
||||
uint32_t ulStackDepth ) PRIVILEGED_FUNCTION;
|
||||
configSTACK_DEPTH_TYPE uxStackDepth ) PRIVILEGED_FUNCTION;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -288,8 +288,8 @@ typedef enum
|
|||
* @code{c}
|
||||
* BaseType_t xTaskCreate(
|
||||
* TaskFunction_t pxTaskCode,
|
||||
* const char *pcName,
|
||||
* configSTACK_DEPTH_TYPE usStackDepth,
|
||||
* const char * const pcName,
|
||||
* const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
* void *pvParameters,
|
||||
* UBaseType_t uxPriority,
|
||||
* TaskHandle_t *pxCreatedTask
|
||||
|
@ -323,9 +323,9 @@ typedef enum
|
|||
* facilitate debugging. Max length defined by configMAX_TASK_NAME_LEN - default
|
||||
* is 16.
|
||||
*
|
||||
* @param usStackDepth The size of the task stack specified as the number of
|
||||
* @param uxStackDepth The size of the task stack specified as the number of
|
||||
* variables the stack can hold - not the number of bytes. For example, if
|
||||
* the stack is 16 bits wide and usStackDepth is defined as 100, 200 bytes
|
||||
* the stack is 16 bits wide and uxStackDepth is defined as 100, 200 bytes
|
||||
* will be allocated for stack storage.
|
||||
*
|
||||
* @param pvParameters Pointer that will be used as the parameter for the task
|
||||
|
@ -380,7 +380,7 @@ typedef enum
|
|||
#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
|
||||
BaseType_t xTaskCreate( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const configSTACK_DEPTH_TYPE usStackDepth,
|
||||
const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
TaskHandle_t * const pxCreatedTask ) PRIVILEGED_FUNCTION;
|
||||
|
@ -389,7 +389,7 @@ typedef enum
|
|||
#if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
|
||||
BaseType_t xTaskCreateAffinitySet( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const configSTACK_DEPTH_TYPE usStackDepth,
|
||||
const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
UBaseType_t uxCoreAffinityMask,
|
||||
|
@ -400,8 +400,8 @@ typedef enum
|
|||
* task. h
|
||||
* @code{c}
|
||||
* TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,
|
||||
* const char *pcName,
|
||||
* uint32_t ulStackDepth,
|
||||
* const char * const pcName,
|
||||
* const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
* void *pvParameters,
|
||||
* UBaseType_t uxPriority,
|
||||
* StackType_t *puxStackBuffer,
|
||||
|
@ -427,9 +427,9 @@ typedef enum
|
|||
* facilitate debugging. The maximum length of the string is defined by
|
||||
* configMAX_TASK_NAME_LEN in FreeRTOSConfig.h.
|
||||
*
|
||||
* @param ulStackDepth The size of the task stack specified as the number of
|
||||
* @param uxStackDepth The size of the task stack specified as the number of
|
||||
* variables the stack can hold - not the number of bytes. For example, if
|
||||
* the stack is 32-bits wide and ulStackDepth is defined as 100 then 400 bytes
|
||||
* the stack is 32-bits wide and uxStackDepth is defined as 100 then 400 bytes
|
||||
* will be allocated for stack storage.
|
||||
*
|
||||
* @param pvParameters Pointer that will be used as the parameter for the task
|
||||
|
@ -438,7 +438,7 @@ typedef enum
|
|||
* @param uxPriority The priority at which the task will run.
|
||||
*
|
||||
* @param puxStackBuffer Must point to a StackType_t array that has at least
|
||||
* ulStackDepth indexes - the array will then be used as the task's stack,
|
||||
* uxStackDepth indexes - the array will then be used as the task's stack,
|
||||
* removing the need for the stack to be allocated dynamically.
|
||||
*
|
||||
* @param pxTaskBuffer Must point to a variable of type StaticTask_t, which will
|
||||
|
@ -507,7 +507,7 @@ typedef enum
|
|||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
TaskHandle_t xTaskCreateStatic( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const uint32_t ulStackDepth,
|
||||
const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
StackType_t * const puxStackBuffer,
|
||||
|
@ -517,7 +517,7 @@ typedef enum
|
|||
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configNUMBER_OF_CORES > 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
|
||||
TaskHandle_t xTaskCreateStaticAffinitySet( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const uint32_t ulStackDepth,
|
||||
const configSTACK_DEPTH_TYPE uxStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
StackType_t * const puxStackBuffer,
|
||||
|
@ -561,7 +561,7 @@ typedef enum
|
|||
* {
|
||||
* vATask, // pvTaskCode - the function that implements the task.
|
||||
* "ATask", // pcName - just a text name for the task to assist debugging.
|
||||
* 100, // usStackDepth - the stack size DEFINED IN WORDS.
|
||||
* 100, // uxStackDepth - the stack size DEFINED IN WORDS.
|
||||
* NULL, // pvParameters - passed into the task function as the function parameters.
|
||||
* ( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state.
|
||||
* cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack.
|
||||
|
@ -655,7 +655,7 @@ typedef enum
|
|||
* {
|
||||
* vATask, // pvTaskCode - the function that implements the task.
|
||||
* "ATask", // pcName - just a text name for the task to assist debugging.
|
||||
* 100, // usStackDepth - the stack size DEFINED IN WORDS.
|
||||
* 100, // uxStackDepth - the stack size DEFINED IN WORDS.
|
||||
* NULL, // pvParameters - passed into the task function as the function parameters.
|
||||
* ( 1UL | portPRIVILEGE_BIT ),// uxPriority - task priority, set the portPRIVILEGE_BIT if the task should run in a privileged state.
|
||||
* cStackBuffer,// puxStackBuffer - the buffer to be used as the task stack.
|
||||
|
@ -1987,7 +1987,7 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
|
|||
/**
|
||||
* task.h
|
||||
* @code{c}
|
||||
* void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize )
|
||||
* void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, configSTACK_DEPTH_TYPE * puxIdleTaskStackSize )
|
||||
* @endcode
|
||||
*
|
||||
* This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Idle Task TCB. This function is required when
|
||||
|
@ -1995,16 +1995,16 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
|
|||
*
|
||||
* @param ppxIdleTaskTCBBuffer A handle to a statically allocated TCB buffer
|
||||
* @param ppxIdleTaskStackBuffer A handle to a statically allocated Stack buffer for the idle task
|
||||
* @param pulIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
|
||||
* @param puxIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
|
||||
*/
|
||||
void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
|
||||
StackType_t ** ppxIdleTaskStackBuffer,
|
||||
uint32_t * pulIdleTaskStackSize );
|
||||
configSTACK_DEPTH_TYPE * puxIdleTaskStackSize );
|
||||
|
||||
/**
|
||||
* task.h
|
||||
* @code{c}
|
||||
* void vApplicationGetPassiveIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize, BaseType_t xCoreID )
|
||||
* void vApplicationGetPassiveIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, configSTACK_DEPTH_TYPE * puxIdleTaskStackSize, BaseType_t xCoreID )
|
||||
* @endcode
|
||||
*
|
||||
* This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Idle Tasks TCB. This function is required when
|
||||
|
@ -2022,13 +2022,13 @@ char * pcTaskGetName( TaskHandle_t xTaskToQuery ) PRIVILEGED_FUNCTION;
|
|||
*
|
||||
* @param ppxIdleTaskTCBBuffer A handle to a statically allocated TCB buffer
|
||||
* @param ppxIdleTaskStackBuffer A handle to a statically allocated Stack buffer for the idle task
|
||||
* @param pulIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
|
||||
* @param puxIdleTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
|
||||
* @param xPassiveIdleTaskIndex The passive idle task index of the idle task buffer
|
||||
*/
|
||||
#if ( configNUMBER_OF_CORES > 1 )
|
||||
void vApplicationGetPassiveIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
|
||||
StackType_t ** ppxIdleTaskStackBuffer,
|
||||
uint32_t * pulIdleTaskStackSize,
|
||||
configSTACK_DEPTH_TYPE * puxIdleTaskStackSize,
|
||||
BaseType_t xPassiveIdleTaskIndex );
|
||||
#endif /* #if ( configNUMBER_OF_CORES > 1 ) */
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
|
|
|
@ -1384,7 +1384,7 @@ BaseType_t xTimerGenericCommandFromISR( TimerHandle_t xTimer,
|
|||
/**
|
||||
* task.h
|
||||
* @code{c}
|
||||
* void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize )
|
||||
* void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, configSTACK_DEPTH_TYPE * puxTimerTaskStackSize )
|
||||
* @endcode
|
||||
*
|
||||
* This function is used to provide a statically allocated block of memory to FreeRTOS to hold the Timer Task TCB. This function is required when
|
||||
|
@ -1392,11 +1392,11 @@ BaseType_t xTimerGenericCommandFromISR( TimerHandle_t xTimer,
|
|||
*
|
||||
* @param ppxTimerTaskTCBBuffer A handle to a statically allocated TCB buffer
|
||||
* @param ppxTimerTaskStackBuffer A handle to a statically allocated Stack buffer for the idle task
|
||||
* @param pulTimerTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
|
||||
* @param puxTimerTaskStackSize A pointer to the number of elements that will fit in the allocated stack buffer
|
||||
*/
|
||||
void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
|
||||
StackType_t ** ppxTimerTaskStackBuffer,
|
||||
uint32_t * pulTimerTaskStackSize );
|
||||
configSTACK_DEPTH_TYPE * puxTimerTaskStackSize );
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue