pthread_getname_np

This commit is contained in:
red-prig 2023-01-04 21:36:16 +03:00
parent 53f69f8d20
commit a60e8a2126
2 changed files with 9 additions and 2 deletions

View File

@ -1255,6 +1255,7 @@ begin
lib^.set_proc($1E82D558D6A70417,@ps4_getpid);
lib^.set_proc($108FF9FE396AD9D1,@ps4_scePthreadGetthreadid);
lib^.set_proc($F47CDF85DB444A2A,@ps4_pthread_getname_np);
lib^.set_proc($1E8C3B07C39EB7A9,@ps4_scePthreadGetname);
lib^.set_proc($F6FC8FE99EDBAB37,@ps4_pthread_rename_np);

View File

@ -64,6 +64,7 @@ function ps4_scePthreadSelf():pthread; SysV_ABI_CDecl;
function ps4_getpid():Integer; SysV_ABI_CDecl;
function ps4_scePthreadGetthreadid():Integer; SysV_ABI_CDecl;
function ps4_pthread_getname_np(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CDecl;
function ps4_scePthreadGetname(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CDecl;
function ps4_pthread_rename_np(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CDecl;
@ -780,13 +781,18 @@ begin
Result:=tcb_thread^.ThreadId;
end;
function ps4_scePthreadGetname(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CDecl;
function ps4_pthread_getname_np(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CDecl;
begin
if (_pthread=nil) or (name=nil) then Exit(SCE_KERNEL_ERROR_EINVAL);
if (_pthread=nil) or (name=nil) then Exit(EINVAL);
MoveChar0(_pthread^.name,name^,32);
Result:=0;
end;
function ps4_scePthreadGetname(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CDecl;
begin
Result:=px2sce(ps4_pthread_getname_np(_pthread,name));
end;
function ps4_pthread_rename_np(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CDecl;
begin
if (_pthread=nil) or (name=nil) then Exit(EINVAL);