dup pending interrupts do not need to notify_all
This commit is contained in:
parent
86175eae07
commit
7031d8b6cd
1 changed files with 5 additions and 4 deletions
|
@ -106,14 +106,15 @@ class InterruptManager:
|
||||||
if not self.requests:
|
if not self.requests:
|
||||||
self.requests = [irq]
|
self.requests = [irq]
|
||||||
self.pri_pending = irq.pri
|
self.pri_pending = irq.pri
|
||||||
else:
|
elif irq in self.requests:
|
||||||
# multiple identical requests are not pended
|
# multiple identical requests are not pended
|
||||||
# (it works this way in the hardware too of course --
|
# (it works this way in the hardware too of course --
|
||||||
# if a device has asserted the interrupt request line
|
# if a device has asserted the interrupt request line
|
||||||
# but that request hasn't been acknowledged/cleared by
|
# but that request hasn't been acknowledged/cleared by
|
||||||
# by the bus signal protocol yet, you can't assert the
|
# by the bus signal protocol yet, you can't assert the
|
||||||
# same interrupt line again ... it's already asserted)
|
# 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.requests = sorted(self.requests + [irq], key=_qpri)
|
||||||
self.pri_pending = self.requests[-1].pri
|
self.pri_pending = self.requests[-1].pri
|
||||||
self.condition.notify_all()
|
self.condition.notify_all()
|
||||||
|
|
Loading…
Add table
Reference in a new issue