summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-11 19:39:23 +0100
committerbunnei <bunneidev@gmail.com>2015-01-11 19:39:23 +0100
commit542b0b0057fcfa54ecc31dfe30d9bb435ca8f722 (patch)
tree9ca12fd4e5f5b13b4a75495c276a1b869670f542
parentMerge pull request #457 from Subv/qt (diff)
parentThread: Prevent waking a thread multiple times. (diff)
downloadyuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar
yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar.gz
yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar.bz2
yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar.lz
yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar.xz
yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.tar.zst
yuzu-542b0b0057fcfa54ecc31dfe30d9bb435ca8f722.zip
-rw-r--r--src/core/hle/kernel/thread.cpp3
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) {
/// Resumes a thread from waiting by marking it as "ready"
void Thread::ResumeFromWait() {
+ // Cancel any outstanding wakeup events
+ CoreTiming::UnscheduleEvent(ThreadWakeupEventType, GetHandle());
+
status &= ~THREADSTATUS_WAIT;
wait_object = nullptr;
wait_type = WAITTYPE_NONE;