mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-01 15:02:40 +00:00
Address Comments
Verify parameters before calling the pthread_attr_setstack function. Swap uses of SCE prefix with ORBIS prefix.
This commit is contained in:
parent
15a4b0aa30
commit
76a76350c6
@ -1087,13 +1087,16 @@ int PS4_SYSV_ABI scePthreadAttrGetstack(ScePthreadAttr* attr, void** addr, size_
|
|||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI scePthreadAttrSetstack(ScePthreadAttr* attr, void* addr, size_t size) {
|
int PS4_SYSV_ABI scePthreadAttrSetstack(ScePthreadAttr* attr, void* addr, size_t size) {
|
||||||
|
if (attr == nullptr || *attr == nullptr || addr == nullptr || size > 0x4000) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||||
|
}
|
||||||
int result = pthread_attr_setstack(&(*attr)->pth_attr, addr, size);
|
int result = pthread_attr_setstack(&(*attr)->pth_attr, addr, size);
|
||||||
LOG_INFO(Kernel_Pthread, "scePthreadAttrSetstack: result = {}", result);
|
LOG_INFO(Kernel_Pthread, "scePthreadAttrSetstack: result = {}", result);
|
||||||
|
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
return SCE_OK;
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
return SCE_KERNEL_ERROR_EINVAL;
|
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PS4_SYSV_ABI scePthreadJoin(ScePthread thread, void** res) {
|
int PS4_SYSV_ABI scePthreadJoin(ScePthread thread, void** res) {
|
||||||
|
Loading…
Reference in New Issue
Block a user