diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-04 06:56:02 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-12-06 09:03:24 +0100 |
commit | 4756cb203e8ef09377988eb1b49ca20ef45f4492 (patch) | |
tree | 69aed28dbf048dea702665e68797f14c20650276 /src/core/hle/kernel/hle_ipc.cpp | |
parent | hle: kernel: Separate KScheduler from GlobalSchedulerContext class. (diff) | |
download | yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.gz yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.bz2 yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.lz yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.xz yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.tar.zst yuzu-4756cb203e8ef09377988eb1b49ca20ef45f4492.zip |
Diffstat (limited to 'src/core/hle/kernel/hle_ipc.cpp')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 7eda89786..e75e80ad0 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -18,6 +18,7 @@ #include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/k_scheduler.h" +#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/object.h" #include "core/hle/kernel/process.h" @@ -56,9 +57,9 @@ std::shared_ptr<WritableEvent> HLERequestContext::SleepClientThread( writable_event = pair.writable; } + Handle event_handle = InvalidHandle; { - Handle event_handle = InvalidHandle; - SchedulerLockAndSleep lock(kernel, event_handle, thread.get(), timeout); + KScopedSchedulerLockAndSleep lock(kernel, event_handle, thread.get(), timeout); thread->SetHLECallback( [context = *this, callback](std::shared_ptr<Thread> thread) mutable -> bool { ThreadWakeupReason reason = thread->GetSignalingResult() == RESULT_TIMEOUT @@ -74,9 +75,8 @@ std::shared_ptr<WritableEvent> HLERequestContext::SleepClientThread( thread->SetStatus(ThreadStatus::WaitHLEEvent); thread->SetSynchronizationResults(nullptr, RESULT_TIMEOUT); readable_event->AddWaitingThread(thread); - lock.Release(); - thread->SetHLETimeEvent(event_handle); } + thread->SetHLETimeEvent(event_handle); is_thread_waiting = true; |