Skip to content
Snippets Groups Projects
Commit b68d51ed authored by Subv's avatar Subv
Browse files

Thread: Prevent waking a thread multiple times.

If a thread was woken up by something, cancel the wakeup timeout.
parent e213f913
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment