summaryrefslogtreecommitdiffstats
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-14 06:30:11 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-15 21:26:17 +0100
commite321decf98a6b0041e4d6b30ca79f24308bbb82c (patch)
tree5d458d4768cd95942154f1b2c9298fac04882700 /src/core/hle/svc.cpp
parentMerge pull request #276 from lioncash/decrappify (diff)
downloadyuzu-e321decf98a6b0041e4d6b30ca79f24308bbb82c.tar
yuzu-e321decf98a6b0041e4d6b30ca79f24308bbb82c.tar.gz
yuzu-e321decf98a6b0041e4d6b30ca79f24308bbb82c.tar.bz2
yuzu-e321decf98a6b0041e4d6b30ca79f24308bbb82c.tar.lz
yuzu-e321decf98a6b0041e4d6b30ca79f24308bbb82c.tar.xz
yuzu-e321decf98a6b0041e4d6b30ca79f24308bbb82c.tar.zst
yuzu-e321decf98a6b0041e4d6b30ca79f24308bbb82c.zip
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) {
/// Synchronize to an OS service
static Result SendSyncRequest(Handle handle) {
- // TODO(yuriks): ObjectPool::Get tries to check the Object type, which fails since this is a generic base Object,
- // so we are forced to use GetFast and manually verify the handle.
- if (!Kernel::g_object_pool.IsValid(handle)) {
+ Kernel::Session* session = Kernel::g_object_pool.Get<Kernel::Session>(handle);
+ if (session == nullptr) {
return InvalidHandle(ErrorModule::Kernel).raw;
}
- Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
- _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!");
- LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName().c_str());
+ LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s)", handle, session->GetName().c_str());
- ResultVal<bool> wait = object->SyncRequest();
+ ResultVal<bool> wait = session->SyncRequest();
if (wait.Succeeded() && *wait) {
Kernel::WaitCurrentThread(WAITTYPE_SYNCH); // TODO(bunnei): Is this correct?
}