From d2759c578e8cf24277767f701d5682f7b1792a9f Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 18 Jan 2015 18:01:58 -0500 Subject: Kernel: Reschedule on SignalEvent and SendSyncRequest, fix some bugs. --- src/core/hle/kernel/kernel.cpp | 2 +- src/core/hle/svc.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index b3ca78ed6..6f1dced70 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -35,9 +35,9 @@ Thread* WaitObject::ReleaseNextThread() { return nullptr; auto next_thread = waiting_threads.front(); + waiting_threads.erase(waiting_threads.begin()); next_thread->ReleaseWaitObject(this); - waiting_threads.erase(waiting_threads.begin()); return next_thread.get(); } diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 8df861669..d72839172 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -405,6 +405,7 @@ static Result DuplicateHandle(Handle* out, Handle handle) { /// Signals an event static Result SignalEvent(Handle evt) { LOG_TRACE(Kernel_SVC, "called event=0x%08X", evt); + HLE::Reschedule(__func__); return Kernel::SignalEvent(evt).raw; } -- cgit v1.2.3