mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
kern: fix enormous whoops
This commit is contained in:
parent
8fea8d9b2e
commit
7821241356
2 changed files with 5 additions and 6 deletions
|
@ -231,6 +231,10 @@ namespace ams::kern {
|
||||||
next_thread = m_idle_thread;
|
next_thread = m_idle_thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (next_thread->GetCurrentCore() != m_core_id) {
|
||||||
|
next_thread->SetCurrentCore(m_core_id);
|
||||||
|
}
|
||||||
|
|
||||||
/* If we're not actually switching thread, there's nothing to do. */
|
/* If we're not actually switching thread, there's nothing to do. */
|
||||||
if (next_thread == cur_thread) {
|
if (next_thread == cur_thread) {
|
||||||
return;
|
return;
|
||||||
|
@ -263,10 +267,6 @@ namespace ams::kern {
|
||||||
|
|
||||||
MESOSPHERE_KTRACE_THREAD_SWITCH(next_thread);
|
MESOSPHERE_KTRACE_THREAD_SWITCH(next_thread);
|
||||||
|
|
||||||
if (next_thread->GetCurrentCore() != m_core_id) {
|
|
||||||
next_thread->SetCurrentCore(m_core_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Switch the current process, if we're switching processes. */
|
/* Switch the current process, if we're switching processes. */
|
||||||
if (KProcess *next_process = next_thread->GetOwnerProcess(); next_process != cur_process) {
|
if (KProcess *next_process = next_thread->GetOwnerProcess(); next_process != cur_process) {
|
||||||
KProcess::Switch(cur_process, next_process);
|
KProcess::Switch(cur_process, next_process);
|
||||||
|
|
|
@ -136,8 +136,7 @@ _ZN3ams4kern10KScheduler12ScheduleImplEv:
|
||||||
|
|
||||||
/* Check if the highest priority thread is the same as the current thread. */
|
/* Check if the highest priority thread is the same as the current thread. */
|
||||||
ldr x7, [x1, #(KSCHEDULER_HIGHEST_PRIORITY_THREAD)]
|
ldr x7, [x1, #(KSCHEDULER_HIGHEST_PRIORITY_THREAD)]
|
||||||
ldr x2, [x18]
|
cmp x7, x18
|
||||||
cmp x7, x2
|
|
||||||
b.ne 1f
|
b.ne 1f
|
||||||
|
|
||||||
/* If they're the same, then we can just return as there's nothing to do. */
|
/* If they're the same, then we can just return as there's nothing to do. */
|
||||||
|
|
Loading…
Reference in a new issue