From 1e8bbb81cbd6584c4f6384b8d554f076bf1c29e7 Mon Sep 17 00:00:00 2001 From: Lisa Hsu Date: Thu, 1 Feb 2007 15:34:52 -0500 Subject: [PATCH] only increment numPosted if an interrupt of that type hasn't been posted before. --HG-- extra : convert_revision : 6671c594b78d2e38449069157f39af96b81340f2 --- src/arch/sparc/interrupts.hh | 7 +++++-- 1 file 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)