mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 03:44:32 +01:00
Prevent waiting on semas while dispatch disabled.
Does relatively well on tests this way.
This commit is contained in:
1 parent
e133d33167
commit
276037675f
5 files changed
+30
-10
No files matched your search
@@ -1284,7 +1284,7 @@ Thread *__KernelNextThread() {
|
||||
void __KernelReSchedule(const char *reason)
|
||||
{
|
||||
// cancel rescheduling when in interrupt or callback, otherwise everything will be fucked up
|
||||
if (__IsInInterrupt() || __KernelInCallback() || !__InterruptsEnabled())
|
||||
if (__IsInInterrupt() || __KernelInCallback() || !__KernelIsDispatchEnabled())
|
||||
{
|
||||
reason = "In Interrupt Or Callback";
|
||||
return;
|
||||
@@ -1299,7 +1299,7 @@ void __KernelReSchedule(const char *reason)
|
||||
|
||||
// Execute any pending events while we're doing scheduling.
|
||||
CoreTiming::AdvanceQuick();
|
||||
if (__IsInInterrupt() || __KernelInCallback() || !__InterruptsEnabled())
|
||||
if (__IsInInterrupt() || __KernelInCallback() || !__KernelIsDispatchEnabled())
|
||||
{
|
||||
reason = "In Interrupt Or Callback";
|
||||
return;
|
||||
@@ -1717,6 +1717,12 @@ u32 sceKernelResumeDispatchThread(u32 enabled)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool __KernelIsDispatchEnabled()
|
||||
{
|
||||
// Dispatch can never be enabled when interrupts are disabled.
|
||||
return dispatchEnabled && __InterruptsEnabled();
|
||||
}
|
||||
|
||||
int sceKernelRotateThreadReadyQueue(int priority)
|
||||
{
|
||||
DEBUG_LOG(HLE, "sceKernelRotateThreadReadyQueue(%x)", priority);
|
||||
|
||||
Reference in new issue
Block a user