summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2022-01-17 16:51:55 -0800
committerGravatar bunnei2022-01-20 17:08:00 -0800
commit384e24d3e93ccabe39344a5e40fd14780400162c (patch)
tree755569acc9362b987d5ada93bb8d1cb6c425298e
parenthle: kernel: KServerSession: Simplify CompleteSyncRequest EndWait. (diff)
downloadyuzu-384e24d3e93ccabe39344a5e40fd14780400162c.tar.gz
yuzu-384e24d3e93ccabe39344a5e40fd14780400162c.tar.xz
yuzu-384e24d3e93ccabe39344a5e40fd14780400162c.zip
hle: kernel: KServerSession: Remove hack for CompleteSyncRequest.
- This does not appear to be necessary anymore.
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_server_session.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp
index 2ea995d9a..4d94eb9cf 100644
--- a/src/core/hle/kernel/k_server_session.cpp
+++ b/src/core/hle/kernel/k_server_session.cpp
@@ -8,7 +8,6 @@
8#include "common/assert.h" 8#include "common/assert.h"
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "common/logging/log.h" 10#include "common/logging/log.h"
11#include "common/scope_exit.h"
12#include "core/core_timing.h" 11#include "core/core_timing.h"
13#include "core/hle/ipc_helpers.h" 12#include "core/hle/ipc_helpers.h"
14#include "core/hle/kernel/hle_ipc.h" 13#include "core/hle/kernel/hle_ipc.h"
@@ -123,20 +122,10 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memor
123 122
124 context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf); 123 context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);
125 124
126 // In the event that something fails here, stub a result to prevent the game from crashing.
127 // This is a work-around in the event that somehow we process a service request after the
128 // session has been closed by the game. This has been observed to happen rarely in Pokemon
129 // Sword/Shield and is likely a result of us using host threads/scheduling for services.
130 // TODO(bunnei): Find a better solution here.
131 auto error_guard = SCOPE_GUARD({ CompleteSyncRequest(*context); });
132
133 // Ensure we have a session request handler 125 // Ensure we have a session request handler
134 if (manager->HasSessionRequestHandler(*context)) { 126 if (manager->HasSessionRequestHandler(*context)) {
135 if (auto strong_ptr = manager->GetServiceThread().lock()) { 127 if (auto strong_ptr = manager->GetServiceThread().lock()) {
136 strong_ptr->QueueSyncRequest(*parent, std::move(context)); 128 strong_ptr->QueueSyncRequest(*parent, std::move(context));
137
138 // We succeeded.
139 error_guard.Cancel();
140 } else { 129 } else {
141 ASSERT_MSG(false, "strong_ptr is nullptr!"); 130 ASSERT_MSG(false, "strong_ptr is nullptr!");
142 } 131 }