pthread_attr_getstackaddr

This commit is contained in:
red-prig 2023-01-05 20:14:03 +03:00
parent 4b532b8d51
commit f6b6ece27c
2 changed files with 10 additions and 3 deletions

View File

@ -1237,6 +1237,7 @@ begin
lib^.set_proc($24D91556C54398E9,@ps4_pthread_attr_getguardsize);
lib^.set_proc($B711ED9E027E7B27,@ps4_scePthreadAttrGetguardsize);
lib^.set_proc($0F198831443FC176,@ps4_pthread_attr_getstackaddr);
lib^.set_proc($46EDFA7E24ED2730,@ps4_scePthreadAttrGetstackaddr);
lib^.set_proc($D2A3AD091FD91DC9,@ps4_pthread_attr_getstacksize);

View File

@ -63,6 +63,7 @@ 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_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;
function ps4_pthread_attr_getstacksize(pAttr:p_pthread_attr_t;stackSize:PQWORD):Integer; SysV_ABI_CDecl;
@ -274,14 +275,19 @@ begin
Result:=px2sce(ps4_pthread_attr_getguardsize(pAttr,guardSize));
end;
function ps4_scePthreadAttrGetstackaddr(pAttr:p_pthread_attr_t;stackAddr:PPointer):Integer; SysV_ABI_CDecl;
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(SCE_KERNEL_ERROR_EINVAL);
if (pAttr^=nil) then Exit(SCE_KERNEL_ERROR_EINVAL);
if (pAttr=nil) or (stackAddr=nil) then Exit(EINVAL);
if (pAttr^=nil) then Exit(EINVAL);
stackAddr^:=pAttr^^.stackaddr_attr;
Result:=0;
end;
function ps4_scePthreadAttrGetstackaddr(pAttr:p_pthread_attr_t;stackAddr:PPointer):Integer; SysV_ABI_CDecl;
begin
Result:=px2sce(ps4_pthread_attr_getstackaddr(pAttr,stackAddr));
end;
function ps4_pthread_attr_getstacksize(pAttr:p_pthread_attr_t;stackSize:PQWORD):Integer; SysV_ABI_CDecl;
begin
if (pAttr=nil) or (stackSize=nil) then Exit(EINVAL);