From 278fc718e1d22f45fa591329058b963350fa1d9f Mon Sep 17 00:00:00 2001 From: Doczom Date: Mon, 10 Jan 2022 20:38:44 +0000 Subject: [PATCH] add APPDATA.state for delete TASKDATA git-svn-id: svn://kolibrios.org@9611 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/sched.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kernel/trunk/core/sched.inc b/kernel/trunk/core/sched.inc index 4700ee748..5062362fd 100644 --- a/kernel/trunk/core/sched.inc +++ b/kernel/trunk/core/sched.inc @@ -293,10 +293,11 @@ proc find_next_task jz .priority_next .task_loop: mov ebx, [ebx+APPDATA.in_schedule.next] - mov edi, ebx - shr edi, 3 - add edi, TASK_TABLE - (SLOT_BASE shr 3) - mov al, [edi+TASKDATA.state] + ;mov al, [ebx+APPDATA.state] + mov edi, ebx ; + shr edi, 3 ; + add edi, TASK_TABLE - (SLOT_BASE shr 3) ; on delete + mov al, [edi+TASKDATA.state] ; test al, al jz .task_found ; state == 0 cmp al, 5 @@ -316,7 +317,8 @@ proc find_next_task xor eax, eax @@: mov [ebx+APPDATA.wait_param], eax ; retval for wait - mov [edi+TASKDATA.state], TSTATE_RUNNING + mov [edi+TASKDATA.state], TSTATE_RUNNING ; on delete + mov [ebx+APPDATA.state], TSTATE_RUNNING .task_found: mov [scheduler_current+ecx*4], ebx ; If we have selected a thread with higher priority