diff options
author | Liam <byteslice@airmail.cc> | 2023-03-07 01:45:40 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-03-13 03:06:53 +0100 |
commit | d24ab14126a761ae40ce5d4964083390f1d7b396 (patch) | |
tree | 2658ea0b5078404676df31f01042c523cf824c8b /src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h | |
parent | Merge pull request #9942 from liamwhite/speling (diff) | |
download | yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.gz yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.bz2 yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.lz yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.xz yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.tar.zst yuzu-d24ab14126a761ae40ce5d4964083390f1d7b396.zip |
Diffstat (limited to 'src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h')
-rw-r--r-- | src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h b/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h index 14b83a819..c485022f5 100644 --- a/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h +++ b/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h @@ -11,39 +11,39 @@ namespace Kernel { -class [[nodiscard]] KScopedSchedulerLockAndSleep { +class KScopedSchedulerLockAndSleep { public: - explicit KScopedSchedulerLockAndSleep(KernelCore& kernel_, KHardwareTimer** out_timer, - KThread* t, s64 timeout) - : kernel(kernel_), timeout_tick(timeout), thread(t), timer() { + explicit KScopedSchedulerLockAndSleep(KernelCore& kernel, KHardwareTimer** out_timer, + KThread* thread, s64 timeout_tick) + : m_kernel(kernel), m_timeout_tick(timeout_tick), m_thread(thread), m_timer() { // Lock the scheduler. - kernel.GlobalSchedulerContext().scheduler_lock.Lock(); + kernel.GlobalSchedulerContext().m_scheduler_lock.Lock(); // Set our timer only if the time is positive. - timer = (timeout_tick > 0) ? std::addressof(kernel.HardwareTimer()) : nullptr; + m_timer = (timeout_tick > 0) ? std::addressof(kernel.HardwareTimer()) : nullptr; - *out_timer = timer; + *out_timer = m_timer; } ~KScopedSchedulerLockAndSleep() { // Register the sleep. - if (timeout_tick > 0) { - timer->RegisterTask(thread, timeout_tick); + if (m_timeout_tick > 0) { + m_timer->RegisterTask(m_thread, m_timeout_tick); } // Unlock the scheduler. - kernel.GlobalSchedulerContext().scheduler_lock.Unlock(); + m_kernel.GlobalSchedulerContext().m_scheduler_lock.Unlock(); } void CancelSleep() { - timeout_tick = 0; + m_timeout_tick = 0; } private: - KernelCore& kernel; - s64 timeout_tick{}; - KThread* thread{}; - KHardwareTimer* timer{}; + KernelCore& m_kernel; + s64 m_timeout_tick{}; + KThread* m_thread{}; + KHardwareTimer* m_timer{}; }; } // namespace Kernel |