diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 0f096ed6d..ee9ea7d67 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -31,6 +31,10 @@ bool Thread::ShouldWait(const Thread* thread) const { | |||
| 31 | return status != ThreadStatus::Dead; | 31 | return status != ThreadStatus::Dead; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | bool Thread::IsSignaled() const { | ||
| 35 | return status == ThreadStatus::Dead; | ||
| 36 | } | ||
| 37 | |||
| 34 | void Thread::Acquire(Thread* thread) { | 38 | void Thread::Acquire(Thread* thread) { |
| 35 | ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); | 39 | ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); |
| 36 | } | 40 | } |
| @@ -45,7 +49,7 @@ void Thread::Stop() { | |||
| 45 | kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle); | 49 | kernel.ThreadWakeupCallbackHandleTable().Close(callback_handle); |
| 46 | callback_handle = 0; | 50 | callback_handle = 0; |
| 47 | SetStatus(ThreadStatus::Dead); | 51 | SetStatus(ThreadStatus::Dead); |
| 48 | WakeupAllWaitingThreads(); | 52 | Signal(); |
| 49 | 53 | ||
| 50 | // Clean up any dangling references in objects that this thread was waiting for | 54 | // Clean up any dangling references in objects that this thread was waiting for |
| 51 | for (auto& wait_object : wait_objects) { | 55 | for (auto& wait_object : wait_objects) { |