mirror of
https://github.com/red-prig/fpPS4.git
synced 2024-11-23 06:19:57 +00:00
+
This commit is contained in:
parent
6226cceb19
commit
99393e0e19
@ -333,6 +333,7 @@ begin
|
|||||||
Result:=0;
|
Result:=0;
|
||||||
repeat
|
repeat
|
||||||
|
|
||||||
|
spin_lock(ef^.lock_list);
|
||||||
if (node.ret<>1) then //is signaled
|
if (node.ret<>1) then //is signaled
|
||||||
begin
|
begin
|
||||||
if (pResultPat<>nil) then
|
if (pResultPat<>nil) then
|
||||||
@ -340,14 +341,15 @@ begin
|
|||||||
pResultPat^:=node.ResultPat;
|
pResultPat^:=node.ResultPat;
|
||||||
end;
|
end;
|
||||||
Result:=node.ret;
|
Result:=node.ret;
|
||||||
|
spin_unlock(ef^.lock_list);
|
||||||
Break;
|
Break;
|
||||||
end else
|
end else
|
||||||
if (Result=EINTR) then
|
if (Result=EINTR) then
|
||||||
begin
|
begin
|
||||||
|
spin_unlock(ef^.lock_list);
|
||||||
Break;
|
Break;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
spin_lock(ef^.lock_list);
|
|
||||||
if _test_and_set(ef,bitPattern,waitMode,pResultPat) then
|
if _test_and_set(ef,bitPattern,waitMode,pResultPat) then
|
||||||
begin
|
begin
|
||||||
store_seq_cst(node.ret,0);
|
store_seq_cst(node.ret,0);
|
||||||
|
@ -418,17 +418,19 @@ begin
|
|||||||
|
|
||||||
repeat
|
repeat
|
||||||
|
|
||||||
|
spin_lock(sv^.vlock);
|
||||||
if (node.ret<>1) then //is signaled
|
if (node.ret<>1) then //is signaled
|
||||||
begin
|
begin
|
||||||
Result:=node.ret;
|
Result:=node.ret;
|
||||||
|
spin_unlock(sv^.vlock);
|
||||||
Break;
|
Break;
|
||||||
end else
|
end else
|
||||||
if (Result=EINTR) then
|
if (Result=EINTR) then
|
||||||
begin
|
begin
|
||||||
|
spin_unlock(sv^.vlock);
|
||||||
Break;
|
Break;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
spin_lock(sv^.vlock);
|
|
||||||
if (sv^.value>=count) then
|
if (sv^.value>=count) then
|
||||||
begin
|
begin
|
||||||
Dec(sv^.value,count);
|
Dec(sv^.value,count);
|
||||||
|
Loading…
Reference in New Issue
Block a user