Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9742 → Rev 9743

/kernel/trunk/core/sys32.inc
617,14 → 617,6
lea ebx, [edi + APPDATA.list]
list_del ebx ;destroys edx, ecx
 
mov eax, 0x20202020
stosd
stosd
stosd
mov ecx, 244/4
xor eax, eax
rep stosd
 
; activate window
movzx eax, word [WIN_STACK + esi*2]
cmp eax, [thread_count]
672,7 → 664,6
mov edx, [SLOT_BASE + edx + APPDATA.tid]
 
rmpr0:
 
mov esi, [RESERVED_PORTS]
 
test esi, esi
693,13 → 684,6
jmp rmpr9
 
rmpr4:
push eax edx ebp ;TODO: check using register ebp in next code
mov eax, [edi + 4]
mov edx, [edi + 8]
xor ebp, ebp
inc ebp
call new_port_access_disable
pop ebp edx eax
 
mov ecx, 256
sub ecx, esi
715,8 → 699,22
jmp rmpr0
 
rmpr9:
popa
 
popa
; clearing APPDATA structure this thread
pushad
mov edi, esi
shl edi, BSF sizeof.APPDATA
add edi, SLOT_BASE
mov eax, 0x20202020
stosd
stosd
stosd
mov ecx, 244/4
xor eax, eax
rep stosd
popad
 
mov edi, esi ; do not run this process slot
shl edi, BSF sizeof.APPDATA
mov [SLOT_BASE + edi + APPDATA.state], TSTATE_FREE
/kernel/trunk/kernel.asm
3489,16 → 3489,10
set_io_access_rights:
push edi eax
mov edi, tss._io_map_0
; mov ecx,eax
; and ecx,7 ; offset in byte
; shr eax,3 ; number of byte
; add edi,eax
; mov ebx,1
; shl ebx,cl
 
test ebp, ebp ; enable access - ebp = 0
jnz .siar1
; not ebx
; and [edi],byte bl
 
btr [edi], eax
pop eax edi
ret
3508,6 → 3502,12
ret
 
align 4
; @brief ReservePortArea and FreePortArea
; @param edx number end arrea of ports (include last number of port)
; @param ecx number start arrea of ports
; @param ebx sub function 0 - reserve, 1 - free
; @param eax 46 - number function
; @returns eax = 0 - succesful eax = 1 - error
syscall_reserveportarea: ; ReservePortArea and FreePortArea
 
call r_f_port_area
3532,7 → 3532,7
 
cmp ecx, edx ; beginning > end ?
ja rpal1
cmp edx, 65536
cmp edx, 65536 ;test ebx, not 0xffff
jae rpal1
mov eax, [RESERVED_PORTS]
test eax, eax ; no reserved areas ?
3541,7 → 3541,7
jae rpal1
rpal3:
mov ebx, eax
shl ebx, 4
shl ebx, 4 ;16 byte is sizeof item in RESERVED_PORTS table
add ebx, RESERVED_PORTS
cmp ecx, [ebx+8]
ja rpal4
3578,9 → 3578,9
add eax, RESERVED_PORTS
mov ebx, [current_slot]
mov ebx, [ebx + APPDATA.tid]
mov [eax], ebx
mov [eax+4], ecx
mov [eax+8], edx
mov [eax], ebx ; tid
mov [eax+4], ecx ;start port
mov [eax+8], edx ;finish port
 
xor eax, eax
ret