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.
This commit is contained in:
bunnei
2021-06-04 19:26:48 -07:00
parent c8b3d92836
commit 27ce97fd42
13 changed files with 75 additions and 67 deletions

View File

@ -46,7 +46,7 @@ Kernel::KClientPort& ServiceManager::InterfaceFactory(ServiceManager& self, Core
self.sm_interface = sm;
self.controller_interface = std::make_unique<Controller>(system);
return sm->CreatePort(system.Kernel());
return sm->CreatePort();
}
ResultVal<Kernel::KServerPort*> ServiceManager::RegisterService(std::string name,