Kernel: Don't idle on svcSleepThread(0)
This commit is contained in:
@@ -348,7 +348,11 @@ void Kernel::sleepThread(s64 ns) {
|
|||||||
t.status = ThreadStatus::Ready;
|
t.status = ThreadStatus::Ready;
|
||||||
|
|
||||||
if (nextThreadIndex.has_value()) {
|
if (nextThreadIndex.has_value()) {
|
||||||
switchThread(nextThreadIndex.value());
|
const auto index = nextThreadIndex.value();
|
||||||
|
|
||||||
|
if (index != idleThreadIndex) {
|
||||||
|
switchThread(index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else { // If we're sleeping for >= 0 ns
|
} else { // If we're sleeping for >= 0 ns
|
||||||
Thread& t = threads[currentThreadIndex];
|
Thread& t = threads[currentThreadIndex];
|
||||||
|
|||||||
Reference in New Issue
Block a user