dup pending interrupts do not need to notify_all

This commit is contained in:
Neil Webber 2024-05-29 19:11:02 -05:00
parent 86175eae07
commit 7031d8b6cd

View file

@ -106,14 +106,15 @@ class InterruptManager:
if not self.requests:
self.requests = [irq]
self.pri_pending = irq.pri
else:
elif irq in self.requests:
# multiple identical requests are not pended
# (it works this way in the hardware too of course --
# if a device has asserted the interrupt request line
# but that request hasn't been acknowledged/cleared by
# by the bus signal protocol yet, you can't assert the
# same interrupt line again ... it's already asserted)
if irq not in self.requests:
return # NOTE: NO NEED TO notify_all()
else:
self.requests = sorted(self.requests + [irq], key=_qpri)
self.pri_pending = self.requests[-1].pri
self.condition.notify_all()