summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-05 09:04:24 +0100
committerbunnei <bunneidev@gmail.com>2020-12-06 09:27:13 +0100
commit165d8485f05569d47751e2f2f730fd3f417831bb (patch)
treec55b41b07cf30f3305483ee40700400d50e1f2b3 /src/core
parenthle: kernel: KScheduler: Various style fixes based on code review feedback. (diff)
downloadyuzu-165d8485f05569d47751e2f2f730fd3f417831bb.tar
yuzu-165d8485f05569d47751e2f2f730fd3f417831bb.tar.gz
yuzu-165d8485f05569d47751e2f2f730fd3f417831bb.tar.bz2
yuzu-165d8485f05569d47751e2f2f730fd3f417831bb.tar.lz
yuzu-165d8485f05569d47751e2f2f730fd3f417831bb.tar.xz
yuzu-165d8485f05569d47751e2f2f730fd3f417831bb.tar.zst
yuzu-165d8485f05569d47751e2f2f730fd3f417831bb.zip
Diffstat (limited to 'src/core')
-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