]> granicus.if.org Git - esp-idf/commitdiff
Fix UNTESTED_FUNCTION includes, remove unnecessary mux initialization in event groups
authorJeroen Domburg <git@j0h.nl>
Tue, 27 Sep 2016 03:50:46 +0000 (11:50 +0800)
committerJeroen Domburg <git@j0h.nl>
Tue, 27 Sep 2016 03:50:46 +0000 (11:50 +0800)
components/freertos/event_groups.c
components/freertos/include/freertos/FreeRTOSConfig.h

index 0eafab10a5bb4263530c8421d42d65fc40a0826c..902a4ad72a0af5a1bba5f0574ec493b8ae0aa174 100644 (file)
@@ -124,7 +124,6 @@ typedef struct xEventGroupDefinition
 
 /* Again: one mux for all events. Maybe this can be made more granular. ToDo: look into that. -JD */
 static portMUX_TYPE xEventGroupMux = portMUX_INITIALIZER_UNLOCKED;
-static BaseType_t xMuxInitialized = pdFALSE;
 
 
 /*-----------------------------------------------------------*/
@@ -145,12 +144,6 @@ EventGroupHandle_t xEventGroupCreate( void )
 {
 EventGroup_t *pxEventBits;
 
-       //Initialize mux, if needed
-       if ( xMuxInitialized == pdFALSE ) {
-               vPortCPUInitializeMutex( & xEventGroupMux );
-               xMuxInitialized = pdTRUE;
-       }
-       
        pxEventBits = pvPortMalloc( sizeof( EventGroup_t ) );
        if( pxEventBits != NULL )
        {
index 466c6404c7c484a6959130cdb851e6bcb0f8e5e7..d1958e7701b6f67473469d4bcadc4d1c9e2baea5 100644 (file)
         abort();                                                        \
         }
 #endif
+
+#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION
+#include <stdlib.h>
+#include "rom/ets_sys.h"
+#define UNTESTED_FUNCTION() { ets_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0)
+#else
+#define UNTESTED_FUNCTION()
+#endif
+
+
 #endif /* def __ASSEMBLER__ */
 
 
 #define configXT_SIMULATOR                                     0
 
 
-#if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION
-#include "rom/ets_sys.h"
-#define UNTESTED_FUNCTION() { ets_printf("Untested FreeRTOS function %s\r\n", __FUNCTION__); configASSERT(false); } while(0)
-#else
-#define UNTESTED_FUNCTION()
-#endif
 
 
 #endif /* FREERTOS_CONFIG_H */