]> git.sur5r.net Git - freertos/blobdiff - Source/tasks.c
Moved the position of the traceTASK_DELETED() macro.
[freertos] / Source / tasks.c
index 67e35c2577285239e9fb1161e26929912c2aca24..34ed8f5c0f0ae9c7796a7dc8e8daeb60b0deeaf6 100644 (file)
@@ -510,8 +510,6 @@ tskTCB * pxNewTCB;
                        /* If null is passed in here then we are deleting ourselves. */\r
                        pxTCB = prvGetTCBFromHandle( pxTaskToDelete );\r
 \r
-                       traceTASK_DELETE( pxTCB );\r
-\r
                        /* Remove task from the ready list and place in the     termination list.\r
                        This will stop the task from be scheduled.  The idle task will check\r
                        the termination list and free up any memory allocated by the\r
@@ -534,6 +532,8 @@ tskTCB * pxNewTCB;
                        /* Increment the uxTaskNumberVariable also so kernel aware debuggers\r
                        can detect that the task lists need re-generating. */\r
                        uxTaskNumber++;\r
+                       \r
+                       traceTASK_DELETE( pxTCB );                      \r
                }\r
                taskEXIT_CRITICAL();\r
 \r