summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-08-14 11:10:46 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-08-14 11:10:46 +0000
commite8bcbbd62ce57578631288215ae13952cfb7f3c5 (patch)
tree2f30ccae557a94639b907dd4810768f822180d96
parent435cab84811e3c308e2fd761008e8a025c484ffe (diff)
downloadfreertos-e8bcbbd62ce57578631288215ae13952cfb7f3c5.tar.gz
freertos-e8bcbbd62ce57578631288215ae13952cfb7f3c5.tar.bz2
freertos-e8bcbbd62ce57578631288215ae13952cfb7f3c5.tar.xz
Permit no more than two simultaneous occurrences of interrupts adding everything to queues instead of tasks.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@456 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
-rw-r--r--Demo/Common/Minimal/IntQueue.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/Demo/Common/Minimal/IntQueue.c b/Demo/Common/Minimal/IntQueue.c
index 8cc17bc0..2d010d01 100644
--- a/Demo/Common/Minimal/IntQueue.c
+++ b/Demo/Common/Minimal/IntQueue.c
@@ -274,7 +274,7 @@ static void prvQueueAccessLogError( unsigned portBASE_TYPE uxLine )
static void prvHigherPriorityNormallyEmptyTask( void *pvParameters )
{
-unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2;
+unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxErrorCount1 = 0, uxErrorCount2 = 0;
/* The timer should not be started until after the scheduler has started.
More than one task is running this code so we check the parameter value
@@ -339,13 +339,29 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2;
if( uxTask1 < intqMIN_ACCEPTABLE_TASK_COUNT )
{
/* Only task 2 seemed to log any values. */
- prvQueueAccessLogError( __LINE__ );
+ uxErrorCount1++;
+ if( uxErrorCount1 > 2 )
+ {
+ prvQueueAccessLogError( __LINE__ );
+ }
+ }
+ else
+ {
+ uxErrorCount1 = 0;
}
if( uxTask2 < intqMIN_ACCEPTABLE_TASK_COUNT )
{
/* Only task 1 seemed to log any values. */
- prvQueueAccessLogError( __LINE__ );
+ uxErrorCount2++;
+ if( uxErrorCount2 > 2 )
+ {
+ prvQueueAccessLogError( __LINE__ );
+ }
+ }
+ else
+ {
+ uxErrorCount2 = 0;
}
/* Clear the array again, ready to start a new cycle. */