mirror of https://github.com/red-prig/fpPS4.git
This commit is contained in:
parent
a52c06204b
commit
02abf91ce4
|
@ -2158,6 +2158,7 @@ end;
|
||||||
|
|
||||||
function do_unlock_pi(td:p_kthread;m:p_umutex;flags:Integer):Integer;
|
function do_unlock_pi(td:p_kthread;m:p_umutex;flags:Integer):Integer;
|
||||||
var
|
var
|
||||||
|
uq_thread:p_kthread;
|
||||||
key:umtx_key;
|
key:umtx_key;
|
||||||
uq_first,uq_first2,uq_me:p_umtx_q;
|
uq_first,uq_first2,uq_me:p_umtx_q;
|
||||||
pi,pi2:p_umtx_pi;
|
pi,pi2:p_umtx_pi;
|
||||||
|
@ -2284,19 +2285,21 @@ begin
|
||||||
umtxq_unlock(@key);
|
umtxq_unlock(@key);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
id:=uq_first^.uq_thread^.td_tid;
|
uq_thread:=uq_first^.uq_thread;
|
||||||
|
id:=uq_thread^.td_tid;
|
||||||
|
|
||||||
if ((flags and $200) <> 0) then
|
if ((flags and $200) <> 0) then
|
||||||
begin
|
begin
|
||||||
mtx_lock(umtx_lock);
|
mtx_lock(umtx_lock);
|
||||||
|
|
||||||
|
pi:=uq_first^.uq_pi_blocked;
|
||||||
|
Assert(pi<>nil,'pi=nil?');
|
||||||
|
|
||||||
uq_first^.uq_pi_blocked:=nil;
|
uq_first^.uq_pi_blocked:=nil;
|
||||||
|
|
||||||
thread_lock(uq_first^.uq_thread);
|
thread_lock(uq_thread);
|
||||||
uq_first^.uq_thread^.td_flags:=uq_first^.uq_thread^.td_flags and (not TDF_UPIBLOCKED);
|
uq_thread^.td_flags:=uq_thread^.td_flags and (not TDF_UPIBLOCKED);
|
||||||
thread_unlock(uq_first^.uq_thread);
|
thread_unlock(uq_thread);
|
||||||
|
|
||||||
pi:=uq_first^.uq_pi_blocked;
|
|
||||||
|
|
||||||
TAILQ_REMOVE(@pi^.pi_blocked, uq_first, @uq_first^.uq_lockq);
|
TAILQ_REMOVE(@pi^.pi_blocked, uq_first, @uq_first^.uq_lockq);
|
||||||
|
|
||||||
|
@ -2306,7 +2309,7 @@ begin
|
||||||
|
|
||||||
if (count > 1) then
|
if (count > 1) then
|
||||||
begin
|
begin
|
||||||
Result:=umtx_pi_claim(pi, uq_first^.uq_thread);
|
Result:=umtx_pi_claim(pi, uq_thread);
|
||||||
|
|
||||||
if (Result <> 0) then
|
if (Result <> 0) then
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue