]> git.sesse.net Git - pistorm/commitdiff
Reduce lag of repeatedly triggered interrupts a bit
authorbeeanyew <beeanyew@gmail.com>
Tue, 8 Jun 2021 20:23:26 +0000 (22:23 +0200)
committerbeeanyew <beeanyew@gmail.com>
Tue, 8 Jun 2021 20:23:26 +0000 (22:23 +0200)
Please tell me if this breaks everything.

emulator.c

index 23247feb607d26cfa72b5e1db3ad35d0370c391e..b72c2436168ec30c89a2a77b31139573687bc081 100644 (file)
@@ -126,11 +126,13 @@ void *ipl_task(void *args) {
     value = *(gpio + 13);
 
     if (!(value & (1 << PIN_IPL_ZERO))) {
-      irq = 1;
       old_irq = irq_delay;
       //NOP
-      M68K_END_TIMESLICE;
-      NOP
+      if (!irq) {
+        M68K_END_TIMESLICE;
+        NOP
+        irq = 1;
+      }
       //usleep(0);
     }
     else {