; Indicate processed
xor a
ld (U_DATA__U_CURSIG), a
+ ; and we will handle the signal with interrupts on so clear the
+ ; flag
+ ld (_int_disabled),a
; Semantics for now: signal delivery clears handler
ld (hl), a
; the return path handler passed in BC
no_pending:
+ ld (_int_disabled),a ; clear interrupt status
ei
.ifne Z80_MMU_HOOKS
call mmu_user
;
signal_return:
pop hl ; argument
- di ; Be careful as our internal irq state flag is
- ; kept wrong through this sequence.
+ di
.ifne Z80_MMU_HOOKS
call mmu_kernel
.endif
;
ld (U_DATA__U_SYSCALL_SP), sp
ld sp, #kstack_top
+ ;
+ ; Ensure chksigs and friends see the right status
+ ;
+ ld a,#1
+ ld (_int_disabled),a
call map_kernel_di
call _chksigs
call map_process_always_di
ex af, af'
exx
push bc ; FIXME we don't I think need to save bc/de/hl
- push de ; as they are compiler caller save
+ push de ; as they are compiler caller save once we fix the API
push hl
exx
push bc
ld (_inint), a
; So we know that this task should resume with IRQs off
ld (U_DATA__U_ININTERRUPT), a
+ ; Load the interrupt flag properly. It got an implicit di from
+ ; the IRQ being taken
+ ld (_int_disabled),a
call _platform_interrupt
; Then unstack and go.
interrupt_pop:
+ xor a
+ ld (_int_disabled),a
pop iy
pop ix
pop hl