summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index f100ffc70..fb97535a3 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -96,7 +96,7 @@ void Thread::ResumeFromWait() {
96 case ThreadStatus::Ready: 96 case ThreadStatus::Ready:
97 // The thread's wakeup callback must have already been cleared when the thread was first 97 // The thread's wakeup callback must have already been cleared when the thread was first
98 // awoken. 98 // awoken.
99 ASSERT(wakeup_callback == nullptr); 99 ASSERT(hle_callback == nullptr);
100 // If the thread is waiting on multiple wait objects, it might be awoken more than once 100 // If the thread is waiting on multiple wait objects, it might be awoken more than once
101 // before actually resuming. We can ignore subsequent wakeups if the thread status has 101 // before actually resuming. We can ignore subsequent wakeups if the thread status has
102 // already been set to ThreadStatus::Ready. 102 // already been set to ThreadStatus::Ready.
@@ -112,7 +112,7 @@ void Thread::ResumeFromWait() {
112 return; 112 return;
113 } 113 }
114 114
115 wakeup_callback = nullptr; 115 hle_callback = nullptr;
116 116
117 if (activity == ThreadActivity::Paused) { 117 if (activity == ThreadActivity::Paused) {
118 SetStatus(ThreadStatus::Paused); 118 SetStatus(ThreadStatus::Paused);
@@ -398,8 +398,14 @@ bool Thread::AllSynchronizationObjectsReady() const {
398bool Thread::InvokeWakeupCallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread, 398bool Thread::InvokeWakeupCallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
399 std::shared_ptr<SynchronizationObject> object, 399 std::shared_ptr<SynchronizationObject> object,
400 std::size_t index) { 400 std::size_t index) {
401 ASSERT(wakeup_callback); 401 ASSERT(hle_callback);
402 return wakeup_callback(reason, std::move(thread), std::move(object), index); 402 return hle_callback(reason, std::move(thread), std::move(object), index);
403}
404
405bool Thread::InvokeHLECallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread,
406 std::shared_ptr<SynchronizationObject> object, std::size_t index) {
407 ASSERT(hle_callback);
408 return hle_callback(reason, std::move(thread), std::move(object), index);
403} 409}
404 410
405void Thread::SetActivity(ThreadActivity value) { 411void Thread::SetActivity(ThreadActivity value) {