diff options
| author | 2015-01-11 13:39:23 -0500 | |
|---|---|---|
| committer | 2015-01-11 13:39:23 -0500 | |
| commit | 542b0b0057fcfa54ecc31dfe30d9bb435ca8f722 (patch) | |
| tree | 9ca12fd4e5f5b13b4a75495c276a1b869670f542 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #457 from Subv/qt (diff) | |
| parent | Thread: Prevent waking a thread multiple times. (diff) | |
| download | yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar.gz yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar.xz yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.zip | |
Merge pull request #466 from Subv/wake
Thread: Prevent waking a thread multiple times.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index dd20ca30e..bc86a7c59 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -263,6 +263,9 @@ void WakeThreadAfterDelay(Thread* thread, s64 nanoseconds) { | |||
| 263 | 263 | ||
| 264 | /// Resumes a thread from waiting by marking it as "ready" | 264 | /// Resumes a thread from waiting by marking it as "ready" |
| 265 | void Thread::ResumeFromWait() { | 265 | void Thread::ResumeFromWait() { |
| 266 | // Cancel any outstanding wakeup events | ||
| 267 | CoreTiming::UnscheduleEvent(ThreadWakeupEventType, GetHandle()); | ||
| 268 | |||
| 266 | status &= ~THREADSTATUS_WAIT; | 269 | status &= ~THREADSTATUS_WAIT; |
| 267 | wait_object = nullptr; | 270 | wait_object = nullptr; |
| 268 | wait_type = WAITTYPE_NONE; | 271 | wait_type = WAITTYPE_NONE; |