mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
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:
parent
06ea7275b3
commit
99a5a5fe82
5 changed files with 12 additions and 5 deletions
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 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue