pthread_attr_setstackaddr/scePthreadAttrSetstackaddr

This commit is contained in:
red-prig 2023-01-05 20:22:53 +03:00
parent 92db24429a
commit ec2fbe98a4
2 changed files with 19 additions and 0 deletions

View File

@ -1237,6 +1237,9 @@ begin
lib^.set_proc($24D91556C54398E9,@ps4_pthread_attr_getguardsize);
lib^.set_proc($B711ED9E027E7B27,@ps4_scePthreadAttrGetguardsize);
lib^.set_proc($B2E0AB11BAF4C484,@ps4_pthread_attr_setstackaddr);
lib^.set_proc($17EC9F99DB88041F,@ps4_scePthreadAttrSetstackaddr);
lib^.set_proc($0F198831443FC176,@ps4_pthread_attr_getstackaddr);
lib^.set_proc($46EDFA7E24ED2730,@ps4_scePthreadAttrGetstackaddr);

View File

@ -63,6 +63,9 @@ function ps4_scePthreadAttrGetaffinity(pAttr:p_pthread_attr_t;mask:PQWORD):Inte
function ps4_pthread_attr_getguardsize(pAttr:p_pthread_attr_t;guardSize:PQWORD):Integer; SysV_ABI_CDecl;
function ps4_scePthreadAttrGetguardsize(pAttr:p_pthread_attr_t;guardSize:PQWORD):Integer; SysV_ABI_CDecl;
function ps4_pthread_attr_setstackaddr(pAttr:p_pthread_attr_t;stackAddr:Pointer):Integer; SysV_ABI_CDecl;
function ps4_scePthreadAttrSetstackaddr(pAttr:p_pthread_attr_t;stackAddr:Pointer):Integer; SysV_ABI_CDecl;
function ps4_pthread_attr_getstackaddr(pAttr:p_pthread_attr_t;stackAddr:PPointer):Integer; SysV_ABI_CDecl;
function ps4_scePthreadAttrGetstackaddr(pAttr:p_pthread_attr_t;stackAddr:PPointer):Integer; SysV_ABI_CDecl;
@ -276,6 +279,19 @@ begin
Result:=px2sce(ps4_pthread_attr_getguardsize(pAttr,guardSize));
end;
function ps4_pthread_attr_setstackaddr(pAttr:p_pthread_attr_t;stackAddr:Pointer):Integer; SysV_ABI_CDecl;
begin
if (pAttr=nil) or (stackAddr=nil) then Exit(EINVAL);
if (pAttr^=nil) then Exit(EINVAL);
pAttr^^.stackaddr_attr:=stackAddr;
Result:=0;
end;
function ps4_scePthreadAttrSetstackaddr(pAttr:p_pthread_attr_t;stackAddr:Pointer):Integer; SysV_ABI_CDecl;
begin
Result:=px2sce(ps4_pthread_attr_setstackaddr(pAttr,stackAddr));
end;
function ps4_pthread_attr_getstackaddr(pAttr:p_pthread_attr_t;stackAddr:PPointer):Integer; SysV_ABI_CDecl;
begin
if (pAttr=nil) or (stackAddr=nil) then Exit(EINVAL);