From 12e881fbbc13aefd61cb1becb9d0f9d566846c3c Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 30 May 2015 13:31:22 +0100 Subject: [PATCH] micropack: update to the new flags --- Kernel/platform-micropack/tricks.s | 11 ++--------- Kernel/platform-micropack/z80pack.s | 7 +++---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Kernel/platform-micropack/tricks.s b/Kernel/platform-micropack/tricks.s index 25710903..ae4d5f74 100644 --- a/Kernel/platform-micropack/tricks.s +++ b/Kernel/platform-micropack/tricks.s @@ -8,7 +8,6 @@ .globl _getproc .globl _trap_monitor .globl trap_illegal - .globl _inint .globl _switchout .globl _switchin .globl _doexec @@ -32,8 +31,6 @@ ; restarted after calling switchout, it thinks it has just returned ; from switchout(). ; -; FIXME: make sure we optimise the switch to self case higher up the stack! -; ; This function can have no arguments or auto variables. _switchout: di @@ -48,10 +45,6 @@ _switchout: push iy ld (U_DATA__U_SP), sp ; this is where the SP is restored in _switchin - ; set inint to false - xor a - ld (_inint), a - ; find another process to run (may select this one again) call _getproc @@ -133,9 +126,9 @@ not_swapped: pop hl ; return code ; enable interrupts, if the ISR isn't already running - ld a, (_inint) + ld a, (U_DATA__U_ININTERRUPT) or a - ret z ; in ISR, leave interrupts off + ret nz ; in ISR, leave interrupts off ei ret ; return with interrupts on diff --git a/Kernel/platform-micropack/z80pack.s b/Kernel/platform-micropack/z80pack.s index db5e929e..e4a01691 100644 --- a/Kernel/platform-micropack/z80pack.s +++ b/Kernel/platform-micropack/z80pack.s @@ -16,7 +16,7 @@ .globl init_early .globl init_hardware .globl _program_vectors - .globl _kernel_flag + .globl _need_resched .globl map_kernel .globl map_process @@ -148,6 +148,5 @@ outchar: out (0x01), a ret -; needs to be common -_kernel_flag: - .db 1 +_need_resched: + .db 0 -- 2.34.1