z80fixedbank: first updated platform code for I/O wait
authorAlan Cox <alan@linux.intel.com>
Mon, 26 Mar 2018 19:53:51 +0000 (20:53 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 26 Mar 2018 19:53:51 +0000 (20:53 +0100)
Other platforms need the smae logic to bounce out of sleep when a signal
is shown pending

Kernel/lib/z80fixedbank.s

index 22a8121..0ba4763 100644 (file)
@@ -51,6 +51,9 @@ _switchout:
         di
         call _chksigs
         ; save machine state
+       ld a,l
+       or a
+       jr nz, switchsig
 
         ld hl, #0 ; return code set here is ignored, but _switchin can 
         ; return from either _switchout OR _dofork, so they must both write 
@@ -86,6 +89,14 @@ idling:
        ei
        ret
 
+; As we tried to sleep we raced a signal so got the boot back out
+; into the land of the living.
+switchsig:
+       ld hl, (U_DATA__U_PTAB)
+       ld (hl), #P_RUNNING
+       ei
+       ret
+
 slow_path:
        ; Stash the uarea back into process memory
        call map_process_always