From 3b40d77584ea5f8431cbbe6d048f6483b523f717 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Tue, 7 Sep 2021 13:07:02 +0530 Subject: [PATCH] freertos: move esp_compiler.h include from FreeRTOS.h Moved the inclusion of esp_compiler.h from FreeRTOS.h to the app specific FreeRTOSConfig.h where the unlikely() macro is used. This change is in alignment with the upstream FreeRTOS.h file. Signed-off-by: Sudeep Mohanty --- components/freertos/include/freertos/FreeRTOS.h | 5 ----- components/freertos/include/freertos/FreeRTOSConfig.h | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/freertos/include/freertos/FreeRTOS.h b/components/freertos/include/freertos/FreeRTOS.h index d354bbedb3..20e0d9e22a 100644 --- a/components/freertos/include/freertos/FreeRTOS.h +++ b/components/freertos/include/freertos/FreeRTOS.h @@ -53,11 +53,6 @@ #endif /* *INDENT-ON* */ -#ifdef ESP_PLATFORM -/* for likely and unlikely */ -#include "esp_compiler.h" -#endif // ESP_PLATFORM - /* Application specific configuration options. */ #include "freertos/FreeRTOSConfig.h" /* Basic FreeRTOS definitions. */ diff --git a/components/freertos/include/freertos/FreeRTOSConfig.h b/components/freertos/include/freertos/FreeRTOSConfig.h index ecc7c30aac..3cef949666 100644 --- a/components/freertos/include/freertos/FreeRTOSConfig.h +++ b/components/freertos/include/freertos/FreeRTOSConfig.h @@ -71,6 +71,10 @@ #define FREERTOS_CONFIG_H #include "sdkconfig.h" + +/* for likely and unlikely */ +#include "esp_compiler.h" + // The arch-specific FreeRTOSConfig.h in port//include. #include_next "freertos/FreeRTOSConfig.h"