summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2019-04-17 07:21:19 -0400
committerGravatar Lioncash2019-04-17 09:30:56 -0400
commitc268ffd831bc8771585934e7e24da0f7e150936e (patch)
treeee35a6da18561f3b3d7a43a37081f7f175e62314 /src/core/hle/kernel/thread.cpp
parentkernel/svc: Migrate svcCancelSynchronization behavior to a thread function (diff)
downloadyuzu-c268ffd831bc8771585934e7e24da0f7e150936e.tar.gz
yuzu-c268ffd831bc8771585934e7e24da0f7e150936e.tar.xz
yuzu-c268ffd831bc8771585934e7e24da0f7e150936e.zip
kernel/thread: Unify wait synchronization types
This is a holdover from Citra, where the 3DS has both WaitSynchronization1 and WaitSynchronizationN. The switch only has one form of wait synchronizing (literally WaitSynchonization). This allows us to throw out code that doesn't apply at all to the Switch kernel. Because of this unnecessary dichotomy within the wait synchronization utilities, we were also neglecting to properly handle waiting on multiple objects. While we're at it, we can also scrub out any lingering references to WaitSynchronization1/WaitSynchronizationN in comments, and change them to WaitSynchronization (or remove them if the mention no longer applies).
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 7d4fe9608..2abf9efca 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -101,8 +101,7 @@ void Thread::ResumeFromWait() {
101 ASSERT_MSG(wait_objects.empty(), "Thread is waking up while waiting for objects"); 101 ASSERT_MSG(wait_objects.empty(), "Thread is waking up while waiting for objects");
102 102
103 switch (status) { 103 switch (status) {
104 case ThreadStatus::WaitSynchAll: 104 case ThreadStatus::WaitSynch:
105 case ThreadStatus::WaitSynchAny:
106 case ThreadStatus::WaitHLEEvent: 105 case ThreadStatus::WaitHLEEvent:
107 case ThreadStatus::WaitSleep: 106 case ThreadStatus::WaitSleep:
108 case ThreadStatus::WaitIPC: 107 case ThreadStatus::WaitIPC:
@@ -143,7 +142,7 @@ void Thread::ResumeFromWait() {
143} 142}
144 143
145void Thread::CancelWait() { 144void Thread::CancelWait() {
146 ASSERT(GetStatus() == ThreadStatus::WaitSynchAny); 145 ASSERT(GetStatus() == ThreadStatus::WaitSynch);
147 SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED); 146 SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED);
148 ResumeFromWait(); 147 ResumeFromWait();
149} 148}