mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-13 16:27:43 -04:00
feat(freertos-smp): Use light weight locks for preemption disable/enable
This commit is contained in:
parent
f46aaa7a2b
commit
49b89b2f25
1 changed files with 20 additions and 4 deletions
24
tasks.c
24
tasks.c
|
@ -3286,7 +3286,11 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
|
|
||||||
traceENTER_vTaskPreemptionDisable( xTask );
|
traceENTER_vTaskPreemptionDisable( xTask );
|
||||||
|
|
||||||
kernelENTER_CRITICAL();
|
#if ( configLIGHTWEIGHT_CRITICAL_SECTION == 1 )
|
||||||
|
vKernelLightWeightEnterCritical();
|
||||||
|
#else
|
||||||
|
kernelENTER_CRITICAL();
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if( xSchedulerRunning != pdFALSE )
|
if( xSchedulerRunning != pdFALSE )
|
||||||
{
|
{
|
||||||
|
@ -3300,7 +3304,11 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kernelEXIT_CRITICAL();
|
#if ( configLIGHTWEIGHT_CRITICAL_SECTION == 1 )
|
||||||
|
vKernelLightWeightExitCritical();
|
||||||
|
#else
|
||||||
|
kernelEXIT_CRITICAL();
|
||||||
|
#endif
|
||||||
|
|
||||||
traceRETURN_vTaskPreemptionDisable();
|
traceRETURN_vTaskPreemptionDisable();
|
||||||
}
|
}
|
||||||
|
@ -3316,7 +3324,11 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
UBaseType_t uxDeferredAction = 0U;
|
UBaseType_t uxDeferredAction = 0U;
|
||||||
BaseType_t xAlreadyYielded = pdFALSE;
|
BaseType_t xAlreadyYielded = pdFALSE;
|
||||||
|
|
||||||
kernelENTER_CRITICAL();
|
#if ( configLIGHTWEIGHT_CRITICAL_SECTION == 1 )
|
||||||
|
vKernelLightWeightEnterCritical();
|
||||||
|
#else
|
||||||
|
kernelENTER_CRITICAL();
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if( xSchedulerRunning != pdFALSE )
|
if( xSchedulerRunning != pdFALSE )
|
||||||
{
|
{
|
||||||
|
@ -3355,7 +3367,11 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
mtCOVERAGE_TEST_MARKER();
|
mtCOVERAGE_TEST_MARKER();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kernelEXIT_CRITICAL();
|
#if ( configLIGHTWEIGHT_CRITICAL_SECTION == 1 )
|
||||||
|
vKernelLightWeightExitCritical();
|
||||||
|
#else
|
||||||
|
kernelEXIT_CRITICAL();
|
||||||
|
#endif
|
||||||
|
|
||||||
if( uxDeferredAction != 0U )
|
if( uxDeferredAction != 0U )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue