Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8270 → Rev 8249

/kernel/trunk/kernel.asm
2197,13 → 2197,6
dd 0x0
endg
;------------------------------------------------------------------------------
; in: eax -- APPDATA ptr
; out: Z/z -- is/not kernel thread
is_kernel_thread:
mov eax, [eax+APPDATA.process]
cmp eax, [SLOT_BASE+2*sizeof.APPDATA+APPDATA.process] ; OS
ret
;------------------------------------------------------------------------------
sysfn_terminate: ; 18.2 = TERMINATE
push ecx
cmp ecx, 2
2212,16 → 2205,11
cmp ecx, edx
ja noprocessterminate
mov eax, [TASK_COUNT]
shl ecx, BSF sizeof.TASKDATA
shl ecx, 5
mov edx, [ecx+CURRENT_TASK+TASKDATA.pid]
add ecx, CURRENT_TASK+TASKDATA.state
cmp byte [ecx], TSTATE_FREE
cmp byte [ecx], 9
jz noprocessterminate
push eax
lea eax, [(ecx-(CURRENT_TASK and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE]
call is_kernel_thread
pop eax
jz noprocessterminate
push ecx edx
lea edx, [(ecx-(CURRENT_TASK and 1FFFFFFFh)-TASKDATA.state)*8+SLOT_BASE]
call request_terminate