only increment numPosted if an interrupt of that type hasn't been posted before.
authorLisa Hsu <hsul@eecs.umich.edu>
Thu, 1 Feb 2007 20:34:52 +0000 (15:34 -0500)
committerLisa Hsu <hsul@eecs.umich.edu>
Thu, 1 Feb 2007 20:34:52 +0000 (15:34 -0500)
--HG--
extra : convert_revision : 6671c594b78d2e38449069157f39af96b81340f2

src/arch/sparc/interrupts.hh

index 99ddb491905b7903023f6e772d4aade3ed575f5a..3af4f6342919c013c17edcc709330519a8e51644 100644 (file)
@@ -67,8 +67,11 @@ enum interrupts_t {
         {
             if (int_type < 0 || int_type >= num_interrupt_types)
                 panic("posting unknown interrupt!\n");
-            interrupts[int_type] = true;
-            ++numPosted;
+
+            if (interrupts[int_type] == false) {
+                interrupts[int_type] = true;
+                ++numPosted;
+            }
         }
 
         void post(int int_num, int index)