diff --git a/components/freertos/tasks.c b/components/freertos/tasks.c index 0feff510ae..a8da2be63d 100644 --- a/components/freertos/tasks.c +++ b/components/freertos/tasks.c @@ -4035,7 +4035,7 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters ) const UBaseType_t uxNonApplicationTasks = 1; eSleepModeStatus eReturn = eStandardSleep; - taskEXIT_CRITICAL(); + taskENTER_CRITICAL(); if( listCURRENT_LIST_LENGTH( &xPendingReadyList[xPortGetCoreID()] ) != 0 ) { /* A task was made ready while the scheduler was suspended. */