summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-26 00:28:48 +0100
committerbunnei <bunneidev@gmail.com>2019-11-28 18:01:53 +0100
commitc3d3b173d39b7c12fa9b3d5d34040e9377f2888e (patch)
tree61ff05239fe2b3d08bcf775f1528263cffc9aff4 /src/core/hle/kernel/svc.cpp
parentMerge pull request #3169 from lioncash/memory (diff)
downloadyuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.gz
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.bz2
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.lz
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.xz
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.tar.zst
yuzu-c3d3b173d39b7c12fa9b3d5d34040e9377f2888e.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index db3ae3eb8..bd25de478 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -381,11 +381,12 @@ static ResultCode SendSyncRequest(Core::System& system, Handle handle) {
LOG_TRACE(Kernel_SVC, "called handle=0x{:08X}({})", handle, session->GetName());
- system.PrepareReschedule();
+ auto thread = system.CurrentScheduler().GetCurrentThread();
+ thread->InvalidateWakeupCallback();
+ thread->SetStatus(ThreadStatus::WaitIPC);
+ system.PrepareReschedule(thread->GetProcessorID());
- // TODO(Subv): svcSendSyncRequest should put the caller thread to sleep while the server
- // responds and cause a reschedule.
- return session->SendSyncRequest(system.CurrentScheduler().GetCurrentThread(), system.Memory());
+ return session->SendSyncRequest(SharedFrom(thread), system.Memory());
}
/// Get the ID for the specified thread.