Address Comments

Verify parameters before calling the pthread_attr_setstack function.
Swap uses of SCE prefix with ORBIS prefix.
This commit is contained in:
Stephen Miller 2024-08-14 10:33:29 -05:00
parent 15a4b0aa30
commit 76a76350c6

View file

@ -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) {
if (attr == nullptr || *attr == nullptr || addr == nullptr || size > 0x4000) {
return ORBIS_KERNEL_ERROR_EINVAL;
}
int result = pthread_attr_setstack(&(*attr)->pth_attr, addr, size);
LOG_INFO(Kernel_Pthread, "scePthreadAttrSetstack: result = {}", result);
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) {