forked from KolibriOS/kolibrios
Using the new mutex to r.2486
git-svn-id: svn://kolibrios.org@2489 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a8e40b5de4
commit
36115aba3f
@ -438,23 +438,12 @@ proc load_file stdcall, file_name:dword
|
|||||||
|
|
||||||
mov [file2], eax
|
mov [file2], eax
|
||||||
|
|
||||||
push eax
|
mov ecx, unpack_mutex
|
||||||
.wait_lock:
|
call mutex_lock
|
||||||
cmp [unpack_mutex], 0
|
|
||||||
je .get_lock
|
|
||||||
call change_task
|
|
||||||
jmp .wait_lock
|
|
||||||
|
|
||||||
.get_lock:
|
|
||||||
mov eax, 1
|
|
||||||
xchg eax, [unpack_mutex]
|
|
||||||
test eax, eax
|
|
||||||
jnz .wait_lock
|
|
||||||
pop eax
|
|
||||||
|
|
||||||
stdcall unpack, [file], eax
|
stdcall unpack, [file], eax
|
||||||
|
|
||||||
mov [unpack_mutex], 0
|
call mutex_unlock
|
||||||
|
|
||||||
stdcall kernel_free, [file]
|
stdcall kernel_free, [file]
|
||||||
mov eax, [file2]
|
mov eax, [file2]
|
||||||
@ -485,9 +474,9 @@ proc load_file stdcall, file_name:dword
|
|||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
iglobal
|
uglobal
|
||||||
align 4
|
align 4
|
||||||
unpack_mutex dd 0
|
unpack_mutex MUTEX
|
||||||
endg
|
endg
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
|
@ -332,6 +332,9 @@ high_code:
|
|||||||
mov ecx, disk_list_mutex
|
mov ecx, disk_list_mutex
|
||||||
call mutex_init
|
call mutex_init
|
||||||
|
|
||||||
|
mov ecx, unpack_mutex
|
||||||
|
call mutex_init
|
||||||
|
|
||||||
; SAVE REAL MODE VARIABLES
|
; SAVE REAL MODE VARIABLES
|
||||||
mov ax, [BOOT_VAR + BOOT_IDE_BASE_ADDR]
|
mov ax, [BOOT_VAR + BOOT_IDE_BASE_ADDR]
|
||||||
mov [IDEContrRegsBaseAddr], ax
|
mov [IDEContrRegsBaseAddr], ax
|
||||||
|
Loading…
Reference in New Issue
Block a user