This commit is contained in:
Pavel 2022-10-26 16:11:37 +03:00
parent 85deb0277a
commit 4625cf2535
2 changed files with 12 additions and 0 deletions

View File

@ -1136,6 +1136,7 @@ begin
lib^.set_proc($6EDDC24C12A61B22,@ps4_scePthreadSetaffinity);
lib^.set_proc($ADCAD5149B105916,@ps4_scePthreadGetaffinity);
lib^.set_proc($8345530717C9CAED,@ps4_sceKernelGetCurrentCpu);
lib^.set_proc($D6D2B21BB465309A,@ps4_scePthreadGetprio);
lib^.set_proc($5B41E99B65F4B8F1,@ps4_scePthreadSetprio);

View File

@ -67,6 +67,8 @@ function ps4_scePthreadRename(_pthread:pthread;name:Pchar):Integer; SysV_ABI_CD
function ps4_scePthreadSetaffinity(_pthread:pthread;mask:QWORD):Integer; SysV_ABI_CDecl;
function ps4_scePthreadGetaffinity(_pthread:pthread;mask:PQWORD):Integer; SysV_ABI_CDecl;
function ps4_sceKernelGetCurrentCpu():Integer; SysV_ABI_CDecl;
function ps4_scePthreadGetprio(_pthread:pthread;prio:PInteger):Integer; SysV_ABI_CDecl;
function ps4_scePthreadSetprio(_pthread:pthread;prio:Integer):Integer; SysV_ABI_CDecl;
@ -775,6 +777,15 @@ begin
_sig_unlock;
end;
function GetCurrentProcessorNumber():DWORD; stdcall external 'kernel32';
function ps4_sceKernelGetCurrentCpu():Integer; SysV_ABI_CDecl;
begin
_sig_lock;
Result:=GetCurrentProcessorNumber;
_sig_unlock;
end;
function ps4_scePthreadGetaffinity(_pthread:pthread;mask:PQWORD):Integer; SysV_ABI_CDecl;
var
tmp:QWORD;