Don't suspend/resume dispatch while interrupts off.

This commit is contained in:
Unknown W. Brackets 2013-04-06 12:34:32 -07:00
parent 0595e5099e
commit 2367c17735

View file

@ -1751,6 +1751,9 @@ void sceKernelExitDeleteThread()
u32 sceKernelSuspendDispatchThread()
{
if (!__InterruptsEnabled())
return SCE_KERNEL_ERROR_CPUDI;
u32 oldDispatchEnabled = dispatchEnabled;
dispatchEnabled = false;
DEBUG_LOG(HLE, "%i=sceKernelSuspendDispatchThread()", oldDispatchEnabled);
@ -1759,6 +1762,9 @@ u32 sceKernelSuspendDispatchThread()
u32 sceKernelResumeDispatchThread(u32 enabled)
{
if (!__InterruptsEnabled())
return SCE_KERNEL_ERROR_CPUDI;
u32 oldDispatchEnabled = dispatchEnabled;
dispatchEnabled = enabled != 0;
DEBUG_LOG(HLE, "sceKernelResumeDispatchThread(%i) - from %i", enabled, oldDispatchEnabled);