diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index fd2d2d2cf7..92b21feec2 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -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; } diff --git a/pspautotests b/pspautotests index 704b88a913..0e251f7c4b 160000 --- a/pspautotests +++ b/pspautotests @@ -1 +1 @@ -Subproject commit 704b88a913311ea6d2beb97cbdd66b2ca5182c72 +Subproject commit 0e251f7c4b12ca461f12de4a608e5acd4463fcc5 diff --git a/test.py b/test.py index 2cc0c7c3b4..c71e10c9bf 100755 --- a/test.py +++ b/test.py @@ -487,6 +487,7 @@ tests_good = [ "threads/tls/create", "threads/tls/partition", "threads/tls/kernel/partition", + "threads/threads/kernel/priority", "threads/tls/delete", "threads/tls/get", "threads/tls/free",