diff options
author | Sebastian Valle <subv2112@gmail.com> | 2017-06-30 00:05:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-30 00:05:22 +0200 |
commit | 56d718b2a1d6385c88c2044f780280a5dfbc6072 (patch) | |
tree | a74b2c67bde47be93f2b2c3d55292bfbb421985a /src/core/hle/kernel/server_session.h | |
parent | Merge pull request #2809 from wwylele/texture-copy-fix (diff) | |
parent | Kernel/SVC: Pass the current thread as a parameter to ClientSession::SendSyncRequest. (diff) | |
download | yuzu-56d718b2a1d6385c88c2044f780280a5dfbc6072.tar yuzu-56d718b2a1d6385c88c2044f780280a5dfbc6072.tar.gz yuzu-56d718b2a1d6385c88c2044f780280a5dfbc6072.tar.bz2 yuzu-56d718b2a1d6385c88c2044f780280a5dfbc6072.tar.lz yuzu-56d718b2a1d6385c88c2044f780280a5dfbc6072.tar.xz yuzu-56d718b2a1d6385c88c2044f780280a5dfbc6072.tar.zst yuzu-56d718b2a1d6385c88c2044f780280a5dfbc6072.zip |
Diffstat (limited to 'src/core/hle/kernel/server_session.h')
-rw-r--r-- | src/core/hle/kernel/server_session.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/hle/kernel/server_session.h b/src/core/hle/kernel/server_session.h index 5365605da..f4360ddf3 100644 --- a/src/core/hle/kernel/server_session.h +++ b/src/core/hle/kernel/server_session.h @@ -67,20 +67,30 @@ public: /** * Handle a sync request from the emulated application. + * @param thread Thread that initiated the request. * @returns ResultCode from the operation. */ - ResultCode HandleSyncRequest(); + ResultCode HandleSyncRequest(SharedPtr<Thread> thread); bool ShouldWait(Thread* thread) const override; void Acquire(Thread* thread) override; std::string name; ///< The name of this session (optional) - bool signaled; ///< Whether there's new data available to this ServerSession std::shared_ptr<Session> parent; ///< The parent session, which links to the client endpoint. std::shared_ptr<SessionRequestHandler> hle_handler; ///< This session's HLE request handler (optional) + /// List of threads that are pending a response after a sync request. This list is processed in + /// a LIFO manner, thus, the last request will be dispatched first. + /// TODO(Subv): Verify if this is indeed processed in LIFO using a hardware test. + std::vector<SharedPtr<Thread>> pending_requesting_threads; + + /// Thread whose request is currently being handled. A request is considered "handled" when a + /// response is sent via svcReplyAndReceive. + /// TODO(Subv): Find a better name for this. + SharedPtr<Thread> currently_handling; + private: ServerSession(); ~ServerSession() override; |