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,9 +67,12 @@ enum interrupts_t {
|
||||||
{
|
{
|
||||||
if (int_type < 0 || int_type >= num_interrupt_types)
|
if (int_type < 0 || int_type >= num_interrupt_types)
|
||||||
panic("posting unknown interrupt!\n");
|
panic("posting unknown interrupt!\n");
|
||||||
|
|
||||||
|
if (interrupts[int_type] == false) {
|
||||||
interrupts[int_type] = true;
|
interrupts[int_type] = true;
|
||||||
++numPosted;
|
++numPosted;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void post(int int_num, int index)
|
void post(int int_num, int index)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue