summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/hle_ipc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-03-31 06:13:53 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2022-04-02 07:24:30 +0200
commitbf1750664c6aeb991240cdd51c299fa0ab329f8f (patch)
tree5cd2ac5a457aa0109c5be1b24d3296542fb675a8 /src/core/hle/kernel/hle_ipc.cpp
parenthle: kernel: Create a default thread for services that do not need their own host thread. (diff)
downloadyuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar.gz
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar.bz2
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar.lz
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar.xz
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar.zst
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.zip
Diffstat (limited to 'src/core/hle/kernel/hle_ipc.cpp')
-rw-r--r--src/core/hle/kernel/hle_ipc.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp
index 42d1b0e31..b547a3463 100644
--- a/src/core/hle/kernel/hle_ipc.cpp
+++ b/src/core/hle/kernel/hle_ipc.cpp
@@ -24,8 +24,15 @@
namespace Kernel {
-SessionRequestHandler::SessionRequestHandler(KernelCore& kernel_, const char* service_name_)
- : kernel{kernel_}, service_thread{kernel.CreateServiceThread(service_name_)} {}
+SessionRequestHandler::SessionRequestHandler(KernelCore& kernel_, const char* service_name_,
+ ServiceThreadType thread_type)
+ : kernel{kernel_} {
+ if (thread_type == ServiceThreadType::CreateNew) {
+ service_thread = kernel.CreateServiceThread(service_name_);
+ } else {
+ service_thread = kernel.GetDefaultServiceThread();
+ }
+}
SessionRequestHandler::~SessionRequestHandler() {
kernel.ReleaseServiceThread(service_thread);