From: Alan Cox Date: Sat, 30 May 2015 13:55:48 +0000 (+0100) Subject: socz80: align with new IRQ code X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=45163a60c9ef7491954817ec35339d51a814d1b4;p=FUZIX.git socz80: align with new IRQ code --- diff --git a/Kernel/platform-socz80/socz80.s b/Kernel/platform-socz80/socz80.s index c76045ce..62dc65eb 100644 --- a/Kernel/platform-socz80/socz80.s +++ b/Kernel/platform-socz80/socz80.s @@ -19,7 +19,7 @@ .globl map_save .globl map_restore .globl platform_interrupt_all - .globl _kernel_flag + .globl _need_resched .globl _irqwork ; exported debugging tools @@ -53,9 +53,8 @@ ; COMMON MEMORY BANK (0xF000 upwards) ; ----------------------------------------------------------------------------- .area _COMMONMEM -_kernel_flag: - .db 1 ; We start in kernel mode - +_need_resched: + .db 0 trapmsg: .ascii "Trapdoor: SP=" .db 0 trapmsg2: .ascii ", PC=" diff --git a/Kernel/platform-socz80/tricks.s b/Kernel/platform-socz80/tricks.s index b7717e2e..04dd0a48 100644 --- a/Kernel/platform-socz80/tricks.s +++ b/Kernel/platform-socz80/tricks.s @@ -53,10 +53,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 @@ -128,9 +124,9 @@ _switchin: 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