]> git.sur5r.net Git - freertos/blobdiff - Demo/PPC440_DP_FPU_Xilinx_Virtex5_GCC/RTOSDemo/flop/flop.c
Remove unnecessary use of portLONG, portCHAR and portSHORT.
[freertos] / Demo / PPC440_DP_FPU_Xilinx_Virtex5_GCC / RTOSDemo / flop / flop.c
index e053d603487da1513e79e1e14fab562e458f512a..1b90e3993cdec157d25e3affa89c136335ec92c0 100644 (file)
@@ -1,48 +1,49 @@
 /*\r
-       FreeRTOS V5.4.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+    FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.\r
 \r
-       This file is part of the FreeRTOS distribution.\r
+    This file is part of the FreeRTOS distribution.\r
 \r
-       FreeRTOS is free software; you can redistribute it and/or modify it     under \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
-       **NOTE** The exception to the GPL is included to allow you to distribute a\r
-       combined work that includes FreeRTOS without being obliged to provide the \r
-       source code for proprietary components outside of the FreeRTOS kernel.  \r
-       Alternative commercial license and support terms are also available upon \r
-       request.  See the licensing section of http://www.FreeRTOS.org for full \r
-       license details.\r
+    FreeRTOS is free software; you can redistribute it and/or modify it    under\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
+    **NOTE** The exception to the GPL is included to allow you to distribute a\r
+    combined work that includes FreeRTOS without being obliged to provide the\r
+    source code for proprietary components outside of the FreeRTOS kernel.\r
+    Alternative commercial license and support terms are also available upon\r
+    request.  See the licensing section of http://www.FreeRTOS.org for full\r
+    license details.\r
 \r
-       FreeRTOS is distributed in the hope that it will be useful,     but WITHOUT\r
-       ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
-       FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
-       more details.\r
+    FreeRTOS is distributed in the hope that it will be useful,    but WITHOUT\r
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
+    more details.\r
 \r
-       You should have received a copy of the GNU General Public License along\r
-       with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59\r
-       Temple Place, Suite 330, Boston, MA  02111-1307  USA.\r
+    You should have received a copy of the GNU General Public License along\r
+    with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59\r
+    Temple Place, Suite 330, Boston, MA  02111-1307  USA.\r
 \r
 \r
-       ***************************************************************************\r
-       *                                                                         *\r
-       * Looking for a quick start?  Then check out the FreeRTOS eBook!          *\r
-       * See http://www.FreeRTOS.org/Documentation for details                   *\r
-       *                                                                         *\r
-       ***************************************************************************\r
+    ***************************************************************************\r
+    *                                                                         *\r
+    * The FreeRTOS eBook and reference manual are available to purchase for a *\r
+    * small fee. Help yourself get started quickly while also helping the     *\r
+    * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *\r
+    *                                                                         *\r
+    ***************************************************************************\r
 \r
-       1 tab == 4 spaces!\r
+    1 tab == 4 spaces!\r
 \r
-       Please ensure to read the configuration and relevant port sections of the\r
-       online documentation.\r
+    Please ensure to read the configuration and relevant port sections of the\r
+    online documentation.\r
 \r
-       http://www.FreeRTOS.org - Documentation, latest information, license and\r
-       contact details.\r
+    http://www.FreeRTOS.org - Documentation, latest information, license and\r
+    contact details.\r
 \r
-       http://www.SafeRTOS.com - A version that is certified for use in safety\r
-       critical systems.\r
+    http://www.SafeRTOS.com - A version that is certified for use in safety\r
+    critical systems.\r
 \r
-       http://www.OpenRTOS.com - Commercial support, development, porting,\r
-       licensing and training services.\r
+    http://www.OpenRTOS.com - Commercial support, development, porting,\r
+    licensing and training services.\r
 */\r
 \r
 /*\r
@@ -84,7 +85,7 @@ static portTASK_FUNCTION_PROTO( vCompetingMathTask4, pvParameters );
 \r
 /* These variables are used to check that all the tasks are still running.  If a \r
 task gets a calculation wrong it will stop incrementing its check variable. */\r
-static volatile unsigned portSHORT usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };\r
+static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
 \r
 /* Buffers into which the flop registers will be saved.  There is a buffer for \r
 each task created within this file.  Zeroing out this array is the normal and\r
@@ -118,7 +119,7 @@ portBASE_TYPE x, y;
        /* Create the first task - passing it the address of the check variable\r
        that it is going to increment.  This check variable is used as an \r
        indication that the task is still running. */\r
