summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/server_session.cpp2
-rw-r--r--src/core/hle/kernel/service_thread.cpp10
-rw-r--r--src/core/hle/kernel/service_thread.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp
index 079c3911a..ed42452ff 100644
--- a/src/core/hle/kernel/server_session.cpp
+++ b/src/core/hle/kernel/server_session.cpp
@@ -34,7 +34,7 @@ ResultVal<std::shared_ptr<ServerSession>> ServerSession::Create(KernelCore& kern
session->name = std::move(name);
session->parent = std::move(parent);
- session->service_thread = std::make_unique<ServiceThread>(kernel);
+ session->service_thread = std::make_unique<ServiceThread>(kernel, 1);
return MakeResult(std::move(session));
}
diff --git a/src/core/hle/kernel/service_thread.cpp b/src/core/hle/kernel/service_thread.cpp
index 59a6045df..4ceb7e56a 100644
--- a/src/core/hle/kernel/service_thread.cpp
+++ b/src/core/hle/kernel/service_thread.cpp
@@ -22,7 +22,7 @@ namespace Kernel {
class ServiceThread::Impl final {
public:
- explicit Impl(KernelCore& kernel);
+ explicit Impl(KernelCore& kernel, std::size_t num_threads);
~Impl();
void QueueSyncRequest(ServerSession& session, std::shared_ptr<HLERequestContext>&& context);
@@ -35,9 +35,8 @@ private:
bool stop{};
};
-ServiceThread::Impl::Impl(KernelCore& kernel) {
- constexpr std::size_t SizeOfPool{1};
- for (std::size_t i = 0; i < SizeOfPool; ++i)
+ServiceThread::Impl::Impl(KernelCore& kernel, std::size_t num_threads) {
+ for (std::size_t i = 0; i < num_threads; ++i)
threads.emplace_back([&] {
// Wait for first request before trying to acquire a render context
{
@@ -88,7 +87,8 @@ ServiceThread::Impl::~Impl() {
}
}
-ServiceThread::ServiceThread(KernelCore& kernel) : impl{std::make_unique<Impl>(kernel)} {}
+ServiceThread::ServiceThread(KernelCore& kernel, std::size_t num_threads)
+ : impl{std::make_unique<Impl>(kernel, num_threads)} {}
ServiceThread::~ServiceThread() = default;
diff --git a/src/core/hle/kernel/service_thread.h b/src/core/hle/kernel/service_thread.h
index d252490bb..91ad7ae85 100644
--- a/src/core/hle/kernel/service_thread.h
+++ b/src/core/hle/kernel/service_thread.h
@@ -14,7 +14,7 @@ class ServerSession;
class ServiceThread final {
public:
- explicit ServiceThread(KernelCore& kernel);
+ explicit ServiceThread(KernelCore& kernel, std::size_t num_threads);
~ServiceThread();
void QueueSyncRequest(ServerSession& session, std::shared_ptr<HLERequestContext>&& context);