summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/service_thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-11 01:03:35 +0100
committerbunnei <bunneidev@gmail.com>2020-12-29 01:33:47 +0100
commit8bc3d66354972c8a288a56c9b75c9705597778f8 (patch)
tree24a1fb294cf8c9fbcd716f03ebd40b431676eeb6 /src/core/hle/kernel/service_thread.cpp
parenthle: service: nvflinger: Refactor locking and interfaces. (diff)
downloadyuzu-8bc3d66354972c8a288a56c9b75c9705597778f8.tar
yuzu-8bc3d66354972c8a288a56c9b75c9705597778f8.tar.gz
yuzu-8bc3d66354972c8a288a56c9b75c9705597778f8.tar.bz2
yuzu-8bc3d66354972c8a288a56c9b75c9705597778f8.tar.lz
yuzu-8bc3d66354972c8a288a56c9b75c9705597778f8.tar.xz
yuzu-8bc3d66354972c8a288a56c9b75c9705597778f8.tar.zst
yuzu-8bc3d66354972c8a288a56c9b75c9705597778f8.zip
Diffstat (limited to 'src/core/hle/kernel/service_thread.cpp')
-rw-r--r--src/core/hle/kernel/service_thread.cpp10
1 files changed, 5 insertions, 5 deletions
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;