mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-29 11:06:07 +00:00
fixed issue in scePthreadAttrSetschedpolicy
This commit is contained in:
parent
ae12f351f8
commit
8f8f0757af
|
@ -110,10 +110,12 @@ int PS4_SYSV_ABI scePthreadAttrSetschedpolicy(ScePthreadAttr* attr, int policy)
|
|||
}
|
||||
|
||||
int ppolicy = SCHED_OTHER; // winpthreads only supports SCHED_OTHER
|
||||
|
||||
if (policy != SCHED_OTHER) {
|
||||
LOG_TRACE_IF(log_pthread_file, "scePthreadAttrSetschedpolicy policy={} not supported by winpthreads\n", policy);
|
||||
}
|
||||
(*attr)->policy = policy;
|
||||
|
||||
int result = pthread_attr_setschedpolicy(&(*attr)->pth_attr, policy);
|
||||
int result = pthread_attr_setschedpolicy(&(*attr)->pth_attr, ppolicy);
|
||||
|
||||
return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue