From: Alan Cox Date: Mon, 26 Mar 2018 19:53:51 +0000 (+0100) Subject: z80fixedbank: first updated platform code for I/O wait X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9dd89e95e8f43ab601a9d80b9966ac39b8767370;p=FUZIX.git z80fixedbank: first updated platform code for I/O wait Other platforms need the smae logic to bounce out of sleep when a signal is shown pending --- diff --git a/Kernel/lib/z80fixedbank.s b/Kernel/lib/z80fixedbank.s index 22a8121d..0ba47638 100644 --- a/Kernel/lib/z80fixedbank.s +++ b/Kernel/lib/z80fixedbank.s @@ -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