summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/k_scheduler_lock.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/hle/kernel/k_scheduler_lock.h b/src/core/hle/kernel/k_scheduler_lock.h
index 39a02af2a..2d675b39e 100644
--- a/src/core/hle/kernel/k_scheduler_lock.h
+++ b/src/core/hle/kernel/k_scheduler_lock.h
@@ -17,16 +17,8 @@ class KernelCore;
template <typename SchedulerType>
class KAbstractSchedulerLock {
-private:
- KernelCore& kernel;
- Common::SpinLock spin_lock;
- s32 lock_count;
- Core::EmuThreadHandle owner_thread;
-
public:
- KAbstractSchedulerLock(KernelCore& kernel)
- : kernel{kernel}, spin_lock(), lock_count(0),
- owner_thread(Core::EmuThreadHandle::InvalidHandle()) {}
+ explicit KAbstractSchedulerLock(KernelCore& kernel) : kernel{kernel} {}
bool IsLockedByCurrentThread() const {
return this->owner_thread == kernel.GetCurrentEmuThreadID();
@@ -71,6 +63,12 @@ public:
SchedulerType::EnableScheduling(kernel, cores_needing_scheduling, leaving_thread);
}
}
+
+private:
+ KernelCore& kernel;
+ Common::SpinLock spin_lock{};
+ s32 lock_count{};
+ Core::EmuThreadHandle owner_thread{Core::EmuThreadHandle::InvalidHandle()};
};
} // namespace Kernel