#endif\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
- unsigned portBASE_TYPE uxTCBNumber; /*< This is used for tracing the scheduler and making debugging easier only. */\r
+ unsigned portBASE_TYPE uxTCBNumber; /*< This stores a number that increments each time a TCB is created. It allows debuggers to determine when a task has been deleted and then recreated. */\r
+ unsigned portBASE_TYPE uxTaskNumber; /*< This stores a number specifically for use by third party trace code. */\r
#endif\r
\r
#if ( configUSE_MUTEXES == 1 )\r
PRIVILEGED_DATA static volatile unsigned portBASE_TYPE uxMissedTicks = ( unsigned portBASE_TYPE ) 0U;\r
PRIVILEGED_DATA static volatile portBASE_TYPE xMissedYield = ( portBASE_TYPE ) pdFALSE;\r
PRIVILEGED_DATA static volatile portBASE_TYPE xNumOfOverflows = ( portBASE_TYPE ) 0;\r
-PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber = ( unsigned portBASE_TYPE ) 0U;\r
+PRIVILEGED_DATA static unsigned portBASE_TYPE uxTCBNumber = ( unsigned portBASE_TYPE ) 0U;\r
PRIVILEGED_DATA static portTickType xNextTaskUnblockTime = ( portTickType ) portMAX_DELAY;\r
\r
#if ( configGENERATE_RUN_TIME_STATS == 1 )\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
{\r
/* Add a counter into the TCB for tracing only. */\r
- pxNewTCB->uxTCBNumber = uxTaskNumber;\r
+ pxNewTCB->uxTCBNumber = uxTCBNumber;\r
}\r
#endif\r
- uxTaskNumber++;\r
+ uxTCBNumber++;\r
\r
prvAddTaskToReadyQueue( pxNewTCB );\r
\r
\r
/* Increment the uxTaskNumberVariable also so kernel aware debuggers\r
can detect that the task lists need re-generating. */\r
- uxTaskNumber++;\r
+ uxTCBNumber++;\r
\r
traceTASK_DELETE( pxTCB );\r
}\r
if( xTask != NULL )\r
{\r
pxTCB = ( tskTCB * ) xTask;\r
- uxReturn = pxTCB->uxTCBNumber;\r
+ uxReturn = pxTCB->uxTaskNumber;\r
}\r
else\r
{\r
if( xTask != NULL )\r
{\r
pxTCB = ( tskTCB * ) xTask;\r
- pxTCB->uxTCBNumber = uxHandle;\r
+ pxTCB->uxTaskNumber = uxHandle;\r
}\r
}\r
#endif\r