diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-28 22:16:43 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-01-11 23:23:16 +0100 |
commit | c3c43e32fcf198444acb493483e03fcb193156df (patch) | |
tree | a516e116d7dbb9309b0adbfa2e3660861ff4e6b7 /src/core/hle/kernel/svc.cpp | |
parent | core: hle: kernel: Add some useful functions for checking kernel addresses. (diff) | |
download | yuzu-c3c43e32fcf198444acb493483e03fcb193156df.tar yuzu-c3c43e32fcf198444acb493483e03fcb193156df.tar.gz yuzu-c3c43e32fcf198444acb493483e03fcb193156df.tar.bz2 yuzu-c3c43e32fcf198444acb493483e03fcb193156df.tar.lz yuzu-c3c43e32fcf198444acb493483e03fcb193156df.tar.xz yuzu-c3c43e32fcf198444acb493483e03fcb193156df.tar.zst yuzu-c3c43e32fcf198444acb493483e03fcb193156df.zip |
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 0a3064c7d..304b8727d 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -343,7 +343,7 @@ static ResultCode SendSyncRequest(Core::System& system, Handle handle) { auto thread = kernel.CurrentScheduler()->GetCurrentThread(); { KScopedSchedulerLock lock(kernel); - thread->SetState(ThreadStatus::WaitIPC); + thread->SetState(ThreadState::Waiting); session->SendSyncRequest(SharedFrom(thread), system.Memory(), system.CoreTiming()); } @@ -1546,7 +1546,7 @@ static ResultCode StartThread(Core::System& system, Handle thread_handle) { return ERR_INVALID_HANDLE; } - ASSERT(thread->GetStatus() == ThreadStatus::Dormant); + ASSERT(thread->GetState() == ThreadState::Initialized); return thread->Start(); } @@ -1661,7 +1661,8 @@ static ResultCode WaitProcessWideKeyAtomic(Core::System& system, VAddr mutex_add current_thread->SetCondVarWaitAddress(condition_variable_addr); current_thread->SetMutexWaitAddress(mutex_addr); current_thread->SetWaitHandle(thread_handle); - current_thread->SetState(ThreadStatus::WaitCondVar); + current_thread->SetState(ThreadState::Waiting); + current_thread->SetWaitingCondVar(true); current_process->InsertConditionVariableThread(SharedFrom(current_thread)); } @@ -1755,9 +1756,7 @@ static void SignalProcessWideKey(Core::System& system, VAddr condition_variable_ const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); auto owner = handle_table.Get<Thread>(owner_handle); ASSERT(owner); - if (thread->GetStatus() == ThreadStatus::WaitCondVar) { - thread->SetState(ThreadStatus::WaitMutex); - } + thread->SetWaitingCondVar(false); owner->AddMutexWaiter(thread); } |