1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-19 08:52:25 +00:00

kern: update interrupt manager

This commit is contained in:
Michael Scire 2020-07-24 17:43:42 -07:00 committed by SciresM
parent 3a01fd1ebc
commit 893b046111

View file

@ -175,15 +175,15 @@ namespace ams::kern::arch::arm64 {
/* If we need scheduling, */
if (needs_scheduling) {
/* Handle any changes needed to the user preemption state. */
if (user_mode && GetCurrentThread().GetUserPreemptionState() != 0 && GetCurrentProcess().GetPreemptionStatePinnedThread(GetCurrentCoreId()) == nullptr) {
/* If the user disable count is set, we may need to pin the current thread. */
if (user_mode && GetCurrentThread().GetUserDisableCount() != 0 && GetCurrentProcess().GetPinnedThread(GetCurrentCoreId()) == nullptr) {
KScopedSchedulerLock sl;
/* Note the preemption state in process. */
GetCurrentProcess().SetPreemptionState();
/* Pin the current thread. */
GetCurrentProcess().PinCurrentThread();
/* Set the kernel preemption state flag. */
GetCurrentThread().SetKernelPreemptionState(1);;
/* Set the interrupt flag for the thread. */
GetCurrentThread().SetInterruptFlag();
/* Request interrupt scheduling. */
Kernel::GetScheduler().RequestScheduleOnInterrupt();