-       xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );\r
+       xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math1", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 0 ] ), uxPriority, &xTaskJustCreated );\r
 \r
        /* The task     tag value is a value that can be associated with a task, but \r
        is not used by the scheduler itself.  Its use is down to the application so\r
@@ -128,25 +129,25 @@ portBASE_TYPE x, y;
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 0 ][ 0 ] ) );\r
 \r
        /* Create another 7 tasks, allocating a buffer for each. */\r
-       xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated  );\r
+       xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math2", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 1 ] ), uxPriority, &xTaskJustCreated  );\r
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 1 ][ 0 ] ) );\r
 \r
-       xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated  );\r
+       xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math3", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 2 ] ), uxPriority, &xTaskJustCreated  );\r
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 2 ][ 0 ] ) );\r
 \r
-       xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated  );\r
+       xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math4", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 3 ] ), uxPriority, &xTaskJustCreated  );\r
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 3 ][ 0 ] ) );\r
 \r
-       xTaskCreate( vCompetingMathTask1, ( signed portCHAR * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated  );\r
+       xTaskCreate( vCompetingMathTask1, ( signed char * ) "Math5", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 4 ] ), uxPriority, &xTaskJustCreated  );\r
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 4 ][ 0 ] ) );\r
 \r
-       xTaskCreate( vCompetingMathTask2, ( signed portCHAR * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated  );\r
+       xTaskCreate( vCompetingMathTask2, ( signed char * ) "Math6", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 5 ] ), uxPriority, &xTaskJustCreated  );\r
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 5 ][ 0 ] ) );\r
 \r
-       xTaskCreate( vCompetingMathTask3, ( signed portCHAR * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated  );\r
+       xTaskCreate( vCompetingMathTask3, ( signed char * ) "Math7", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 6 ] ), uxPriority, &xTaskJustCreated  );\r
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 6 ][ 0 ] ) );\r
 \r
-       xTaskCreate( vCompetingMathTask4, ( signed portCHAR * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated  );\r
+       xTaskCreate( vCompetingMathTask4, ( signed char * ) "Math8", mathSTACK_SIZE, ( void * ) &( usTaskCheck[ 7 ] ), uxPriority, &xTaskJustCreated  );\r
        vTaskSetApplicationTaskTag( xTaskJustCreated, ( void * ) &( dFlopRegisters[ 7 ][ 0 ] ) );\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -154,9 +155,9 @@ portBASE_TYPE x, y;
 static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )\r
 {\r
 volatile portDOUBLE df1, df2, df3, df4;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
 volatile portDOUBLE dAnswer;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
 \r
        df1 = 123.4567;\r
        df2 = 2345.6789;\r
@@ -166,7 +167,7 @@ portSHORT sError = pdFALSE;
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
 \r
        /* Keep performing a calculation and checking the result against a constant. */\r
        for(;;)\r
@@ -206,9 +207,9 @@ portSHORT sError = pdFALSE;
 static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )\r
 {\r
 volatile portDOUBLE df1, df2, df3, df4;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
 volatile portDOUBLE dAnswer;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
 \r
        df1 = -389.38;\r
        df2 = 32498.2;\r
@@ -219,7 +220,7 @@ portSHORT sError = pdFALSE;
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
 \r
        /* Keep performing a calculation and checking the result against a constant. */\r
        for( ;; )\r
@@ -259,14 +260,14 @@ portSHORT sError = pdFALSE;
 static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )\r
 {\r
 volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
 const size_t xArraySize = 10;\r
 size_t xPosition;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
 \r
        pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) );\r
 \r
@@ -316,14 +317,14 @@ portSHORT sError = pdFALSE;
 static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )\r
 {\r
 volatile portDOUBLE *pdArray, dTotal1, dTotal2, dDifference;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
 const size_t xArraySize = 10;\r
 size_t xPosition;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
 \r
        /* The variable this task increments to show it is still running is passed in \r
        as the parameter. */\r
-       pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+       pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
 \r
        pdArray = ( portDOUBLE * ) pvPortMalloc( xArraySize * sizeof( portDOUBLE ) );\r
 \r
@@ -375,7 +376,7 @@ portBASE_TYPE xAreMathsTaskStillRunning( void )
 {\r
 /* Keep a history of the check variables so we know if they have been incremented \r
 since the last call. */\r
-static unsigned portSHORT usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };\r
+static unsigned short usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
 portBASE_TYPE xReturn = pdTRUE, xTask;\r
 \r
        /* Check the maths tasks are still running by ensuring their check variables \r