From 165d8485f05569d47751e2f2f730fd3f417831bb Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 5 Dec 2020 00:04:24 -0800 Subject: hle: kernel: KAbstractSchedulerLock: Various style fixes based on code review feedback. --- src/core/hle/kernel/k_scheduler_lock.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/core/hle') 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 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 -- cgit v1.2.3