Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 320 → Rev 321

/kernel/trunk/core/heap.inc
366,7 → 366,7
endp
 
align 4
proc free_kernel_space stdcall, base:dword
proc free_kernel_space stdcall uses ebx ecx edx esi edi, base:dword
 
mov ebx, heap_mutex
call wait_mutex ;ebx
461,7 → 461,7
.m_eq:
xor eax, eax
mov [heap_mutex], eax
not eax
dec eax
ret
.insert:
remove_from_used esi
480,7 → 480,7
mov [esi+block_flags],FREE_BLOCK
xor eax, eax
mov [heap_mutex], eax
not eax
dec eax
ret
.fail:
xor eax, eax
557,6 → 557,7
 
align 4
proc kernel_free stdcall, base:dword
push ebx esi
 
mov ebx, heap_mutex
call wait_mutex ;ebx
577,13 → 578,17
 
and [heap_mutex], 0
 
push ecx
mov ecx, [esi+block_size];
shr ecx, 12
call release_pages ;eax, ecx
pop ecx
stdcall free_kernel_space, [base]
pop esi ebx
ret
.fail:
and [heap_mutex], 0
pop esi ebx
ret
endp
 
/kernel/trunk/core/memory.inc
231,6 → 231,7
 
align 4
proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword
push ebx
mov eax, [phis_addr]
and eax, not 0xFFF
or eax, [flags]
239,6 → 240,7
mov [pages_tab+ebx*4], eax
mov eax, [lin_addr]
invlpg [eax]
pop ebx
ret
endp
 
290,7 → 292,7
align 4
release_pages:
push ebp
pushad
mov ebx, pg_data.pg_mutex
call wait_mutex ;ebx
 
329,11 → 331,12
jnz @B
mov [pg_data.pages_free], ebp
and [pg_data.pg_mutex],0
pop ebp
popad
ret
 
align 4
proc map_page_table stdcall, lin_addr:dword, phis_addr:dword
push ebx
mov ebx, [lin_addr]
shr ebx, 22
mov eax, [phis_addr]
344,6 → 347,7
shr eax, 10
add eax, pages_tab
invlpg [eax]
pop ebx
ret
endp
 
/kernel/trunk/core/sys32.inc
768,10 → 768,12
mov esi, [esi+0x3000+TASKDATA.pid]
cmp [hd1_status], esi
jnz @f
call free_hd_channel
mov [hd1_status], 0
@@:
cmp [cd_status], esi
jnz @f
call free_cd_channel
mov [cd_status], 0
@@:
cmp [flp_status], esi
/kernel/trunk/core/taskman.inc
208,6 → 208,7
.err_file:
xor eax, eax
mov [application_table_status],eax
mov eax, ecx
ret
endp
 
951,15 → 952,16
wait_mutex:
push eax
push ebx
.do_wait:
cmp dword [ebx],0
je .get_lock
call change_task
jmp wait_mutex
jmp .do_wait
.get_lock:
mov eax, 1
xchg eax, [ebx]
test eax, eax
jnz wait_mutex
jnz .do_wait
pop ebx
pop eax
ret