only increment numPosted if an interrupt of that type hasn't been posted before.

--HG--
extra : convert_revision : 6671c594b78d2e38449069157f39af96b81340f2
This commit is contained in:
Lisa Hsu 2007-02-01 15:34:52 -05:00
parent c215d54aac
commit 1e8bbb81cb

View 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)