]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/QueueSet.c
Update version number ready for release.
[freertos] / FreeRTOS / Demo / Common / Minimal / QueueSet.c
index 1b8dec6de57244c3a1956e70e66b9df9443d0d51..2b405d53a211746efd942b062690719afdc86e5d 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. \r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
@@ -118,7 +118,7 @@ queuesetPRIORITY_CHANGE_LOOPS number of values are sent to a queue. */
 /* A delay inserted when the Tx task changes its priority to be above the idle\r
 task priority to ensure the idle priority tasks get some CPU time before the\r
 next iteration of the queue set Tx task. */\r
-#define queuesetTX_LOOP_DELAY  ( 200 / portTICK_RATE_MS )\r
+#define queuesetTX_LOOP_DELAY  ( 200 / portTICK_PERIOD_MS )\r
 \r
 /* The allowable maximum deviation between a received value and the expected\r
 received value.  A deviation will occur when data is received from a queue\r
@@ -189,14 +189,14 @@ static void prvSRand( unsigned long ulSeed );
 /*-----------------------------------------------------------*/\r
 \r
 /* The queues that are added to the set. */\r
-static xQueueHandle xQueues[ queuesetNUM_QUEUES_IN_SET ] = { 0 };\r
+static QueueHandle_t xQueues[ queuesetNUM_QUEUES_IN_SET ] = { 0 };\r
 \r
 /* Counts how many times each queue in the set is used to ensure all the\r
 queues are used. */\r
 static unsigned long ulQueueUsedCounter[ queuesetNUM_QUEUES_IN_SET ] = { 0 };\r
 \r
 /* The handle of the queue set to which the queues are added. */\r
-static xQueueSetHandle xQueueSet;\r
+static QueueSetHandle_t xQueueSet;\r
 \r
 /* If the prvQueueSetReceivingTask() task has not detected any errors then\r
 it increments ulCycleCounter on each iteration.\r
@@ -222,15 +222,15 @@ static volatile unsigned long ulISRTxValue = queuesetINITIAL_ISR_TX_VALUE;
 static unsigned long ulNextRand = 0;\r
 \r
 /* The task handles are stored so their priorities can be changed. */\r
-xTaskHandle xQueueSetSendingTask, xQueueSetReceivingTask;\r
+TaskHandle_t xQueueSetSendingTask, xQueueSetReceivingTask;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 void vStartQueueSetTasks( void )\r
 {\r
        /* Create the tasks. */\r
-       xTaskCreate( prvQueueSetSendingTask, ( signed char * ) "SetTx", configMINIMAL_STACK_SIZE, NULL, queuesetMEDIUM_PRIORITY, &xQueueSetSendingTask );\r
-       xTaskCreate( prvQueueSetReceivingTask, ( signed char * ) "SetRx", configMINIMAL_STACK_SIZE, ( void * ) xQueueSetSendingTask, queuesetMEDIUM_PRIORITY, &xQueueSetReceivingTask );\r
+       xTaskCreate( prvQueueSetSendingTask, "SetTx", configMINIMAL_STACK_SIZE, NULL, queuesetMEDIUM_PRIORITY, &xQueueSetSendingTask );\r
+       xTaskCreate( prvQueueSetReceivingTask, "SetRx", configMINIMAL_STACK_SIZE, ( void * ) xQueueSetSendingTask, queuesetMEDIUM_PRIORITY, &xQueueSetReceivingTask );\r
 \r
        /* It is important that the sending task does not attempt to write to a\r
        queue before the queue has been created.  It is therefore placed into the\r
@@ -292,7 +292,7 @@ portBASE_TYPE xReturn = pdPASS, x;
 static void prvQueueSetSendingTask( void *pvParameters )\r
 {\r
 unsigned long ulTaskTxValue = 0, ulQueueToWriteTo;\r
-xQueueHandle xQueueInUse;\r
+QueueHandle_t xQueueInUse;\r
 \r
        /* Remove compiler warning about the unused parameter. */\r
        ( void ) pvParameters;\r
@@ -319,6 +319,10 @@ xQueueHandle xQueueInUse;
                        xQueueSetTasksStatus = pdFAIL;\r
                }\r
 \r
+               #if( configUSE_PREEMPTION == 0 )\r
+                       taskYIELD();\r
+               #endif\r
+\r
                ulTaskTxValue++;\r
 \r
                /* If the Tx value has reached the range used by the ISR then set it\r
@@ -386,7 +390,7 @@ static eRelativePriorities ePriorities = eEqualPriority;
 static void prvQueueSetReceivingTask( void *pvParameters )\r
 {\r
 unsigned long ulReceived;\r
-xQueueHandle xActivatedQueue;\r
+QueueHandle_t xActivatedQueue;\r
 \r
        /* Remove compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -566,7 +570,7 @@ portBASE_TYPE xReturn = pdPASS;
 \r
 static void prvReceiveFromQueueInSetFromISR( void )\r
 {\r
-xQueueSetMemberHandle xActivatedQueue;\r
+QueueSetMemberHandle_t xActivatedQueue;\r
 unsigned long ulReceived;\r
 \r
        /* See if any of the queues in the set contain data. */\r