static void prvTestAbortingEventGroupWait( void )\r
{\r
TickType_t xTimeAtStart;\r
-static StaticEventGroup_t xEventGroupBuffer;\r
EventGroupHandle_t xEventGroup;\r
EventBits_t xBitsToWaitFor = ( EventBits_t ) 0x01, xReturn;\r
\r
- /* Create the event group. Statically allocated memory is used so the\r
- creation cannot fail. */\r
- xEventGroup = xEventGroupCreateStatic( &xEventGroupBuffer );\r
+ #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+ {\r
+ static StaticEventGroup_t xEventGroupBuffer;\r
+\r
+ /* Create the event group. Statically allocated memory is used so the\r
+ creation cannot fail. */\r
+ xEventGroup = xEventGroupCreateStatic( &xEventGroupBuffer );\r
+ }\r
+ #else\r
+ {\r
+ xEventGroup = xEventGroupCreate();\r
+ configASSERT( xEventGroup );\r
+ }\r
+ #endif\r
\r
/* Note the time before the delay so the length of the delay is known. */\r
xTimeAtStart = xTaskGetTickCount();\r
{\r
TickType_t xTimeAtStart;\r
BaseType_t xReturn;\r
-static StaticQueue_t xQueueBuffer;\r
-static uint8_t ucQueueStorage[ sizeof( uint8_t ) ], ucItemToQueue;\r
const UBaseType_t xQueueLength = ( UBaseType_t ) 1;\r
QueueHandle_t xQueue;\r
+uint8_t ucItemToQueue;\r
\r
- /* Create the queue. Statically allocated memory is used so the\r
- creation cannot fail. */\r
- xQueue = xQueueCreateStatic( xQueueLength, sizeof( uint8_t ), ucQueueStorage, &xQueueBuffer );\r
+ #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+ {\r
+ static StaticQueue_t xQueueBuffer;\r
+ static uint8_t ucQueueStorage[ sizeof( uint8_t ) ];\r
+\r
+ /* Create the queue. Statically allocated memory is used so the\r
+ creation cannot fail. */\r
+ xQueue = xQueueCreateStatic( xQueueLength, sizeof( uint8_t ), ucQueueStorage, &xQueueBuffer );\r
+ }\r
+ #else\r
+ {\r
+ xQueue = xQueueCreate( xQueueLength, sizeof( uint8_t ) );\r
+ configASSERT( xQueue );\r
+ }\r
+ #endif\r
\r
/* This function tests aborting when in the blocked state waiting to send,\r
so the queue must be full. There is only one space in the queue. */\r
{\r
TickType_t xTimeAtStart;\r
BaseType_t xReturn;\r
-static StaticSemaphore_t xSemaphoreBuffer;\r
SemaphoreHandle_t xSemaphore;\r
\r
- /* Create the semaphore. Statically allocated memory is used so the\r
- creation cannot fail. */\r
- xSemaphore = xSemaphoreCreateBinaryStatic( &xSemaphoreBuffer );\r
+ #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+ {\r
+ static StaticSemaphore_t xSemaphoreBuffer;\r
+\r
+ /* Create the semaphore. Statically allocated memory is used so the\r
+ creation cannot fail. */\r
+ xSemaphore = xSemaphoreCreateBinaryStatic( &xSemaphoreBuffer );\r
+ }\r
+ #else\r
+ {\r
+ xSemaphore = xSemaphoreCreateBinary();\r
+ }\r
+ #endif\r
\r
/* Note the time before the delay so the length of the delay is known. */\r
xTimeAtStart = xTaskGetTickCount();\r