Commit d7f5a703ce3ac183ddef9651f4f97e812bae0234
authorJakob Gruber <jakob.gruber@gmail.com>
Mon, 23 Jul 2012 16:46:48 +0000 (18:46 +0200)
committerJakob Gruber <jakob.gruber@gmail.com>
Thu, 26 Jul 2012 12:40:46 +0000 (14:40 +0200)
This caused the CPU to wake up even if it was explicitly set to
cpu_Stopped.

simavr/sim/sim_interrupts.c

index 9334b038ed1264bfa4b5570041a5541603ff21fe..0d98c9fa4f5942252c6e0e52686b709f43336844 100644 (file)
@@ -117,7 +117,7 @@ avr_raise_interrupt(
 
                if (!table->pending_wait)
                        table->pending_wait = 1;                // latency on interrupts ??
-               if (avr->state != cpu_Running) {
+               if (avr->state == cpu_Sleeping) {
                        if (vector->trace)
                                printf("Waking CPU due to interrupt\n");
                        avr->state = cpu_Running;       // in case we were sleeping