]> git.sur5r.net Git - freertos/commitdiff
Permit no more than two simultaneous occurrences of interrupts adding everything...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 14 Aug 2008 11:10:46 +0000 (11:10 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 14 Aug 2008 11:10:46 +0000 (11:10 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@456 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/Common/Minimal/IntQueue.c

index 8cc17bc06f3545b920df5c0359c9c9e3b52dfc57..2d010d0154fadf2237e7bf7cafbf08059ba71393 100644 (file)
@@ -274,7 +274,7 @@ static void prvQueueAccessLogError( unsigned portBASE_TYPE uxLine )
 \r
 static void prvHigherPriorityNormallyEmptyTask( void *pvParameters )\r
 {\r
-unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2;\r
+unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxErrorCount1 = 0, uxErrorCount2 = 0;\r
 \r
        /* The timer should not be started until after the scheduler has started.\r
        More than one task is running this code so we check the parameter value\r
@@ -339,13 +339,29 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2;
                                if( uxTask1 < intqMIN_ACCEPTABLE_TASK_COUNT )\r
                                {\r
                                        /* Only task 2 seemed to log any values. */\r
-                                       prvQueueAccessLogError( __LINE__ );\r
+                                       uxErrorCount1++;\r
+                                       if( uxErrorCount1 > 2 )\r
+                                       {\r
+                                               prvQueueAccessLogError( __LINE__ );\r
+                                       }\r
+                               }\r
+                               else\r
+                               {\r
+                                       uxErrorCount1 = 0;\r
                                }\r
 \r
                                if( uxTask2 < intqMIN_ACCEPTABLE_TASK_COUNT  )\r
                                {\r
                                        /* Only task 1 seemed to log any values. */\r
-                                       prvQueueAccessLogError( __LINE__ );\r
+                                       uxErrorCount2++;\r
+                                       if( uxErrorCount2 > 2 )\r
+                                       {\r
+                                               prvQueueAccessLogError( __LINE__ );\r
+                                       }\r
+                               }\r
+                               else\r
+                               {\r
+                                       uxErrorCount2 = 0;\r
                                }\r
 \r
                                /* Clear the array again, ready to start a new cycle. */\r