summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index f3595096e..15cc240f4 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -88,17 +88,14 @@ static Result ConnectToPort(Handle* out, const char* port_name) {
88 88
89/// Synchronize to an OS service 89/// Synchronize to an OS service
90static Result SendSyncRequest(Handle handle) { 90static Result SendSyncRequest(Handle handle) {
91 // TODO(yuriks): ObjectPool::Get tries to check the Object type, which fails since this is a generic base Object, 91 Kernel::Session* session = Kernel::g_object_pool.Get<Kernel::Session>(handle);
92 // so we are forced to use GetFast and manually verify the handle. 92 if (session == nullptr) {
93 if (!Kernel::g_object_pool.IsValid(handle)) {
94 return InvalidHandle(ErrorModule::Kernel).raw; 93 return InvalidHandle(ErrorModule::Kernel).raw;
95 } 94 }
96 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
97 95
98 _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); 96 LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s)", handle, session->GetName().c_str());
99 LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName().c_str());
100 97
101 ResultVal<bool> wait = object->SyncRequest(); 98 ResultVal<bool> wait = session->SyncRequest();
102 if (wait.Succeeded() && *wait) { 99 if (wait.Succeeded() && *wait) {
103 Kernel::WaitCurrentThread(WAITTYPE_SYNCH); // TODO(bunnei): Is this correct? 100 Kernel::WaitCurrentThread(WAITTYPE_SYNCH); // TODO(bunnei): Is this correct?
104 } 101 }