diff options
| author | 2020-02-25 19:43:28 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:14 -0400 | |
| commit | 15a79eb0d7abe752a9a55d0cfa7ea220e17318b7 (patch) | |
| tree | 863357ab4be1ff9a72804c40455d6a4c4c493acd /src/core/hle/kernel/thread.cpp | |
| parent | SVC: Correct ArbitrateUnlock (diff) | |
| download | yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar.gz yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.tar.xz yuzu-15a79eb0d7abe752a9a55d0cfa7ea220e17318b7.zip | |
SVC: Correct SendSyncRequest.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 14 |
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 { | |||
| 398 | bool Thread::InvokeWakeupCallback(ThreadWakeupReason reason, std::shared_ptr<Thread> thread, | 398 | bool 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 | |||
| 405 | bool 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 | ||
| 405 | void Thread::SetActivity(ThreadActivity value) { | 411 | void Thread::SetActivity(ThreadActivity value) { |