]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/dynamic.c
Notes:
[freertos] / FreeRTOS / Demo / Common / Minimal / dynamic.c
index 25baef3afbd63b27f4cfd8241efbf3e57bbf326f..8180c89f72ad51d726f89aeede6cd3426be6240f 100644 (file)
@@ -189,19 +189,22 @@ void vStartDynamicPriorityTasks( void )
 {\r
        xSuspendedTestQueue = xQueueCreate( priSUSPENDED_QUEUE_LENGTH, sizeof( uint32_t ) );\r
 \r
-       /* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
-       in use.  The queue registry is provided as a means for kernel aware\r
-       debuggers to locate queues and has no purpose if a kernel aware debugger\r
-       is not being used.  The call to vQueueAddToRegistry() will be removed\r
-       by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is\r
-       defined to be less than 1. */\r
-       vQueueAddToRegistry( xSuspendedTestQueue, "Suspended_Test_Queue" );\r
-\r
-       xTaskCreate( vContinuousIncrementTask, "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinuousIncrementHandle );\r
-       xTaskCreate( vLimitedIncrementTask, "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle );\r
-       xTaskCreate( vCounterControlTask, "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
-       xTaskCreate( vQueueSendWhenSuspendedTask, "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
-       xTaskCreate( vQueueReceiveWhenSuspendedTask, "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+       if( xSuspendedTestQueue != NULL )\r
+       {\r
+               /* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
+               in use.  The queue registry is provided as a means for kernel aware\r
+               debuggers to locate queues and has no purpose if a kernel aware debugger\r
+               is not being used.  The call to vQueueAddToRegistry() will be removed\r
+               by the pre-processor if configQUEUE_REGISTRY_SIZE is not defined or is\r
+               defined to be less than 1. */\r
+               vQueueAddToRegistry( xSuspendedTestQueue, "Suspended_Test_Queue" );\r
+\r
+               xTaskCreate( vContinuousIncrementTask, "CNT_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY, &xContinuousIncrementHandle );\r
+               xTaskCreate( vLimitedIncrementTask, "LIM_INC", priSTACK_SIZE, ( void * ) &ulCounter, tskIDLE_PRIORITY + 1, &xLimitedIncrementHandle );\r
+               xTaskCreate( vCounterControlTask, "C_CTRL", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+               xTaskCreate( vQueueSendWhenSuspendedTask, "SUSP_TX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+               xTaskCreate( vQueueReceiveWhenSuspendedTask, "SUSP_RX", priSTACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );\r
+       }\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r