diff options
| author | bunnei <bunneidev@gmail.com> | 2021-04-10 00:02:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-10 00:02:52 -0700 |
| commit | b04877dd952d7da11647f16626952d7325e4e900 (patch) | |
| tree | d097ebea3b24a2c815015c17e6c5fd89c69ce045 /src/core/hle/kernel/k_scheduler_lock.h | |
| parent | 31c80b8c6faa7681e7b16a4052403281c7f2b9cd (diff) | |
| parent | 10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f (diff) | |
Merge pull request #6099 from bunnei/derive-mem
Kernel Rework: Derive memory regions from board layout.
Diffstat (limited to 'src/core/hle/kernel/k_scheduler_lock.h')
| -rw-r--r-- | src/core/hle/kernel/k_scheduler_lock.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/hle/kernel/k_scheduler_lock.h b/src/core/hle/kernel/k_scheduler_lock.h index 169455d18..47e315555 100644 --- a/src/core/hle/kernel/k_scheduler_lock.h +++ b/src/core/hle/kernel/k_scheduler_lock.h @@ -2,14 +2,11 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -// This file references various implementation details from Atmosphere, an open-source firmware for -// the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. - #pragma once #include "common/assert.h" -#include "common/spin_lock.h" #include "core/hardware_properties.h" +#include "core/hle/kernel/k_spin_lock.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/kernel.h" @@ -34,7 +31,7 @@ public: } else { // Otherwise, we want to disable scheduling and acquire the spinlock. SchedulerType::DisableScheduling(kernel); - spin_lock.lock(); + spin_lock.Lock(); // For debug, ensure that our state is valid. ASSERT(lock_count == 0); @@ -58,7 +55,7 @@ public: // Note that we no longer hold the lock, and unlock the spinlock. owner_thread = nullptr; - spin_lock.unlock(); + spin_lock.Unlock(); // Enable scheduling, and perform a rescheduling operation. SchedulerType::EnableScheduling(kernel, cores_needing_scheduling); @@ -67,7 +64,7 @@ public: private: KernelCore& kernel; - Common::SpinLock spin_lock{}; + KAlignedSpinLock spin_lock{}; s32 lock_count{}; KThread* owner_thread{}; }; |
