]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/death.c
Changes to the FreeRTOS code:
[freertos] / FreeRTOS / Demo / Common / Minimal / death.c
index 46c711e9c0acf74a494590fb9deb00906d78dd34..9a258bf38380cf52e787e875505e391ae02ff7ee 100644 (file)
@@ -114,9 +114,11 @@ task can tell if any of the suicidal tasks have failed to die.
 */\r
 static volatile UBaseType_t uxTasksRunningAtStart = 0;\r
 \r
-/* Tasks are deleted by the idle task.  Under heavy load the idle task might\r
-not get much processing time, so it would be legitimate for several tasks to\r
-remain undeleted for a short period. */\r
+/* When a task deletes itself, it stack and TCB are cleaned up by the Idle task.\r
+Under heavy load the idle task might not get much processing time, so it would \r
+be legitimate for several tasks to remain undeleted for a short period.  There\r
+may also be a few other unexpected tasks if, for example, the tasks that test\r
+static allocation are also being used. */\r
 static const UBaseType_t uxMaxNumberOfExtraTasksRunning = 3;\r
 \r
 /* Used to store a handle to the task that should be killed by a suicidal task,\r
@@ -151,7 +153,9 @@ UBaseType_t *puxPriority;
        If this is done, then uxTasksRunningAtStart needs incrementing again as that\r
        too is created when the scheduler is started. */\r
        #if configUSE_TIMERS == 1\r
+       {\r
                uxTasksRunningAtStart++;\r
+       }\r
        #endif\r
 }\r
 /*-----------------------------------------------------------*/\r