pthread_attr_setstack/scePthreadAttrSetstack

This commit is contained in:
red-prig 2023-01-06 18:53:15 +03:00
parent 33cca90740
commit eff76314b1
2 changed files with 20 additions and 0 deletions

View File

@ -1249,6 +1249,9 @@ begin
lib^.set_proc($D2A3AD091FD91DC9,@ps4_pthread_attr_getstacksize);
lib^.set_proc($FDF03EED99460D0B,@ps4_scePthreadAttrGetstacksize);
lib^.set_proc($FD2ADB5E9191D5FD,@ps4_pthread_attr_setstack);
lib^.set_proc($06F9FBE2F8FAA0BA,@ps4_scePthreadAttrSetstack);
lib^.set_proc($BD09B87C312C5A2F,@ps4_pthread_attr_getstack);
lib^.set_proc($FEAB8F6B8484254C,@ps4_scePthreadAttrGetstack);

View File

@ -75,6 +75,9 @@ function ps4_scePthreadAttrGetstackaddr(pAttr:p_pthread_attr_t;stackAddr:PPoint
function ps4_pthread_attr_getstacksize(pAttr:p_pthread_attr_t;stackSize:PQWORD):Integer; SysV_ABI_CDecl;
function ps4_scePthreadAttrGetstacksize(pAttr:p_pthread_attr_t;stackSize:PQWORD):Integer; SysV_ABI_CDecl;
function ps4_pthread_attr_setstack(pAttr:p_pthread_attr_t;stackAddr:Pointer;stackSize:QWORD):Integer; SysV_ABI_CDecl;
function ps4_scePthreadAttrSetstack(pAttr:p_pthread_attr_t;stackAddr:Pointer;stackSize:QWORD):Integer; SysV_ABI_CDecl;
function ps4_pthread_attr_getstack(pAttr:p_pthread_attr_t;stackAddr:PPointer;stackSize:PQWORD):Integer; SysV_ABI_CDecl;
function ps4_scePthreadAttrGetstack(pAttr:p_pthread_attr_t;stackAddr:PPointer;stackSize:PQWORD):Integer; SysV_ABI_CDecl;
@ -334,6 +337,20 @@ begin
Result:=px2sce(ps4_pthread_attr_getstacksize(pAttr,stackSize));
end;
function ps4_pthread_attr_setstack(pAttr:p_pthread_attr_t;stackAddr:Pointer;stackSize:QWORD):Integer; SysV_ABI_CDecl;
begin
if (pAttr=nil) or (stackAddr=nil) or (stackSize<PTHREAD_STACK_MIN) then Exit(EINVAL);
if (pAttr^=nil) then Exit(EINVAL);
pAttr^^.stackaddr_attr:=stackAddr;
pAttr^^.stacksize_attr:=stackSize;
Result:=0;
end;
function ps4_scePthreadAttrSetstack(pAttr:p_pthread_attr_t;stackAddr:Pointer;stackSize:QWORD):Integer; SysV_ABI_CDecl;
begin
Result:=px2sce(ps4_pthread_attr_setstack(pAttr,stackAddr,stackSize));
end;
function ps4_pthread_attr_getstack(pAttr:p_pthread_attr_t;stackAddr:PPointer;stackSize:PQWORD):Integer; SysV_ABI_CDecl;
begin
if (pAttr=nil) or (stackAddr=nil) or (stackSize=nil) then Exit(EINVAL);