summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-05-22 20:07:20 -0400
committerbunnei <bunneidev@gmail.com>2016-05-22 20:07:20 -0400
commite054e55ca2fe06be6608a6d3fa781ce292bc1781 (patch)
treead35c96413b1baa4e2a4a00b9fd5e8f81567a4ef /src/core/hle/svc.cpp
parent51ee2d2eb1ff41a39fb3779f3ffa11979ee15e26 (diff)
parent86ea7995ad6a6cb24fc02025e1a1241c00565809 (diff)
Merge pull request #1837 from wwylele/sync-trap
SVC::WaitSynchronizationN: Reschedule at the end
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 2bf122a6d..0ce72de87 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -6,6 +6,7 @@
#include "common/logging/log.h"
#include "common/microprofile.h"
+#include "common/scope_exit.h"
#include "common/string_util.h"
#include "common/symbols.h"
@@ -326,9 +327,9 @@ static ResultCode WaitSynchronizationN(s32* out, Handle* handles, s32 handle_cou
}
}
- HLE::Reschedule(__func__);
+ SCOPE_EXIT({HLE::Reschedule("WaitSynchronizationN");}); // Reschedule after putting the threads to sleep.
- // If thread should wait, then set its state to waiting and then reschedule...
+ // If thread should wait, then set its state to waiting
if (wait_thread) {
// Actually wait the current thread on each object if we decided to wait...