From d925b54ad520d3cb09e123384b3318684fde4e59 Mon Sep 17 00:00:00 2001 From: "Andrey Halyavin (halyavin)" Date: Fri, 14 Jul 2006 10:42:05 +0000 Subject: [PATCH] Fixed bug with sending EOI in change_task procedure (it shouldn't send it). git-svn-id: svn://kolibrios.org@100 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/sched.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kernel/trunk/core/sched.inc b/kernel/trunk/core/sched.inc index e16ad601fd..048918cd11 100644 --- a/kernel/trunk/core/sched.inc +++ b/kernel/trunk/core/sched.inc @@ -91,10 +91,15 @@ irq0: add ebx, tss0 mov word [far_jump.sel], bx ; selector mov dword [far_jump.offs], eax ; offset + + cmp [irq0needeoi],byte 0 + mov [irq0needeoi],byte 1 + jz .noeoi mov al,0x20 ; send End Of Interrupt signal mov dx,0x20 out dx,al +.noeoi: cmp [0xffff],byte 0 je .switch @@ -120,16 +125,23 @@ uglobal prev_slot dd ? event_sched dd ? endg +iglobal + irq0needeoi db 1 +endg align 4 change_task: + pushfd + cli mov [0xffff],byte 2 + mov [irq0needeoi],byte 0 dec dword [timer_ticks] ; because irq0 will increase it int 0x20 ; irq0 handler + popfd ret