Fix UNTESTED_FUNCTION includes, remove unnecessary mux initialization in event groups
This commit is contained in:
parent
fc53bb6ed5
commit
8db85d71b2
|
@ -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 */
|
/* 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 portMUX_TYPE xEventGroupMux = portMUX_INITIALIZER_UNLOCKED;
|
||||||
static BaseType_t xMuxInitialized = pdFALSE;
|
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -145,12 +144,6 @@ EventGroupHandle_t xEventGroupCreate( void )
|
||||||
{
|
{
|
||||||
EventGroup_t *pxEventBits;
|
EventGroup_t *pxEventBits;
|
||||||
|
|
||||||
//Initialize mux, if needed
|
|
||||||
if ( xMuxInitialized == pdFALSE ) {
|
|
||||||
vPortCPUInitializeMutex( & xEventGroupMux );
|
|
||||||
xMuxInitialized = pdTRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
pxEventBits = pvPortMalloc( sizeof( EventGroup_t ) );
|
pxEventBits = pvPortMalloc( sizeof( EventGroup_t ) );
|
||||||
if( pxEventBits != NULL )
|
if( pxEventBits != NULL )
|
||||||
{
|
{
|
||||||
|
|
|
@ -124,6 +124,16 @@
|
||||||
abort(); \
|
abort(); \
|
||||||
}
|
}
|
||||||
#endif
|
#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__ */
|
#endif /* def __ASSEMBLER__ */
|
||||||
|
|
||||||
|
|
||||||
|
@ -263,12 +273,6 @@
|
||||||
#define configXT_SIMULATOR 0
|
#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 */
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
|
|
Loading…
Reference in a new issue