diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-05 08:37:35 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-12-06 09:03:24 +0100 |
commit | b1326d9230f7c1f33960d2816042b1a41d3b839f (patch) | |
tree | b75c28a51c1d5612d829c8bd35373844ef644fa3 /src/core/hle/kernel/k_scheduler_lock.h | |
parent | kernel: KScopedSchedulerLockAndSleep: Remove unused ctor. (diff) | |
download | yuzu-b1326d9230f7c1f33960d2816042b1a41d3b839f.tar yuzu-b1326d9230f7c1f33960d2816042b1a41d3b839f.tar.gz yuzu-b1326d9230f7c1f33960d2816042b1a41d3b839f.tar.bz2 yuzu-b1326d9230f7c1f33960d2816042b1a41d3b839f.tar.lz yuzu-b1326d9230f7c1f33960d2816042b1a41d3b839f.tar.xz yuzu-b1326d9230f7c1f33960d2816042b1a41d3b839f.tar.zst yuzu-b1326d9230f7c1f33960d2816042b1a41d3b839f.zip |
Diffstat (limited to 'src/core/hle/kernel/k_scheduler_lock.h')
-rw-r--r-- | src/core/hle/kernel/k_scheduler_lock.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/kernel/k_scheduler_lock.h b/src/core/hle/kernel/k_scheduler_lock.h index d46f5fc04..39a02af2a 100644 --- a/src/core/hle/kernel/k_scheduler_lock.h +++ b/src/core/hle/kernel/k_scheduler_lock.h @@ -34,19 +34,19 @@ public: void Lock() { if (this->IsLockedByCurrentThread()) { - /* If we already own the lock, we can just increment the count. */ + // If we already own the lock, we can just increment the count. ASSERT(this->lock_count > 0); this->lock_count++; } else { - /* Otherwise, we want to disable scheduling and acquire the spinlock. */ + // Otherwise, we want to disable scheduling and acquire the spinlock. SchedulerType::DisableScheduling(kernel); this->spin_lock.lock(); - /* For debug, ensure that our state is valid. */ + // For debug, ensure that our state is valid. ASSERT(this->lock_count == 0); ASSERT(this->owner_thread == Core::EmuThreadHandle::InvalidHandle()); - /* Increment count, take ownership. */ + // Increment count, take ownership. this->lock_count = 1; this->owner_thread = kernel.GetCurrentEmuThreadID(); } @@ -56,18 +56,18 @@ public: ASSERT(this->IsLockedByCurrentThread()); ASSERT(this->lock_count > 0); - /* Release an instance of the lock. */ + // Release an instance of the lock. if ((--this->lock_count) == 0) { - /* We're no longer going to hold the lock. Take note of what cores need scheduling. */ + // We're no longer going to hold the lock. Take note of what cores need scheduling. const u64 cores_needing_scheduling = SchedulerType::UpdateHighestPriorityThreads(kernel); Core::EmuThreadHandle leaving_thread = owner_thread; - /* Note that we no longer hold the lock, and unlock the spinlock. */ + // Note that we no longer hold the lock, and unlock the spinlock. this->owner_thread = Core::EmuThreadHandle::InvalidHandle(); this->spin_lock.unlock(); - /* Enable scheduling, and perform a rescheduling operation. */ + // Enable scheduling, and perform a rescheduling operation. SchedulerType::EnableScheduling(kernel, cores_needing_scheduling, leaving_thread); } } |