From: Alan Cox Date: Sat, 30 May 2015 12:50:28 +0000 (+0100) Subject: pcw8256: sync with the irq changes X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9f87e773a741861e344a7bf41b303e57da45c563;p=FUZIX.git pcw8256: sync with the irq changes --- diff --git a/Kernel/platform-pcw8256/pcw8256.s b/Kernel/platform-pcw8256/pcw8256.s index 5e9f5948..1cd9965c 100644 --- a/Kernel/platform-pcw8256/pcw8256.s +++ b/Kernel/platform-pcw8256/pcw8256.s @@ -11,7 +11,7 @@ .globl map_kernel .globl map_process .globl map_process_always - .globl _kernel_flag + .globl _need_resched .globl map_save .globl map_restore .globl platform_interrupt_all @@ -63,16 +63,6 @@ font8x8 .equ 0x9C00 ; font loaded after framebuffer ; ----------------------------------------------------------------------------- .area _COMMONMEM -trapmsg: .ascii "Trapdoor: SP=" - .db 0 -trapmsg2: .ascii ", PC=" - .db 0 -tm_user_sp: .dw 0 - -tm_stack: - .db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -tm_stack_top: - ; ; Ask the controller to reboot ; @@ -479,5 +469,5 @@ map_save_area: .db 0 .db 0 -_kernel_flag: - .db 1 +_need_resched: + .db 0 diff --git a/Kernel/platform-pcw8256/tricks.s b/Kernel/platform-pcw8256/tricks.s index c25b3618..9506e20c 100644 --- a/Kernel/platform-pcw8256/tricks.s +++ b/Kernel/platform-pcw8256/tricks.s @@ -51,10 +51,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 @@ -138,9 +134,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