Fix free secure context for Cortex-M23 ports
Update the branching condition to correctly free secure context when there is one. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:

committed by
Gaurav-Aggarwal-AWS

parent
06ea7275b3
commit
99a5a5fe82
9
tasks.c
9
tasks.c
@ -1219,7 +1219,6 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||
{
|
||||
--uxCurrentNumberOfTasks;
|
||||
traceTASK_DELETE( pxTCB );
|
||||
prvDeleteTCB( pxTCB );
|
||||
|
||||
/* Reset the next expected unblock time in case it referred to
|
||||
* the task that has just been deleted. */
|
||||
@ -1228,6 +1227,14 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
|
||||
}
|
||||
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
|
||||
* been deleted. */
|
||||
if( xSchedulerRunning != pdFALSE )
|
||||
|
Reference in New Issue
Block a user