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