summaryrefslogtreecommitdiff
path: root/src/arch/sparc
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2007-02-01 15:34:52 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2007-02-01 15:34:52 -0500
commit1e8bbb81cbd6584c4f6384b8d554f076bf1c29e7 (patch)
treef9d3d577c5e3dd3d57ed4af86c0aed9795acd07e /src/arch/sparc
parentc215d54aac6925cf13079d8d8fe3691451a77ce1 (diff)
downloadgem5-1e8bbb81cbd6584c4f6384b8d554f076bf1c29e7.tar.xz
only increment numPosted if an interrupt of that type hasn't been posted before.
--HG-- extra : convert_revision : 6671c594b78d2e38449069157f39af96b81340f2
Diffstat (limited to 'src/arch/sparc')
-rw-r--r--src/arch/sparc/interrupts.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/sparc/interrupts.hh b/src/arch/sparc/interrupts.hh
index 99ddb4919..3af4f6342 100644
--- a/src/arch/sparc/interrupts.hh
+++ b/src/arch/sparc/interrupts.hh
@@ -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)