@@ -239,6 +239,19 @@ count overflows. */
239239 tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
240240/*-----------------------------------------------------------*/
241241
242+ /*
243+ * Place the task represented by pxTCB which has been in a ready list before
244+ * into the appropriate ready list for the task.
245+ * It is inserted at the end of the list.
246+ */
247+ #define prvReaddTaskToReadyList ( pxTCB ) \
248+ traceREADDED_TASK_TO_READY_STATE( pxTCB ); \
249+ taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \
250+ vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \
251+ tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB )
252+ /*-----------------------------------------------------------*/
253+
254+
242255/*
243256 * Several functions take an TaskHandle_t parameter that can optionally be NULL,
244257 * where NULL is used to indicate that the handle of the currently executing
@@ -1598,7 +1611,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
15981611 {
15991612 mtCOVERAGE_TEST_MARKER ();
16001613 }
1601- prvAddTaskToReadyList ( pxTCB );
1614+ prvReaddTaskToReadyList ( pxTCB );
16021615 }
16031616 else
16041617 {
@@ -1660,6 +1673,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
16601673 mtCOVERAGE_TEST_MARKER ();
16611674 }
16621675
1676+ traceMOVED_TASK_TO_SUSPENDED_LIST (pxTCB );
16631677 vListInsertEnd ( & xSuspendedTaskList , & ( pxTCB -> xStateListItem ) );
16641678
16651679 #if ( configUSE_TASK_NOTIFICATIONS == 1 )
@@ -3671,6 +3685,20 @@ static void prvCheckTasksWaitingTermination( void )
36713685#endif /* INCLUDE_uxTaskGetStackHighWaterMark */
36723686/*-----------------------------------------------------------*/
36733687
3688+ #if (INCLUDE_pxTaskGetStackStart == 1 )
3689+ uint8_t * pxTaskGetStackStart ( TaskHandle_t xTask )
3690+ {
3691+ TCB_t * pxTCB ;
3692+ UBaseType_t uxReturn ;
3693+ (void )uxReturn ;
3694+
3695+ pxTCB = prvGetTCBFromHandle ( xTask );
3696+ return ( uint8_t * ) pxTCB -> pxStack ;
3697+ }
3698+ #endif /* INCLUDE_pxTaskGetStackStart */
3699+ /*-----------------------------------------------------------*/
3700+
3701+
36743702#if ( INCLUDE_vTaskDelete == 1 )
36753703
36763704 static void prvDeleteTCB ( TCB_t * pxTCB )
@@ -3840,7 +3868,7 @@ TCB_t *pxTCB;
38403868
38413869 /* Inherit the priority before being moved into the new list. */
38423870 pxMutexHolderTCB -> uxPriority = pxCurrentTCB -> uxPriority ;
3843- prvAddTaskToReadyList ( pxMutexHolderTCB );
3871+ prvReaddTaskToReadyList ( pxMutexHolderTCB );
38443872 }
38453873 else
38463874 {
@@ -3930,7 +3958,7 @@ TCB_t *pxTCB;
39303958 any other purpose if this task is running, and it must be
39313959 running to give back the mutex. */
39323960 listSET_LIST_ITEM_VALUE ( & ( pxTCB -> xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB -> uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
3933- prvAddTaskToReadyList ( pxTCB );
3961+ prvReaddTaskToReadyList ( pxTCB );
39343962
39353963 /* Return true to indicate that a context switch is required.
39363964 This is only actually required in the corner case whereby
@@ -4943,6 +4971,7 @@ const TickType_t xConstTickCount = xTickCount;
49434971 /* Add the task to the suspended task list instead of a delayed task
49444972 list to ensure it is not woken by a timing event. It will block
49454973 indefinitely. */
4974+ traceMOVED_TASK_TO_SUSPENDED_LIST (pxCurrentTCB );
49464975 vListInsertEnd ( & xSuspendedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
49474976 }
49484977 else
@@ -4959,12 +4988,14 @@ const TickType_t xConstTickCount = xTickCount;
49594988 {
49604989 /* Wake time has overflowed. Place this item in the overflow
49614990 list. */
4991+ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ();
49624992 vListInsert ( pxOverflowDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
49634993 }
49644994 else
49654995 {
49664996 /* The wake time has not overflowed, so the current block list
49674997 is used. */
4998+ traceMOVED_TASK_TO_DELAYED_LIST ();
49684999 vListInsert ( pxDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
49695000
49705001 /* If the task entering the blocked state was placed at the
@@ -4994,11 +5025,13 @@ const TickType_t xConstTickCount = xTickCount;
49945025 if ( xTimeToWake < xConstTickCount )
49955026 {
49965027 /* Wake time has overflowed. Place this item in the overflow list. */
5028+ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ();
49975029 vListInsert ( pxOverflowDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
49985030 }
49995031 else
50005032 {
50015033 /* The wake time has not overflowed, so the current block list is used. */
5034+ traceMOVED_TASK_TO_DELAYED_LIST ();
50025035 vListInsert ( pxDelayedTaskList , & ( pxCurrentTCB -> xStateListItem ) );
50035036
50045037 /* If the task entering the blocked state was placed at the head of the
0 commit comments