mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
fix MPU wrapper for vTaskDelete for calling task deletion (#745)
This commit is contained in:
parent
b5f670f826
commit
6f3586516a
|
@ -1360,12 +1360,12 @@
|
||||||
xInternalTaskHandle = xTaskGetCurrentTaskHandle();
|
xInternalTaskHandle = xTaskGetCurrentTaskHandle();
|
||||||
lIndex = MPU_GetIndexForTaskHandle( xInternalTaskHandle );
|
lIndex = MPU_GetIndexForTaskHandle( xInternalTaskHandle );
|
||||||
|
|
||||||
vTaskDelete( xInternalTaskHandle );
|
|
||||||
|
|
||||||
if( lIndex != -1 )
|
if( lIndex != -1 )
|
||||||
{
|
{
|
||||||
MPU_SetIndexFreeInKernelObjectPool( lIndex );
|
MPU_SetIndexFreeInKernelObjectPool( lIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vTaskDelete( xInternalTaskHandle );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1377,8 +1377,8 @@
|
||||||
|
|
||||||
if( xInternalTaskHandle != NULL )
|
if( xInternalTaskHandle != NULL )
|
||||||
{
|
{
|
||||||
vTaskDelete( xInternalTaskHandle );
|
|
||||||
MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
|
MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
|
||||||
|
vTaskDelete( xInternalTaskHandle );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue