diff options
author | bunnei <bunneidev@gmail.com> | 2022-03-31 06:11:11 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-04-02 07:24:30 +0200 |
commit | 864523327f9526fa65c92d383ce8536392c0b888 (patch) | |
tree | 12cb4d4401135d7cb9a849f91f92c428cbba91e1 /src/core/hle/kernel/kernel.h | |
parent | Merge pull request #8128 from FernandoS27/gc-fixes (diff) | |
download | yuzu-864523327f9526fa65c92d383ce8536392c0b888.tar yuzu-864523327f9526fa65c92d383ce8536392c0b888.tar.gz yuzu-864523327f9526fa65c92d383ce8536392c0b888.tar.bz2 yuzu-864523327f9526fa65c92d383ce8536392c0b888.tar.lz yuzu-864523327f9526fa65c92d383ce8536392c0b888.tar.xz yuzu-864523327f9526fa65c92d383ce8536392c0b888.tar.zst yuzu-864523327f9526fa65c92d383ce8536392c0b888.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
-rw-r--r-- | src/core/hle/kernel/kernel.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 4c68e96df..24e26fa44 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -271,9 +271,11 @@ public: void ExitSVCProfile(); /** - * Creates an HLE service thread, which are used to execute service routines asynchronously. - * While these are allocated per ServerSession, these need to be owned and managed outside - * of ServerSession to avoid a circular dependency. + * Creates a host thread to execute HLE service requests, which are used to execute service + * routines asynchronously. While these are allocated per ServerSession, these need to be owned + * and managed outside of ServerSession to avoid a circular dependency. In general, most + * services can just use the default service thread, and not need their own host service thread. + * See GetDefaultServiceThread. * @param name String name for the ServerSession creating this thread, used for debug * purposes. * @returns The a weak pointer newly created service thread. @@ -281,6 +283,14 @@ public: std::weak_ptr<Kernel::ServiceThread> CreateServiceThread(const std::string& name); /** + * Gets the default host service thread, which executes HLE service requests. Unless service + * requests need to block on the host, the default service thread should be used in favor of + * creating a new service thread. + * @returns The a weak pointer for the default service thread. + */ + std::weak_ptr<Kernel::ServiceThread> GetDefaultServiceThread() const; + + /** * Releases a HLE service thread, instructing KernelCore to free it. This should be called when * the ServerSession associated with the thread is destroyed. * @param service_thread Service thread to release. |