From 06cad10ec0375e9c993a19d61ce2bdacfb053bdc Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Fri, 21 Oct 2022 11:17:42 +0200 Subject: [PATCH] freertos: Add missing ESP_PLATFORM preprocessor directive for FreeRTOS static data structs (v4.4) This commit adds the missing ESP_PLATFORM preprocessor directive to static data structures to wrap the extra variable added for SMP locks. Closes https://github.com/espressif/esp-idf/issues/9785 --- components/freertos/include/freertos/FreeRTOS.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/components/freertos/include/freertos/FreeRTOS.h b/components/freertos/include/freertos/FreeRTOS.h index eb0ee6be35..296b287837 100644 --- a/components/freertos/include/freertos/FreeRTOS.h +++ b/components/freertos/include/freertos/FreeRTOS.h @@ -1296,7 +1296,9 @@ typedef struct xSTATIC_QUEUE UBaseType_t uxDummy8; uint8_t ucDummy9; #endif - portMUX_TYPE xDummy10; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy10; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticQueue_t; typedef StaticQueue_t StaticSemaphore_t; @@ -1326,7 +1328,9 @@ typedef struct xSTATIC_EVENT_GROUP #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) uint8_t ucDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticEventGroup_t; /* @@ -1378,7 +1382,9 @@ typedef struct xSTATIC_STREAM_BUFFER #if ( configUSE_TRACE_FACILITY == 1 ) UBaseType_t uxDummy4; #endif - portMUX_TYPE xDummy5; +#ifdef ESP_PLATFORM + portMUX_TYPE xDummy5; //Mutex required due to SMP +#endif // ESP_PLATFORM } StaticStreamBuffer_t; /* Message buffers are built on stream buffers. */