Return proper errors while dispatch disabled.

In at least the majority of waits.
This commit is contained in:
Unknown W. Brackets 2013-08-27 23:19:53 -07:00
parent 252bf04c64
commit 61fae4e920
7 changed files with 81 additions and 24 deletions

View file

@ -2541,6 +2541,9 @@ int sceKernelWaitThreadEnd(SceUID threadID, u32 timeoutPtr)
if (threadID == 0 || threadID == currentThread)
return SCE_KERNEL_ERROR_ILLEGAL_THID;
if (!__KernelIsDispatchEnabled())
return SCE_KERNEL_ERROR_CAN_NOT_WAIT;
u32 error;
Thread *t = kernelObjects.Get<Thread>(threadID, error);
if (t)
@ -2567,6 +2570,9 @@ int sceKernelWaitThreadEndCB(SceUID threadID, u32 timeoutPtr)
if (threadID == 0 || threadID == currentThread)
return SCE_KERNEL_ERROR_ILLEGAL_THID;
if (!__KernelIsDispatchEnabled())
return SCE_KERNEL_ERROR_CAN_NOT_WAIT;
u32 error;
Thread *t = kernelObjects.Get<Thread>(threadID, error);
if (t)