summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2009-03-14 15:04:44 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2009-03-14 15:04:44 +0000
commit453269c2ff1d8dd889eacebd15f9f676926e971f (patch)
tree9a45f6e4b89cf023987bc6270b99f942c794c0ff
parentb081d5f5c86dbbc63cf20bfadc87c695b3cd0712 (diff)
downloadfreertos-453269c2ff1d8dd889eacebd15f9f676926e971f.tar.gz
freertos-453269c2ff1d8dd889eacebd15f9f676926e971f.tar.bz2
freertos-453269c2ff1d8dd889eacebd15f9f676926e971f.tar.xz
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.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@707 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
-rw-r--r--Source/tasks.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/tasks.c b/Source/tasks.c
index 0a363ecc..0c53f03e 100644
--- a/Source/tasks.c
+++ b/Source/tasks.c
@@ -143,9 +143,7 @@ static volatile unsigned portBASE_TYPE uxSchedulerSuspended = ( unsigned portBA
static volatile unsigned portBASE_TYPE uxMissedTicks = ( unsigned portBASE_TYPE ) 0;
static volatile portBASE_TYPE xMissedYield = ( portBASE_TYPE ) pdFALSE;
static volatile portBASE_TYPE xNumOfOverflows = ( portBASE_TYPE ) 0;
-#if ( configUSE_TRACE_FACILITY == 1 )
- static unsigned portBASE_TYPE uxTaskNumber = 0; /*lint !e956 Static is deliberate - this is guarded before use. */
-#endif
+static unsigned portBASE_TYPE uxTaskNumber = 0;
/* Debugging and trace facilities private variables and macros. ------------*/
@@ -438,9 +436,9 @@ tskTCB * pxNewTCB;
{
/* Add a counter into the TCB for tracing only. */
pxNewTCB->uxTCBNumber = uxTaskNumber;
- uxTaskNumber++;
}
#endif
+ uxTaskNumber++;
prvAddTaskToReadyQueue( pxNewTCB );
@@ -518,6 +516,10 @@ tskTCB * pxNewTCB;
there is a task that has been deleted and that it should therefore
check the xTasksWaitingTermination list. */
++uxTasksDeleted;
+
+ /* Increment the uxTaskNumberVariable also so kernel aware debuggers
+ can detect that the task lists need re-generating. */
+ uxTaskNumber++;
}
taskEXIT_CRITICAL();