MCPcopy Create free account
hub / github.com/FreeRTOS/FreeRTOS-Kernel / vTaskPreemptionEnable

Function vTaskPreemptionEnable

tasks.c:2299–2320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2297#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
2298
2299 void vTaskPreemptionEnable( const TaskHandle_t xTask )
2300 {
2301 TCB_t * pxTCB;
2302 BaseType_t xCoreID;
2303
2304 taskENTER_CRITICAL();
2305 {
2306 pxTCB = prvGetTCBFromHandle( xTask );
2307
2308 pxTCB->xPreemptionDisable = pdFALSE;
2309
2310 if( xSchedulerRunning != pdFALSE )
2311 {
2312 if( taskTASK_IS_RUNNING( pxTCB->xTaskRunState ) )
2313 {
2314 xCoreID = ( BaseType_t ) pxTCB->xTaskRunState;
2315 prvYieldCore( xCoreID );
2316 }
2317 }
2318 }
2319 taskEXIT_CRITICAL();
2320 }
2321
2322#endif /* configUSE_TASK_PREEMPTION_DISABLE */
2323/*-----------------------------------------------------------*/

Callers

nothing calls this directly

Calls 1

prvYieldCoreFunction · 0.85

Tested by

no test coverage detected