mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Increment the uxTaskNumber variable when a task is deleted in addition to when a task is created. This is to assist kernel aware debuggers detecting when the task list needs refreshing.
This commit is contained in:
parent
fa9a58c9c0
commit
42b60ed69c
|
@ -143,9 +143,7 @@ static volatile unsigned portBASE_TYPE uxSchedulerSuspended = ( unsigned portBA
|
||||||
static volatile unsigned portBASE_TYPE uxMissedTicks = ( unsigned portBASE_TYPE ) 0;
|
static volatile unsigned portBASE_TYPE uxMissedTicks = ( unsigned portBASE_TYPE ) 0;
|
||||||
static volatile portBASE_TYPE xMissedYield = ( portBASE_TYPE ) pdFALSE;
|
static volatile portBASE_TYPE xMissedYield = ( portBASE_TYPE ) pdFALSE;
|
||||||
static volatile portBASE_TYPE xNumOfOverflows = ( portBASE_TYPE ) 0;
|
static volatile portBASE_TYPE xNumOfOverflows = ( portBASE_TYPE ) 0;
|
||||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
static unsigned portBASE_TYPE uxTaskNumber = 0;
|
||||||
static unsigned portBASE_TYPE uxTaskNumber = 0; /*lint !e956 Static is deliberate - this is guarded before use. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Debugging and trace facilities private variables and macros. ------------*/
|
/* Debugging and trace facilities private variables and macros. ------------*/
|
||||||
|
|
||||||
|
@ -438,9 +436,9 @@ tskTCB * pxNewTCB;
|
||||||
{
|
{
|
||||||
/* Add a counter into the TCB for tracing only. */
|
/* Add a counter into the TCB for tracing only. */
|
||||||
pxNewTCB->uxTCBNumber = uxTaskNumber;
|
pxNewTCB->uxTCBNumber = uxTaskNumber;
|
||||||
uxTaskNumber++;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
uxTaskNumber++;
|
||||||
|
|
||||||
prvAddTaskToReadyQueue( pxNewTCB );
|
prvAddTaskToReadyQueue( pxNewTCB );
|
||||||
|
|
||||||
|
@ -518,6 +516,10 @@ tskTCB * pxNewTCB;
|
||||||
there is a task that has been deleted and that it should therefore
|
there is a task that has been deleted and that it should therefore
|
||||||
check the xTasksWaitingTermination list. */
|
check the xTasksWaitingTermination list. */
|
||||||
++uxTasksDeleted;
|
++uxTasksDeleted;
|
||||||
|
|
||||||
|
/* Increment the uxTaskNumberVariable also so kernel aware debuggers
|
||||||
|
can detect that the task lists need re-generating. */
|
||||||
|
uxTaskNumber++;
|
||||||
}
|
}
|
||||||
taskEXIT_CRITICAL();
|
taskEXIT_CRITICAL();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue