Move the call to traceTASK_DELETE() to before port portPRE_TASK_DELETE_HOOK() as in the Windows port portPRE_TASK_DELETE_HOOK() never returns.

This commit is contained in:
Richard Barry 2019-10-15 22:14:40 +00:00
parent 4922cff4ce
commit d435a7b62d

View file

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