|
|
@ -1219,7 +1219,6 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
--uxCurrentNumberOfTasks;
|
|
|
|
--uxCurrentNumberOfTasks;
|
|
|
|
traceTASK_DELETE( pxTCB );
|
|
|
|
traceTASK_DELETE( pxTCB );
|
|
|
|
prvDeleteTCB( pxTCB );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Reset the next expected unblock time in case it referred to
|
|
|
|
/* Reset the next expected unblock time in case it referred to
|
|
|
|
* the task that has just been deleted. */
|
|
|
|
* the task that has just been deleted. */
|
|
|
@ -1228,6 +1227,14 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
taskEXIT_CRITICAL();
|
|
|
|
taskEXIT_CRITICAL();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* If the task is not deleting itself, call prvDeleteTCB from outside of
|
|
|
|
|
|
|
|
* critical section. If a task deletes itself, prvDeleteTCB is called
|
|
|
|
|
|
|
|
* from prvCheckTasksWaitingTermination which is called from Idle task. */
|
|
|
|
|
|
|
|
if( pxTCB != pxCurrentTCB )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
prvDeleteTCB( pxTCB );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Force a reschedule if it is the currently running task that has just
|
|
|
|
/* Force a reschedule if it is the currently running task that has just
|
|
|
|
* been deleted. */
|
|
|
|
* been deleted. */
|
|
|
|
if( xSchedulerRunning != pdFALSE )
|
|
|
|
if( xSchedulerRunning != pdFALSE )
|
|
|
|