From: Alan Cox Date: Sat, 30 May 2015 13:55:16 +0000 (+0100) Subject: px4plus: initial mods for new IRQ code X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f77578bb35aa99ea4fcb5b1d37fc12fcdadddb24;p=FUZIX.git px4plus: initial mods for new IRQ code This platform uses the banked build so at the moment this can't be built or tested --- diff --git a/Kernel/platform-px4plus/px4plus.s b/Kernel/platform-px4plus/px4plus.s index 62baf8c0..9cea76a1 100644 --- a/Kernel/platform-px4plus/px4plus.s +++ b/Kernel/platform-px4plus/px4plus.s @@ -75,9 +75,10 @@ platform_interrupt_all: ; ; FIXME: this probably needs to be a new "commondata" area so we can +; ROM this correctly ; -_kernel_flag: - .db 1 +_need_resched: + .db 0 kernel_map: ; Last kernel map we were using .db 0xA2 saved_map: ; Saved mapping for IRQ entry/exit diff --git a/Kernel/platform-px4plus/tricks.s b/Kernel/platform-px4plus/tricks.s index d6f1a565..a6673134 100644 --- a/Kernel/platform-px4plus/tricks.s +++ b/Kernel/platform-px4plus/tricks.s @@ -56,10 +56,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) push af call _getproc @@ -159,9 +155,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