]> granicus.if.org Git - esp-idf/commitdiff
Add C99-style named field in initialisation struct
authorJeroen Domburg <git@j0h.nl>
Mon, 22 Aug 2016 09:45:46 +0000 (17:45 +0800)
committerJeroen Domburg <git@j0h.nl>
Mon, 22 Aug 2016 09:45:46 +0000 (17:45 +0800)
components/freertos/include/freertos/portmacro.h

index c698cb8cb3e1f52ed392ec0446dd426997862fe7..bb574a1aae16e341475d347ca2956f8b282e4318 100644 (file)
@@ -147,11 +147,17 @@ typedef struct {
 #define portMUX_VAL_MASK               0x000000FF
 #define portMUX_VAL_SHIFT              0
 
-//Keep this in sync with the portMUX_TYPE struct definition
+//Keep this in sync with the portMUX_TYPE struct definition please.
 #ifdef portMUX_DEBUG
-#define portMUX_INITIALIZER_UNLOCKED { portMUX_MAGIC_VAL|portMUX_FREE_VAL }
+#define portMUX_INITIALIZER_UNLOCKED {                                         \
+               .mux = portMUX_MAGIC_VAL|portMUX_FREE_VAL               \
+       }
 #else
-#define portMUX_INITIALIZER_UNLOCKED { portMUX_MAGIC_VAL|portMUX_FREE_VAL, "(never locked)", -1 }
+#define portMUX_INITIALIZER_UNLOCKED {                                         \
+               .mux = portMUX_MAGIC_VAL|portMUX_FREE_VAL,              \
+               .lastLockedFn = "(never locked)",                               \
+               .lastLockedLine = -1                                                    \
+       }
 #endif
 
 /* Critical section management. NW-TODO: replace XTOS_SET_INTLEVEL with more efficient version, if any? */