diff options
| author | 2015-01-11 13:18:52 -0500 | |
|---|---|---|
| committer | 2015-01-11 13:18:52 -0500 | |
| commit | b68d51ed3047fe45e270b6d23de615c3f8c4b58b (patch) | |
| tree | dcc1db85180c38d4e0ea5ac88fa2c12cabcf301d /src | |
| parent | Fix Windows build (diff) | |
| download | yuzu-b68d51ed3047fe45e270b6d23de615c3f8c4b58b.tar.gz yuzu-b68d51ed3047fe45e270b6d23de615c3f8c4b58b.tar.xz yuzu-b68d51ed3047fe45e270b6d23de615c3f8c4b58b.zip | |
Thread: Prevent waking a thread multiple times.
If a thread was woken up by something, cancel the wakeup timeout.
Diffstat (limited to 'src')
| -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 0ae1a21df..6d126099b 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; |