Don't reschedule while interrupts are disabled.

This commit is contained in:
Unknown W. Brackets committed 2013-03-24 19:43:56 -07:00
1 parent b2fd023038
commit c9e1b01545
2 files changed
+3 -2

No files matched your search

+2 -2
View File
@@ -1283,7 +1283,7 @@ Thread *__KernelNextThread() {
void __KernelReSchedule(const char *reason)
{
// cancel rescheduling when in interrupt or callback, otherwise everything will be fucked up
if (__IsInInterrupt() || __KernelInCallback())
if (__IsInInterrupt() || __KernelInCallback() || !__InterruptsEnabled())
{
reason = "In Interrupt Or Callback";
return;
@@ -1298,7 +1298,7 @@ void __KernelReSchedule(const char *reason)
// Execute any pending events while we're doing scheduling.
CoreTiming::AdvanceQuick();
if (__IsInInterrupt() || __KernelInCallback())
if (__IsInInterrupt() || __KernelInCallback() || !__InterruptsEnabled())
{
reason = "In Interrupt Or Callback";
return;