Run all pending callbacks in a row before resume.

Tested with multiple callbacks.
This commit is contained in:
Unknown W. Brackets committed 2012-12-09 21:39:48 -08:00
1 parent e6e9ed1f45
commit b02224615f
1 file changed
+2
+2
View File
@@ -283,6 +283,7 @@ int g_inCbCount = 0;
Thread *__KernelCreateThread(SceUID &id, SceUID moduleID, const char *name, u32 entryPoint, u32 priority, int stacksize, u32 attr);
void __KernelResetThread(Thread *t);
void __KernelCancelWakeup(SceUID threadID);
bool __KernelCheckThreadCallbacks(Thread *thread, bool force);
//////////////////////////////////////////////////////////////////////////
//STATE BEGIN
@@ -1848,6 +1849,7 @@ void __KernelReturnFromMipsCall()
g_inCbCount--;
// yeah! back in the real world, let's keep going. Should we process more callbacks?
__KernelCheckThreadCallbacks(currentThread, !call->reschedAfter);
if (!__KernelExecutePendingMipsCalls(call->reschedAfter))
{
// Sometimes, we want to stay on the thread.