Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8850 → Rev 8851

/kernel/trunk/const.inc
219,6 → 219,7
 
window_data = OS_BASE + 0x0001000
 
TASK_TABLE = OS_BASE + 0x0003000
CURRENT_TASK = OS_BASE + 0x0003000
TASK_COUNT = OS_BASE + 0x0003004
TASK_BASE = OS_BASE + 0x0003010
/kernel/trunk/core/taskman.inc
484,15 → 484,19
push ebx
push ecx
mov ebx, [TASK_COUNT]
shl ebx, 5
shl ebx, 5 ; ebx *= 32 (32 is size of TASKDATA struct)
; add 2*32 cause:
; 0x80003000 - 0x80003020 isnt a task actually
; skip first process in the task table
mov ecx, 2*32
 
.loop:
;ecx=offset of current process info entry
;ebx=maximum permitted offset
cmp byte [CURRENT_TASK+ecx+0xa], 9
; state 9 means "not used"
cmp byte [TASK_TABLE+ecx+TASKDATA.state], 9
jz .endloop ;skip empty slots
cmp [CURRENT_TASK+ecx+0x4], eax;check PID
cmp [TASK_TABLE+ecx+TASKDATA.pid], eax;check PID
jz .pid_found
.endloop:
add ecx, 32