forked from KolibriOS/kolibrios
Fixing deadlock in SOCKET_process_end
git-svn-id: svn://kolibrios.org@3884 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
09b3721183
commit
3189551ee6
@ -2051,6 +2051,7 @@ SOCKET_alloc:
|
|||||||
; SOCKET_free
|
; SOCKET_free
|
||||||
;
|
;
|
||||||
; Free socket data memory and remove socket from the list
|
; Free socket data memory and remove socket from the list
|
||||||
|
; Caller should lock and unlock socket_mutex
|
||||||
;
|
;
|
||||||
; IN: eax = socket ptr
|
; IN: eax = socket ptr
|
||||||
; OUT: /
|
; OUT: /
|
||||||
@ -2061,11 +2062,6 @@ SOCKET_free:
|
|||||||
|
|
||||||
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_free: %x\n", eax
|
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_free: %x\n", eax
|
||||||
|
|
||||||
pusha
|
|
||||||
mov ecx, socket_mutex
|
|
||||||
call mutex_lock
|
|
||||||
popa
|
|
||||||
|
|
||||||
call SOCKET_check
|
call SOCKET_check
|
||||||
jz .error
|
jz .error
|
||||||
|
|
||||||
@ -2111,12 +2107,6 @@ SOCKET_free:
|
|||||||
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_free: success!\n"
|
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_free: success!\n"
|
||||||
|
|
||||||
.error:
|
.error:
|
||||||
|
|
||||||
pusha
|
|
||||||
mov ecx, socket_mutex
|
|
||||||
call mutex_unlock
|
|
||||||
popa
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;------------------------------------
|
;------------------------------------
|
||||||
@ -2331,9 +2321,6 @@ SOCKET_check_owner:
|
|||||||
align 4
|
align 4
|
||||||
SOCKET_process_end:
|
SOCKET_process_end:
|
||||||
|
|
||||||
pushf
|
|
||||||
cli ; FIXME
|
|
||||||
|
|
||||||
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_process_end: %x\n", edx
|
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_process_end: %x\n", edx
|
||||||
|
|
||||||
pusha
|
pusha
|
||||||
@ -2359,11 +2346,6 @@ SOCKET_process_end:
|
|||||||
mov eax, ebx
|
mov eax, ebx
|
||||||
mov ebx, [ebx + SOCKET.NextPtr]
|
mov ebx, [ebx + SOCKET.NextPtr]
|
||||||
|
|
||||||
pusha
|
|
||||||
mov ecx, socket_mutex
|
|
||||||
call mutex_unlock
|
|
||||||
popa
|
|
||||||
|
|
||||||
pusha
|
pusha
|
||||||
cmp [eax + SOCKET.Domain], AF_INET4
|
cmp [eax + SOCKET.Domain], AF_INET4
|
||||||
jne .free
|
jne .free
|
||||||
@ -2379,12 +2361,6 @@ SOCKET_process_end:
|
|||||||
|
|
||||||
.closed:
|
.closed:
|
||||||
popa
|
popa
|
||||||
|
|
||||||
pusha
|
|
||||||
mov ecx, socket_mutex
|
|
||||||
call mutex_lock
|
|
||||||
popa
|
|
||||||
|
|
||||||
jmp .next_socket_test
|
jmp .next_socket_test
|
||||||
|
|
||||||
.done:
|
.done:
|
||||||
@ -2395,8 +2371,6 @@ SOCKET_process_end:
|
|||||||
call mutex_unlock
|
call mutex_unlock
|
||||||
popa
|
popa
|
||||||
|
|
||||||
popf
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user