]> granicus.if.org Git - esp-idf/commitdiff
StaticQueue_t needs to have the same size as xQUEUE.
authorDaniel Campora <danicampora@users.noreply.github.com>
Mon, 14 Nov 2016 23:46:53 +0000 (00:46 +0100)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 22 Nov 2016 14:29:27 +0000 (22:29 +0800)
Without this change, building FreeRTOS with static allocation enabled succeeds, but trying to create a queue from a static buffer causes an assert because the size of static and dynamic queues differ.

components/freertos/include/freertos/FreeRTOS.h

index f6c9aa497d9fea259e9b0caf7c332554afc5a832..67bdc6db12bfd29ed912da741060ebdd4269a77f 100644 (file)
@@ -927,7 +927,6 @@ typedef struct xSTATIC_QUEUE
 
        StaticList_t xDummy3[ 2 ];
        UBaseType_t uxDummy4[ 3 ];
-       BaseType_t ucDummy5[ 2 ];
 
        #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
                uint8_t ucDummy6;
@@ -943,12 +942,12 @@ typedef struct xSTATIC_QUEUE
        #endif
 
     struct {
-           volatile uint32_t mux;
+           volatile uint32_t ucDummy10;
     #ifdef CONFIG_FREERTOS_PORTMUX_DEBUG
-           const char *lastLockedFn;
-           int lastLockedLine;
+           void *pvDummy8;
+           UBaseType_t uxDummy11;
     #endif
-    } mux;
+    } sDummy12;
 
 } StaticQueue_t;
 typedef StaticQueue_t StaticSemaphore_t;