]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/IntQueue.c
Update the demo directory to use the version 8 type naming conventions.
[freertos] / FreeRTOS / Demo / Common / Minimal / IntQueue.c
index e54c4c549a4f953e0699b91e345b40979c9ca943..6fcc07710c23dd7ffdf96af11c76473831e78e33 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    FreeRTOS V8.0.0:rc1 - 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
@@ -178,7 +178,7 @@ an interrupt. */
 /*-----------------------------------------------------------*/\r
 \r
 /* The two queues used by the test. */\r
-static xQueueHandle xNormallyEmptyQueue, xNormallyFullQueue;\r
+static QueueHandle_t xNormallyEmptyQueue, xNormallyFullQueue;\r
 \r
 /* Variables used to detect a stall in one of the tasks. */\r
 static unsigned portBASE_TYPE uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0, uxLowPriorityLoops1 = 0, uxLowPriorityLoops2 = 0;\r
@@ -196,14 +196,14 @@ time to each queue. */
 volatile unsigned portBASE_TYPE uxValueForNormallyEmptyQueue = 0, uxValueForNormallyFullQueue = 0;\r
 \r
 /* A handle to some of the tasks is required so they can be suspended/resumed. */\r
-xTaskHandle xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2;\r
+TaskHandle_t xHighPriorityNormallyEmptyTask1, xHighPriorityNormallyEmptyTask2, xHighPriorityNormallyFullTask1, xHighPriorityNormallyFullTask2;\r
 \r
 /* When a value is received in a queue the value is ticked off in the array\r
 the array position of the value is set to a the identifier of the task or\r
 interrupt that accessed the queue.  This way missing or duplicate values can be\r
 detected. */\r
-static unsigned portCHAR ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
-static unsigned portCHAR ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static unsigned char ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static unsigned char ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
 \r
 /* The test tasks themselves. */\r
 static void prvLowerPriorityNormallyEmptyTask( void *pvParameters );\r
@@ -424,9 +424,9 @@ unsigned portBASE_TYPE uxValue, uxRxed;
        {\r
                if( xQueueReceive( xNormallyEmptyQueue, &uxRxed, intqONE_TICK_DELAY ) != errQUEUE_EMPTY )\r
                {\r
-                       /* We should only obtain a value when the high priority task is\r
+                       /* A value should only be obtained when the high priority task is\r
                        suspended. */\r
-                       if( xTaskIsTaskSuspended( xHighPriorityNormallyEmptyTask1 ) == pdFALSE )\r
+                       if( eTaskGetState( xHighPriorityNormallyEmptyTask1 ) != eSuspended )\r
                        {\r
                                prvQueueAccessLogError( __LINE__ );\r
                        }\r
@@ -621,9 +621,8 @@ unsigned portBASE_TYPE uxValue, uxTxed = 9999;
        {\r
                if( xQueueSend( xNormallyFullQueue, &uxTxed, intqONE_TICK_DELAY ) != errQUEUE_FULL )\r
                {\r
-                       /* We would only expect to succeed when the higher priority task\r
-                       is suspended. */\r
-                       if( xTaskIsTaskSuspended( xHighPriorityNormallyFullTask1 ) == pdFALSE )\r
+                       /* Should only succeed when the higher priority task is suspended */\r
+                       if( eTaskGetState( xHighPriorityNormallyFullTask1 ) != eSuspended )\r
                        {\r
                                prvQueueAccessLogError( __LINE__ );\r
                        }\r