diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-10 05:15:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 05:15:00 +0200 |
commit | ec50a9b5b9882940a2e107889d3d909b57603626 (patch) | |
tree | 884bc2b18f440ec3058ac546718d315bf1970ad3 /src/core/hle/kernel/k_synchronization_object.cpp | |
parent | Merge pull request #6294 from german77/kernelCleanup (diff) | |
parent | kernel: Eliminate variable shadowing (diff) | |
download | yuzu-ec50a9b5b9882940a2e107889d3d909b57603626.tar yuzu-ec50a9b5b9882940a2e107889d3d909b57603626.tar.gz yuzu-ec50a9b5b9882940a2e107889d3d909b57603626.tar.bz2 yuzu-ec50a9b5b9882940a2e107889d3d909b57603626.tar.lz yuzu-ec50a9b5b9882940a2e107889d3d909b57603626.tar.xz yuzu-ec50a9b5b9882940a2e107889d3d909b57603626.tar.zst yuzu-ec50a9b5b9882940a2e107889d3d909b57603626.zip |
Diffstat (limited to 'src/core/hle/kernel/k_synchronization_object.cpp')
-rw-r--r-- | src/core/hle/kernel/k_synchronization_object.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/kernel/k_synchronization_object.cpp b/src/core/hle/kernel/k_synchronization_object.cpp index 460b8a714..45380dea0 100644 --- a/src/core/hle/kernel/k_synchronization_object.cpp +++ b/src/core/hle/kernel/k_synchronization_object.cpp @@ -18,18 +18,18 @@ void KSynchronizationObject::Finalize() { KAutoObject::Finalize(); } -ResultCode KSynchronizationObject::Wait(KernelCore& kernel, s32* out_index, +ResultCode KSynchronizationObject::Wait(KernelCore& kernel_ctx, s32* out_index, KSynchronizationObject** objects, const s32 num_objects, s64 timeout) { // Allocate space on stack for thread nodes. std::vector<ThreadListNode> thread_nodes(num_objects); // Prepare for wait. - KThread* thread = kernel.CurrentScheduler()->GetCurrentThread(); + KThread* thread = kernel_ctx.CurrentScheduler()->GetCurrentThread(); { // Setup the scheduling lock and sleep. - KScopedSchedulerLockAndSleep slp{kernel, thread, timeout}; + KScopedSchedulerLockAndSleep slp{kernel_ctx, thread, timeout}; // Check if any of the objects are already signaled. for (auto i = 0; i < num_objects; ++i) { @@ -94,13 +94,13 @@ ResultCode KSynchronizationObject::Wait(KernelCore& kernel, s32* out_index, thread->SetWaitObjectsForDebugging({}); // Cancel the timer as needed. - kernel.TimeManager().UnscheduleTimeEvent(thread); + kernel_ctx.TimeManager().UnscheduleTimeEvent(thread); // Get the wait result. ResultCode wait_result{RESULT_SUCCESS}; s32 sync_index = -1; { - KScopedSchedulerLock lock(kernel); + KScopedSchedulerLock lock(kernel_ctx); KSynchronizationObject* synced_obj; wait_result = thread->GetWaitResult(std::addressof(synced_obj)); @@ -135,7 +135,8 @@ ResultCode KSynchronizationObject::Wait(KernelCore& kernel, s32* out_index, return wait_result; } -KSynchronizationObject::KSynchronizationObject(KernelCore& kernel) : KAutoObjectWithList{kernel} {} +KSynchronizationObject::KSynchronizationObject(KernelCore& kernel_) + : KAutoObjectWithList{kernel_} {} KSynchronizationObject::~KSynchronizationObject() = default; |