mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-28 05:52:39 +02:00
kern: update interrupt manager
This commit is contained in:
parent
a61b553c34
commit
c624611487
@ -175,15 +175,15 @@ namespace ams::kern::arch::arm64 {
|
|||||||
|
|
||||||
/* If we need scheduling, */
|
/* If we need scheduling, */
|
||||||
if (needs_scheduling) {
|
if (needs_scheduling) {
|
||||||
/* Handle any changes needed to the user preemption state. */
|
/* If the user disable count is set, we may need to pin the current thread. */
|
||||||
if (user_mode && GetCurrentThread().GetUserPreemptionState() != 0 && GetCurrentProcess().GetPreemptionStatePinnedThread(GetCurrentCoreId()) == nullptr) {
|
if (user_mode && GetCurrentThread().GetUserDisableCount() != 0 && GetCurrentProcess().GetPinnedThread(GetCurrentCoreId()) == nullptr) {
|
||||||
KScopedSchedulerLock sl;
|
KScopedSchedulerLock sl;
|
||||||
|
|
||||||
/* Note the preemption state in process. */
|
/* Pin the current thread. */
|
||||||
GetCurrentProcess().SetPreemptionState();
|
GetCurrentProcess().PinCurrentThread();
|
||||||
|
|
||||||
/* Set the kernel preemption state flag. */
|
/* Set the interrupt flag for the thread. */
|
||||||
GetCurrentThread().SetKernelPreemptionState(1);;
|
GetCurrentThread().SetInterruptFlag();
|
||||||
|
|
||||||
/* Request interrupt scheduling. */
|
/* Request interrupt scheduling. */
|
||||||
Kernel::GetScheduler().RequestScheduleOnInterrupt();
|
Kernel::GetScheduler().RequestScheduleOnInterrupt();
|
||||||
|
Loading…
Reference in New Issue
Block a user