forked from KolibriOS/kolibrios
merge trunk 2149
git-svn-id: svn://kolibrios.org@2150 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
87882ebc37
commit
d7ea1d9270
@ -1225,7 +1225,7 @@ lock inc [edx+DISK.MediaRefCount]
|
|||||||
; out: eax = 0 => no more items
|
; out: eax = 0 => no more items
|
||||||
; eax != 0 => buffer pointed to by edi contains name of item
|
; eax != 0 => buffer pointed to by edi contains name of item
|
||||||
dyndisk_enum_root:
|
dyndisk_enum_root:
|
||||||
push ebx ; save register used in file_system_lfn
|
push edx ; save register used in file_system_lfn
|
||||||
mov ecx, disk_list_mutex ; it will be useful
|
mov ecx, disk_list_mutex ; it will be useful
|
||||||
; 1. If this is the first call, acquire the mutex and initialize.
|
; 1. If this is the first call, acquire the mutex and initialize.
|
||||||
test eax, eax
|
test eax, eax
|
||||||
@ -1248,11 +1248,11 @@ dyndisk_enum_root:
|
|||||||
jnz @b
|
jnz @b
|
||||||
pop esi eax
|
pop esi eax
|
||||||
; 5. Return with eax = item.
|
; 5. Return with eax = item.
|
||||||
pop ebx ; restore register used in file_system_lfn
|
pop edx ; restore register used in file_system_lfn
|
||||||
ret
|
ret
|
||||||
.last:
|
.last:
|
||||||
; 6. Release the mutex and return with eax = 0.
|
; 6. Release the mutex and return with eax = 0.
|
||||||
call mutex_unlock
|
call mutex_unlock
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
pop ebx ; restore register used in file_system_lfn
|
pop edx ; restore register used in file_system_lfn
|
||||||
ret
|
ret
|
||||||
|
@ -294,7 +294,7 @@ mutex_unlock:
|
|||||||
cli
|
cli
|
||||||
|
|
||||||
mov eax, [ecx+MUTEX.wait.next]
|
mov eax, [ecx+MUTEX.wait.next]
|
||||||
cmp eax, [ecx]
|
cmp eax, ecx
|
||||||
mov [ecx+MUTEX.count], 1
|
mov [ecx+MUTEX.count], 1
|
||||||
je @F
|
je @F
|
||||||
|
|
||||||
|
@ -842,14 +842,14 @@ end if
|
|||||||
align 4
|
align 4
|
||||||
v86_irq:
|
v86_irq:
|
||||||
; push irq/pushad/jmp v86_irq
|
; push irq/pushad/jmp v86_irq
|
||||||
; eax = irq
|
; ebp = irq
|
||||||
lea esi, [esp+1Ch]
|
lea esi, [esp+1Ch]
|
||||||
lea edi, [esi+4]
|
lea edi, [esi+4]
|
||||||
mov ecx, 8
|
mov ecx, 8
|
||||||
std
|
std
|
||||||
rep movsd
|
rep movsd
|
||||||
cld
|
cld
|
||||||
mov edi, eax
|
mov edi, ebp
|
||||||
pop eax
|
pop eax
|
||||||
v86_irq2:
|
v86_irq2:
|
||||||
mov esi, [v86_irqhooks+edi*8] ; get VM handle
|
mov esi, [v86_irqhooks+edi*8] ; get VM handle
|
||||||
|
@ -432,4 +432,3 @@ proc test_cpu
|
|||||||
endp
|
endp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ B32:
|
|||||||
mov fs,ax
|
mov fs,ax
|
||||||
mov gs,ax
|
mov gs,ax
|
||||||
mov ss,ax
|
mov ss,ax
|
||||||
mov esp,0x3ec00 ; Set stack
|
mov esp,0x5ec00 ; Set stack
|
||||||
|
|
||||||
; CLEAR 0x280000 - HEAP_BASE
|
; CLEAR 0x280000 - HEAP_BASE
|
||||||
|
|
||||||
|
@ -766,8 +766,10 @@ proc socket_read_packet stdcall
|
|||||||
|
|
||||||
mov ebx, eax
|
mov ebx, eax
|
||||||
|
|
||||||
|
push ecx edx
|
||||||
lea ecx, [eax + SOCKET.lock]
|
lea ecx, [eax + SOCKET.lock]
|
||||||
call mutex_lock
|
call mutex_lock
|
||||||
|
pop edx ecx
|
||||||
|
|
||||||
mov eax, [ebx + SOCKET.rxDataCount] ; get count of bytes
|
mov eax, [ebx + SOCKET.rxDataCount] ; get count of bytes
|
||||||
test eax, eax ; if count of bytes is zero..
|
test eax, eax ; if count of bytes is zero..
|
||||||
|
Loading…
Reference in New Issue
Block a user