mirror of https://github.com/red-prig/fpPS4.git
This commit is contained in:
parent
c2af8e7590
commit
f16979a3a8
|
@ -269,6 +269,8 @@ begin
|
|||
Exit(EPERM);
|
||||
end;
|
||||
|
||||
//Writeln('sys_dynlib_unload_prx:',handle);
|
||||
|
||||
dynlibs_lock;
|
||||
|
||||
obj:=find_obj_id(handle);
|
||||
|
|
|
@ -232,6 +232,7 @@ type
|
|||
td_cpuset :Ptruint;
|
||||
td_sleepqueue :Pointer;
|
||||
td_slpq :TAILQ_ENTRY;
|
||||
td_zombie :TAILQ_ENTRY;
|
||||
td_wchan :Pointer;
|
||||
td_wmesg :PChar;
|
||||
td_sqqueue :Integer;
|
||||
|
|
|
@ -142,7 +142,7 @@ end;
|
|||
procedure thread_zombie(td:p_kthread);
|
||||
begin
|
||||
rw_wlock(zombie_lock);
|
||||
TAILQ_INSERT_HEAD(@zombie_threads,td,@td^.td_slpq);
|
||||
TAILQ_INSERT_HEAD(@zombie_threads,td,@td^.td_zombie);
|
||||
rw_wunlock(zombie_lock);
|
||||
end;
|
||||
|
||||
|
@ -165,7 +165,7 @@ begin
|
|||
|
||||
if cpu_thread_finished(td_first) then
|
||||
begin
|
||||
TAILQ_REMOVE(@zombie_threads,@td_first,@td_first^.td_slpq);
|
||||
TAILQ_REMOVE(@zombie_threads,@td_first,@td_first^.td_zombie);
|
||||
thread_free(td_first);
|
||||
end else
|
||||
begin
|
||||
|
|
|
@ -2417,7 +2417,7 @@ begin
|
|||
elm:=TAILQ_FIRST(@root^.dagmembers);
|
||||
while (elm<>nil) do
|
||||
begin
|
||||
Inc(elm^.obj^.ref_count);
|
||||
Dec(elm^.obj^.ref_count);
|
||||
//
|
||||
elm:=TAILQ_NEXT(elm,@elm^.link);
|
||||
end;
|
||||
|
@ -3381,9 +3381,12 @@ end;
|
|||
|
||||
function unload_prx(obj:p_lib_info):Integer;
|
||||
var
|
||||
ref_count:Integer;
|
||||
modname:pchar;
|
||||
begin
|
||||
if (obj^.ref_count=0) then
|
||||
ref_count:=obj^.ref_count;
|
||||
|
||||
if (ref_count=0) then
|
||||
begin
|
||||
Assert(False,'Invalid shared object handle');
|
||||
Exit(EINVAL);
|
||||
|
@ -3391,7 +3394,7 @@ begin
|
|||
|
||||
unref_dag(obj);
|
||||
|
||||
if (obj^.ref_count<>1) then
|
||||
if (ref_count<>1) then
|
||||
begin
|
||||
Exit(0);
|
||||
end;
|
||||
|
|
|
@ -2463,7 +2463,7 @@ begin
|
|||
continue;
|
||||
end;
|
||||
|
||||
next:=entry^.next;
|
||||
next:=next^.next;
|
||||
end;
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue