add APPDATA.state for delete TASKDATA

git-svn-id: svn://kolibrios.org@9611 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Doczom 2022-01-10 20:38:44 +00:00
parent 4c4ea34b99
commit 278fc718e1

View File

@ -293,10 +293,11 @@ proc find_next_task
jz .priority_next jz .priority_next
.task_loop: .task_loop:
mov ebx, [ebx+APPDATA.in_schedule.next] mov ebx, [ebx+APPDATA.in_schedule.next]
mov edi, ebx ;mov al, [ebx+APPDATA.state]
shr edi, 3 mov edi, ebx ;
add edi, TASK_TABLE - (SLOT_BASE shr 3) shr edi, 3 ;
mov al, [edi+TASKDATA.state] add edi, TASK_TABLE - (SLOT_BASE shr 3) ; on delete
mov al, [edi+TASKDATA.state] ;
test al, al test al, al
jz .task_found ; state == 0 jz .task_found ; state == 0
cmp al, 5 cmp al, 5
@ -316,7 +317,8 @@ proc find_next_task
xor eax, eax xor eax, eax
@@: @@:
mov [ebx+APPDATA.wait_param], eax ; retval for wait 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: .task_found:
mov [scheduler_current+ecx*4], ebx mov [scheduler_current+ecx*4], ebx
; If we have selected a thread with higher priority ; If we have selected a thread with higher priority