AnyPS5/core/libs/prx/libkernel/Pthread/src
hugodearaujo 5c6a9d22c4 fix(libkernel): check and keep the scheduling policy of a thread
On a PS5 (firmware 13.60) pthread_setschedparam and
scePthreadSetschedparam accept only SCHED_FIFO and SCHED_RR with a
priority of 256 to 767 or 896 to 959, return EINVAL otherwise, and
keep the policy for pthread_getschedparam. A created thread takes the
policy of explicit scheduling attributes, or its creator's when it
inherits. Here any policy and priority were accepted and SCHED_FIFO
was always reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:53:19 +02:00
..
Attr.cpp Merge pull request #4153 from hugodearaujo/fix/pthread-attr-errors 2026-10-12 21:41:31 +13:00
Cond.cpp fix(libkernel): return EPERM or EINVAL when a condition wait gets a mutex the caller does not hold 2026-10-11 01:53:12 +02:00
Mutex.cpp fix(libkernel): return the console's errors from the SCE mutex calls 2026-10-11 21:06:55 -03:00
Rwlock.cpp fix(libkernel): hold back new rwlock readers while a writer waits 2026-10-12 18:43:43 +00:00
Sem.cpp fix(libkernel): guard SCE pthread semaphore count overflow 2026-10-12 23:26:25 +05:30
Thread.cpp fix(libkernel): check and keep the scheduling policy of a thread 2026-10-13 12:53:19 +02:00
Tsd.cpp fix(libkernel): number pthread keys from 1 as FreeBSD libthr does 2026-10-11 22:16:59 +00:00