summaryrefslogtreecommitdiff
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
authorGravatar bunnei2021-06-04 19:26:48 -0700
committerGravatar bunnei2021-06-04 19:26:48 -0700
commit27ce97fd42d758350c5100c4bbcb78de0a6d48b5 (patch)
tree7ebe2d29e0bbac3cd33dd21f8f154632aedfdea9 /src/core/hle/service/service.h
parentMerge pull request #6392 from german77/controller-widget (diff)
downloadyuzu-27ce97fd42d758350c5100c4bbcb78de0a6d48b5.tar.gz
yuzu-27ce97fd42d758350c5100c4bbcb78de0a6d48b5.tar.xz
yuzu-27ce97fd42d758350c5100c4bbcb78de0a6d48b5.zip
hle: kernel: Refactor to allocate a ServiceThread per service handler.
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject. - This results in race conditions with N sessions queuing requests to the same service interface. - Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
Diffstat (limited to 'src/core/hle/service/service.h')
-rw-r--r--src/core/hle/service/service.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 4c048173b..ec757753c 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -23,6 +23,7 @@ namespace Kernel {
23class HLERequestContext; 23class HLERequestContext;
24class KClientPort; 24class KClientPort;
25class KServerSession; 25class KServerSession;
26class ServiceThread;
26} // namespace Kernel 27} // namespace Kernel
27 28
28namespace Service { 29namespace Service {
@@ -41,7 +42,7 @@ class ServiceManager;
41 42
42static const int kMaxPortSize = 8; ///< Maximum size of a port name (8 characters) 43static const int kMaxPortSize = 8; ///< Maximum size of a port name (8 characters)
43/// Arbitrary default number of maximum connections to an HLE service. 44/// Arbitrary default number of maximum connections to an HLE service.
44static const u32 DefaultMaxSessions = 10; 45static const u32 DefaultMaxSessions = 64;
45 46
46/** 47/**
47 * This is an non-templated base of ServiceFramework to reduce code bloat and compilation times, it 48 * This is an non-templated base of ServiceFramework to reduce code bloat and compilation times, it
@@ -74,7 +75,7 @@ public:
74 void InvokeRequestTipc(Kernel::HLERequestContext& ctx); 75 void InvokeRequestTipc(Kernel::HLERequestContext& ctx);
75 76
76 /// Creates a port pair and registers it on the kernel's global port registry. 77 /// Creates a port pair and registers it on the kernel's global port registry.
77 Kernel::KClientPort& CreatePort(Kernel::KernelCore& kernel); 78 Kernel::KClientPort& CreatePort();
78 79
79 /// Handles a synchronization request for the service. 80 /// Handles a synchronization request for the service.
80 ResultCode HandleSyncRequest(Kernel::KServerSession& session, 81 ResultCode HandleSyncRequest(Kernel::KServerSession& session,