only increment numPosted if an interrupt of that type hasn't been posted before.
--HG-- extra : convert_revision : 6671c594b78d2e38449069157f39af96b81340f2
This commit is contained in:
parent
c215d54aac
commit
1e8bbb81cb
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue