kern: fix kscheduler interrupt api, adjust debug logging
This commit is contained in:
@@ -38,6 +38,8 @@ namespace ams::kern::arch::arm64 {
|
||||
KProcess *cur_process = GetCurrentProcessPointer();
|
||||
bool should_process_user_exception = KTargetSystem::IsUserExceptionHandlersEnabled();
|
||||
|
||||
MESOSPHERE_LOG("User Exception occurred in %s\n", cur_process->GetName());
|
||||
|
||||
const u64 ec = (esr >> 26) & 0x3F;
|
||||
switch (ec) {
|
||||
case 0x0: /* Unknown */
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace ams::kern {
|
||||
|
||||
/* Enqueue the task and signal the scheduler. */
|
||||
this->task_queue.Enqueue(task);
|
||||
Kernel::GetScheduler().SetInterruptTaskThreadRunnable();
|
||||
Kernel::GetScheduler().SetInterruptTaskRunnable();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace ams::kern {
|
||||
return cores_needing_scheduling;
|
||||
}
|
||||
|
||||
void KScheduler::SetInterruptTaskThreadRunnable() {
|
||||
void KScheduler::InterruptTaskThreadToRunnable() {
|
||||
MESOSPHERE_ASSERT(GetCurrentThread().GetDisableDispatchCount() == 1);
|
||||
|
||||
KThread *task_thread = Kernel::GetInterruptTaskManager().GetThread();
|
||||
@@ -252,7 +252,7 @@ namespace ams::kern {
|
||||
|
||||
/* Switch the current process, if we're switching processes. */
|
||||
if (KProcess *next_process = next_thread->GetOwnerProcess(); next_process != cur_process) {
|
||||
MESOSPHERE_LOG("!!! PROCESS SWITCH !!! %s -> %s\n", cur_process != nullptr ? cur_process->GetName() : nullptr, next_process != nullptr ? next_process->GetName() : nullptr);
|
||||
/* MESOSPHERE_LOG("!!! PROCESS SWITCH !!! %s -> %s\n", cur_process != nullptr ? cur_process->GetName() : nullptr, next_process != nullptr ? next_process->GetName() : nullptr); */
|
||||
KProcess::Switch(cur_process, next_process);
|
||||
}
|
||||
|
||||
|
||||
@@ -120,6 +120,9 @@ namespace ams::kern {
|
||||
::std::va_list vl;
|
||||
va_start(vl, format);
|
||||
MESOSPHERE_RELEASE_LOG("Core[%d]: Kernel Panic at %s:%d\n", GetCurrentCoreId(), file, line);
|
||||
if (KProcess *cur_process = GetCurrentProcessPointer(); cur_process != nullptr) {
|
||||
MESOSPHERE_RELEASE_LOG("Core[%d]: Current Process: %s\n", GetCurrentCoreId(), cur_process->GetName());
|
||||
}
|
||||
MESOSPHERE_RELEASE_VLOG(format, vl);
|
||||
MESOSPHERE_RELEASE_LOG("\n");
|
||||
va_end(vl);
|
||||
|
||||
Reference in New Issue
Block a user