summaryrefslogtreecommitdiff
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
authorGravatar bunnei2022-03-30 21:13:53 -0700
committerGravatar Morph2022-04-02 01:24:30 -0400
commitbf1750664c6aeb991240cdd51c299fa0ab329f8f (patch)
tree5cd2ac5a457aa0109c5be1b24d3296542fb675a8 /src/core/hle/service/service.h
parenthle: kernel: Create a default thread for services that do not need their own ... (diff)
downloadyuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar.gz
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.tar.xz
yuzu-bf1750664c6aeb991240cdd51c299fa0ab329f8f.zip
hle: service: Add option for service interfaces to create or use the default thread.
Diffstat (limited to 'src/core/hle/service/service.h')
-rw-r--r--src/core/hle/service/service.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index b9ab2c465..c78b2baeb 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -114,7 +114,8 @@ private:
114 Kernel::HLERequestContext& ctx); 114 Kernel::HLERequestContext& ctx);
115 115
116 explicit ServiceFrameworkBase(Core::System& system_, const char* service_name_, 116 explicit ServiceFrameworkBase(Core::System& system_, const char* service_name_,
117 u32 max_sessions_, InvokerFn* handler_invoker_); 117 ServiceThreadType thread_type, u32 max_sessions_,
118 InvokerFn* handler_invoker_);
118 ~ServiceFrameworkBase() override; 119 ~ServiceFrameworkBase() override;
119 120
120 void RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n); 121 void RegisterHandlersBase(const FunctionInfoBase* functions, std::size_t n);
@@ -176,14 +177,17 @@ protected:
176 /** 177 /**
177 * Initializes the handler with no functions installed. 178 * Initializes the handler with no functions installed.
178 * 179 *
179 * @param system_ The system context to construct this service under. 180 * @param system_ The system context to construct this service under.
180 * @param service_name_ Name of the service. 181 * @param service_name_ Name of the service.
181 * @param max_sessions_ Maximum number of sessions that can be 182 * @param thread_type Specifies the thread type for this service. If this is set to CreateNew,
182 * connected to this service at the same time. 183 * it creates a new thread for it, otherwise this uses the default thread.
184 * @param max_sessions_ Maximum number of sessions that can be connected to this service at the
185 * same time.
183 */ 186 */
184 explicit ServiceFramework(Core::System& system_, const char* service_name_, 187 explicit ServiceFramework(Core::System& system_, const char* service_name_,
188 ServiceThreadType thread_type = ServiceThreadType::Default,
185 u32 max_sessions_ = ServerSessionCountMax) 189 u32 max_sessions_ = ServerSessionCountMax)
186 : ServiceFrameworkBase(system_, service_name_, max_sessions_, Invoker) {} 190 : ServiceFrameworkBase(system_, service_name_, thread_type, max_sessions_, Invoker) {}
187 191
188 /// Registers handlers in the service. 192 /// Registers handlers in the service.
189 template <std::size_t N> 193 template <std::size_t N>