mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 17:04:16 +01:00
hle: kernel: KAbstractSchedulerLock: Various style fixes based on code review feedback.
This commit is contained in:
parent
960500cfd2
commit
165d8485f0
@ -17,16 +17,8 @@ class KernelCore;
|
|||||||
|
|
||||||
template <typename SchedulerType>
|
template <typename SchedulerType>
|
||||||
class KAbstractSchedulerLock {
|
class KAbstractSchedulerLock {
|
||||||
private:
|
|
||||||
KernelCore& kernel;
|
|
||||||
Common::SpinLock spin_lock;
|
|
||||||
s32 lock_count;
|
|
||||||
Core::EmuThreadHandle owner_thread;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KAbstractSchedulerLock(KernelCore& kernel)
|
explicit KAbstractSchedulerLock(KernelCore& kernel) : kernel{kernel} {}
|
||||||
: kernel{kernel}, spin_lock(), lock_count(0),
|
|
||||||
owner_thread(Core::EmuThreadHandle::InvalidHandle()) {}
|
|
||||||
|
|
||||||
bool IsLockedByCurrentThread() const {
|
bool IsLockedByCurrentThread() const {
|
||||||
return this->owner_thread == kernel.GetCurrentEmuThreadID();
|
return this->owner_thread == kernel.GetCurrentEmuThreadID();
|
||||||
@ -71,6 +63,12 @@ public:
|
|||||||
SchedulerType::EnableScheduling(kernel, cores_needing_scheduling, leaving_thread);
|
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
|
} // namespace Kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user