Don't allow sceKernelWakeupThread() on cur thread.

I don't know why you wouldn't allow this, but the PSP firmware doesn't.
This commit is contained in:
Unknown W. Brackets 2013-09-02 13:40:59 -07:00
parent 722b878428
commit 648dd5f154

View file

@ -2570,6 +2570,12 @@ bool __KernelThreadSortPriority(SceUID thread1, SceUID thread2)
//////////////////////////////////////////////////////////////////////////
int sceKernelWakeupThread(SceUID uid)
{
if (uid == currentThread)
{
WARN_LOG_REPORT(HLE, "sceKernelWakeupThread(%i): unable to wakeup current thread", uid);
return SCE_KERNEL_ERROR_ILLEGAL_THID;
}
u32 error;
Thread *t = kernelObjects.Get<Thread>(uid, error);
if (t)