mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 20:15:03 +00:00
Support SCHED_FIFO and SCHED_RR Policy
Support SCHED_FIFO and SCHED_RR Policy
This commit is contained in:
parent
63b0465a33
commit
49132b3564
@ -275,9 +275,16 @@ int PS4_SYSV_ABI scePthreadAttrSetschedpolicy(ScePthreadAttr* attr, int policy)
|
|||||||
return SCE_KERNEL_ERROR_EINVAL;
|
return SCE_KERNEL_ERROR_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ppolicy = SCHED_OTHER; // winpthreads only supports SCHED_OTHER
|
int ppolicy;
|
||||||
if (policy != SCHED_OTHER) {
|
switch (policy) {
|
||||||
|
case SCHED_OTHER:
|
||||||
|
case SCHED_FIFO:
|
||||||
|
case SCHED_RR:
|
||||||
|
ppolicy = policy;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
LOG_ERROR(Kernel_Pthread, "policy={} not supported by winpthreads", policy);
|
LOG_ERROR(Kernel_Pthread, "policy={} not supported by winpthreads", policy);
|
||||||
|
return SCE_KERNEL_ERROR_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*attr)->policy = policy;
|
(*attr)->policy = policy;
|
||||||
|
Loading…
Reference in New Issue
Block a user