Process events when idle or switching threads.

Fixes hrydgard/ppsspp#104, so things execute more accurately.
This commit is contained in:
Unknown W. Brackets
2012-11-30 23:09:14 -08:00
parent 998104e2eb
commit a2ee736793
2 changed files with 23 additions and 1 deletions
+8
View File
@@ -730,6 +730,14 @@ void __KernelReSchedule(const char *reason)
return;
}
// Execute any pending events while we're doing scheduling.
CoreTiming::Advance();
if (__IsInInterrupt() || __KernelInCallback())
{
reason = "In Interrupt Or Callback";
return;
}
retry:
Thread *nextThread = __KernelNextThread();