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,21 +333,23 @@ begin
|
||||
Result:=0;
|
||||
repeat
|
||||
|
||||
if (node.ret<>1) then //is signaled
|
||||
begin
|
||||
if (pResultPat<>nil) then
|
||||
begin
|
||||
pResultPat^:=node.ResultPat;
|
||||
end;
|
||||
Result:=node.ret;
|
||||
Break;
|
||||
end else
|
||||
if (Result=EINTR) then
|
||||
begin
|
||||
Break;
|
||||
end;
|
||||
|
||||
spin_lock(ef^.lock_list);
|
||||
if (node.ret<>1) then //is signaled
|
||||
begin
|
||||
if (pResultPat<>nil) then
|
||||
begin
|
||||
pResultPat^:=node.ResultPat;
|
||||
end;
|
||||
Result:=node.ret;
|
||||
spin_unlock(ef^.lock_list);
|
||||
Break;
|
||||
end else
|
||||
if (Result=EINTR) then
|
||||
begin
|
||||
spin_unlock(ef^.lock_list);
|
||||
Break;
|
||||
end;
|
||||
|
||||
if _test_and_set(ef,bitPattern,waitMode,pResultPat) then
|
||||
begin
|
||||
store_seq_cst(node.ret,0);
|
||||
|
@ -418,17 +418,19 @@ begin
|
||||
|
||||
repeat
|
||||
|
||||
if (node.ret<>1) then //is signaled
|
||||
begin
|
||||
Result:=node.ret;
|
||||
Break;
|
||||
end else
|
||||
if (Result=EINTR) then
|
||||
begin
|
||||
Break;
|
||||
end;
|
||||
|
||||
spin_lock(sv^.vlock);
|
||||
if (node.ret<>1) then //is signaled
|
||||
begin
|
||||
Result:=node.ret;
|
||||
spin_unlock(sv^.vlock);
|
||||
Break;
|
||||
end else
|
||||
if (Result=EINTR) then
|
||||
begin
|
||||
spin_unlock(sv^.vlock);
|
||||
Break;
|
||||
end;
|
||||
|
||||
if (sv^.value>=count) then
|
||||
begin
|
||||
Dec(sv^.value,count);
|
||||
|
Loading…
Reference in New Issue
Block a user