fixing kernel breakage when futex freezes
git-svn-id: svn://kolibrios.org@9869 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ec9a93aa6a
commit
e25f14c9ba
@ -185,28 +185,31 @@ align 4
|
|||||||
lea esi, [ebp + FUTEX.wait_list]
|
lea esi, [ebp + FUTEX.wait_list]
|
||||||
|
|
||||||
list_add_tail esp, esi ;esp= new waiter, esi= list head
|
list_add_tail esp, esi ;esp= new waiter, esi= list head
|
||||||
|
sti
|
||||||
.again_timeout:
|
.again_timeout:
|
||||||
call change_task
|
call change_task
|
||||||
mov eax, [ebx + APPDATA.wait_param]
|
mov eax, [ebx + APPDATA.wait_param]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jz .timeout
|
jz .timeout
|
||||||
|
DEBUGF 1, "FUTEX no timeout [ecx]=%x edx=%x\n", [ecx], edx
|
||||||
mov eax, edx
|
mov eax, edx
|
||||||
lock cmpxchg [ecx], edx
|
lock cmpxchg [ecx], edx
|
||||||
jz .again_timeout
|
jz .again_timeout
|
||||||
@@:
|
@@:
|
||||||
|
cli
|
||||||
list_del esp
|
list_del esp
|
||||||
|
sti
|
||||||
add esp, sizeof.MUTEX_WAITER
|
add esp, sizeof.MUTEX_WAITER
|
||||||
|
|
||||||
popfd
|
popfd
|
||||||
mov [esp + SYSCALL_STACK.eax], 0
|
mov [esp + SYSCALL_STACK.eax], 0
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.timeout:
|
.timeout:
|
||||||
|
cli
|
||||||
list_del esp
|
list_del esp
|
||||||
|
sti
|
||||||
add esp, sizeof.MUTEX_WAITER
|
add esp, sizeof.MUTEX_WAITER
|
||||||
|
DEBUGF 1, "FUTEX timeout\n"
|
||||||
popfd
|
popfd
|
||||||
mov [esp + SYSCALL_STACK.eax], -1
|
mov [esp + SYSCALL_STACK.eax], -1
|
||||||
ret
|
ret
|
||||||
|
Loading…
Reference in New Issue
Block a user