]> git.sur5r.net Git - freertos/commitdiff
Add some missing volatiles to __asm statements in the CA9 GCC port.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 19 May 2014 13:14:02 +0000 (13:14 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 19 May 2014 13:14:02 +0000 (13:14 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2242 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c
FreeRTOS/Source/portable/GCC/ARM_CA9/port.c
FreeRTOS/Source/portable/GCC/ARM_CA9/portmacro.h

index 085d71dcf949355f04484f47daab592b72544cdf..b731655451583cde4dd11373afc1b9c65b61ed97 100644 (file)
@@ -70,8 +70,8 @@
 * groups.  It is not intended to be a user friendly demonstration of the\r
 * event groups API.\r
 *\r
-* NOTE:  The tests implemented in this file are informal 'sanity' tests \r
-* only and are not part of the module tests that make use of the \r
+* NOTE:  The tests implemented in this file are informal 'sanity' tests\r
+* only and are not part of the module tests that make use of the\r
 * mtCOVERAGE_TEST_MARKER macro within the event groups implementation.\r
 */\r
 \r
@@ -128,20 +128,20 @@ event bits in a group are unblocked as appropriate as different bits get set. */
 /*-----------------------------------------------------------*/\r
 \r
 /*\r
- * NOTE:  The tests implemented in this function are informal 'sanity' tests \r
- * only and are not part of the module tests that make use of the \r
+ * NOTE:  The tests implemented in this function are informal 'sanity' tests\r
+ * only and are not part of the module tests that make use of the\r
  * mtCOVERAGE_TEST_MARKER macro within the event groups implementation.\r
  *\r
  * The master test task.  This task:\r
  *\r
- * 1) Calls prvSelectiveBitsTestMasterFunction() to test the behaviour when two \r
- *    tasks are blocked on different bits in an event group.  The counterpart of \r
- *    this test is implemented by the prvSelectiveBitsTestSlaveFunction() \r
+ * 1) Calls prvSelectiveBitsTestMasterFunction() to test the behaviour when two\r
+ *    tasks are blocked on different bits in an event group.  The counterpart of\r
+ *    this test is implemented by the prvSelectiveBitsTestSlaveFunction()\r
  *    function (which is called by the two tasks that block on the event group).\r
  *\r
  * 2) Calls prvBitCombinationTestMasterFunction() to test the behaviour when\r
- *    just one task is blocked on various combinations of bits within an event \r
- *    group.  The counterpart of this test is implemented within the 'test \r
+ *    just one task is blocked on various combinations of bits within an event\r
+ *    group.  The counterpart of this test is implemented within the 'test\r
  *    slave' task.\r
  *\r
  * 3) Calls prvPerformTaskSyncTests() to test task synchronisation behaviour.\r
@@ -149,7 +149,7 @@ event bits in a group are unblocked as appropriate as different bits get set. */
 static void prvTestMasterTask( void *pvParameters );\r
 \r
 /*\r
- * A helper task that enables the 'test master' task to perform several \r
+ * A helper task that enables the 'test master' task to perform several\r
  * behavioural tests.  See the comments above the prvTestMasterTask() prototype\r
  * above.\r
  */\r
@@ -169,7 +169,7 @@ static BaseType_t prvBitCombinationTestMasterFunction( BaseType_t xError, TaskHa
 static BaseType_t prvPerformTaskSyncTests( BaseType_t xError, TaskHandle_t xTestSlaveTaskHandle );\r
 \r
 /*\r
- * Two instances of prvSyncTask() are created.  They start by calling \r
+ * Two instances of prvSyncTask() are created.  They start by calling\r
  * prvSelectiveBitsTestSlaveFunction() to act as slaves when the test master is\r
  * executing the prvSelectiveBitsTestMasterFunction() function.  They then loop\r
  * to test the task synchronisation (rendezvous) behaviour.\r
@@ -178,7 +178,7 @@ static void prvSyncTask( void *pvParameters );
 \r
 /*\r
  * Functions used in a test that blocks two tasks on various different bits\r
- * within an event group - then sets each bit in turn and checks that the \r
+ * within an event group - then sets each bit in turn and checks that the\r
  * correct tasks unblock at the correct times.\r
  */\r
 static BaseType_t prvSelectiveBitsTestMasterFunction( void );\r
@@ -210,8 +210,8 @@ TaskHandle_t xTestSlaveTaskHandle;
         * groups.  It is not intended to be a user friendly demonstration of the\r
         * event groups API.\r
         *\r
-        * NOTE:  The tests implemented in this file are informal 'sanity' tests \r
-        * only and are not part of the module tests that make use of the \r
+        * NOTE:  The tests implemented in this file are informal 'sanity' tests\r
+        * only and are not part of the module tests that make use of the\r
         * mtCOVERAGE_TEST_MARKER macro within the event groups implementation.\r
         *\r
         * Create the test tasks as described at the top of this file.\r
@@ -245,8 +245,8 @@ TaskHandle_t xTestSlaveTaskHandle = ( TaskHandle_t ) pvParameters;
        xEventGroup = xEventGroupCreate();\r
        configASSERT( xEventGroup );\r
 \r
-       /* Perform the tests that block two tasks on different combinations of bits, \r
-       then set each bit in turn and check the correct tasks unblock at the correct \r
+       /* Perform the tests that block two tasks on different combinations of bits,\r
+       then set each bit in turn and check the correct tasks unblock at the correct\r
        times. */\r
        xError = prvSelectiveBitsTestMasterFunction();\r
 \r
@@ -298,7 +298,7 @@ static void prvSyncTask( void *pvParameters )
 {\r
 EventBits_t uxSynchronisationBit, uxReturned;\r
 \r
-       /* A few tests that check the behaviour when two tasks are blocked on \r
+       /* A few tests that check the behaviour when two tasks are blocked on\r
        various different bits within an event group are performed before this task\r
        enters its infinite loop to carry out its main demo function. */\r
        prvSelectiveBitsTestSlaveFunction();\r
@@ -309,10 +309,10 @@ EventBits_t uxSynchronisationBit, uxReturned;
 \r
        for( ;; )\r
        {\r
-               /* Now this task takes part in a task synchronisation - sometimes known \r
-               as a 'rendezvous'.  Its execution pattern is controlled by the 'test \r
-               master' task, which is responsible for taking this task out of the \r
-               Suspended state when it is time to test the synchronisation behaviour.  \r
+               /* Now this task takes part in a task synchronisation - sometimes known\r
+               as a 'rendezvous'.  Its execution pattern is controlled by the 'test\r
+               master' task, which is responsible for taking this task out of the\r
+               Suspended state when it is time to test the synchronisation behaviour.\r
                See: http://www.freertos.org/xEventGroupSync.html. */\r
                vTaskSuspend( NULL );\r
 \r
@@ -326,7 +326,7 @@ EventBits_t uxSynchronisationBit, uxReturned;
                                                                        portMAX_DELAY );/* The maximum time to wait for the sync condition to be met before giving up. */\r
 \r
                /* A max delay was used, so this task should only exit the above\r
-               function call when the sync condition is met.  Check this is the \r
+               function call when the sync condition is met.  Check this is the\r
                case. */\r
                configASSERT( ( uxReturned & ebALL_SYNC_BITS ) == ebALL_SYNC_BITS );\r
 \r
@@ -337,17 +337,17 @@ EventBits_t uxSynchronisationBit, uxReturned;
                vTaskSuspend( NULL );\r
 \r
                /* Set the bit that indicates this task is at the synchronisation\r
-               point again.  This time the 'test master' task has a higher priority \r
+               point again.  This time the 'test master' task has a higher priority\r
                than this task so will get to the sync point before this task. */\r
                uxReturned = xEventGroupSync( xEventGroup, uxSynchronisationBit, ebALL_SYNC_BITS, portMAX_DELAY );\r
 \r
                /* Again a max delay was used, so this task should only exit the above\r
-               function call when the sync condition is met.  Check this is the \r
+               function call when the sync condition is met.  Check this is the\r
                case. */\r
                configASSERT( ( uxReturned & ebALL_SYNC_BITS ) == ebALL_SYNC_BITS );\r
 \r
                /* Block on the event group again.  This time the event group is going\r
-               to be deleted while this task is blocked on it so it is expected that 0 \r
+               to be deleted while this task is blocked on it so it is expected that 0\r
                be returned. */\r
                uxReturned = xEventGroupWaitBits( xEventGroup, ebALL_SYNC_BITS, pdFALSE, pdTRUE, portMAX_DELAY );\r
                configASSERT( uxReturned == 0 );\r
@@ -366,13 +366,13 @@ BaseType_t xError = pdFALSE;
        for( ;; )\r
        {\r
                /**********************************************************************\r
-               * Part 1:  This section is the counterpart to the \r
+               * Part 1:  This section is the counterpart to the\r
                * prvBitCombinationTestMasterFunction() function which is called by the\r
                * test master task.\r
                ***********************************************************************\r
 \r
                This task is controller by the 'test master' task (which is\r
-               implemented by prvTestMasterTask()).  Suspend until resumed by the \r
+               implemented by prvTestMasterTask()).  Suspend until resumed by the\r
                'test master' task. */\r
                vTaskSuspend( NULL );\r
 \r
@@ -384,19 +384,19 @@ BaseType_t xError = pdFALSE;
                                                                                 pdTRUE,                /* Wait for all the bits (only one in this case anyway). */\r
                                                                                 portMAX_DELAY ); /* Block indefinitely to wait for the condition to be met. */\r
 \r
-               /* The 'test master' task set all the bits defined by ebCOMBINED_BITS, \r
+               /* The 'test master' task set all the bits defined by ebCOMBINED_BITS,\r
                only one of which was being waited for by this task.  The return value\r
                shows the state of the event bits when the task was unblocked, however\r
-               because the task was waiting for ebBIT_1 and 'clear on exit' was set to \r
+               because the task was waiting for ebBIT_1 and 'clear on exit' was set to\r
                the current state of the event bits will have ebBIT_1 clear.  */\r
                if( uxReturned != ebCOMBINED_BITS )\r
                {\r
                        xError = pdTRUE;\r
                }\r
 \r
-               /* Now call xEventGroupWaitBits() again, this time waiting for all the \r
-               bits in ebCOMBINED_BITS to be set.  This call should block until the \r
-               'test master' task sets ebBIT_1 - which was the bit cleared in the call \r
+               /* Now call xEventGroupWaitBits() again, this time waiting for all the\r
+               bits in ebCOMBINED_BITS to be set.  This call should block until the\r
+               'test master' task sets ebBIT_1 - which was the bit cleared in the call\r
                to xEventGroupWaitBits() above. */\r
                uxReturned = xEventGroupWaitBits( xEventGroup,\r
                                                                                 ebCOMBINED_BITS, /* The bits being waited on. */\r
@@ -413,8 +413,8 @@ BaseType_t xError = pdFALSE;
                /* Suspend again to wait for the 'test master' task. */\r
                vTaskSuspend( NULL );\r
 \r
-               /* Now call xEventGroupWaitBits() again, again waiting for all the bits \r
-               in ebCOMBINED_BITS to be set, but this time clearing the bits when the \r
+               /* Now call xEventGroupWaitBits() again, again waiting for all the bits\r
+               in ebCOMBINED_BITS to be set, but this time clearing the bits when the\r
                task is unblocked. */\r
                uxReturned = xEventGroupWaitBits( xEventGroup,\r
                                                                         ebCOMBINED_BITS, /* The bits being waited on. */\r
@@ -422,7 +422,7 @@ BaseType_t xError = pdFALSE;
                                                                         pdTRUE,                  /* All the bits must be set to unblock. */\r
                                                                         portMAX_DELAY );\r
 \r
-               /* The 'test master' task set all the bits in the event group, so that \r
+               /* The 'test master' task set all the bits in the event group, so that\r
                is the value that should have been returned.  The bits defined by\r
                ebCOMBINED_BITS will have been clear again in the current value though\r
                as 'clear on exit' was set to pdTRUE. */\r
@@ -436,7 +436,7 @@ BaseType_t xError = pdFALSE;
 \r
 \r
                /**********************************************************************\r
-               * Part 2:  This section is the counterpart to the \r
+               * Part 2:  This section is the counterpart to the\r
                * prvPerformTaskSyncTests() function which is called by the\r
                * test master task.\r
                ***********************************************************************\r
@@ -447,7 +447,7 @@ BaseType_t xError = pdFALSE;
                vTaskSuspend( NULL );\r
 \r
                /* Now peform a synchronisation with all the other tasks.  At this point\r
-               the 'test master' task has the lowest priority so will get to the sync \r
+               the 'test master' task has the lowest priority so will get to the sync\r
                point after all the other synchronising tasks. */\r
                uxReturned = xEventGroupSync( xEventGroup,              /* The event group used for the sync. */\r
                                                                        ebWAIT_BIT_TASK_SYNC_BIT, /* The bit in the event group used to indicate this task is at the sync point. */\r
@@ -485,7 +485,7 @@ BaseType_t xError = pdFALSE;
                vTaskSuspend( NULL );\r
 \r
                /* This time sync when the 'test master' task has the highest priority\r
-               at the point where it sets its sync bit - so this time the 'test master' \r
+               at the point where it sets its sync bit - so this time the 'test master'\r
                task will get to the sync point before this task. */\r
                uxReturned = xEventGroupSync( xEventGroup, ebWAIT_BIT_TASK_SYNC_BIT, ebALL_SYNC_BITS, portMAX_DELAY );\r
 \r
@@ -503,7 +503,7 @@ BaseType_t xError = pdFALSE;
                }\r
 \r
                /* Block on the event group again.  This time the event group is going\r
-               to be deleted while this task is blocked on it, so it is expected that 0 \r
+               to be deleted while this task is blocked on it, so it is expected that 0\r
                will be returned. */\r
                uxReturned = xEventGroupWaitBits( xEventGroup, ebALL_SYNC_BITS, pdFALSE, pdTRUE, portMAX_DELAY );\r
 \r
@@ -845,8 +845,8 @@ static void prvSelectiveBitsTestSlaveFunction( void )
 {\r
 EventBits_t uxPendBits, uxReturned;\r
 \r
-       /* Used in a test that blocks two tasks on various different bits within an \r
-       event group - then sets each bit in turn and checks that the correct tasks \r
+       /* Used in a test that blocks two tasks on various different bits within an\r
+       event group - then sets each bit in turn and checks that the correct tasks\r
        unblock at the correct times.\r
 \r
        This function is called by two different tasks - each of which will use a\r
@@ -864,7 +864,7 @@ EventBits_t uxPendBits, uxReturned;
        for( ;; )\r
        {\r
                /* Wait until it is time to perform the next cycle of the test.  The\r
-               task is unsuspended by the tests implemented in the \r
+               task is unsuspended by the tests implemented in the\r
                prvSelectiveBitsTestMasterFunction() function. */\r
                vTaskSuspend( NULL );\r
                uxReturned = xEventGroupWaitBits( xEventGroup, uxPendBits, pdTRUE, pdFALSE, portMAX_DELAY );\r
@@ -882,9 +882,9 @@ static BaseType_t prvSelectiveBitsTestMasterFunction( void )
 BaseType_t xError = pdFALSE;\r
 EventBits_t uxBit;\r
 \r
-       /* Used in a test that blocks two tasks on various different bits within an \r
-       event group - then sets each bit in turn and checks that the correct tasks \r
-       unblock at the correct times.  The two other tasks (xSyncTask1 and \r
+       /* Used in a test that blocks two tasks on various different bits within an\r
+       event group - then sets each bit in turn and checks that the correct tasks\r
+       unblock at the correct times.  The two other tasks (xSyncTask1 and\r
        xSyncTask2) call prvSelectiveBitsTestSlaveFunction() to perform their parts in\r
        this test.\r
 \r
@@ -980,7 +980,7 @@ const EventBits_t uxBitsToSet = 0x12U;
 EventBits_t uxReturned;\r
 BaseType_t xMessagePosted;\r
 \r
-       /* Called periodically from the tick hook to exercise the "FromISR" \r
+       /* Called periodically from the tick hook to exercise the "FromISR"\r
        functions. */\r
 \r
        xCallCount++;\r
index 040eaefdc1174ecb2842567217cb4c11f86f30dd..0c9d48c1badbb5e2a592e95427500f333f4a6a7f 100644 (file)
@@ -410,8 +410,8 @@ void FreeRTOS_Tick_Handler( void )
        updated. */\r
        portCPU_IRQ_DISABLE();\r
        portICCPMR_PRIORITY_MASK_REGISTER = ( uint32_t ) ( configMAX_API_CALL_INTERRUPT_PRIORITY << portPRIORITY_SHIFT );\r
-       __asm(  "dsb            \n"\r
-                       "isb            \n" );\r
+       __asm volatile (        "dsb            \n"\r
+                                               "isb            \n" );\r
        portCPU_IRQ_ENABLE();\r
 \r
        /* Increment the RTOS tick. */\r
@@ -435,7 +435,7 @@ uint32_t ulInitialFPSCR = 0;
        ulPortTaskHasFPUContext = pdTRUE;\r
 \r
        /* Initialise the floating point status register. */\r
-       __asm( "FMXR    FPSCR, %0" :: "r" (ulInitialFPSCR) );\r
+       __asm volatile ( "FMXR  FPSCR, %0" :: "r" (ulInitialFPSCR) );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -464,8 +464,8 @@ uint32_t ulReturn;
        {\r
                ulReturn = pdFALSE;\r
                portICCPMR_PRIORITY_MASK_REGISTER = ( uint32_t ) ( configMAX_API_CALL_INTERRUPT_PRIORITY << portPRIORITY_SHIFT );\r
-               __asm(  "dsb            \n"\r
-                               "isb            \n" );\r
+               __asm volatile (        "dsb            \n"\r
+                                                       "isb            \n" );\r
        }\r
        portCPU_IRQ_ENABLE();\r
 \r
index af45d0ac80686b2664d5de76325880ad3b9a943e..6d33346caa1d5c14f79173528c9b1538da1001a5 100644 (file)
@@ -119,7 +119,7 @@ extern uint32_t ulPortYieldRequired;                        \
 }\r
 \r
 #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )\r
-#define portYIELD() __asm( "SWI 0" );\r
+#define portYIELD() __asm volatile ( "SWI 0" );\r
 \r
 \r
 /*-----------------------------------------------------------\r