diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-11 22:36:39 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-02-11 23:47:31 +0100 |
commit | d23d504d776007c1244a85ac1b7bb67c407067b2 (patch) | |
tree | d6e992004bf752819084d648ca8b81fd1fc1db18 /src/core/hle/kernel/server_session.cpp | |
parent | Kernel: Change WaitObject to Synchronization object. In order to better reflect RE. (diff) | |
download | yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.gz yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.bz2 yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.lz yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.xz yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.tar.zst yuzu-d23d504d776007c1244a85ac1b7bb67c407067b2.zip |
Diffstat (limited to 'src/core/hle/kernel/server_session.cpp')
-rw-r--r-- | src/core/hle/kernel/server_session.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index 8207f71c3..ca98fd984 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp @@ -50,6 +50,16 @@ bool ServerSession::ShouldWait(const Thread* thread) const { return pending_requesting_threads.empty() || currently_handling != nullptr; } +bool ServerSession::IsSignaled() const { + // Closed sessions should never wait, an error will be returned from svcReplyAndReceive. + if (!parent->Client()) { + return true; + } + + // Wait if we have no pending requests, or if we're currently handling a request. + return !(pending_requesting_threads.empty() || currently_handling != nullptr); +} + void ServerSession::Acquire(Thread* thread) { ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); // We are now handling a request, pop it from the stack. |