]> git.sur5r.net Git - freertos/commitdiff
Move the call to traceTASK_DELETE() to before port portPRE_TASK_DELETE_HOOK() as...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 15 Oct 2019 22:14:40 +0000 (22:14 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 15 Oct 2019 22:14:40 +0000 (22:14 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2741 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/tasks.c

index cf28a7184eaa5f879166a0a60ce21e664c9f59be..dfff3ec5efdb4b4da95bafb0a1df480873cdbfd7 100644 (file)
@@ -1204,6 +1204,10 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
                                check the xTasksWaitingTermination list. */\r
                                ++uxDeletedTasksWaitingCleanUp;\r
 \r
+                               /* Call the delete hook before portPRE_TASK_DELETE_HOOK() as\r
+                               portPRE_TASK_DELETE_HOOK() does not return in the Win32 port. */\r
+                               traceTASK_DELETE( pxTCB );\r
+\r
                                /* The pre-delete hook is primarily for the Windows simulator,\r
                                in which Windows specific clean up operations are performed,\r
                                after which it is not possible to yield away from this task -\r
@@ -1219,9 +1223,8 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB )
                                /* Reset the next expected unblock time in case it referred to\r
                                the task that has just been deleted. */\r
                                prvResetNextTaskUnblockTime();\r
+                               traceTASK_DELETE( pxTCB );\r
                        }\r
-\r
-                       traceTASK_DELETE( pxTCB );\r
                }\r
                taskEXIT_CRITICAL();\r
 \r