mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-13 16:27:43 -04:00
Support reset kernel state for restarting scheduler (#944)
* Adding the following functions to reset kernel state. These functions are only required for application which needs to restart the scheduler. - void vTaskResetState( void ) - void vTimerResetState( void ) - void vPortHeapResetState( void ) - void vCoRoutineResetState( void ) --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Chris Morgan <cmorgan@boston-engineering.com> Co-authored-by: Soren Ptak <ptaksoren@gmail.com> Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
This commit is contained in:
parent
e68975fcf7
commit
1a500f1a74
12 changed files with 215 additions and 12 deletions
|
@ -746,6 +746,13 @@ void vCoRoutineAddToDelayedList( TickType_t xTicksToDelay,
|
|||
*/
|
||||
BaseType_t xCoRoutineRemoveFromEventList( const List_t * pxEventList );
|
||||
|
||||
|
||||
/*
|
||||
* This function resets the internal state of the coroutine module. It must be
|
||||
* called by the application before restarting the scheduler.
|
||||
*/
|
||||
void vCoRoutineResetState( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -194,6 +194,12 @@ size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;
|
|||
#define vPortFreeStack vPortFree
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This function resets the internal state of the heap module. It must be called
|
||||
* by the application before restarting the scheduler.
|
||||
*/
|
||||
void vPortHeapResetState( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
#if ( configUSE_MALLOC_FAILED_HOOK == 1 )
|
||||
|
||||
/**
|
||||
|
|
|
@ -3438,6 +3438,20 @@ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut,
|
|||
*/
|
||||
BaseType_t xTaskCatchUpTicks( TickType_t xTicksToCatchUp ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task.h
|
||||
* @code{c}
|
||||
* void vTaskResetState( void );
|
||||
* @endcode
|
||||
*
|
||||
* This function resets the internal state of the task. It must be called by the
|
||||
* application before restarting the scheduler.
|
||||
*
|
||||
* \defgroup vTaskResetState vTaskResetState
|
||||
* \ingroup SchedulerControl
|
||||
*/
|
||||
void vTaskResetState( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* SCHEDULER INTERNALS AVAILABLE FOR PORTING PURPOSES
|
||||
|
|
|
@ -1417,6 +1417,12 @@ BaseType_t xTimerGenericCommandFromISR( TimerHandle_t xTimer,
|
|||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This function resets the internal state of the timer module. It must be called
|
||||
* by the application before restarting the scheduler.
|
||||
*/
|
||||
void vTimerResetState( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue