mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-31 19:47:06 +01:00
Kernel: A kernel module's threads may have priorities 0x01-0x7E
User modules stay at 0x08-0x77. Recorded on a PSP-1000 in the new threads/threads/kernel/priority. ProTrekkr's ME test, a kernel module, creates its audio thread at priority 2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c5d2adb303
commit
b09d84d1ae
3 files changed
+6
-2
No files matched your search
@@ -2139,7 +2139,10 @@ int __KernelCreateThread(const char *threadName, SceUID moduleID, u32 entry, u32
|
||||
WARN_LOG_REPORT(Log::sceKernel, "bogus thread stack size %08x", stacksize);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_STACK_SIZE;
|
||||
}
|
||||
if (prio < 0x08 || prio > 0x77) {
|
||||
// A kernel caller may also use 0x01-0x07 and 0x78-0x7E (threads/threads/kernel/priority).
|
||||
const u32 minPrio = allowKernel ? 0x01 : 0x08;
|
||||
const u32 maxPrio = allowKernel ? 0x7E : 0x77;
|
||||
if (prio < minPrio || prio > maxPrio) {
|
||||
WARN_LOG(Log::sceKernel, "bogus thread priority %08x", prio);
|
||||
return SCE_KERNEL_ERROR_ILLEGAL_PRIORITY;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user