mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Moving the function prototypes to headers (#128)
* Removing StackMacros.h
* Moving 4 Function Prototypes out of the C files into the headers
* Revert "Removing StackMacros.h"
This reverts commit cdd8307817
.
This commit is contained in:
parent
9a1ebfec31
commit
1865857eae
|
@ -1541,6 +1541,52 @@ configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) PRIVIL
|
|||
|
||||
#endif
|
||||
|
||||
#if ( configCHECK_FOR_STACK_OVERFLOW > 0 )
|
||||
|
||||
/**
|
||||
* task.h
|
||||
* <pre>void vApplicationStackOverflowHook( TaskHandle_t xTask char *pcTaskName); </pre>
|
||||
*
|
||||
* The application stack overflow hook is called when a stack overflow is detected for a task.
|
||||
*
|
||||
* Details on stack overflow detection can be found here: https://www.freertos.org/Stacks-and-stack-overflow-checking.html
|
||||
*
|
||||
* @param xTask the task that just exceeded its stack boundaries.
|
||||
* @param pcTaskName A character string containing the name of the offending task.
|
||||
*/
|
||||
void vApplicationStackOverflowHook( TaskHandle_t xTask,
|
||||
char * pcTaskName );
|
||||
|
||||
#endif
|
||||
|
||||
#if ( configUSE_TICK_HOOK > 0 )
|
||||
/**
|
||||
* task.h
|
||||
* <pre>void vApplicationTickHook( void ); </pre>
|
||||
*
|
||||
* This hook function is called in the system tick handler after any OS work is completed.
|
||||
*/
|
||||
void vApplicationTickHook( void ); /*lint !e526 Symbol not defined as it is an application callback. */
|
||||
|
||||
#endif
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
/**
|
||||
* task.h
|
||||
* <pre>void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, StackType_t ** ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize ) </pre>
|
||||
*
|
||||
* 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
|
||||
* configSUPPORT_STATIC_ALLOCATION is set. For more information see this URI: https://www.freertos.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
|
||||
*
|
||||
* @param ppxIdleTaskTCBBuffer A handle to a statically allocated TCB buffer
|
||||
* @param ppxIdleTaskStackBuffer A handle to a statically allocated Stack buffer for thie idle task
|
||||
* @param pulIdleTaskStackSize 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 ); /*lint !e526 Symbol not defined as it is an application callback. */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* task.h
|
||||
* <pre>BaseType_t xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );</pre>
|
||||
|
|
|
@ -1324,6 +1324,25 @@ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
|
|||
UBaseType_t uxTimerGetTimerNumber( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;
|
||||
#endif
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* task.h
|
||||
* <pre>void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, StackType_t ** ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize ) </pre>
|
||||
*
|
||||
* 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
|
||||
* configSUPPORT_STATIC_ALLOCATION is set. For more information see this URI: https://www.freertos.org/a00110.html#configSUPPORT_STATIC_ALLOCATION
|
||||
*
|
||||
* @param ppxTimerTaskTCBBuffer A handle to a statically allocated TCB buffer
|
||||
* @param ppxTimerTaskStackBuffer A handle to a statically allocated Stack buffer for thie idle task
|
||||
* @param pulTimerTaskStackSize 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 );
|
||||
|
||||
#endif
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
22
tasks.c
22
tasks.c
|
@ -402,28 +402,6 @@ PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended = ( UBaseType_t
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Callback function prototypes. --------------------------*/
|
||||
#if ( configCHECK_FOR_STACK_OVERFLOW > 0 )
|
||||
|
||||
extern void vApplicationStackOverflowHook( TaskHandle_t xTask,
|
||||
char * pcTaskName );
|
||||
|
||||
#endif
|
||||
|
||||
#if ( configUSE_TICK_HOOK > 0 )
|
||||
|
||||
extern void vApplicationTickHook( void ); /*lint !e526 Symbol not defined as it is an application callback. */
|
||||
|
||||
#endif
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
extern void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer,
|
||||
StackType_t ** ppxIdleTaskStackBuffer,
|
||||
uint32_t * pulIdleTaskStackSize ); /*lint !e526 Symbol not defined as it is an application callback. */
|
||||
|
||||
#endif
|
||||
|
||||
/* File private functions. --------------------------------*/
|
||||
|
||||
/**
|
||||
|
|
12
timers.c
12
timers.c
|
@ -144,18 +144,6 @@
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/* If static allocation is supported then the application must provide the
|
||||
* following callback function - which enables the application to optionally
|
||||
* provide the memory that will be used by the timer task as the task's stack
|
||||
* and TCB. */
|
||||
extern void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer,
|
||||
StackType_t ** ppxTimerTaskStackBuffer,
|
||||
uint32_t * pulTimerTaskStackSize );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialise the infrastructure used by the timer service task if it has not
|
||||
* been initialised already.
|
||||
|
|
Loading…
Reference in a new issue