aboutsummaryrefslogtreecommitdiff
path: root/sim/mn10300/dv-mn103cpu.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-03-26 14:00:18 +0000
committerAndrew Cagney <cagney@redhat.com>1998-03-26 14:00:18 +0000
commit1b756ba6d58c63dfdb588fa900208f03f7ec8567 (patch)
tree22c9528215eed96ec6f30e946da1d62976ff2399 /sim/mn10300/dv-mn103cpu.c
parentabf6ba256af6ec99e6c5bbe61cdbdf56459a5d9a (diff)
downloadfsf-binutils-gdb-1b756ba6d58c63dfdb588fa900208f03f7ec8567.zip
fsf-binutils-gdb-1b756ba6d58c63dfdb588fa900208f03f7ec8567.tar.gz
fsf-binutils-gdb-1b756ba6d58c63dfdb588fa900208f03f7ec8567.tar.bz2
* dv-mn103cpu.c (deliver_mn103cpu_interrupt): Stop loss of succeeding
interrupts, clear pending_handler when the handler isn't re-scheduled.
Diffstat (limited to 'sim/mn10300/dv-mn103cpu.c')
-rw-r--r--sim/mn10300/dv-mn103cpu.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sim/mn10300/dv-mn103cpu.c b/sim/mn10300/dv-mn103cpu.c
index 87c684e..89b60b8 100644
--- a/sim/mn10300/dv-mn103cpu.c
+++ b/sim/mn10300/dv-mn103cpu.c
@@ -255,14 +255,20 @@ deliver_mn103cpu_interrupt (struct hw *me,
(long) CIA_GET (cpu), (unsigned) PSW, (long) SP));
}
- /* As long as there is the potential need to deliver an interrupt we
- keep rescheduling this routine. */
if (controller->pending_level < 7) /* FIXME */
{
+ /* As long as there is the potential need to deliver an
+ interrupt we keep rescheduling this routine. */
if (controller->pending_handler != NULL)
controller->pending_handler =
hw_event_queue_schedule (me, 1, deliver_mn103cpu_interrupt, NULL);
}
+ else
+ {
+ /* Don't bother re-scheduling the interrupt handler as there is
+ nothing to deliver */
+ controller->pending_handler = NULL;
+ }
}