diff --git a/app/src/main/cpp/skyline/kernel/scheduler.cpp b/app/src/main/cpp/skyline/kernel/scheduler.cpp index 8697fafb..8107e4ad 100644 --- a/app/src/main/cpp/skyline/kernel/scheduler.cpp +++ b/app/src/main/cpp/skyline/kernel/scheduler.cpp @@ -15,12 +15,15 @@ namespace skyline::kernel { void Scheduler::SignalHandler(int signal, siginfo *info, ucontext *ctx, void **tls) { if (*tls) { TRACE_EVENT_END("guest"); - const auto &state{*reinterpret_cast(*tls)->state}; - if (signal == PreemptionSignal) - state.thread->isPreempted = false; - state.scheduler->Rotate(false); - YieldPending = false; - state.scheduler->WaitSchedule(); + { + TRACE_EVENT_FMT("scheduler", "{} Signal", signal == PreemptionSignal ? "Preemption" : "Yield"); + const auto &state{*reinterpret_cast(*tls)->state}; + if (signal == PreemptionSignal) + state.thread->isPreempted = false; + state.scheduler->Rotate(false); + YieldPending = false; + state.scheduler->WaitSchedule(); + } TRACE_EVENT_BEGIN("guest", "Guest"); } else { YieldPending = true;