aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_synchronization_object.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-28 13:16:43 -0800
committerbunnei <bunneidev@gmail.com>2021-01-11 14:23:16 -0800
commitc3c43e32fcf198444acb493483e03fcb193156df (patch)
treea516e116d7dbb9309b0adbfa2e3660861ff4e6b7 /src/core/hle/kernel/k_synchronization_object.cpp
parent7420a717e6b69d223ea021ae3515538b325a54a4 (diff)
hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState.
- This is how the real kernel works, and is more accurate and simpler.
Diffstat (limited to 'src/core/hle/kernel/k_synchronization_object.cpp')
-rw-r--r--src/core/hle/kernel/k_synchronization_object.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_synchronization_object.cpp b/src/core/hle/kernel/k_synchronization_object.cpp
index e7fd119d8..64c566caa 100644
--- a/src/core/hle/kernel/k_synchronization_object.cpp
+++ b/src/core/hle/kernel/k_synchronization_object.cpp
@@ -77,7 +77,7 @@ ResultCode KSynchronizationObject::Wait(KernelCore& kernel, s32* out_index,
// Mark the thread as waiting.
thread->SetCancellable();
thread->SetSyncedObject(nullptr, Svc::ResultTimedOut);
- thread->SetState(ThreadState::WaitSynch);
+ thread->SetState(ThreadState::Waiting);
}
// The lock/sleep is done, so we should be able to get our result.
@@ -148,9 +148,9 @@ void KSynchronizationObject::NotifyAvailable(ResultCode result) {
// Iterate over each thread.
for (auto* cur_node = thread_list_head; cur_node != nullptr; cur_node = cur_node->next) {
Thread* thread = cur_node->thread;
- if (thread->GetState() == ThreadSchedStatus::Paused) {
+ if (thread->GetState() == ThreadState::Waiting) {
thread->SetSyncedObject(this, result);
- thread->SetState(ThreadStatus::Ready);
+ thread->SetState(ThreadState::Runnable);
}
}
}